jbrowse-plugin-mafviewer 1.2.1 → 1.2.2

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.
@@ -1,12 +1,12 @@
1
- "use strict";var JBrowsePluginMafViewer=(()=>{var YR=Object.create;var ns=Object.defineProperty;var ZR=Object.getOwnPropertyDescriptor;var JR=Object.getOwnPropertyNames;var XR=Object.getPrototypeOf,QR=Object.prototype.hasOwnProperty;var pt=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),np=(e,t)=>{for(var r in t)ns(e,r,{get:t[r],enumerable:!0})},Yg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JR(t))!QR.call(e,i)&&i!==r&&ns(e,i,{get:()=>t[i],enumerable:!(n=ZR(t,i))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?YR(XR(e)):{},Yg(t||!e||!e.__esModule?ns(r,"default",{value:e,enumerable:!0}):r,e)),Zg=e=>Yg(ns({},"__esModule",{value:!0}),e);var Xg=b((vY,Jg)=>{Jg.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Gr=b((bY,eb)=>{eb.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var ip=b(()=>{});var up=b(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});function tb(e){return(typeof e=="object"&&e!==null&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}var op=class{constructor(t,r={}){this.baseOverrides={},this.url=t;let n=r.fetch||globalThis.fetch.bind(globalThis);r.overrides&&(this.baseOverrides=r.overrides),this.fetchImplementation=n}async fetch(t,r){let n;try{n=await this.fetchImplementation(t,r)}catch(i){if(`${i}`.includes("Failed to fetch")){console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`);try{n=await this.fetchImplementation(t,{...r,cache:"reload"})}catch(o){throw new Error(`${tb(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${tb(i)} fetching ${t}`,{cause:i})}return n}async read(t,r,n={}){let{headers:i={},signal:o,overrides:a={}}=n;t<1/0?i.range=`bytes=${r}-${r+t}`:t===1/0&&r!==0&&(i.range=`bytes=${r}-`);let u=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...i,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:o});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(u.status===200&&r===0||u.status===206){let l=await u.arrayBuffer(),s=u.headers.get("content-range"),c=/\/(\d+)$/.exec(s||"");return c?.[1]&&(this._stat={size:parseInt(c[1],10)}),new Uint8Array(l.slice(0,t))}throw u.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${u.status} fetching ${this.url}`)}async readFile(t={}){let r,n;typeof t=="string"?(r=t,n={}):(r=t.encoding,n=t,delete n.encoding);let{headers:i={},signal:o,overrides:a={}}=n,u=await this.fetch(this.url,{headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a});if(u.status!==200)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(r==="utf8")return u.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await u.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}};ap.default=op});var nb=b(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0})});var ib=b(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});var sp=class{constructor(t){this.blob=t,this.size=t.size}async read(t,r=0){if(!t)return new Uint8Array(0);let n=r,i=n+t;return new Uint8Array(await this.blob.slice(n,i).arrayBuffer())}async readFile(t){let r=typeof t=="string"?t:t?.encoding;if(r==="utf8")return this.blob.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}};cp.default=sp});var lp=b(et=>{"use strict";var tM=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),rM=et&&et.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&tM(t,e,r)},ga=et&&et.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(et,"__esModule",{value:!0});et.LocalFile=et.RemoteFile=et.BlobFile=void 0;et.open=oM;et.fromUrl=ob;var nM=ga(ip()),iM=ga(up());rM(nb(),et);function ob(e,t={}){return new iM.default(e,t)}function oM(e,t,r,n={}){if(r!==void 0)return r;if(e!==void 0)return ob(e,n);if(t!==void 0)return new nM.default(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}var aM=ib();Object.defineProperty(et,"BlobFile",{enumerable:!0,get:function(){return ga(aM).default}});var uM=up();Object.defineProperty(et,"RemoteFile",{enumerable:!0,get:function(){return ga(uM).default}});var sM=ip();Object.defineProperty(et,"LocalFile",{enumerable:!0,get:function(){return ga(sM).default}})});var $r=b(ht=>{"use strict";var cM=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function lM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}ht.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)lM(r,n)&&(e[n]=r[n])}}return e};ht.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var fM={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},dM={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};ht.setTyped=function(e){e?(ht.Buf8=Uint8Array,ht.Buf16=Uint16Array,ht.Buf32=Int32Array,ht.assign(ht,fM)):(ht.Buf8=Array,ht.Buf16=Array,ht.Buf32=Array,ht.assign(ht,dM))};ht.setTyped(cM)});var Pb=b(Zi=>{"use strict";var pM=$r(),hM=4,ab=0,ub=1,mM=2;function Yi(e){for(var t=e.length;--t>=0;)e[t]=0}var vM=0,pb=1,gM=2,bM=3,_M=258,gp=29,Sa=256,_a=Sa+1+gp,Ki=30,bp=19,hb=2*_a+1,ai=15,fp=16,yM=7,_p=256,mb=16,vb=17,gb=18,mp=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],is=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],wM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],bb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xM=512,Kr=new Array((_a+2)*2);Yi(Kr);var ba=new Array(Ki*2);Yi(ba);var ya=new Array(xM);Yi(ya);var wa=new Array(_M-bM+1);Yi(wa);var yp=new Array(gp);Yi(yp);var os=new Array(Ki);Yi(os);function dp(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var _b,yb,wb;function pp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function xb(e){return e<256?ya[e]:ya[256+(e>>>7)]}function xa(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Et(e,t,r){e.bi_valid>fp-r?(e.bi_buf|=t<<e.bi_valid&65535,xa(e,e.bi_buf),e.bi_buf=t>>fp-e.bi_valid,e.bi_valid+=r-fp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Or(e,t,r){Et(e,r[t*2],r[t*2+1])}function Sb(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function SM(e){e.bi_valid===16?(xa(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function OM(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,l=t.stat_desc.max_length,s,c,d,f,p,h,m=0;for(f=0;f<=ai;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<hb;s++)c=e.heap[s],f=r[r[c*2+1]*2+1]+1,f>l&&(f=l,m++),r[c*2+1]=f,!(c>n)&&(e.bl_count[f]++,p=0,c>=u&&(p=a[c-u]),h=r[c*2],e.opt_len+=h*(f+p),o&&(e.static_len+=h*(i[c*2+1]+p)));if(m!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(f=l;f!==0;f--)for(c=e.bl_count[f];c!==0;)d=e.heap[--s],!(d>n)&&(r[d*2+1]!==f&&(e.opt_len+=(f-r[d*2+1])*r[d*2],r[d*2+1]=f),c--)}}function Ob(e,t,r){var n=new Array(ai+1),i=0,o,a;for(o=1;o<=ai;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var u=e[a*2+1];u!==0&&(e[a*2]=Sb(n[u]++,u))}}function EM(){var e,t,r,n,i,o=new Array(ai+1);for(r=0,n=0;n<gp-1;n++)for(yp[n]=r,e=0;e<1<<mp[n];e++)wa[r++]=n;for(wa[r-1]=n,i=0,n=0;n<16;n++)for(os[n]=i,e=0;e<1<<is[n];e++)ya[i++]=n;for(i>>=7;n<Ki;n++)for(os[n]=i<<7,e=0;e<1<<is[n]-7;e++)ya[256+i++]=n;for(t=0;t<=ai;t++)o[t]=0;for(e=0;e<=143;)Kr[e*2+1]=8,e++,o[8]++;for(;e<=255;)Kr[e*2+1]=9,e++,o[9]++;for(;e<=279;)Kr[e*2+1]=7,e++,o[7]++;for(;e<=287;)Kr[e*2+1]=8,e++,o[8]++;for(Ob(Kr,_a+1,o),e=0;e<Ki;e++)ba[e*2+1]=5,ba[e*2]=Sb(e,5);_b=new dp(Kr,mp,Sa+1,_a,ai),yb=new dp(ba,is,0,Ki,ai),wb=new dp(new Array(0),wM,0,bp,yM)}function Eb(e){var t;for(t=0;t<_a;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ki;t++)e.dyn_dtree[t*2]=0;for(t=0;t<bp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[_p*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ab(e){e.bi_valid>8?xa(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function AM(e,t,r,n){Ab(e),n&&(xa(e,r),xa(e,~r)),pM.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function sb(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function hp(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&sb(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!sb(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function cb(e,t,r){var n,i,o=0,a,u;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,n===0?Or(e,i,t):(a=wa[i],Or(e,a+Sa+1,t),u=mp[a],u!==0&&(i-=yp[a],Et(e,i,u)),n--,a=xb(n),Or(e,a,r),u=is[a],u!==0&&(n-=os[a],Et(e,n,u)));while(o<e.last_lit);Or(e,_p,t)}function vp(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,u,l=-1,s;for(e.heap_len=0,e.heap_max=hb,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=l<2?++l:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,i&&(e.static_len-=n[s*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)hp(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],hp(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=u,r[s*2]=r[a*2]+r[u*2],e.depth[s]=(e.depth[a]>=e.depth[u]?e.depth[a]:e.depth[u])+1,r[a*2+1]=r[u*2+1]=s,e.heap[1]=s++,hp(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],OM(e,t),Ob(r,l,e.bl_count)}function lb(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)&&(u<s?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[mb*2]++):u<=10?e.bl_tree[vb*2]++:e.bl_tree[gb*2]++,u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4))}function fb(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)){if(u<s)do Or(e,o,e.bl_tree);while(--u!==0);else o!==0?(o!==i&&(Or(e,o,e.bl_tree),u--),Or(e,mb,e.bl_tree),Et(e,u-3,2)):u<=10?(Or(e,vb,e.bl_tree),Et(e,u-3,3)):(Or(e,gb,e.bl_tree),Et(e,u-11,7));u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4)}}function TM(e){var t;for(lb(e,e.dyn_ltree,e.l_desc.max_code),lb(e,e.dyn_dtree,e.d_desc.max_code),vp(e,e.bl_desc),t=bp-1;t>=3&&e.bl_tree[bb[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function PM(e,t,r,n){var i;for(Et(e,t-257,5),Et(e,r-1,5),Et(e,n-4,4),i=0;i<n;i++)Et(e,e.bl_tree[bb[i]*2+1],3);fb(e,e.dyn_ltree,t-1),fb(e,e.dyn_dtree,r-1)}function RM(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return ab;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return ub;for(r=32;r<Sa;r++)if(e.dyn_ltree[r*2]!==0)return ub;return ab}var db=!1;function MM(e){db||(EM(),db=!0),e.l_desc=new pp(e.dyn_ltree,_b),e.d_desc=new pp(e.dyn_dtree,yb),e.bl_desc=new pp(e.bl_tree,wb),e.bi_buf=0,e.bi_valid=0,Eb(e)}function Tb(e,t,r,n){Et(e,(vM<<1)+(n?1:0),3),AM(e,t,r,!0)}function kM(e){Et(e,pb<<1,3),Or(e,_p,Kr),SM(e)}function CM(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===mM&&(e.strm.data_type=RM(e)),vp(e,e.l_desc),vp(e,e.d_desc),a=TM(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?Tb(e,t,r,n):e.strategy===hM||o===i?(Et(e,(pb<<1)+(n?1:0),3),cb(e,Kr,ba)):(Et(e,(gM<<1)+(n?1:0),3),PM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),cb(e,e.dyn_ltree,e.dyn_dtree)),Eb(e),n&&Ab(e)}function qM(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(wa[r]+Sa+1)*2]++,e.dyn_dtree[xb(t)*2]++),e.last_lit===e.lit_bufsize-1}Zi._tr_init=MM;Zi._tr_stored_block=Tb;Zi._tr_flush_block=CM;Zi._tr_tally=qM;Zi._tr_align=kM});var wp=b((TY,Rb)=>{"use strict";function IM(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}Rb.exports=IM});var xp=b((PY,Mb)=>{"use strict";function jM(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var FM=jM();function LM(e,t,r,n){var i=FM,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Mb.exports=LM});var as=b((RY,kb)=>{"use strict";kb.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var zb=b(Tr=>{"use strict";var mt=$r(),Bt=Pb(),jb=wp(),dn=xp(),NM=as(),li=0,DM=1,zM=3,gn=4,Cb=5,Ar=0,qb=1,Ut=-2,BM=-3,Sp=-5,UM=-1,WM=1,us=2,HM=3,VM=4,GM=0,$M=2,fs=8,KM=9,YM=15,ZM=8,JM=29,XM=256,Ep=XM+1+JM,QM=30,ek=19,tk=2*Ep+1,rk=15,de=3,mn=258,nr=mn+de+1,nk=32,ds=42,Ap=69,ss=73,cs=91,ls=103,ui=113,Ea=666,Ve=1,Aa=2,si=3,Qi=4,ik=3;function vn(e,t){return e.msg=NM[t],t}function Ib(e){return(e<<1)-(e>4?9:0)}function hn(e){for(var t=e.length;--t>=0;)e[t]=0}function pn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(mt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function tt(e,t){Bt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,pn(e.strm)}function me(e,t){e.pending_buf[e.pending++]=t}function Oa(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function ok(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,mt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=jb(e.adler,t,i,r):e.state.wrap===2&&(e.adler=dn(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Fb(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,u=e.nice_match,l=e.strstart>e.w_size-nr?e.strstart-(e.w_size-nr):0,s=e.window,c=e.w_mask,d=e.prev,f=e.strstart+mn,p=s[n+a-1],h=s[n+a];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(i=t,!(s[i+a]!==h||s[i+a-1]!==p||s[i]!==s[n]||s[++i]!==s[n+1])){n+=2,i++;do;while(s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&n<f);if(o=mn-(f-n),n=f-mn,o>a){if(e.match_start=t,a=o,o>=u)break;p=s[n+a-1],h=s[n+a]}}while((t=d[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function ci(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-nr)){mt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=ok(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=de)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+de-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<de)););}while(e.lookahead<nr&&e.strm.avail_in!==0)}function ak(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ci(e),e.lookahead===0&&t===li)return Ve;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,tt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-nr&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):(e.strstart>e.block_start&&(tt(e,!1),e.strm.avail_out===0),Ve)}function Op(e,t){for(var r,n;;){if(e.lookahead<nr){if(ci(e),e.lookahead<nr&&t===li)return Ve;if(e.lookahead===0)break}if(r=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-nr&&(e.match_length=Fb(e,r)),e.match_length>=de)if(n=Bt._tr_tally(e,e.strstart-e.match_start,e.match_length-de),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=de){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=e.strstart<de-1?e.strstart:de-1,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function Ji(e,t){for(var r,n,i;;){if(e.lookahead<nr){if(ci(e),e.lookahead<nr&&t===li)return Ve;if(e.lookahead===0)break}if(r=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=de-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-nr&&(e.match_length=Fb(e,r),e.match_length<=5&&(e.strategy===WM||e.match_length===de&&e.strstart-e.match_start>4096)&&(e.match_length=de-1)),e.prev_length>=de&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-de,n=Bt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-de),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=de-1,e.strstart++,n&&(tt(e,!1),e.strm.avail_out===0))return Ve}else if(e.match_available){if(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),n&&tt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ve}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function uk(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=mn){if(ci(e),e.lookahead<=mn&&t===li)return Ve;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=de&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+mn;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=mn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(r=Bt._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function sk(e,t){for(var r;;){if(e.lookahead===0&&(ci(e),e.lookahead===0)){if(t===li)return Ve;break}if(e.match_length=0,r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function Er(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Xi;Xi=[new Er(0,0,0,0,ak),new Er(4,4,8,4,Op),new Er(4,5,16,8,Op),new Er(4,6,32,32,Op),new Er(4,4,16,16,Ji),new Er(8,16,32,32,Ji),new Er(8,16,128,128,Ji),new Er(8,32,128,256,Ji),new Er(32,128,258,1024,Ji),new Er(32,258,258,4096,Ji)];function ck(e){e.window_size=2*e.w_size,hn(e.head),e.max_lazy_match=Xi[e.level].max_lazy,e.good_match=Xi[e.level].good_length,e.nice_match=Xi[e.level].nice_length,e.max_chain_length=Xi[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=de-1,e.match_available=0,e.ins_h=0}function lk(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=fs,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new mt.Buf16(tk*2),this.dyn_dtree=new mt.Buf16((2*QM+1)*2),this.bl_tree=new mt.Buf16((2*ek+1)*2),hn(this.dyn_ltree),hn(this.dyn_dtree),hn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new mt.Buf16(rk+1),this.heap=new mt.Buf16(2*Ep+1),hn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new mt.Buf16(2*Ep+1),hn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Lb(e){var t;return!e||!e.state?vn(e,Ut):(e.total_in=e.total_out=0,e.data_type=$M,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ds:ui,e.adler=t.wrap===2?0:1,t.last_flush=li,Bt._tr_init(t),Ar)}function Nb(e){var t=Lb(e);return t===Ar&&ck(e.state),t}function fk(e,t){return!e||!e.state||e.state.wrap!==2?Ut:(e.state.gzhead=t,Ar)}function Db(e,t,r,n,i,o){if(!e)return Ut;var a=1;if(t===UM&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>KM||r!==fs||n<8||n>15||t<0||t>9||o<0||o>VM)return vn(e,Ut);n===8&&(n=9);var u=new lk;return e.state=u,u.strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=i+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+de-1)/de),u.window=new mt.Buf8(u.w_size*2),u.head=new mt.Buf16(u.hash_size),u.prev=new mt.Buf16(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new mt.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=o,u.method=r,Nb(e)}function dk(e,t){return Db(e,t,fs,YM,ZM,GM)}function pk(e,t){var r,n,i,o;if(!e||!e.state||t>Cb||t<0)return e?vn(e,Ut):Ut;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Ea&&t!==gn)return vn(e,e.avail_out===0?Sp:Ut);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ds)if(n.wrap===2)e.adler=0,me(n,31),me(n,139),me(n,8),n.gzhead?(me(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),me(n,n.gzhead.time&255),me(n,n.gzhead.time>>8&255),me(n,n.gzhead.time>>16&255),me(n,n.gzhead.time>>24&255),me(n,n.level===9?2:n.strategy>=us||n.level<2?4:0),me(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(me(n,n.gzhead.extra.length&255),me(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=dn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Ap):(me(n,0),me(n,0),me(n,0),me(n,0),me(n,0),me(n,n.level===9?2:n.strategy>=us||n.level<2?4:0),me(n,ik),n.status=ui);else{var a=fs+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=us||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=nk),a+=31-a%31,n.status=ui,Oa(n,a),n.strstart!==0&&(Oa(n,e.adler>>>16),Oa(n,e.adler&65535)),e.adler=1}if(n.status===Ap)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),pn(e),i=n.pending,n.pending===n.pending_buf_size));)me(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=ss)}else n.status=ss;if(n.status===ss)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),pn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,me(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=cs)}else n.status=cs;if(n.status===cs)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),pn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,me(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=ls)}else n.status=ls;if(n.status===ls&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&pn(e),n.pending+2<=n.pending_buf_size&&(me(n,e.adler&255),me(n,e.adler>>8&255),e.adler=0,n.status=ui)):n.status=ui),n.pending!==0){if(pn(e),e.avail_out===0)return n.last_flush=-1,Ar}else if(e.avail_in===0&&Ib(t)<=Ib(r)&&t!==gn)return vn(e,Sp);if(n.status===Ea&&e.avail_in!==0)return vn(e,Sp);if(e.avail_in!==0||n.lookahead!==0||t!==li&&n.status!==Ea){var l=n.strategy===us?sk(n,t):n.strategy===HM?uk(n,t):Xi[n.level].func(n,t);if((l===si||l===Qi)&&(n.status=Ea),l===Ve||l===si)return e.avail_out===0&&(n.last_flush=-1),Ar;if(l===Aa&&(t===DM?Bt._tr_align(n):t!==Cb&&(Bt._tr_stored_block(n,0,0,!1),t===zM&&(hn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),pn(e),e.avail_out===0))return n.last_flush=-1,Ar}return t!==gn?Ar:n.wrap<=0?qb:(n.wrap===2?(me(n,e.adler&255),me(n,e.adler>>8&255),me(n,e.adler>>16&255),me(n,e.adler>>24&255),me(n,e.total_in&255),me(n,e.total_in>>8&255),me(n,e.total_in>>16&255),me(n,e.total_in>>24&255)):(Oa(n,e.adler>>>16),Oa(n,e.adler&65535)),pn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ar:qb)}function hk(e){var t;return!e||!e.state?Ut:(t=e.state.status,t!==ds&&t!==Ap&&t!==ss&&t!==cs&&t!==ls&&t!==ui&&t!==Ea?vn(e,Ut):(e.state=null,t===ui?vn(e,BM):Ar))}function mk(e,t){var r=t.length,n,i,o,a,u,l,s,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ds||n.lookahead))return Ut;for(a===1&&(e.adler=jb(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(hn(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new mt.Buf8(n.w_size),mt.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),u=e.avail_in,l=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,ci(n);n.lookahead>=de;){i=n.strstart,o=n.lookahead-(de-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+de-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=de-1,ci(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=de-1,n.match_available=0,e.next_in=l,e.input=s,e.avail_in=u,n.wrap=a,Ar}Tr.deflateInit=dk;Tr.deflateInit2=Db;Tr.deflateReset=Nb;Tr.deflateResetKeep=Lb;Tr.deflateSetHeader=fk;Tr.deflate=pk;Tr.deflateEnd=hk;Tr.deflateSetDictionary=mk;Tr.deflateInfo="pako deflate (from Nodeca project)"});var Tp=b(eo=>{"use strict";var ps=$r(),Bb=!0,Ub=!0;try{String.fromCharCode.apply(null,[0])}catch{Bb=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ub=!1}var Ta=new ps.Buf8(256);for(Yr=0;Yr<256;Yr++)Ta[Yr]=Yr>=252?6:Yr>=248?5:Yr>=240?4:Yr>=224?3:Yr>=192?2:1;var Yr;Ta[254]=Ta[254]=1;eo.string2buf=function(e){var t,r,n,i,o,a=e.length,u=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new ps.Buf8(u),o=0,i=0;o<u;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function Wb(e,t){if(t<65534&&(e.subarray&&Ub||!e.subarray&&Bb))return String.fromCharCode.apply(null,ps.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}eo.buf2binstring=function(e){return Wb(e,e.length)};eo.binstring2buf=function(e){for(var t=new ps.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};eo.buf2string=function(e,t){var r,n,i,o,a=t||e.length,u=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){u[n++]=i;continue}if(o=Ta[i],o>4){u[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){u[n++]=65533;continue}i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|i&1023)}return Wb(u,n)};eo.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Ta[e[r]]>t?r:t}});var Pp=b((CY,Hb)=>{"use strict";function vk(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Hb.exports=vk});var Kb=b(Ma=>{"use strict";var Pa=zb(),Ra=$r(),Mp=Tp(),kp=as(),gk=Pp(),$b=Object.prototype.toString,bk=0,Rp=4,to=0,Vb=1,Gb=2,_k=-1,yk=0,wk=8;function fi(e){if(!(this instanceof fi))return new fi(e);this.options=Ra.assign({level:_k,method:wk,chunkSize:16384,windowBits:15,memLevel:8,strategy:yk,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gk,this.strm.avail_out=0;var r=Pa.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==to)throw new Error(kp[r]);if(t.header&&Pa.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Mp.string2buf(t.dictionary):$b.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Pa.deflateSetDictionary(this.strm,n),r!==to)throw new Error(kp[r]);this._dict_set=!0}}fi.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?Rp:bk,typeof e=="string"?r.input=Mp.string2buf(e):$b.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ra.Buf8(n),r.next_out=0,r.avail_out=n),i=Pa.deflate(r,o),i!==Vb&&i!==to)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===Rp||o===Gb))&&(this.options.to==="string"?this.onData(Mp.buf2binstring(Ra.shrinkBuf(r.output,r.next_out))):this.onData(Ra.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Vb);return o===Rp?(i=Pa.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===to):(o===Gb&&(this.onEnd(to),r.avail_out=0),!0)};fi.prototype.onData=function(e){this.chunks.push(e)};fi.prototype.onEnd=function(e){e===to&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ra.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Cp(e,t){var r=new fi(t);if(r.push(e,!0),r.err)throw r.msg||kp[r.err];return r.result}function xk(e,t){return t=t||{},t.raw=!0,Cp(e,t)}function Sk(e,t){return t=t||{},t.gzip=!0,Cp(e,t)}Ma.Deflate=fi;Ma.deflate=Cp;Ma.deflateRaw=xk;Ma.gzip=Sk});var Zb=b((IY,Yb)=>{"use strict";var hs=30,Ok=12;Yb.exports=function(t,r){var n,i,o,a,u,l,s,c,d,f,p,h,m,g,_,w,y,x,O,A,T,R,k,M,P;n=t.state,i=t.next_in,M=t.input,o=i+(t.avail_in-5),a=t.next_out,P=t.output,u=a-(r-t.avail_out),l=a+(t.avail_out-257),s=n.dmax,c=n.wsize,d=n.whave,f=n.wnext,p=n.window,h=n.hold,m=n.bits,g=n.lencode,_=n.distcode,w=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=g[h&w];t:for(;;){if(O=x>>>24,h>>>=O,m-=O,O=x>>>16&255,O===0)P[a++]=x&65535;else if(O&16){A=x&65535,O&=15,O&&(m<O&&(h+=M[i++]<<m,m+=8),A+=h&(1<<O)-1,h>>>=O,m-=O),m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=_[h&y];r:for(;;){if(O=x>>>24,h>>>=O,m-=O,O=x>>>16&255,O&16){if(T=x&65535,O&=15,m<O&&(h+=M[i++]<<m,m+=8,m<O&&(h+=M[i++]<<m,m+=8)),T+=h&(1<<O)-1,T>s){t.msg="invalid distance too far back",n.mode=hs;break e}if(h>>>=O,m-=O,O=a-u,T>O){if(O=T-O,O>d&&n.sane){t.msg="invalid distance too far back",n.mode=hs;break e}if(R=0,k=p,f===0){if(R+=c-O,O<A){A-=O;do P[a++]=p[R++];while(--O);R=a-T,k=P}}else if(f<O){if(R+=c+f-O,O-=f,O<A){A-=O;do P[a++]=p[R++];while(--O);if(R=0,f<A){O=f,A-=O;do P[a++]=p[R++];while(--O);R=a-T,k=P}}}else if(R+=f-O,O<A){A-=O;do P[a++]=p[R++];while(--O);R=a-T,k=P}for(;A>2;)P[a++]=k[R++],P[a++]=k[R++],P[a++]=k[R++],A-=3;A&&(P[a++]=k[R++],A>1&&(P[a++]=k[R++]))}else{R=a-T;do P[a++]=P[R++],P[a++]=P[R++],P[a++]=P[R++],A-=3;while(A>2);A&&(P[a++]=P[R++],A>1&&(P[a++]=P[R++]))}}else if((O&64)===0){x=_[(x&65535)+(h&(1<<O)-1)];continue r}else{t.msg="invalid distance code",n.mode=hs;break e}break}}else if((O&64)===0){x=g[(x&65535)+(h&(1<<O)-1)];continue t}else if(O&32){n.mode=Ok;break e}else{t.msg="invalid literal/length code",n.mode=hs;break e}break}}while(i<o&&a<l);A=m>>3,i-=A,m-=A<<3,h&=(1<<m)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<l?257+(l-a):257-(a-l),n.hold=h,n.bits=m}});var n_=b((jY,r_)=>{"use strict";var Jb=$r(),ro=15,Xb=852,Qb=592,e_=0,qp=1,t_=2,Ek=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ak=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Tk=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Pk=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r_.exports=function(t,r,n,i,o,a,u,l){var s=l.bits,c=0,d=0,f=0,p=0,h=0,m=0,g=0,_=0,w=0,y=0,x,O,A,T,R,k=null,M=0,P,N=new Jb.Buf16(ro+1),C=new Jb.Buf16(ro+1),I=null,W=0,j,D,F;for(c=0;c<=ro;c++)N[c]=0;for(d=0;d<i;d++)N[r[n+d]]++;for(h=s,p=ro;p>=1&&N[p]===0;p--);if(h>p&&(h=p),p===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<p&&N[f]===0;f++);for(h<f&&(h=f),_=1,c=1;c<=ro;c++)if(_<<=1,_-=N[c],_<0)return-1;if(_>0&&(t===e_||p!==1))return-1;for(C[1]=0,c=1;c<ro;c++)C[c+1]=C[c]+N[c];for(d=0;d<i;d++)r[n+d]!==0&&(u[C[r[n+d]]++]=d);if(t===e_?(k=I=u,P=19):t===qp?(k=Ek,M-=257,I=Ak,W-=257,P=256):(k=Tk,I=Pk,P=-1),y=0,d=0,c=f,R=a,m=h,g=0,A=-1,w=1<<h,T=w-1,t===qp&&w>Xb||t===t_&&w>Qb)return 1;for(;;){j=c-g,u[d]<P?(D=0,F=u[d]):u[d]>P?(D=I[W+u[d]],F=k[M+u[d]]):(D=96,F=0),x=1<<c-g,O=1<<m,f=O;do O-=x,o[R+(y>>g)+O]=j<<24|D<<16|F|0;while(O!==0);for(x=1<<c-1;y&x;)x>>=1;if(x!==0?(y&=x-1,y+=x):y=0,d++,--N[c]===0){if(c===p)break;c=r[n+u[d]]}if(c>h&&(y&T)!==A){for(g===0&&(g=h),R+=f,m=c-g,_=1<<m;m+g<p&&(_-=N[m+g],!(_<=0));)m++,_<<=1;if(w+=1<<m,t===qp&&w>Xb||t===t_&&w>Qb)return 1;A=y&T,o[A]=h<<24|m<<16|R-a|0}}return y!==0&&(o[R+y]=c-g<<24|64<<16|0),l.bits=h,0}});var N_=b(ir=>{"use strict";var Ft=$r(),Dp=wp(),Pr=xp(),Rk=Zb(),ka=n_(),Mk=0,R_=1,M_=2,i_=4,kk=5,ms=6,di=0,Ck=1,qk=2,Wt=-2,k_=-3,zp=-4,Ik=-5,o_=8,C_=1,a_=2,u_=3,s_=4,c_=5,l_=6,f_=7,d_=8,p_=9,h_=10,bs=11,Zr=12,Ip=13,m_=14,jp=15,v_=16,g_=17,b_=18,__=19,vs=20,gs=21,y_=22,w_=23,x_=24,S_=25,O_=26,Fp=27,E_=28,A_=29,Me=30,Bp=31,jk=32,Fk=852,Lk=592,Nk=15,Dk=Nk;function T_(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function zk(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ft.Buf16(320),this.work=new Ft.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function q_(e){var t;return!e||!e.state?Wt:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=C_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ft.Buf32(Fk),t.distcode=t.distdyn=new Ft.Buf32(Lk),t.sane=1,t.back=-1,di)}function I_(e){var t;return!e||!e.state?Wt:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,q_(e))}function j_(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Wt:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,I_(e))}function F_(e,t){var r,n;return e?(n=new zk,e.state=n,n.window=null,r=j_(e,t),r!==di&&(e.state=null),r):Wt}function Bk(e){return F_(e,Dk)}var P_=!0,Lp,Np;function Uk(e){if(P_){var t;for(Lp=new Ft.Buf32(512),Np=new Ft.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ka(R_,e.lens,0,288,Lp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ka(M_,e.lens,0,32,Np,0,e.work,{bits:5}),P_=!1}e.lencode=Lp,e.lenbits=9,e.distcode=Np,e.distbits=5}function L_(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Ft.Buf8(o.wsize)),n>=o.wsize?(Ft.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),Ft.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Ft.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function Wk(e,t){var r,n,i,o,a,u,l,s,c,d,f,p,h,m,g=0,_,w,y,x,O,A,T,R,k=new Ft.Buf8(4),M,P,N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Wt;r=e.state,r.mode===Zr&&(r.mode=Ip),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,d=u,f=l,R=di;e:for(;;)switch(r.mode){case C_:if(r.wrap===0){r.mode=Ip;break}for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.wrap&2&&s===35615){r.check=0,k[0]=s&255,k[1]=s>>>8&255,r.check=Pr(r.check,k,2,0),s=0,c=0,r.mode=a_;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((s&255)<<8)+(s>>8))%31){e.msg="incorrect header check",r.mode=Me;break}if((s&15)!==o_){e.msg="unknown compression method",r.mode=Me;break}if(s>>>=4,c-=4,T=(s&15)+8,r.wbits===0)r.wbits=T;else if(T>r.wbits){e.msg="invalid window size",r.mode=Me;break}r.dmax=1<<T,e.adler=r.check=1,r.mode=s&512?h_:Zr,s=0,c=0;break;case a_:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.flags=s,(r.flags&255)!==o_){e.msg="unknown compression method",r.mode=Me;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Me;break}r.head&&(r.head.text=s>>8&1),r.flags&512&&(k[0]=s&255,k[1]=s>>>8&255,r.check=Pr(r.check,k,2,0)),s=0,c=0,r.mode=u_;case u_:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.time=s),r.flags&512&&(k[0]=s&255,k[1]=s>>>8&255,k[2]=s>>>16&255,k[3]=s>>>24&255,r.check=Pr(r.check,k,4,0)),s=0,c=0,r.mode=s_;case s_:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=s&255,r.head.os=s>>8),r.flags&512&&(k[0]=s&255,k[1]=s>>>8&255,r.check=Pr(r.check,k,2,0)),s=0,c=0,r.mode=c_;case c_:if(r.flags&1024){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length=s,r.head&&(r.head.extra_len=s),r.flags&512&&(k[0]=s&255,k[1]=s>>>8&255,r.check=Pr(r.check,k,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=l_;case l_:if(r.flags&1024&&(p=r.length,p>u&&(p=u),p&&(r.head&&(T=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Ft.arraySet(r.head.extra,n,o,p,T)),r.flags&512&&(r.check=Pr(r.check,n,p,o)),u-=p,o+=p,r.length-=p),r.length))break e;r.length=0,r.mode=f_;case f_:if(r.flags&2048){if(u===0)break e;p=0;do T=n[o+p++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T));while(T&&p<u);if(r.flags&512&&(r.check=Pr(r.check,n,p,o)),u-=p,o+=p,T)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=d_;case d_:if(r.flags&4096){if(u===0)break e;p=0;do T=n[o+p++],r.head&&T&&r.length<65536&&(r.head.comment+=String.fromCharCode(T));while(T&&p<u);if(r.flags&512&&(r.check=Pr(r.check,n,p,o)),u-=p,o+=p,T)break e}else r.head&&(r.head.comment=null);r.mode=p_;case p_:if(r.flags&512){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Me;break}s=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Zr;break;case h_:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}e.adler=r.check=T_(s),s=0,c=0,r.mode=bs;case bs:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,qk;e.adler=r.check=1,r.mode=Zr;case Zr:if(t===kk||t===ms)break e;case Ip:if(r.last){s>>>=c&7,c-=c&7,r.mode=Fp;break}for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}switch(r.last=s&1,s>>>=1,c-=1,s&3){case 0:r.mode=m_;break;case 1:if(Uk(r),r.mode=vs,t===ms){s>>>=2,c-=2;break e}break;case 2:r.mode=g_;break;case 3:e.msg="invalid block type",r.mode=Me}s>>>=2,c-=2;break;case m_:for(s>>>=c&7,c-=c&7;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Me;break}if(r.length=s&65535,s=0,c=0,r.mode=jp,t===ms)break e;case jp:r.mode=v_;case v_:if(p=r.length,p){if(p>u&&(p=u),p>l&&(p=l),p===0)break e;Ft.arraySet(i,n,o,p,a),u-=p,o+=p,l-=p,a+=p,r.length-=p;break}r.mode=Zr;break;case g_:for(;c<14;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.nlen=(s&31)+257,s>>>=5,c-=5,r.ndist=(s&31)+1,s>>>=5,c-=5,r.ncode=(s&15)+4,s>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Me;break}r.have=0,r.mode=b_;case b_:for(;r.have<r.ncode;){for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.lens[N[r.have++]]=s&7,s>>>=3,c-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},R=ka(Mk,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid code lengths set",r.mode=Me;break}r.have=0,r.mode=__;case __:for(;r.have<r.nlen+r.ndist;){for(;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(y<16)s>>>=_,c-=_,r.lens[r.have++]=y;else{if(y===16){for(P=_+2;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=Me;break}T=r.lens[r.have-1],p=3+(s&3),s>>>=2,c-=2}else if(y===17){for(P=_+3;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,T=0,p=3+(s&7),s>>>=3,c-=3}else{for(P=_+7;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,T=0,p=11+(s&127),s>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Me;break}for(;p--;)r.lens[r.have++]=T}}if(r.mode===Me)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Me;break}if(r.lenbits=9,M={bits:r.lenbits},R=ka(R_,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid literal/lengths set",r.mode=Me;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},R=ka(M_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,R){e.msg="invalid distances set",r.mode=Me;break}if(r.mode=vs,t===ms)break e;case vs:r.mode=gs;case gs:if(u>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,Rk(e,f),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,r.mode===Zr&&(r.back=-1);break}for(r.back=0;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(w&&(w&240)===0){for(x=_,O=w,A=y;g=r.lencode[A+((s&(1<<x+O)-1)>>x)],_=g>>>24,w=g>>>16&255,y=g&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,r.length=y,w===0){r.mode=O_;break}if(w&32){r.back=-1,r.mode=Zr;break}if(w&64){e.msg="invalid literal/length code",r.mode=Me;break}r.extra=w&15,r.mode=y_;case y_:if(r.extra){for(P=r.extra;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=w_;case w_:for(;g=r.distcode[s&(1<<r.distbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((w&240)===0){for(x=_,O=w,A=y;g=r.distcode[A+((s&(1<<x+O)-1)>>x)],_=g>>>24,w=g>>>16&255,y=g&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,w&64){e.msg="invalid distance code",r.mode=Me;break}r.offset=y,r.extra=w&15,r.mode=x_;case x_:if(r.extra){for(P=r.extra;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.offset+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Me;break}r.mode=S_;case S_:if(l===0)break e;if(p=f-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Me;break}p>r.wnext?(p-=r.wnext,h=r.wsize-p):h=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=i,h=a-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do i[a++]=m[h++];while(--p);r.length===0&&(r.mode=gs);break;case O_:if(l===0)break e;i[a++]=r.length,l--,r.mode=gs;break;case Fp:if(r.wrap){for(;c<32;){if(u===0)break e;u--,s|=n[o++]<<c,c+=8}if(f-=l,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?Pr(r.check,i,f,a-f):Dp(r.check,i,f,a-f)),f=l,(r.flags?s:T_(s))!==r.check){e.msg="incorrect data check",r.mode=Me;break}s=0,c=0}r.mode=E_;case E_:if(r.wrap&&r.flags){for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Me;break}s=0,c=0}r.mode=A_;case A_:R=Ck;break e;case Me:R=k_;break e;case Bp:return zp;case jk:default:return Wt}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,(r.wsize||f!==e.avail_out&&r.mode<Me&&(r.mode<Fp||t!==i_))&&L_(e,e.output,e.next_out,f-e.avail_out)?(r.mode=Bp,zp):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,r.total+=f,r.wrap&&f&&(e.adler=r.check=r.flags?Pr(r.check,i,f,e.next_out-f):Dp(r.check,i,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Zr?128:0)+(r.mode===vs||r.mode===jp?256:0),(d===0&&f===0||t===i_)&&R===di&&(R=Ik),R)}function Hk(e){if(!e||!e.state)return Wt;var t=e.state;return t.window&&(t.window=null),e.state=null,di}function Vk(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Wt:(r.head=t,t.done=!1,di)}function Gk(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==bs)?Wt:n.mode===bs&&(i=1,i=Dp(i,t,r,0),i!==n.check)?k_:(o=L_(e,t,r,r),o?(n.mode=Bp,zp):(n.havedict=1,di))}ir.inflateReset=I_;ir.inflateReset2=j_;ir.inflateResetKeep=q_;ir.inflateInit=Bk;ir.inflateInit2=F_;ir.inflate=Wk;ir.inflateEnd=Hk;ir.inflateGetHeader=Vk;ir.inflateSetDictionary=Gk;ir.inflateInfo="pako inflate (from Nodeca project)"});var Up=b((LY,D_)=>{"use strict";D_.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var B_=b((NY,z_)=>{"use strict";function $k(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}z_.exports=$k});var W_=b(qa=>{"use strict";var no=N_(),Ca=$r(),_s=Tp(),Be=Up(),Wp=as(),Kk=Pp(),Yk=B_(),U_=Object.prototype.toString;function pi(e){if(!(this instanceof pi))return new pi(e);this.options=Ca.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Kk,this.strm.avail_out=0;var r=no.inflateInit2(this.strm,t.windowBits);if(r!==Be.Z_OK)throw new Error(Wp[r]);if(this.header=new Yk,no.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=_s.string2buf(t.dictionary):U_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=no.inflateSetDictionary(this.strm,t.dictionary),r!==Be.Z_OK)))throw new Error(Wp[r])}pi.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,u,l,s,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?Be.Z_FINISH:Be.Z_NO_FLUSH,typeof e=="string"?r.input=_s.binstring2buf(e):U_.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ca.Buf8(n),r.next_out=0,r.avail_out=n),o=no.inflate(r,Be.Z_NO_FLUSH),o===Be.Z_NEED_DICT&&i&&(o=no.inflateSetDictionary(this.strm,i)),o===Be.Z_BUF_ERROR&&c===!0&&(o=Be.Z_OK,c=!1),o!==Be.Z_STREAM_END&&o!==Be.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===Be.Z_STREAM_END||r.avail_in===0&&(a===Be.Z_FINISH||a===Be.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=_s.utf8border(r.output,r.next_out),l=r.next_out-u,s=_s.buf2string(r.output,u),r.next_out=l,r.avail_out=n-l,l&&Ca.arraySet(r.output,r.output,u,l,0),this.onData(s)):this.onData(Ca.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==Be.Z_STREAM_END);return o===Be.Z_STREAM_END&&(a=Be.Z_FINISH),a===Be.Z_FINISH?(o=no.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Be.Z_OK):(a===Be.Z_SYNC_FLUSH&&(this.onEnd(Be.Z_OK),r.avail_out=0),!0)};pi.prototype.onData=function(e){this.chunks.push(e)};pi.prototype.onEnd=function(e){e===Be.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ca.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Hp(e,t){var r=new pi(t);if(r.push(e,!0),r.err)throw r.msg||Wp[r.err];return r.result}function Zk(e,t){return t=t||{},t.raw=!0,Hp(e,t)}qa.Inflate=pi;qa.inflate=Hp;qa.inflateRaw=Zk;qa.ungzip=Hp});var G_=b((zY,V_)=>{"use strict";var Jk=$r().assign,Xk=Kb(),Qk=W_(),eC=Up(),H_={};Jk(H_,Xk,Qk,eC);V_.exports=H_});var Vp=b(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.sum=$_;ys.concatUint8Array=tC;function $_(e){let t=0;for(let r of e)t+=r.length;return t}function tC(e){let t=new Uint8Array($_(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var Gp=b(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.unzip=rC;xs.unzipChunkSlice=nC;var ws=G_(),K_=Vp();async function rC(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new ws.Inflate,{strm:t}=n,n.push(o,ws.Z_SYNC_FLUSH),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,K_.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function nC(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,u=[],l=[],s=[],c=0;do{let d=e.subarray(o-n.blockPosition),f=new ws.Inflate;if({strm:r}=f,f.push(d,ws.Z_SYNC_FLUSH),f.err)throw new Error(f.msg);let p=f.result;u.push(p);let h=p.length;l.push(o),s.push(a),u.length===1&&n.dataPosition&&(u[0]=u[0].subarray(n.dataPosition),h=u[0].length);let m=o;if(o+=r.next_in,a+=h,m>=i.blockPosition){u[c]=u[c].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),l.push(o),s.push(a);break}c++}while(r.avail_in);return{buffer:(0,K_.concatUint8Array)(u),cpositions:l,dpositions:s}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var Y_=b(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL=void 0;Rr.longFromBytesToUnsigned=iC;Rr.TWO_PWR_16_DBL=65536;Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL*Rr.TWO_PWR_16_DBL;function iC(e,t=0){let r=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24;return((e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24)>>>0)*Rr.TWO_PWR_32_DBL+(r>>>0)}});var J_=b(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});var oC=lp(),$p=Y_(),Ss=1;function Z_(e,t,r){let n=t[Ss],i=r?r[Ss]:1/0;return n<=e&&i>e?0:n<e?-1:1}var Kp=class{constructor({filehandle:t,path:r}){if(t)this.filehandle=t;else if(r)this.filehandle=new oC.LocalFile(r);else throw new TypeError("either filehandle or path must be defined")}_getIndex(){return this.index||(this.index=this._readIndex().catch(t=>{throw this.index=void 0,t})),this.index}async _readIndex(){let t=await this.filehandle.read(8,0),r=(0,$p.longFromBytesToUnsigned)(t);if(!r)return[[0,0]];let n=new Array(r+1);n[0]=[0,0];let i=8*2*r;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");let o=await this.filehandle.read(i,8);for(let a=0;a<r;a+=1){let u=(0,$p.longFromBytesToUnsigned)(o,a*16),l=(0,$p.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[u,l]}return n}async getLastBlock(){return(await this._getIndex()).at(-1)}async getRelevantBlocksForRead(t,r){let n=r+t;if(t===0)return[];let i=await this._getIndex(),o=[],a=0,u=i.length-1,l=Math.floor(i.length/2),s=Z_(r,i[l],i[l+1]);for(;s!==0;)s>0?u=l-1:s<0&&(a=l+1),l=Math.ceil((u-a)/2)+a,s=Z_(r,i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Ss]>=n));c+=1);return o[o.length-1][Ss]<n&&o.push([]),o}};Yp.default=Kp});var X_=b(Ia=>{"use strict";var aC=Ia&&Ia.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ia,"__esModule",{value:!0});var uC=lp(),sC=Gp(),cC=aC(J_()),lC=Vp(),Zp=class{constructor({filehandle:t,path:r,gziFilehandle:n,gziPath:i}){if(t)this.filehandle=t;else if(r)this.filehandle=new uC.LocalFile(r);else throw new TypeError("either filehandle or path must be defined");if(!n&&!i&&!r)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new cC.default({filehandle:n,path:!n&&!i&&r?i:`${r}.gzi`})}async _readAndUncompressBlock(t,r){let n=r;n||(n=(await this.filehandle.stat()).size);let i=n-t,o=await this.filehandle.read(i,t);return(0,sC.unzip)(o)}async read(t,r){let n=await this.gzi.getRelevantBlocksForRead(t,r),i=[];for(let o=0;o<n.length-1;o+=1){let a=await this._readAndUncompressBlock(n[o][0],n[o+1][0]),[,u]=n[o],l=u>=r?0:r-u,s=Math.min(r+t,u+a.length)-u;l>=0&&l<a.length&&i.push(a.subarray(l,s))}return(0,lC.concatUint8Array)(i)}};Ia.default=Zp});var Jp=b(or=>{"use strict";var fC=or&&or.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dC=or&&or.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&fC(t,e,r)},pC=or&&or.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(or,"__esModule",{value:!0});or.BgzfFilehandle=void 0;var hC=X_();Object.defineProperty(or,"BgzfFilehandle",{enumerable:!0,get:function(){return pC(hC).default}});dC(Gp(),or)});var Os=b(($Y,Q_)=>{Q_.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var Lt=b((KY,ey)=>{ey.exports=JBrowseExports["@jbrowse/core/util"]});var Es=b((YY,ty)=>{ty.exports=JBrowseExports["@jbrowse/core/util/io"]});var As=b((ZY,ry)=>{ry.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var _n=b((pZ,yy)=>{yy.exports=JBrowseExports["@jbrowse/core/configuration"]});var vt=b((bZ,Oy)=>{Oy.exports=JBrowseExports["mobx-state-tree"]});var Ye=b((TJ,Wy)=>{Wy.exports=JBrowseExports.react});var Ua=b((PJ,Hy)=>{Hy.exports=JBrowseExports["react/jsx-runtime"]});function Fs(){return typeof window<"u"}function kr(e){return Vy(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(Vy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vy(e){return Fs()?e instanceof Node||e instanceof rt(e).Node:!1}function ye(e){return Fs()?e instanceof Element||e instanceof rt(e).Element:!1}function qe(e){return Fs()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function js(e){return!Fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}function co(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Gy(e){return["table","td","th"].includes(kr(e))}function Wa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ls(e){let t=lo(),r=ye(e)?gt(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function $y(e){let t=ur(e);for(;qe(t)&&!cr(t);){if(Ls(t))return t;if(Wa(t))return null;t=ur(t)}return null}function lo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cr(e){return["html","body","#document"].includes(kr(e))}function gt(e){return rt(e).getComputedStyle(e)}function Ha(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ur(e){if(kr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||js(e)&&e.host||sr(e);return js(t)?t.host:t}function Ky(e){let t=ur(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&co(t)?t:Ky(t)}function Tt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ky(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=rt(i);if(o){let u=Ns(a);return t.concat(a,a.visualViewport||[],co(i)?i:[],u&&r?Tt(u):[])}return t.concat(i,Tt(i,[],r))}function Ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Va=pt(()=>{});function $t(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function Ne(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&js(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ds(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zs(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function ph(e){return e.mozInputSource===0&&e.isTrusted?!0:dh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Bs(e){return AC()?!1:!dh()&&e.width===0&&e.height===0||dh()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function hh(){return/apple/i.test(navigator.vendor)}function dh(){let e=/android/i;return e.test(Ds())||e.test(zs())}function Yy(){return Ds().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function AC(){return zs().includes("jsdom/")}function vi(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Zy(e){return"nativeEvent"in e}function Jy(e){return e.matches("html,body")}function Ze(e){return e?.ownerDocument||document}function Us(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function lr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ws(e){return qe(e)&&e.matches(TC)}function Je(e){e.preventDefault(),e.stopPropagation()}function mh(e){return e?e.getAttribute("role")==="combobox"&&Ws(e):!1}var TC,Xy=pt(()=>{Va();TC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"});function Hs(e,t,r){return De(e,bt(t,r))}function Pt(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function Vs(e){return e==="x"?"y":"x"}function Gs(e){return e==="y"?"height":"width"}function Cr(e){return["top","bottom"].includes(Rt(e))?"y":"x"}function $s(e){return Vs(Cr(e))}function bh(e,t,r){r===void 0&&(r=!1);let n=Kt(e),i=$s(e),o=Gs(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=$a(a)),[a,$a(a)]}function e0(e){let t=$a(e);return[Ga(e),t,Ga(t)]}function Ga(e){return e.replace(/start|end/g,t=>RC[t])}function MC(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}function t0(e,t,r,n){let i=Kt(e),o=MC(Rt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Ga)))),o}function $a(e){return e.replace(/left|right|bottom|top/g,t=>PC[t])}function kC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ks(e){return typeof e!="number"?kC(e):{top:e,right:e,bottom:e,left:e}}function Xr(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}var vh,Qy,gh,bt,De,gi,wn,fr,PC,RC,Ka=pt(()=>{vh=["top","right","bottom","left"],Qy=["start","end"],gh=vh.reduce((e,t)=>e.concat(t,t+"-"+Qy[0],t+"-"+Qy[1]),[]),bt=Math.min,De=Math.max,gi=Math.round,wn=Math.floor,fr=e=>({x:e,y:e}),PC={left:"right",right:"left",bottom:"top",top:"bottom"},RC={start:"end",end:"start"}});var CC,Ys,n0,fo,Zs,Js,qC,IC,jC,i0,o0,FC,LC,a0,NC,DC,zC,BC,UC,WC,HC,r0,VC,GC,$C,_h,KC,YC,Ya,u0,s0=pt(()=>{CC=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ys=CC.join(","),n0=typeof Element>"u",fo=n0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zs=!n0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Js=function e(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=i===""||i==="true",a=o||r&&t&&e(t.parentNode);return a},qC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},IC=function(t,r,n){if(Js(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ys));return r&&fo.call(t,Ys)&&i.unshift(t),i=i.filter(n),i},jC=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Js(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),l=u.length?u:a.children,s=e(l,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:a,candidates:s})}else{var c=fo.call(a,Ys);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!Js(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:a,candidates:p})}else o.unshift.apply(o,a.children)}}return i},i0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},o0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qC(t))&&!i0(t)?0:t.tabIndex},FC=function(t,r){var n=o0(t);return n<0&&r&&!i0(t)?0:n},LC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},a0=function(t){return t.tagName==="INPUT"},NC=function(t){return a0(t)&&t.type==="hidden"},DC=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},zC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},BC=function(t){if(!t.name)return!0;var r=t.form||Zs(t),n=function(u){return r.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=zC(i,t.form);return!o||o===t},UC=function(t){return a0(t)&&t.type==="radio"},WC=function(t){return UC(t)&&!BC(t)},HC=function(t){var r,n=t&&Zs(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,u,l;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var s,c,d;n=Zs(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},r0=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},VC=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=fo.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(fo.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var l=t.parentElement,s=Zs(t);if(l&&!l.shadowRoot&&i(l)===!0)return r0(t);t.assignedSlot?t=t.assignedSlot:!l&&s!==t.ownerDocument?t=s.host:t=l}t=u}if(HC(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return r0(t);return!1},GC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return fo.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},$C=function(t,r){return!(r.disabled||Js(r)||NC(r)||VC(r,t)||DC(r)||GC(r))},_h=function(t,r){return!(WC(r)||o0(r)<0||!$C(t,r))},KC=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},YC=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,l=FC(u,a),s=a?e(i.candidates):u;l===0?a?r.push.apply(r,s):r.push(u):n.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:s})}),n.sort(LC).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Ya=function(t,r){r=r||{};var n;return r.getShadowRoot?n=jC([t],r.includeContainer,{filter:_h.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:KC}):n=IC(t,r.includeContainer,_h.bind(null,r)),YC(n)},u0=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return fo.call(t,Ys)===!1?!1:_h(r,t)}});var Xs=b((IJ,c0)=>{c0.exports=JBrowseExports["react-dom"]});function l0(e,t,r){let{reference:n,floating:i}=e,o=Cr(t),a=$s(t),u=Gs(a),l=Rt(t),s=o==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[u]/2-i[u]/2,p;switch(l){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Kt(t)){case"start":p[a]-=f*(r&&s?-1:1);break;case"end":p[a]+=f*(r&&s?-1:1);break}return p}async function xn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Pt(t,e),h=Ks(p),g=u[f?d==="floating"?"reference":"floating":d],_=Xr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(g)))==null||r?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:l})),w=d==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),x=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},O=Xr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:y,strategy:l}):w);return{top:(_.top-O.top+h.top)/x.y,bottom:(O.bottom-_.bottom+h.bottom)/x.y,left:(_.left-O.left+h.left)/x.x,right:(O.right-_.right+h.right)/x.x}}function ZC(e,t,r){return(e?[...r.filter(i=>Kt(i)===e),...r.filter(i=>Kt(i)!==e)]:r.filter(i=>Rt(i)===i)).filter(i=>e?Kt(i)===e||(t?Ga(i)!==i:!1):!0)}function f0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function d0(e){return vh.some(t=>e[t]>=0)}function b0(e){let t=bt(...e.map(o=>o.left)),r=bt(...e.map(o=>o.top)),n=De(...e.map(o=>o.right)),i=De(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function JC(e){let t=e.slice().sort((i,o)=>i.y-o.y),r=[],n=null;for(let i=0;i<t.length;i++){let o=t[i];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Xr(b0(i)))}async function XC(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Rt(r),u=Kt(r),l=Cr(r)==="y",s=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=Pt(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return u&&typeof h=="number"&&(p=u==="end"?h*-1:h),l?{x:p*c,y:f*s}:{x:f*s,y:p*c}}var p0,h0,m0,v0,g0,_0,y0,w0,x0,S0,O0=pt(()=>{Ka();Ka();p0=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=l0(s,n,l),f=n,p={},h=0;for(let m=0;m<u.length;m++){let{name:g,fn:_}=u[m],{x:w,y,data:x,reset:O}=await _({x:c,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});c=w??c,d=y??d,p={...p,[g]:{...p[g],...x}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(f=O.placement),O.rects&&(s=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:d}=l0(s,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};h0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:l}=t,{element:s,padding:c=0}=Pt(e,t)||{};if(s==null)return{};let d=Ks(c),f={x:r,y:n},p=$s(i),h=Gs(p),m=await a.getDimensions(s),g=p==="y",_=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[p]-f[p]-o.floating[h],O=f[p]-o.reference[p],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),T=A?A[y]:0;(!T||!await(a.isElement==null?void 0:a.isElement(A)))&&(T=u.floating[y]||o.floating[h]);let R=x/2-O/2,k=T/2-m[h]/2-1,M=bt(d[_],k),P=bt(d[w],k),N=M,C=T-m[h]-P,I=T/2-m[h]/2+R,W=Hs(N,I,C),j=!l.arrow&&Kt(i)!=null&&I!==W&&o.reference[h]/2-(I<N?M:P)-m[h]/2<0,D=j?I<N?I-N:I-C:0;return{[p]:f[p]+D,data:{[p]:W,centerOffset:I-W-D,...j&&{alignmentOffset:D}},reset:j}}});m0=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:a,placement:u,platform:l,elements:s}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=gh,autoAlignment:p=!0,...h}=Pt(e,t),m=d!==void 0||f===gh?ZC(d||null,p,f):f,g=await xn(t,h),_=((r=a.autoPlacement)==null?void 0:r.index)||0,w=m[_];if(w==null)return{};let y=bh(w,o,await(l.isRTL==null?void 0:l.isRTL(s.floating)));if(u!==w)return{reset:{placement:m[0]}};let x=[g[Rt(w)],g[y[0]],g[y[1]]],O=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:x}],A=m[_+1];if(A)return{data:{index:_+1,overflows:O},reset:{placement:A}};let T=O.map(M=>{let P=Kt(M.placement);return[M.placement,P&&c?M.overflows.slice(0,2).reduce((N,C)=>N+C,0):M.overflows[0],M.overflows]}).sort((M,P)=>M[1]-P[1]),k=((i=T.filter(M=>M[2].slice(0,Kt(M[0])?2:3).every(P=>P<=0))[0])==null?void 0:i[0])||T[0][0];return k!==u?{data:{index:_+1,overflows:O},reset:{placement:k}}:{}}}},v0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Pt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let _=Rt(i),w=Cr(u),y=Rt(u)===u,x=await(l.isRTL==null?void 0:l.isRTL(s.floating)),O=f||(y||!m?[$a(u)]:e0(u)),A=h!=="none";!f&&A&&O.push(...t0(u,m,h,x));let T=[u,...O],R=await xn(t,g),k=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&k.push(R[_]),d){let I=bh(i,a,x);k.push(R[I[0]],R[I[1]])}if(M=[...M,{placement:i,overflows:k}],!k.every(I=>I<=0)){var P,N;let I=(((P=o.flip)==null?void 0:P.index)||0)+1,W=T[I];if(W)return{data:{index:I,overflows:M},reset:{placement:W}};let j=(N=M.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!j)switch(p){case"bestFit":{var C;let D=(C=M.filter(F=>{if(A){let z=Cr(F.placement);return z===w||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,q)=>z+q,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:C[0];D&&(j=D);break}case"initialPlacement":j=u;break}if(i!==j)return{reset:{placement:j}}}return{}}}};g0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Pt(e,t);switch(n){case"referenceHidden":{let o=await xn(t,{...i,elementContext:"reference"}),a=f0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:d0(a)}}}case"escaped":{let o=await xn(t,{...i,altBoundary:!0}),a=f0(o,r.floating);return{data:{escapedOffsets:a,escaped:d0(a)}}}default:return{}}}}};_0=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:i,platform:o,strategy:a}=t,{padding:u=2,x:l,y:s}=Pt(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),d=JC(c),f=Xr(b0(c)),p=Ks(u);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&s!=null)return d.find(g=>l>g.left-p.left&&l<g.right+p.right&&s>g.top-p.top&&s<g.bottom+p.bottom)||f;if(d.length>=2){if(Cr(r)==="y"){let M=d[0],P=d[d.length-1],N=Rt(r)==="top",C=M.top,I=P.bottom,W=N?M.left:P.left,j=N?M.right:P.right,D=j-W,F=I-C;return{top:C,bottom:I,left:W,right:j,width:D,height:F,x:W,y:C}}let g=Rt(r)==="left",_=De(...d.map(M=>M.right)),w=bt(...d.map(M=>M.left)),y=d.filter(M=>g?M.left===w:M.right===_),x=y[0].top,O=y[y.length-1].bottom,A=w,T=_,R=T-A,k=O-x;return{top:x,bottom:O,left:A,right:T,width:R,height:k,x:A,y:x}}return f}let m=await o.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:a});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};y0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:u}=t,l=await XC(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},w0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:g=>{let{x:_,y:w}=g;return{x:_,y:w}}},...l}=Pt(e,t),s={x:r,y:n},c=await xn(t,l),d=Cr(Rt(i)),f=Vs(d),p=s[f],h=s[d];if(o){let g=f==="y"?"top":"left",_=f==="y"?"bottom":"right",w=p+c[g],y=p-c[_];p=Hs(w,p,y)}if(a){let g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=h+c[g],y=h-c[_];h=Hs(w,h,y)}let m=u.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:o,[d]:a}}}}}},x0=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=Pt(e,t),c={x:r,y:n},d=Cr(i),f=Vs(d),p=c[f],h=c[d],m=Pt(u,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",x=o.reference[f]-o.floating[y]+g.mainAxis,O=o.reference[f]+o.reference[y]-g.mainAxis;p<x?p=x:p>O&&(p=O)}if(s){var _,w;let y=f==="y"?"width":"height",x=["top","left"].includes(Rt(i)),O=o.reference[d]-o.floating[y]+(x&&((_=a.offset)==null?void 0:_[d])||0)+(x?0:g.crossAxis),A=o.reference[d]+o.reference[y]+(x?0:((w=a.offset)==null?void 0:w[d])||0)-(x?g.crossAxis:0);h<O?h=O:h>A&&(h=A)}return{[f]:p,[d]:h}}}},S0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:i,rects:o,platform:a,elements:u}=t,{apply:l=()=>{},...s}=Pt(e,t),c=await xn(t,s),d=Rt(i),f=Kt(i),p=Cr(i)==="y",{width:h,height:m}=o.floating,g,_;d==="top"||d==="bottom"?(g=d,_=f===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(_=d,g=f==="end"?"top":"bottom");let w=m-c.top-c.bottom,y=h-c.left-c.right,x=bt(m-c[g],w),O=bt(h-c[_],y),A=!t.middlewareData.shift,T=x,R=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),A&&!f){let M=De(c.left,0),P=De(c.right,0),N=De(c.top,0),C=De(c.bottom,0);p?R=h-2*(M!==0||P!==0?M+P:De(c.left,c.right)):T=m-2*(N!==0||C!==0?N+C:De(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:T});let k=await a.getDimensions(u.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}}});function T0(e){let t=gt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=qe(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=gi(r)!==o||gi(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function wh(e){return ye(e)?e:e.contextElement}function po(e){let t=wh(e);if(!qe(t))return fr(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=T0(t),a=(o?gi(r.width):r.width)/n,u=(o?gi(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function P0(e){let t=rt(e);return!lo()||!t.visualViewport?QC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eq(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rt(e)?!1:t}function bi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=wh(e),a=fr(1);t&&(n?ye(n)&&(a=po(n)):a=po(e));let u=eq(o,r,n)?P0(o):fr(0),l=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){let f=rt(o),p=n&&ye(n)?rt(n):n,h=f,m=Ns(h);for(;m&&n&&p!==h;){let g=po(m),_=m.getBoundingClientRect(),w=gt(m),y=_.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,x=_.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,s*=g.y,c*=g.x,d*=g.y,l+=y,s+=x,h=rt(m),m=Ns(h)}}return Xr({width:c,height:d,x:l,y:s})}function xh(e,t){let r=Ha(e).scrollLeft;return t?t.left+r:bi(sr(e)).left+r}function R0(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:xh(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function tq(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=sr(n),u=t?Wa(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},s=fr(1),c=fr(0),d=qe(n);if((d||!d&&!o)&&((kr(n)!=="body"||co(a))&&(l=Ha(n)),qe(n))){let p=bi(n);s=po(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}let f=a&&!d&&!o?R0(a,l,!0):fr(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-l.scrollLeft*s.x+c.x+f.x,y:r.y*s.y-l.scrollTop*s.y+c.y+f.y}}function rq(e){return Array.from(e.getClientRects())}function nq(e){let t=sr(e),r=Ha(e),n=e.ownerDocument.body,i=De(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=De(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+xh(e),u=-r.scrollTop;return gt(n).direction==="rtl"&&(a+=De(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function iq(e,t){let r=rt(e),n=sr(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;let s=lo();(!s||s&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u,y:l}}function oq(e,t){let r=bi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=qe(e)?po(e):fr(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,l=i*o.x,s=n*o.y;return{width:a,height:u,x:l,y:s}}function E0(e,t,r){let n;if(t==="viewport")n=iq(e,r);else if(t==="document")n=nq(sr(e));else if(ye(t))n=oq(t,r);else{let i=P0(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Xr(n)}function M0(e,t){let r=ur(e);return r===t||!ye(r)||cr(r)?!1:gt(r).position==="fixed"||M0(r,t)}function aq(e,t){let r=t.get(e);if(r)return r;let n=Tt(e,[],!1).filter(u=>ye(u)&&kr(u)!=="body"),i=null,o=gt(e).position==="fixed",a=o?ur(e):e;for(;ye(a)&&!cr(a);){let u=gt(a),l=Ls(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||co(a)&&!l&&M0(e,a))?n=n.filter(c=>c!==a):i=u,a=ur(a)}return t.set(e,n),n}function uq(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?Wa(t)?[]:aq(t,this._c):[].concat(r),n],u=a[0],l=a.reduce((s,c)=>{let d=E0(t,c,i);return s.top=De(d.top,s.top),s.right=bt(d.right,s.right),s.bottom=bt(d.bottom,s.bottom),s.left=De(d.left,s.left),s},E0(t,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sq(e){let{width:t,height:r}=T0(e);return{width:t,height:r}}function cq(e,t,r){let n=qe(t),i=sr(t),o=r==="fixed",a=bi(e,!0,o,t),u={scrollLeft:0,scrollTop:0},l=fr(0);if(n||!n&&!o)if((kr(t)!=="body"||co(i))&&(u=Ha(t)),n){let f=bi(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=xh(i));let s=i&&!n&&!o?R0(i,u):fr(0),c=a.left+u.scrollLeft-l.x-s.x,d=a.top+u.scrollTop-l.y-s.y;return{x:c,y:d,width:a.width,height:a.height}}function yh(e){return gt(e).position==="static"}function A0(e,t){if(!qe(e)||gt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sr(e)===r&&(r=r.ownerDocument.body),r}function k0(e,t){let r=rt(e);if(Wa(e))return r;if(!qe(e)){let i=ur(e);for(;i&&!cr(i);){if(ye(i)&&!yh(i))return i;i=ur(i)}return r}let n=A0(e,t);for(;n&&Gy(n)&&yh(n);)n=A0(n,t);return n&&cr(n)&&yh(n)&&!Ls(n)?r:n||$y(e)||r}function fq(e){return gt(e).direction==="rtl"}function C0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dq(e,t){let r=null,n,i=sr(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),o();let s=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=s;if(u||t(),!f||!p)return;let h=wn(d),m=wn(i.clientWidth-(c+f)),g=wn(i.clientHeight-(d+p)),_=wn(c),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-_+"px",threshold:De(0,bt(1,l))||1},x=!0;function O(A){let T=A[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):n=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!C0(s,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(O,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(O,y)}r.observe(e)}return a(!0),o}function Sh(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,s=wh(e),c=i||o?[...s?Tt(s):[],...Tt(t)]:[];c.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});let d=s&&u?dq(s,r):null,f=-1,p=null;a&&(p=new ResizeObserver(_=>{let[w]=_;w&&w.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),r()}),s&&!l&&p.observe(s),p.observe(t));let h,m=l?bi(e):null;l&&g();function g(){let _=bi(e);m&&!C0(m,_)&&r(),m=_,h=requestAnimationFrame(g)}return r(),()=>{var _;c.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d?.(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var QC,lq,Qs,_i,q0,I0,j0,F0,L0,N0,Oh,D0,z0,Za,Eh=pt(()=>{O0();Ka();Va();Va();QC=fr(0);lq=async function(e){let t=this.getOffsetParent||k0,r=this.getDimensions,n=await r(e.floating);return{reference:cq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};Qs={convertOffsetParentRelativeRectToViewportRelativeRect:tq,getDocumentElement:sr,getClippingRect:uq,getOffsetParent:k0,getElementRects:lq,getClientRects:rq,getDimensions:sq,getScale:po,isElement:ye,isRTL:fq};_i=xn,q0=y0,I0=m0,j0=w0,F0=v0,L0=S0,N0=g0,Oh=h0,D0=_0,z0=x0,Za=(e,t,r)=>{let n=new Map,i={platform:Qs,...r},o={...i.platform,_c:n};return p0(e,t,{...i,platform:o})}});function tc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!tc(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!tc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function W0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function B0(e,t){let r=W0(e);return Math.round(t*r)/r}function Ah(e){let t=He.useRef(e);return ec(()=>{t.current=e}),t}function H0(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:l,open:s}=e,[c,d]=He.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=He.useState(n);tc(f,n)||p(n);let[h,m]=He.useState(null),[g,_]=He.useState(null),w=He.useCallback(F=>{F!==A.current&&(A.current=F,m(F))},[]),y=He.useCallback(F=>{F!==T.current&&(T.current=F,_(F))},[]),x=o||h,O=a||g,A=He.useRef(null),T=He.useRef(null),R=He.useRef(c),k=l!=null,M=Ah(l),P=Ah(i),N=Ah(s),C=He.useCallback(()=>{if(!A.current||!T.current)return;let F={placement:t,strategy:r,middleware:f};P.current&&(F.platform=P.current),Za(A.current,T.current,F).then(z=>{let q={...z,isPositioned:N.current!==!1};I.current&&!tc(R.current,q)&&(R.current=q,U0.flushSync(()=>{d(q)}))})},[f,t,r,P,N]);ec(()=>{s===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[s]);let I=He.useRef(!1);ec(()=>(I.current=!0,()=>{I.current=!1}),[]),ec(()=>{if(x&&(A.current=x),O&&(T.current=O),x&&O){if(M.current)return M.current(x,O,C);C()}},[x,O,C,M,k]);let W=He.useMemo(()=>({reference:A,floating:T,setReference:w,setFloating:y}),[w,y]),j=He.useMemo(()=>({reference:x,floating:O}),[x,O]),D=He.useMemo(()=>{let F={position:r,left:0,top:0};if(!j.floating)return F;let z=B0(j.floating,c.x),q=B0(j.floating,c.y);return u?{...F,transform:"translate("+z+"px, "+q+"px)",...W0(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:q}},[r,u,j.floating,c.x,c.y]);return He.useMemo(()=>({...c,update:C,refs:W,elements:j,floatingStyles:D}),[c,C,W,j,D])}var He,rc,U0,ec,pq,nc,V0,G0,$0,K0,Y0,Z0,J0,X0,Th=pt(()=>{Eh();Eh();He=V(Ye(),1),rc=V(Ye(),1),U0=V(Xs(),1),ec=typeof document<"u"?rc.useLayoutEffect:rc.useEffect;pq=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Oh({element:n.current,padding:i}).fn(r):{}:n?Oh({element:n,padding:i}).fn(r):{}}}},nc=(e,t)=>({...q0(e),options:[e,t]}),V0=(e,t)=>({...j0(e),options:[e,t]}),G0=(e,t)=>({...z0(e),options:[e,t]}),$0=(e,t)=>({...F0(e),options:[e,t]}),K0=(e,t)=>({...L0(e),options:[e,t]}),Y0=(e,t)=>({...I0(e),options:[e,t]}),Z0=(e,t)=>({...N0(e),options:[e,t]}),J0=(e,t)=>({...D0(e),options:[e,t]}),X0=(e,t)=>({...pq(e),options:[e,t]})});var Kw={};np(Kw,{Composite:()=>gq,CompositeItem:()=>bq,FloatingArrow:()=>xq,FloatingDelayGroup:()=>Tq,FloatingFocusManager:()=>Nq,FloatingList:()=>Pw,FloatingNode:()=>Oq,FloatingOverlay:()=>zq,FloatingPortal:()=>jq,FloatingTree:()=>Eq,arrow:()=>X0,autoPlacement:()=>Y0,autoUpdate:()=>Sh,computePosition:()=>Za,detectOverflow:()=>_i,flip:()=>$0,getOverflowAncestors:()=>Tt,hide:()=>Z0,inline:()=>J0,inner:()=>nI,limitShift:()=>G0,offset:()=>nc,platform:()=>Qs,safePolygon:()=>aI,shift:()=>V0,size:()=>K0,useClick:()=>Bq,useClientPoint:()=>Wq,useDelayGroup:()=>Pq,useDelayGroupContext:()=>Nw,useDismiss:()=>Gq,useFloating:()=>$q,useFloatingNodeId:()=>Sq,useFloatingParentNodeId:()=>Ei,useFloatingPortalNode:()=>Hw,useFloatingRootContext:()=>Gw,useFloatingTree:()=>Ai,useFocus:()=>Kq,useHover:()=>Aq,useId:()=>yo,useInnerOffset:()=>iI,useInteractions:()=>Yq,useListItem:()=>Rw,useListNavigation:()=>Jq,useMergeRefs:()=>lc,useRole:()=>Qq,useTransitionStatus:()=>$w,useTransitionStyles:()=>tI,useTypeahead:()=>rI});function lc(e){return E.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}function Ie(e){let t=E.useRef(()=>{});return mq(()=>{t.current=e}),E.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function ic(e,t,r){return Math.floor(e/t)!==r}function vo(e,t){return t<0||t>=e.current.length}function sc(e,t){return nt(e,{disabledIndices:t})}function Ih(e,t){return nt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nt(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t,a=e.current,u=r;do u+=n?-o:o;while(u>=0&&u<=a.length-1&&xi(a,u,i));return u}function Sw(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:u,minIndex:l,maxIndex:s,prevIndex:c,stopEvent:d=!1}=t,f=c;if(r.key===bo){if(d&&Je(r),c===-1)f=s;else if(f=nt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:u}),i&&(c-a<l||f<0)){let p=c%a,h=s%a,m=s-(h-p);h===p?f=s:f=h>p?m:m-a}vo(e,f)&&(f=c)}if(r.key===Qr&&(d&&Je(r),c===-1?f=l:(f=nt(e,{startingIndex:c,amount:a,disabledIndices:u}),i&&c+a>s&&(f=nt(e,{startingIndex:c%a-a,amount:a,disabledIndices:u}))),vo(e,f)&&(f=c)),n==="both"){let p=wn(c/a);r.key===(o?dr:pr)&&(d&&Je(r),c%a!==a-1?(f=nt(e,{startingIndex:c,disabledIndices:u}),i&&ic(f,a,p)&&(f=nt(e,{startingIndex:c-c%a-1,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:c-c%a-1,disabledIndices:u})),ic(f,a,p)&&(f=c)),r.key===(o?pr:dr)&&(d&&Je(r),c%a!==0?(f=nt(e,{startingIndex:c,decrement:!0,disabledIndices:u}),i&&ic(f,a,p)&&(f=nt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u})),ic(f,a,p)&&(f=c));let h=wn(s/a)===p;vo(e,f)&&(i&&h?f=r.key===(o?pr:dr)?s:nt(e,{startingIndex:c-c%a-1,disabledIndices:u}):f=c)}return f}function Ow(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:u,height:l}=o;u>t;let s=!1;for(r&&(i=0);!s;){let c=[];for(let d=0;d<u;d++)for(let f=0;f<l;f++)c.push(i+d+f*t);i%t+u<=t&&c.every(d=>n[d]==null)?(c.forEach(d=>{n[d]=a}),s=!0):i++}}),[...n]}function Ew(e,t,r,n,i){if(e===-1)return-1;let o=r.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*n:o;case"br":return r.lastIndexOf(e)}}function Aw(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function xi(e,t,r){if(r)return r.includes(t);let n=e[t];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function vq(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Pw(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=E.useState(()=>new Set),a=E.useCallback(s=>{o(c=>new Set(c).add(s))},[]),u=E.useCallback(s=>{o(c=>{let d=new Set(c);return d.delete(s),d})},[]),l=E.useMemo(()=>{let s=new Map;return Array.from(i.keys()).sort(vq).forEach((d,f)=>{s.set(d,f)}),s},[i]);return(0,Ee.jsx)(Tw.Provider,{value:E.useMemo(()=>({register:a,unregister:u,map:l,elementsRef:r,labelsRef:n}),[a,u,l,r,n]),children:t})}function Rw(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=E.useContext(Tw),[u,l]=E.useState(null),s=E.useRef(null),c=E.useCallback(d=>{if(s.current=d,u!==null&&(o.current[u]=d,a)){var f;let p=t!==void 0;a.current[u]=p?t:(f=d?.textContent)!=null?f:null}},[u,o,a,t]);return pe(()=>{let d=s.current;if(d)return r(d),()=>{n(d)}},[r,n]),pe(()=>{let d=s.current?i.get(s.current):null;d!=null&&l(d)},[i]),E.useMemo(()=>({ref:c,index:u??-1}),[u,c])}function Mw(e,t){return typeof e=="function"?e(t):e?E.cloneElement(e,t):(0,Ee.jsx)("div",{...t})}function yq(){let[e,t]=E.useState(()=>Q0?ew():void 0);return pe(()=>{e==null&&t(ew())},[]),E.useEffect(()=>{Q0=!0},[]),e}function Iw(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(i=>i(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(i=>i!==r))||[])}}}function Sq(e){let t=yo(),r=Ai(),n=Ei(),i=e||n;return pe(()=>{if(!t)return;let o={id:t,parentId:i};return r?.addNode(o),()=>{r?.removeNode(o)}},[r,t,i]),t}function Oq(e){let{children:t,id:r}=e,n=Ei();return(0,Ee.jsx)(jw.Provider,{value:E.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function Eq(e){let{children:t}=e,r=E.useRef([]),n=E.useCallback(a=>{r.current=[...r.current,a]},[]),i=E.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),o=E.useState(()=>Iw())[0];return(0,Ee.jsx)(Fw.Provider,{value:E.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function Oi(e){return"data-floating-ui-"+e}function it(e){let t=(0,_o.useRef)(e);return pe(()=>{t.current=e}),t}function cc(e,t,r){return r&&!vi(r)?0:typeof e=="number"?e:e?.[t]}function Aq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:u=!0,delay:l=0,handleClose:s=null,mouseOnly:c=!1,restMs:d=0,move:f=!0}=t,p=Ai(),h=Ei(),m=it(s),g=it(l),_=it(r),w=E.useRef(),y=E.useRef(-1),x=E.useRef(),O=E.useRef(-1),A=E.useRef(!0),T=E.useRef(!1),R=E.useRef(()=>{}),k=E.useRef(!1),M=E.useCallback(()=>{var D;let F=(D=i.current.openEvent)==null?void 0:D.type;return F?.includes("mouse")&&F!=="mousedown"},[i]);E.useEffect(()=>{if(!u)return;function D(F){let{open:z}=F;z||(clearTimeout(y.current),clearTimeout(O.current),A.current=!0,k.current=!1)}return o.on("openchange",D),()=>{o.off("openchange",D)}},[u,o]),E.useEffect(()=>{if(!u||!m.current||!r)return;function D(z){M()&&n(!1,z,"hover")}let F=Ze(a.floating).documentElement;return F.addEventListener("mouseleave",D),()=>{F.removeEventListener("mouseleave",D)}},[a.floating,r,n,u,m,M]);let P=E.useCallback(function(D,F,z){F===void 0&&(F=!0),z===void 0&&(z="hover");let q=cc(g.current,"close",w.current);q&&!x.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>n(!1,D,z),q)):F&&(clearTimeout(y.current),n(!1,D,z))},[g,n]),N=Ie(()=>{R.current(),x.current=void 0}),C=Ie(()=>{if(T.current){let D=Ze(a.floating).body;D.style.pointerEvents="",D.removeAttribute(tw),T.current=!1}}),I=Ie(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);E.useEffect(()=>{if(!u)return;function D(B){if(clearTimeout(y.current),A.current=!1,c&&!vi(w.current)||d>0&&!cc(g.current,"open"))return;let $=cc(g.current,"open",w.current);$?y.current=window.setTimeout(()=>{_.current||n(!0,B,"hover")},$):r||n(!0,B,"hover")}function F(B){if(I())return;R.current();let $=Ze(a.floating);if(clearTimeout(O.current),k.current=!1,m.current&&i.current.floatingContext){r||clearTimeout(y.current),x.current=m.current({...i.current.floatingContext,tree:p,x:B.clientX,y:B.clientY,onClose(){C(),N(),I()||P(B,!0,"safe-polygon")}});let ge=x.current;$.addEventListener("mousemove",ge),R.current=()=>{$.removeEventListener("mousemove",ge)};return}(w.current==="touch"?!Ne(a.floating,B.relatedTarget):!0)&&P(B)}function z(B){I()||i.current.floatingContext&&(m.current==null||m.current({...i.current.floatingContext,tree:p,x:B.clientX,y:B.clientY,onClose(){C(),N(),I()||P(B)}})(B))}if(ye(a.domReference)){var q;let B=a.domReference;return r&&B.addEventListener("mouseleave",z),(q=a.floating)==null||q.addEventListener("mouseleave",z),f&&B.addEventListener("mousemove",D,{once:!0}),B.addEventListener("mouseenter",D),B.addEventListener("mouseleave",F),()=>{var $;r&&B.removeEventListener("mouseleave",z),($=a.floating)==null||$.removeEventListener("mouseleave",z),f&&B.removeEventListener("mousemove",D),B.removeEventListener("mouseenter",D),B.removeEventListener("mouseleave",F)}}},[a,u,e,c,d,f,P,N,C,n,r,_,p,g,m,i,I]),pe(()=>{var D;if(u&&r&&(D=m.current)!=null&&D.__options.blockPointerEvents&&M()){T.current=!0;let z=a.floating;if(ye(a.domReference)&&z){var F;let q=Ze(a.floating).body;q.setAttribute(tw,"");let B=a.domReference,$=p==null||(F=p.nodesRef.current.find(Q=>Q.id===h))==null||(F=F.context)==null?void 0:F.elements.floating;return $&&($.style.pointerEvents=""),q.style.pointerEvents="none",B.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",B.style.pointerEvents="",z.style.pointerEvents=""}}}},[u,r,h,a,p,m,M]),pe(()=>{r||(w.current=void 0,k.current=!1,N(),C())},[r,N,C]),E.useEffect(()=>()=>{N(),clearTimeout(y.current),clearTimeout(O.current),C()},[u,a.domReference,N,C]);let W=E.useMemo(()=>{function D(F){w.current=F.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(F){let{nativeEvent:z}=F;function q(){!A.current&&!_.current&&n(!0,z,"hover")}c&&!vi(w.current)||r||d===0||k.current&&F.movementX**2+F.movementY**2<2||(clearTimeout(O.current),w.current==="touch"?q():(k.current=!0,O.current=window.setTimeout(q,d)))}}},[c,n,r,_,d]),j=E.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(D){I()||P(D.nativeEvent,!1)}}),[P,I]);return E.useMemo(()=>u?{reference:W,floating:j}:{},[u,W,j])}function Tq(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=E.useReducer((l,s)=>({...l,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=E.useRef(null),u=E.useCallback(l=>{o({currentId:l})},[]);return pe(()=>{i.currentId?a.current===null?a.current=i.currentId:i.isInstantPhase||o({isInstantPhase:!0}):(i.isInstantPhase&&o({isInstantPhase:!1}),a.current=null)},[i.currentId,i.isInstantPhase]),(0,Ee.jsx)(Lw.Provider,{value:E.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function Pq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,l=Nw(),{currentId:s,setCurrentId:c,initialDelay:d,setState:f,timeoutMs:p}=l;return pe(()=>{a&&s&&(f({delay:{open:1,close:cc(d,"close")}}),s!==u&&n(!1))},[a,u,n,f,s,d]),pe(()=>{function h(){n(!1),f({delay:d,currentId:null})}if(a&&s&&!r&&s===u){if(p){let m=window.setTimeout(h,p);return()=>{clearTimeout(m)}}h()}},[a,r,f,s,u,n,d,p]),pe(()=>{a&&(c===jh||!r||c(u))},[a,r,c,u]),l}function yi(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(rw);let o=()=>e?.focus({preventScroll:r});i?o():rw=requestAnimationFrame(o)}function nw(e,t){var r;let n=[],i=(r=e.find(o=>o.id===t))==null?void 0:r.parentId;for(;i;){let o=e.find(a=>a.id===i);i=o?.parentId,o&&(n=n.concat(o))}return n}function Si(e,t){let r=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),n=r;for(;n.length;)n=e.filter(i=>{var o;return(o=n)==null?void 0:o.some(a=>{var u;return i.parentId===a.id&&((u=i.context)==null?void 0:u.open)})}),r=r.concat(n);return r}function Rq(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),Si(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function Cq(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=kq(t,e),u=new Set,l=new Set(a),s=[];ac[i]||(ac[i]=new WeakMap);let c=ac[i];a.forEach(d),f(t),u.clear();function d(p){!p||u.has(p)||(u.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(kr(h)!=="script")if(u.has(h))f(h);else{let m=o?h.getAttribute(o):null,g=m!==null&&m!=="false",_=ho.get(h)||0,w=o?_+1:_,y=(c.get(h)||0)+1;ho.set(h,w),c.set(h,y),s.push(h),w===1&&g&&oc.add(h),y===1&&h.setAttribute(i,""),!g&&o&&h.setAttribute(o,"true")}})}return Rh++,()=>{s.forEach(p=>{let h=ho.get(p)||0,m=o?h-1:h,g=(c.get(p)||0)-1;ho.set(p,m),c.set(p,g),m||(!oc.has(p)&&o&&p.removeAttribute(o),oc.delete(p)),g||p.removeAttribute(i)}),Rh--,Rh||(ho=new WeakMap,ho=new WeakMap,oc=new WeakSet,ac={})}}function iw(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=Ze(e[0]).body;return Cq(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}function zw(e,t){let r=Ya(e,dc());t==="prev"&&r.reverse();let n=r.indexOf($t(Ze(e)));return r.slice(n+1)[0]}function Bw(){return zw(document.body,"next")}function Uw(){return zw(document.body,"prev")}function Ja(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ne(r,n)}function qq(e){Ya(e,dc()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function ow(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{let n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}function aw(e){e.key==="Tab"&&(e.target,clearTimeout(Iq))}function Hw(e){e===void 0&&(e={});let{id:t,root:r}=e,n=yo(),i=Vw(),[o,a]=E.useState(null),u=E.useRef(null);return pe(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),pe(()=>{if(!n||u.current)return;let l=t?document.getElementById(t):null;if(!l)return;let s=document.createElement("div");s.id=n,s.setAttribute(uw,""),l.appendChild(s),u.current=s,a(s)},[t,n]),pe(()=>{if(r===null||!n||u.current)return;let l=r||i?.portalNode;l&&!ye(l)&&(l=l.current),l=l||document.body;let s=null;t&&(s=document.createElement("div"),s.id=t,l.appendChild(s));let c=document.createElement("div");c.id=n,c.setAttribute(uw,""),l=s||l,l.appendChild(c),u.current=c,a(c)},[t,r,n,i]),o}function jq(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=Hw({id:r,root:n}),[a,u]=E.useState(null),l=E.useRef(null),s=E.useRef(null),c=E.useRef(null),d=E.useRef(null),f=a?.modal,p=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return E.useEffect(()=>{if(!o||!i||f)return;function m(g){o&&Ja(g)&&(g.type==="focusin"?ow:qq)(o)}return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)}},[o,i,f]),E.useEffect(()=>{o&&(p||ow(o))},[p,o]),(0,Ee.jsxs)(Ww.Provider,{value:E.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,Ee.jsx)(fc,{"data-type":"outside",ref:l,onFocus:m=>{if(Ja(m,o)){var g;(g=c.current)==null||g.focus()}else{let _=Uw()||a?.domReference;_?.focus()}}}),h&&o&&(0,Ee.jsx)("span",{"aria-owns":o.id,style:pc}),o&&go.createPortal(t,o),h&&o&&(0,Ee.jsx)(fc,{"data-type":"outside",ref:s,onFocus:m=>{if(Ja(m,o)){var g;(g=d.current)==null||g.focus()}else{let _=Bw()||a?.domReference;_?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}function Lh(e){return e?e.hasAttribute(Fh)?e:e.querySelector("["+Fh+"]")||e:null}function Mh(e){wi=wi.filter(t=>t.isConnected),e&&kr(e)!=="body"&&(wi.push(e),wi.length>sw&&(wi=wi.slice(-sw)))}function cw(){return wi.slice().reverse().find(e=>e.isConnected)}function Fq(e){let t=dc();return u0(e,t)?e:Ya(e,t)[0]||e}function Nq(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:u=!0,restoreFocus:l=!1,modal:s=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1}=e,{open:p,onOpenChange:h,events:m,dataRef:g,elements:{domReference:_,floating:w}}=t,y=Ie(()=>{var K;return(K=g.current.floatingContext)==null?void 0:K.nodeId}),x=typeof a=="number"&&a<0,O=mh(_)&&x,A=Mq(),T=A?o:!0,R=!T||A&&f,k=it(i),M=it(a),P=it(u),N=Ai(),C=Vw(),I=E.useRef(null),W=E.useRef(null),j=E.useRef(!1),D=E.useRef(!1),F=E.useRef(-1),z=C!=null,q=Lh(w),B=Ie(function(K){return K===void 0&&(K=q),K?Ya(K,dc()):[]}),$=Ie(K=>{let ne=B(K);return k.current.map(ee=>_&&ee==="reference"?_:q&&ee==="floating"?q:ne).filter(Boolean).flat()});E.useEffect(()=>{if(n||!s)return;function K(ee){if(ee.key==="Tab"){Ne(q,$t(Ze(q)))&&B().length===0&&!O&&Je(ee);let te=$(),_e=lr(ee);k.current[0]==="reference"&&_e===_&&(Je(ee),ee.shiftKey?yi(te[te.length-1]):yi(te[1])),k.current[1]==="floating"&&_e===q&&ee.shiftKey&&(Je(ee),yi(te[0]))}}let ne=Ze(q);return ne.addEventListener("keydown",K),()=>{ne.removeEventListener("keydown",K)}},[n,_,q,s,k,O,B,$]),E.useEffect(()=>{if(n||!w)return;function K(ne){let ee=lr(ne),_e=B().indexOf(ee);_e!==-1&&(F.current=_e)}return w.addEventListener("focusin",K),()=>{w.removeEventListener("focusin",K)}},[n,w,B]),E.useEffect(()=>{if(n||!d)return;function K(){D.current=!0,setTimeout(()=>{D.current=!1})}function ne(ee){let te=ee.relatedTarget;queueMicrotask(()=>{let _e=y(),xe=!(Ne(_,te)||Ne(w,te)||Ne(te,w)||Ne(C?.portalNode,te)||te!=null&&te.hasAttribute(Oi("focus-guard"))||N&&(Si(N.nodesRef.current,_e).find(be=>{var We,Pe;return Ne((We=be.context)==null?void 0:We.elements.floating,te)||Ne((Pe=be.context)==null?void 0:Pe.elements.domReference,te)})||nw(N.nodesRef.current,_e).find(be=>{var We,Pe,ft;return[(We=be.context)==null?void 0:We.elements.floating,Lh((Pe=be.context)==null?void 0:Pe.elements.floating)].includes(te)||((ft=be.context)==null?void 0:ft.elements.domReference)===te})));if(l&&xe&&$t(Ze(q))===Ze(q).body){qe(q)&&q.focus();let be=F.current,We=B(),Pe=We[be]||We[We.length-1]||q;qe(Pe)&&Pe.focus()}(O||!s)&&te&&xe&&!D.current&&te!==cw()&&(j.current=!0,h(!1,ee,"focus-out"))})}if(w&&qe(_))return _.addEventListener("focusout",ne),_.addEventListener("pointerdown",K),w.addEventListener("focusout",ne),()=>{_.removeEventListener("focusout",ne),_.removeEventListener("pointerdown",K),w.removeEventListener("focusout",ne)}},[n,_,w,q,s,N,C,h,d,l,B,O,y]);let Q=E.useRef(null),ge=E.useRef(null),le=lc([Q,C?.beforeInsideRef]),Te=lc([ge,C?.afterInsideRef]);E.useEffect(()=>{var K;if(n||!w)return;let ne=Array.from((C==null||(K=C.portalNode)==null?void 0:K.querySelectorAll("["+Oi("portal")+"]"))||[]),ee=N&&!s?nw(N?.nodesRef.current,y()).map(xe=>{var be;return(be=xe.context)==null?void 0:be.elements.floating}):[],te=[w,...ne,...ee,I.current,W.current,Q.current,ge.current,C?.beforeOutsideRef.current,C?.afterOutsideRef.current,k.current.includes("reference")||O?_:null].filter(xe=>xe!=null),_e=s||O?iw(te,!R,R):iw(te);return()=>{_e()}},[n,_,w,s,k,C,O,T,R,N,y]),pe(()=>{if(n||!qe(q))return;let K=Ze(q),ne=$t(K);queueMicrotask(()=>{let ee=$(q),te=M.current,_e=(typeof te=="number"?ee[te]:te.current)||q,xe=Ne(q,ne);!x&&!xe&&p&&yi(_e,{preventScroll:_e===q})})},[n,p,q,x,$,M]),pe(()=>{if(n||!q)return;let K=!1,ne=Ze(q),ee=$t(ne),_e=g.current.openEvent;Mh(ee);function xe(Pe){let{open:ft,reason:re,event:fe,nested:J}=Pe;ft&&(_e=fe),re==="escape-key"&&_&&Mh(_),["hover","safe-polygon"].includes(re)&&fe.type==="mouseleave"&&(j.current=!0),re==="outside-press"&&(J?(j.current=!1,K=!0):j.current=!(ph(fe)||Bs(fe)))}m.on("openchange",xe);let be=ne.createElement("span");be.setAttribute("tabindex","-1"),be.setAttribute("aria-hidden","true"),Object.assign(be.style,pc),z&&_&&_.insertAdjacentElement("afterend",be);function We(){return typeof P.current=="boolean"?cw()||be:P.current.current||be}return()=>{m.off("openchange",xe);let Pe=$t(ne),ft=Ne(w,Pe)||N&&Si(N.nodesRef.current,y()).some(J=>{var ie;return Ne((ie=J.context)==null?void 0:ie.elements.floating,Pe)});(ft||_e&&["click","mousedown"].includes(_e.type))&&_&&Mh(_);let fe=We();queueMicrotask(()=>{let J=Fq(fe);P.current&&!j.current&&qe(J)&&(!(J!==Pe&&Pe!==ne.body)||ft)&&J.focus({preventScroll:K}),be.remove()})}},[n,w,q,P,g,m,N,z,_,y]),E.useEffect(()=>{queueMicrotask(()=>{j.current=!1})},[n]),pe(()=>{if(!n&&C)return C.setFocusManagerState({modal:s,closeOnFocusOut:d,open:p,onOpenChange:h,domReference:_}),()=>{C.setFocusManagerState(null)}},[n,C,s,p,h,d,_]),pe(()=>{if(n||!q||typeof MutationObserver!="function"||x)return;let K=()=>{let ee=q.getAttribute("tabindex"),te=B(),_e=$t(Ze(w)),xe=te.indexOf(_e);xe!==-1&&(F.current=xe),k.current.includes("floating")||_e!==_&&te.length===0?ee!=="0"&&q.setAttribute("tabindex","0"):ee!=="-1"&&q.setAttribute("tabindex","-1")};K();let ne=new MutationObserver(K);return ne.observe(q,{childList:!0,subtree:!0,attributes:!0}),()=>{ne.disconnect()}},[n,w,q,_,k,B,x]);function Ae(K){return n||!c||!s?null:(0,Ee.jsx)(Lq,{ref:K==="start"?I:W,onClick:ne=>h(!1,ne.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let ae=!n&&T&&(s?!O:!0)&&(z||s);return(0,Ee.jsxs)(Ee.Fragment,{children:[ae&&(0,Ee.jsx)(fc,{"data-type":"inside",ref:le,onFocus:K=>{if(s){let ee=$();yi(i[0]==="reference"?ee[0]:ee[ee.length-1])}else if(C!=null&&C.preserveTabOrder&&C.portalNode)if(j.current=!1,Ja(K,C.portalNode)){let ee=Bw()||_;ee?.focus()}else{var ne;(ne=C.beforeOutsideRef.current)==null||ne.focus()}}}),!O&&Ae("start"),r,Ae("end"),ae&&(0,Ee.jsx)(fc,{"data-type":"inside",ref:Te,onFocus:K=>{if(s)yi($()[0]);else if(C!=null&&C.preserveTabOrder&&C.portalNode)if(d&&(j.current=!0),Ja(K,C.portalNode)){let ee=Uw()||_;ee?.focus()}else{var ne;(ne=C.afterOutsideRef.current)==null||ne.focus()}}})]})}function Dq(){let e=/iP(hone|ad|od)|iOS/.test(Ds()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,a=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",i&&(t[n]=i+"px"),e){var u,l;let s=((u=window.visualViewport)==null?void 0:u.offsetLeft)||0,c=((l=window.visualViewport)==null?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(c))+"px",left:-(o-Math.floor(s))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,a))}}function fw(e){return qe(e.target)&&e.target.tagName==="BUTTON"}function dw(e){return Ws(e)}function Bq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:u="click",toggle:l=!0,ignoreMouse:s=!1,keyboardHandlers:c=!0,stickIfOpen:d=!0}=t,f=E.useRef(),p=E.useRef(!1),h=E.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){let g=f.current;m.button===0&&u!=="click"&&(vi(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="mousedown")?n(!1,m.nativeEvent,"click"):(m.preventDefault(),n(!0,m.nativeEvent,"click"))))},onClick(m){let g=f.current;if(u==="mousedown"&&f.current){f.current=void 0;return}vi(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="click")?n(!1,m.nativeEvent,"click"):n(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!c||fw(m))&&(m.key===" "&&!dw(o)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&n(!(r&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!c||fw(m)||dw(o)||m.key===" "&&p.current&&(p.current=!1,n(!(r&&l),m.nativeEvent,"click"))}}),[i,o,u,s,c,n,r,d,l]);return E.useMemo(()=>a?{reference:h}:{},[a,h])}function Uq(e,t){let r=null,n=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var o;let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((o=t.dataRef.current.openEvent)==null?void 0:o.type)||"")&&t.pointerType!=="touch",c=a.width,d=a.height,f=a.x,p=a.y;return r==null&&t.x&&u&&(r=a.x-t.x),n==null&&t.y&&l&&(n=a.y-t.y),f-=r||0,p-=n||0,c=0,d=0,!i||s?(c=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=u&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):i&&!s&&(d=t.axis==="x"?a.height:d,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:d,x:f,y:p,top:p,right:f+c,bottom:p+d,left:f}}}}function pw(e){return e!=null&&e.clientX!=null}function Wq(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:u=!0,axis:l="both",x:s=null,y:c=null}=t,d=E.useRef(!1),f=E.useRef(null),[p,h]=E.useState(),[m,g]=E.useState([]),_=Ie((A,T)=>{d.current||n.current.openEvent&&!pw(n.current.openEvent)||a.setPositionReference(Uq(o,{x:A,y:T,axis:l,dataRef:n,pointerType:p}))}),w=Ie(A=>{s!=null||c!=null||(r?f.current||g([]):_(A.clientX,A.clientY))}),y=vi(p)?i:r,x=E.useCallback(()=>{if(!y||!u||s!=null||c!=null)return;let A=rt(i);function T(R){let k=lr(R);Ne(i,k)?(A.removeEventListener("mousemove",T),f.current=null):_(R.clientX,R.clientY)}if(!n.current.openEvent||pw(n.current.openEvent)){A.addEventListener("mousemove",T);let R=()=>{A.removeEventListener("mousemove",T),f.current=null};return f.current=R,R}a.setPositionReference(o)},[y,u,s,c,i,n,a,o,_]);E.useEffect(()=>x(),[x,m]),E.useEffect(()=>{u&&!i&&(d.current=!1)},[u,i]),E.useEffect(()=>{!u&&r&&(d.current=!0)},[u,r]),pe(()=>{u&&(s!=null||c!=null)&&(d.current=!1,_(s,c))},[u,s,c,_]);let O=E.useMemo(()=>{function A(T){let{pointerType:R}=T;h(R)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:w,onMouseEnter:w}},[w]);return E.useMemo(()=>u?{reference:O}:{},[u,O])}function Gq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:u=!0,outsidePress:l=!0,outsidePressEvent:s="pointerdown",referencePress:c=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,m=Ai(),g=Ie(typeof l=="function"?l:()=>!1),_=typeof l=="function"?g:l,w=E.useRef(!1),y=E.useRef(!1),{escapeKey:x,outsidePress:O}=hw(p),{escapeKey:A,outsidePress:T}=hw(h),R=E.useRef(!1),k=Ie(W=>{var j;if(!r||!a||!u||W.key!=="Escape"||R.current)return;let D=(j=o.current.floatingContext)==null?void 0:j.nodeId,F=m?Si(m.nodesRef.current,D):[];if(!x&&(W.stopPropagation(),F.length>0)){let z=!0;if(F.forEach(q=>{var B;if((B=q.context)!=null&&B.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}n(!1,Zy(W)?W.nativeEvent:W,"escape-key")}),M=Ie(W=>{var j;let D=()=>{var F;k(W),(F=lr(W))==null||F.removeEventListener("keydown",D)};(j=lr(W))==null||j.addEventListener("keydown",D)}),P=Ie(W=>{var j;let D=w.current;w.current=!1;let F=y.current;if(y.current=!1,s==="click"&&F||D||typeof _=="function"&&!_(W))return;let z=lr(W),q="["+Oi("inert")+"]",B=Ze(i.floating).querySelectorAll(q),$=ye(z)?z:null;for(;$&&!cr($);){let Te=ur($);if(cr(Te)||!ye(Te))break;$=Te}if(B.length&&ye(z)&&!Jy(z)&&!Ne(z,i.floating)&&Array.from(B).every(Te=>!Ne($,Te)))return;if(qe(z)&&I){let Te=cr(z),Ae=gt(z),ae=/auto|scroll/,K=Te||ae.test(Ae.overflowX),ne=Te||ae.test(Ae.overflowY),ee=K&&z.clientWidth>0&&z.scrollWidth>z.clientWidth,te=ne&&z.clientHeight>0&&z.scrollHeight>z.clientHeight,_e=Ae.direction==="rtl",xe=te&&(_e?W.offsetX<=z.offsetWidth-z.clientWidth:W.offsetX>z.clientWidth),be=ee&&W.offsetY>z.clientHeight;if(xe||be)return}let Q=(j=o.current.floatingContext)==null?void 0:j.nodeId,ge=m&&Si(m.nodesRef.current,Q).some(Te=>{var Ae;return Us(W,(Ae=Te.context)==null?void 0:Ae.elements.floating)});if(Us(W,i.floating)||Us(W,i.domReference)||ge)return;let le=m?Si(m.nodesRef.current,Q):[];if(le.length>0){let Te=!0;if(le.forEach(Ae=>{var ae;if((ae=Ae.context)!=null&&ae.open&&!Ae.context.dataRef.current.__outsidePressBubbles){Te=!1;return}}),!Te)return}n(!1,W,"outside-press")}),N=Ie(W=>{var j;let D=()=>{var F;P(W),(F=lr(W))==null||F.removeEventListener(s,D)};(j=lr(W))==null||j.addEventListener(s,D)});E.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=x,o.current.__outsidePressBubbles=O;let W=-1;function j(B){n(!1,B,"ancestor-scroll")}function D(){window.clearTimeout(W),R.current=!0}function F(){W=window.setTimeout(()=>{R.current=!1},lo()?5:0)}let z=Ze(i.floating);u&&(z.addEventListener("keydown",A?M:k,A),z.addEventListener("compositionstart",D),z.addEventListener("compositionend",F)),_&&z.addEventListener(s,T?N:P,T);let q=[];return f&&(ye(i.domReference)&&(q=Tt(i.domReference)),ye(i.floating)&&(q=q.concat(Tt(i.floating))),!ye(i.reference)&&i.reference&&i.reference.contextElement&&(q=q.concat(Tt(i.reference.contextElement)))),q=q.filter(B=>{var $;return B!==(($=z.defaultView)==null?void 0:$.visualViewport)}),q.forEach(B=>{B.addEventListener("scroll",j,{passive:!0})}),()=>{u&&(z.removeEventListener("keydown",A?M:k,A),z.removeEventListener("compositionstart",D),z.removeEventListener("compositionend",F)),_&&z.removeEventListener(s,T?N:P,T),q.forEach(B=>{B.removeEventListener("scroll",j)}),window.clearTimeout(W)}},[o,i,u,_,s,r,n,f,a,x,O,k,A,M,P,T,N]),E.useEffect(()=>{w.current=!1},[_,s]);let C=E.useMemo(()=>({onKeyDown:k,...c&&{[Hq[d]]:W=>{n(!1,W.nativeEvent,"reference-press")},...d!=="click"&&{onClick(W){n(!1,W.nativeEvent,"reference-press")}}}}),[k,n,c,d]),I=E.useMemo(()=>({onKeyDown:k,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Vq[s]]:()=>{w.current=!0}}),[k,s]);return E.useMemo(()=>a?{reference:C,floating:I}:{},[a,C,I])}function Gw(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=yo(),o=E.useRef({}),[a]=E.useState(()=>Iw()),u=Ei()!=null,[l,s]=E.useState(n.reference),c=Ie((p,h,m)=>{o.current.openEvent=p?h:void 0,a.emit("openchange",{open:p,event:h,reason:m,nested:u}),r?.(p,h,m)}),d=E.useMemo(()=>({setPositionReference:s}),[]),f=E.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return E.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:f,events:a,floatingId:i,refs:d}),[t,c,f,a,i,d])}function $q(e){e===void 0&&(e={});let{nodeId:t}=e,r=Gw({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=E.useState(null),[u,l]=E.useState(null),c=i?.domReference||o,d=E.useRef(null),f=Ai();pe(()=>{c&&(d.current=c)},[c]);let p=H0({...e,elements:{...i,...u&&{reference:u}}}),h=E.useCallback(y=>{let x=ye(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(x),p.refs.setReference(x)},[p.refs]),m=E.useCallback(y=>{(ye(y)||y===null)&&(d.current=y,a(y)),(ye(p.refs.reference.current)||p.refs.reference.current===null||y!==null&&!ye(y))&&p.refs.setReference(y)},[p.refs]),g=E.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),_=E.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),w=E.useMemo(()=>({...p,...n,refs:g,elements:_,nodeId:t}),[p,g,_,t,n]);return pe(()=>{n.dataRef.current.floatingContext=w;let y=f?.nodesRef.current.find(x=>x.id===t);y&&(y.context=w)}),E.useMemo(()=>({...p,context:w,refs:g,elements:_}),[p,g,_,w])}function Kq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:u=!0,visibleOnly:l=!0}=t,s=E.useRef(!1),c=E.useRef(),d=E.useRef(!0);E.useEffect(()=>{if(!u)return;let p=rt(a.domReference);function h(){!r&&qe(a.domReference)&&a.domReference===$t(Ze(a.domReference))&&(s.current=!0)}function m(){d.current=!0}return p.addEventListener("blur",h),p.addEventListener("keydown",m,!0),()=>{p.removeEventListener("blur",h),p.removeEventListener("keydown",m,!0)}},[a.domReference,r,u]),E.useEffect(()=>{if(!u)return;function p(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(s.current=!0)}return i.on("openchange",p),()=>{i.off("openchange",p)}},[i,u]),E.useEffect(()=>()=>{clearTimeout(c.current)},[]);let f=E.useMemo(()=>({onPointerDown(p){Bs(p.nativeEvent)||(d.current=!1)},onMouseLeave(){s.current=!1},onFocus(p){if(s.current)return;let h=lr(p.nativeEvent);if(l&&ye(h))try{if(hh()&&Yy())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Ws(h))return}n(!0,p.nativeEvent,"focus")},onBlur(p){s.current=!1;let h=p.relatedTarget,m=p.nativeEvent,g=ye(h)&&h.hasAttribute(Oi("focus-guard"))&&h.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var _;let w=$t(a.domReference?a.domReference.ownerDocument:document);!h&&w===a.domReference||Ne((_=o.current.floatingContext)==null?void 0:_.refs.floating.current,w)||Ne(a.domReference,w)||g||n(!1,m,"focus")})}}),[o,a.domReference,n,l]);return E.useMemo(()=>u?{reference:f}:{},[u,f])}function kh(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[mw]:a,[vw]:u,...l}=e;o=l}return{...r==="floating"&&{tabIndex:-1,[Fh]:""},...o,...t.map(a=>{let u=a?a[r]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((a,u)=>(u&&Object.entries(u).forEach(l=>{let[s,c]=l;if(!(i&&[mw,vw].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var d;(d=n.get(s))==null||d.push(c),a[s]=function(){for(var f,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(f=n.get(s))==null?void 0:f.map(g=>g(...h)).find(g=>g!==void 0)}}}else a[s]=c}),a),{})}}function Yq(e){e===void 0&&(e=[]);let t=e.map(u=>u?.reference),r=e.map(u=>u?.floating),n=e.map(u=>u?.item),i=E.useCallback(u=>kh(u,e,"reference"),t),o=E.useCallback(u=>kh(u,e,"floating"),r),a=E.useCallback(u=>kh(u,e,"item"),n);return E.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function hc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Ch(e,t){return hc(t,e===bo||e===Qr,e===dr||e===pr)}function qh(e,t,r){return hc(t,e===Qr,r?e===dr:e===pr)||e==="Enter"||e===" "||e===""}function gw(e,t,r){return hc(t,r?e===dr:e===pr,e===Qr)}function bw(e,t,r,n){let i=r?e===pr:e===dr,o=e===bo;return t==="both"||t==="horizontal"&&n&&n>1?e===Zq:hc(t,i,o)}function Jq(e,t){let{open:r,onOpenChange:n,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:u=()=>{},enabled:l=!0,selectedIndex:s=null,allowEscape:c=!1,loop:d=!1,nested:f=!1,rtl:p=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:_=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:x=1,scrollItemIntoView:O=!0,virtualItemRef:A,itemSizes:T,dense:R=!1}=t,k=Lh(i.floating),M=it(k),P=Ei(),N=Ai();pe(()=>{e.dataRef.current.orientation=y},[e,y]);let C=Ie(()=>{u(j.current===-1?null:j.current)}),I=mh(i.domReference),W=E.useRef(m),j=E.useRef(s??-1),D=E.useRef(null),F=E.useRef(!0),z=E.useRef(C),q=E.useRef(!!i.floating),B=E.useRef(r),$=E.useRef(!1),Q=E.useRef(!1),ge=it(w),le=it(r),Te=it(O),Ae=it(s),[ae,K]=E.useState(),[ne,ee]=E.useState(),te=Ie(()=>{function re(ie){h?(K(ie.id),N?.events.emit("virtualfocus",ie),A&&(A.current=ie)):yi(ie,{sync:$.current,preventScroll:!0})}let fe=o.current[j.current];fe&&re(fe),($.current?ie=>ie():requestAnimationFrame)(()=>{let ie=o.current[j.current]||fe;if(!ie)return;fe||re(ie);let $e=Te.current;$e&&xe&&(Q.current||!F.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof $e=="boolean"?{block:"nearest",inline:"nearest"}:$e))})});pe(()=>{l&&(r&&i.floating?W.current&&s!=null&&(Q.current=!0,j.current=s,C()):q.current&&(j.current=-1,z.current()))},[l,r,i.floating,s,C]),pe(()=>{if(l&&r&&i.floating)if(a==null){if($.current=!1,Ae.current!=null)return;if(q.current&&(j.current=-1,te()),(!B.current||!q.current)&&W.current&&(D.current!=null||W.current===!0&&D.current==null)){let re=0,fe=()=>{o.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(fe),re++):(j.current=D.current==null||qh(D.current,y,p)||f?sc(o,ge.current):Ih(o,ge.current),D.current=null,C())};fe()}}else vo(o,a)||(j.current=a,te(),Q.current=!1)},[l,r,i.floating,a,Ae,f,o,y,p,C,te,ge]),pe(()=>{var re;if(!l||i.floating||!N||h||!q.current)return;let fe=N.nodesRef.current,J=(re=fe.find(ze=>ze.id===P))==null||(re=re.context)==null?void 0:re.elements.floating,ie=$t(Ze(i.floating)),$e=fe.some(ze=>ze.context&&Ne(ze.context.elements.floating,ie));J&&!$e&&F.current&&J.focus({preventScroll:!0})},[l,i.floating,N,P,h]),pe(()=>{if(!l||!N||!h||P)return;function re(fe){ee(fe.id),A&&(A.current=fe)}return N.events.on("virtualfocus",re),()=>{N.events.off("virtualfocus",re)}},[l,N,h,P,A]),pe(()=>{z.current=C,B.current=r,q.current=!!i.floating}),pe(()=>{r||(D.current=null)},[r]);let _e=a!=null,xe=E.useMemo(()=>{function re(J){if(!r)return;let ie=o.current.indexOf(J);ie!==-1&&j.current!==ie&&(j.current=ie,C())}return{onFocus(J){let{currentTarget:ie}=J;$.current=!0,re(ie)},onClick:J=>{let{currentTarget:ie}=J;return ie.focus({preventScroll:!0})},...g&&{onMouseMove(J){let{currentTarget:ie}=J;$.current=!0,Q.current=!1,re(ie)},onPointerLeave(J){let{pointerType:ie}=J;if(!(!F.current||ie==="touch")&&($.current=!0,j.current=-1,C(),!h)){var $e;($e=M.current)==null||$e.focus({preventScroll:!0})}}}}},[r,M,g,o,C,h]),be=Ie(re=>{if(F.current=!1,$.current=!0,re.which===229||!le.current&&re.currentTarget===M.current)return;if(f&&bw(re.key,y,p,x)){Je(re),n(!1,re.nativeEvent,"list-navigation"),qe(i.domReference)&&(h?N?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let fe=j.current,J=sc(o,w),ie=Ih(o,w);if(I||(re.key==="Home"&&(Je(re),j.current=J,C()),re.key==="End"&&(Je(re),j.current=ie,C())),x>1){let $e=T||Array.from({length:o.current.length},()=>({width:1,height:1})),ze=Ow($e,x,R),wr=ze.findIndex(St=>St!=null&&!xi(o.current,St,w)),tr=ze.reduce((St,rr,Hr)=>rr!=null&&!xi(o.current,rr,w)?Hr:St,-1),ln=ze[Sw({current:ze.map(St=>St!=null?o.current[St]:null)},{event:re,orientation:y,loop:d,rtl:p,cols:x,disabledIndices:Aw([...w||o.current.map((St,rr)=>xi(o.current,rr)?rr:void 0),void 0],ze),minIndex:wr,maxIndex:tr,prevIndex:Ew(j.current>ie?J:j.current,$e,ze,x,re.key===Qr?"bl":re.key===(p?dr:pr)?"tr":"tl"),stopEvent:!0})];if(ln!=null&&(j.current=ln,C()),y==="both")return}if(Ch(re.key,y)){if(Je(re),r&&!h&&$t(re.currentTarget.ownerDocument)===re.currentTarget){j.current=qh(re.key,y,p)?J:ie,C();return}qh(re.key,y,p)?d?j.current=fe>=ie?c&&fe!==o.current.length?-1:J:nt(o,{startingIndex:fe,disabledIndices:w}):j.current=Math.min(ie,nt(o,{startingIndex:fe,disabledIndices:w})):d?j.current=fe<=J?c&&fe!==-1?o.current.length:ie:nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w}):j.current=Math.max(J,nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w})),vo(o,j.current)&&(j.current=-1),C()}}),We=E.useMemo(()=>h&&r&&_e&&{"aria-activedescendant":ne||ae},[h,r,_e,ne,ae]),Pe=E.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...I?{}:We,onKeyDown:be,onPointerMove(){F.current=!0}}),[We,be,y,I]),ft=E.useMemo(()=>{function re(J){m==="auto"&&ph(J.nativeEvent)&&(W.current=!0)}function fe(J){W.current=m,m==="auto"&&Bs(J.nativeEvent)&&(W.current=!0)}return{...We,onKeyDown(J){var ie;F.current=!1;let $e=J.key.startsWith("Arrow"),ze=["Home","End"].includes(J.key),wr=$e||ze,tr=N==null||(ie=N.nodesRef.current.find(jt=>jt.id===P))==null||(ie=ie.context)==null||(ie=ie.dataRef)==null?void 0:ie.current.orientation,ln=gw(J.key,y,p),St=bw(J.key,y,p,x),rr=gw(J.key,tr,p),Hr=Ch(J.key,y),ts=(f?rr:Hr)||J.key==="Enter"||J.key.trim()==="";if(h&&r){let jt=N?.nodesRef.current.find(fn=>fn.parentId==null),zt=N&&jt?Rq(N.nodesRef.current,jt.id):null;if(wr&&zt&&A){let fn=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ln||St){var ri,ni;let ep=((ri=zt.context)==null?void 0:ri.elements.domReference)===J.currentTarget,ii=St&&!ep?(ni=zt.context)==null?void 0:ni.elements.domReference:ln?o.current.find(oi=>oi?.id===ae):null;ii&&(Je(J),ii.dispatchEvent(fn),ee(void 0))}if((Hr||ze)&&zt.context&&zt.context.open&&zt.parentId&&J.currentTarget!==zt.context.elements.domReference){var Dt;Je(J),(Dt=zt.context.elements.domReference)==null||Dt.dispatchEvent(fn);return}}return be(J)}if(!(!r&&!_&&$e)){if(ts){let jt=Ch(J.key,tr);D.current=f&&jt?null:J.key}if(f){rr&&(Je(J),r?(j.current=sc(o,ge.current),C()):n(!0,J.nativeEvent,"list-navigation"));return}Hr&&(s!=null&&(j.current=s),Je(J),!r&&_?n(!0,J.nativeEvent,"list-navigation"):be(J),r&&C())}},onFocus(){r&&!h&&(j.current=-1,C())},onPointerDown:fe,onPointerEnter:fe,onMouseDown:re,onClick:re}},[ae,We,x,be,ge,m,o,f,C,n,r,_,y,P,p,s,N,h,A]);return E.useMemo(()=>l?{reference:ft,floating:Pe,item:xe}:{},[l,ft,Pe,xe])}function Qq(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,u=(r=Xq.get(a))!=null?r:a,l=yo(),c=Ei()!=null,d=E.useMemo(()=>u==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?i:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":u==="alertdialog"?"dialog":u,"aria-controls":n?i:void 0,...u==="listbox"&&{role:"combobox"},...u==="menu"&&{id:l},...u==="menu"&&c&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[u,i,c,n,l,a]),f=E.useMemo(()=>{let h={id:i,...u&&{role:u}};return u==="tooltip"||a==="label"?h:{...h,...u==="menu"&&{"aria-labelledby":l}}},[u,i,l,a]),p=E.useCallback(h=>{let{active:m,selected:g}=h,_={role:"option",...m&&{id:i+"-option"}};switch(a){case"select":return{..._,"aria-selected":m&&g};case"combobox":return{..._,...m&&{"aria-selected":!0}}}return{}},[i,a]);return E.useMemo(()=>o?{reference:d,floating:f,item:p}:{},[o,d,f,p])}function mo(e,t){return typeof e=="function"?e(t):e}function eI(e,t){let[r,n]=E.useState(e);return e&&!r&&n(!0),E.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function $w(e,t){t===void 0&&(t={});let{open:r,elements:{floating:n}}=e,{duration:i=250}=t,a=(typeof i=="number"?i:i.close)||0,[u,l]=E.useState("unmounted"),s=eI(r,a);return!s&&u==="close"&&l("unmounted"),pe(()=>{if(n){if(r){l("initial");let c=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(c)}}l("close")}},[r,n]),{isMounted:s,status:u}}function tI(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,u=e.placement,l=u.split("-")[0],s=E.useMemo(()=>({side:l,placement:u}),[l,u]),c=typeof a=="number",d=(c?a:a.open)||0,f=(c?a:a.close)||0,[p,h]=E.useState(()=>({...mo(o,s),...mo(r,s)})),{isMounted:m,status:g}=$w(e,{duration:a}),_=it(r),w=it(n),y=it(i),x=it(o);return pe(()=>{let O=mo(_.current,s),A=mo(y.current,s),T=mo(x.current,s),R=mo(w.current,s)||Object.keys(O).reduce((k,M)=>(k[M]="",k),{});if(g==="initial"&&h(k=>({transitionProperty:k.transitionProperty,...T,...O})),g==="open"&&h({transitionProperty:Object.keys(R).map(_w).join(","),transitionDuration:d+"ms",...T,...R}),g==="close"){let k=A||O;h({transitionProperty:Object.keys(k).map(_w).join(","),transitionDuration:f+"ms",...T,...k})}},[f,y,_,w,x,d,g,s]),{isMounted:m,styles:p}}function rI(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:u,onTypingChange:l,enabled:s=!0,findMatch:c=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=E.useRef(),m=E.useRef(""),g=E.useRef((r=p??a)!=null?r:-1),_=E.useRef(null),w=Ie(u),y=Ie(l),x=it(c),O=it(f);pe(()=>{n&&(clearTimeout(h.current),_.current=null,m.current="")},[n]),pe(()=>{if(n&&m.current===""){var M;g.current=(M=p??a)!=null?M:-1}},[n,p,a]);let A=Ie(M=>{M?i.current.typing||(i.current.typing=M,y(M)):i.current.typing&&(i.current.typing=M,y(M))}),T=Ie(M=>{function P(j,D,F){let z=x.current?x.current(D,F):D.find(q=>q?.toLocaleLowerCase().indexOf(F.toLocaleLowerCase())===0);return z?j.indexOf(z):-1}let N=o.current;if(m.current.length>0&&m.current[0]!==" "&&(P(N,N,m.current)===-1?A(!1):M.key===" "&&Je(M)),N==null||O.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;n&&M.key!==" "&&(Je(M),A(!0)),N.every(j=>{var D,F;return j?((D=j[0])==null?void 0:D.toLocaleLowerCase())!==((F=j[1])==null?void 0:F.toLocaleLowerCase()):!0})&&m.current===M.key&&(m.current="",g.current=_.current),m.current+=M.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",g.current=_.current,A(!1)},d);let I=g.current,W=P(N,[...N.slice((I||0)+1),...N.slice(0,(I||0)+1)],m.current);W!==-1?(w(W),_.current=W):M.key!==" "&&(m.current="",A(!1))}),R=E.useMemo(()=>({onKeyDown:T}),[T]),k=E.useMemo(()=>({onKeyDown:T,onKeyUp(M){M.key===" "&&A(!1)}}),[T,A]);return E.useMemo(()=>s?{reference:R,floating:k}:{},[s,R,k])}function yw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function iI(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,l=Ie(u),s=E.useRef(!1),c=E.useRef(null),d=E.useRef(null);E.useEffect(()=>{if(!i)return;function p(m){if(m.ctrlKey||!h||o.current==null)return;let g=m.deltaY,_=o.current.top>=-.5,w=o.current.bottom>=-.5,y=h.scrollHeight-h.clientHeight,x=g<0?-1:1,O=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&g>0||!w&&g<0?(m.preventDefault(),go.flushSync(()=>{l(A=>A+Math[O](g,y*x))})):/firefox/i.test(zs())&&(h.scrollTop+=g))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{c.current=null,d.current=null,h.removeEventListener("wheel",p)}},[i,r,n.floating,o,a,l]);let f=E.useMemo(()=>({onKeyDown(){s.current=!0},onWheel(){s.current=!1},onPointerMove(){s.current=!1},onScroll(){let p=a?.current||n.floating;if(!(!o.current||!p||!s.current)){if(c.current!==null){let h=p.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&go.flushSync(()=>l(m=>m+h))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[n.floating,l,o,a]);return E.useMemo(()=>i?{floating:f}:{},[i,f])}function ww(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,u=o-1;a<o;u=a++){let[l,s]=t[a]||[0,0],[c,d]=t[u]||[0,0];s>=n!=d>=n&&r<=(c-l)*(n-s)/(d-s)+l&&(i=!i)}return i}function oI(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function aI(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i,o=!1,a=null,u=null,l=performance.now();function s(d,f){let p=performance.now(),h=p-l;if(a===null||u===null||h===0)return a=d,u=f,l=p,null;let m=d-a,g=f-u,w=Math.sqrt(m*m+g*g)/h;return a=d,u=f,l=p,w}let c=d=>{let{x:f,y:p,placement:h,elements:m,onClose:g,nodeId:_,tree:w}=d;return function(x){function O(){clearTimeout(i),g()}if(clearTimeout(i),!m.domReference||!m.floating||h==null||f==null||p==null)return;let{clientX:A,clientY:T}=x,R=[A,T],k=lr(x),M=x.type==="mouseleave",P=Ne(m.floating,k),N=Ne(m.domReference,k),C=m.domReference.getBoundingClientRect(),I=m.floating.getBoundingClientRect(),W=h.split("-")[0],j=f>I.right-I.width/2,D=p>I.bottom-I.height/2,F=oI(R,C),z=I.width>C.width,q=I.height>C.height,B=(z?C:I).left,$=(z?C:I).right,Q=(q?C:I).top,ge=(q?C:I).bottom;if(P&&(o=!0,!M))return;if(N&&(o=!1),N&&!M){o=!0;return}if(M&&ye(x.relatedTarget)&&Ne(m.floating,x.relatedTarget)||w&&Si(w.nodesRef.current,_).some(Ae=>{let{context:ae}=Ae;return ae?.open}))return;if(W==="top"&&p>=C.bottom-1||W==="bottom"&&p<=C.top+1||W==="left"&&f>=C.right-1||W==="right"&&f<=C.left+1)return O();let le=[];switch(W){case"top":le=[[B,C.top+1],[B,I.bottom-1],[$,I.bottom-1],[$,C.top+1]];break;case"bottom":le=[[B,I.top+1],[B,C.bottom-1],[$,C.bottom-1],[$,I.top+1]];break;case"left":le=[[I.right-1,ge],[I.right-1,Q],[C.left+1,Q],[C.left+1,ge]];break;case"right":le=[[C.right-1,ge],[C.right-1,Q],[I.left+1,Q],[I.left+1,ge]];break}function Te(Ae){let[ae,K]=Ae;switch(W){case"top":{let ne=[z?ae+t/2:j?ae+t*4:ae-t*4,K+t+1],ee=[z?ae-t/2:j?ae+t*4:ae-t*4,K+t+1],te=[[I.left,j||z?I.bottom-t:I.top],[I.right,j?z?I.bottom-t:I.top:I.bottom-t]];return[ne,ee,...te]}case"bottom":{let ne=[z?ae+t/2:j?ae+t*4:ae-t*4,K-t],ee=[z?ae-t/2:j?ae+t*4:ae-t*4,K-t],te=[[I.left,j||z?I.top+t:I.bottom],[I.right,j?z?I.top+t:I.bottom:I.top+t]];return[ne,ee,...te]}case"left":{let ne=[ae+t+1,q?K+t/2:D?K+t*4:K-t*4],ee=[ae+t+1,q?K-t/2:D?K+t*4:K-t*4];return[...[[D||q?I.right-t:I.left,I.top],[D?q?I.right-t:I.left:I.right-t,I.bottom]],ne,ee]}case"right":{let ne=[ae-t,q?K+t/2:D?K+t*4:K-t*4],ee=[ae-t,q?K-t/2:D?K+t*4:K-t*4],te=[[D||q?I.left+t:I.right,I.top],[D?q?I.left+t:I.right:I.left+t,I.bottom]];return[ne,ee,...te]}}}if(!ww([A,T],le)){if(o&&!F)return O();if(!M&&n){let Ae=s(x.clientX,x.clientY);if(Ae!==null&&Ae<.1)return O()}ww([A,T],Te([f,p]))?!o&&n&&(i=window.setTimeout(O,40)):O()}}};return c.__options={blockPointerEvents:r},c}var E,_o,Ee,go,xw,hq,mq,bo,Qr,dr,pr,pe,Tw,kw,Cw,qw,Ph,gq,bq,Q0,_q,ew,wq,yo,xq,jw,Fw,Ei,Ai,tw,jh,Lw,Nw,rw,ho,oc,ac,Rh,Mq,Dw,kq,dc,pc,Iq,fc,Ww,uw,Vw,Fh,sw,wi,Lq,uc,lw,zq,Hq,Vq,hw,mw,vw,Zq,Xq,_w,nI,Yw=pt(()=>{E=V(Ye()),_o=V(Ye());Xy();Ka();Ee=V(Ua());Va();s0();go=V(Xs());Th();Th();xw={...E},hq=xw.useInsertionEffect,mq=hq||(e=>e());bo="ArrowUp",Qr="ArrowDown",dr="ArrowLeft",pr="ArrowRight";pe=typeof document<"u"?_o.useLayoutEffect:_o.useEffect;Tw=E.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});kw=E.createContext({activeIndex:0,onNavigate:()=>{}}),Cw=[dr,pr],qw=[bo,Qr],Ph=[...Cw,...qw],gq=E.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:u=1,disabledIndices:l,activeIndex:s,onNavigate:c,itemSizes:d,dense:f=!1,...p}=t,[h,m]=E.useState(0),g=s??h,_=Ie(c??m),w=E.useRef([]),y=n&&typeof n!="function"?n.props:{},x=E.useMemo(()=>({activeIndex:g,onNavigate:_}),[g,_]),O=u>1;function A(R){if(!Ph.includes(R.key))return;let k=g,M=sc(w,l),P=Ih(w,l),N=a?dr:pr,C=a?pr:dr;if(O){let F=d||Array.from({length:w.current.length},()=>({width:1,height:1})),z=Ow(F,u,f),q=z.findIndex(Q=>Q!=null&&!xi(w.current,Q,l)),B=z.reduce((Q,ge,le)=>ge!=null&&!xi(w.current,ge,l)?le:Q,-1),$=z[Sw({current:z.map(Q=>Q?w.current[Q]:null)},{event:R,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:Aw([...l||w.current.map((Q,ge)=>xi(w.current,ge)?ge:void 0),void 0],z),minIndex:q,maxIndex:B,prevIndex:Ew(g>P?M:g,F,z,u,R.key===Qr?"bl":R.key===N?"tr":"tl")})];$!=null&&(k=$)}let I={horizontal:[N],vertical:[Qr],both:[N,Qr]}[i],W={horizontal:[C],vertical:[bo],both:[C,bo]}[i],j=O?Ph:{horizontal:Cw,vertical:qw,both:Ph}[i];if(k===g&&[...I,...W].includes(R.key)&&(o&&k===P&&I.includes(R.key)?k=M:o&&k===M&&W.includes(R.key)?k=P:k=nt(w,{startingIndex:k,decrement:W.includes(R.key),disabledIndices:l})),k!==g&&!vo(w,k)){var D;R.stopPropagation(),j.includes(R.key)&&R.preventDefault(),_(k),(D=w.current[k])==null||D.focus()}}let T={...p,...y,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(R){p.onKeyDown==null||p.onKeyDown(R),y.onKeyDown==null||y.onKeyDown(R),A(R)}};return(0,Ee.jsx)(kw.Provider,{value:x,children:(0,Ee.jsx)(Pw,{elementsRef:w,children:Mw(n,T)})})}),bq=E.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=E.useContext(kw),{ref:l,index:s}=Rw(),c=lc([l,r,o.ref]),d=a===s,f={...i,...o,ref:c,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(p){i.onFocus==null||i.onFocus(p),o.onFocus==null||o.onFocus(p),u(s)}};return Mw(n,f)}),Q0=!1,_q=0,ew=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_q++;wq=xw.useId,yo=wq||yq,xq=E.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:u=14,height:l=7,tipRadius:s=0,strokeWidth:c=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...m}={},...g}=t,_=yo(),[w,y]=E.useState(!1);if(pe(()=>{if(!i)return;gt(i).direction==="rtl"&&y(!0)},[i]),!i)return null;let[x,O]=n.split("-"),A=x==="top"||x==="bottom",T=d;(A&&a!=null&&a.x||!A&&a!=null&&a.y)&&(T=null);let R=c*2,k=R/2,M=u/2*(s/-8+1),P=l/2*s/4,N=!!p,C=T&&O==="end"?"bottom":"top",I=T&&O==="end"?"right":"left";T&&w&&(I=O==="end"?"left":"right");let W=o?.x!=null?T||o.x:"",j=o?.y!=null?T||o.y:"",D=p||"M0,0"+(" H"+u)+(" L"+(u-M)+","+(l-P))+(" Q"+u/2+","+l+" "+M+","+(l-P))+" Z",F={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,Ee.jsxs)("svg",{...g,"aria-hidden":!0,ref:r,width:N?u:u+R,height:u,viewBox:"0 0 "+u+" "+(l>u?l:u),style:{position:"absolute",pointerEvents:"none",[I]:W,[C]:j,[x]:A||N?"100%":"calc(100% - "+R/2+"px)",transform:[F,h].filter(z=>!!z).join(" "),...m},children:[R>0&&(0,Ee.jsx)("path",{clipPath:"url(#"+_+")",fill:"none",stroke:f,strokeWidth:R+(p?0:1),d:D}),(0,Ee.jsx)("path",{stroke:R&&!p?g.fill:"none",d:D}),(0,Ee.jsx)("clipPath",{id:_,children:(0,Ee.jsx)("rect",{x:-k,y:k*(N?-1:1),width:u+R,height:u})})]})});jw=E.createContext(null),Fw=E.createContext(null),Ei=()=>{var e;return((e=E.useContext(jw))==null?void 0:e.id)||null},Ai=()=>E.useContext(Fw);tw=Oi("safe-polygon");jh=()=>{},Lw=E.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:jh,setState:jh,isInstantPhase:!1}),Nw=()=>E.useContext(Lw);rw=0;ho=new WeakMap,oc=new WeakSet,ac={},Rh=0,Mq=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Dw=e=>e&&(e.host||Dw(e.parentNode)),kq=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=Dw(r);return e.contains(n)?n:null}).filter(r=>r!=null);dc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});pc={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};fc=E.forwardRef(function(t,r){let[n,i]=E.useState();pe(()=>(hh()&&i("button"),document.addEventListener("keydown",aw),()=>{document.removeEventListener("keydown",aw)}),[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Oi("focus-guard")]:"",style:pc};return(0,Ee.jsx)("span",{...t,...o})}),Ww=E.createContext(null),uw=Oi("portal");Vw=()=>E.useContext(Ww),Fh="data-floating-ui-focusable";sw=20,wi=[];Lq=E.forwardRef(function(t,r){return(0,Ee.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:pc})});uc=0;lw=()=>{},zq=E.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return pe(()=>{if(n)return uc++,uc===1&&(lw=Dq()),()=>{uc--,uc===0&&lw()}},[n]),(0,Ee.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});Hq={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Vq={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},hw=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};mw="active",vw="selected";Zq="Escape";Xq=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);_w=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());nI=e=>({name:"inner",options:e,async fn(t){let{listRef:r,overflowRef:n,onFallbackChange:i,offset:o=0,index:a=0,minItemsVisible:u=4,referenceOverflowThreshold:l=0,scrollRef:s,...c}=Pt(e,t),{rects:d,elements:{floating:f}}=t,p=r.current[a],h=s?.current||f,m=f.clientTop||h.clientTop,g=f.clientTop!==0,_=h.clientTop!==0,w=f===h;if(!p)return{};let y={...t,...await nc(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},x=await _i(yw(y,h.scrollHeight+m+f.clientTop),c),O=await _i(y,{...c,elementContext:"reference"}),A=De(0,x.top),T=y.y+A,M=(h.scrollHeight>h.clientHeight?P=>P:gi)(De(0,h.scrollHeight+(g&&w||_?m*2:0)-A-De(0,x.bottom)));if(h.style.maxHeight=M+"px",h.scrollTop=A,i){let P=h.offsetHeight<p.offsetHeight*bt(u,r.current.length)-1||O.top>=-l||O.bottom>=-l;go.flushSync(()=>i(P))}return n&&(n.current=await _i(yw({...y,y:T},h.offsetHeight+m+f.clientTop),c)),{y:T}}})});var mc=b((XJ,Zw)=>{Zw.exports=JBrowseExports["@mui/material"]});var Xa=b((QJ,Jw)=>{Jw.exports=JBrowseExports["tss-react/mui"]});var Qw=b(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});Dh.default=lI;var Xw=Ua(),vc=(Yw(),Zg(Kw)),Nh=mc(),uI=Xa();function sI(e){return Math.round(e*1e5)/1e5}var cI=(0,uI.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Nh.alpha)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.fontSize,lineHeight:`${sI(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function lI({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Nh.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=cI(),{refs:l,floatingStyles:s,context:c}=(0,vc.useFloating)({placement:r,strategy:"fixed",middleware:[(0,vc.offset)(5)]}),d=(0,vc.useClientPoint)(c,e),{getFloatingProps:f}=(0,vc.useInteractions)([d]);return(0,Xw.jsx)(Nh.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,Xw.jsx)("div",{className:u.tooltip,ref:l.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...f(),children:t})})}});var m1=b((tX,h1)=>{"use strict";var{entries:c1,setPrototypeOf:e1,isFrozen:fI,getPrototypeOf:dI,getOwnPropertyDescriptor:pI}=Object,{freeze:yt,seal:Yt,create:l1}=Object,{apply:Vh,construct:Gh}=typeof Reflect<"u"&&Reflect;yt||(yt=function(t){return t});Yt||(Yt=function(t){return t});Vh||(Vh=function(t,r,n){return t.apply(r,n)});Gh||(Gh=function(t,r){return new t(...r)});var gc=wt(Array.prototype.forEach),hI=wt(Array.prototype.lastIndexOf),t1=wt(Array.prototype.pop),Qa=wt(Array.prototype.push),mI=wt(Array.prototype.splice),_c=wt(String.prototype.toLowerCase),zh=wt(String.prototype.toString),r1=wt(String.prototype.match),eu=wt(String.prototype.replace),vI=wt(String.prototype.indexOf),gI=wt(String.prototype.trim),hr=wt(Object.prototype.hasOwnProperty),_t=wt(RegExp.prototype.test),tu=bI(TypeError);function wt(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Vh(e,t,n)}}function bI(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gh(e,r)}}function ue(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_c;e1&&e1(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let o=r(i);o!==i&&(fI(t)||(t[n]=o),i=o)}e[i]=!0}return e}function _I(e){for(let t=0;t<e.length;t++)hr(e,t)||(e[t]=null);return e}function Ti(e){let t=l1(null);for(let[r,n]of c1(e))hr(e,r)&&(Array.isArray(n)?t[r]=_I(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Ti(n):t[r]=n);return t}function ru(e,t){for(;e!==null;){let n=pI(e,t);if(n){if(n.get)return wt(n.get);if(typeof n.value=="function")return wt(n.value)}e=dI(e)}function r(){return null}return r}var n1=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bh=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Uh=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yI=yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wh=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),wI=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),i1=yt(["#text"]),o1=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Hh=yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),a1=yt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),bc=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xI=Yt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),SI=Yt(/<%[\w\W]*|[\w\W]*%>/gm),OI=Yt(/\$\{[\w\W]*/gm),EI=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),AI=Yt(/^aria-[\-\w]+$/),f1=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TI=Yt(/^(?:\w+script|data):/i),PI=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),d1=Yt(/^html$/i),RI=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i),u1=Object.freeze({__proto__:null,ARIA_ATTR:AI,ATTR_WHITESPACE:PI,CUSTOM_ELEMENT:RI,DATA_ATTR:EI,DOCTYPE_NAME:d1,ERB_EXPR:SI,IS_ALLOWED_URI:f1,IS_SCRIPT_OR_DATA:TI,MUSTACHE_EXPR:xI,TMPLIT_EXPR:OI}),nu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},MI=function(){return typeof window>"u"?null:window},kI=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},s1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function p1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:MI(),t=X=>p1(X);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==nu.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,n=r,i=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:u,Element:l,NodeFilter:s,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,h=l.prototype,m=ru(h,"cloneNode"),g=ru(h,"remove"),_=ru(h,"nextSibling"),w=ru(h,"childNodes"),y=ru(h,"parentNode");if(typeof a=="function"){let X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let x,O="",{implementation:A,createNodeIterator:T,createDocumentFragment:R,getElementsByTagName:k}=r,{importNode:M}=n,P=s1();t.isSupported=typeof c1=="function"&&typeof y=="function"&&A&&A.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:C,TMPLIT_EXPR:I,DATA_ATTR:W,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:z}=u1,{IS_ALLOWED_URI:q}=u1,B=null,$=ue({},[...n1,...Bh,...Uh,...Wh,...i1]),Q=null,ge=ue({},[...o1,...Hh,...a1,...bc]),le=Object.seal(l1(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Ae=null,ae=!0,K=!0,ne=!1,ee=!0,te=!1,_e=!0,xe=!1,be=!1,We=!1,Pe=!1,ft=!1,re=!1,fe=!0,J=!1,ie="user-content-",$e=!0,ze=!1,wr={},tr=null,ln=ue({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),St=null,rr=ue({},["audio","video","img","source","image","track"]),Hr=null,ts=ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ri="http://www.w3.org/1998/Math/MathML",ni="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml",jt=Dt,zt=!1,fn=null,ep=ue({},[ri,ni,Dt],zh),ii=ue({},["mi","mo","mn","ms","mtext"]),oi=ue({},["annotation-xml"]),WR=ue({},["title","style","font","a","script"]),ma=null,HR=["application/xhtml+xml","text/html"],VR="text/html",Ke=null,$i=null,GR=r.createElement("form"),Lg=function(S){return S instanceof RegExp||S instanceof Function},tp=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($i&&$i===S)){if((!S||typeof S!="object")&&(S={}),S=Ti(S),ma=HR.indexOf(S.PARSER_MEDIA_TYPE)===-1?VR:S.PARSER_MEDIA_TYPE,Ke=ma==="application/xhtml+xml"?zh:_c,B=hr(S,"ALLOWED_TAGS")?ue({},S.ALLOWED_TAGS,Ke):$,Q=hr(S,"ALLOWED_ATTR")?ue({},S.ALLOWED_ATTR,Ke):ge,fn=hr(S,"ALLOWED_NAMESPACES")?ue({},S.ALLOWED_NAMESPACES,zh):ep,Hr=hr(S,"ADD_URI_SAFE_ATTR")?ue(Ti(ts),S.ADD_URI_SAFE_ATTR,Ke):ts,St=hr(S,"ADD_DATA_URI_TAGS")?ue(Ti(rr),S.ADD_DATA_URI_TAGS,Ke):rr,tr=hr(S,"FORBID_CONTENTS")?ue({},S.FORBID_CONTENTS,Ke):ln,Te=hr(S,"FORBID_TAGS")?ue({},S.FORBID_TAGS,Ke):{},Ae=hr(S,"FORBID_ATTR")?ue({},S.FORBID_ATTR,Ke):{},wr=hr(S,"USE_PROFILES")?S.USE_PROFILES:!1,ae=S.ALLOW_ARIA_ATTR!==!1,K=S.ALLOW_DATA_ATTR!==!1,ne=S.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=S.SAFE_FOR_TEMPLATES||!1,_e=S.SAFE_FOR_XML!==!1,xe=S.WHOLE_DOCUMENT||!1,Pe=S.RETURN_DOM||!1,ft=S.RETURN_DOM_FRAGMENT||!1,re=S.RETURN_TRUSTED_TYPE||!1,We=S.FORCE_BODY||!1,fe=S.SANITIZE_DOM!==!1,J=S.SANITIZE_NAMED_PROPS||!1,$e=S.KEEP_CONTENT!==!1,ze=S.IN_PLACE||!1,q=S.ALLOWED_URI_REGEXP||f1,jt=S.NAMESPACE||Dt,ii=S.MATHML_TEXT_INTEGRATION_POINTS||ii,oi=S.HTML_INTEGRATION_POINTS||oi,le=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&Lg(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&Lg(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(K=!1),ft&&(Pe=!0),wr&&(B=ue({},i1),Q=[],wr.html===!0&&(ue(B,n1),ue(Q,o1)),wr.svg===!0&&(ue(B,Bh),ue(Q,Hh),ue(Q,bc)),wr.svgFilters===!0&&(ue(B,Uh),ue(Q,Hh),ue(Q,bc)),wr.mathMl===!0&&(ue(B,Wh),ue(Q,a1),ue(Q,bc))),S.ADD_TAGS&&(B===$&&(B=Ti(B)),ue(B,S.ADD_TAGS,Ke)),S.ADD_ATTR&&(Q===ge&&(Q=Ti(Q)),ue(Q,S.ADD_ATTR,Ke)),S.ADD_URI_SAFE_ATTR&&ue(Hr,S.ADD_URI_SAFE_ATTR,Ke),S.FORBID_CONTENTS&&(tr===ln&&(tr=Ti(tr)),ue(tr,S.FORBID_CONTENTS,Ke)),$e&&(B["#text"]=!0),xe&&ue(B,["html","head","body"]),B.table&&(ue(B,["tbody"]),delete Te.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw tu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw tu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=S.TRUSTED_TYPES_POLICY,O=x.createHTML("")}else x===void 0&&(x=kI(p,i)),x!==null&&typeof O=="string"&&(O=x.createHTML(""));yt&&yt(S),$i=S}},Ng=ue({},[...Bh,...Uh,...yI]),Dg=ue({},[...Wh,...wI]),$R=function(S){let H=y(S);(!H||!H.tagName)&&(H={namespaceURI:jt,tagName:"template"});let Y=_c(S.tagName),Re=_c(H.tagName);return fn[S.namespaceURI]?S.namespaceURI===ni?H.namespaceURI===Dt?Y==="svg":H.namespaceURI===ri?Y==="svg"&&(Re==="annotation-xml"||ii[Re]):!!Ng[Y]:S.namespaceURI===ri?H.namespaceURI===Dt?Y==="math":H.namespaceURI===ni?Y==="math"&&oi[Re]:!!Dg[Y]:S.namespaceURI===Dt?H.namespaceURI===ni&&!oi[Re]||H.namespaceURI===ri&&!ii[Re]?!1:!Dg[Y]&&(WR[Y]||!Ng[Y]):!!(ma==="application/xhtml+xml"&&fn[S.namespaceURI]):!1},xr=function(S){Qa(t.removed,{element:S});try{y(S).removeChild(S)}catch{g(S)}},rs=function(S,H){try{Qa(t.removed,{attribute:H.getAttributeNode(S),from:H})}catch{Qa(t.removed,{attribute:null,from:H})}if(H.removeAttribute(S),S==="is")if(Pe||ft)try{xr(H)}catch{}else try{H.setAttribute(S,"")}catch{}},zg=function(S){let H=null,Y=null;if(We)S="<remove></remove>"+S;else{let Qe=r1(S,/^[\r\n\t ]+/);Y=Qe&&Qe[0]}ma==="application/xhtml+xml"&&jt===Dt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");let Re=x?x.createHTML(S):S;if(jt===Dt)try{H=new f().parseFromString(Re,ma)}catch{}if(!H||!H.documentElement){H=A.createDocument(jt,"template",null);try{H.documentElement.innerHTML=zt?O:Re}catch{}}let st=H.body||H.documentElement;return S&&Y&&st.insertBefore(r.createTextNode(Y),st.childNodes[0]||null),jt===Dt?k.call(H,xe?"html":"body")[0]:xe?H.documentElement:st},Bg=function(S){return T.call(S.ownerDocument||S,S,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},rp=function(S){return S instanceof d&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof c)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Ug=function(S){return typeof u=="function"&&S instanceof u};function Vr(X,S,H){gc(X,Y=>{Y.call(t,S,H,$i)})}let Wg=function(S){let H=null;if(Vr(P.beforeSanitizeElements,S,null),rp(S))return xr(S),!0;let Y=Ke(S.nodeName);if(Vr(P.uponSanitizeElement,S,{tagName:Y,allowedTags:B}),S.hasChildNodes()&&!Ug(S.firstElementChild)&&_t(/<[/\w]/g,S.innerHTML)&&_t(/<[/\w]/g,S.textContent)||S.nodeType===nu.progressingInstruction||_e&&S.nodeType===nu.comment&&_t(/<[/\w]/g,S.data))return xr(S),!0;if(!B[Y]||Te[Y]){if(!Te[Y]&&Vg(Y)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,Y)||le.tagNameCheck instanceof Function&&le.tagNameCheck(Y)))return!1;if($e&&!tr[Y]){let Re=y(S)||S.parentNode,st=w(S)||S.childNodes;if(st&&Re){let Qe=st.length;for(let Ot=Qe-1;Ot>=0;--Ot){let Sr=m(st[Ot],!0);Sr.__removalCount=(S.__removalCount||0)+1,Re.insertBefore(Sr,_(S))}}}return xr(S),!0}return S instanceof l&&!$R(S)||(Y==="noscript"||Y==="noembed"||Y==="noframes")&&_t(/<\/no(script|embed|frames)/i,S.innerHTML)?(xr(S),!0):(te&&S.nodeType===nu.text&&(H=S.textContent,gc([N,C,I],Re=>{H=eu(H,Re," ")}),S.textContent!==H&&(Qa(t.removed,{element:S.cloneNode()}),S.textContent=H)),Vr(P.afterSanitizeElements,S,null),!1)},Hg=function(S,H,Y){if(fe&&(H==="id"||H==="name")&&(Y in r||Y in GR))return!1;if(!(K&&!Ae[H]&&_t(W,H))){if(!(ae&&_t(j,H))){if(!Q[H]||Ae[H]){if(!(Vg(S)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,S)||le.tagNameCheck instanceof Function&&le.tagNameCheck(S))&&(le.attributeNameCheck instanceof RegExp&&_t(le.attributeNameCheck,H)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(H))||H==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,Y)||le.tagNameCheck instanceof Function&&le.tagNameCheck(Y))))return!1}else if(!Hr[H]){if(!_t(q,eu(Y,F,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&S!=="script"&&vI(Y,"data:")===0&&St[S])){if(!(ne&&!_t(D,eu(Y,F,"")))){if(Y)return!1}}}}}}return!0},Vg=function(S){return S!=="annotation-xml"&&r1(S,z)},Gg=function(S){Vr(P.beforeSanitizeAttributes,S,null);let{attributes:H}=S;if(!H||rp(S))return;let Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0},Re=H.length;for(;Re--;){let st=H[Re],{name:Qe,namespaceURI:Ot,value:Sr}=st,va=Ke(Qe),dt=Qe==="value"?Sr:gI(Sr);if(Y.attrName=va,Y.attrValue=dt,Y.keepAttr=!0,Y.forceKeepAttr=void 0,Vr(P.uponSanitizeAttribute,S,Y),dt=Y.attrValue,J&&(va==="id"||va==="name")&&(rs(Qe,S),dt=ie+dt),_e&&_t(/((--!?|])>)|<\/(style|title)/i,dt)){rs(Qe,S);continue}if(Y.forceKeepAttr||(rs(Qe,S),!Y.keepAttr))continue;if(!ee&&_t(/\/>/i,dt)){rs(Qe,S);continue}te&&gc([N,C,I],Kg=>{dt=eu(dt,Kg," ")});let $g=Ke(S.nodeName);if(Hg($g,va,dt)){if(x&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ot)switch(p.getAttributeType($g,va)){case"TrustedHTML":{dt=x.createHTML(dt);break}case"TrustedScriptURL":{dt=x.createScriptURL(dt);break}}try{Ot?S.setAttributeNS(Ot,Qe,dt):S.setAttribute(Qe,dt),rp(S)?xr(S):t1(t.removed)}catch{}}}Vr(P.afterSanitizeAttributes,S,null)},KR=function X(S){let H=null,Y=Bg(S);for(Vr(P.beforeSanitizeShadowDOM,S,null);H=Y.nextNode();)Vr(P.uponSanitizeShadowNode,H,null),Wg(H),Gg(H),H.content instanceof o&&X(H.content);Vr(P.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(X){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,Y=null,Re=null,st=null;if(zt=!X,zt&&(X="<!-->"),typeof X!="string"&&!Ug(X))if(typeof X.toString=="function"){if(X=X.toString(),typeof X!="string")throw tu("dirty is not a string, aborting")}else throw tu("toString is not a function");if(!t.isSupported)return X;if(be||tp(S),t.removed=[],typeof X=="string"&&(ze=!1),ze){if(X.nodeName){let Sr=Ke(X.nodeName);if(!B[Sr]||Te[Sr])throw tu("root node is forbidden and cannot be sanitized in-place")}}else if(X instanceof u)H=zg("<!---->"),Y=H.ownerDocument.importNode(X,!0),Y.nodeType===nu.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?H=Y:H.appendChild(Y);else{if(!Pe&&!te&&!xe&&X.indexOf("<")===-1)return x&&re?x.createHTML(X):X;if(H=zg(X),!H)return Pe?null:re?O:""}H&&We&&xr(H.firstChild);let Qe=Bg(ze?X:H);for(;Re=Qe.nextNode();)Wg(Re),Gg(Re),Re.content instanceof o&&KR(Re.content);if(ze)return X;if(Pe){if(ft)for(st=R.call(H.ownerDocument);H.firstChild;)st.appendChild(H.firstChild);else st=H;return(Q.shadowroot||Q.shadowrootmode)&&(st=M.call(n,st,!0)),st}let Ot=xe?H.outerHTML:H.innerHTML;return xe&&B["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&_t(d1,H.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
2
- `+Ot),te&&gc([N,C,I],Sr=>{Ot=eu(Ot,Sr," ")}),x&&re?x.createHTML(Ot):Ot},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tp(X),be=!0},t.clearConfig=function(){$i=null,be=!1},t.isValidAttribute=function(X,S,H){$i||tp({});let Y=Ke(X),Re=Ke(S);return Hg(Y,Re,H)},t.addHook=function(X,S){typeof S=="function"&&Qa(P[X],S)},t.removeHook=function(X,S){if(S!==void 0){let H=hI(P[X],S);return H===-1?void 0:mI(P[X],H,1)[0]}return t1(P[X])},t.removeHooks=function(X){P[X]=[]},t.removeAllHooks=function(){P=s1()},t}var CI=p1();h1.exports=CI});var g1=b((rX,v1)=>{"use strict";var qI=/["'&<>]/;v1.exports=II;function II(e){var t=""+e,r=qI.exec(t);if(!r)return t;var n,i="",o=0,a=0;for(o=r.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}a!==o&&(i+=t.substring(a,o)),a=o+1,i+=n}return a!==o?i+t.substring(a,o):i}});var b1=b(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});Kh.default=jI;var $h=Ye();function jI(){let e=(0,$h.useRef)(null),[t,r]=(0,$h.useState)({width:void 0,height:void 0});return(0,$h.useEffect)(()=>{if(!e.current)return;let n=typeof window<"u"&&"ResizeObserver"in window?window.ResizeObserver:void 0;if(!n)return;let i=new n(o=>{r({width:o[0].contentRect.width,height:o[0].contentRect.height})});return i.observe(e.current),()=>{i.disconnect()}},[]),[e,t]}});var y1=b((iX,_1)=>{_1.exports=JBrowseExports["react-dom/client"]});var Qh=b(Pi=>{Object.defineProperty(Pi,"__esModule",{value:!0});var FI={grad:.9,turn:360,rad:360/(2*Math.PI)},en=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Xe=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Zt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},P1=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},w1=function(e){return{r:Zt(e.r,0,255),g:Zt(e.g,0,255),b:Zt(e.b,0,255),a:Zt(e.a)}},Yh=function(e){return{r:Xe(e.r),g:Xe(e.g),b:Xe(e.b),a:Xe(e.a,3)}},LI=/^#([0-9a-f]{3,8})$/i,yc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},R1=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},M1=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),l=n*(1-(1-t+o)*r),s=o%6;return{r:255*[n,u,a,a,l,n][s],g:255*[l,n,n,u,a,a][s],b:255*[a,a,l,n,n,u][s],a:i}},x1=function(e){return{h:P1(e.h),s:Zt(e.s,0,100),l:Zt(e.l,0,100),a:Zt(e.a)}},S1=function(e){return{h:Xe(e.h),s:Xe(e.s),l:Xe(e.l),a:Xe(e.a,3)}},O1=function(e){return M1((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},iu=function(e){return{h:(t=R1(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},NI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,DI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,BI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xh={string:[[function(e){var t=LI.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Xe(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Xe(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=zI.exec(e)||BI.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:w1({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=NI.exec(e)||DI.exec(e);if(!t)return null;var r,n,i=x1({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(FI[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return O1(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return en(t)&&en(r)&&en(n)?w1({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!en(t)||!en(r)||!en(n))return null;var a=x1({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return O1(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!en(t)||!en(r)||!en(n))return null;var a=function(u){return{h:P1(u.h),s:Zt(u.s,0,100),v:Zt(u.v,0,100),a:Zt(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return M1(a)},"hsv"]]},E1=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},k1=function(e){return typeof e=="string"?E1(e.trim(),Xh.string):typeof e=="object"&&e!==null?E1(e,Xh.object):[null,void 0]},Zh=function(e,t){var r=iu(e);return{h:r.h,s:Zt(r.s+100*t,0,100),l:r.l,a:r.a}},Jh=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},A1=function(e,t){var r=iu(e);return{h:r.h,s:r.s,l:Zt(r.l+100*t,0,100),a:r.a}},ou=function(){function e(t){this.parsed=k1(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Xe(Jh(this.rgba),2)},e.prototype.isDark=function(){return Jh(this.rgba)<.5},e.prototype.isLight=function(){return Jh(this.rgba)>=.5},e.prototype.toHex=function(){return t=Yh(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?yc(Xe(255*o)):"","#"+yc(r)+yc(n)+yc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Yh(this.rgba)},e.prototype.toRgbString=function(){return t=Yh(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return S1(iu(this.rgba))},e.prototype.toHslString=function(){return t=S1(iu(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=R1(this.rgba),{h:Xe(t.h),s:Xe(t.s),v:Xe(t.v),a:Xe(t.a,3)};var t},e.prototype.invert=function(){return qr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),qr(Zh(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),qr(Zh(this.rgba,-t))},e.prototype.grayscale=function(){return qr(Zh(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),qr(A1(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),qr(A1(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?qr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Xe(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=iu(this.rgba);return typeof t=="number"?qr({h:t,s:r.s,l:r.l,a:r.a}):Xe(r.h)},e.prototype.isEqual=function(t){return this.toHex()===qr(t).toHex()},e}(),qr=function(e){return e instanceof ou?e:new ou(e)},T1=[];Pi.Colord=ou,Pi.colord=qr,Pi.extend=function(e){e.forEach(function(t){T1.indexOf(t)<0&&(t(ou,Xh),T1.push(t))})},Pi.getFormat=function(e){return k1(e)[1]},Pi.random=function(){return new ou({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var I1=b((aX,q1)=>{var Ir=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},em=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},tm=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},rm=96.422,nm=100,im=82.521,UI=function(e){var t,r,n={x:.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:tm(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:tm(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:tm(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:Ir(r.r,0,255),g:Ir(r.g,0,255),b:Ir(r.b,0,255),a:Ir(r.a)}},WI=function(e){var t=em(e.r),r=em(e.g),n=em(e.b);return function(i){return{x:Ir(i.x,0,rm),y:Ir(i.y,0,nm),z:Ir(i.z,0,im),a:Ir(i.a)}}(function(i){return{x:1.0478112*i.x+.0228866*i.y+-.050127*i.z,y:.0295424*i.x+.9904844*i.y+-.0170491*i.z,z:-.0092345*i.x+.0150436*i.y+.7521316*i.z,a:i.a}}({x:100*(.4124564*t+.3575761*r+.1804375*n),y:100*(.2126729*t+.7151522*r+.072175*n),z:100*(.0193339*t+.119192*r+.9503041*n),a:e.a}))},au=216/24389,wo=24389/27,C1=function(e){var t=WI(e),r=t.x/rm,n=t.y/nm,i=t.z/im;return r=r>au?Math.cbrt(r):(wo*r+16)/116,{l:116*(n=n>au?Math.cbrt(n):(wo*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>au?Math.cbrt(i):(wo*i+16)/116)),alpha:t.a}},HI=function(e,t,r){var n,i=C1(e),o=C1(t);return function(a){var u=(a.l+16)/116,l=a.a/500+u,s=u-a.b/200;return UI({x:(Math.pow(l,3)>au?Math.pow(l,3):(116*l-16)/wo)*rm,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/wo)*nm,z:(Math.pow(s,3)>au?Math.pow(s,3):(116*s-16)/wo)*im,a:a.alpha})}({l:Ir((n={l:i.l*(1-r)+o.l*r,a:i.a*(1-r)+o.a*r,b:i.b*(1-r)+o.b*r,alpha:i.alpha*(1-r)+o.alpha*r}).l,0,400),a:n.a,b:n.b,alpha:Ir(n.alpha)})};q1.exports=function(e){function t(r,n,i){i===void 0&&(i=5);for(var o=[],a=1/(i-1),u=0;u<=i-1;u++)o.push(r.mix(n,a*u));return o}e.prototype.mix=function(r,n){n===void 0&&(n=.5);var i=r instanceof e?r:new e(r),o=HI(this.toRgb(),i.toRgb(),n);return new e(o)},e.prototype.tints=function(r){return t(this,"#fff",r)},e.prototype.shades=function(r){return t(this,"#000",r)},e.prototype.tones=function(r){return t(this,"#808080",r)}}});var F1=b((uX,j1)=>{j1.exports=function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,l,s=n[this.toHex()];if(s)return s;if(a?.closest){var c=this.toRgb(),d=1/0,f="black";if(!o.length)for(var p in r)o[p]=new e(r[p]).toRgb();for(var h in r){var m=(u=c,l=o[h],Math.pow(u.r-l.r,2)+Math.pow(u.g-l.g,2)+Math.pow(u.b-l.b,2));m<d&&(d=m,f=h)}return f}},t.string.push([function(a){var u=a.toLowerCase(),l=u==="transparent"?"#0000":r[u];return l?new e(l).toRgb():null},"name"])}});var D1=b(Sn=>{"use strict";var L1=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.colord=Sn.Colord=void 0;var VI=Qh(),GI=L1(I1()),$I=L1(F1());(0,VI.extend)([GI.default,$I.default]);var N1=Qh();Object.defineProperty(Sn,"Colord",{enumerable:!0,get:function(){return N1.Colord}});Object.defineProperty(Sn,"colord",{enumerable:!0,get:function(){return N1.colord}})});var om=b(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.createStopToken=YI;uu.stopStopToken=ZI;uu.checkStopToken=JI;function KI(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function YI(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function ZI(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function JI(e){if(typeof jest>"u"&&e!==void 0&&KI()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var B1=b(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0})});var On=b((fX,su)=>{function XI(e){return e&&e.__esModule?e:{default:e}}su.exports=XI,su.exports.__esModule=!0,su.exports.default=su.exports});var um=b((dX,tn)=>{function am(e){"@babel/helpers - typeof";return tn.exports=am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tn.exports.__esModule=!0,tn.exports.default=tn.exports,am(e)}tn.exports=am,tn.exports.__esModule=!0,tn.exports.default=tn.exports});var W1=b((pX,cu)=>{var U1=um().default;function QI(e,t){if(U1(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(U1(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}cu.exports=QI,cu.exports.__esModule=!0,cu.exports.default=cu.exports});var sm=b((hX,lu)=>{var ej=um().default,tj=W1();function rj(e){var t=tj(e,"string");return ej(t)=="symbol"?t:t+""}lu.exports=rj,lu.exports.__esModule=!0,lu.exports.default=lu.exports});var H1=b((mX,fu)=>{var nj=sm();function ij(e,t,r){return(t=nj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}fu.exports=ij,fu.exports.__esModule=!0,fu.exports.default=fu.exports});var Ri=b((vX,du)=>{function oj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}du.exports=oj,du.exports.__esModule=!0,du.exports.default=du.exports});var Mi=b((gX,pu)=>{var aj=sm();function V1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aj(n.key),n)}}function uj(e,t,r){return t&&V1(e.prototype,t),r&&V1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}pu.exports=uj,pu.exports.__esModule=!0,pu.exports.default=pu.exports});var cm=b((bX,hu)=>{function sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}hu.exports=sj,hu.exports.__esModule=!0,hu.exports.default=hu.exports});var G1=b((_X,mu)=>{var cj=cm();function lj(e){if(Array.isArray(e))return cj(e)}mu.exports=lj,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var $1=b((yX,vu)=>{function fj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}vu.exports=fj,vu.exports.__esModule=!0,vu.exports.default=vu.exports});var Y1=b((wX,gu)=>{var K1=cm();function dj(e,t){if(e){if(typeof e=="string")return K1(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K1(e,t):void 0}}gu.exports=dj,gu.exports.__esModule=!0,gu.exports.default=gu.exports});var Z1=b((xX,bu)=>{function pj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}bu.exports=pj,bu.exports.__esModule=!0,bu.exports.default=bu.exports});var J1=b((SX,_u)=>{var hj=G1(),mj=$1(),vj=Y1(),gj=Z1();function bj(e){return hj(e)||mj(e)||vj(e)||gj()}_u.exports=bj,_u.exports.__esModule=!0,_u.exports.default=_u.exports});var X1=b(jr=>{"use strict";var _j=On(),yj=_j(J1()),wj={functions:"Jexl Function",transforms:"Transform"};jr.ArrayLiteral=function(e){return this.evalArray(e.value)};jr.BinaryExpression=function(e){var t=this,r=this._grammar.elements[e.operator];if(r.evalOnDemand){var n=function(o){return{eval:function(){return t.eval(o)}}};return r.evalOnDemand(n(e.left),n(e.right))}return this.Promise.all([this.eval(e.left),this.eval(e.right)]).then(function(i){return r.eval(i[0],i[1])})};jr.ConditionalExpression=function(e){var t=this;return this.eval(e.test).then(function(r){return r?e.consequent?t.eval(e.consequent):r:t.eval(e.alternate)})};jr.FilterExpression=function(e){var t=this;return this.eval(e.subject).then(function(r){return e.relative?t._filterRelative(r,e.expr):t._filterStatic(r,e.expr)})};jr.Identifier=function(e){return e.from?this.eval(e.from).then(function(t){if(t!=null)return Array.isArray(t)&&(t=t[0]),t[e.value]}):e.relative?this._relContext[e.value]:this._context[e.value]};jr.Literal=function(e){return e.value};jr.ObjectLiteral=function(e){return this.evalMap(e.value)};jr.FunctionCall=function(e){var t=wj[e.pool];if(!t)throw new Error("Corrupt AST: Pool '".concat(e.pool,"' not found"));var r=this._grammar[e.pool],n=r[e.name];if(!n)throw new Error("".concat(t," ").concat(e.name," is not defined."));return this.evalArray(e.args||[]).then(function(i){return n.apply(void 0,(0,yj.default)(i))})};jr.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var tx=b((EX,ex)=>{"use strict";var Q1=On(),xj=Q1(Ri()),Sj=Q1(Mi()),Oj=X1(),Ej=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,xj.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,Sj.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return Oj[r.type].call(n,r)})}},{key:"evalArray",value:function(r){var n=this;return this.Promise.all(r.map(function(i){return n.eval(i)}))}},{key:"evalMap",value:function(r){var n=this,i=Object.keys(r),o={},a=i.map(function(u){return n.eval(r[u])});return this.Promise.all(a).then(function(u){return u.forEach(function(l,s){o[i[s]]=l}),o})}},{key:"_filterRelative",value:function(r,n){var i=this,o=[];return Array.isArray(r)||(r=r===void 0?[]:[r]),r.forEach(function(a){var u=new e(i._grammar,i._context,a,i.Promise);o.push(u.eval(n))}),this.Promise.all(o).then(function(a){var u=[];return a.forEach(function(l,s){l&&u.push(r[s])}),u})}},{key:"_filterStatic",value:function(r,n){return this.eval(n).then(function(i){return typeof i=="boolean"?i?r:void 0:r[i]})}}]),e}();ex.exports=Ej});var ox=b((AX,ix)=>{"use strict";var nx=On(),Aj=nx(Ri()),Tj=nx(Mi()),Pj=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,rx=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,Rj=/\\\\/,Mj=/^\s*$/,kj=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Cj=["[a-zA-Z\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$][a-zA-Z0-9\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$]*","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],qj=["binaryOp","unaryOp","openParen","openBracket","question","colon"],Ij=function(){function e(t){(0,Aj.default)(this,e),this._grammar=t}return(0,Tj.default)(e,[{key:"getElements",value:function(r){var n=this._getSplitRegex();return r.split(n).filter(function(i){return i})}},{key:"getTokens",value:function(r){for(var n=[],i=!1,o=0;o<r.length;o++)this._isWhitespace(r[o])?n.length&&(n[n.length-1].raw+=r[o]):r[o]==="-"&&this._isNegative(n)?i=!0:(i&&(r[o]="-"+r[o],i=!1),n.push(this._createToken(r[o])));return i&&n.push(this._createToken("-")),n}},{key:"tokenize",value:function(r){var n=this.getElements(r);return this.getTokens(n)}},{key:"_createToken",value:function(r){var n={type:"literal",value:r,raw:r};if(r[0]==='"'||r[0]==="'")n.value=this._unquote(r);else if(r.match(Pj))n.value=parseFloat(r);else if(r==="true"||r==="false")n.value=r==="true";else if(this._grammar.elements[r])n.type=this._grammar.elements[r].type;else if(r.match(rx))n.type="identifier";else throw new Error("Invalid expression token: ".concat(r));return n}},{key:"_escapeRegExp",value:function(r){return r=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r.match(rx)&&(r="\\b"+r+"\\b"),r}},{key:"_getSplitRegex",value:function(){var r=this;if(!this._splitRegex){var n=Object.keys(this._grammar.elements).sort(function(i,o){return o.length-i.length}).map(function(i){return r._escapeRegExp(i)},this);this._splitRegex=new RegExp("("+[kj.join("|"),n.join("|"),Cj.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?qj.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(Mj)}},{key:"_unquote",value:function(r){var n=r[0],i=new RegExp("\\\\"+n,"g");return r.substr(1,r.length-2).replace(i,n).replace(Rj,"\\")}}]),e}();ix.exports=Ij});var lm=b(Ge=>{"use strict";Ge.argVal=function(e){e&&this._cursor.args.push(e)};Ge.arrayStart=function(){this._placeAtCursor({type:"ArrayLiteral",value:[]})};Ge.arrayVal=function(e){e&&this._cursor.value.push(e)};Ge.binaryOp=function(e){for(var t=this._grammar.elements[e.value].precedence||0,r=this._cursor._parent;r&&r.operator&&this._grammar.elements[r.operator].precedence>=t;)this._cursor=r,r=r._parent;var n={type:"BinaryExpression",operator:e.value,left:this._cursor};this._setParent(this._cursor,n),this._cursor=r,this._placeAtCursor(n)};Ge.dot=function(){this._nextIdentEncapsulate=this._cursor&&this._cursor.type!=="UnaryExpression"&&(this._cursor.type!=="BinaryExpression"||this._cursor.type==="BinaryExpression"&&this._cursor.right),this._nextIdentRelative=!this._cursor||this._cursor&&!this._nextIdentEncapsulate,this._nextIdentRelative&&(this._relative=!0)};Ge.filter=function(e){this._placeBeforeCursor({type:"FilterExpression",expr:e,relative:this._subParser.isRelative(),subject:this._cursor})};Ge.functionCall=function(){this._placeBeforeCursor({type:"FunctionCall",name:this._cursor.value,args:[],pool:"functions"})};Ge.identifier=function(e){var t={type:"Identifier",value:e.value};this._nextIdentEncapsulate?(t.from=this._cursor,this._placeBeforeCursor(t),this._nextIdentEncapsulate=!1):(this._nextIdentRelative&&(t.relative=!0,this._nextIdentRelative=!1),this._placeAtCursor(t))};Ge.literal=function(e){this._placeAtCursor({type:"Literal",value:e.value})};Ge.objKey=function(e){this._curObjKey=e.value};Ge.objStart=function(){this._placeAtCursor({type:"ObjectLiteral",value:{}})};Ge.objVal=function(e){this._cursor.value[this._curObjKey]=e};Ge.subExpression=function(e){this._placeAtCursor(e)};Ge.ternaryEnd=function(e){this._cursor.alternate=e};Ge.ternaryMid=function(e){this._cursor.consequent=e};Ge.ternaryStart=function(){this._tree={type:"ConditionalExpression",test:this._tree},this._cursor=this._tree};Ge.transform=function(e){this._placeBeforeCursor({type:"FunctionCall",name:e.value,args:[this._cursor],pool:"transforms"})};Ge.unaryOp=function(e){this._placeAtCursor({type:"UnaryExpression",operator:e.value})}});var ux=b(ax=>{"use strict";var Mt=lm();ax.states={expectOperand:{tokenTypes:{literal:{toState:"expectBinOp"},identifier:{toState:"identifier"},unaryOp:{},openParen:{toState:"subExpression"},openCurl:{toState:"expectObjKey",handler:Mt.objStart},dot:{toState:"traverse"},openBracket:{toState:"arrayVal",handler:Mt.arrayStart}}},expectBinOp:{tokenTypes:{binaryOp:{toState:"expectOperand"},pipe:{toState:"expectTransform"},dot:{toState:"traverse"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},expectTransform:{tokenTypes:{identifier:{toState:"postTransform",handler:Mt.transform}}},expectObjKey:{tokenTypes:{identifier:{toState:"expectKeyValSep",handler:Mt.objKey},closeCurl:{toState:"expectBinOp"}}},expectKeyValSep:{tokenTypes:{colon:{toState:"objVal"}}},postTransform:{tokenTypes:{openParen:{toState:"argVal"},binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},postArgs:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},identifier:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},openParen:{toState:"argVal",handler:Mt.functionCall},pipe:{toState:"expectTransform"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},traverse:{tokenTypes:{identifier:{toState:"identifier"}}},filter:{subHandler:Mt.filter,endStates:{closeBracket:"identifier"}},subExpression:{subHandler:Mt.subExpression,endStates:{closeParen:"expectBinOp"}},argVal:{subHandler:Mt.argVal,endStates:{comma:"argVal",closeParen:"postArgs"}},objVal:{subHandler:Mt.objVal,endStates:{comma:"expectObjKey",closeCurl:"expectBinOp"}},arrayVal:{subHandler:Mt.arrayVal,endStates:{comma:"arrayVal",closeBracket:"expectBinOp"}},ternaryMid:{subHandler:Mt.ternaryMid,endStates:{colon:"ternaryEnd"}},ternaryEnd:{subHandler:Mt.ternaryEnd,completable:!0}}});var lx=b((RX,cx)=>{"use strict";var sx=On(),jj=sx(Ri()),Fj=sx(Mi()),Lj=lm(),wc=ux().states,Nj=function(){function e(t,r,n){(0,jj.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,Fj.default)(e,[{key:"addToken",value:function(r){if(this._state==="complete")throw new Error("Cannot add a new token to a completed Parser");var n=wc[this._state],i=this._exprStr;if(this._exprStr+=r.raw,n.subHandler){this._subParser||this._startSubExpression(i);var o=this._subParser.addToken(r);if(o){if(this._endSubExpression(),this._parentStop)return o;this._state=o}}else if(n.tokenTypes[r.type]){var a=n.tokenTypes[r.type],u=Lj[r.type];a.handler&&(u=a.handler),u&&u.call(this,r),a.toState&&(this._state=a.toState)}else{if(this._stopMap[r.type])return this._stopMap[r.type];throw new Error("Token ".concat(r.raw," (").concat(r.type,") unexpected in expression: ").concat(this._exprStr))}return!1}},{key:"addTokens",value:function(r){r.forEach(this.addToken,this)}},{key:"complete",value:function(){if(this._cursor&&!wc[this._state].completable)throw new Error("Unexpected end of expression: ".concat(this._exprStr));return this._subParser&&this._endSubExpression(),this._state="complete",this._cursor?this._tree:null}},{key:"isRelative",value:function(){return this._relative}},{key:"_endSubExpression",value:function(){wc[this._state].subHandler.call(this,this._subParser.complete()),this._subParser=null}},{key:"_placeAtCursor",value:function(r){this._cursor?(this._cursor.right=r,this._setParent(r,this._cursor)):this._tree=r,this._cursor=r}},{key:"_placeBeforeCursor",value:function(r){this._cursor=this._cursor._parent,this._placeAtCursor(r)}},{key:"_setParent",value:function(r,n){Object.defineProperty(r,"_parent",{value:n,writable:!0})}},{key:"_startSubExpression",value:function(r){var n=wc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();cx.exports=Nj});var px=b((MX,dx)=>{"use strict";var fx=On(),Dj=fx(Ri()),zj=fx(Mi()),En=function(){function e(t){(0,Dj.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,zj.default)(e,[{key:"catch",value:function(r){if(this.error)try{this._resolve(r(this.error))}catch(n){this._reject(n)}return this}},{key:"then",value:function(r,n){if(!this.error)try{this._resolve(r(this.value))}catch(i){this._reject(i)}return n&&this.catch(n),this}},{key:"_reject",value:function(r){this.value=void 0,this.error=r}},{key:"_resolve",value:function(r){r instanceof e?r.error?this._reject(r.error):this._resolve(r.value):(this.value=r,this.error=void 0)}}]),e}();En.all=function(e){return new En(function(t){var r=e.map(function(n){for(;n instanceof En;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};En.resolve=function(e){return new En(function(t){return t(e)})};En.reject=function(e){return new En(function(t,r){return r(e)})};dx.exports=En});var vx=b((kX,mx)=>{"use strict";var hx=On(),Bj=hx(Ri()),Uj=hx(Mi()),Wj=tx(),Hj=ox(),Vj=lx(),Gj=px(),$j=function(){function e(t,r){(0,Bj.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,Uj.default)(e,[{key:"compile",value:function(){var r=new Hj(this._grammar),n=new Vj(this._grammar),i=r.tokenize(this._exprStr);return n.addTokens(i),this._ast=n.complete(),this}},{key:"eval",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._eval(r,Promise)}},{key:"evalSync",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=this._eval(r,Gj);if(n.error)throw n.error;return n.value}},{key:"_eval",value:function(r,n){var i=this;return n.resolve().then(function(){var o=i._getAst(),a=new Wj(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();mx.exports=$j});var bx=b(gx=>{"use strict";gx.getGrammar=function(){return{elements:{".":{type:"dot"},"[":{type:"openBracket"},"]":{type:"closeBracket"},"|":{type:"pipe"},"{":{type:"openCurl"},"}":{type:"closeCurl"},":":{type:"colon"},",":{type:"comma"},"(":{type:"openParen"},")":{type:"closeParen"},"?":{type:"question"},"+":{type:"binaryOp",precedence:30,eval:function(t,r){return t+r}},"-":{type:"binaryOp",precedence:30,eval:function(t,r){return t-r}},"*":{type:"binaryOp",precedence:40,eval:function(t,r){return t*r}},"/":{type:"binaryOp",precedence:40,eval:function(t,r){return t/r}},"//":{type:"binaryOp",precedence:40,eval:function(t,r){return Math.floor(t/r)}},"%":{type:"binaryOp",precedence:50,eval:function(t,r){return t%r}},"^":{type:"binaryOp",precedence:50,eval:function(t,r){return Math.pow(t,r)}},"==":{type:"binaryOp",precedence:20,eval:function(t,r){return t==r}},"!=":{type:"binaryOp",precedence:20,eval:function(t,r){return t!=r}},">":{type:"binaryOp",precedence:20,eval:function(t,r){return t>r}},">=":{type:"binaryOp",precedence:20,eval:function(t,r){return t>=r}},"<":{type:"binaryOp",precedence:20,eval:function(t,r){return t<r}},"<=":{type:"binaryOp",precedence:20,eval:function(t,r){return t<=r}},"&&":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n&&r.eval()})}},"||":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n||r.eval()})}},in:{type:"binaryOp",precedence:20,eval:function(t,r){return typeof r=="string"?r.indexOf(t)!==-1:Array.isArray(r)?r.some(function(n){return n===t}):!1}},"!":{type:"unaryOp",precedence:1/0,eval:function(t){return!t}}},functions:{},transforms:{}}}});var yx=b((qX,dm)=>{"use strict";var fm=On(),Kj=fm(H1()),Yj=fm(Ri()),Zj=fm(Mi()),Jj=vx(),Xj=bx(),Qj=Xj.getGrammar,_x=function(){function e(){(0,Yj.default)(this,e),this.expr=this.expr.bind(this),this._grammar=Qj()}return(0,Zj.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,Kj.default)({type:"binaryOp",precedence:n},o?"evalOnDemand":"eval",i))}},{key:"addFunction",value:function(r,n){this._grammar.functions[r]=n}},{key:"addFunctions",value:function(r){for(var n in r)this._grammar.functions[n]=r[n]}},{key:"addUnaryOp",value:function(r,n){this._addGrammarElement(r,{type:"unaryOp",weight:1/0,eval:n})}},{key:"addTransform",value:function(r,n){this._grammar.transforms[r]=n}},{key:"addTransforms",value:function(r){for(var n in r)this._grammar.transforms[n]=r[n]}},{key:"compile",value:function(r){var n=this.createExpression(r);return n.compile()}},{key:"createExpression",value:function(r){return new Jj(this._grammar,r)}},{key:"getFunction",value:function(r){return this._grammar.functions[r]}},{key:"getTransform",value:function(r){return this._grammar.transforms[r]}},{key:"eval",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.eval(n)}},{key:"evalSync",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.evalSync(n)}},{key:"expr",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a=r.reduce(function(u,l,s){var c=s<i.length?i[s]:"";return u+=l+c,u},"");return this.createExpression(a)}},{key:"removeOp",value:function(r){this._grammar.elements[r]&&(this._grammar.elements[r].type==="binaryOp"||this._grammar.elements[r].type==="unaryOp")&&delete this._grammar.elements[r]}},{key:"_addGrammarElement",value:function(r,n){this._grammar.elements[r]=n}}]),e}();dm.exports=new _x;dm.exports.Jexl=_x});var wx=b(yu=>{"use strict";var e2=yu&&yu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yu,"__esModule",{value:!0});yu.default=r2;var t2=e2(yx());function r2(){let e=new t2.default.Jexl;return e.addFunction("get",(t,r)=>t.get(r)),e.addFunction("parent",t=>t.parent()),e.addFunction("id",t=>t.id()),e.addFunction("cast",t=>t),e.addFunction("log",t=>(console.log(t),t)),e.addFunction("max",Math.max),e.addFunction("min",Math.min),e.addFunction("sqrt",Math.sqrt),e.addFunction("ceil",Math.ceil),e.addFunction("floor",Math.floor),e.addFunction("round",Math.round),e.addFunction("abs",Math.abs),e.addFunction("log10",Math.log10),e.addFunction("parseInt",Number.parseInt),e.addFunction("parseFloat",Number.parseFloat),e.addFunction("split",(t,r)=>t.split(r)),e.addFunction("charAt",(t,r)=>t.charAt(r)),e.addFunction("charCodeAt",(t,r)=>t.charCodeAt(r)),e.addFunction("codePointAt",(t,r)=>t.codePointAt(r)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("endsWith",(t,r,n)=>t.endsWith(r,n)),e.addFunction("padEnd",(t,r,n)=>t.padEnd(r,n)),e.addFunction("padStart",(t,r,n)=>t.padStart(r,n)),e.addFunction("repeat",(t,r)=>t.repeat(r)),e.addFunction("replace",(t,r,n)=>t.replace(r,n)),e.addFunction("replaceAll",(t,r,n)=>t.replaceAll(r,n)),e.addFunction("slice",(t,r,n)=>t.slice(r,n)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("substring",(t,r,n)=>t.substring(r,n)),e.addFunction("toLowerCase",t=>t.toLowerCase()),e.addFunction("toUpperCase",t=>t.toUpperCase()),e.addFunction("jsonParse",t=>JSON.parse(t)),e.addFunction("trim",t=>t.trim()),e.addFunction("trimEnd",t=>t.trimEnd()),e.addFunction("trimStart",t=>t.trimStart()),e.addFunction("getTag",(t,r)=>{let n=t.get("tags");return n?n[r]:t.get(r)}),e.addBinaryOp("&",15,(t,r)=>t&r),e}});var hm=b(wu=>{"use strict";var n2=wu&&wu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wu,"__esModule",{value:!0});wu.stringToJexlExpression=o2;var i2=n2(wx()),pm={};function o2(e,t){let r=`nosig|${e}`;if(!pm[r]){if(!e.startsWith("jexl:"))throw new Error("string does not appear to be in jexl format");let i=e.split("jexl:")[1],o=t?t.compile(i):(0,i2.default)().compile(i);pm[r]=o}return pm[r]}});var xx=b(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.nanoid=kt.customAlphabet=kt.customRandom=kt.random=kt.urlAlphabet=void 0;kt.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var a2=e=>crypto.getRandomValues(new Uint8Array(e));kt.random=a2;var u2=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return(o=t)=>{let a="";for(;;){let u=r(i),l=i;for(;l--;)if(a+=e[u[l]&n]||"",a.length===o)return a}}};kt.customRandom=u2;var s2=(e,t=21)=>(0,kt.customRandom)(e,t,kt.random);kt.customAlphabet=s2;var c2=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");kt.nanoid=c2});var mm=b(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.FileLocation=je.UriLocation=je.UriLocationRaw=je.BlobLocation=je.LocalPathLocation=je.Region=je.NoAssemblyRegion=je.ElementId=void 0;var ve=vt(),l2=xx();je.ElementId=ve.types.optional(ve.types.identifier,()=>(0,l2.nanoid)());je.NoAssemblyRegion=ve.types.model("NoAssemblyRegion",{refName:ve.types.string,start:ve.types.number,end:ve.types.number,reversed:ve.types.optional(ve.types.boolean,!1)}).actions(e=>({setRefName(t){e.refName=t}}));je.Region=ve.types.compose("Region",je.NoAssemblyRegion,ve.types.model({assemblyName:ve.types.string}));je.LocalPathLocation=ve.types.model("LocalPathLocation",{locationType:ve.types.literal("LocalPathLocation"),localPath:ve.types.string});je.BlobLocation=ve.types.model("BlobLocation",{locationType:ve.types.literal("BlobLocation"),name:ve.types.string,blobId:ve.types.string});je.UriLocationRaw=ve.types.model("UriLocation",{locationType:ve.types.literal("UriLocation"),uri:ve.types.string,baseUri:ve.types.maybe(ve.types.string),internetAccountId:ve.types.maybe(ve.types.string),internetAccountPreAuthorization:ve.types.maybe(ve.types.model("InternetAccountPreAuthorization",{internetAccountType:ve.types.string,authInfo:ve.types.frozen()}))});je.UriLocation=ve.types.snapshotProcessor(je.UriLocationRaw,{postProcessor:e=>{let{baseUri:t,...r}=e;return t?e:r}});je.FileLocation=ve.types.snapshotProcessor(ve.types.union(je.LocalPathLocation,je.UriLocation,je.BlobLocation),{preProcessor(e){if(!e)return;let{locationType:t,...r}=e;if(!t){let{uri:n,localPath:i,blob:o}=r,a="";return n!==void 0?a="UriLocation":i!==void 0?a="LocalPathLocation":o!==void 0&&(a="BlobLocation"),{...r,locationType:a}}return e}})});var Ax=b(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});gm.default=b2;var ke=vt(),f2=xo(),d2=hm(),p2=mm();function h2(){return!0}var m2={stringArray:ke.types.array(ke.types.string),stringArrayMap:ke.types.map(ke.types.array(ke.types.string)),numberMap:ke.types.map(ke.types.number),boolean:ke.types.boolean,color:ke.types.refinement("Color",ke.types.string,h2),integer:ke.types.integer,number:ke.types.number,string:ke.types.string,text:ke.types.string,fileLocation:p2.FileLocation,frozen:ke.types.frozen()},Sx={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},vm=e=>({views:{get valueJSON(){return e.value}}}),Ox=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),Ex={fileLocation:Ox,number:vm,integer:vm,boolean:vm,frozen:Ox,stringArray:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t){e.value.push(t)},removeAtIndex(t){e.value.splice(t,1)},setAtIndex(t,r){e.value[t]=r}}}),stringArrayMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)},addToKey(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.push(r)},removeAtKeyIndex(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.splice(r,1)},setAtKeyIndex(t,r,n){let i=e.value.get(t);if(!i)throw new Error(`${t} not found`);i[r]=n}}}),numberMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)}}})},v2=ke.types.refinement("JexlString",ke.types.string,e=>e.startsWith("jexl:"));function g2(e){return e?.toJSON?e.toJSON():`"${e}"`}function b2(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=m2[n]),!r)throw new Error(`no builtin config slot type "${n}", and no 'model' param provided`);if(i===void 0)throw new Error("no 'defaultValue' provided");let a=`${e.charAt(0).toUpperCase()}${e.slice(1)}ConfigSlot`,u=ke.types.model(a,{name:ke.types.literal(e),description:ke.types.literal(t),type:ke.types.literal(n),value:ke.types.optional(ke.types.union(v2,r),i)}).volatile(()=>({contextVariable:o})).views(c=>({get isCallback(){return String(c.value).startsWith("jexl:")}})).views(c=>({get expr(){if(c.isCallback){let{pluginManager:d}=(0,f2.getEnv)(c);return!d&&typeof jest>"u"&&console.warn("no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)"),(0,d2.stringToJexlExpression)(String(c.value),d?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return g2(c.value)}})).preProcessSnapshot(c=>typeof c=="object"&&c.name===e?c:{name:e,description:t,type:n,value:c}).postProcessSnapshot(c=>typeof c.value=="object"?JSON.stringify(c.value)!==JSON.stringify(i)?c.value:void 0:c.value!==i?c.value:void 0).actions(c=>({set(d){c.value=d},reset(){c.value=i},convertToCallback(){c.isCallback||(c.value=`jexl:${c.valueJSON||"''"}`)},convertToValue(){if(c.isCallback){try{let d=c.expr.evalSync();if(d!==void 0){c.value=d;return}}catch{}if(c.value=i,!(n in Sx))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=Sx[n]}}}));Ex[n]&&(u=u.extend(Ex[n]));let s=ke.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var Px=b(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.getSubType=bm;Tn.getUnionSubTypes=Tx;Tn.getPropertyType=_2;Tn.getDefaultValue=y2;Tn.getEnumerationValues=w2;Tn.resolveLateType=x2;var An=vt();function bm(e){let t;if((0,An.isOptionalType)(e))t=e._subtype||e.type;else if((0,An.isArrayType)(e)||(0,An.isMapType)(e))t=e._subtype||e._subType||e.subType;else{if(typeof e.getSubType=="function")return e.getSubType();throw new TypeError("unsupported mst type")}if(!t)throw new Error("failed to get subtype");return t}function Tx(e){if(!(0,An.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||bm(e)._types||bm(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function _2(e,t){return e.properties[t]}function y2(e){if(!(0,An.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function w2(e){return Tx(e).map(r=>r.value)}function x2(e){return!(0,An.isUnionType)(e)&&!(0,An.isArrayType)(e)&&(0,An.isLateType)(e)?e.getSubType():e}});var _m=b(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.readConfObject=xc;rn.getConf=S2;rn.getTypeNamesFromExplicitlyTypedUnion=Rx;rn.isBareConfigurationSchemaType=Mx;rn.isConfigurationSchemaType=So;rn.isConfigurationModel=kx;rn.isConfigurationSlotType=O2;var Ue=vt(),Pn=Px();function xc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Ue.isStateTreeNode)(e)&&(0,Ue.isMapType)((0,Ue.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Ue.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Ue.getSnapshot)(i))):i}else return}else if(Array.isArray(t)){let n=t[0];if(t.length>1){let i=t.slice(1),o=e[n];return!o&&(0,Ue.isStateTreeNode)(e)&&(0,Ue.isMapType)((0,Ue.getType)(e))&&(o=e.get(n)),o?xc(o,i,r):void 0}return xc(e,n,r)}}else return structuredClone((0,Ue.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function S2(e,t,r){let{configuration:n}=e;if(kx(n))return xc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function Rx(e){if((0,Ue.isType)(e)&&(e=(0,Pn.resolveLateType)(e),(0,Ue.isUnionType)(e))){let t=[];return(0,Pn.getUnionSubTypes)(e).forEach(r=>{r=(0,Pn.resolveLateType)(r);let n=Rx(r);if(n.length||(n=[(0,Pn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}),t}return[]}function Mx(e){return!!((0,Ue.isType)(e)&&((0,Ue.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Ue.isLateType)(e)))}function So(e){return(0,Ue.isType)(e)?Mx(e)?!0:(0,Ue.isUnionType)(e)?(0,Pn.getUnionSubTypes)(e).every(t=>So(t)||t.name==="undefined"):(0,Ue.isOptionalType)(e)&&So((0,Pn.getSubType)(e))||(0,Ue.isArrayType)(e)&&So((0,Pn.getSubType)(e))?!0:!!((0,Ue.isMapType)(e)&&So((0,Pn.getSubType)(e))):!1}function kx(e){return(0,Ue.isStateTreeNode)(e)&&So((0,Ue.getType)(e))}function O2(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var Ix=b(Oo=>{"use strict";var E2=Oo&&Oo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.ConfigurationSchema=k2;Oo.ConfigurationReference=C2;var Jt=vt(),A2=E2(Ax()),Cx=_m(),qx=mm();function T2(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function P2(e){return Array.isArray(e)&&e.length===0}function R2(e,t,r={}){var n;if(typeof e!="string")throw new Error("first arg must be string name of the model that this config schema goes with");let i=t,o=r;return!((n=r.baseConfiguration)===null||n===void 0)&&n.jbrowseSchemaDefinition&&(i={...r.baseConfiguration.jbrowseSchemaDefinition,...i},o={...r.baseConfiguration.jbrowseSchemaOptions,...r},o.baseConfiguration=void 0),{schemaDefinition:i,options:o}}function M2(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Jt.types.optional(Jt.types.literal(e),e)),r.explicitIdentifier&&r.implicitIdentifier)throw new Error(`Cannot have both explicit and implicit identifiers in ${e}`);r.explicitIdentifier?typeof r.explicitIdentifier=="string"?(n[r.explicitIdentifier]=Jt.types.identifier,i=r.explicitIdentifier):(n.id=Jt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=qx.ElementId,i=r.implicitIdentifier):(n.id=qx.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach(([c,d])=>{if((0,Jt.isType)(d)&&(0,Jt.isLateType)(d)||(0,Cx.isConfigurationSchemaType)(d))n[c]=d;else if(typeof d=="string"||typeof d=="number")o[c]=d;else if(typeof d=="object"){if(!d.type)throw new Error(`no type set for config slot ${e}.${c}`);try{n[c]=(0,A2.default)(c,d)}catch(f){throw new Error(`invalid config slot definition for ${e}.${c}: ${f}`)}}else throw new Error(`invalid configuration schema definition, "${c}" must be either a valid configuration slot definition, a constant, or a nested configuration schema`)});let a=Jt.types.model(`${e}ConfigurationSchema`,n).actions(c=>({setSubschema(d,f){if(!(0,Cx.isConfigurationSchemaType)(n[d]))throw new Error(`${d} is not a subschema, cannot replace`);let p=(0,Jt.isStateTreeNode)(f)?f:n[d].create(f);return c[d]=p,p}}));Object.keys(o).length&&(a=a.volatile(()=>o)),r.actions&&(a=a.actions(r.actions)),r.views&&(a=a.views(r.views)),r.extend&&(a=a.extend(r.extend));let u=i?{[i]:"placeholderId"}:{},l=r.explicitlyTyped?{type:e,...u}:u,s=(0,Jt.getSnapshot)(a.create(l));return a=a.postProcessSnapshot(c=>{let d={},f=!0;for(let[p,h]of Object.entries(c))f&&(typeof s[p]=="object"&&typeof h=="object"?JSON.stringify(s[p])!==JSON.stringify(h)&&(f=!1):s[p]!==h&&(f=!1)),h!==void 0&&o[p]===void 0&&!T2(h)&&!P2(h)&&(d[p]=h);return f?{}:d}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Jt.types.optional(a,l)}function k2(e,t,r){let{schemaDefinition:n,options:i}=R2(e,t,r),o=M2(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function C2(e){return Jt.types.union(Jt.types.reference(e),e)}});var ym=b(mr=>{"use strict";var q2=mr&&mr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),I2=mr&&mr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&q2(t,e,r)};Object.defineProperty(mr,"__esModule",{value:!0});mr.ConfigurationSchema=mr.ConfigurationReference=void 0;var jx=Ix();Object.defineProperty(mr,"ConfigurationReference",{enumerable:!0,get:function(){return jx.ConfigurationReference}});Object.defineProperty(mr,"ConfigurationSchema",{enumerable:!0,get:function(){return jx.ConfigurationSchema}});I2(_m(),mr)});var Fx=b(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var wm=class extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if(typeof this.onEviction=="function")for(let[r,n]of t)this.onEviction(r,n.value)}_deleteIfExpired(t,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(t,r.value),this.delete(t)):!1}_getOrDeleteIfExpired(t,r){if(!this._deleteIfExpired(t,r))return r.value}_getItemValue(t,r){return r.expiry?this._getOrDeleteIfExpired(t,r):r.value}_peek(t,r){let n=r.get(t);return this._getItemValue(t,n)}_set(t,r){this.cache.set(t,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,r){this.oldCache.delete(t),this._set(t,r)}*_entriesAscending(){for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield t)}for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield t)}}get(t){if(this.cache.has(t)){let r=this.cache.get(t);return this._getItemValue(t,r)}if(this.oldCache.has(t)){let r=this.oldCache.get(t);if(!this._deleteIfExpired(t,r))return this._moveToRecent(t,r),r.value}}set(t,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(t)?this.cache.set(t,{value:r,expiry:i}):this._set(t,{value:r,expiry:i})}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):this.oldCache.has(t)?!this._deleteIfExpired(t,this.oldCache.get(t)):!1}peek(t){if(this.cache.has(t))return this._peek(t,this.cache);if(this.oldCache.has(t))return this._peek(t,this.oldCache)}delete(t){let r=this.cache.delete(t);return r&&this._size--,this.oldCache.delete(t)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-t;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(let[t]of this)yield t}*values(){for(let[,t]of this)yield t}*[Symbol.iterator](){for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield[r,n.value])}for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield[r,n.value])}}*entriesDescending(){let t=[...this.cache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this._deleteIfExpired(i,o)||(yield[i,o.value])}t=[...this.oldCache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this.cache.has(i)||this._deleteIfExpired(i,o)||(yield[i,o.value])}}*entriesAscending(){for(let[t,r]of this._entriesAscending())yield[t,r.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(let r of this.oldCache.keys())this.cache.has(r)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,r=this){for(let[n,i]of this.entriesAscending())t.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};xm.default=wm});var Lx=b(xu=>{"use strict";var j2=xu&&xu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xu,"__esModule",{value:!0});var Sm=ym(),F2=j2(Fx()),Om=class{constructor(t){this.pluginManager=t,this.adapterCache=new F2.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,Sm.readConfObject)(r,"textSearchAdapterId"),i=this.adapterCache.get(n);if(i)return i;{let a=await this.pluginManager.getTextSearchAdapterType(r.type).getAdapterClass(),u=new a(r,void 0,this.pluginManager);return this.adapterCache.set(n,u),u}}))}relevantAdapters(t){let r=this.pluginManager.rootModel,{aggregateTextSearchAdapters:n}=r?.jbrowse,{tracks:i}=r?.session,{assemblyName:o}=t;return[...this.getAdaptersWithAssembly(o,n),...this.getTrackAdaptersWithAssembly(o,i)]}getAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Sm.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Sm.readConfObject)(n,["textSearching","textSearchAdapter","assemblyNames"]))===null||i===void 0?void 0:i.includes(t)}).map(n=>n.textSearching.textSearchAdapter)}async search(t,r,n){let i=await this.loadTextSearchAdapters(r),o=await Promise.all(i.map(a=>a.searchIndex(t)));return this.sortResults(o.flat(),n)}sortResults(t,r){return r(t.sort((n,i)=>-i.getLabel().localeCompare(n.getLabel()))).sort((n,i)=>n.getScore()-i.getScore())}};xu.default=Om});var Sc=b(se=>{"use strict";var L2=se&&se.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),N2=se&&se.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&L2(t,e,r)},D2=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(se,"__esModule",{value:!0});se.TextSearchManager=se.RetryError=se.AuthNeededError=void 0;se.isViewContainer=B2;se.isSessionModel=Rn;se.isSessionModelWithConfigEditing=U2;se.isSessionWithAddTracks=W2;se.isSessionWithShareURL=H2;se.isSessionModelWithWidgets=V2;se.isSessionModelWithConnections=G2;se.isSessionModelWithConnectionEditing=$2;se.isSessionWithSessionPlugins=K2;se.isSelectionContainer=Y2;se.isViewModel=Z2;se.isTrackModel=J2;se.isDisplayModel=X2;se.isTrackViewModel=Q2;se.isAppRootModel=eF;se.isRootModelWithInternetAccounts=tF;se.isAbstractMenuManager=rF;se.isUriLocation=nF;se.isLocalPathLocation=iF;se.isBlobLocation=oF;se.isAuthNeededException=aF;se.isRetryException=uF;var z2=vt();N2(B1(),se);function B2(e){return(0,z2.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function Rn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function U2(e){return Rn(e)&&"editConfiguration"in e}function W2(e){return Rn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function H2(e){return Rn(e)&&"shareURL"in e&&!!e.shareURL}function V2(e){return Rn(e)&&"widgets"in e}function G2(e){return Rn(e)&&"makeConnection"in e}function $2(e){return Rn(e)&&"addConnectionConf"in e}function K2(e){return Rn(e)&&"sessionPlugins"in e}function Y2(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function Z2(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function J2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function X2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function Q2(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function eF(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function tF(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function rF(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function nF(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function iF(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function oF(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var Em=class e extends Error{constructor(t,r){super(t),this.message=t,this.url=r,this.name="AuthNeededError",Object.setPrototypeOf(this,e.prototype)}};se.AuthNeededError=Em;var Am=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};se.RetryError=Am;function aF(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function uF(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var sF=Lx();Object.defineProperty(se,"TextSearchManager",{enumerable:!0,get:function(){return D2(sF).default}})});var Oc=b((GX,Nx)=>{Nx.exports=JBrowseExports.mobx});var Dx=b(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.when=void 0;var cF=Oc();Object.defineProperty(Ec,"when",{enumerable:!0,get:function(){return cF.when}})});var zx=b(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.intersection2=lF;Su.doesIntersect2=fF;Su.isContainedWithin=dF;function lF(e,t,r,n){return t>r&&e<n&&n-r&&t-e?e>r?t<n?[e,t]:[e,n]:t<n?[r,t]:[r,n]:[]}function fF(e,t,r,n){return t>r&&e<n}function dF(e,t,r,n){return r<=e&&n>=t}});var Bx=b(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.dedupe=pF;function pF(e,t=JSON.stringify){let r=[],n=new Set;for(let i of e){let o=t(i);n.has(o)||(r.push(i),n.add(o))}return r}});var km=b((ZX,Vx)=>{"use strict";var Ac={},Rc={},Ou={METHOD:"method",PROPERTY:"property"},Tc=class{constructor(t,r){this.inst=t,this.args=r}},Pm=class extends Tc{constructor(t,r){super(t,r),this.type=Ou.METHOD}execute(t){t[this.inst](...this.args)}},Rm=class extends Tc{constructor(t,r){super(t,r),this.type=Ou.PROPERTY}execute(t){t[this.inst]=this.args[0]}},hF={[Ou.METHOD]:Pm,[Ou.PROPERTY]:Rm},Pc=class{constructor(t,r,n){return new hF[t](r,n)}};Object.entries(Ou).forEach(([e,t])=>{Object.defineProperty(Pc,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});Rc=Pc;var Wx=Object.freeze({METHODS:["addHitRegion","arc","arcTo","beginPath","bezierCurveTo","clearHitRegions","clearRect","clip","closePath","drawFocusIfNeeded","drawImage","ellipse","fill","fillRect","fillText","lineTo","moveTo","putImageData","quadraticCurveTo","rect","removeHitRegion","resetTransform","restore","rotate","save","scale","scrollPathIntoView","setLineDash","setTransform","stroke","strokeRect","strokeText","transform","translate"],PROPERTIES:["direction","fillStyle","filter","font","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","imageSmoothingQuality","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline"]}),Fr=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push"),fromJSON:Symbol.for("fromJSON")}),Eu=class{constructor(t=null){this[Fr.sequence]=[],t&&this[Fr.fromJSON](t)}[Fr.fromJSON](t={sequence:[]}){t.sequence.forEach(({type:r,inst:n,args:i})=>{this[Fr.push](r,n,i)})}[Fr.push](t,r,n){this[Fr.sequence].push(new Rc(t,r,n))}execute(t){t.save(),this[Fr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[Fr.sequence]}}};Wx.METHODS.forEach(e=>{Object.defineProperty(Eu.prototype,e,{value:function(...r){this[Fr.push](Rc.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});Wx.PROPERTIES.forEach(e=>{Object.defineProperty(Eu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[Fr.push](Rc.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});Ac=Eu;var Hx={},Ux=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function mF(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var Mm=class extends Ac{build(t={}){let r=new Ac;return this[Ux.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?mF(u,t):u);r[Ux.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};Hx=Mm;Vx.exports={CanvasSequence:Ac,CanvasBlueprint:Hx}});var $x=b((JX,Gx)=>{Gx.exports=!1});var Cm=b(lt=>{"use strict";var vF=lt&&lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lt,"__esModule",{value:!0});lt.ImageBitmapType=lt.createImageBitmap=lt.createCanvas=void 0;lt.drawImageOntoCanvasContext=bF;var Yx=km(),gF=vF($x());function bF(e,t){e.serializedCommands?new Yx.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var Kx={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:gF.default};Kx.realOffscreenCanvas?(lt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),lt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,lt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):Kx.node?(lt.createCanvas=(...e)=>nodeCreateCanvas(...e),lt.createImageBitmap=async e=>{let t=e.toDataURL(),r=new nodeImage;return new Promise((n,i)=>{r.onload=()=>{n(r)},r.onerror=i,r.src=t})}):(lt.createCanvas=(e,t)=>{let r=new Yx.CanvasSequence;return{width:e,height:t,getContext(){return r}}},lt.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},lt.ImageBitmapType=String)});var Im=b(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.blobToDataURL=_F;function _F(e){let t=new FileReader;return new Promise((r,n)=>{t.onload=i=>{i.target?r(i.target.result):n(new Error("unknown result reading blob from canvas"))},t.readAsDataURL(e)})}});var Zx=b((eQ,Mc)=>{(function(){"use strict";var e,t,r,n,i;function o(d,f){var p=Object.keys(f),h;for(h=0;h<p.length;h++)d=d.replace(new RegExp("\\{"+p[h]+"\\}","gi"),f[p[h]]);return d}function a(d){var f,p,h;if(!d)throw new Error("cannot create a random attribute name for an undefined object");f="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",p="";do for(p="",h=0;h<12;h++)p+=f[Math.floor(Math.random()*f.length)];while(d[p]);return p}function u(d,f){var p,h,m={},g,_;for(d=d.split(","),f=f||10,p=0;p<d.length;p+=2)h="&"+d[p+1]+";",g=parseInt(d[p],f),m[h]="&#"+g+";";return m["\\xa0"]="&#160;",m}function l(d){var f={left:"start",right:"end",center:"middle",start:"start",end:"end"};return f[d]||f.start}function s(d){var f={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return f[d]||f.alphabetic}i=u("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),e={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"}},r=function(d,f){this.__root=d,this.__ctx=f},r.prototype.addColorStop=function(d,f){var p=this.__ctx.__createElement("stop"),h,m;p.setAttribute("offset",d),f.indexOf("rgba")!==-1?(h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,m=h.exec(f),p.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:m[1],g:m[2],b:m[3]})),p.setAttribute("stop-opacity",m[4])):p.setAttribute("stop-color",f),this.__root.appendChild(p)},n=function(d,f){this.__root=d,this.__ctx=f},t=function(d){var f={width:500,height:500,enableMirroring:!1},p;if(arguments.length>1?(p=f,p.width=arguments[0],p.height=arguments[1]):d?p=d:p=f,!(this instanceof t))return new t(p);this.width=p.width||f.width,this.height=p.height||f.height,this.enableMirroring=p.enableMirroring!==void 0?p.enableMirroring:f.enableMirroring,this.canvas=this,this.__document=p.document||document,this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__root.setAttribute("version",1.1),this.__root.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__root.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__root.setAttribute("width",this.width),this.__root.setAttribute("height",this.height),this.__ids={},this.__defs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__root.appendChild(this.__currentElement)},t.prototype.__createElement=function(d,f,p){typeof f>"u"&&(f={});var h=this.__document.createElementNS("http://www.w3.org/2000/svg",d),m=Object.keys(f),g,_;for(p&&(h.setAttribute("fill","none"),h.setAttribute("stroke","none")),g=0;g<m.length;g++)_=m[g],h.setAttribute(_,f[_]);return h},t.prototype.__setDefaultStyles=function(){var d=Object.keys(e),f,p;for(f=0;f<d.length;f++)p=d[f],this[p]=e[p].canvas},t.prototype.__applyStyleState=function(d){var f=Object.keys(d),p,h;for(p=0;p<f.length;p++)h=f[p],this[h]=d[h]},t.prototype.__getStyleState=function(){var d,f={},p=Object.keys(e),h;for(d=0;d<p.length;d++)h=p[d],f[h]=this[h];return f},t.prototype.__applyStyleToCurrentElement=function(d){var f=Object.keys(e),p,h,m,g,_,w;for(p=0;p<f.length;p++)if(h=e[f[p]],m=this[f[p]],h.apply)if(h.apply.indexOf("fill")!==-1&&m instanceof n){if(m.__ctx)for(;m.__ctx.__defs.childNodes.length;)g=m.__ctx.__defs.childNodes[0].getAttribute("id"),this.__ids[g]=g,this.__defs.appendChild(m.__ctx.__defs.childNodes[0]);this.__currentElement.setAttribute("fill",o("url(#{id})",{id:m.__root.getAttribute("id")}))}else h.apply.indexOf("fill")!==-1&&m instanceof r?this.__currentElement.setAttribute("fill",o("url(#{id})",{id:m.__root.getAttribute("id")})):h.apply.indexOf(d)!==-1&&h.svg!==m&&((h.svgAttr==="stroke"||h.svgAttr==="fill")&&m.indexOf("rgba")!==-1?(_=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,w=_.exec(m),this.__currentElement.setAttribute(h.svgAttr,o("rgb({r},{g},{b})",{r:w[1],g:w[2],b:w[3]})),this.__currentElement.setAttribute(h.svgAttr+"-opacity",w[4])):this.__currentElement.setAttribute(h.svgAttr,m))},t.prototype.__closestGroupOrSvg=function(d){return d=d||this.__currentElement,d.nodeName==="g"||d.nodeName==="svg"?d:this.__closestGroupOrSvg(d.parentNode)},t.prototype.getSerializedSvg=function(d){var f=new XMLSerializer().serializeToString(this.__root),p,h,m,g,_,w;if(w=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,w.test(f)&&(f=f.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),d)for(p=Object.keys(i),h=0;h<p.length;h++)m=p[h],g=i[m],_=new RegExp(m,"gi"),_.test(f)&&(f=f.replace(_,g));return f},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var d=this.__createElement("g"),f=this.__closestGroupOrSvg();this.__groupStack.push(f),f.appendChild(d),this.__currentElement=d,this.__stack.push(this.__getStyleState())},t.prototype.restore=function(){this.__currentElement=this.__groupStack.pop();var d=this.__stack.pop();this.__applyStyleState(d)},t.prototype.__addTransform=function(d){var f=this.__closestGroupOrSvg();if(f.childNodes.length>0){var p=this.__createElement("g");f.appendChild(p),this.__currentElement=p}var h=this.__currentElement.getAttribute("transform");h?h+=" ":h="",h+=d,this.__currentElement.setAttribute("transform",h)},t.prototype.scale=function(d,f){f===void 0&&(f=d),this.__addTransform(o("scale({x},{y})",{x:d,y:f}))},t.prototype.rotate=function(d){var f=d*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:f,cx:0,cy:0}))},t.prototype.translate=function(d,f){this.__addTransform(o("translate({x},{y})",{x:d,y:f}))},t.prototype.transform=function(d,f,p,h,m,g){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:d,b:f,c:p,d:h,e:m,f:g}))},t.prototype.beginPath=function(){var d,f;this.__currentDefaultPath="",this.__currentPosition={},d=this.__createElement("path",{},!0),f=this.__closestGroupOrSvg(),f.appendChild(d),this.__currentElement=d},t.prototype.__applyCurrentDefaultPath=function(){if(this.__currentElement.nodeName==="path"){var d=this.__currentDefaultPath;this.__currentElement.setAttribute("d",d)}else throw new Error("Attempted to apply path command to node "+this.__currentElement.nodeName)},t.prototype.__addPathCommand=function(d){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=d},t.prototype.moveTo=function(d,f){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:d,y:f},this.__addPathCommand(o("M {x} {y}",{x:d,y:f}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(d,f){this.__currentPosition={x:d,y:f},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:d,y:f})):this.__addPathCommand(o("M {x} {y}",{x:d,y:f}))},t.prototype.bezierCurveTo=function(d,f,p,h,m,g){this.__currentPosition={x:m,y:g},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:d,cp1y:f,cp2x:p,cp2y:h,x:m,y:g}))},t.prototype.quadraticCurveTo=function(d,f,p,h){this.__currentPosition={x:p,y:h},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:d,cpy:f,x:p,y:h}))};var c=function(d){var f=Math.sqrt(d[0]*d[0]+d[1]*d[1]);return[d[0]/f,d[1]/f]};t.prototype.arcTo=function(d,f,p,h,m){var g=this.__currentPosition&&this.__currentPosition.x,_=this.__currentPosition&&this.__currentPosition.y;if(!(typeof g>"u"||typeof _>"u")){if(m<0)throw new Error("IndexSizeError: The radius provided ("+m+") is negative.");if(g===d&&_===f||d===p&&f===h||m===0){this.lineTo(d,f);return}var w=c([g-d,_-f]),y=c([p-d,h-f]);if(w[0]*y[1]===w[1]*y[0]){this.lineTo(d,f);return}var x=w[0]*y[0]+w[1]*y[1],O=Math.acos(Math.abs(x)),A=c([w[0]+y[0],w[1]+y[1]]),T=m/Math.sin(O/2),R=d+T*A[0],k=f+T*A[1],M=[-w[1],w[0]],P=[y[1],-y[0]],N=function(W){var j=W[0],D=W[1];return D>=0?Math.acos(j):-Math.acos(j)},C=N(M),I=N(P);this.lineTo(R+M[0]*m,k+M[1]*m),this.arc(R,k,m,C,I)}},t.prototype.stroke=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")},t.prototype.fill=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")},t.prototype.rect=function(d,f,p,h){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(d,f),this.lineTo(d+p,f),this.lineTo(d+p,f+h),this.lineTo(d,f+h),this.lineTo(d,f),this.closePath()},t.prototype.fillRect=function(d,f,p,h){var m,g;m=this.__createElement("rect",{x:d,y:f,width:p,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(d,f,p,h){var m,g;m=this.__createElement("rect",{x:d,y:f,width:p,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(d,f,p,h){var m,g=this.__closestGroupOrSvg();m=this.__createElement("rect",{x:d,y:f,width:p,height:h,fill:"#FFFFFF"},!0),g.appendChild(m)},t.prototype.createLinearGradient=function(d,f,p,h){var m=this.__createElement("linearGradient",{id:a(this.__ids),x1:d+"px",x2:p+"px",y1:f+"px",y2:h+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(m),new r(m,this)},t.prototype.createRadialGradient=function(d,f,p,h,m,g){var _=this.__createElement("radialGradient",{id:a(this.__ids),cx:h+"px",cy:m+"px",r:g+"px",fx:d+"px",fy:f+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(_),new r(_,this)},t.prototype.__parseFont=function(){var d=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\"\sa-z]+?)\s*$/i,f=d.exec(this.font),p={style:f[1]||"normal",size:f[4]||"10px",family:f[6]||"sans-serif",weight:f[3]||"normal",decoration:f[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(p.decoration="underline"),this.__fontHref&&(p.href=this.__fontHref),p},t.prototype.__wrapTextLink=function(d,f){if(d.href){var p=this.__createElement("a");return p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.href),p.appendChild(f),p}return f},t.prototype.__applyText=function(d,f,p,h){var m=this.__parseFont(),g=this.__closestGroupOrSvg(),_=this.__createElement("text",{"font-family":m.family,"font-size":m.size,"font-style":m.style,"font-weight":m.weight,"text-decoration":m.decoration,x:f,y:p,"text-anchor":l(this.textAlign),"dominant-baseline":s(this.textBaseline)},!0);_.appendChild(this.__document.createTextNode(d)),this.__currentElement=_,this.__applyStyleToCurrentElement(h),g.appendChild(this.__wrapTextLink(m,_))},t.prototype.fillText=function(d,f,p){this.__applyText(d,f,p,"fill")},t.prototype.strokeText=function(d,f,p){this.__applyText(d,f,p,"stroke")},t.prototype.measureText=function(d){return this.__ctx.font=this.font,this.__ctx.measureText(d)},t.prototype.arc=function(d,f,p,h,m,g){if(h!==m){h=h%(2*Math.PI),m=m%(2*Math.PI),h===m&&(m=(m+2*Math.PI-.001*(g?-1:1))%(2*Math.PI));var _=d+p*Math.cos(m),w=f+p*Math.sin(m),y=d+p*Math.cos(h),x=f+p*Math.sin(h),O=g?0:1,A=0,T=m-h;T<0&&(T+=2*Math.PI),g?A=T>Math.PI?0:1:A=T>Math.PI?1:0,this.lineTo(y,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:p,ry:p,xAxisRotation:0,largeArcFlag:A,sweepFlag:O,endX:_,endY:w})),this.__currentPosition={x:_,y:w}}},t.prototype.clip=function(){var d=this.__closestGroupOrSvg(),f=this.__createElement("clipPath"),p=a(this.__ids),h=this.__createElement("g");d.removeChild(this.__currentElement),f.setAttribute("id",p),f.appendChild(this.__currentElement),this.__defs.appendChild(f),d.setAttribute("clip-path",o("url(#{id})",{id:p})),d.appendChild(h),this.__currentElement=h},t.prototype.drawImage=function(){var d=Array.prototype.slice.call(arguments),f=d[0],p,h,m,g,_=0,w=0,y,x,O,A,T,R,k,M,P,N,C;if(d.length===3)p=d[1],h=d[2],y=f.width,x=f.height,m=y,g=x;else if(d.length===5)p=d[1],h=d[2],m=d[3],g=d[4],y=f.width,x=f.height;else if(d.length===9)_=d[1],w=d[2],y=d[3],x=d[4],p=d[5],h=d[6],m=d[7],g=d[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(O=this.__closestGroupOrSvg(),k=this.__currentElement,f instanceof t){for(A=f.getSvg(),T=A.childNodes[0];T.childNodes.length;)C=T.childNodes[0].getAttribute("id"),this.__ids[C]=C,this.__defs.appendChild(T.childNodes[0]);R=A.childNodes[1],O.appendChild(R),this.__currentElement=R,this.translate(p,h),this.__currentElement=k}else(f.nodeName==="CANVAS"||f.nodeName==="IMG")&&(M=this.__createElement("image"),M.setAttribute("width",m),M.setAttribute("height",g),M.setAttribute("preserveAspectRatio","none"),(_||w||y!==f.width||x!==f.height)&&(P=this.__document.createElement("canvas"),P.width=m,P.height=g,N=P.getContext("2d"),N.drawImage(f,_,w,y,x,0,0,m,g),f=P),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.nodeName==="CANVAS"?f.toDataURL():f.getAttribute("src")),O.appendChild(M),this.__currentElement=M,this.translate(p,h),this.__currentElement=k)},t.prototype.createPattern=function(d,f){var p=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),h=a(this.__ids),m;return p.setAttribute("id",h),p.setAttribute("width",d.width),p.setAttribute("height",d.height),d.nodeName==="CANVAS"||d.nodeName==="IMG"?(m=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),m.setAttribute("width",d.width),m.setAttribute("height",d.height),m.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.nodeName==="CANVAS"?d.toDataURL():d.getAttribute("src")),p.appendChild(m),this.__defs.appendChild(p)):d instanceof t&&(p.appendChild(d.__root.childNodes[1]),this.__defs.appendChild(p)),new n(p,this)},t.prototype.drawFocusRing=function(){},t.prototype.createImageData=function(){},t.prototype.getImageData=function(){},t.prototype.putImageData=function(){},t.prototype.globalCompositeOperation=function(){},t.prototype.setTransform=function(){},typeof window=="object"&&(window.C2S=t),typeof Mc=="object"&&typeof Mc.exports=="object"&&(Mc.exports=t)})()});var Qx=b(vr=>{"use strict";var yF=vr&&vr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),wF=vr&&vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xF=vr&&vr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&yF(r,t,n[i]);return wF(r,t),r}}();Object.defineProperty(vr,"__esModule",{value:!0});vr.renderToAbstractCanvas=EF;vr.getSerializedSvg=AF;vr.ReactRendering=TF;var Jx=Ua(),SF=Ye(),Xx=km(),OF=Im(),jm=Cm();async function EF(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,jm.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),reactElement:(0,Jx.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,OF.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new Xx.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,jm.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),imageData:await(0,jm.createImageBitmap)(u)}}}async function AF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>xF(Zx())),o=new i.default(t,r);return new Xx.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function TF({rendering:e}){return(0,SF.isValidElement)(e.reactElement)?e.reactElement:(0,Jx.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var tS=b(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.isFeature=PF;function PF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function eS(e){return"uniqueId"in e&&typeof e.data!="object"}var Fm=class e{constructor(t){var r;eS(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=eS(t)?t.uniqueId:t.id;if(n==null)throw new Error("SimpleFeature requires a unique `id` or `data.uniqueId` attribute");if(this.uniqueId=String(n),!(this.data.aliases||this.data.end-this.data.start>=0))throw new Error(`invalid feature data, end less than start. end: ${this.data.end} start: ${this.data.start}`);this.data.subfeatures&&(this.subfeatures=(r=this.data.subfeatures)===null||r===void 0?void 0:r.map((i,o)=>typeof i.get!="function"?new e({id:i.uniqueId||`${n}-${o}`,data:{strand:this.data.strand,...i},parent:this}):i))}get(t){return t==="subfeatures"?this.subfeatures:t==="parent"?this.parent():this.data[t]}set(t,r){this.data[t]=r}tags(){return Object.keys(this.data)}id(){return this.uniqueId}parent(){return this.parentHandle}children(){return this.get("subfeatures")}toJSON(){let t={...this.data,uniqueId:this.id()},r=this.parent();r&&(t.parentId=r.id());let n=this.children();return n&&(t.subfeatures=n.map(i=>i.toJSON())),t}static fromJSON(t){return new e({...t})}};kc.default=Fm});var we=b(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.isFunction=void 0;function RF(e){return typeof e=="function"}Cc.isFunction=RF});var Mn=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.createErrorClass=void 0;function MF(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}qc.createErrorClass=MF});var Lm=b(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.UnsubscriptionError=void 0;var kF=Mn();Ic.UnsubscriptionError=kF.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
1
+ "use strict";var JBrowsePluginMafViewer=(()=>{var YR=Object.create;var ns=Object.defineProperty;var ZR=Object.getOwnPropertyDescriptor;var JR=Object.getOwnPropertyNames;var XR=Object.getPrototypeOf,QR=Object.prototype.hasOwnProperty;var pt=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),np=(e,t)=>{for(var r in t)ns(e,r,{get:t[r],enumerable:!0})},Yg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JR(t))!QR.call(e,i)&&i!==r&&ns(e,i,{get:()=>t[i],enumerable:!(n=ZR(t,i))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?YR(XR(e)):{},Yg(t||!e||!e.__esModule?ns(r,"default",{value:e,enumerable:!0}):r,e)),Zg=e=>Yg(ns({},"__esModule",{value:!0}),e);var Xg=b((vY,Jg)=>{Jg.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Gr=b((bY,eb)=>{eb.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var ip=b(()=>{});var up=b(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});function tb(e){return(typeof e=="object"&&e!==null&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}var op=class{constructor(t,r={}){this.baseOverrides={},this.url=t;let n=r.fetch||globalThis.fetch.bind(globalThis);r.overrides&&(this.baseOverrides=r.overrides),this.fetchImplementation=n}async fetch(t,r){let n;try{n=await this.fetchImplementation(t,r)}catch(i){if(`${i}`.includes("Failed to fetch")){console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`);try{n=await this.fetchImplementation(t,{...r,cache:"reload"})}catch(o){throw new Error(`${tb(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${tb(i)} fetching ${t}`,{cause:i})}return n}async read(t,r,n={}){let{headers:i={},signal:o,overrides:a={}}=n;t<1/0?i.range=`bytes=${r}-${r+t}`:t===1/0&&r!==0&&(i.range=`bytes=${r}-`);let u=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...i,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:o});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(u.status===200&&r===0||u.status===206){let l=await u.arrayBuffer(),s=u.headers.get("content-range"),c=/\/(\d+)$/.exec(s||"");return c?.[1]&&(this._stat={size:parseInt(c[1],10)}),new Uint8Array(l.slice(0,t))}throw u.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${u.status} fetching ${this.url}`)}async readFile(t={}){let r,n;typeof t=="string"?(r=t,n={}):(r=t.encoding,n=t,delete n.encoding);let{headers:i={},signal:o,overrides:a={}}=n,u=await this.fetch(this.url,{headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a});if(u.status!==200)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(r==="utf8")return u.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await u.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}};ap.default=op});var nb=b(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0})});var ib=b(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});var sp=class{constructor(t){this.blob=t,this.size=t.size}async read(t,r=0){if(!t)return new Uint8Array(0);let n=r,i=n+t;return new Uint8Array(await this.blob.slice(n,i).arrayBuffer())}async readFile(t){let r=typeof t=="string"?t:t?.encoding;if(r==="utf8")return this.blob.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}};cp.default=sp});var lp=b(et=>{"use strict";var tM=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),rM=et&&et.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&tM(t,e,r)},ga=et&&et.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(et,"__esModule",{value:!0});et.LocalFile=et.RemoteFile=et.BlobFile=void 0;et.open=oM;et.fromUrl=ob;var nM=ga(ip()),iM=ga(up());rM(nb(),et);function ob(e,t={}){return new iM.default(e,t)}function oM(e,t,r,n={}){if(r!==void 0)return r;if(e!==void 0)return ob(e,n);if(t!==void 0)return new nM.default(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}var aM=ib();Object.defineProperty(et,"BlobFile",{enumerable:!0,get:function(){return ga(aM).default}});var uM=up();Object.defineProperty(et,"RemoteFile",{enumerable:!0,get:function(){return ga(uM).default}});var sM=ip();Object.defineProperty(et,"LocalFile",{enumerable:!0,get:function(){return ga(sM).default}})});var $r=b(ht=>{"use strict";var cM=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function lM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}ht.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)lM(r,n)&&(e[n]=r[n])}}return e};ht.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var fM={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},dM={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};ht.setTyped=function(e){e?(ht.Buf8=Uint8Array,ht.Buf16=Uint16Array,ht.Buf32=Int32Array,ht.assign(ht,fM)):(ht.Buf8=Array,ht.Buf16=Array,ht.Buf32=Array,ht.assign(ht,dM))};ht.setTyped(cM)});var Pb=b(Zi=>{"use strict";var pM=$r(),hM=4,ab=0,ub=1,mM=2;function Yi(e){for(var t=e.length;--t>=0;)e[t]=0}var vM=0,pb=1,gM=2,bM=3,_M=258,gp=29,Sa=256,_a=Sa+1+gp,Ki=30,bp=19,hb=2*_a+1,ai=15,fp=16,yM=7,_p=256,mb=16,vb=17,gb=18,mp=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],is=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],wM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],bb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xM=512,Kr=new Array((_a+2)*2);Yi(Kr);var ba=new Array(Ki*2);Yi(ba);var ya=new Array(xM);Yi(ya);var wa=new Array(_M-bM+1);Yi(wa);var yp=new Array(gp);Yi(yp);var os=new Array(Ki);Yi(os);function dp(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var _b,yb,wb;function pp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function xb(e){return e<256?ya[e]:ya[256+(e>>>7)]}function xa(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Et(e,t,r){e.bi_valid>fp-r?(e.bi_buf|=t<<e.bi_valid&65535,xa(e,e.bi_buf),e.bi_buf=t>>fp-e.bi_valid,e.bi_valid+=r-fp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Or(e,t,r){Et(e,r[t*2],r[t*2+1])}function Sb(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function SM(e){e.bi_valid===16?(xa(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function OM(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,l=t.stat_desc.max_length,s,c,d,f,p,h,m=0;for(f=0;f<=ai;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<hb;s++)c=e.heap[s],f=r[r[c*2+1]*2+1]+1,f>l&&(f=l,m++),r[c*2+1]=f,!(c>n)&&(e.bl_count[f]++,p=0,c>=u&&(p=a[c-u]),h=r[c*2],e.opt_len+=h*(f+p),o&&(e.static_len+=h*(i[c*2+1]+p)));if(m!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(f=l;f!==0;f--)for(c=e.bl_count[f];c!==0;)d=e.heap[--s],!(d>n)&&(r[d*2+1]!==f&&(e.opt_len+=(f-r[d*2+1])*r[d*2],r[d*2+1]=f),c--)}}function Ob(e,t,r){var n=new Array(ai+1),i=0,o,a;for(o=1;o<=ai;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var u=e[a*2+1];u!==0&&(e[a*2]=Sb(n[u]++,u))}}function EM(){var e,t,r,n,i,o=new Array(ai+1);for(r=0,n=0;n<gp-1;n++)for(yp[n]=r,e=0;e<1<<mp[n];e++)wa[r++]=n;for(wa[r-1]=n,i=0,n=0;n<16;n++)for(os[n]=i,e=0;e<1<<is[n];e++)ya[i++]=n;for(i>>=7;n<Ki;n++)for(os[n]=i<<7,e=0;e<1<<is[n]-7;e++)ya[256+i++]=n;for(t=0;t<=ai;t++)o[t]=0;for(e=0;e<=143;)Kr[e*2+1]=8,e++,o[8]++;for(;e<=255;)Kr[e*2+1]=9,e++,o[9]++;for(;e<=279;)Kr[e*2+1]=7,e++,o[7]++;for(;e<=287;)Kr[e*2+1]=8,e++,o[8]++;for(Ob(Kr,_a+1,o),e=0;e<Ki;e++)ba[e*2+1]=5,ba[e*2]=Sb(e,5);_b=new dp(Kr,mp,Sa+1,_a,ai),yb=new dp(ba,is,0,Ki,ai),wb=new dp(new Array(0),wM,0,bp,yM)}function Eb(e){var t;for(t=0;t<_a;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ki;t++)e.dyn_dtree[t*2]=0;for(t=0;t<bp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[_p*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ab(e){e.bi_valid>8?xa(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function AM(e,t,r,n){Ab(e),n&&(xa(e,r),xa(e,~r)),pM.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function sb(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function hp(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&sb(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!sb(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function cb(e,t,r){var n,i,o=0,a,u;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,n===0?Or(e,i,t):(a=wa[i],Or(e,a+Sa+1,t),u=mp[a],u!==0&&(i-=yp[a],Et(e,i,u)),n--,a=xb(n),Or(e,a,r),u=is[a],u!==0&&(n-=os[a],Et(e,n,u)));while(o<e.last_lit);Or(e,_p,t)}function vp(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,u,l=-1,s;for(e.heap_len=0,e.heap_max=hb,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=l<2?++l:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,i&&(e.static_len-=n[s*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)hp(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],hp(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=u,r[s*2]=r[a*2]+r[u*2],e.depth[s]=(e.depth[a]>=e.depth[u]?e.depth[a]:e.depth[u])+1,r[a*2+1]=r[u*2+1]=s,e.heap[1]=s++,hp(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],OM(e,t),Ob(r,l,e.bl_count)}function lb(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)&&(u<s?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[mb*2]++):u<=10?e.bl_tree[vb*2]++:e.bl_tree[gb*2]++,u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4))}function fb(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)){if(u<s)do Or(e,o,e.bl_tree);while(--u!==0);else o!==0?(o!==i&&(Or(e,o,e.bl_tree),u--),Or(e,mb,e.bl_tree),Et(e,u-3,2)):u<=10?(Or(e,vb,e.bl_tree),Et(e,u-3,3)):(Or(e,gb,e.bl_tree),Et(e,u-11,7));u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4)}}function TM(e){var t;for(lb(e,e.dyn_ltree,e.l_desc.max_code),lb(e,e.dyn_dtree,e.d_desc.max_code),vp(e,e.bl_desc),t=bp-1;t>=3&&e.bl_tree[bb[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function PM(e,t,r,n){var i;for(Et(e,t-257,5),Et(e,r-1,5),Et(e,n-4,4),i=0;i<n;i++)Et(e,e.bl_tree[bb[i]*2+1],3);fb(e,e.dyn_ltree,t-1),fb(e,e.dyn_dtree,r-1)}function RM(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return ab;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return ub;for(r=32;r<Sa;r++)if(e.dyn_ltree[r*2]!==0)return ub;return ab}var db=!1;function MM(e){db||(EM(),db=!0),e.l_desc=new pp(e.dyn_ltree,_b),e.d_desc=new pp(e.dyn_dtree,yb),e.bl_desc=new pp(e.bl_tree,wb),e.bi_buf=0,e.bi_valid=0,Eb(e)}function Tb(e,t,r,n){Et(e,(vM<<1)+(n?1:0),3),AM(e,t,r,!0)}function CM(e){Et(e,pb<<1,3),Or(e,_p,Kr),SM(e)}function kM(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===mM&&(e.strm.data_type=RM(e)),vp(e,e.l_desc),vp(e,e.d_desc),a=TM(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?Tb(e,t,r,n):e.strategy===hM||o===i?(Et(e,(pb<<1)+(n?1:0),3),cb(e,Kr,ba)):(Et(e,(gM<<1)+(n?1:0),3),PM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),cb(e,e.dyn_ltree,e.dyn_dtree)),Eb(e),n&&Ab(e)}function qM(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(wa[r]+Sa+1)*2]++,e.dyn_dtree[xb(t)*2]++),e.last_lit===e.lit_bufsize-1}Zi._tr_init=MM;Zi._tr_stored_block=Tb;Zi._tr_flush_block=kM;Zi._tr_tally=qM;Zi._tr_align=CM});var wp=b((TY,Rb)=>{"use strict";function IM(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}Rb.exports=IM});var xp=b((PY,Mb)=>{"use strict";function jM(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var FM=jM();function LM(e,t,r,n){var i=FM,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Mb.exports=LM});var as=b((RY,Cb)=>{"use strict";Cb.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var zb=b(Tr=>{"use strict";var mt=$r(),Bt=Pb(),jb=wp(),dn=xp(),NM=as(),li=0,DM=1,zM=3,gn=4,kb=5,Ar=0,qb=1,Ut=-2,BM=-3,Sp=-5,UM=-1,WM=1,us=2,HM=3,VM=4,GM=0,$M=2,fs=8,KM=9,YM=15,ZM=8,JM=29,XM=256,Ep=XM+1+JM,QM=30,eC=19,tC=2*Ep+1,rC=15,de=3,mn=258,nr=mn+de+1,nC=32,ds=42,Ap=69,ss=73,cs=91,ls=103,ui=113,Ea=666,Ve=1,Aa=2,si=3,Qi=4,iC=3;function vn(e,t){return e.msg=NM[t],t}function Ib(e){return(e<<1)-(e>4?9:0)}function hn(e){for(var t=e.length;--t>=0;)e[t]=0}function pn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(mt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function tt(e,t){Bt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,pn(e.strm)}function me(e,t){e.pending_buf[e.pending++]=t}function Oa(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function oC(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,mt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=jb(e.adler,t,i,r):e.state.wrap===2&&(e.adler=dn(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Fb(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,u=e.nice_match,l=e.strstart>e.w_size-nr?e.strstart-(e.w_size-nr):0,s=e.window,c=e.w_mask,d=e.prev,f=e.strstart+mn,p=s[n+a-1],h=s[n+a];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(i=t,!(s[i+a]!==h||s[i+a-1]!==p||s[i]!==s[n]||s[++i]!==s[n+1])){n+=2,i++;do;while(s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&n<f);if(o=mn-(f-n),n=f-mn,o>a){if(e.match_start=t,a=o,o>=u)break;p=s[n+a-1],h=s[n+a]}}while((t=d[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function ci(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-nr)){mt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=oC(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=de)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+de-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<de)););}while(e.lookahead<nr&&e.strm.avail_in!==0)}function aC(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ci(e),e.lookahead===0&&t===li)return Ve;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,tt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-nr&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):(e.strstart>e.block_start&&(tt(e,!1),e.strm.avail_out===0),Ve)}function Op(e,t){for(var r,n;;){if(e.lookahead<nr){if(ci(e),e.lookahead<nr&&t===li)return Ve;if(e.lookahead===0)break}if(r=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-nr&&(e.match_length=Fb(e,r)),e.match_length>=de)if(n=Bt._tr_tally(e,e.strstart-e.match_start,e.match_length-de),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=de){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=e.strstart<de-1?e.strstart:de-1,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function Ji(e,t){for(var r,n,i;;){if(e.lookahead<nr){if(ci(e),e.lookahead<nr&&t===li)return Ve;if(e.lookahead===0)break}if(r=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=de-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-nr&&(e.match_length=Fb(e,r),e.match_length<=5&&(e.strategy===WM||e.match_length===de&&e.strstart-e.match_start>4096)&&(e.match_length=de-1)),e.prev_length>=de&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-de,n=Bt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-de),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=de-1,e.strstart++,n&&(tt(e,!1),e.strm.avail_out===0))return Ve}else if(e.match_available){if(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),n&&tt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ve}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function uC(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=mn){if(ci(e),e.lookahead<=mn&&t===li)return Ve;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=de&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+mn;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=mn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(r=Bt._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function sC(e,t){for(var r;;){if(e.lookahead===0&&(ci(e),e.lookahead===0)){if(t===li)return Ve;break}if(e.match_length=0,r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?si:Qi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Aa}function Er(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Xi;Xi=[new Er(0,0,0,0,aC),new Er(4,4,8,4,Op),new Er(4,5,16,8,Op),new Er(4,6,32,32,Op),new Er(4,4,16,16,Ji),new Er(8,16,32,32,Ji),new Er(8,16,128,128,Ji),new Er(8,32,128,256,Ji),new Er(32,128,258,1024,Ji),new Er(32,258,258,4096,Ji)];function cC(e){e.window_size=2*e.w_size,hn(e.head),e.max_lazy_match=Xi[e.level].max_lazy,e.good_match=Xi[e.level].good_length,e.nice_match=Xi[e.level].nice_length,e.max_chain_length=Xi[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=de-1,e.match_available=0,e.ins_h=0}function lC(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=fs,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new mt.Buf16(tC*2),this.dyn_dtree=new mt.Buf16((2*QM+1)*2),this.bl_tree=new mt.Buf16((2*eC+1)*2),hn(this.dyn_ltree),hn(this.dyn_dtree),hn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new mt.Buf16(rC+1),this.heap=new mt.Buf16(2*Ep+1),hn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new mt.Buf16(2*Ep+1),hn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Lb(e){var t;return!e||!e.state?vn(e,Ut):(e.total_in=e.total_out=0,e.data_type=$M,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ds:ui,e.adler=t.wrap===2?0:1,t.last_flush=li,Bt._tr_init(t),Ar)}function Nb(e){var t=Lb(e);return t===Ar&&cC(e.state),t}function fC(e,t){return!e||!e.state||e.state.wrap!==2?Ut:(e.state.gzhead=t,Ar)}function Db(e,t,r,n,i,o){if(!e)return Ut;var a=1;if(t===UM&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>KM||r!==fs||n<8||n>15||t<0||t>9||o<0||o>VM)return vn(e,Ut);n===8&&(n=9);var u=new lC;return e.state=u,u.strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=i+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+de-1)/de),u.window=new mt.Buf8(u.w_size*2),u.head=new mt.Buf16(u.hash_size),u.prev=new mt.Buf16(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new mt.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=o,u.method=r,Nb(e)}function dC(e,t){return Db(e,t,fs,YM,ZM,GM)}function pC(e,t){var r,n,i,o;if(!e||!e.state||t>kb||t<0)return e?vn(e,Ut):Ut;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Ea&&t!==gn)return vn(e,e.avail_out===0?Sp:Ut);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ds)if(n.wrap===2)e.adler=0,me(n,31),me(n,139),me(n,8),n.gzhead?(me(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),me(n,n.gzhead.time&255),me(n,n.gzhead.time>>8&255),me(n,n.gzhead.time>>16&255),me(n,n.gzhead.time>>24&255),me(n,n.level===9?2:n.strategy>=us||n.level<2?4:0),me(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(me(n,n.gzhead.extra.length&255),me(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=dn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Ap):(me(n,0),me(n,0),me(n,0),me(n,0),me(n,0),me(n,n.level===9?2:n.strategy>=us||n.level<2?4:0),me(n,iC),n.status=ui);else{var a=fs+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=us||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=nC),a+=31-a%31,n.status=ui,Oa(n,a),n.strstart!==0&&(Oa(n,e.adler>>>16),Oa(n,e.adler&65535)),e.adler=1}if(n.status===Ap)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),pn(e),i=n.pending,n.pending===n.pending_buf_size));)me(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=ss)}else n.status=ss;if(n.status===ss)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),pn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,me(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=cs)}else n.status=cs;if(n.status===cs)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),pn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,me(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=dn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=ls)}else n.status=ls;if(n.status===ls&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&pn(e),n.pending+2<=n.pending_buf_size&&(me(n,e.adler&255),me(n,e.adler>>8&255),e.adler=0,n.status=ui)):n.status=ui),n.pending!==0){if(pn(e),e.avail_out===0)return n.last_flush=-1,Ar}else if(e.avail_in===0&&Ib(t)<=Ib(r)&&t!==gn)return vn(e,Sp);if(n.status===Ea&&e.avail_in!==0)return vn(e,Sp);if(e.avail_in!==0||n.lookahead!==0||t!==li&&n.status!==Ea){var l=n.strategy===us?sC(n,t):n.strategy===HM?uC(n,t):Xi[n.level].func(n,t);if((l===si||l===Qi)&&(n.status=Ea),l===Ve||l===si)return e.avail_out===0&&(n.last_flush=-1),Ar;if(l===Aa&&(t===DM?Bt._tr_align(n):t!==kb&&(Bt._tr_stored_block(n,0,0,!1),t===zM&&(hn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),pn(e),e.avail_out===0))return n.last_flush=-1,Ar}return t!==gn?Ar:n.wrap<=0?qb:(n.wrap===2?(me(n,e.adler&255),me(n,e.adler>>8&255),me(n,e.adler>>16&255),me(n,e.adler>>24&255),me(n,e.total_in&255),me(n,e.total_in>>8&255),me(n,e.total_in>>16&255),me(n,e.total_in>>24&255)):(Oa(n,e.adler>>>16),Oa(n,e.adler&65535)),pn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ar:qb)}function hC(e){var t;return!e||!e.state?Ut:(t=e.state.status,t!==ds&&t!==Ap&&t!==ss&&t!==cs&&t!==ls&&t!==ui&&t!==Ea?vn(e,Ut):(e.state=null,t===ui?vn(e,BM):Ar))}function mC(e,t){var r=t.length,n,i,o,a,u,l,s,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ds||n.lookahead))return Ut;for(a===1&&(e.adler=jb(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(hn(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new mt.Buf8(n.w_size),mt.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),u=e.avail_in,l=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,ci(n);n.lookahead>=de;){i=n.strstart,o=n.lookahead-(de-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+de-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=de-1,ci(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=de-1,n.match_available=0,e.next_in=l,e.input=s,e.avail_in=u,n.wrap=a,Ar}Tr.deflateInit=dC;Tr.deflateInit2=Db;Tr.deflateReset=Nb;Tr.deflateResetKeep=Lb;Tr.deflateSetHeader=fC;Tr.deflate=pC;Tr.deflateEnd=hC;Tr.deflateSetDictionary=mC;Tr.deflateInfo="pako deflate (from Nodeca project)"});var Tp=b(eo=>{"use strict";var ps=$r(),Bb=!0,Ub=!0;try{String.fromCharCode.apply(null,[0])}catch{Bb=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ub=!1}var Ta=new ps.Buf8(256);for(Yr=0;Yr<256;Yr++)Ta[Yr]=Yr>=252?6:Yr>=248?5:Yr>=240?4:Yr>=224?3:Yr>=192?2:1;var Yr;Ta[254]=Ta[254]=1;eo.string2buf=function(e){var t,r,n,i,o,a=e.length,u=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new ps.Buf8(u),o=0,i=0;o<u;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function Wb(e,t){if(t<65534&&(e.subarray&&Ub||!e.subarray&&Bb))return String.fromCharCode.apply(null,ps.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}eo.buf2binstring=function(e){return Wb(e,e.length)};eo.binstring2buf=function(e){for(var t=new ps.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};eo.buf2string=function(e,t){var r,n,i,o,a=t||e.length,u=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){u[n++]=i;continue}if(o=Ta[i],o>4){u[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){u[n++]=65533;continue}i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|i&1023)}return Wb(u,n)};eo.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Ta[e[r]]>t?r:t}});var Pp=b((kY,Hb)=>{"use strict";function vC(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Hb.exports=vC});var Kb=b(Ma=>{"use strict";var Pa=zb(),Ra=$r(),Mp=Tp(),Cp=as(),gC=Pp(),$b=Object.prototype.toString,bC=0,Rp=4,to=0,Vb=1,Gb=2,_C=-1,yC=0,wC=8;function fi(e){if(!(this instanceof fi))return new fi(e);this.options=Ra.assign({level:_C,method:wC,chunkSize:16384,windowBits:15,memLevel:8,strategy:yC,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gC,this.strm.avail_out=0;var r=Pa.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==to)throw new Error(Cp[r]);if(t.header&&Pa.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Mp.string2buf(t.dictionary):$b.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Pa.deflateSetDictionary(this.strm,n),r!==to)throw new Error(Cp[r]);this._dict_set=!0}}fi.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?Rp:bC,typeof e=="string"?r.input=Mp.string2buf(e):$b.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ra.Buf8(n),r.next_out=0,r.avail_out=n),i=Pa.deflate(r,o),i!==Vb&&i!==to)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===Rp||o===Gb))&&(this.options.to==="string"?this.onData(Mp.buf2binstring(Ra.shrinkBuf(r.output,r.next_out))):this.onData(Ra.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Vb);return o===Rp?(i=Pa.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===to):(o===Gb&&(this.onEnd(to),r.avail_out=0),!0)};fi.prototype.onData=function(e){this.chunks.push(e)};fi.prototype.onEnd=function(e){e===to&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ra.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function kp(e,t){var r=new fi(t);if(r.push(e,!0),r.err)throw r.msg||Cp[r.err];return r.result}function xC(e,t){return t=t||{},t.raw=!0,kp(e,t)}function SC(e,t){return t=t||{},t.gzip=!0,kp(e,t)}Ma.Deflate=fi;Ma.deflate=kp;Ma.deflateRaw=xC;Ma.gzip=SC});var Zb=b((IY,Yb)=>{"use strict";var hs=30,OC=12;Yb.exports=function(t,r){var n,i,o,a,u,l,s,c,d,f,p,h,m,g,_,w,y,x,O,A,T,R,C,M,P;n=t.state,i=t.next_in,M=t.input,o=i+(t.avail_in-5),a=t.next_out,P=t.output,u=a-(r-t.avail_out),l=a+(t.avail_out-257),s=n.dmax,c=n.wsize,d=n.whave,f=n.wnext,p=n.window,h=n.hold,m=n.bits,g=n.lencode,_=n.distcode,w=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=g[h&w];t:for(;;){if(O=x>>>24,h>>>=O,m-=O,O=x>>>16&255,O===0)P[a++]=x&65535;else if(O&16){A=x&65535,O&=15,O&&(m<O&&(h+=M[i++]<<m,m+=8),A+=h&(1<<O)-1,h>>>=O,m-=O),m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=_[h&y];r:for(;;){if(O=x>>>24,h>>>=O,m-=O,O=x>>>16&255,O&16){if(T=x&65535,O&=15,m<O&&(h+=M[i++]<<m,m+=8,m<O&&(h+=M[i++]<<m,m+=8)),T+=h&(1<<O)-1,T>s){t.msg="invalid distance too far back",n.mode=hs;break e}if(h>>>=O,m-=O,O=a-u,T>O){if(O=T-O,O>d&&n.sane){t.msg="invalid distance too far back",n.mode=hs;break e}if(R=0,C=p,f===0){if(R+=c-O,O<A){A-=O;do P[a++]=p[R++];while(--O);R=a-T,C=P}}else if(f<O){if(R+=c+f-O,O-=f,O<A){A-=O;do P[a++]=p[R++];while(--O);if(R=0,f<A){O=f,A-=O;do P[a++]=p[R++];while(--O);R=a-T,C=P}}}else if(R+=f-O,O<A){A-=O;do P[a++]=p[R++];while(--O);R=a-T,C=P}for(;A>2;)P[a++]=C[R++],P[a++]=C[R++],P[a++]=C[R++],A-=3;A&&(P[a++]=C[R++],A>1&&(P[a++]=C[R++]))}else{R=a-T;do P[a++]=P[R++],P[a++]=P[R++],P[a++]=P[R++],A-=3;while(A>2);A&&(P[a++]=P[R++],A>1&&(P[a++]=P[R++]))}}else if((O&64)===0){x=_[(x&65535)+(h&(1<<O)-1)];continue r}else{t.msg="invalid distance code",n.mode=hs;break e}break}}else if((O&64)===0){x=g[(x&65535)+(h&(1<<O)-1)];continue t}else if(O&32){n.mode=OC;break e}else{t.msg="invalid literal/length code",n.mode=hs;break e}break}}while(i<o&&a<l);A=m>>3,i-=A,m-=A<<3,h&=(1<<m)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<l?257+(l-a):257-(a-l),n.hold=h,n.bits=m}});var n_=b((jY,r_)=>{"use strict";var Jb=$r(),ro=15,Xb=852,Qb=592,e_=0,qp=1,t_=2,EC=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],AC=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],TC=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],PC=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r_.exports=function(t,r,n,i,o,a,u,l){var s=l.bits,c=0,d=0,f=0,p=0,h=0,m=0,g=0,_=0,w=0,y=0,x,O,A,T,R,C=null,M=0,P,N=new Jb.Buf16(ro+1),k=new Jb.Buf16(ro+1),I=null,W=0,j,D,F;for(c=0;c<=ro;c++)N[c]=0;for(d=0;d<i;d++)N[r[n+d]]++;for(h=s,p=ro;p>=1&&N[p]===0;p--);if(h>p&&(h=p),p===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<p&&N[f]===0;f++);for(h<f&&(h=f),_=1,c=1;c<=ro;c++)if(_<<=1,_-=N[c],_<0)return-1;if(_>0&&(t===e_||p!==1))return-1;for(k[1]=0,c=1;c<ro;c++)k[c+1]=k[c]+N[c];for(d=0;d<i;d++)r[n+d]!==0&&(u[k[r[n+d]]++]=d);if(t===e_?(C=I=u,P=19):t===qp?(C=EC,M-=257,I=AC,W-=257,P=256):(C=TC,I=PC,P=-1),y=0,d=0,c=f,R=a,m=h,g=0,A=-1,w=1<<h,T=w-1,t===qp&&w>Xb||t===t_&&w>Qb)return 1;for(;;){j=c-g,u[d]<P?(D=0,F=u[d]):u[d]>P?(D=I[W+u[d]],F=C[M+u[d]]):(D=96,F=0),x=1<<c-g,O=1<<m,f=O;do O-=x,o[R+(y>>g)+O]=j<<24|D<<16|F|0;while(O!==0);for(x=1<<c-1;y&x;)x>>=1;if(x!==0?(y&=x-1,y+=x):y=0,d++,--N[c]===0){if(c===p)break;c=r[n+u[d]]}if(c>h&&(y&T)!==A){for(g===0&&(g=h),R+=f,m=c-g,_=1<<m;m+g<p&&(_-=N[m+g],!(_<=0));)m++,_<<=1;if(w+=1<<m,t===qp&&w>Xb||t===t_&&w>Qb)return 1;A=y&T,o[A]=h<<24|m<<16|R-a|0}}return y!==0&&(o[R+y]=c-g<<24|64<<16|0),l.bits=h,0}});var N_=b(ir=>{"use strict";var Ft=$r(),Dp=wp(),Pr=xp(),RC=Zb(),Ca=n_(),MC=0,R_=1,M_=2,i_=4,CC=5,ms=6,di=0,kC=1,qC=2,Wt=-2,C_=-3,zp=-4,IC=-5,o_=8,k_=1,a_=2,u_=3,s_=4,c_=5,l_=6,f_=7,d_=8,p_=9,h_=10,bs=11,Zr=12,Ip=13,m_=14,jp=15,v_=16,g_=17,b_=18,__=19,vs=20,gs=21,y_=22,w_=23,x_=24,S_=25,O_=26,Fp=27,E_=28,A_=29,Me=30,Bp=31,jC=32,FC=852,LC=592,NC=15,DC=NC;function T_(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function zC(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ft.Buf16(320),this.work=new Ft.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function q_(e){var t;return!e||!e.state?Wt:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=k_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ft.Buf32(FC),t.distcode=t.distdyn=new Ft.Buf32(LC),t.sane=1,t.back=-1,di)}function I_(e){var t;return!e||!e.state?Wt:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,q_(e))}function j_(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Wt:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,I_(e))}function F_(e,t){var r,n;return e?(n=new zC,e.state=n,n.window=null,r=j_(e,t),r!==di&&(e.state=null),r):Wt}function BC(e){return F_(e,DC)}var P_=!0,Lp,Np;function UC(e){if(P_){var t;for(Lp=new Ft.Buf32(512),Np=new Ft.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Ca(R_,e.lens,0,288,Lp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ca(M_,e.lens,0,32,Np,0,e.work,{bits:5}),P_=!1}e.lencode=Lp,e.lenbits=9,e.distcode=Np,e.distbits=5}function L_(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Ft.Buf8(o.wsize)),n>=o.wsize?(Ft.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),Ft.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Ft.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function WC(e,t){var r,n,i,o,a,u,l,s,c,d,f,p,h,m,g=0,_,w,y,x,O,A,T,R,C=new Ft.Buf8(4),M,P,N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Wt;r=e.state,r.mode===Zr&&(r.mode=Ip),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,d=u,f=l,R=di;e:for(;;)switch(r.mode){case k_:if(r.wrap===0){r.mode=Ip;break}for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.wrap&2&&s===35615){r.check=0,C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0),s=0,c=0,r.mode=a_;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((s&255)<<8)+(s>>8))%31){e.msg="incorrect header check",r.mode=Me;break}if((s&15)!==o_){e.msg="unknown compression method",r.mode=Me;break}if(s>>>=4,c-=4,T=(s&15)+8,r.wbits===0)r.wbits=T;else if(T>r.wbits){e.msg="invalid window size",r.mode=Me;break}r.dmax=1<<T,e.adler=r.check=1,r.mode=s&512?h_:Zr,s=0,c=0;break;case a_:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.flags=s,(r.flags&255)!==o_){e.msg="unknown compression method",r.mode=Me;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Me;break}r.head&&(r.head.text=s>>8&1),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0)),s=0,c=0,r.mode=u_;case u_:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.time=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,C[2]=s>>>16&255,C[3]=s>>>24&255,r.check=Pr(r.check,C,4,0)),s=0,c=0,r.mode=s_;case s_:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=s&255,r.head.os=s>>8),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0)),s=0,c=0,r.mode=c_;case c_:if(r.flags&1024){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length=s,r.head&&(r.head.extra_len=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=l_;case l_:if(r.flags&1024&&(p=r.length,p>u&&(p=u),p&&(r.head&&(T=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Ft.arraySet(r.head.extra,n,o,p,T)),r.flags&512&&(r.check=Pr(r.check,n,p,o)),u-=p,o+=p,r.length-=p),r.length))break e;r.length=0,r.mode=f_;case f_:if(r.flags&2048){if(u===0)break e;p=0;do T=n[o+p++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T));while(T&&p<u);if(r.flags&512&&(r.check=Pr(r.check,n,p,o)),u-=p,o+=p,T)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=d_;case d_:if(r.flags&4096){if(u===0)break e;p=0;do T=n[o+p++],r.head&&T&&r.length<65536&&(r.head.comment+=String.fromCharCode(T));while(T&&p<u);if(r.flags&512&&(r.check=Pr(r.check,n,p,o)),u-=p,o+=p,T)break e}else r.head&&(r.head.comment=null);r.mode=p_;case p_:if(r.flags&512){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Me;break}s=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Zr;break;case h_:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}e.adler=r.check=T_(s),s=0,c=0,r.mode=bs;case bs:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,qC;e.adler=r.check=1,r.mode=Zr;case Zr:if(t===CC||t===ms)break e;case Ip:if(r.last){s>>>=c&7,c-=c&7,r.mode=Fp;break}for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}switch(r.last=s&1,s>>>=1,c-=1,s&3){case 0:r.mode=m_;break;case 1:if(UC(r),r.mode=vs,t===ms){s>>>=2,c-=2;break e}break;case 2:r.mode=g_;break;case 3:e.msg="invalid block type",r.mode=Me}s>>>=2,c-=2;break;case m_:for(s>>>=c&7,c-=c&7;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Me;break}if(r.length=s&65535,s=0,c=0,r.mode=jp,t===ms)break e;case jp:r.mode=v_;case v_:if(p=r.length,p){if(p>u&&(p=u),p>l&&(p=l),p===0)break e;Ft.arraySet(i,n,o,p,a),u-=p,o+=p,l-=p,a+=p,r.length-=p;break}r.mode=Zr;break;case g_:for(;c<14;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.nlen=(s&31)+257,s>>>=5,c-=5,r.ndist=(s&31)+1,s>>>=5,c-=5,r.ncode=(s&15)+4,s>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Me;break}r.have=0,r.mode=b_;case b_:for(;r.have<r.ncode;){for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.lens[N[r.have++]]=s&7,s>>>=3,c-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},R=Ca(MC,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid code lengths set",r.mode=Me;break}r.have=0,r.mode=__;case __:for(;r.have<r.nlen+r.ndist;){for(;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(y<16)s>>>=_,c-=_,r.lens[r.have++]=y;else{if(y===16){for(P=_+2;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=Me;break}T=r.lens[r.have-1],p=3+(s&3),s>>>=2,c-=2}else if(y===17){for(P=_+3;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,T=0,p=3+(s&7),s>>>=3,c-=3}else{for(P=_+7;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,T=0,p=11+(s&127),s>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Me;break}for(;p--;)r.lens[r.have++]=T}}if(r.mode===Me)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Me;break}if(r.lenbits=9,M={bits:r.lenbits},R=Ca(R_,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid literal/lengths set",r.mode=Me;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},R=Ca(M_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,R){e.msg="invalid distances set",r.mode=Me;break}if(r.mode=vs,t===ms)break e;case vs:r.mode=gs;case gs:if(u>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,RC(e,f),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,r.mode===Zr&&(r.back=-1);break}for(r.back=0;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(w&&(w&240)===0){for(x=_,O=w,A=y;g=r.lencode[A+((s&(1<<x+O)-1)>>x)],_=g>>>24,w=g>>>16&255,y=g&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,r.length=y,w===0){r.mode=O_;break}if(w&32){r.back=-1,r.mode=Zr;break}if(w&64){e.msg="invalid literal/length code",r.mode=Me;break}r.extra=w&15,r.mode=y_;case y_:if(r.extra){for(P=r.extra;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=w_;case w_:for(;g=r.distcode[s&(1<<r.distbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((w&240)===0){for(x=_,O=w,A=y;g=r.distcode[A+((s&(1<<x+O)-1)>>x)],_=g>>>24,w=g>>>16&255,y=g&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,w&64){e.msg="invalid distance code",r.mode=Me;break}r.offset=y,r.extra=w&15,r.mode=x_;case x_:if(r.extra){for(P=r.extra;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.offset+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Me;break}r.mode=S_;case S_:if(l===0)break e;if(p=f-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Me;break}p>r.wnext?(p-=r.wnext,h=r.wsize-p):h=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=i,h=a-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do i[a++]=m[h++];while(--p);r.length===0&&(r.mode=gs);break;case O_:if(l===0)break e;i[a++]=r.length,l--,r.mode=gs;break;case Fp:if(r.wrap){for(;c<32;){if(u===0)break e;u--,s|=n[o++]<<c,c+=8}if(f-=l,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?Pr(r.check,i,f,a-f):Dp(r.check,i,f,a-f)),f=l,(r.flags?s:T_(s))!==r.check){e.msg="incorrect data check",r.mode=Me;break}s=0,c=0}r.mode=E_;case E_:if(r.wrap&&r.flags){for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Me;break}s=0,c=0}r.mode=A_;case A_:R=kC;break e;case Me:R=C_;break e;case Bp:return zp;case jC:default:return Wt}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,(r.wsize||f!==e.avail_out&&r.mode<Me&&(r.mode<Fp||t!==i_))&&L_(e,e.output,e.next_out,f-e.avail_out)?(r.mode=Bp,zp):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,r.total+=f,r.wrap&&f&&(e.adler=r.check=r.flags?Pr(r.check,i,f,e.next_out-f):Dp(r.check,i,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Zr?128:0)+(r.mode===vs||r.mode===jp?256:0),(d===0&&f===0||t===i_)&&R===di&&(R=IC),R)}function HC(e){if(!e||!e.state)return Wt;var t=e.state;return t.window&&(t.window=null),e.state=null,di}function VC(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Wt:(r.head=t,t.done=!1,di)}function GC(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==bs)?Wt:n.mode===bs&&(i=1,i=Dp(i,t,r,0),i!==n.check)?C_:(o=L_(e,t,r,r),o?(n.mode=Bp,zp):(n.havedict=1,di))}ir.inflateReset=I_;ir.inflateReset2=j_;ir.inflateResetKeep=q_;ir.inflateInit=BC;ir.inflateInit2=F_;ir.inflate=WC;ir.inflateEnd=HC;ir.inflateGetHeader=VC;ir.inflateSetDictionary=GC;ir.inflateInfo="pako inflate (from Nodeca project)"});var Up=b((LY,D_)=>{"use strict";D_.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var B_=b((NY,z_)=>{"use strict";function $C(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}z_.exports=$C});var W_=b(qa=>{"use strict";var no=N_(),ka=$r(),_s=Tp(),Be=Up(),Wp=as(),KC=Pp(),YC=B_(),U_=Object.prototype.toString;function pi(e){if(!(this instanceof pi))return new pi(e);this.options=ka.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new KC,this.strm.avail_out=0;var r=no.inflateInit2(this.strm,t.windowBits);if(r!==Be.Z_OK)throw new Error(Wp[r]);if(this.header=new YC,no.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=_s.string2buf(t.dictionary):U_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=no.inflateSetDictionary(this.strm,t.dictionary),r!==Be.Z_OK)))throw new Error(Wp[r])}pi.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,u,l,s,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?Be.Z_FINISH:Be.Z_NO_FLUSH,typeof e=="string"?r.input=_s.binstring2buf(e):U_.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ka.Buf8(n),r.next_out=0,r.avail_out=n),o=no.inflate(r,Be.Z_NO_FLUSH),o===Be.Z_NEED_DICT&&i&&(o=no.inflateSetDictionary(this.strm,i)),o===Be.Z_BUF_ERROR&&c===!0&&(o=Be.Z_OK,c=!1),o!==Be.Z_STREAM_END&&o!==Be.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===Be.Z_STREAM_END||r.avail_in===0&&(a===Be.Z_FINISH||a===Be.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=_s.utf8border(r.output,r.next_out),l=r.next_out-u,s=_s.buf2string(r.output,u),r.next_out=l,r.avail_out=n-l,l&&ka.arraySet(r.output,r.output,u,l,0),this.onData(s)):this.onData(ka.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==Be.Z_STREAM_END);return o===Be.Z_STREAM_END&&(a=Be.Z_FINISH),a===Be.Z_FINISH?(o=no.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Be.Z_OK):(a===Be.Z_SYNC_FLUSH&&(this.onEnd(Be.Z_OK),r.avail_out=0),!0)};pi.prototype.onData=function(e){this.chunks.push(e)};pi.prototype.onEnd=function(e){e===Be.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ka.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Hp(e,t){var r=new pi(t);if(r.push(e,!0),r.err)throw r.msg||Wp[r.err];return r.result}function ZC(e,t){return t=t||{},t.raw=!0,Hp(e,t)}qa.Inflate=pi;qa.inflate=Hp;qa.inflateRaw=ZC;qa.ungzip=Hp});var G_=b((zY,V_)=>{"use strict";var JC=$r().assign,XC=Kb(),QC=W_(),ek=Up(),H_={};JC(H_,XC,QC,ek);V_.exports=H_});var Vp=b(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.sum=$_;ys.concatUint8Array=tk;function $_(e){let t=0;for(let r of e)t+=r.length;return t}function tk(e){let t=new Uint8Array($_(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var Gp=b(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.unzip=rk;xs.unzipChunkSlice=nk;var ws=G_(),K_=Vp();async function rk(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new ws.Inflate,{strm:t}=n,n.push(o,ws.Z_SYNC_FLUSH),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,K_.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function nk(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,u=[],l=[],s=[],c=0;do{let d=e.subarray(o-n.blockPosition),f=new ws.Inflate;if({strm:r}=f,f.push(d,ws.Z_SYNC_FLUSH),f.err)throw new Error(f.msg);let p=f.result;u.push(p);let h=p.length;l.push(o),s.push(a),u.length===1&&n.dataPosition&&(u[0]=u[0].subarray(n.dataPosition),h=u[0].length);let m=o;if(o+=r.next_in,a+=h,m>=i.blockPosition){u[c]=u[c].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),l.push(o),s.push(a);break}c++}while(r.avail_in);return{buffer:(0,K_.concatUint8Array)(u),cpositions:l,dpositions:s}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var Y_=b(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL=void 0;Rr.longFromBytesToUnsigned=ik;Rr.TWO_PWR_16_DBL=65536;Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL*Rr.TWO_PWR_16_DBL;function ik(e,t=0){let r=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24;return((e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24)>>>0)*Rr.TWO_PWR_32_DBL+(r>>>0)}});var J_=b(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});var ok=lp(),$p=Y_(),Ss=1;function Z_(e,t,r){let n=t[Ss],i=r?r[Ss]:1/0;return n<=e&&i>e?0:n<e?-1:1}var Kp=class{constructor({filehandle:t,path:r}){if(t)this.filehandle=t;else if(r)this.filehandle=new ok.LocalFile(r);else throw new TypeError("either filehandle or path must be defined")}_getIndex(){return this.index||(this.index=this._readIndex().catch(t=>{throw this.index=void 0,t})),this.index}async _readIndex(){let t=await this.filehandle.read(8,0),r=(0,$p.longFromBytesToUnsigned)(t);if(!r)return[[0,0]];let n=new Array(r+1);n[0]=[0,0];let i=8*2*r;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");let o=await this.filehandle.read(i,8);for(let a=0;a<r;a+=1){let u=(0,$p.longFromBytesToUnsigned)(o,a*16),l=(0,$p.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[u,l]}return n}async getLastBlock(){return(await this._getIndex()).at(-1)}async getRelevantBlocksForRead(t,r){let n=r+t;if(t===0)return[];let i=await this._getIndex(),o=[],a=0,u=i.length-1,l=Math.floor(i.length/2),s=Z_(r,i[l],i[l+1]);for(;s!==0;)s>0?u=l-1:s<0&&(a=l+1),l=Math.ceil((u-a)/2)+a,s=Z_(r,i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Ss]>=n));c+=1);return o[o.length-1][Ss]<n&&o.push([]),o}};Yp.default=Kp});var X_=b(Ia=>{"use strict";var ak=Ia&&Ia.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ia,"__esModule",{value:!0});var uk=lp(),sk=Gp(),ck=ak(J_()),lk=Vp(),Zp=class{constructor({filehandle:t,path:r,gziFilehandle:n,gziPath:i}){if(t)this.filehandle=t;else if(r)this.filehandle=new uk.LocalFile(r);else throw new TypeError("either filehandle or path must be defined");if(!n&&!i&&!r)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new ck.default({filehandle:n,path:!n&&!i&&r?i:`${r}.gzi`})}async _readAndUncompressBlock(t,r){let n=r;n||(n=(await this.filehandle.stat()).size);let i=n-t,o=await this.filehandle.read(i,t);return(0,sk.unzip)(o)}async read(t,r){let n=await this.gzi.getRelevantBlocksForRead(t,r),i=[];for(let o=0;o<n.length-1;o+=1){let a=await this._readAndUncompressBlock(n[o][0],n[o+1][0]),[,u]=n[o],l=u>=r?0:r-u,s=Math.min(r+t,u+a.length)-u;l>=0&&l<a.length&&i.push(a.subarray(l,s))}return(0,lk.concatUint8Array)(i)}};Ia.default=Zp});var Jp=b(or=>{"use strict";var fk=or&&or.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dk=or&&or.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&fk(t,e,r)},pk=or&&or.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(or,"__esModule",{value:!0});or.BgzfFilehandle=void 0;var hk=X_();Object.defineProperty(or,"BgzfFilehandle",{enumerable:!0,get:function(){return pk(hk).default}});dk(Gp(),or)});var Os=b(($Y,Q_)=>{Q_.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var Lt=b((KY,ey)=>{ey.exports=JBrowseExports["@jbrowse/core/util"]});var Es=b((YY,ty)=>{ty.exports=JBrowseExports["@jbrowse/core/util/io"]});var As=b((ZY,ry)=>{ry.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var _n=b((pZ,yy)=>{yy.exports=JBrowseExports["@jbrowse/core/configuration"]});var vt=b((bZ,Oy)=>{Oy.exports=JBrowseExports["mobx-state-tree"]});var Ye=b((TJ,Wy)=>{Wy.exports=JBrowseExports.react});var Ua=b((PJ,Hy)=>{Hy.exports=JBrowseExports["react/jsx-runtime"]});function Fs(){return typeof window<"u"}function Cr(e){return Vy(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(Vy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vy(e){return Fs()?e instanceof Node||e instanceof rt(e).Node:!1}function ye(e){return Fs()?e instanceof Element||e instanceof rt(e).Element:!1}function qe(e){return Fs()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function js(e){return!Fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}function co(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Gy(e){return["table","td","th"].includes(Cr(e))}function Wa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ls(e){let t=lo(),r=ye(e)?gt(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function $y(e){let t=ur(e);for(;qe(t)&&!cr(t);){if(Ls(t))return t;if(Wa(t))return null;t=ur(t)}return null}function lo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cr(e){return["html","body","#document"].includes(Cr(e))}function gt(e){return rt(e).getComputedStyle(e)}function Ha(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ur(e){if(Cr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||js(e)&&e.host||sr(e);return js(t)?t.host:t}function Ky(e){let t=ur(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&co(t)?t:Ky(t)}function Tt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ky(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=rt(i);if(o){let u=Ns(a);return t.concat(a,a.visualViewport||[],co(i)?i:[],u&&r?Tt(u):[])}return t.concat(i,Tt(i,[],r))}function Ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Va=pt(()=>{});function $t(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function Ne(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&js(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ds(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zs(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function ph(e){return e.mozInputSource===0&&e.isTrusted?!0:dh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Bs(e){return Ak()?!1:!dh()&&e.width===0&&e.height===0||dh()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function hh(){return/apple/i.test(navigator.vendor)}function dh(){let e=/android/i;return e.test(Ds())||e.test(zs())}function Yy(){return Ds().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ak(){return zs().includes("jsdom/")}function vi(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Zy(e){return"nativeEvent"in e}function Jy(e){return e.matches("html,body")}function Ze(e){return e?.ownerDocument||document}function Us(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function lr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ws(e){return qe(e)&&e.matches(Tk)}function Je(e){e.preventDefault(),e.stopPropagation()}function mh(e){return e?e.getAttribute("role")==="combobox"&&Ws(e):!1}var Tk,Xy=pt(()=>{Va();Tk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"});function Hs(e,t,r){return De(e,bt(t,r))}function Pt(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function Vs(e){return e==="x"?"y":"x"}function Gs(e){return e==="y"?"height":"width"}function kr(e){return["top","bottom"].includes(Rt(e))?"y":"x"}function $s(e){return Vs(kr(e))}function bh(e,t,r){r===void 0&&(r=!1);let n=Kt(e),i=$s(e),o=Gs(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=$a(a)),[a,$a(a)]}function e0(e){let t=$a(e);return[Ga(e),t,Ga(t)]}function Ga(e){return e.replace(/start|end/g,t=>Rk[t])}function Mk(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}function t0(e,t,r,n){let i=Kt(e),o=Mk(Rt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Ga)))),o}function $a(e){return e.replace(/left|right|bottom|top/g,t=>Pk[t])}function Ck(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ks(e){return typeof e!="number"?Ck(e):{top:e,right:e,bottom:e,left:e}}function Xr(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}var vh,Qy,gh,bt,De,gi,wn,fr,Pk,Rk,Ka=pt(()=>{vh=["top","right","bottom","left"],Qy=["start","end"],gh=vh.reduce((e,t)=>e.concat(t,t+"-"+Qy[0],t+"-"+Qy[1]),[]),bt=Math.min,De=Math.max,gi=Math.round,wn=Math.floor,fr=e=>({x:e,y:e}),Pk={left:"right",right:"left",bottom:"top",top:"bottom"},Rk={start:"end",end:"start"}});var kk,Ys,n0,fo,Zs,Js,qk,Ik,jk,i0,o0,Fk,Lk,a0,Nk,Dk,zk,Bk,Uk,Wk,Hk,r0,Vk,Gk,$k,_h,Kk,Yk,Ya,u0,s0=pt(()=>{kk=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ys=kk.join(","),n0=typeof Element>"u",fo=n0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zs=!n0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Js=function e(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=i===""||i==="true",a=o||r&&t&&e(t.parentNode);return a},qk=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Ik=function(t,r,n){if(Js(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ys));return r&&fo.call(t,Ys)&&i.unshift(t),i=i.filter(n),i},jk=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Js(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),l=u.length?u:a.children,s=e(l,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:a,candidates:s})}else{var c=fo.call(a,Ys);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!Js(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:a,candidates:p})}else o.unshift.apply(o,a.children)}}return i},i0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},o0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qk(t))&&!i0(t)?0:t.tabIndex},Fk=function(t,r){var n=o0(t);return n<0&&r&&!i0(t)?0:n},Lk=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},a0=function(t){return t.tagName==="INPUT"},Nk=function(t){return a0(t)&&t.type==="hidden"},Dk=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},zk=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},Bk=function(t){if(!t.name)return!0;var r=t.form||Zs(t),n=function(u){return r.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=zk(i,t.form);return!o||o===t},Uk=function(t){return a0(t)&&t.type==="radio"},Wk=function(t){return Uk(t)&&!Bk(t)},Hk=function(t){var r,n=t&&Zs(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,u,l;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var s,c,d;n=Zs(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},r0=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},Vk=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=fo.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(fo.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var l=t.parentElement,s=Zs(t);if(l&&!l.shadowRoot&&i(l)===!0)return r0(t);t.assignedSlot?t=t.assignedSlot:!l&&s!==t.ownerDocument?t=s.host:t=l}t=u}if(Hk(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return r0(t);return!1},Gk=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return fo.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},$k=function(t,r){return!(r.disabled||Js(r)||Nk(r)||Vk(r,t)||Dk(r)||Gk(r))},_h=function(t,r){return!(Wk(r)||o0(r)<0||!$k(t,r))},Kk=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Yk=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,l=Fk(u,a),s=a?e(i.candidates):u;l===0?a?r.push.apply(r,s):r.push(u):n.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:s})}),n.sort(Lk).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Ya=function(t,r){r=r||{};var n;return r.getShadowRoot?n=jk([t],r.includeContainer,{filter:_h.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Kk}):n=Ik(t,r.includeContainer,_h.bind(null,r)),Yk(n)},u0=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return fo.call(t,Ys)===!1?!1:_h(r,t)}});var Xs=b((IJ,c0)=>{c0.exports=JBrowseExports["react-dom"]});function l0(e,t,r){let{reference:n,floating:i}=e,o=kr(t),a=$s(t),u=Gs(a),l=Rt(t),s=o==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[u]/2-i[u]/2,p;switch(l){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Kt(t)){case"start":p[a]-=f*(r&&s?-1:1);break;case"end":p[a]+=f*(r&&s?-1:1);break}return p}async function xn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Pt(t,e),h=Ks(p),g=u[f?d==="floating"?"reference":"floating":d],_=Xr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(g)))==null||r?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:l})),w=d==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),x=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},O=Xr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:y,strategy:l}):w);return{top:(_.top-O.top+h.top)/x.y,bottom:(O.bottom-_.bottom+h.bottom)/x.y,left:(_.left-O.left+h.left)/x.x,right:(O.right-_.right+h.right)/x.x}}function Zk(e,t,r){return(e?[...r.filter(i=>Kt(i)===e),...r.filter(i=>Kt(i)!==e)]:r.filter(i=>Rt(i)===i)).filter(i=>e?Kt(i)===e||(t?Ga(i)!==i:!1):!0)}function f0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function d0(e){return vh.some(t=>e[t]>=0)}function b0(e){let t=bt(...e.map(o=>o.left)),r=bt(...e.map(o=>o.top)),n=De(...e.map(o=>o.right)),i=De(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function Jk(e){let t=e.slice().sort((i,o)=>i.y-o.y),r=[],n=null;for(let i=0;i<t.length;i++){let o=t[i];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Xr(b0(i)))}async function Xk(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Rt(r),u=Kt(r),l=kr(r)==="y",s=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=Pt(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return u&&typeof h=="number"&&(p=u==="end"?h*-1:h),l?{x:p*c,y:f*s}:{x:f*s,y:p*c}}var p0,h0,m0,v0,g0,_0,y0,w0,x0,S0,O0=pt(()=>{Ka();Ka();p0=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=l0(s,n,l),f=n,p={},h=0;for(let m=0;m<u.length;m++){let{name:g,fn:_}=u[m],{x:w,y,data:x,reset:O}=await _({x:c,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});c=w??c,d=y??d,p={...p,[g]:{...p[g],...x}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(f=O.placement),O.rects&&(s=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:d}=l0(s,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};h0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:l}=t,{element:s,padding:c=0}=Pt(e,t)||{};if(s==null)return{};let d=Ks(c),f={x:r,y:n},p=$s(i),h=Gs(p),m=await a.getDimensions(s),g=p==="y",_=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[p]-f[p]-o.floating[h],O=f[p]-o.reference[p],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),T=A?A[y]:0;(!T||!await(a.isElement==null?void 0:a.isElement(A)))&&(T=u.floating[y]||o.floating[h]);let R=x/2-O/2,C=T/2-m[h]/2-1,M=bt(d[_],C),P=bt(d[w],C),N=M,k=T-m[h]-P,I=T/2-m[h]/2+R,W=Hs(N,I,k),j=!l.arrow&&Kt(i)!=null&&I!==W&&o.reference[h]/2-(I<N?M:P)-m[h]/2<0,D=j?I<N?I-N:I-k:0;return{[p]:f[p]+D,data:{[p]:W,centerOffset:I-W-D,...j&&{alignmentOffset:D}},reset:j}}});m0=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:a,placement:u,platform:l,elements:s}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:f=gh,autoAlignment:p=!0,...h}=Pt(e,t),m=d!==void 0||f===gh?Zk(d||null,p,f):f,g=await xn(t,h),_=((r=a.autoPlacement)==null?void 0:r.index)||0,w=m[_];if(w==null)return{};let y=bh(w,o,await(l.isRTL==null?void 0:l.isRTL(s.floating)));if(u!==w)return{reset:{placement:m[0]}};let x=[g[Rt(w)],g[y[0]],g[y[1]]],O=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:x}],A=m[_+1];if(A)return{data:{index:_+1,overflows:O},reset:{placement:A}};let T=O.map(M=>{let P=Kt(M.placement);return[M.placement,P&&c?M.overflows.slice(0,2).reduce((N,k)=>N+k,0):M.overflows[0],M.overflows]}).sort((M,P)=>M[1]-P[1]),C=((i=T.filter(M=>M[2].slice(0,Kt(M[0])?2:3).every(P=>P<=0))[0])==null?void 0:i[0])||T[0][0];return C!==u?{data:{index:_+1,overflows:O},reset:{placement:C}}:{}}}},v0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Pt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let _=Rt(i),w=kr(u),y=Rt(u)===u,x=await(l.isRTL==null?void 0:l.isRTL(s.floating)),O=f||(y||!m?[$a(u)]:e0(u)),A=h!=="none";!f&&A&&O.push(...t0(u,m,h,x));let T=[u,...O],R=await xn(t,g),C=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&C.push(R[_]),d){let I=bh(i,a,x);C.push(R[I[0]],R[I[1]])}if(M=[...M,{placement:i,overflows:C}],!C.every(I=>I<=0)){var P,N;let I=(((P=o.flip)==null?void 0:P.index)||0)+1,W=T[I];if(W)return{data:{index:I,overflows:M},reset:{placement:W}};let j=(N=M.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!j)switch(p){case"bestFit":{var k;let D=(k=M.filter(F=>{if(A){let z=kr(F.placement);return z===w||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,q)=>z+q,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:k[0];D&&(j=D);break}case"initialPlacement":j=u;break}if(i!==j)return{reset:{placement:j}}}return{}}}};g0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Pt(e,t);switch(n){case"referenceHidden":{let o=await xn(t,{...i,elementContext:"reference"}),a=f0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:d0(a)}}}case"escaped":{let o=await xn(t,{...i,altBoundary:!0}),a=f0(o,r.floating);return{data:{escapedOffsets:a,escaped:d0(a)}}}default:return{}}}}};_0=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:i,platform:o,strategy:a}=t,{padding:u=2,x:l,y:s}=Pt(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),d=Jk(c),f=Xr(b0(c)),p=Ks(u);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&s!=null)return d.find(g=>l>g.left-p.left&&l<g.right+p.right&&s>g.top-p.top&&s<g.bottom+p.bottom)||f;if(d.length>=2){if(kr(r)==="y"){let M=d[0],P=d[d.length-1],N=Rt(r)==="top",k=M.top,I=P.bottom,W=N?M.left:P.left,j=N?M.right:P.right,D=j-W,F=I-k;return{top:k,bottom:I,left:W,right:j,width:D,height:F,x:W,y:k}}let g=Rt(r)==="left",_=De(...d.map(M=>M.right)),w=bt(...d.map(M=>M.left)),y=d.filter(M=>g?M.left===w:M.right===_),x=y[0].top,O=y[y.length-1].bottom,A=w,T=_,R=T-A,C=O-x;return{top:x,bottom:O,left:A,right:T,width:R,height:C,x:A,y:x}}return f}let m=await o.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:a});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};y0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:u}=t,l=await Xk(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},w0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:g=>{let{x:_,y:w}=g;return{x:_,y:w}}},...l}=Pt(e,t),s={x:r,y:n},c=await xn(t,l),d=kr(Rt(i)),f=Vs(d),p=s[f],h=s[d];if(o){let g=f==="y"?"top":"left",_=f==="y"?"bottom":"right",w=p+c[g],y=p-c[_];p=Hs(w,p,y)}if(a){let g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=h+c[g],y=h-c[_];h=Hs(w,h,y)}let m=u.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:o,[d]:a}}}}}},x0=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=Pt(e,t),c={x:r,y:n},d=kr(i),f=Vs(d),p=c[f],h=c[d],m=Pt(u,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",x=o.reference[f]-o.floating[y]+g.mainAxis,O=o.reference[f]+o.reference[y]-g.mainAxis;p<x?p=x:p>O&&(p=O)}if(s){var _,w;let y=f==="y"?"width":"height",x=["top","left"].includes(Rt(i)),O=o.reference[d]-o.floating[y]+(x&&((_=a.offset)==null?void 0:_[d])||0)+(x?0:g.crossAxis),A=o.reference[d]+o.reference[y]+(x?0:((w=a.offset)==null?void 0:w[d])||0)-(x?g.crossAxis:0);h<O?h=O:h>A&&(h=A)}return{[f]:p,[d]:h}}}},S0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:i,rects:o,platform:a,elements:u}=t,{apply:l=()=>{},...s}=Pt(e,t),c=await xn(t,s),d=Rt(i),f=Kt(i),p=kr(i)==="y",{width:h,height:m}=o.floating,g,_;d==="top"||d==="bottom"?(g=d,_=f===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(_=d,g=f==="end"?"top":"bottom");let w=m-c.top-c.bottom,y=h-c.left-c.right,x=bt(m-c[g],w),O=bt(h-c[_],y),A=!t.middlewareData.shift,T=x,R=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),A&&!f){let M=De(c.left,0),P=De(c.right,0),N=De(c.top,0),k=De(c.bottom,0);p?R=h-2*(M!==0||P!==0?M+P:De(c.left,c.right)):T=m-2*(N!==0||k!==0?N+k:De(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:T});let C=await a.getDimensions(u.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}}});function T0(e){let t=gt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=qe(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=gi(r)!==o||gi(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function wh(e){return ye(e)?e:e.contextElement}function po(e){let t=wh(e);if(!qe(t))return fr(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=T0(t),a=(o?gi(r.width):r.width)/n,u=(o?gi(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function P0(e){let t=rt(e);return!lo()||!t.visualViewport?Qk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eq(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rt(e)?!1:t}function bi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=wh(e),a=fr(1);t&&(n?ye(n)&&(a=po(n)):a=po(e));let u=eq(o,r,n)?P0(o):fr(0),l=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){let f=rt(o),p=n&&ye(n)?rt(n):n,h=f,m=Ns(h);for(;m&&n&&p!==h;){let g=po(m),_=m.getBoundingClientRect(),w=gt(m),y=_.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,x=_.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,s*=g.y,c*=g.x,d*=g.y,l+=y,s+=x,h=rt(m),m=Ns(h)}}return Xr({width:c,height:d,x:l,y:s})}function xh(e,t){let r=Ha(e).scrollLeft;return t?t.left+r:bi(sr(e)).left+r}function R0(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:xh(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function tq(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=sr(n),u=t?Wa(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},s=fr(1),c=fr(0),d=qe(n);if((d||!d&&!o)&&((Cr(n)!=="body"||co(a))&&(l=Ha(n)),qe(n))){let p=bi(n);s=po(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}let f=a&&!d&&!o?R0(a,l,!0):fr(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-l.scrollLeft*s.x+c.x+f.x,y:r.y*s.y-l.scrollTop*s.y+c.y+f.y}}function rq(e){return Array.from(e.getClientRects())}function nq(e){let t=sr(e),r=Ha(e),n=e.ownerDocument.body,i=De(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=De(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+xh(e),u=-r.scrollTop;return gt(n).direction==="rtl"&&(a+=De(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function iq(e,t){let r=rt(e),n=sr(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;let s=lo();(!s||s&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u,y:l}}function oq(e,t){let r=bi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=qe(e)?po(e):fr(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,l=i*o.x,s=n*o.y;return{width:a,height:u,x:l,y:s}}function E0(e,t,r){let n;if(t==="viewport")n=iq(e,r);else if(t==="document")n=nq(sr(e));else if(ye(t))n=oq(t,r);else{let i=P0(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Xr(n)}function M0(e,t){let r=ur(e);return r===t||!ye(r)||cr(r)?!1:gt(r).position==="fixed"||M0(r,t)}function aq(e,t){let r=t.get(e);if(r)return r;let n=Tt(e,[],!1).filter(u=>ye(u)&&Cr(u)!=="body"),i=null,o=gt(e).position==="fixed",a=o?ur(e):e;for(;ye(a)&&!cr(a);){let u=gt(a),l=Ls(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||co(a)&&!l&&M0(e,a))?n=n.filter(c=>c!==a):i=u,a=ur(a)}return t.set(e,n),n}function uq(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?Wa(t)?[]:aq(t,this._c):[].concat(r),n],u=a[0],l=a.reduce((s,c)=>{let d=E0(t,c,i);return s.top=De(d.top,s.top),s.right=bt(d.right,s.right),s.bottom=bt(d.bottom,s.bottom),s.left=De(d.left,s.left),s},E0(t,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sq(e){let{width:t,height:r}=T0(e);return{width:t,height:r}}function cq(e,t,r){let n=qe(t),i=sr(t),o=r==="fixed",a=bi(e,!0,o,t),u={scrollLeft:0,scrollTop:0},l=fr(0);if(n||!n&&!o)if((Cr(t)!=="body"||co(i))&&(u=Ha(t)),n){let f=bi(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=xh(i));let s=i&&!n&&!o?R0(i,u):fr(0),c=a.left+u.scrollLeft-l.x-s.x,d=a.top+u.scrollTop-l.y-s.y;return{x:c,y:d,width:a.width,height:a.height}}function yh(e){return gt(e).position==="static"}function A0(e,t){if(!qe(e)||gt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sr(e)===r&&(r=r.ownerDocument.body),r}function C0(e,t){let r=rt(e);if(Wa(e))return r;if(!qe(e)){let i=ur(e);for(;i&&!cr(i);){if(ye(i)&&!yh(i))return i;i=ur(i)}return r}let n=A0(e,t);for(;n&&Gy(n)&&yh(n);)n=A0(n,t);return n&&cr(n)&&yh(n)&&!Ls(n)?r:n||$y(e)||r}function fq(e){return gt(e).direction==="rtl"}function k0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dq(e,t){let r=null,n,i=sr(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),o();let s=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=s;if(u||t(),!f||!p)return;let h=wn(d),m=wn(i.clientWidth-(c+f)),g=wn(i.clientHeight-(d+p)),_=wn(c),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-_+"px",threshold:De(0,bt(1,l))||1},x=!0;function O(A){let T=A[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):n=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!k0(s,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(O,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(O,y)}r.observe(e)}return a(!0),o}function Sh(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,s=wh(e),c=i||o?[...s?Tt(s):[],...Tt(t)]:[];c.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});let d=s&&u?dq(s,r):null,f=-1,p=null;a&&(p=new ResizeObserver(_=>{let[w]=_;w&&w.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),r()}),s&&!l&&p.observe(s),p.observe(t));let h,m=l?bi(e):null;l&&g();function g(){let _=bi(e);m&&!k0(m,_)&&r(),m=_,h=requestAnimationFrame(g)}return r(),()=>{var _;c.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d?.(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var Qk,lq,Qs,_i,q0,I0,j0,F0,L0,N0,Oh,D0,z0,Za,Eh=pt(()=>{O0();Ka();Va();Va();Qk=fr(0);lq=async function(e){let t=this.getOffsetParent||C0,r=this.getDimensions,n=await r(e.floating);return{reference:cq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};Qs={convertOffsetParentRelativeRectToViewportRelativeRect:tq,getDocumentElement:sr,getClippingRect:uq,getOffsetParent:C0,getElementRects:lq,getClientRects:rq,getDimensions:sq,getScale:po,isElement:ye,isRTL:fq};_i=xn,q0=y0,I0=m0,j0=w0,F0=v0,L0=S0,N0=g0,Oh=h0,D0=_0,z0=x0,Za=(e,t,r)=>{let n=new Map,i={platform:Qs,...r},o={...i.platform,_c:n};return p0(e,t,{...i,platform:o})}});function tc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!tc(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!tc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function W0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function B0(e,t){let r=W0(e);return Math.round(t*r)/r}function Ah(e){let t=He.useRef(e);return ec(()=>{t.current=e}),t}function H0(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:l,open:s}=e,[c,d]=He.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=He.useState(n);tc(f,n)||p(n);let[h,m]=He.useState(null),[g,_]=He.useState(null),w=He.useCallback(F=>{F!==A.current&&(A.current=F,m(F))},[]),y=He.useCallback(F=>{F!==T.current&&(T.current=F,_(F))},[]),x=o||h,O=a||g,A=He.useRef(null),T=He.useRef(null),R=He.useRef(c),C=l!=null,M=Ah(l),P=Ah(i),N=Ah(s),k=He.useCallback(()=>{if(!A.current||!T.current)return;let F={placement:t,strategy:r,middleware:f};P.current&&(F.platform=P.current),Za(A.current,T.current,F).then(z=>{let q={...z,isPositioned:N.current!==!1};I.current&&!tc(R.current,q)&&(R.current=q,U0.flushSync(()=>{d(q)}))})},[f,t,r,P,N]);ec(()=>{s===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[s]);let I=He.useRef(!1);ec(()=>(I.current=!0,()=>{I.current=!1}),[]),ec(()=>{if(x&&(A.current=x),O&&(T.current=O),x&&O){if(M.current)return M.current(x,O,k);k()}},[x,O,k,M,C]);let W=He.useMemo(()=>({reference:A,floating:T,setReference:w,setFloating:y}),[w,y]),j=He.useMemo(()=>({reference:x,floating:O}),[x,O]),D=He.useMemo(()=>{let F={position:r,left:0,top:0};if(!j.floating)return F;let z=B0(j.floating,c.x),q=B0(j.floating,c.y);return u?{...F,transform:"translate("+z+"px, "+q+"px)",...W0(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:q}},[r,u,j.floating,c.x,c.y]);return He.useMemo(()=>({...c,update:k,refs:W,elements:j,floatingStyles:D}),[c,k,W,j,D])}var He,rc,U0,ec,pq,nc,V0,G0,$0,K0,Y0,Z0,J0,X0,Th=pt(()=>{Eh();Eh();He=V(Ye(),1),rc=V(Ye(),1),U0=V(Xs(),1),ec=typeof document<"u"?rc.useLayoutEffect:rc.useEffect;pq=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Oh({element:n.current,padding:i}).fn(r):{}:n?Oh({element:n,padding:i}).fn(r):{}}}},nc=(e,t)=>({...q0(e),options:[e,t]}),V0=(e,t)=>({...j0(e),options:[e,t]}),G0=(e,t)=>({...z0(e),options:[e,t]}),$0=(e,t)=>({...F0(e),options:[e,t]}),K0=(e,t)=>({...L0(e),options:[e,t]}),Y0=(e,t)=>({...I0(e),options:[e,t]}),Z0=(e,t)=>({...N0(e),options:[e,t]}),J0=(e,t)=>({...D0(e),options:[e,t]}),X0=(e,t)=>({...pq(e),options:[e,t]})});var Kw={};np(Kw,{Composite:()=>gq,CompositeItem:()=>bq,FloatingArrow:()=>xq,FloatingDelayGroup:()=>Tq,FloatingFocusManager:()=>Nq,FloatingList:()=>Pw,FloatingNode:()=>Oq,FloatingOverlay:()=>zq,FloatingPortal:()=>jq,FloatingTree:()=>Eq,arrow:()=>X0,autoPlacement:()=>Y0,autoUpdate:()=>Sh,computePosition:()=>Za,detectOverflow:()=>_i,flip:()=>$0,getOverflowAncestors:()=>Tt,hide:()=>Z0,inline:()=>J0,inner:()=>nI,limitShift:()=>G0,offset:()=>nc,platform:()=>Qs,safePolygon:()=>aI,shift:()=>V0,size:()=>K0,useClick:()=>Bq,useClientPoint:()=>Wq,useDelayGroup:()=>Pq,useDelayGroupContext:()=>Nw,useDismiss:()=>Gq,useFloating:()=>$q,useFloatingNodeId:()=>Sq,useFloatingParentNodeId:()=>Ei,useFloatingPortalNode:()=>Hw,useFloatingRootContext:()=>Gw,useFloatingTree:()=>Ai,useFocus:()=>Kq,useHover:()=>Aq,useId:()=>yo,useInnerOffset:()=>iI,useInteractions:()=>Yq,useListItem:()=>Rw,useListNavigation:()=>Jq,useMergeRefs:()=>lc,useRole:()=>Qq,useTransitionStatus:()=>$w,useTransitionStyles:()=>tI,useTypeahead:()=>rI});function lc(e){return E.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}function Ie(e){let t=E.useRef(()=>{});return mq(()=>{t.current=e}),E.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function ic(e,t,r){return Math.floor(e/t)!==r}function vo(e,t){return t<0||t>=e.current.length}function sc(e,t){return nt(e,{disabledIndices:t})}function Ih(e,t){return nt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nt(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t,a=e.current,u=r;do u+=n?-o:o;while(u>=0&&u<=a.length-1&&xi(a,u,i));return u}function Sw(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:u,minIndex:l,maxIndex:s,prevIndex:c,stopEvent:d=!1}=t,f=c;if(r.key===bo){if(d&&Je(r),c===-1)f=s;else if(f=nt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:u}),i&&(c-a<l||f<0)){let p=c%a,h=s%a,m=s-(h-p);h===p?f=s:f=h>p?m:m-a}vo(e,f)&&(f=c)}if(r.key===Qr&&(d&&Je(r),c===-1?f=l:(f=nt(e,{startingIndex:c,amount:a,disabledIndices:u}),i&&c+a>s&&(f=nt(e,{startingIndex:c%a-a,amount:a,disabledIndices:u}))),vo(e,f)&&(f=c)),n==="both"){let p=wn(c/a);r.key===(o?dr:pr)&&(d&&Je(r),c%a!==a-1?(f=nt(e,{startingIndex:c,disabledIndices:u}),i&&ic(f,a,p)&&(f=nt(e,{startingIndex:c-c%a-1,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:c-c%a-1,disabledIndices:u})),ic(f,a,p)&&(f=c)),r.key===(o?pr:dr)&&(d&&Je(r),c%a!==0?(f=nt(e,{startingIndex:c,decrement:!0,disabledIndices:u}),i&&ic(f,a,p)&&(f=nt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u})),ic(f,a,p)&&(f=c));let h=wn(s/a)===p;vo(e,f)&&(i&&h?f=r.key===(o?pr:dr)?s:nt(e,{startingIndex:c-c%a-1,disabledIndices:u}):f=c)}return f}function Ow(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:u,height:l}=o;u>t;let s=!1;for(r&&(i=0);!s;){let c=[];for(let d=0;d<u;d++)for(let f=0;f<l;f++)c.push(i+d+f*t);i%t+u<=t&&c.every(d=>n[d]==null)?(c.forEach(d=>{n[d]=a}),s=!0):i++}}),[...n]}function Ew(e,t,r,n,i){if(e===-1)return-1;let o=r.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*n:o;case"br":return r.lastIndexOf(e)}}function Aw(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function xi(e,t,r){if(r)return r.includes(t);let n=e[t];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function vq(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Pw(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=E.useState(()=>new Set),a=E.useCallback(s=>{o(c=>new Set(c).add(s))},[]),u=E.useCallback(s=>{o(c=>{let d=new Set(c);return d.delete(s),d})},[]),l=E.useMemo(()=>{let s=new Map;return Array.from(i.keys()).sort(vq).forEach((d,f)=>{s.set(d,f)}),s},[i]);return(0,Ee.jsx)(Tw.Provider,{value:E.useMemo(()=>({register:a,unregister:u,map:l,elementsRef:r,labelsRef:n}),[a,u,l,r,n]),children:t})}function Rw(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=E.useContext(Tw),[u,l]=E.useState(null),s=E.useRef(null),c=E.useCallback(d=>{if(s.current=d,u!==null&&(o.current[u]=d,a)){var f;let p=t!==void 0;a.current[u]=p?t:(f=d?.textContent)!=null?f:null}},[u,o,a,t]);return pe(()=>{let d=s.current;if(d)return r(d),()=>{n(d)}},[r,n]),pe(()=>{let d=s.current?i.get(s.current):null;d!=null&&l(d)},[i]),E.useMemo(()=>({ref:c,index:u??-1}),[u,c])}function Mw(e,t){return typeof e=="function"?e(t):e?E.cloneElement(e,t):(0,Ee.jsx)("div",{...t})}function yq(){let[e,t]=E.useState(()=>Q0?ew():void 0);return pe(()=>{e==null&&t(ew())},[]),E.useEffect(()=>{Q0=!0},[]),e}function Iw(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(i=>i(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(i=>i!==r))||[])}}}function Sq(e){let t=yo(),r=Ai(),n=Ei(),i=e||n;return pe(()=>{if(!t)return;let o={id:t,parentId:i};return r?.addNode(o),()=>{r?.removeNode(o)}},[r,t,i]),t}function Oq(e){let{children:t,id:r}=e,n=Ei();return(0,Ee.jsx)(jw.Provider,{value:E.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function Eq(e){let{children:t}=e,r=E.useRef([]),n=E.useCallback(a=>{r.current=[...r.current,a]},[]),i=E.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),o=E.useState(()=>Iw())[0];return(0,Ee.jsx)(Fw.Provider,{value:E.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function Oi(e){return"data-floating-ui-"+e}function it(e){let t=(0,_o.useRef)(e);return pe(()=>{t.current=e}),t}function cc(e,t,r){return r&&!vi(r)?0:typeof e=="number"?e:e?.[t]}function Aq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:u=!0,delay:l=0,handleClose:s=null,mouseOnly:c=!1,restMs:d=0,move:f=!0}=t,p=Ai(),h=Ei(),m=it(s),g=it(l),_=it(r),w=E.useRef(),y=E.useRef(-1),x=E.useRef(),O=E.useRef(-1),A=E.useRef(!0),T=E.useRef(!1),R=E.useRef(()=>{}),C=E.useRef(!1),M=E.useCallback(()=>{var D;let F=(D=i.current.openEvent)==null?void 0:D.type;return F?.includes("mouse")&&F!=="mousedown"},[i]);E.useEffect(()=>{if(!u)return;function D(F){let{open:z}=F;z||(clearTimeout(y.current),clearTimeout(O.current),A.current=!0,C.current=!1)}return o.on("openchange",D),()=>{o.off("openchange",D)}},[u,o]),E.useEffect(()=>{if(!u||!m.current||!r)return;function D(z){M()&&n(!1,z,"hover")}let F=Ze(a.floating).documentElement;return F.addEventListener("mouseleave",D),()=>{F.removeEventListener("mouseleave",D)}},[a.floating,r,n,u,m,M]);let P=E.useCallback(function(D,F,z){F===void 0&&(F=!0),z===void 0&&(z="hover");let q=cc(g.current,"close",w.current);q&&!x.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>n(!1,D,z),q)):F&&(clearTimeout(y.current),n(!1,D,z))},[g,n]),N=Ie(()=>{R.current(),x.current=void 0}),k=Ie(()=>{if(T.current){let D=Ze(a.floating).body;D.style.pointerEvents="",D.removeAttribute(tw),T.current=!1}}),I=Ie(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);E.useEffect(()=>{if(!u)return;function D(B){if(clearTimeout(y.current),A.current=!1,c&&!vi(w.current)||d>0&&!cc(g.current,"open"))return;let $=cc(g.current,"open",w.current);$?y.current=window.setTimeout(()=>{_.current||n(!0,B,"hover")},$):r||n(!0,B,"hover")}function F(B){if(I())return;R.current();let $=Ze(a.floating);if(clearTimeout(O.current),C.current=!1,m.current&&i.current.floatingContext){r||clearTimeout(y.current),x.current=m.current({...i.current.floatingContext,tree:p,x:B.clientX,y:B.clientY,onClose(){k(),N(),I()||P(B,!0,"safe-polygon")}});let ge=x.current;$.addEventListener("mousemove",ge),R.current=()=>{$.removeEventListener("mousemove",ge)};return}(w.current==="touch"?!Ne(a.floating,B.relatedTarget):!0)&&P(B)}function z(B){I()||i.current.floatingContext&&(m.current==null||m.current({...i.current.floatingContext,tree:p,x:B.clientX,y:B.clientY,onClose(){k(),N(),I()||P(B)}})(B))}if(ye(a.domReference)){var q;let B=a.domReference;return r&&B.addEventListener("mouseleave",z),(q=a.floating)==null||q.addEventListener("mouseleave",z),f&&B.addEventListener("mousemove",D,{once:!0}),B.addEventListener("mouseenter",D),B.addEventListener("mouseleave",F),()=>{var $;r&&B.removeEventListener("mouseleave",z),($=a.floating)==null||$.removeEventListener("mouseleave",z),f&&B.removeEventListener("mousemove",D),B.removeEventListener("mouseenter",D),B.removeEventListener("mouseleave",F)}}},[a,u,e,c,d,f,P,N,k,n,r,_,p,g,m,i,I]),pe(()=>{var D;if(u&&r&&(D=m.current)!=null&&D.__options.blockPointerEvents&&M()){T.current=!0;let z=a.floating;if(ye(a.domReference)&&z){var F;let q=Ze(a.floating).body;q.setAttribute(tw,"");let B=a.domReference,$=p==null||(F=p.nodesRef.current.find(Q=>Q.id===h))==null||(F=F.context)==null?void 0:F.elements.floating;return $&&($.style.pointerEvents=""),q.style.pointerEvents="none",B.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",B.style.pointerEvents="",z.style.pointerEvents=""}}}},[u,r,h,a,p,m,M]),pe(()=>{r||(w.current=void 0,C.current=!1,N(),k())},[r,N,k]),E.useEffect(()=>()=>{N(),clearTimeout(y.current),clearTimeout(O.current),k()},[u,a.domReference,N,k]);let W=E.useMemo(()=>{function D(F){w.current=F.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(F){let{nativeEvent:z}=F;function q(){!A.current&&!_.current&&n(!0,z,"hover")}c&&!vi(w.current)||r||d===0||C.current&&F.movementX**2+F.movementY**2<2||(clearTimeout(O.current),w.current==="touch"?q():(C.current=!0,O.current=window.setTimeout(q,d)))}}},[c,n,r,_,d]),j=E.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(D){I()||P(D.nativeEvent,!1)}}),[P,I]);return E.useMemo(()=>u?{reference:W,floating:j}:{},[u,W,j])}function Tq(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=E.useReducer((l,s)=>({...l,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=E.useRef(null),u=E.useCallback(l=>{o({currentId:l})},[]);return pe(()=>{i.currentId?a.current===null?a.current=i.currentId:i.isInstantPhase||o({isInstantPhase:!0}):(i.isInstantPhase&&o({isInstantPhase:!1}),a.current=null)},[i.currentId,i.isInstantPhase]),(0,Ee.jsx)(Lw.Provider,{value:E.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function Pq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,l=Nw(),{currentId:s,setCurrentId:c,initialDelay:d,setState:f,timeoutMs:p}=l;return pe(()=>{a&&s&&(f({delay:{open:1,close:cc(d,"close")}}),s!==u&&n(!1))},[a,u,n,f,s,d]),pe(()=>{function h(){n(!1),f({delay:d,currentId:null})}if(a&&s&&!r&&s===u){if(p){let m=window.setTimeout(h,p);return()=>{clearTimeout(m)}}h()}},[a,r,f,s,u,n,d,p]),pe(()=>{a&&(c===jh||!r||c(u))},[a,r,c,u]),l}function yi(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(rw);let o=()=>e?.focus({preventScroll:r});i?o():rw=requestAnimationFrame(o)}function nw(e,t){var r;let n=[],i=(r=e.find(o=>o.id===t))==null?void 0:r.parentId;for(;i;){let o=e.find(a=>a.id===i);i=o?.parentId,o&&(n=n.concat(o))}return n}function Si(e,t){let r=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),n=r;for(;n.length;)n=e.filter(i=>{var o;return(o=n)==null?void 0:o.some(a=>{var u;return i.parentId===a.id&&((u=i.context)==null?void 0:u.open)})}),r=r.concat(n);return r}function Rq(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),Si(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function kq(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=Cq(t,e),u=new Set,l=new Set(a),s=[];ac[i]||(ac[i]=new WeakMap);let c=ac[i];a.forEach(d),f(t),u.clear();function d(p){!p||u.has(p)||(u.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(Cr(h)!=="script")if(u.has(h))f(h);else{let m=o?h.getAttribute(o):null,g=m!==null&&m!=="false",_=ho.get(h)||0,w=o?_+1:_,y=(c.get(h)||0)+1;ho.set(h,w),c.set(h,y),s.push(h),w===1&&g&&oc.add(h),y===1&&h.setAttribute(i,""),!g&&o&&h.setAttribute(o,"true")}})}return Rh++,()=>{s.forEach(p=>{let h=ho.get(p)||0,m=o?h-1:h,g=(c.get(p)||0)-1;ho.set(p,m),c.set(p,g),m||(!oc.has(p)&&o&&p.removeAttribute(o),oc.delete(p)),g||p.removeAttribute(i)}),Rh--,Rh||(ho=new WeakMap,ho=new WeakMap,oc=new WeakSet,ac={})}}function iw(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=Ze(e[0]).body;return kq(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}function zw(e,t){let r=Ya(e,dc());t==="prev"&&r.reverse();let n=r.indexOf($t(Ze(e)));return r.slice(n+1)[0]}function Bw(){return zw(document.body,"next")}function Uw(){return zw(document.body,"prev")}function Ja(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ne(r,n)}function qq(e){Ya(e,dc()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function ow(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{let n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}function aw(e){e.key==="Tab"&&(e.target,clearTimeout(Iq))}function Hw(e){e===void 0&&(e={});let{id:t,root:r}=e,n=yo(),i=Vw(),[o,a]=E.useState(null),u=E.useRef(null);return pe(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),pe(()=>{if(!n||u.current)return;let l=t?document.getElementById(t):null;if(!l)return;let s=document.createElement("div");s.id=n,s.setAttribute(uw,""),l.appendChild(s),u.current=s,a(s)},[t,n]),pe(()=>{if(r===null||!n||u.current)return;let l=r||i?.portalNode;l&&!ye(l)&&(l=l.current),l=l||document.body;let s=null;t&&(s=document.createElement("div"),s.id=t,l.appendChild(s));let c=document.createElement("div");c.id=n,c.setAttribute(uw,""),l=s||l,l.appendChild(c),u.current=c,a(c)},[t,r,n,i]),o}function jq(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=Hw({id:r,root:n}),[a,u]=E.useState(null),l=E.useRef(null),s=E.useRef(null),c=E.useRef(null),d=E.useRef(null),f=a?.modal,p=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return E.useEffect(()=>{if(!o||!i||f)return;function m(g){o&&Ja(g)&&(g.type==="focusin"?ow:qq)(o)}return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)}},[o,i,f]),E.useEffect(()=>{o&&(p||ow(o))},[p,o]),(0,Ee.jsxs)(Ww.Provider,{value:E.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,Ee.jsx)(fc,{"data-type":"outside",ref:l,onFocus:m=>{if(Ja(m,o)){var g;(g=c.current)==null||g.focus()}else{let _=Uw()||a?.domReference;_?.focus()}}}),h&&o&&(0,Ee.jsx)("span",{"aria-owns":o.id,style:pc}),o&&go.createPortal(t,o),h&&o&&(0,Ee.jsx)(fc,{"data-type":"outside",ref:s,onFocus:m=>{if(Ja(m,o)){var g;(g=d.current)==null||g.focus()}else{let _=Bw()||a?.domReference;_?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}function Lh(e){return e?e.hasAttribute(Fh)?e:e.querySelector("["+Fh+"]")||e:null}function Mh(e){wi=wi.filter(t=>t.isConnected),e&&Cr(e)!=="body"&&(wi.push(e),wi.length>sw&&(wi=wi.slice(-sw)))}function cw(){return wi.slice().reverse().find(e=>e.isConnected)}function Fq(e){let t=dc();return u0(e,t)?e:Ya(e,t)[0]||e}function Nq(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:u=!0,restoreFocus:l=!1,modal:s=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1}=e,{open:p,onOpenChange:h,events:m,dataRef:g,elements:{domReference:_,floating:w}}=t,y=Ie(()=>{var K;return(K=g.current.floatingContext)==null?void 0:K.nodeId}),x=typeof a=="number"&&a<0,O=mh(_)&&x,A=Mq(),T=A?o:!0,R=!T||A&&f,C=it(i),M=it(a),P=it(u),N=Ai(),k=Vw(),I=E.useRef(null),W=E.useRef(null),j=E.useRef(!1),D=E.useRef(!1),F=E.useRef(-1),z=k!=null,q=Lh(w),B=Ie(function(K){return K===void 0&&(K=q),K?Ya(K,dc()):[]}),$=Ie(K=>{let ne=B(K);return C.current.map(ee=>_&&ee==="reference"?_:q&&ee==="floating"?q:ne).filter(Boolean).flat()});E.useEffect(()=>{if(n||!s)return;function K(ee){if(ee.key==="Tab"){Ne(q,$t(Ze(q)))&&B().length===0&&!O&&Je(ee);let te=$(),_e=lr(ee);C.current[0]==="reference"&&_e===_&&(Je(ee),ee.shiftKey?yi(te[te.length-1]):yi(te[1])),C.current[1]==="floating"&&_e===q&&ee.shiftKey&&(Je(ee),yi(te[0]))}}let ne=Ze(q);return ne.addEventListener("keydown",K),()=>{ne.removeEventListener("keydown",K)}},[n,_,q,s,C,O,B,$]),E.useEffect(()=>{if(n||!w)return;function K(ne){let ee=lr(ne),_e=B().indexOf(ee);_e!==-1&&(F.current=_e)}return w.addEventListener("focusin",K),()=>{w.removeEventListener("focusin",K)}},[n,w,B]),E.useEffect(()=>{if(n||!d)return;function K(){D.current=!0,setTimeout(()=>{D.current=!1})}function ne(ee){let te=ee.relatedTarget;queueMicrotask(()=>{let _e=y(),xe=!(Ne(_,te)||Ne(w,te)||Ne(te,w)||Ne(k?.portalNode,te)||te!=null&&te.hasAttribute(Oi("focus-guard"))||N&&(Si(N.nodesRef.current,_e).find(be=>{var We,Pe;return Ne((We=be.context)==null?void 0:We.elements.floating,te)||Ne((Pe=be.context)==null?void 0:Pe.elements.domReference,te)})||nw(N.nodesRef.current,_e).find(be=>{var We,Pe,ft;return[(We=be.context)==null?void 0:We.elements.floating,Lh((Pe=be.context)==null?void 0:Pe.elements.floating)].includes(te)||((ft=be.context)==null?void 0:ft.elements.domReference)===te})));if(l&&xe&&$t(Ze(q))===Ze(q).body){qe(q)&&q.focus();let be=F.current,We=B(),Pe=We[be]||We[We.length-1]||q;qe(Pe)&&Pe.focus()}(O||!s)&&te&&xe&&!D.current&&te!==cw()&&(j.current=!0,h(!1,ee,"focus-out"))})}if(w&&qe(_))return _.addEventListener("focusout",ne),_.addEventListener("pointerdown",K),w.addEventListener("focusout",ne),()=>{_.removeEventListener("focusout",ne),_.removeEventListener("pointerdown",K),w.removeEventListener("focusout",ne)}},[n,_,w,q,s,N,k,h,d,l,B,O,y]);let Q=E.useRef(null),ge=E.useRef(null),le=lc([Q,k?.beforeInsideRef]),Te=lc([ge,k?.afterInsideRef]);E.useEffect(()=>{var K;if(n||!w)return;let ne=Array.from((k==null||(K=k.portalNode)==null?void 0:K.querySelectorAll("["+Oi("portal")+"]"))||[]),ee=N&&!s?nw(N?.nodesRef.current,y()).map(xe=>{var be;return(be=xe.context)==null?void 0:be.elements.floating}):[],te=[w,...ne,...ee,I.current,W.current,Q.current,ge.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,C.current.includes("reference")||O?_:null].filter(xe=>xe!=null),_e=s||O?iw(te,!R,R):iw(te);return()=>{_e()}},[n,_,w,s,C,k,O,T,R,N,y]),pe(()=>{if(n||!qe(q))return;let K=Ze(q),ne=$t(K);queueMicrotask(()=>{let ee=$(q),te=M.current,_e=(typeof te=="number"?ee[te]:te.current)||q,xe=Ne(q,ne);!x&&!xe&&p&&yi(_e,{preventScroll:_e===q})})},[n,p,q,x,$,M]),pe(()=>{if(n||!q)return;let K=!1,ne=Ze(q),ee=$t(ne),_e=g.current.openEvent;Mh(ee);function xe(Pe){let{open:ft,reason:re,event:fe,nested:J}=Pe;ft&&(_e=fe),re==="escape-key"&&_&&Mh(_),["hover","safe-polygon"].includes(re)&&fe.type==="mouseleave"&&(j.current=!0),re==="outside-press"&&(J?(j.current=!1,K=!0):j.current=!(ph(fe)||Bs(fe)))}m.on("openchange",xe);let be=ne.createElement("span");be.setAttribute("tabindex","-1"),be.setAttribute("aria-hidden","true"),Object.assign(be.style,pc),z&&_&&_.insertAdjacentElement("afterend",be);function We(){return typeof P.current=="boolean"?cw()||be:P.current.current||be}return()=>{m.off("openchange",xe);let Pe=$t(ne),ft=Ne(w,Pe)||N&&Si(N.nodesRef.current,y()).some(J=>{var ie;return Ne((ie=J.context)==null?void 0:ie.elements.floating,Pe)});(ft||_e&&["click","mousedown"].includes(_e.type))&&_&&Mh(_);let fe=We();queueMicrotask(()=>{let J=Fq(fe);P.current&&!j.current&&qe(J)&&(!(J!==Pe&&Pe!==ne.body)||ft)&&J.focus({preventScroll:K}),be.remove()})}},[n,w,q,P,g,m,N,z,_,y]),E.useEffect(()=>{queueMicrotask(()=>{j.current=!1})},[n]),pe(()=>{if(!n&&k)return k.setFocusManagerState({modal:s,closeOnFocusOut:d,open:p,onOpenChange:h,domReference:_}),()=>{k.setFocusManagerState(null)}},[n,k,s,p,h,d,_]),pe(()=>{if(n||!q||typeof MutationObserver!="function"||x)return;let K=()=>{let ee=q.getAttribute("tabindex"),te=B(),_e=$t(Ze(w)),xe=te.indexOf(_e);xe!==-1&&(F.current=xe),C.current.includes("floating")||_e!==_&&te.length===0?ee!=="0"&&q.setAttribute("tabindex","0"):ee!=="-1"&&q.setAttribute("tabindex","-1")};K();let ne=new MutationObserver(K);return ne.observe(q,{childList:!0,subtree:!0,attributes:!0}),()=>{ne.disconnect()}},[n,w,q,_,C,B,x]);function Ae(K){return n||!c||!s?null:(0,Ee.jsx)(Lq,{ref:K==="start"?I:W,onClick:ne=>h(!1,ne.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let ae=!n&&T&&(s?!O:!0)&&(z||s);return(0,Ee.jsxs)(Ee.Fragment,{children:[ae&&(0,Ee.jsx)(fc,{"data-type":"inside",ref:le,onFocus:K=>{if(s){let ee=$();yi(i[0]==="reference"?ee[0]:ee[ee.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(j.current=!1,Ja(K,k.portalNode)){let ee=Bw()||_;ee?.focus()}else{var ne;(ne=k.beforeOutsideRef.current)==null||ne.focus()}}}),!O&&Ae("start"),r,Ae("end"),ae&&(0,Ee.jsx)(fc,{"data-type":"inside",ref:Te,onFocus:K=>{if(s)yi($()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(d&&(j.current=!0),Ja(K,k.portalNode)){let ee=Uw()||_;ee?.focus()}else{var ne;(ne=k.afterOutsideRef.current)==null||ne.focus()}}})]})}function Dq(){let e=/iP(hone|ad|od)|iOS/.test(Ds()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,a=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",i&&(t[n]=i+"px"),e){var u,l;let s=((u=window.visualViewport)==null?void 0:u.offsetLeft)||0,c=((l=window.visualViewport)==null?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(c))+"px",left:-(o-Math.floor(s))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,a))}}function fw(e){return qe(e.target)&&e.target.tagName==="BUTTON"}function dw(e){return Ws(e)}function Bq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:u="click",toggle:l=!0,ignoreMouse:s=!1,keyboardHandlers:c=!0,stickIfOpen:d=!0}=t,f=E.useRef(),p=E.useRef(!1),h=E.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){let g=f.current;m.button===0&&u!=="click"&&(vi(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="mousedown")?n(!1,m.nativeEvent,"click"):(m.preventDefault(),n(!0,m.nativeEvent,"click"))))},onClick(m){let g=f.current;if(u==="mousedown"&&f.current){f.current=void 0;return}vi(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="click")?n(!1,m.nativeEvent,"click"):n(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!c||fw(m))&&(m.key===" "&&!dw(o)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&n(!(r&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!c||fw(m)||dw(o)||m.key===" "&&p.current&&(p.current=!1,n(!(r&&l),m.nativeEvent,"click"))}}),[i,o,u,s,c,n,r,d,l]);return E.useMemo(()=>a?{reference:h}:{},[a,h])}function Uq(e,t){let r=null,n=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var o;let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((o=t.dataRef.current.openEvent)==null?void 0:o.type)||"")&&t.pointerType!=="touch",c=a.width,d=a.height,f=a.x,p=a.y;return r==null&&t.x&&u&&(r=a.x-t.x),n==null&&t.y&&l&&(n=a.y-t.y),f-=r||0,p-=n||0,c=0,d=0,!i||s?(c=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=u&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):i&&!s&&(d=t.axis==="x"?a.height:d,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:d,x:f,y:p,top:p,right:f+c,bottom:p+d,left:f}}}}function pw(e){return e!=null&&e.clientX!=null}function Wq(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:u=!0,axis:l="both",x:s=null,y:c=null}=t,d=E.useRef(!1),f=E.useRef(null),[p,h]=E.useState(),[m,g]=E.useState([]),_=Ie((A,T)=>{d.current||n.current.openEvent&&!pw(n.current.openEvent)||a.setPositionReference(Uq(o,{x:A,y:T,axis:l,dataRef:n,pointerType:p}))}),w=Ie(A=>{s!=null||c!=null||(r?f.current||g([]):_(A.clientX,A.clientY))}),y=vi(p)?i:r,x=E.useCallback(()=>{if(!y||!u||s!=null||c!=null)return;let A=rt(i);function T(R){let C=lr(R);Ne(i,C)?(A.removeEventListener("mousemove",T),f.current=null):_(R.clientX,R.clientY)}if(!n.current.openEvent||pw(n.current.openEvent)){A.addEventListener("mousemove",T);let R=()=>{A.removeEventListener("mousemove",T),f.current=null};return f.current=R,R}a.setPositionReference(o)},[y,u,s,c,i,n,a,o,_]);E.useEffect(()=>x(),[x,m]),E.useEffect(()=>{u&&!i&&(d.current=!1)},[u,i]),E.useEffect(()=>{!u&&r&&(d.current=!0)},[u,r]),pe(()=>{u&&(s!=null||c!=null)&&(d.current=!1,_(s,c))},[u,s,c,_]);let O=E.useMemo(()=>{function A(T){let{pointerType:R}=T;h(R)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:w,onMouseEnter:w}},[w]);return E.useMemo(()=>u?{reference:O}:{},[u,O])}function Gq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:u=!0,outsidePress:l=!0,outsidePressEvent:s="pointerdown",referencePress:c=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,m=Ai(),g=Ie(typeof l=="function"?l:()=>!1),_=typeof l=="function"?g:l,w=E.useRef(!1),y=E.useRef(!1),{escapeKey:x,outsidePress:O}=hw(p),{escapeKey:A,outsidePress:T}=hw(h),R=E.useRef(!1),C=Ie(W=>{var j;if(!r||!a||!u||W.key!=="Escape"||R.current)return;let D=(j=o.current.floatingContext)==null?void 0:j.nodeId,F=m?Si(m.nodesRef.current,D):[];if(!x&&(W.stopPropagation(),F.length>0)){let z=!0;if(F.forEach(q=>{var B;if((B=q.context)!=null&&B.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}n(!1,Zy(W)?W.nativeEvent:W,"escape-key")}),M=Ie(W=>{var j;let D=()=>{var F;C(W),(F=lr(W))==null||F.removeEventListener("keydown",D)};(j=lr(W))==null||j.addEventListener("keydown",D)}),P=Ie(W=>{var j;let D=w.current;w.current=!1;let F=y.current;if(y.current=!1,s==="click"&&F||D||typeof _=="function"&&!_(W))return;let z=lr(W),q="["+Oi("inert")+"]",B=Ze(i.floating).querySelectorAll(q),$=ye(z)?z:null;for(;$&&!cr($);){let Te=ur($);if(cr(Te)||!ye(Te))break;$=Te}if(B.length&&ye(z)&&!Jy(z)&&!Ne(z,i.floating)&&Array.from(B).every(Te=>!Ne($,Te)))return;if(qe(z)&&I){let Te=cr(z),Ae=gt(z),ae=/auto|scroll/,K=Te||ae.test(Ae.overflowX),ne=Te||ae.test(Ae.overflowY),ee=K&&z.clientWidth>0&&z.scrollWidth>z.clientWidth,te=ne&&z.clientHeight>0&&z.scrollHeight>z.clientHeight,_e=Ae.direction==="rtl",xe=te&&(_e?W.offsetX<=z.offsetWidth-z.clientWidth:W.offsetX>z.clientWidth),be=ee&&W.offsetY>z.clientHeight;if(xe||be)return}let Q=(j=o.current.floatingContext)==null?void 0:j.nodeId,ge=m&&Si(m.nodesRef.current,Q).some(Te=>{var Ae;return Us(W,(Ae=Te.context)==null?void 0:Ae.elements.floating)});if(Us(W,i.floating)||Us(W,i.domReference)||ge)return;let le=m?Si(m.nodesRef.current,Q):[];if(le.length>0){let Te=!0;if(le.forEach(Ae=>{var ae;if((ae=Ae.context)!=null&&ae.open&&!Ae.context.dataRef.current.__outsidePressBubbles){Te=!1;return}}),!Te)return}n(!1,W,"outside-press")}),N=Ie(W=>{var j;let D=()=>{var F;P(W),(F=lr(W))==null||F.removeEventListener(s,D)};(j=lr(W))==null||j.addEventListener(s,D)});E.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=x,o.current.__outsidePressBubbles=O;let W=-1;function j(B){n(!1,B,"ancestor-scroll")}function D(){window.clearTimeout(W),R.current=!0}function F(){W=window.setTimeout(()=>{R.current=!1},lo()?5:0)}let z=Ze(i.floating);u&&(z.addEventListener("keydown",A?M:C,A),z.addEventListener("compositionstart",D),z.addEventListener("compositionend",F)),_&&z.addEventListener(s,T?N:P,T);let q=[];return f&&(ye(i.domReference)&&(q=Tt(i.domReference)),ye(i.floating)&&(q=q.concat(Tt(i.floating))),!ye(i.reference)&&i.reference&&i.reference.contextElement&&(q=q.concat(Tt(i.reference.contextElement)))),q=q.filter(B=>{var $;return B!==(($=z.defaultView)==null?void 0:$.visualViewport)}),q.forEach(B=>{B.addEventListener("scroll",j,{passive:!0})}),()=>{u&&(z.removeEventListener("keydown",A?M:C,A),z.removeEventListener("compositionstart",D),z.removeEventListener("compositionend",F)),_&&z.removeEventListener(s,T?N:P,T),q.forEach(B=>{B.removeEventListener("scroll",j)}),window.clearTimeout(W)}},[o,i,u,_,s,r,n,f,a,x,O,C,A,M,P,T,N]),E.useEffect(()=>{w.current=!1},[_,s]);let k=E.useMemo(()=>({onKeyDown:C,...c&&{[Hq[d]]:W=>{n(!1,W.nativeEvent,"reference-press")},...d!=="click"&&{onClick(W){n(!1,W.nativeEvent,"reference-press")}}}}),[C,n,c,d]),I=E.useMemo(()=>({onKeyDown:C,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Vq[s]]:()=>{w.current=!0}}),[C,s]);return E.useMemo(()=>a?{reference:k,floating:I}:{},[a,k,I])}function Gw(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=yo(),o=E.useRef({}),[a]=E.useState(()=>Iw()),u=Ei()!=null,[l,s]=E.useState(n.reference),c=Ie((p,h,m)=>{o.current.openEvent=p?h:void 0,a.emit("openchange",{open:p,event:h,reason:m,nested:u}),r?.(p,h,m)}),d=E.useMemo(()=>({setPositionReference:s}),[]),f=E.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return E.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:f,events:a,floatingId:i,refs:d}),[t,c,f,a,i,d])}function $q(e){e===void 0&&(e={});let{nodeId:t}=e,r=Gw({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=E.useState(null),[u,l]=E.useState(null),c=i?.domReference||o,d=E.useRef(null),f=Ai();pe(()=>{c&&(d.current=c)},[c]);let p=H0({...e,elements:{...i,...u&&{reference:u}}}),h=E.useCallback(y=>{let x=ye(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(x),p.refs.setReference(x)},[p.refs]),m=E.useCallback(y=>{(ye(y)||y===null)&&(d.current=y,a(y)),(ye(p.refs.reference.current)||p.refs.reference.current===null||y!==null&&!ye(y))&&p.refs.setReference(y)},[p.refs]),g=E.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),_=E.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),w=E.useMemo(()=>({...p,...n,refs:g,elements:_,nodeId:t}),[p,g,_,t,n]);return pe(()=>{n.dataRef.current.floatingContext=w;let y=f?.nodesRef.current.find(x=>x.id===t);y&&(y.context=w)}),E.useMemo(()=>({...p,context:w,refs:g,elements:_}),[p,g,_,w])}function Kq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:u=!0,visibleOnly:l=!0}=t,s=E.useRef(!1),c=E.useRef(),d=E.useRef(!0);E.useEffect(()=>{if(!u)return;let p=rt(a.domReference);function h(){!r&&qe(a.domReference)&&a.domReference===$t(Ze(a.domReference))&&(s.current=!0)}function m(){d.current=!0}return p.addEventListener("blur",h),p.addEventListener("keydown",m,!0),()=>{p.removeEventListener("blur",h),p.removeEventListener("keydown",m,!0)}},[a.domReference,r,u]),E.useEffect(()=>{if(!u)return;function p(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(s.current=!0)}return i.on("openchange",p),()=>{i.off("openchange",p)}},[i,u]),E.useEffect(()=>()=>{clearTimeout(c.current)},[]);let f=E.useMemo(()=>({onPointerDown(p){Bs(p.nativeEvent)||(d.current=!1)},onMouseLeave(){s.current=!1},onFocus(p){if(s.current)return;let h=lr(p.nativeEvent);if(l&&ye(h))try{if(hh()&&Yy())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Ws(h))return}n(!0,p.nativeEvent,"focus")},onBlur(p){s.current=!1;let h=p.relatedTarget,m=p.nativeEvent,g=ye(h)&&h.hasAttribute(Oi("focus-guard"))&&h.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var _;let w=$t(a.domReference?a.domReference.ownerDocument:document);!h&&w===a.domReference||Ne((_=o.current.floatingContext)==null?void 0:_.refs.floating.current,w)||Ne(a.domReference,w)||g||n(!1,m,"focus")})}}),[o,a.domReference,n,l]);return E.useMemo(()=>u?{reference:f}:{},[u,f])}function Ch(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[mw]:a,[vw]:u,...l}=e;o=l}return{...r==="floating"&&{tabIndex:-1,[Fh]:""},...o,...t.map(a=>{let u=a?a[r]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((a,u)=>(u&&Object.entries(u).forEach(l=>{let[s,c]=l;if(!(i&&[mw,vw].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var d;(d=n.get(s))==null||d.push(c),a[s]=function(){for(var f,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(f=n.get(s))==null?void 0:f.map(g=>g(...h)).find(g=>g!==void 0)}}}else a[s]=c}),a),{})}}function Yq(e){e===void 0&&(e=[]);let t=e.map(u=>u?.reference),r=e.map(u=>u?.floating),n=e.map(u=>u?.item),i=E.useCallback(u=>Ch(u,e,"reference"),t),o=E.useCallback(u=>Ch(u,e,"floating"),r),a=E.useCallback(u=>Ch(u,e,"item"),n);return E.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function hc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function kh(e,t){return hc(t,e===bo||e===Qr,e===dr||e===pr)}function qh(e,t,r){return hc(t,e===Qr,r?e===dr:e===pr)||e==="Enter"||e===" "||e===""}function gw(e,t,r){return hc(t,r?e===dr:e===pr,e===Qr)}function bw(e,t,r,n){let i=r?e===pr:e===dr,o=e===bo;return t==="both"||t==="horizontal"&&n&&n>1?e===Zq:hc(t,i,o)}function Jq(e,t){let{open:r,onOpenChange:n,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:u=()=>{},enabled:l=!0,selectedIndex:s=null,allowEscape:c=!1,loop:d=!1,nested:f=!1,rtl:p=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:_=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:x=1,scrollItemIntoView:O=!0,virtualItemRef:A,itemSizes:T,dense:R=!1}=t,C=Lh(i.floating),M=it(C),P=Ei(),N=Ai();pe(()=>{e.dataRef.current.orientation=y},[e,y]);let k=Ie(()=>{u(j.current===-1?null:j.current)}),I=mh(i.domReference),W=E.useRef(m),j=E.useRef(s??-1),D=E.useRef(null),F=E.useRef(!0),z=E.useRef(k),q=E.useRef(!!i.floating),B=E.useRef(r),$=E.useRef(!1),Q=E.useRef(!1),ge=it(w),le=it(r),Te=it(O),Ae=it(s),[ae,K]=E.useState(),[ne,ee]=E.useState(),te=Ie(()=>{function re(ie){h?(K(ie.id),N?.events.emit("virtualfocus",ie),A&&(A.current=ie)):yi(ie,{sync:$.current,preventScroll:!0})}let fe=o.current[j.current];fe&&re(fe),($.current?ie=>ie():requestAnimationFrame)(()=>{let ie=o.current[j.current]||fe;if(!ie)return;fe||re(ie);let $e=Te.current;$e&&xe&&(Q.current||!F.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof $e=="boolean"?{block:"nearest",inline:"nearest"}:$e))})});pe(()=>{l&&(r&&i.floating?W.current&&s!=null&&(Q.current=!0,j.current=s,k()):q.current&&(j.current=-1,z.current()))},[l,r,i.floating,s,k]),pe(()=>{if(l&&r&&i.floating)if(a==null){if($.current=!1,Ae.current!=null)return;if(q.current&&(j.current=-1,te()),(!B.current||!q.current)&&W.current&&(D.current!=null||W.current===!0&&D.current==null)){let re=0,fe=()=>{o.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(fe),re++):(j.current=D.current==null||qh(D.current,y,p)||f?sc(o,ge.current):Ih(o,ge.current),D.current=null,k())};fe()}}else vo(o,a)||(j.current=a,te(),Q.current=!1)},[l,r,i.floating,a,Ae,f,o,y,p,k,te,ge]),pe(()=>{var re;if(!l||i.floating||!N||h||!q.current)return;let fe=N.nodesRef.current,J=(re=fe.find(ze=>ze.id===P))==null||(re=re.context)==null?void 0:re.elements.floating,ie=$t(Ze(i.floating)),$e=fe.some(ze=>ze.context&&Ne(ze.context.elements.floating,ie));J&&!$e&&F.current&&J.focus({preventScroll:!0})},[l,i.floating,N,P,h]),pe(()=>{if(!l||!N||!h||P)return;function re(fe){ee(fe.id),A&&(A.current=fe)}return N.events.on("virtualfocus",re),()=>{N.events.off("virtualfocus",re)}},[l,N,h,P,A]),pe(()=>{z.current=k,B.current=r,q.current=!!i.floating}),pe(()=>{r||(D.current=null)},[r]);let _e=a!=null,xe=E.useMemo(()=>{function re(J){if(!r)return;let ie=o.current.indexOf(J);ie!==-1&&j.current!==ie&&(j.current=ie,k())}return{onFocus(J){let{currentTarget:ie}=J;$.current=!0,re(ie)},onClick:J=>{let{currentTarget:ie}=J;return ie.focus({preventScroll:!0})},...g&&{onMouseMove(J){let{currentTarget:ie}=J;$.current=!0,Q.current=!1,re(ie)},onPointerLeave(J){let{pointerType:ie}=J;if(!(!F.current||ie==="touch")&&($.current=!0,j.current=-1,k(),!h)){var $e;($e=M.current)==null||$e.focus({preventScroll:!0})}}}}},[r,M,g,o,k,h]),be=Ie(re=>{if(F.current=!1,$.current=!0,re.which===229||!le.current&&re.currentTarget===M.current)return;if(f&&bw(re.key,y,p,x)){Je(re),n(!1,re.nativeEvent,"list-navigation"),qe(i.domReference)&&(h?N?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let fe=j.current,J=sc(o,w),ie=Ih(o,w);if(I||(re.key==="Home"&&(Je(re),j.current=J,k()),re.key==="End"&&(Je(re),j.current=ie,k())),x>1){let $e=T||Array.from({length:o.current.length},()=>({width:1,height:1})),ze=Ow($e,x,R),wr=ze.findIndex(St=>St!=null&&!xi(o.current,St,w)),tr=ze.reduce((St,rr,Hr)=>rr!=null&&!xi(o.current,rr,w)?Hr:St,-1),ln=ze[Sw({current:ze.map(St=>St!=null?o.current[St]:null)},{event:re,orientation:y,loop:d,rtl:p,cols:x,disabledIndices:Aw([...w||o.current.map((St,rr)=>xi(o.current,rr)?rr:void 0),void 0],ze),minIndex:wr,maxIndex:tr,prevIndex:Ew(j.current>ie?J:j.current,$e,ze,x,re.key===Qr?"bl":re.key===(p?dr:pr)?"tr":"tl"),stopEvent:!0})];if(ln!=null&&(j.current=ln,k()),y==="both")return}if(kh(re.key,y)){if(Je(re),r&&!h&&$t(re.currentTarget.ownerDocument)===re.currentTarget){j.current=qh(re.key,y,p)?J:ie,k();return}qh(re.key,y,p)?d?j.current=fe>=ie?c&&fe!==o.current.length?-1:J:nt(o,{startingIndex:fe,disabledIndices:w}):j.current=Math.min(ie,nt(o,{startingIndex:fe,disabledIndices:w})):d?j.current=fe<=J?c&&fe!==-1?o.current.length:ie:nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w}):j.current=Math.max(J,nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w})),vo(o,j.current)&&(j.current=-1),k()}}),We=E.useMemo(()=>h&&r&&_e&&{"aria-activedescendant":ne||ae},[h,r,_e,ne,ae]),Pe=E.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...I?{}:We,onKeyDown:be,onPointerMove(){F.current=!0}}),[We,be,y,I]),ft=E.useMemo(()=>{function re(J){m==="auto"&&ph(J.nativeEvent)&&(W.current=!0)}function fe(J){W.current=m,m==="auto"&&Bs(J.nativeEvent)&&(W.current=!0)}return{...We,onKeyDown(J){var ie;F.current=!1;let $e=J.key.startsWith("Arrow"),ze=["Home","End"].includes(J.key),wr=$e||ze,tr=N==null||(ie=N.nodesRef.current.find(jt=>jt.id===P))==null||(ie=ie.context)==null||(ie=ie.dataRef)==null?void 0:ie.current.orientation,ln=gw(J.key,y,p),St=bw(J.key,y,p,x),rr=gw(J.key,tr,p),Hr=kh(J.key,y),ts=(f?rr:Hr)||J.key==="Enter"||J.key.trim()==="";if(h&&r){let jt=N?.nodesRef.current.find(fn=>fn.parentId==null),zt=N&&jt?Rq(N.nodesRef.current,jt.id):null;if(wr&&zt&&A){let fn=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ln||St){var ri,ni;let ep=((ri=zt.context)==null?void 0:ri.elements.domReference)===J.currentTarget,ii=St&&!ep?(ni=zt.context)==null?void 0:ni.elements.domReference:ln?o.current.find(oi=>oi?.id===ae):null;ii&&(Je(J),ii.dispatchEvent(fn),ee(void 0))}if((Hr||ze)&&zt.context&&zt.context.open&&zt.parentId&&J.currentTarget!==zt.context.elements.domReference){var Dt;Je(J),(Dt=zt.context.elements.domReference)==null||Dt.dispatchEvent(fn);return}}return be(J)}if(!(!r&&!_&&$e)){if(ts){let jt=kh(J.key,tr);D.current=f&&jt?null:J.key}if(f){rr&&(Je(J),r?(j.current=sc(o,ge.current),k()):n(!0,J.nativeEvent,"list-navigation"));return}Hr&&(s!=null&&(j.current=s),Je(J),!r&&_?n(!0,J.nativeEvent,"list-navigation"):be(J),r&&k())}},onFocus(){r&&!h&&(j.current=-1,k())},onPointerDown:fe,onPointerEnter:fe,onMouseDown:re,onClick:re}},[ae,We,x,be,ge,m,o,f,k,n,r,_,y,P,p,s,N,h,A]);return E.useMemo(()=>l?{reference:ft,floating:Pe,item:xe}:{},[l,ft,Pe,xe])}function Qq(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,u=(r=Xq.get(a))!=null?r:a,l=yo(),c=Ei()!=null,d=E.useMemo(()=>u==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?i:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":u==="alertdialog"?"dialog":u,"aria-controls":n?i:void 0,...u==="listbox"&&{role:"combobox"},...u==="menu"&&{id:l},...u==="menu"&&c&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[u,i,c,n,l,a]),f=E.useMemo(()=>{let h={id:i,...u&&{role:u}};return u==="tooltip"||a==="label"?h:{...h,...u==="menu"&&{"aria-labelledby":l}}},[u,i,l,a]),p=E.useCallback(h=>{let{active:m,selected:g}=h,_={role:"option",...m&&{id:i+"-option"}};switch(a){case"select":return{..._,"aria-selected":m&&g};case"combobox":return{..._,...m&&{"aria-selected":!0}}}return{}},[i,a]);return E.useMemo(()=>o?{reference:d,floating:f,item:p}:{},[o,d,f,p])}function mo(e,t){return typeof e=="function"?e(t):e}function eI(e,t){let[r,n]=E.useState(e);return e&&!r&&n(!0),E.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function $w(e,t){t===void 0&&(t={});let{open:r,elements:{floating:n}}=e,{duration:i=250}=t,a=(typeof i=="number"?i:i.close)||0,[u,l]=E.useState("unmounted"),s=eI(r,a);return!s&&u==="close"&&l("unmounted"),pe(()=>{if(n){if(r){l("initial");let c=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(c)}}l("close")}},[r,n]),{isMounted:s,status:u}}function tI(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,u=e.placement,l=u.split("-")[0],s=E.useMemo(()=>({side:l,placement:u}),[l,u]),c=typeof a=="number",d=(c?a:a.open)||0,f=(c?a:a.close)||0,[p,h]=E.useState(()=>({...mo(o,s),...mo(r,s)})),{isMounted:m,status:g}=$w(e,{duration:a}),_=it(r),w=it(n),y=it(i),x=it(o);return pe(()=>{let O=mo(_.current,s),A=mo(y.current,s),T=mo(x.current,s),R=mo(w.current,s)||Object.keys(O).reduce((C,M)=>(C[M]="",C),{});if(g==="initial"&&h(C=>({transitionProperty:C.transitionProperty,...T,...O})),g==="open"&&h({transitionProperty:Object.keys(R).map(_w).join(","),transitionDuration:d+"ms",...T,...R}),g==="close"){let C=A||O;h({transitionProperty:Object.keys(C).map(_w).join(","),transitionDuration:f+"ms",...T,...C})}},[f,y,_,w,x,d,g,s]),{isMounted:m,styles:p}}function rI(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:u,onTypingChange:l,enabled:s=!0,findMatch:c=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=E.useRef(),m=E.useRef(""),g=E.useRef((r=p??a)!=null?r:-1),_=E.useRef(null),w=Ie(u),y=Ie(l),x=it(c),O=it(f);pe(()=>{n&&(clearTimeout(h.current),_.current=null,m.current="")},[n]),pe(()=>{if(n&&m.current===""){var M;g.current=(M=p??a)!=null?M:-1}},[n,p,a]);let A=Ie(M=>{M?i.current.typing||(i.current.typing=M,y(M)):i.current.typing&&(i.current.typing=M,y(M))}),T=Ie(M=>{function P(j,D,F){let z=x.current?x.current(D,F):D.find(q=>q?.toLocaleLowerCase().indexOf(F.toLocaleLowerCase())===0);return z?j.indexOf(z):-1}let N=o.current;if(m.current.length>0&&m.current[0]!==" "&&(P(N,N,m.current)===-1?A(!1):M.key===" "&&Je(M)),N==null||O.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;n&&M.key!==" "&&(Je(M),A(!0)),N.every(j=>{var D,F;return j?((D=j[0])==null?void 0:D.toLocaleLowerCase())!==((F=j[1])==null?void 0:F.toLocaleLowerCase()):!0})&&m.current===M.key&&(m.current="",g.current=_.current),m.current+=M.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",g.current=_.current,A(!1)},d);let I=g.current,W=P(N,[...N.slice((I||0)+1),...N.slice(0,(I||0)+1)],m.current);W!==-1?(w(W),_.current=W):M.key!==" "&&(m.current="",A(!1))}),R=E.useMemo(()=>({onKeyDown:T}),[T]),C=E.useMemo(()=>({onKeyDown:T,onKeyUp(M){M.key===" "&&A(!1)}}),[T,A]);return E.useMemo(()=>s?{reference:R,floating:C}:{},[s,R,C])}function yw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function iI(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,l=Ie(u),s=E.useRef(!1),c=E.useRef(null),d=E.useRef(null);E.useEffect(()=>{if(!i)return;function p(m){if(m.ctrlKey||!h||o.current==null)return;let g=m.deltaY,_=o.current.top>=-.5,w=o.current.bottom>=-.5,y=h.scrollHeight-h.clientHeight,x=g<0?-1:1,O=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&g>0||!w&&g<0?(m.preventDefault(),go.flushSync(()=>{l(A=>A+Math[O](g,y*x))})):/firefox/i.test(zs())&&(h.scrollTop+=g))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{c.current=null,d.current=null,h.removeEventListener("wheel",p)}},[i,r,n.floating,o,a,l]);let f=E.useMemo(()=>({onKeyDown(){s.current=!0},onWheel(){s.current=!1},onPointerMove(){s.current=!1},onScroll(){let p=a?.current||n.floating;if(!(!o.current||!p||!s.current)){if(c.current!==null){let h=p.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&go.flushSync(()=>l(m=>m+h))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[n.floating,l,o,a]);return E.useMemo(()=>i?{floating:f}:{},[i,f])}function ww(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,u=o-1;a<o;u=a++){let[l,s]=t[a]||[0,0],[c,d]=t[u]||[0,0];s>=n!=d>=n&&r<=(c-l)*(n-s)/(d-s)+l&&(i=!i)}return i}function oI(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function aI(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i,o=!1,a=null,u=null,l=performance.now();function s(d,f){let p=performance.now(),h=p-l;if(a===null||u===null||h===0)return a=d,u=f,l=p,null;let m=d-a,g=f-u,w=Math.sqrt(m*m+g*g)/h;return a=d,u=f,l=p,w}let c=d=>{let{x:f,y:p,placement:h,elements:m,onClose:g,nodeId:_,tree:w}=d;return function(x){function O(){clearTimeout(i),g()}if(clearTimeout(i),!m.domReference||!m.floating||h==null||f==null||p==null)return;let{clientX:A,clientY:T}=x,R=[A,T],C=lr(x),M=x.type==="mouseleave",P=Ne(m.floating,C),N=Ne(m.domReference,C),k=m.domReference.getBoundingClientRect(),I=m.floating.getBoundingClientRect(),W=h.split("-")[0],j=f>I.right-I.width/2,D=p>I.bottom-I.height/2,F=oI(R,k),z=I.width>k.width,q=I.height>k.height,B=(z?k:I).left,$=(z?k:I).right,Q=(q?k:I).top,ge=(q?k:I).bottom;if(P&&(o=!0,!M))return;if(N&&(o=!1),N&&!M){o=!0;return}if(M&&ye(x.relatedTarget)&&Ne(m.floating,x.relatedTarget)||w&&Si(w.nodesRef.current,_).some(Ae=>{let{context:ae}=Ae;return ae?.open}))return;if(W==="top"&&p>=k.bottom-1||W==="bottom"&&p<=k.top+1||W==="left"&&f>=k.right-1||W==="right"&&f<=k.left+1)return O();let le=[];switch(W){case"top":le=[[B,k.top+1],[B,I.bottom-1],[$,I.bottom-1],[$,k.top+1]];break;case"bottom":le=[[B,I.top+1],[B,k.bottom-1],[$,k.bottom-1],[$,I.top+1]];break;case"left":le=[[I.right-1,ge],[I.right-1,Q],[k.left+1,Q],[k.left+1,ge]];break;case"right":le=[[k.right-1,ge],[k.right-1,Q],[I.left+1,Q],[I.left+1,ge]];break}function Te(Ae){let[ae,K]=Ae;switch(W){case"top":{let ne=[z?ae+t/2:j?ae+t*4:ae-t*4,K+t+1],ee=[z?ae-t/2:j?ae+t*4:ae-t*4,K+t+1],te=[[I.left,j||z?I.bottom-t:I.top],[I.right,j?z?I.bottom-t:I.top:I.bottom-t]];return[ne,ee,...te]}case"bottom":{let ne=[z?ae+t/2:j?ae+t*4:ae-t*4,K-t],ee=[z?ae-t/2:j?ae+t*4:ae-t*4,K-t],te=[[I.left,j||z?I.top+t:I.bottom],[I.right,j?z?I.top+t:I.bottom:I.top+t]];return[ne,ee,...te]}case"left":{let ne=[ae+t+1,q?K+t/2:D?K+t*4:K-t*4],ee=[ae+t+1,q?K-t/2:D?K+t*4:K-t*4];return[...[[D||q?I.right-t:I.left,I.top],[D?q?I.right-t:I.left:I.right-t,I.bottom]],ne,ee]}case"right":{let ne=[ae-t,q?K+t/2:D?K+t*4:K-t*4],ee=[ae-t,q?K-t/2:D?K+t*4:K-t*4],te=[[D||q?I.left+t:I.right,I.top],[D?q?I.left+t:I.right:I.left+t,I.bottom]];return[ne,ee,...te]}}}if(!ww([A,T],le)){if(o&&!F)return O();if(!M&&n){let Ae=s(x.clientX,x.clientY);if(Ae!==null&&Ae<.1)return O()}ww([A,T],Te([f,p]))?!o&&n&&(i=window.setTimeout(O,40)):O()}}};return c.__options={blockPointerEvents:r},c}var E,_o,Ee,go,xw,hq,mq,bo,Qr,dr,pr,pe,Tw,Cw,kw,qw,Ph,gq,bq,Q0,_q,ew,wq,yo,xq,jw,Fw,Ei,Ai,tw,jh,Lw,Nw,rw,ho,oc,ac,Rh,Mq,Dw,Cq,dc,pc,Iq,fc,Ww,uw,Vw,Fh,sw,wi,Lq,uc,lw,zq,Hq,Vq,hw,mw,vw,Zq,Xq,_w,nI,Yw=pt(()=>{E=V(Ye()),_o=V(Ye());Xy();Ka();Ee=V(Ua());Va();s0();go=V(Xs());Th();Th();xw={...E},hq=xw.useInsertionEffect,mq=hq||(e=>e());bo="ArrowUp",Qr="ArrowDown",dr="ArrowLeft",pr="ArrowRight";pe=typeof document<"u"?_o.useLayoutEffect:_o.useEffect;Tw=E.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});Cw=E.createContext({activeIndex:0,onNavigate:()=>{}}),kw=[dr,pr],qw=[bo,Qr],Ph=[...kw,...qw],gq=E.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:u=1,disabledIndices:l,activeIndex:s,onNavigate:c,itemSizes:d,dense:f=!1,...p}=t,[h,m]=E.useState(0),g=s??h,_=Ie(c??m),w=E.useRef([]),y=n&&typeof n!="function"?n.props:{},x=E.useMemo(()=>({activeIndex:g,onNavigate:_}),[g,_]),O=u>1;function A(R){if(!Ph.includes(R.key))return;let C=g,M=sc(w,l),P=Ih(w,l),N=a?dr:pr,k=a?pr:dr;if(O){let F=d||Array.from({length:w.current.length},()=>({width:1,height:1})),z=Ow(F,u,f),q=z.findIndex(Q=>Q!=null&&!xi(w.current,Q,l)),B=z.reduce((Q,ge,le)=>ge!=null&&!xi(w.current,ge,l)?le:Q,-1),$=z[Sw({current:z.map(Q=>Q?w.current[Q]:null)},{event:R,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:Aw([...l||w.current.map((Q,ge)=>xi(w.current,ge)?ge:void 0),void 0],z),minIndex:q,maxIndex:B,prevIndex:Ew(g>P?M:g,F,z,u,R.key===Qr?"bl":R.key===N?"tr":"tl")})];$!=null&&(C=$)}let I={horizontal:[N],vertical:[Qr],both:[N,Qr]}[i],W={horizontal:[k],vertical:[bo],both:[k,bo]}[i],j=O?Ph:{horizontal:kw,vertical:qw,both:Ph}[i];if(C===g&&[...I,...W].includes(R.key)&&(o&&C===P&&I.includes(R.key)?C=M:o&&C===M&&W.includes(R.key)?C=P:C=nt(w,{startingIndex:C,decrement:W.includes(R.key),disabledIndices:l})),C!==g&&!vo(w,C)){var D;R.stopPropagation(),j.includes(R.key)&&R.preventDefault(),_(C),(D=w.current[C])==null||D.focus()}}let T={...p,...y,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(R){p.onKeyDown==null||p.onKeyDown(R),y.onKeyDown==null||y.onKeyDown(R),A(R)}};return(0,Ee.jsx)(Cw.Provider,{value:x,children:(0,Ee.jsx)(Pw,{elementsRef:w,children:Mw(n,T)})})}),bq=E.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=E.useContext(Cw),{ref:l,index:s}=Rw(),c=lc([l,r,o.ref]),d=a===s,f={...i,...o,ref:c,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(p){i.onFocus==null||i.onFocus(p),o.onFocus==null||o.onFocus(p),u(s)}};return Mw(n,f)}),Q0=!1,_q=0,ew=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_q++;wq=xw.useId,yo=wq||yq,xq=E.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:u=14,height:l=7,tipRadius:s=0,strokeWidth:c=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...m}={},...g}=t,_=yo(),[w,y]=E.useState(!1);if(pe(()=>{if(!i)return;gt(i).direction==="rtl"&&y(!0)},[i]),!i)return null;let[x,O]=n.split("-"),A=x==="top"||x==="bottom",T=d;(A&&a!=null&&a.x||!A&&a!=null&&a.y)&&(T=null);let R=c*2,C=R/2,M=u/2*(s/-8+1),P=l/2*s/4,N=!!p,k=T&&O==="end"?"bottom":"top",I=T&&O==="end"?"right":"left";T&&w&&(I=O==="end"?"left":"right");let W=o?.x!=null?T||o.x:"",j=o?.y!=null?T||o.y:"",D=p||"M0,0"+(" H"+u)+(" L"+(u-M)+","+(l-P))+(" Q"+u/2+","+l+" "+M+","+(l-P))+" Z",F={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,Ee.jsxs)("svg",{...g,"aria-hidden":!0,ref:r,width:N?u:u+R,height:u,viewBox:"0 0 "+u+" "+(l>u?l:u),style:{position:"absolute",pointerEvents:"none",[I]:W,[k]:j,[x]:A||N?"100%":"calc(100% - "+R/2+"px)",transform:[F,h].filter(z=>!!z).join(" "),...m},children:[R>0&&(0,Ee.jsx)("path",{clipPath:"url(#"+_+")",fill:"none",stroke:f,strokeWidth:R+(p?0:1),d:D}),(0,Ee.jsx)("path",{stroke:R&&!p?g.fill:"none",d:D}),(0,Ee.jsx)("clipPath",{id:_,children:(0,Ee.jsx)("rect",{x:-C,y:C*(N?-1:1),width:u+R,height:u})})]})});jw=E.createContext(null),Fw=E.createContext(null),Ei=()=>{var e;return((e=E.useContext(jw))==null?void 0:e.id)||null},Ai=()=>E.useContext(Fw);tw=Oi("safe-polygon");jh=()=>{},Lw=E.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:jh,setState:jh,isInstantPhase:!1}),Nw=()=>E.useContext(Lw);rw=0;ho=new WeakMap,oc=new WeakSet,ac={},Rh=0,Mq=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Dw=e=>e&&(e.host||Dw(e.parentNode)),Cq=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=Dw(r);return e.contains(n)?n:null}).filter(r=>r!=null);dc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});pc={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};fc=E.forwardRef(function(t,r){let[n,i]=E.useState();pe(()=>(hh()&&i("button"),document.addEventListener("keydown",aw),()=>{document.removeEventListener("keydown",aw)}),[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Oi("focus-guard")]:"",style:pc};return(0,Ee.jsx)("span",{...t,...o})}),Ww=E.createContext(null),uw=Oi("portal");Vw=()=>E.useContext(Ww),Fh="data-floating-ui-focusable";sw=20,wi=[];Lq=E.forwardRef(function(t,r){return(0,Ee.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:pc})});uc=0;lw=()=>{},zq=E.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return pe(()=>{if(n)return uc++,uc===1&&(lw=Dq()),()=>{uc--,uc===0&&lw()}},[n]),(0,Ee.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});Hq={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Vq={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},hw=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};mw="active",vw="selected";Zq="Escape";Xq=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);_w=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());nI=e=>({name:"inner",options:e,async fn(t){let{listRef:r,overflowRef:n,onFallbackChange:i,offset:o=0,index:a=0,minItemsVisible:u=4,referenceOverflowThreshold:l=0,scrollRef:s,...c}=Pt(e,t),{rects:d,elements:{floating:f}}=t,p=r.current[a],h=s?.current||f,m=f.clientTop||h.clientTop,g=f.clientTop!==0,_=h.clientTop!==0,w=f===h;if(!p)return{};let y={...t,...await nc(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},x=await _i(yw(y,h.scrollHeight+m+f.clientTop),c),O=await _i(y,{...c,elementContext:"reference"}),A=De(0,x.top),T=y.y+A,M=(h.scrollHeight>h.clientHeight?P=>P:gi)(De(0,h.scrollHeight+(g&&w||_?m*2:0)-A-De(0,x.bottom)));if(h.style.maxHeight=M+"px",h.scrollTop=A,i){let P=h.offsetHeight<p.offsetHeight*bt(u,r.current.length)-1||O.top>=-l||O.bottom>=-l;go.flushSync(()=>i(P))}return n&&(n.current=await _i(yw({...y,y:T},h.offsetHeight+m+f.clientTop),c)),{y:T}}})});var mc=b((XJ,Zw)=>{Zw.exports=JBrowseExports["@mui/material"]});var Xa=b((QJ,Jw)=>{Jw.exports=JBrowseExports["tss-react/mui"]});var Qw=b(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});Dh.default=lI;var Xw=Ua(),vc=(Yw(),Zg(Kw)),Nh=mc(),uI=Xa();function sI(e){return Math.round(e*1e5)/1e5}var cI=(0,uI.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Nh.alpha)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.fontSize,lineHeight:`${sI(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function lI({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Nh.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=cI(),{refs:l,floatingStyles:s,context:c}=(0,vc.useFloating)({placement:r,strategy:"fixed",middleware:[(0,vc.offset)(5)]}),d=(0,vc.useClientPoint)(c,e),{getFloatingProps:f}=(0,vc.useInteractions)([d]);return(0,Xw.jsx)(Nh.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,Xw.jsx)("div",{className:u.tooltip,ref:l.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...f(),children:t})})}});var m1=b((tX,h1)=>{"use strict";var{entries:c1,setPrototypeOf:e1,isFrozen:fI,getPrototypeOf:dI,getOwnPropertyDescriptor:pI}=Object,{freeze:yt,seal:Yt,create:l1}=Object,{apply:Vh,construct:Gh}=typeof Reflect<"u"&&Reflect;yt||(yt=function(t){return t});Yt||(Yt=function(t){return t});Vh||(Vh=function(t,r,n){return t.apply(r,n)});Gh||(Gh=function(t,r){return new t(...r)});var gc=wt(Array.prototype.forEach),hI=wt(Array.prototype.lastIndexOf),t1=wt(Array.prototype.pop),Qa=wt(Array.prototype.push),mI=wt(Array.prototype.splice),_c=wt(String.prototype.toLowerCase),zh=wt(String.prototype.toString),r1=wt(String.prototype.match),eu=wt(String.prototype.replace),vI=wt(String.prototype.indexOf),gI=wt(String.prototype.trim),hr=wt(Object.prototype.hasOwnProperty),_t=wt(RegExp.prototype.test),tu=bI(TypeError);function wt(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Vh(e,t,n)}}function bI(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gh(e,r)}}function ue(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_c;e1&&e1(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let o=r(i);o!==i&&(fI(t)||(t[n]=o),i=o)}e[i]=!0}return e}function _I(e){for(let t=0;t<e.length;t++)hr(e,t)||(e[t]=null);return e}function Ti(e){let t=l1(null);for(let[r,n]of c1(e))hr(e,r)&&(Array.isArray(n)?t[r]=_I(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Ti(n):t[r]=n);return t}function ru(e,t){for(;e!==null;){let n=pI(e,t);if(n){if(n.get)return wt(n.get);if(typeof n.value=="function")return wt(n.value)}e=dI(e)}function r(){return null}return r}var n1=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bh=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Uh=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yI=yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wh=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),wI=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),i1=yt(["#text"]),o1=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Hh=yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),a1=yt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),bc=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xI=Yt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),SI=Yt(/<%[\w\W]*|[\w\W]*%>/gm),OI=Yt(/\$\{[\w\W]*/gm),EI=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),AI=Yt(/^aria-[\-\w]+$/),f1=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TI=Yt(/^(?:\w+script|data):/i),PI=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),d1=Yt(/^html$/i),RI=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i),u1=Object.freeze({__proto__:null,ARIA_ATTR:AI,ATTR_WHITESPACE:PI,CUSTOM_ELEMENT:RI,DATA_ATTR:EI,DOCTYPE_NAME:d1,ERB_EXPR:SI,IS_ALLOWED_URI:f1,IS_SCRIPT_OR_DATA:TI,MUSTACHE_EXPR:xI,TMPLIT_EXPR:OI}),nu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},MI=function(){return typeof window>"u"?null:window},CI=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},s1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function p1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:MI(),t=X=>p1(X);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==nu.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,n=r,i=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:u,Element:l,NodeFilter:s,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,h=l.prototype,m=ru(h,"cloneNode"),g=ru(h,"remove"),_=ru(h,"nextSibling"),w=ru(h,"childNodes"),y=ru(h,"parentNode");if(typeof a=="function"){let X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let x,O="",{implementation:A,createNodeIterator:T,createDocumentFragment:R,getElementsByTagName:C}=r,{importNode:M}=n,P=s1();t.isSupported=typeof c1=="function"&&typeof y=="function"&&A&&A.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:k,TMPLIT_EXPR:I,DATA_ATTR:W,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:z}=u1,{IS_ALLOWED_URI:q}=u1,B=null,$=ue({},[...n1,...Bh,...Uh,...Wh,...i1]),Q=null,ge=ue({},[...o1,...Hh,...a1,...bc]),le=Object.seal(l1(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Ae=null,ae=!0,K=!0,ne=!1,ee=!0,te=!1,_e=!0,xe=!1,be=!1,We=!1,Pe=!1,ft=!1,re=!1,fe=!0,J=!1,ie="user-content-",$e=!0,ze=!1,wr={},tr=null,ln=ue({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),St=null,rr=ue({},["audio","video","img","source","image","track"]),Hr=null,ts=ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ri="http://www.w3.org/1998/Math/MathML",ni="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml",jt=Dt,zt=!1,fn=null,ep=ue({},[ri,ni,Dt],zh),ii=ue({},["mi","mo","mn","ms","mtext"]),oi=ue({},["annotation-xml"]),WR=ue({},["title","style","font","a","script"]),ma=null,HR=["application/xhtml+xml","text/html"],VR="text/html",Ke=null,$i=null,GR=r.createElement("form"),Lg=function(S){return S instanceof RegExp||S instanceof Function},tp=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($i&&$i===S)){if((!S||typeof S!="object")&&(S={}),S=Ti(S),ma=HR.indexOf(S.PARSER_MEDIA_TYPE)===-1?VR:S.PARSER_MEDIA_TYPE,Ke=ma==="application/xhtml+xml"?zh:_c,B=hr(S,"ALLOWED_TAGS")?ue({},S.ALLOWED_TAGS,Ke):$,Q=hr(S,"ALLOWED_ATTR")?ue({},S.ALLOWED_ATTR,Ke):ge,fn=hr(S,"ALLOWED_NAMESPACES")?ue({},S.ALLOWED_NAMESPACES,zh):ep,Hr=hr(S,"ADD_URI_SAFE_ATTR")?ue(Ti(ts),S.ADD_URI_SAFE_ATTR,Ke):ts,St=hr(S,"ADD_DATA_URI_TAGS")?ue(Ti(rr),S.ADD_DATA_URI_TAGS,Ke):rr,tr=hr(S,"FORBID_CONTENTS")?ue({},S.FORBID_CONTENTS,Ke):ln,Te=hr(S,"FORBID_TAGS")?ue({},S.FORBID_TAGS,Ke):{},Ae=hr(S,"FORBID_ATTR")?ue({},S.FORBID_ATTR,Ke):{},wr=hr(S,"USE_PROFILES")?S.USE_PROFILES:!1,ae=S.ALLOW_ARIA_ATTR!==!1,K=S.ALLOW_DATA_ATTR!==!1,ne=S.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=S.SAFE_FOR_TEMPLATES||!1,_e=S.SAFE_FOR_XML!==!1,xe=S.WHOLE_DOCUMENT||!1,Pe=S.RETURN_DOM||!1,ft=S.RETURN_DOM_FRAGMENT||!1,re=S.RETURN_TRUSTED_TYPE||!1,We=S.FORCE_BODY||!1,fe=S.SANITIZE_DOM!==!1,J=S.SANITIZE_NAMED_PROPS||!1,$e=S.KEEP_CONTENT!==!1,ze=S.IN_PLACE||!1,q=S.ALLOWED_URI_REGEXP||f1,jt=S.NAMESPACE||Dt,ii=S.MATHML_TEXT_INTEGRATION_POINTS||ii,oi=S.HTML_INTEGRATION_POINTS||oi,le=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&Lg(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&Lg(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(K=!1),ft&&(Pe=!0),wr&&(B=ue({},i1),Q=[],wr.html===!0&&(ue(B,n1),ue(Q,o1)),wr.svg===!0&&(ue(B,Bh),ue(Q,Hh),ue(Q,bc)),wr.svgFilters===!0&&(ue(B,Uh),ue(Q,Hh),ue(Q,bc)),wr.mathMl===!0&&(ue(B,Wh),ue(Q,a1),ue(Q,bc))),S.ADD_TAGS&&(B===$&&(B=Ti(B)),ue(B,S.ADD_TAGS,Ke)),S.ADD_ATTR&&(Q===ge&&(Q=Ti(Q)),ue(Q,S.ADD_ATTR,Ke)),S.ADD_URI_SAFE_ATTR&&ue(Hr,S.ADD_URI_SAFE_ATTR,Ke),S.FORBID_CONTENTS&&(tr===ln&&(tr=Ti(tr)),ue(tr,S.FORBID_CONTENTS,Ke)),$e&&(B["#text"]=!0),xe&&ue(B,["html","head","body"]),B.table&&(ue(B,["tbody"]),delete Te.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw tu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw tu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=S.TRUSTED_TYPES_POLICY,O=x.createHTML("")}else x===void 0&&(x=CI(p,i)),x!==null&&typeof O=="string"&&(O=x.createHTML(""));yt&&yt(S),$i=S}},Ng=ue({},[...Bh,...Uh,...yI]),Dg=ue({},[...Wh,...wI]),$R=function(S){let H=y(S);(!H||!H.tagName)&&(H={namespaceURI:jt,tagName:"template"});let Y=_c(S.tagName),Re=_c(H.tagName);return fn[S.namespaceURI]?S.namespaceURI===ni?H.namespaceURI===Dt?Y==="svg":H.namespaceURI===ri?Y==="svg"&&(Re==="annotation-xml"||ii[Re]):!!Ng[Y]:S.namespaceURI===ri?H.namespaceURI===Dt?Y==="math":H.namespaceURI===ni?Y==="math"&&oi[Re]:!!Dg[Y]:S.namespaceURI===Dt?H.namespaceURI===ni&&!oi[Re]||H.namespaceURI===ri&&!ii[Re]?!1:!Dg[Y]&&(WR[Y]||!Ng[Y]):!!(ma==="application/xhtml+xml"&&fn[S.namespaceURI]):!1},xr=function(S){Qa(t.removed,{element:S});try{y(S).removeChild(S)}catch{g(S)}},rs=function(S,H){try{Qa(t.removed,{attribute:H.getAttributeNode(S),from:H})}catch{Qa(t.removed,{attribute:null,from:H})}if(H.removeAttribute(S),S==="is")if(Pe||ft)try{xr(H)}catch{}else try{H.setAttribute(S,"")}catch{}},zg=function(S){let H=null,Y=null;if(We)S="<remove></remove>"+S;else{let Qe=r1(S,/^[\r\n\t ]+/);Y=Qe&&Qe[0]}ma==="application/xhtml+xml"&&jt===Dt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");let Re=x?x.createHTML(S):S;if(jt===Dt)try{H=new f().parseFromString(Re,ma)}catch{}if(!H||!H.documentElement){H=A.createDocument(jt,"template",null);try{H.documentElement.innerHTML=zt?O:Re}catch{}}let st=H.body||H.documentElement;return S&&Y&&st.insertBefore(r.createTextNode(Y),st.childNodes[0]||null),jt===Dt?C.call(H,xe?"html":"body")[0]:xe?H.documentElement:st},Bg=function(S){return T.call(S.ownerDocument||S,S,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},rp=function(S){return S instanceof d&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof c)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Ug=function(S){return typeof u=="function"&&S instanceof u};function Vr(X,S,H){gc(X,Y=>{Y.call(t,S,H,$i)})}let Wg=function(S){let H=null;if(Vr(P.beforeSanitizeElements,S,null),rp(S))return xr(S),!0;let Y=Ke(S.nodeName);if(Vr(P.uponSanitizeElement,S,{tagName:Y,allowedTags:B}),S.hasChildNodes()&&!Ug(S.firstElementChild)&&_t(/<[/\w]/g,S.innerHTML)&&_t(/<[/\w]/g,S.textContent)||S.nodeType===nu.progressingInstruction||_e&&S.nodeType===nu.comment&&_t(/<[/\w]/g,S.data))return xr(S),!0;if(!B[Y]||Te[Y]){if(!Te[Y]&&Vg(Y)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,Y)||le.tagNameCheck instanceof Function&&le.tagNameCheck(Y)))return!1;if($e&&!tr[Y]){let Re=y(S)||S.parentNode,st=w(S)||S.childNodes;if(st&&Re){let Qe=st.length;for(let Ot=Qe-1;Ot>=0;--Ot){let Sr=m(st[Ot],!0);Sr.__removalCount=(S.__removalCount||0)+1,Re.insertBefore(Sr,_(S))}}}return xr(S),!0}return S instanceof l&&!$R(S)||(Y==="noscript"||Y==="noembed"||Y==="noframes")&&_t(/<\/no(script|embed|frames)/i,S.innerHTML)?(xr(S),!0):(te&&S.nodeType===nu.text&&(H=S.textContent,gc([N,k,I],Re=>{H=eu(H,Re," ")}),S.textContent!==H&&(Qa(t.removed,{element:S.cloneNode()}),S.textContent=H)),Vr(P.afterSanitizeElements,S,null),!1)},Hg=function(S,H,Y){if(fe&&(H==="id"||H==="name")&&(Y in r||Y in GR))return!1;if(!(K&&!Ae[H]&&_t(W,H))){if(!(ae&&_t(j,H))){if(!Q[H]||Ae[H]){if(!(Vg(S)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,S)||le.tagNameCheck instanceof Function&&le.tagNameCheck(S))&&(le.attributeNameCheck instanceof RegExp&&_t(le.attributeNameCheck,H)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(H))||H==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,Y)||le.tagNameCheck instanceof Function&&le.tagNameCheck(Y))))return!1}else if(!Hr[H]){if(!_t(q,eu(Y,F,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&S!=="script"&&vI(Y,"data:")===0&&St[S])){if(!(ne&&!_t(D,eu(Y,F,"")))){if(Y)return!1}}}}}}return!0},Vg=function(S){return S!=="annotation-xml"&&r1(S,z)},Gg=function(S){Vr(P.beforeSanitizeAttributes,S,null);let{attributes:H}=S;if(!H||rp(S))return;let Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0},Re=H.length;for(;Re--;){let st=H[Re],{name:Qe,namespaceURI:Ot,value:Sr}=st,va=Ke(Qe),dt=Qe==="value"?Sr:gI(Sr);if(Y.attrName=va,Y.attrValue=dt,Y.keepAttr=!0,Y.forceKeepAttr=void 0,Vr(P.uponSanitizeAttribute,S,Y),dt=Y.attrValue,J&&(va==="id"||va==="name")&&(rs(Qe,S),dt=ie+dt),_e&&_t(/((--!?|])>)|<\/(style|title)/i,dt)){rs(Qe,S);continue}if(Y.forceKeepAttr||(rs(Qe,S),!Y.keepAttr))continue;if(!ee&&_t(/\/>/i,dt)){rs(Qe,S);continue}te&&gc([N,k,I],Kg=>{dt=eu(dt,Kg," ")});let $g=Ke(S.nodeName);if(Hg($g,va,dt)){if(x&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ot)switch(p.getAttributeType($g,va)){case"TrustedHTML":{dt=x.createHTML(dt);break}case"TrustedScriptURL":{dt=x.createScriptURL(dt);break}}try{Ot?S.setAttributeNS(Ot,Qe,dt):S.setAttribute(Qe,dt),rp(S)?xr(S):t1(t.removed)}catch{}}}Vr(P.afterSanitizeAttributes,S,null)},KR=function X(S){let H=null,Y=Bg(S);for(Vr(P.beforeSanitizeShadowDOM,S,null);H=Y.nextNode();)Vr(P.uponSanitizeShadowNode,H,null),Wg(H),Gg(H),H.content instanceof o&&X(H.content);Vr(P.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(X){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,Y=null,Re=null,st=null;if(zt=!X,zt&&(X="<!-->"),typeof X!="string"&&!Ug(X))if(typeof X.toString=="function"){if(X=X.toString(),typeof X!="string")throw tu("dirty is not a string, aborting")}else throw tu("toString is not a function");if(!t.isSupported)return X;if(be||tp(S),t.removed=[],typeof X=="string"&&(ze=!1),ze){if(X.nodeName){let Sr=Ke(X.nodeName);if(!B[Sr]||Te[Sr])throw tu("root node is forbidden and cannot be sanitized in-place")}}else if(X instanceof u)H=zg("<!---->"),Y=H.ownerDocument.importNode(X,!0),Y.nodeType===nu.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?H=Y:H.appendChild(Y);else{if(!Pe&&!te&&!xe&&X.indexOf("<")===-1)return x&&re?x.createHTML(X):X;if(H=zg(X),!H)return Pe?null:re?O:""}H&&We&&xr(H.firstChild);let Qe=Bg(ze?X:H);for(;Re=Qe.nextNode();)Wg(Re),Gg(Re),Re.content instanceof o&&KR(Re.content);if(ze)return X;if(Pe){if(ft)for(st=R.call(H.ownerDocument);H.firstChild;)st.appendChild(H.firstChild);else st=H;return(Q.shadowroot||Q.shadowrootmode)&&(st=M.call(n,st,!0)),st}let Ot=xe?H.outerHTML:H.innerHTML;return xe&&B["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&_t(d1,H.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
2
+ `+Ot),te&&gc([N,k,I],Sr=>{Ot=eu(Ot,Sr," ")}),x&&re?x.createHTML(Ot):Ot},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tp(X),be=!0},t.clearConfig=function(){$i=null,be=!1},t.isValidAttribute=function(X,S,H){$i||tp({});let Y=Ke(X),Re=Ke(S);return Hg(Y,Re,H)},t.addHook=function(X,S){typeof S=="function"&&Qa(P[X],S)},t.removeHook=function(X,S){if(S!==void 0){let H=hI(P[X],S);return H===-1?void 0:mI(P[X],H,1)[0]}return t1(P[X])},t.removeHooks=function(X){P[X]=[]},t.removeAllHooks=function(){P=s1()},t}var kI=p1();h1.exports=kI});var g1=b((rX,v1)=>{"use strict";var qI=/["'&<>]/;v1.exports=II;function II(e){var t=""+e,r=qI.exec(t);if(!r)return t;var n,i="",o=0,a=0;for(o=r.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}a!==o&&(i+=t.substring(a,o)),a=o+1,i+=n}return a!==o?i+t.substring(a,o):i}});var b1=b(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});Kh.default=jI;var $h=Ye();function jI(){let e=(0,$h.useRef)(null),[t,r]=(0,$h.useState)({width:void 0,height:void 0});return(0,$h.useEffect)(()=>{if(!e.current)return;let n=typeof window<"u"&&"ResizeObserver"in window?window.ResizeObserver:void 0;if(!n)return;let i=new n(o=>{r({width:o[0].contentRect.width,height:o[0].contentRect.height})});return i.observe(e.current),()=>{i.disconnect()}},[]),[e,t]}});var y1=b((iX,_1)=>{_1.exports=JBrowseExports["react-dom/client"]});var Qh=b(Pi=>{Object.defineProperty(Pi,"__esModule",{value:!0});var FI={grad:.9,turn:360,rad:360/(2*Math.PI)},en=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Xe=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Zt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},P1=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},w1=function(e){return{r:Zt(e.r,0,255),g:Zt(e.g,0,255),b:Zt(e.b,0,255),a:Zt(e.a)}},Yh=function(e){return{r:Xe(e.r),g:Xe(e.g),b:Xe(e.b),a:Xe(e.a,3)}},LI=/^#([0-9a-f]{3,8})$/i,yc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},R1=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},M1=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),l=n*(1-(1-t+o)*r),s=o%6;return{r:255*[n,u,a,a,l,n][s],g:255*[l,n,n,u,a,a][s],b:255*[a,a,l,n,n,u][s],a:i}},x1=function(e){return{h:P1(e.h),s:Zt(e.s,0,100),l:Zt(e.l,0,100),a:Zt(e.a)}},S1=function(e){return{h:Xe(e.h),s:Xe(e.s),l:Xe(e.l),a:Xe(e.a,3)}},O1=function(e){return M1((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},iu=function(e){return{h:(t=R1(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},NI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,DI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,BI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xh={string:[[function(e){var t=LI.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Xe(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Xe(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=zI.exec(e)||BI.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:w1({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=NI.exec(e)||DI.exec(e);if(!t)return null;var r,n,i=x1({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(FI[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return O1(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return en(t)&&en(r)&&en(n)?w1({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!en(t)||!en(r)||!en(n))return null;var a=x1({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return O1(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!en(t)||!en(r)||!en(n))return null;var a=function(u){return{h:P1(u.h),s:Zt(u.s,0,100),v:Zt(u.v,0,100),a:Zt(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return M1(a)},"hsv"]]},E1=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},C1=function(e){return typeof e=="string"?E1(e.trim(),Xh.string):typeof e=="object"&&e!==null?E1(e,Xh.object):[null,void 0]},Zh=function(e,t){var r=iu(e);return{h:r.h,s:Zt(r.s+100*t,0,100),l:r.l,a:r.a}},Jh=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},A1=function(e,t){var r=iu(e);return{h:r.h,s:r.s,l:Zt(r.l+100*t,0,100),a:r.a}},ou=function(){function e(t){this.parsed=C1(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Xe(Jh(this.rgba),2)},e.prototype.isDark=function(){return Jh(this.rgba)<.5},e.prototype.isLight=function(){return Jh(this.rgba)>=.5},e.prototype.toHex=function(){return t=Yh(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?yc(Xe(255*o)):"","#"+yc(r)+yc(n)+yc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Yh(this.rgba)},e.prototype.toRgbString=function(){return t=Yh(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return S1(iu(this.rgba))},e.prototype.toHslString=function(){return t=S1(iu(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=R1(this.rgba),{h:Xe(t.h),s:Xe(t.s),v:Xe(t.v),a:Xe(t.a,3)};var t},e.prototype.invert=function(){return qr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),qr(Zh(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),qr(Zh(this.rgba,-t))},e.prototype.grayscale=function(){return qr(Zh(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),qr(A1(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),qr(A1(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?qr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Xe(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=iu(this.rgba);return typeof t=="number"?qr({h:t,s:r.s,l:r.l,a:r.a}):Xe(r.h)},e.prototype.isEqual=function(t){return this.toHex()===qr(t).toHex()},e}(),qr=function(e){return e instanceof ou?e:new ou(e)},T1=[];Pi.Colord=ou,Pi.colord=qr,Pi.extend=function(e){e.forEach(function(t){T1.indexOf(t)<0&&(t(ou,Xh),T1.push(t))})},Pi.getFormat=function(e){return C1(e)[1]},Pi.random=function(){return new ou({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var I1=b((aX,q1)=>{var Ir=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},em=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},tm=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},rm=96.422,nm=100,im=82.521,UI=function(e){var t,r,n={x:.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:tm(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:tm(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:tm(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:Ir(r.r,0,255),g:Ir(r.g,0,255),b:Ir(r.b,0,255),a:Ir(r.a)}},WI=function(e){var t=em(e.r),r=em(e.g),n=em(e.b);return function(i){return{x:Ir(i.x,0,rm),y:Ir(i.y,0,nm),z:Ir(i.z,0,im),a:Ir(i.a)}}(function(i){return{x:1.0478112*i.x+.0228866*i.y+-.050127*i.z,y:.0295424*i.x+.9904844*i.y+-.0170491*i.z,z:-.0092345*i.x+.0150436*i.y+.7521316*i.z,a:i.a}}({x:100*(.4124564*t+.3575761*r+.1804375*n),y:100*(.2126729*t+.7151522*r+.072175*n),z:100*(.0193339*t+.119192*r+.9503041*n),a:e.a}))},au=216/24389,wo=24389/27,k1=function(e){var t=WI(e),r=t.x/rm,n=t.y/nm,i=t.z/im;return r=r>au?Math.cbrt(r):(wo*r+16)/116,{l:116*(n=n>au?Math.cbrt(n):(wo*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>au?Math.cbrt(i):(wo*i+16)/116)),alpha:t.a}},HI=function(e,t,r){var n,i=k1(e),o=k1(t);return function(a){var u=(a.l+16)/116,l=a.a/500+u,s=u-a.b/200;return UI({x:(Math.pow(l,3)>au?Math.pow(l,3):(116*l-16)/wo)*rm,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/wo)*nm,z:(Math.pow(s,3)>au?Math.pow(s,3):(116*s-16)/wo)*im,a:a.alpha})}({l:Ir((n={l:i.l*(1-r)+o.l*r,a:i.a*(1-r)+o.a*r,b:i.b*(1-r)+o.b*r,alpha:i.alpha*(1-r)+o.alpha*r}).l,0,400),a:n.a,b:n.b,alpha:Ir(n.alpha)})};q1.exports=function(e){function t(r,n,i){i===void 0&&(i=5);for(var o=[],a=1/(i-1),u=0;u<=i-1;u++)o.push(r.mix(n,a*u));return o}e.prototype.mix=function(r,n){n===void 0&&(n=.5);var i=r instanceof e?r:new e(r),o=HI(this.toRgb(),i.toRgb(),n);return new e(o)},e.prototype.tints=function(r){return t(this,"#fff",r)},e.prototype.shades=function(r){return t(this,"#000",r)},e.prototype.tones=function(r){return t(this,"#808080",r)}}});var F1=b((uX,j1)=>{j1.exports=function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,l,s=n[this.toHex()];if(s)return s;if(a?.closest){var c=this.toRgb(),d=1/0,f="black";if(!o.length)for(var p in r)o[p]=new e(r[p]).toRgb();for(var h in r){var m=(u=c,l=o[h],Math.pow(u.r-l.r,2)+Math.pow(u.g-l.g,2)+Math.pow(u.b-l.b,2));m<d&&(d=m,f=h)}return f}},t.string.push([function(a){var u=a.toLowerCase(),l=u==="transparent"?"#0000":r[u];return l?new e(l).toRgb():null},"name"])}});var D1=b(Sn=>{"use strict";var L1=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.colord=Sn.Colord=void 0;var VI=Qh(),GI=L1(I1()),$I=L1(F1());(0,VI.extend)([GI.default,$I.default]);var N1=Qh();Object.defineProperty(Sn,"Colord",{enumerable:!0,get:function(){return N1.Colord}});Object.defineProperty(Sn,"colord",{enumerable:!0,get:function(){return N1.colord}})});var om=b(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.createStopToken=YI;uu.stopStopToken=ZI;uu.checkStopToken=JI;function KI(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function YI(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function ZI(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function JI(e){if(typeof jest>"u"&&e!==void 0&&KI()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var B1=b(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0})});var On=b((fX,su)=>{function XI(e){return e&&e.__esModule?e:{default:e}}su.exports=XI,su.exports.__esModule=!0,su.exports.default=su.exports});var um=b((dX,tn)=>{function am(e){"@babel/helpers - typeof";return tn.exports=am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tn.exports.__esModule=!0,tn.exports.default=tn.exports,am(e)}tn.exports=am,tn.exports.__esModule=!0,tn.exports.default=tn.exports});var W1=b((pX,cu)=>{var U1=um().default;function QI(e,t){if(U1(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(U1(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}cu.exports=QI,cu.exports.__esModule=!0,cu.exports.default=cu.exports});var sm=b((hX,lu)=>{var ej=um().default,tj=W1();function rj(e){var t=tj(e,"string");return ej(t)=="symbol"?t:t+""}lu.exports=rj,lu.exports.__esModule=!0,lu.exports.default=lu.exports});var H1=b((mX,fu)=>{var nj=sm();function ij(e,t,r){return(t=nj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}fu.exports=ij,fu.exports.__esModule=!0,fu.exports.default=fu.exports});var Ri=b((vX,du)=>{function oj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}du.exports=oj,du.exports.__esModule=!0,du.exports.default=du.exports});var Mi=b((gX,pu)=>{var aj=sm();function V1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aj(n.key),n)}}function uj(e,t,r){return t&&V1(e.prototype,t),r&&V1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}pu.exports=uj,pu.exports.__esModule=!0,pu.exports.default=pu.exports});var cm=b((bX,hu)=>{function sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}hu.exports=sj,hu.exports.__esModule=!0,hu.exports.default=hu.exports});var G1=b((_X,mu)=>{var cj=cm();function lj(e){if(Array.isArray(e))return cj(e)}mu.exports=lj,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var $1=b((yX,vu)=>{function fj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}vu.exports=fj,vu.exports.__esModule=!0,vu.exports.default=vu.exports});var Y1=b((wX,gu)=>{var K1=cm();function dj(e,t){if(e){if(typeof e=="string")return K1(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K1(e,t):void 0}}gu.exports=dj,gu.exports.__esModule=!0,gu.exports.default=gu.exports});var Z1=b((xX,bu)=>{function pj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}bu.exports=pj,bu.exports.__esModule=!0,bu.exports.default=bu.exports});var J1=b((SX,_u)=>{var hj=G1(),mj=$1(),vj=Y1(),gj=Z1();function bj(e){return hj(e)||mj(e)||vj(e)||gj()}_u.exports=bj,_u.exports.__esModule=!0,_u.exports.default=_u.exports});var X1=b(jr=>{"use strict";var _j=On(),yj=_j(J1()),wj={functions:"Jexl Function",transforms:"Transform"};jr.ArrayLiteral=function(e){return this.evalArray(e.value)};jr.BinaryExpression=function(e){var t=this,r=this._grammar.elements[e.operator];if(r.evalOnDemand){var n=function(o){return{eval:function(){return t.eval(o)}}};return r.evalOnDemand(n(e.left),n(e.right))}return this.Promise.all([this.eval(e.left),this.eval(e.right)]).then(function(i){return r.eval(i[0],i[1])})};jr.ConditionalExpression=function(e){var t=this;return this.eval(e.test).then(function(r){return r?e.consequent?t.eval(e.consequent):r:t.eval(e.alternate)})};jr.FilterExpression=function(e){var t=this;return this.eval(e.subject).then(function(r){return e.relative?t._filterRelative(r,e.expr):t._filterStatic(r,e.expr)})};jr.Identifier=function(e){return e.from?this.eval(e.from).then(function(t){if(t!=null)return Array.isArray(t)&&(t=t[0]),t[e.value]}):e.relative?this._relContext[e.value]:this._context[e.value]};jr.Literal=function(e){return e.value};jr.ObjectLiteral=function(e){return this.evalMap(e.value)};jr.FunctionCall=function(e){var t=wj[e.pool];if(!t)throw new Error("Corrupt AST: Pool '".concat(e.pool,"' not found"));var r=this._grammar[e.pool],n=r[e.name];if(!n)throw new Error("".concat(t," ").concat(e.name," is not defined."));return this.evalArray(e.args||[]).then(function(i){return n.apply(void 0,(0,yj.default)(i))})};jr.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var tx=b((EX,ex)=>{"use strict";var Q1=On(),xj=Q1(Ri()),Sj=Q1(Mi()),Oj=X1(),Ej=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,xj.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,Sj.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return Oj[r.type].call(n,r)})}},{key:"evalArray",value:function(r){var n=this;return this.Promise.all(r.map(function(i){return n.eval(i)}))}},{key:"evalMap",value:function(r){var n=this,i=Object.keys(r),o={},a=i.map(function(u){return n.eval(r[u])});return this.Promise.all(a).then(function(u){return u.forEach(function(l,s){o[i[s]]=l}),o})}},{key:"_filterRelative",value:function(r,n){var i=this,o=[];return Array.isArray(r)||(r=r===void 0?[]:[r]),r.forEach(function(a){var u=new e(i._grammar,i._context,a,i.Promise);o.push(u.eval(n))}),this.Promise.all(o).then(function(a){var u=[];return a.forEach(function(l,s){l&&u.push(r[s])}),u})}},{key:"_filterStatic",value:function(r,n){return this.eval(n).then(function(i){return typeof i=="boolean"?i?r:void 0:r[i]})}}]),e}();ex.exports=Ej});var ox=b((AX,ix)=>{"use strict";var nx=On(),Aj=nx(Ri()),Tj=nx(Mi()),Pj=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,rx=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,Rj=/\\\\/,Mj=/^\s*$/,Cj=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],kj=["[a-zA-Z\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$][a-zA-Z0-9\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$]*","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],qj=["binaryOp","unaryOp","openParen","openBracket","question","colon"],Ij=function(){function e(t){(0,Aj.default)(this,e),this._grammar=t}return(0,Tj.default)(e,[{key:"getElements",value:function(r){var n=this._getSplitRegex();return r.split(n).filter(function(i){return i})}},{key:"getTokens",value:function(r){for(var n=[],i=!1,o=0;o<r.length;o++)this._isWhitespace(r[o])?n.length&&(n[n.length-1].raw+=r[o]):r[o]==="-"&&this._isNegative(n)?i=!0:(i&&(r[o]="-"+r[o],i=!1),n.push(this._createToken(r[o])));return i&&n.push(this._createToken("-")),n}},{key:"tokenize",value:function(r){var n=this.getElements(r);return this.getTokens(n)}},{key:"_createToken",value:function(r){var n={type:"literal",value:r,raw:r};if(r[0]==='"'||r[0]==="'")n.value=this._unquote(r);else if(r.match(Pj))n.value=parseFloat(r);else if(r==="true"||r==="false")n.value=r==="true";else if(this._grammar.elements[r])n.type=this._grammar.elements[r].type;else if(r.match(rx))n.type="identifier";else throw new Error("Invalid expression token: ".concat(r));return n}},{key:"_escapeRegExp",value:function(r){return r=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r.match(rx)&&(r="\\b"+r+"\\b"),r}},{key:"_getSplitRegex",value:function(){var r=this;if(!this._splitRegex){var n=Object.keys(this._grammar.elements).sort(function(i,o){return o.length-i.length}).map(function(i){return r._escapeRegExp(i)},this);this._splitRegex=new RegExp("("+[Cj.join("|"),n.join("|"),kj.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?qj.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(Mj)}},{key:"_unquote",value:function(r){var n=r[0],i=new RegExp("\\\\"+n,"g");return r.substr(1,r.length-2).replace(i,n).replace(Rj,"\\")}}]),e}();ix.exports=Ij});var lm=b(Ge=>{"use strict";Ge.argVal=function(e){e&&this._cursor.args.push(e)};Ge.arrayStart=function(){this._placeAtCursor({type:"ArrayLiteral",value:[]})};Ge.arrayVal=function(e){e&&this._cursor.value.push(e)};Ge.binaryOp=function(e){for(var t=this._grammar.elements[e.value].precedence||0,r=this._cursor._parent;r&&r.operator&&this._grammar.elements[r.operator].precedence>=t;)this._cursor=r,r=r._parent;var n={type:"BinaryExpression",operator:e.value,left:this._cursor};this._setParent(this._cursor,n),this._cursor=r,this._placeAtCursor(n)};Ge.dot=function(){this._nextIdentEncapsulate=this._cursor&&this._cursor.type!=="UnaryExpression"&&(this._cursor.type!=="BinaryExpression"||this._cursor.type==="BinaryExpression"&&this._cursor.right),this._nextIdentRelative=!this._cursor||this._cursor&&!this._nextIdentEncapsulate,this._nextIdentRelative&&(this._relative=!0)};Ge.filter=function(e){this._placeBeforeCursor({type:"FilterExpression",expr:e,relative:this._subParser.isRelative(),subject:this._cursor})};Ge.functionCall=function(){this._placeBeforeCursor({type:"FunctionCall",name:this._cursor.value,args:[],pool:"functions"})};Ge.identifier=function(e){var t={type:"Identifier",value:e.value};this._nextIdentEncapsulate?(t.from=this._cursor,this._placeBeforeCursor(t),this._nextIdentEncapsulate=!1):(this._nextIdentRelative&&(t.relative=!0,this._nextIdentRelative=!1),this._placeAtCursor(t))};Ge.literal=function(e){this._placeAtCursor({type:"Literal",value:e.value})};Ge.objKey=function(e){this._curObjKey=e.value};Ge.objStart=function(){this._placeAtCursor({type:"ObjectLiteral",value:{}})};Ge.objVal=function(e){this._cursor.value[this._curObjKey]=e};Ge.subExpression=function(e){this._placeAtCursor(e)};Ge.ternaryEnd=function(e){this._cursor.alternate=e};Ge.ternaryMid=function(e){this._cursor.consequent=e};Ge.ternaryStart=function(){this._tree={type:"ConditionalExpression",test:this._tree},this._cursor=this._tree};Ge.transform=function(e){this._placeBeforeCursor({type:"FunctionCall",name:e.value,args:[this._cursor],pool:"transforms"})};Ge.unaryOp=function(e){this._placeAtCursor({type:"UnaryExpression",operator:e.value})}});var ux=b(ax=>{"use strict";var Mt=lm();ax.states={expectOperand:{tokenTypes:{literal:{toState:"expectBinOp"},identifier:{toState:"identifier"},unaryOp:{},openParen:{toState:"subExpression"},openCurl:{toState:"expectObjKey",handler:Mt.objStart},dot:{toState:"traverse"},openBracket:{toState:"arrayVal",handler:Mt.arrayStart}}},expectBinOp:{tokenTypes:{binaryOp:{toState:"expectOperand"},pipe:{toState:"expectTransform"},dot:{toState:"traverse"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},expectTransform:{tokenTypes:{identifier:{toState:"postTransform",handler:Mt.transform}}},expectObjKey:{tokenTypes:{identifier:{toState:"expectKeyValSep",handler:Mt.objKey},closeCurl:{toState:"expectBinOp"}}},expectKeyValSep:{tokenTypes:{colon:{toState:"objVal"}}},postTransform:{tokenTypes:{openParen:{toState:"argVal"},binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},postArgs:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},identifier:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},openParen:{toState:"argVal",handler:Mt.functionCall},pipe:{toState:"expectTransform"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},traverse:{tokenTypes:{identifier:{toState:"identifier"}}},filter:{subHandler:Mt.filter,endStates:{closeBracket:"identifier"}},subExpression:{subHandler:Mt.subExpression,endStates:{closeParen:"expectBinOp"}},argVal:{subHandler:Mt.argVal,endStates:{comma:"argVal",closeParen:"postArgs"}},objVal:{subHandler:Mt.objVal,endStates:{comma:"expectObjKey",closeCurl:"expectBinOp"}},arrayVal:{subHandler:Mt.arrayVal,endStates:{comma:"arrayVal",closeBracket:"expectBinOp"}},ternaryMid:{subHandler:Mt.ternaryMid,endStates:{colon:"ternaryEnd"}},ternaryEnd:{subHandler:Mt.ternaryEnd,completable:!0}}});var lx=b((RX,cx)=>{"use strict";var sx=On(),jj=sx(Ri()),Fj=sx(Mi()),Lj=lm(),wc=ux().states,Nj=function(){function e(t,r,n){(0,jj.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,Fj.default)(e,[{key:"addToken",value:function(r){if(this._state==="complete")throw new Error("Cannot add a new token to a completed Parser");var n=wc[this._state],i=this._exprStr;if(this._exprStr+=r.raw,n.subHandler){this._subParser||this._startSubExpression(i);var o=this._subParser.addToken(r);if(o){if(this._endSubExpression(),this._parentStop)return o;this._state=o}}else if(n.tokenTypes[r.type]){var a=n.tokenTypes[r.type],u=Lj[r.type];a.handler&&(u=a.handler),u&&u.call(this,r),a.toState&&(this._state=a.toState)}else{if(this._stopMap[r.type])return this._stopMap[r.type];throw new Error("Token ".concat(r.raw," (").concat(r.type,") unexpected in expression: ").concat(this._exprStr))}return!1}},{key:"addTokens",value:function(r){r.forEach(this.addToken,this)}},{key:"complete",value:function(){if(this._cursor&&!wc[this._state].completable)throw new Error("Unexpected end of expression: ".concat(this._exprStr));return this._subParser&&this._endSubExpression(),this._state="complete",this._cursor?this._tree:null}},{key:"isRelative",value:function(){return this._relative}},{key:"_endSubExpression",value:function(){wc[this._state].subHandler.call(this,this._subParser.complete()),this._subParser=null}},{key:"_placeAtCursor",value:function(r){this._cursor?(this._cursor.right=r,this._setParent(r,this._cursor)):this._tree=r,this._cursor=r}},{key:"_placeBeforeCursor",value:function(r){this._cursor=this._cursor._parent,this._placeAtCursor(r)}},{key:"_setParent",value:function(r,n){Object.defineProperty(r,"_parent",{value:n,writable:!0})}},{key:"_startSubExpression",value:function(r){var n=wc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();cx.exports=Nj});var px=b((MX,dx)=>{"use strict";var fx=On(),Dj=fx(Ri()),zj=fx(Mi()),En=function(){function e(t){(0,Dj.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,zj.default)(e,[{key:"catch",value:function(r){if(this.error)try{this._resolve(r(this.error))}catch(n){this._reject(n)}return this}},{key:"then",value:function(r,n){if(!this.error)try{this._resolve(r(this.value))}catch(i){this._reject(i)}return n&&this.catch(n),this}},{key:"_reject",value:function(r){this.value=void 0,this.error=r}},{key:"_resolve",value:function(r){r instanceof e?r.error?this._reject(r.error):this._resolve(r.value):(this.value=r,this.error=void 0)}}]),e}();En.all=function(e){return new En(function(t){var r=e.map(function(n){for(;n instanceof En;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};En.resolve=function(e){return new En(function(t){return t(e)})};En.reject=function(e){return new En(function(t,r){return r(e)})};dx.exports=En});var vx=b((CX,mx)=>{"use strict";var hx=On(),Bj=hx(Ri()),Uj=hx(Mi()),Wj=tx(),Hj=ox(),Vj=lx(),Gj=px(),$j=function(){function e(t,r){(0,Bj.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,Uj.default)(e,[{key:"compile",value:function(){var r=new Hj(this._grammar),n=new Vj(this._grammar),i=r.tokenize(this._exprStr);return n.addTokens(i),this._ast=n.complete(),this}},{key:"eval",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._eval(r,Promise)}},{key:"evalSync",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=this._eval(r,Gj);if(n.error)throw n.error;return n.value}},{key:"_eval",value:function(r,n){var i=this;return n.resolve().then(function(){var o=i._getAst(),a=new Wj(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();mx.exports=$j});var bx=b(gx=>{"use strict";gx.getGrammar=function(){return{elements:{".":{type:"dot"},"[":{type:"openBracket"},"]":{type:"closeBracket"},"|":{type:"pipe"},"{":{type:"openCurl"},"}":{type:"closeCurl"},":":{type:"colon"},",":{type:"comma"},"(":{type:"openParen"},")":{type:"closeParen"},"?":{type:"question"},"+":{type:"binaryOp",precedence:30,eval:function(t,r){return t+r}},"-":{type:"binaryOp",precedence:30,eval:function(t,r){return t-r}},"*":{type:"binaryOp",precedence:40,eval:function(t,r){return t*r}},"/":{type:"binaryOp",precedence:40,eval:function(t,r){return t/r}},"//":{type:"binaryOp",precedence:40,eval:function(t,r){return Math.floor(t/r)}},"%":{type:"binaryOp",precedence:50,eval:function(t,r){return t%r}},"^":{type:"binaryOp",precedence:50,eval:function(t,r){return Math.pow(t,r)}},"==":{type:"binaryOp",precedence:20,eval:function(t,r){return t==r}},"!=":{type:"binaryOp",precedence:20,eval:function(t,r){return t!=r}},">":{type:"binaryOp",precedence:20,eval:function(t,r){return t>r}},">=":{type:"binaryOp",precedence:20,eval:function(t,r){return t>=r}},"<":{type:"binaryOp",precedence:20,eval:function(t,r){return t<r}},"<=":{type:"binaryOp",precedence:20,eval:function(t,r){return t<=r}},"&&":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n&&r.eval()})}},"||":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n||r.eval()})}},in:{type:"binaryOp",precedence:20,eval:function(t,r){return typeof r=="string"?r.indexOf(t)!==-1:Array.isArray(r)?r.some(function(n){return n===t}):!1}},"!":{type:"unaryOp",precedence:1/0,eval:function(t){return!t}}},functions:{},transforms:{}}}});var yx=b((qX,dm)=>{"use strict";var fm=On(),Kj=fm(H1()),Yj=fm(Ri()),Zj=fm(Mi()),Jj=vx(),Xj=bx(),Qj=Xj.getGrammar,_x=function(){function e(){(0,Yj.default)(this,e),this.expr=this.expr.bind(this),this._grammar=Qj()}return(0,Zj.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,Kj.default)({type:"binaryOp",precedence:n},o?"evalOnDemand":"eval",i))}},{key:"addFunction",value:function(r,n){this._grammar.functions[r]=n}},{key:"addFunctions",value:function(r){for(var n in r)this._grammar.functions[n]=r[n]}},{key:"addUnaryOp",value:function(r,n){this._addGrammarElement(r,{type:"unaryOp",weight:1/0,eval:n})}},{key:"addTransform",value:function(r,n){this._grammar.transforms[r]=n}},{key:"addTransforms",value:function(r){for(var n in r)this._grammar.transforms[n]=r[n]}},{key:"compile",value:function(r){var n=this.createExpression(r);return n.compile()}},{key:"createExpression",value:function(r){return new Jj(this._grammar,r)}},{key:"getFunction",value:function(r){return this._grammar.functions[r]}},{key:"getTransform",value:function(r){return this._grammar.transforms[r]}},{key:"eval",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.eval(n)}},{key:"evalSync",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.evalSync(n)}},{key:"expr",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a=r.reduce(function(u,l,s){var c=s<i.length?i[s]:"";return u+=l+c,u},"");return this.createExpression(a)}},{key:"removeOp",value:function(r){this._grammar.elements[r]&&(this._grammar.elements[r].type==="binaryOp"||this._grammar.elements[r].type==="unaryOp")&&delete this._grammar.elements[r]}},{key:"_addGrammarElement",value:function(r,n){this._grammar.elements[r]=n}}]),e}();dm.exports=new _x;dm.exports.Jexl=_x});var wx=b(yu=>{"use strict";var e2=yu&&yu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yu,"__esModule",{value:!0});yu.default=r2;var t2=e2(yx());function r2(){let e=new t2.default.Jexl;return e.addFunction("get",(t,r)=>t.get(r)),e.addFunction("parent",t=>t.parent()),e.addFunction("id",t=>t.id()),e.addFunction("cast",t=>t),e.addFunction("log",t=>(console.log(t),t)),e.addFunction("max",Math.max),e.addFunction("min",Math.min),e.addFunction("sqrt",Math.sqrt),e.addFunction("ceil",Math.ceil),e.addFunction("floor",Math.floor),e.addFunction("round",Math.round),e.addFunction("abs",Math.abs),e.addFunction("log10",Math.log10),e.addFunction("parseInt",Number.parseInt),e.addFunction("parseFloat",Number.parseFloat),e.addFunction("split",(t,r)=>t.split(r)),e.addFunction("charAt",(t,r)=>t.charAt(r)),e.addFunction("charCodeAt",(t,r)=>t.charCodeAt(r)),e.addFunction("codePointAt",(t,r)=>t.codePointAt(r)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("endsWith",(t,r,n)=>t.endsWith(r,n)),e.addFunction("padEnd",(t,r,n)=>t.padEnd(r,n)),e.addFunction("padStart",(t,r,n)=>t.padStart(r,n)),e.addFunction("repeat",(t,r)=>t.repeat(r)),e.addFunction("replace",(t,r,n)=>t.replace(r,n)),e.addFunction("replaceAll",(t,r,n)=>t.replaceAll(r,n)),e.addFunction("slice",(t,r,n)=>t.slice(r,n)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("substring",(t,r,n)=>t.substring(r,n)),e.addFunction("toLowerCase",t=>t.toLowerCase()),e.addFunction("toUpperCase",t=>t.toUpperCase()),e.addFunction("jsonParse",t=>JSON.parse(t)),e.addFunction("trim",t=>t.trim()),e.addFunction("trimEnd",t=>t.trimEnd()),e.addFunction("trimStart",t=>t.trimStart()),e.addFunction("getTag",(t,r)=>{let n=t.get("tags");return n?n[r]:t.get(r)}),e.addBinaryOp("&",15,(t,r)=>t&r),e}});var hm=b(wu=>{"use strict";var n2=wu&&wu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wu,"__esModule",{value:!0});wu.stringToJexlExpression=o2;var i2=n2(wx()),pm={};function o2(e,t){let r=`nosig|${e}`;if(!pm[r]){if(!e.startsWith("jexl:"))throw new Error("string does not appear to be in jexl format");let i=e.split("jexl:")[1],o=t?t.compile(i):(0,i2.default)().compile(i);pm[r]=o}return pm[r]}});var xx=b(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.nanoid=Ct.customAlphabet=Ct.customRandom=Ct.random=Ct.urlAlphabet=void 0;Ct.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var a2=e=>crypto.getRandomValues(new Uint8Array(e));Ct.random=a2;var u2=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return(o=t)=>{let a="";for(;;){let u=r(i),l=i;for(;l--;)if(a+=e[u[l]&n]||"",a.length===o)return a}}};Ct.customRandom=u2;var s2=(e,t=21)=>(0,Ct.customRandom)(e,t,Ct.random);Ct.customAlphabet=s2;var c2=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");Ct.nanoid=c2});var mm=b(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.FileLocation=je.UriLocation=je.UriLocationRaw=je.BlobLocation=je.LocalPathLocation=je.Region=je.NoAssemblyRegion=je.ElementId=void 0;var ve=vt(),l2=xx();je.ElementId=ve.types.optional(ve.types.identifier,()=>(0,l2.nanoid)());je.NoAssemblyRegion=ve.types.model("NoAssemblyRegion",{refName:ve.types.string,start:ve.types.number,end:ve.types.number,reversed:ve.types.optional(ve.types.boolean,!1)}).actions(e=>({setRefName(t){e.refName=t}}));je.Region=ve.types.compose("Region",je.NoAssemblyRegion,ve.types.model({assemblyName:ve.types.string}));je.LocalPathLocation=ve.types.model("LocalPathLocation",{locationType:ve.types.literal("LocalPathLocation"),localPath:ve.types.string});je.BlobLocation=ve.types.model("BlobLocation",{locationType:ve.types.literal("BlobLocation"),name:ve.types.string,blobId:ve.types.string});je.UriLocationRaw=ve.types.model("UriLocation",{locationType:ve.types.literal("UriLocation"),uri:ve.types.string,baseUri:ve.types.maybe(ve.types.string),internetAccountId:ve.types.maybe(ve.types.string),internetAccountPreAuthorization:ve.types.maybe(ve.types.model("InternetAccountPreAuthorization",{internetAccountType:ve.types.string,authInfo:ve.types.frozen()}))});je.UriLocation=ve.types.snapshotProcessor(je.UriLocationRaw,{postProcessor:e=>{let{baseUri:t,...r}=e;return t?e:r}});je.FileLocation=ve.types.snapshotProcessor(ve.types.union(je.LocalPathLocation,je.UriLocation,je.BlobLocation),{preProcessor(e){if(!e)return;let{locationType:t,...r}=e;if(!t){let{uri:n,localPath:i,blob:o}=r,a="";return n!==void 0?a="UriLocation":i!==void 0?a="LocalPathLocation":o!==void 0&&(a="BlobLocation"),{...r,locationType:a}}return e}})});var Ax=b(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});gm.default=b2;var Ce=vt(),f2=xo(),d2=hm(),p2=mm();function h2(){return!0}var m2={stringArray:Ce.types.array(Ce.types.string),stringArrayMap:Ce.types.map(Ce.types.array(Ce.types.string)),numberMap:Ce.types.map(Ce.types.number),boolean:Ce.types.boolean,color:Ce.types.refinement("Color",Ce.types.string,h2),integer:Ce.types.integer,number:Ce.types.number,string:Ce.types.string,text:Ce.types.string,fileLocation:p2.FileLocation,frozen:Ce.types.frozen()},Sx={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},vm=e=>({views:{get valueJSON(){return e.value}}}),Ox=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),Ex={fileLocation:Ox,number:vm,integer:vm,boolean:vm,frozen:Ox,stringArray:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t){e.value.push(t)},removeAtIndex(t){e.value.splice(t,1)},setAtIndex(t,r){e.value[t]=r}}}),stringArrayMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)},addToKey(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.push(r)},removeAtKeyIndex(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.splice(r,1)},setAtKeyIndex(t,r,n){let i=e.value.get(t);if(!i)throw new Error(`${t} not found`);i[r]=n}}}),numberMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)}}})},v2=Ce.types.refinement("JexlString",Ce.types.string,e=>e.startsWith("jexl:"));function g2(e){return e?.toJSON?e.toJSON():`"${e}"`}function b2(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=m2[n]),!r)throw new Error(`no builtin config slot type "${n}", and no 'model' param provided`);if(i===void 0)throw new Error("no 'defaultValue' provided");let a=`${e.charAt(0).toUpperCase()}${e.slice(1)}ConfigSlot`,u=Ce.types.model(a,{name:Ce.types.literal(e),description:Ce.types.literal(t),type:Ce.types.literal(n),value:Ce.types.optional(Ce.types.union(v2,r),i)}).volatile(()=>({contextVariable:o})).views(c=>({get isCallback(){return String(c.value).startsWith("jexl:")}})).views(c=>({get expr(){if(c.isCallback){let{pluginManager:d}=(0,f2.getEnv)(c);return!d&&typeof jest>"u"&&console.warn("no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)"),(0,d2.stringToJexlExpression)(String(c.value),d?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return g2(c.value)}})).preProcessSnapshot(c=>typeof c=="object"&&c.name===e?c:{name:e,description:t,type:n,value:c}).postProcessSnapshot(c=>typeof c.value=="object"?JSON.stringify(c.value)!==JSON.stringify(i)?c.value:void 0:c.value!==i?c.value:void 0).actions(c=>({set(d){c.value=d},reset(){c.value=i},convertToCallback(){c.isCallback||(c.value=`jexl:${c.valueJSON||"''"}`)},convertToValue(){if(c.isCallback){try{let d=c.expr.evalSync();if(d!==void 0){c.value=d;return}}catch{}if(c.value=i,!(n in Sx))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=Sx[n]}}}));Ex[n]&&(u=u.extend(Ex[n]));let s=Ce.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var Px=b(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.getSubType=bm;Tn.getUnionSubTypes=Tx;Tn.getPropertyType=_2;Tn.getDefaultValue=y2;Tn.getEnumerationValues=w2;Tn.resolveLateType=x2;var An=vt();function bm(e){let t;if((0,An.isOptionalType)(e))t=e._subtype||e.type;else if((0,An.isArrayType)(e)||(0,An.isMapType)(e))t=e._subtype||e._subType||e.subType;else{if(typeof e.getSubType=="function")return e.getSubType();throw new TypeError("unsupported mst type")}if(!t)throw new Error("failed to get subtype");return t}function Tx(e){if(!(0,An.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||bm(e)._types||bm(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function _2(e,t){return e.properties[t]}function y2(e){if(!(0,An.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function w2(e){return Tx(e).map(r=>r.value)}function x2(e){return!(0,An.isUnionType)(e)&&!(0,An.isArrayType)(e)&&(0,An.isLateType)(e)?e.getSubType():e}});var _m=b(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.readConfObject=xc;rn.getConf=S2;rn.getTypeNamesFromExplicitlyTypedUnion=Rx;rn.isBareConfigurationSchemaType=Mx;rn.isConfigurationSchemaType=So;rn.isConfigurationModel=Cx;rn.isConfigurationSlotType=O2;var Ue=vt(),Pn=Px();function xc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Ue.isStateTreeNode)(e)&&(0,Ue.isMapType)((0,Ue.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Ue.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Ue.getSnapshot)(i))):i}else return}else if(Array.isArray(t)){let n=t[0];if(t.length>1){let i=t.slice(1),o=e[n];return!o&&(0,Ue.isStateTreeNode)(e)&&(0,Ue.isMapType)((0,Ue.getType)(e))&&(o=e.get(n)),o?xc(o,i,r):void 0}return xc(e,n,r)}}else return structuredClone((0,Ue.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function S2(e,t,r){let{configuration:n}=e;if(Cx(n))return xc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function Rx(e){if((0,Ue.isType)(e)&&(e=(0,Pn.resolveLateType)(e),(0,Ue.isUnionType)(e))){let t=[];return(0,Pn.getUnionSubTypes)(e).forEach(r=>{r=(0,Pn.resolveLateType)(r);let n=Rx(r);if(n.length||(n=[(0,Pn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}),t}return[]}function Mx(e){return!!((0,Ue.isType)(e)&&((0,Ue.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Ue.isLateType)(e)))}function So(e){return(0,Ue.isType)(e)?Mx(e)?!0:(0,Ue.isUnionType)(e)?(0,Pn.getUnionSubTypes)(e).every(t=>So(t)||t.name==="undefined"):(0,Ue.isOptionalType)(e)&&So((0,Pn.getSubType)(e))||(0,Ue.isArrayType)(e)&&So((0,Pn.getSubType)(e))?!0:!!((0,Ue.isMapType)(e)&&So((0,Pn.getSubType)(e))):!1}function Cx(e){return(0,Ue.isStateTreeNode)(e)&&So((0,Ue.getType)(e))}function O2(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var Ix=b(Oo=>{"use strict";var E2=Oo&&Oo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.ConfigurationSchema=C2;Oo.ConfigurationReference=k2;var Jt=vt(),A2=E2(Ax()),kx=_m(),qx=mm();function T2(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function P2(e){return Array.isArray(e)&&e.length===0}function R2(e,t,r={}){var n;if(typeof e!="string")throw new Error("first arg must be string name of the model that this config schema goes with");let i=t,o=r;return!((n=r.baseConfiguration)===null||n===void 0)&&n.jbrowseSchemaDefinition&&(i={...r.baseConfiguration.jbrowseSchemaDefinition,...i},o={...r.baseConfiguration.jbrowseSchemaOptions,...r},o.baseConfiguration=void 0),{schemaDefinition:i,options:o}}function M2(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Jt.types.optional(Jt.types.literal(e),e)),r.explicitIdentifier&&r.implicitIdentifier)throw new Error(`Cannot have both explicit and implicit identifiers in ${e}`);r.explicitIdentifier?typeof r.explicitIdentifier=="string"?(n[r.explicitIdentifier]=Jt.types.identifier,i=r.explicitIdentifier):(n.id=Jt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=qx.ElementId,i=r.implicitIdentifier):(n.id=qx.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach(([c,d])=>{if((0,Jt.isType)(d)&&(0,Jt.isLateType)(d)||(0,kx.isConfigurationSchemaType)(d))n[c]=d;else if(typeof d=="string"||typeof d=="number")o[c]=d;else if(typeof d=="object"){if(!d.type)throw new Error(`no type set for config slot ${e}.${c}`);try{n[c]=(0,A2.default)(c,d)}catch(f){throw new Error(`invalid config slot definition for ${e}.${c}: ${f}`)}}else throw new Error(`invalid configuration schema definition, "${c}" must be either a valid configuration slot definition, a constant, or a nested configuration schema`)});let a=Jt.types.model(`${e}ConfigurationSchema`,n).actions(c=>({setSubschema(d,f){if(!(0,kx.isConfigurationSchemaType)(n[d]))throw new Error(`${d} is not a subschema, cannot replace`);let p=(0,Jt.isStateTreeNode)(f)?f:n[d].create(f);return c[d]=p,p}}));Object.keys(o).length&&(a=a.volatile(()=>o)),r.actions&&(a=a.actions(r.actions)),r.views&&(a=a.views(r.views)),r.extend&&(a=a.extend(r.extend));let u=i?{[i]:"placeholderId"}:{},l=r.explicitlyTyped?{type:e,...u}:u,s=(0,Jt.getSnapshot)(a.create(l));return a=a.postProcessSnapshot(c=>{let d={},f=!0;for(let[p,h]of Object.entries(c))f&&(typeof s[p]=="object"&&typeof h=="object"?JSON.stringify(s[p])!==JSON.stringify(h)&&(f=!1):s[p]!==h&&(f=!1)),h!==void 0&&o[p]===void 0&&!T2(h)&&!P2(h)&&(d[p]=h);return f?{}:d}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Jt.types.optional(a,l)}function C2(e,t,r){let{schemaDefinition:n,options:i}=R2(e,t,r),o=M2(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function k2(e){return Jt.types.union(Jt.types.reference(e),e)}});var ym=b(mr=>{"use strict";var q2=mr&&mr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),I2=mr&&mr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&q2(t,e,r)};Object.defineProperty(mr,"__esModule",{value:!0});mr.ConfigurationSchema=mr.ConfigurationReference=void 0;var jx=Ix();Object.defineProperty(mr,"ConfigurationReference",{enumerable:!0,get:function(){return jx.ConfigurationReference}});Object.defineProperty(mr,"ConfigurationSchema",{enumerable:!0,get:function(){return jx.ConfigurationSchema}});I2(_m(),mr)});var Fx=b(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var wm=class extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if(typeof this.onEviction=="function")for(let[r,n]of t)this.onEviction(r,n.value)}_deleteIfExpired(t,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(t,r.value),this.delete(t)):!1}_getOrDeleteIfExpired(t,r){if(!this._deleteIfExpired(t,r))return r.value}_getItemValue(t,r){return r.expiry?this._getOrDeleteIfExpired(t,r):r.value}_peek(t,r){let n=r.get(t);return this._getItemValue(t,n)}_set(t,r){this.cache.set(t,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,r){this.oldCache.delete(t),this._set(t,r)}*_entriesAscending(){for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield t)}for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield t)}}get(t){if(this.cache.has(t)){let r=this.cache.get(t);return this._getItemValue(t,r)}if(this.oldCache.has(t)){let r=this.oldCache.get(t);if(!this._deleteIfExpired(t,r))return this._moveToRecent(t,r),r.value}}set(t,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(t)?this.cache.set(t,{value:r,expiry:i}):this._set(t,{value:r,expiry:i})}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):this.oldCache.has(t)?!this._deleteIfExpired(t,this.oldCache.get(t)):!1}peek(t){if(this.cache.has(t))return this._peek(t,this.cache);if(this.oldCache.has(t))return this._peek(t,this.oldCache)}delete(t){let r=this.cache.delete(t);return r&&this._size--,this.oldCache.delete(t)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-t;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(let[t]of this)yield t}*values(){for(let[,t]of this)yield t}*[Symbol.iterator](){for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield[r,n.value])}for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield[r,n.value])}}*entriesDescending(){let t=[...this.cache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this._deleteIfExpired(i,o)||(yield[i,o.value])}t=[...this.oldCache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this.cache.has(i)||this._deleteIfExpired(i,o)||(yield[i,o.value])}}*entriesAscending(){for(let[t,r]of this._entriesAscending())yield[t,r.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(let r of this.oldCache.keys())this.cache.has(r)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,r=this){for(let[n,i]of this.entriesAscending())t.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};xm.default=wm});var Lx=b(xu=>{"use strict";var j2=xu&&xu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xu,"__esModule",{value:!0});var Sm=ym(),F2=j2(Fx()),Om=class{constructor(t){this.pluginManager=t,this.adapterCache=new F2.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,Sm.readConfObject)(r,"textSearchAdapterId"),i=this.adapterCache.get(n);if(i)return i;{let a=await this.pluginManager.getTextSearchAdapterType(r.type).getAdapterClass(),u=new a(r,void 0,this.pluginManager);return this.adapterCache.set(n,u),u}}))}relevantAdapters(t){let r=this.pluginManager.rootModel,{aggregateTextSearchAdapters:n}=r?.jbrowse,{tracks:i}=r?.session,{assemblyName:o}=t;return[...this.getAdaptersWithAssembly(o,n),...this.getTrackAdaptersWithAssembly(o,i)]}getAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Sm.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Sm.readConfObject)(n,["textSearching","textSearchAdapter","assemblyNames"]))===null||i===void 0?void 0:i.includes(t)}).map(n=>n.textSearching.textSearchAdapter)}async search(t,r,n){let i=await this.loadTextSearchAdapters(r),o=await Promise.all(i.map(a=>a.searchIndex(t)));return this.sortResults(o.flat(),n)}sortResults(t,r){return r(t.sort((n,i)=>-i.getLabel().localeCompare(n.getLabel()))).sort((n,i)=>n.getScore()-i.getScore())}};xu.default=Om});var Sc=b(se=>{"use strict";var L2=se&&se.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),N2=se&&se.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&L2(t,e,r)},D2=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(se,"__esModule",{value:!0});se.TextSearchManager=se.RetryError=se.AuthNeededError=void 0;se.isViewContainer=B2;se.isSessionModel=Rn;se.isSessionModelWithConfigEditing=U2;se.isSessionWithAddTracks=W2;se.isSessionWithShareURL=H2;se.isSessionModelWithWidgets=V2;se.isSessionModelWithConnections=G2;se.isSessionModelWithConnectionEditing=$2;se.isSessionWithSessionPlugins=K2;se.isSelectionContainer=Y2;se.isViewModel=Z2;se.isTrackModel=J2;se.isDisplayModel=X2;se.isTrackViewModel=Q2;se.isAppRootModel=eF;se.isRootModelWithInternetAccounts=tF;se.isAbstractMenuManager=rF;se.isUriLocation=nF;se.isLocalPathLocation=iF;se.isBlobLocation=oF;se.isAuthNeededException=aF;se.isRetryException=uF;var z2=vt();N2(B1(),se);function B2(e){return(0,z2.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function Rn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function U2(e){return Rn(e)&&"editConfiguration"in e}function W2(e){return Rn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function H2(e){return Rn(e)&&"shareURL"in e&&!!e.shareURL}function V2(e){return Rn(e)&&"widgets"in e}function G2(e){return Rn(e)&&"makeConnection"in e}function $2(e){return Rn(e)&&"addConnectionConf"in e}function K2(e){return Rn(e)&&"sessionPlugins"in e}function Y2(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function Z2(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function J2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function X2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function Q2(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function eF(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function tF(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function rF(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function nF(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function iF(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function oF(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var Em=class e extends Error{constructor(t,r){super(t),this.message=t,this.url=r,this.name="AuthNeededError",Object.setPrototypeOf(this,e.prototype)}};se.AuthNeededError=Em;var Am=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};se.RetryError=Am;function aF(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function uF(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var sF=Lx();Object.defineProperty(se,"TextSearchManager",{enumerable:!0,get:function(){return D2(sF).default}})});var Oc=b((GX,Nx)=>{Nx.exports=JBrowseExports.mobx});var Dx=b(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.when=void 0;var cF=Oc();Object.defineProperty(Ec,"when",{enumerable:!0,get:function(){return cF.when}})});var zx=b(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.intersection2=lF;Su.doesIntersect2=fF;Su.isContainedWithin=dF;function lF(e,t,r,n){return t>r&&e<n&&n-r&&t-e?e>r?t<n?[e,t]:[e,n]:t<n?[r,t]:[r,n]:[]}function fF(e,t,r,n){return t>r&&e<n}function dF(e,t,r,n){return r<=e&&n>=t}});var Bx=b(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.dedupe=pF;function pF(e,t=JSON.stringify){let r=[],n=new Set;for(let i of e){let o=t(i);n.has(o)||(r.push(i),n.add(o))}return r}});var Cm=b((ZX,Vx)=>{"use strict";var Ac={},Rc={},Ou={METHOD:"method",PROPERTY:"property"},Tc=class{constructor(t,r){this.inst=t,this.args=r}},Pm=class extends Tc{constructor(t,r){super(t,r),this.type=Ou.METHOD}execute(t){t[this.inst](...this.args)}},Rm=class extends Tc{constructor(t,r){super(t,r),this.type=Ou.PROPERTY}execute(t){t[this.inst]=this.args[0]}},hF={[Ou.METHOD]:Pm,[Ou.PROPERTY]:Rm},Pc=class{constructor(t,r,n){return new hF[t](r,n)}};Object.entries(Ou).forEach(([e,t])=>{Object.defineProperty(Pc,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});Rc=Pc;var Wx=Object.freeze({METHODS:["addHitRegion","arc","arcTo","beginPath","bezierCurveTo","clearHitRegions","clearRect","clip","closePath","drawFocusIfNeeded","drawImage","ellipse","fill","fillRect","fillText","lineTo","moveTo","putImageData","quadraticCurveTo","rect","removeHitRegion","resetTransform","restore","rotate","save","scale","scrollPathIntoView","setLineDash","setTransform","stroke","strokeRect","strokeText","transform","translate"],PROPERTIES:["direction","fillStyle","filter","font","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","imageSmoothingQuality","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline"]}),Fr=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push"),fromJSON:Symbol.for("fromJSON")}),Eu=class{constructor(t=null){this[Fr.sequence]=[],t&&this[Fr.fromJSON](t)}[Fr.fromJSON](t={sequence:[]}){t.sequence.forEach(({type:r,inst:n,args:i})=>{this[Fr.push](r,n,i)})}[Fr.push](t,r,n){this[Fr.sequence].push(new Rc(t,r,n))}execute(t){t.save(),this[Fr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[Fr.sequence]}}};Wx.METHODS.forEach(e=>{Object.defineProperty(Eu.prototype,e,{value:function(...r){this[Fr.push](Rc.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});Wx.PROPERTIES.forEach(e=>{Object.defineProperty(Eu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[Fr.push](Rc.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});Ac=Eu;var Hx={},Ux=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function mF(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var Mm=class extends Ac{build(t={}){let r=new Ac;return this[Ux.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?mF(u,t):u);r[Ux.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};Hx=Mm;Vx.exports={CanvasSequence:Ac,CanvasBlueprint:Hx}});var $x=b((JX,Gx)=>{Gx.exports=!1});var km=b(lt=>{"use strict";var vF=lt&&lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lt,"__esModule",{value:!0});lt.ImageBitmapType=lt.createImageBitmap=lt.createCanvas=void 0;lt.drawImageOntoCanvasContext=bF;var Yx=Cm(),gF=vF($x());function bF(e,t){e.serializedCommands?new Yx.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var Kx={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:gF.default};Kx.realOffscreenCanvas?(lt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),lt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,lt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):Kx.node?(lt.createCanvas=(...e)=>nodeCreateCanvas(...e),lt.createImageBitmap=async e=>{let t=e.toDataURL(),r=new nodeImage;return new Promise((n,i)=>{r.onload=()=>{n(r)},r.onerror=i,r.src=t})}):(lt.createCanvas=(e,t)=>{let r=new Yx.CanvasSequence;return{width:e,height:t,getContext(){return r}}},lt.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},lt.ImageBitmapType=String)});var Im=b(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.blobToDataURL=_F;function _F(e){let t=new FileReader;return new Promise((r,n)=>{t.onload=i=>{i.target?r(i.target.result):n(new Error("unknown result reading blob from canvas"))},t.readAsDataURL(e)})}});var Zx=b((eQ,Mc)=>{(function(){"use strict";var e,t,r,n,i;function o(d,f){var p=Object.keys(f),h;for(h=0;h<p.length;h++)d=d.replace(new RegExp("\\{"+p[h]+"\\}","gi"),f[p[h]]);return d}function a(d){var f,p,h;if(!d)throw new Error("cannot create a random attribute name for an undefined object");f="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",p="";do for(p="",h=0;h<12;h++)p+=f[Math.floor(Math.random()*f.length)];while(d[p]);return p}function u(d,f){var p,h,m={},g,_;for(d=d.split(","),f=f||10,p=0;p<d.length;p+=2)h="&"+d[p+1]+";",g=parseInt(d[p],f),m[h]="&#"+g+";";return m["\\xa0"]="&#160;",m}function l(d){var f={left:"start",right:"end",center:"middle",start:"start",end:"end"};return f[d]||f.start}function s(d){var f={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return f[d]||f.alphabetic}i=u("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),e={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"}},r=function(d,f){this.__root=d,this.__ctx=f},r.prototype.addColorStop=function(d,f){var p=this.__ctx.__createElement("stop"),h,m;p.setAttribute("offset",d),f.indexOf("rgba")!==-1?(h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,m=h.exec(f),p.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:m[1],g:m[2],b:m[3]})),p.setAttribute("stop-opacity",m[4])):p.setAttribute("stop-color",f),this.__root.appendChild(p)},n=function(d,f){this.__root=d,this.__ctx=f},t=function(d){var f={width:500,height:500,enableMirroring:!1},p;if(arguments.length>1?(p=f,p.width=arguments[0],p.height=arguments[1]):d?p=d:p=f,!(this instanceof t))return new t(p);this.width=p.width||f.width,this.height=p.height||f.height,this.enableMirroring=p.enableMirroring!==void 0?p.enableMirroring:f.enableMirroring,this.canvas=this,this.__document=p.document||document,this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__root.setAttribute("version",1.1),this.__root.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__root.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__root.setAttribute("width",this.width),this.__root.setAttribute("height",this.height),this.__ids={},this.__defs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__root.appendChild(this.__currentElement)},t.prototype.__createElement=function(d,f,p){typeof f>"u"&&(f={});var h=this.__document.createElementNS("http://www.w3.org/2000/svg",d),m=Object.keys(f),g,_;for(p&&(h.setAttribute("fill","none"),h.setAttribute("stroke","none")),g=0;g<m.length;g++)_=m[g],h.setAttribute(_,f[_]);return h},t.prototype.__setDefaultStyles=function(){var d=Object.keys(e),f,p;for(f=0;f<d.length;f++)p=d[f],this[p]=e[p].canvas},t.prototype.__applyStyleState=function(d){var f=Object.keys(d),p,h;for(p=0;p<f.length;p++)h=f[p],this[h]=d[h]},t.prototype.__getStyleState=function(){var d,f={},p=Object.keys(e),h;for(d=0;d<p.length;d++)h=p[d],f[h]=this[h];return f},t.prototype.__applyStyleToCurrentElement=function(d){var f=Object.keys(e),p,h,m,g,_,w;for(p=0;p<f.length;p++)if(h=e[f[p]],m=this[f[p]],h.apply)if(h.apply.indexOf("fill")!==-1&&m instanceof n){if(m.__ctx)for(;m.__ctx.__defs.childNodes.length;)g=m.__ctx.__defs.childNodes[0].getAttribute("id"),this.__ids[g]=g,this.__defs.appendChild(m.__ctx.__defs.childNodes[0]);this.__currentElement.setAttribute("fill",o("url(#{id})",{id:m.__root.getAttribute("id")}))}else h.apply.indexOf("fill")!==-1&&m instanceof r?this.__currentElement.setAttribute("fill",o("url(#{id})",{id:m.__root.getAttribute("id")})):h.apply.indexOf(d)!==-1&&h.svg!==m&&((h.svgAttr==="stroke"||h.svgAttr==="fill")&&m.indexOf("rgba")!==-1?(_=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,w=_.exec(m),this.__currentElement.setAttribute(h.svgAttr,o("rgb({r},{g},{b})",{r:w[1],g:w[2],b:w[3]})),this.__currentElement.setAttribute(h.svgAttr+"-opacity",w[4])):this.__currentElement.setAttribute(h.svgAttr,m))},t.prototype.__closestGroupOrSvg=function(d){return d=d||this.__currentElement,d.nodeName==="g"||d.nodeName==="svg"?d:this.__closestGroupOrSvg(d.parentNode)},t.prototype.getSerializedSvg=function(d){var f=new XMLSerializer().serializeToString(this.__root),p,h,m,g,_,w;if(w=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,w.test(f)&&(f=f.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),d)for(p=Object.keys(i),h=0;h<p.length;h++)m=p[h],g=i[m],_=new RegExp(m,"gi"),_.test(f)&&(f=f.replace(_,g));return f},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var d=this.__createElement("g"),f=this.__closestGroupOrSvg();this.__groupStack.push(f),f.appendChild(d),this.__currentElement=d,this.__stack.push(this.__getStyleState())},t.prototype.restore=function(){this.__currentElement=this.__groupStack.pop();var d=this.__stack.pop();this.__applyStyleState(d)},t.prototype.__addTransform=function(d){var f=this.__closestGroupOrSvg();if(f.childNodes.length>0){var p=this.__createElement("g");f.appendChild(p),this.__currentElement=p}var h=this.__currentElement.getAttribute("transform");h?h+=" ":h="",h+=d,this.__currentElement.setAttribute("transform",h)},t.prototype.scale=function(d,f){f===void 0&&(f=d),this.__addTransform(o("scale({x},{y})",{x:d,y:f}))},t.prototype.rotate=function(d){var f=d*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:f,cx:0,cy:0}))},t.prototype.translate=function(d,f){this.__addTransform(o("translate({x},{y})",{x:d,y:f}))},t.prototype.transform=function(d,f,p,h,m,g){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:d,b:f,c:p,d:h,e:m,f:g}))},t.prototype.beginPath=function(){var d,f;this.__currentDefaultPath="",this.__currentPosition={},d=this.__createElement("path",{},!0),f=this.__closestGroupOrSvg(),f.appendChild(d),this.__currentElement=d},t.prototype.__applyCurrentDefaultPath=function(){if(this.__currentElement.nodeName==="path"){var d=this.__currentDefaultPath;this.__currentElement.setAttribute("d",d)}else throw new Error("Attempted to apply path command to node "+this.__currentElement.nodeName)},t.prototype.__addPathCommand=function(d){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=d},t.prototype.moveTo=function(d,f){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:d,y:f},this.__addPathCommand(o("M {x} {y}",{x:d,y:f}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(d,f){this.__currentPosition={x:d,y:f},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:d,y:f})):this.__addPathCommand(o("M {x} {y}",{x:d,y:f}))},t.prototype.bezierCurveTo=function(d,f,p,h,m,g){this.__currentPosition={x:m,y:g},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:d,cp1y:f,cp2x:p,cp2y:h,x:m,y:g}))},t.prototype.quadraticCurveTo=function(d,f,p,h){this.__currentPosition={x:p,y:h},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:d,cpy:f,x:p,y:h}))};var c=function(d){var f=Math.sqrt(d[0]*d[0]+d[1]*d[1]);return[d[0]/f,d[1]/f]};t.prototype.arcTo=function(d,f,p,h,m){var g=this.__currentPosition&&this.__currentPosition.x,_=this.__currentPosition&&this.__currentPosition.y;if(!(typeof g>"u"||typeof _>"u")){if(m<0)throw new Error("IndexSizeError: The radius provided ("+m+") is negative.");if(g===d&&_===f||d===p&&f===h||m===0){this.lineTo(d,f);return}var w=c([g-d,_-f]),y=c([p-d,h-f]);if(w[0]*y[1]===w[1]*y[0]){this.lineTo(d,f);return}var x=w[0]*y[0]+w[1]*y[1],O=Math.acos(Math.abs(x)),A=c([w[0]+y[0],w[1]+y[1]]),T=m/Math.sin(O/2),R=d+T*A[0],C=f+T*A[1],M=[-w[1],w[0]],P=[y[1],-y[0]],N=function(W){var j=W[0],D=W[1];return D>=0?Math.acos(j):-Math.acos(j)},k=N(M),I=N(P);this.lineTo(R+M[0]*m,C+M[1]*m),this.arc(R,C,m,k,I)}},t.prototype.stroke=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")},t.prototype.fill=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")},t.prototype.rect=function(d,f,p,h){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(d,f),this.lineTo(d+p,f),this.lineTo(d+p,f+h),this.lineTo(d,f+h),this.lineTo(d,f),this.closePath()},t.prototype.fillRect=function(d,f,p,h){var m,g;m=this.__createElement("rect",{x:d,y:f,width:p,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(d,f,p,h){var m,g;m=this.__createElement("rect",{x:d,y:f,width:p,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(d,f,p,h){var m,g=this.__closestGroupOrSvg();m=this.__createElement("rect",{x:d,y:f,width:p,height:h,fill:"#FFFFFF"},!0),g.appendChild(m)},t.prototype.createLinearGradient=function(d,f,p,h){var m=this.__createElement("linearGradient",{id:a(this.__ids),x1:d+"px",x2:p+"px",y1:f+"px",y2:h+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(m),new r(m,this)},t.prototype.createRadialGradient=function(d,f,p,h,m,g){var _=this.__createElement("radialGradient",{id:a(this.__ids),cx:h+"px",cy:m+"px",r:g+"px",fx:d+"px",fy:f+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(_),new r(_,this)},t.prototype.__parseFont=function(){var d=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\"\sa-z]+?)\s*$/i,f=d.exec(this.font),p={style:f[1]||"normal",size:f[4]||"10px",family:f[6]||"sans-serif",weight:f[3]||"normal",decoration:f[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(p.decoration="underline"),this.__fontHref&&(p.href=this.__fontHref),p},t.prototype.__wrapTextLink=function(d,f){if(d.href){var p=this.__createElement("a");return p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.href),p.appendChild(f),p}return f},t.prototype.__applyText=function(d,f,p,h){var m=this.__parseFont(),g=this.__closestGroupOrSvg(),_=this.__createElement("text",{"font-family":m.family,"font-size":m.size,"font-style":m.style,"font-weight":m.weight,"text-decoration":m.decoration,x:f,y:p,"text-anchor":l(this.textAlign),"dominant-baseline":s(this.textBaseline)},!0);_.appendChild(this.__document.createTextNode(d)),this.__currentElement=_,this.__applyStyleToCurrentElement(h),g.appendChild(this.__wrapTextLink(m,_))},t.prototype.fillText=function(d,f,p){this.__applyText(d,f,p,"fill")},t.prototype.strokeText=function(d,f,p){this.__applyText(d,f,p,"stroke")},t.prototype.measureText=function(d){return this.__ctx.font=this.font,this.__ctx.measureText(d)},t.prototype.arc=function(d,f,p,h,m,g){if(h!==m){h=h%(2*Math.PI),m=m%(2*Math.PI),h===m&&(m=(m+2*Math.PI-.001*(g?-1:1))%(2*Math.PI));var _=d+p*Math.cos(m),w=f+p*Math.sin(m),y=d+p*Math.cos(h),x=f+p*Math.sin(h),O=g?0:1,A=0,T=m-h;T<0&&(T+=2*Math.PI),g?A=T>Math.PI?0:1:A=T>Math.PI?1:0,this.lineTo(y,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:p,ry:p,xAxisRotation:0,largeArcFlag:A,sweepFlag:O,endX:_,endY:w})),this.__currentPosition={x:_,y:w}}},t.prototype.clip=function(){var d=this.__closestGroupOrSvg(),f=this.__createElement("clipPath"),p=a(this.__ids),h=this.__createElement("g");d.removeChild(this.__currentElement),f.setAttribute("id",p),f.appendChild(this.__currentElement),this.__defs.appendChild(f),d.setAttribute("clip-path",o("url(#{id})",{id:p})),d.appendChild(h),this.__currentElement=h},t.prototype.drawImage=function(){var d=Array.prototype.slice.call(arguments),f=d[0],p,h,m,g,_=0,w=0,y,x,O,A,T,R,C,M,P,N,k;if(d.length===3)p=d[1],h=d[2],y=f.width,x=f.height,m=y,g=x;else if(d.length===5)p=d[1],h=d[2],m=d[3],g=d[4],y=f.width,x=f.height;else if(d.length===9)_=d[1],w=d[2],y=d[3],x=d[4],p=d[5],h=d[6],m=d[7],g=d[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(O=this.__closestGroupOrSvg(),C=this.__currentElement,f instanceof t){for(A=f.getSvg(),T=A.childNodes[0];T.childNodes.length;)k=T.childNodes[0].getAttribute("id"),this.__ids[k]=k,this.__defs.appendChild(T.childNodes[0]);R=A.childNodes[1],O.appendChild(R),this.__currentElement=R,this.translate(p,h),this.__currentElement=C}else(f.nodeName==="CANVAS"||f.nodeName==="IMG")&&(M=this.__createElement("image"),M.setAttribute("width",m),M.setAttribute("height",g),M.setAttribute("preserveAspectRatio","none"),(_||w||y!==f.width||x!==f.height)&&(P=this.__document.createElement("canvas"),P.width=m,P.height=g,N=P.getContext("2d"),N.drawImage(f,_,w,y,x,0,0,m,g),f=P),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.nodeName==="CANVAS"?f.toDataURL():f.getAttribute("src")),O.appendChild(M),this.__currentElement=M,this.translate(p,h),this.__currentElement=C)},t.prototype.createPattern=function(d,f){var p=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),h=a(this.__ids),m;return p.setAttribute("id",h),p.setAttribute("width",d.width),p.setAttribute("height",d.height),d.nodeName==="CANVAS"||d.nodeName==="IMG"?(m=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),m.setAttribute("width",d.width),m.setAttribute("height",d.height),m.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.nodeName==="CANVAS"?d.toDataURL():d.getAttribute("src")),p.appendChild(m),this.__defs.appendChild(p)):d instanceof t&&(p.appendChild(d.__root.childNodes[1]),this.__defs.appendChild(p)),new n(p,this)},t.prototype.drawFocusRing=function(){},t.prototype.createImageData=function(){},t.prototype.getImageData=function(){},t.prototype.putImageData=function(){},t.prototype.globalCompositeOperation=function(){},t.prototype.setTransform=function(){},typeof window=="object"&&(window.C2S=t),typeof Mc=="object"&&typeof Mc.exports=="object"&&(Mc.exports=t)})()});var Qx=b(vr=>{"use strict";var yF=vr&&vr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),wF=vr&&vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xF=vr&&vr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&yF(r,t,n[i]);return wF(r,t),r}}();Object.defineProperty(vr,"__esModule",{value:!0});vr.renderToAbstractCanvas=EF;vr.getSerializedSvg=AF;vr.ReactRendering=TF;var Jx=Ua(),SF=Ye(),Xx=Cm(),OF=Im(),jm=km();async function EF(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,jm.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),reactElement:(0,Jx.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,OF.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new Xx.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,jm.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),imageData:await(0,jm.createImageBitmap)(u)}}}async function AF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>xF(Zx())),o=new i.default(t,r);return new Xx.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function TF({rendering:e}){return(0,SF.isValidElement)(e.reactElement)?e.reactElement:(0,Jx.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var tS=b(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.isFeature=PF;function PF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function eS(e){return"uniqueId"in e&&typeof e.data!="object"}var Fm=class e{constructor(t){var r;eS(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=eS(t)?t.uniqueId:t.id;if(n==null)throw new Error("SimpleFeature requires a unique `id` or `data.uniqueId` attribute");if(this.uniqueId=String(n),!(this.data.aliases||this.data.end-this.data.start>=0))throw new Error(`invalid feature data, end less than start. end: ${this.data.end} start: ${this.data.start}`);this.data.subfeatures&&(this.subfeatures=(r=this.data.subfeatures)===null||r===void 0?void 0:r.map((i,o)=>typeof i.get!="function"?new e({id:i.uniqueId||`${n}-${o}`,data:{strand:this.data.strand,...i},parent:this}):i))}get(t){return t==="subfeatures"?this.subfeatures:t==="parent"?this.parent():this.data[t]}set(t,r){this.data[t]=r}tags(){return Object.keys(this.data)}id(){return this.uniqueId}parent(){return this.parentHandle}children(){return this.get("subfeatures")}toJSON(){let t={...this.data,uniqueId:this.id()},r=this.parent();r&&(t.parentId=r.id());let n=this.children();return n&&(t.subfeatures=n.map(i=>i.toJSON())),t}static fromJSON(t){return new e({...t})}};Cc.default=Fm});var we=b(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.isFunction=void 0;function RF(e){return typeof e=="function"}kc.isFunction=RF});var Mn=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.createErrorClass=void 0;function MF(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}qc.createErrorClass=MF});var Lm=b(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.UnsubscriptionError=void 0;var CF=Mn();Ic.UnsubscriptionError=CF.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
4
4
  `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
5
- `):"",this.name="UnsubscriptionError",this.errors=r}})});var nn=b(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.arrRemove=void 0;function CF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}jc.arrRemove=CF});var Nt=b(Ct=>{"use strict";var rS=Ct&&Ct.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},nS=Ct&&Ct.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},iS=Ct&&Ct.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isSubscription=Ct.EMPTY_SUBSCRIPTION=Ct.Subscription=void 0;var Au=we(),Nm=Lm(),oS=nn(),Dm=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=rS(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Au.isFunction(c))try{c()}catch(m){o=m instanceof Nm.UnsubscriptionError?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=rS(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{aS(h)}catch(m){o=o??[],m instanceof Nm.UnsubscriptionError?o=iS(iS([],nS(o)),nS(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(o)throw new Nm.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)aS(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)&&oS.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&oS.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Ct.Subscription=Dm;Ct.EMPTY_SUBSCRIPTION=Dm.EMPTY;function qF(e){return e instanceof Dm||e&&"closed"in e&&Au.isFunction(e.remove)&&Au.isFunction(e.add)&&Au.isFunction(e.unsubscribe)}Ct.isSubscription=qF;function aS(e){Au.isFunction(e)?e():e.unsubscribe()}});var Eo=b(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.config=void 0;Fc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var zm=b(Lr=>{"use strict";var uS=Lr&&Lr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},sS=Lr&&Lr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.timeoutProvider=void 0;Lr.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Lr.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,sS([e,t],uS(r))):setTimeout.apply(void 0,sS([e,t],uS(r)))},clearTimeout:function(e){var t=Lr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var Bm=b(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.reportUnhandledError=void 0;var IF=Eo(),jF=zm();function FF(e){jF.timeoutProvider.setTimeout(function(){var t=IF.config.onUnhandledError;if(t)t(e);else throw e})}Lc.reportUnhandledError=FF});var ot=b(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.noop=void 0;function LF(){}Nc.noop=LF});var cS=b(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.createNotification=Nr.nextNotification=Nr.errorNotification=Nr.COMPLETE_NOTIFICATION=void 0;Nr.COMPLETE_NOTIFICATION=function(){return Dc("C",void 0,void 0)}();function NF(e){return Dc("E",void 0,e)}Nr.errorNotification=NF;function DF(e){return Dc("N",e,void 0)}Nr.nextNotification=DF;function Dc(e,t,r){return{kind:e,value:t,error:r}}Nr.createNotification=Dc});var zc=b(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.captureError=Ao.errorContext=void 0;var lS=Eo(),ki=null;function zF(e){if(lS.config.useDeprecatedSynchronousErrorHandling){var t=!ki;if(t&&(ki={errorThrown:!1,error:null}),e(),t){var r=ki,n=r.errorThrown,i=r.error;if(ki=null,n)throw i}}else e()}Ao.errorContext=zF;function BF(e){lS.config.useDeprecatedSynchronousErrorHandling&&ki&&(ki.errorThrown=!0,ki.error=e)}Ao.captureError=BF});var To=b(gr=>{"use strict";var pS=gr&&gr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(gr,"__esModule",{value:!0});gr.EMPTY_OBSERVER=gr.SafeSubscriber=gr.Subscriber=void 0;var UF=we(),fS=Nt(),Vm=Eo(),WF=Bm(),dS=ot(),Um=cS(),HF=zm(),VF=zc(),hS=function(e){pS(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,fS.isSubscription(r)&&r.add(n)):n.destination=gr.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new mS(r,n,i)},t.prototype.next=function(r){this.isStopped?Hm(Um.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Hm(Um.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Hm(Um.COMPLETE_NOTIFICATION,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}(fS.Subscription);gr.Subscriber=hS;var GF=Function.prototype.bind;function Wm(e,t){return GF.call(e,t)}var $F=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(n){Bc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Bc(n)}else Bc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Bc(r)}},e}(),mS=function(e){pS(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(UF.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&Vm.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Wm(r.next,u),error:r.error&&Wm(r.error,u),complete:r.complete&&Wm(r.complete,u)}):a=r}return o.destination=new $F(a),o}return t}(hS);gr.SafeSubscriber=mS;function Bc(e){Vm.config.useDeprecatedSynchronousErrorHandling?VF.captureError(e):WF.reportUnhandledError(e)}function KF(e){throw e}function Hm(e,t){var r=Vm.config.onStoppedNotification;r&&HF.timeoutProvider.setTimeout(function(){return r(e,t)})}gr.EMPTY_OBSERVER={closed:!0,next:dS.noop,error:KF,complete:dS.noop}});var Tu=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.observable=void 0;Uc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var at=b(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.identity=void 0;function YF(e){return e}Wc.identity=YF});var Pu=b(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.pipeFromArray=Po.pipe=void 0;var ZF=at();function JF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return vS(e)}Po.pipe=JF;function vS(e){return e.length===0?ZF.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Po.pipeFromArray=vS});var Oe=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.Observable=void 0;var $m=To(),XF=Nt(),QF=Tu(),eL=Pu(),tL=Eo(),Gm=we(),rL=zc(),nL=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,n){var i=this,o=oL(t)?t:new $m.SafeSubscriber(t,r,n);return rL.errorContext(function(){var a=i,u=a.operator,l=a.source;o.add(u?u.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=gS(r),new r(function(i,o){var a=new $m.SafeSubscriber({next:function(u){try{t(u)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[QF.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return eL.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=gS(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();Hc.Observable=nL;function gS(e){var t;return(t=e??tL.config.Promise)!==null&&t!==void 0?t:Promise}function iL(e){return e&&Gm.isFunction(e.next)&&Gm.isFunction(e.error)&&Gm.isFunction(e.complete)}function oL(e){return e&&e instanceof $m.Subscriber||iL(e)&&XF.isSubscription(e)}});var G=b(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.operate=Ro.hasLift=void 0;var aL=we();function bS(e){return aL.isFunction(e?.lift)}Ro.hasLift=bS;function uL(e){return function(t){if(bS(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}Ro.operate=uL});var Z=b(kn=>{"use strict";var sL=kn&&kn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(kn,"__esModule",{value:!0});kn.OperatorSubscriber=kn.createOperatorSubscriber=void 0;var cL=To();function lL(e,t,r,n,i){return new _S(e,t,r,n,i)}kn.createOperatorSubscriber=lL;var _S=function(e){sL(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(cL.Subscriber);kn.OperatorSubscriber=_S});var Km=b(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.refCount=void 0;var fL=G(),dL=Z();function pL(){return fL.operate(function(e,t){var r=null;e._refCount++;var n=dL.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var i=e._connection,o=r;r=null,i&&(!o||i===o)&&i.unsubscribe(),t.unsubscribe()});e.subscribe(n),n.closed||(r=e.connect())})}Vc.refCount=pL});var Ru=b(Mo=>{"use strict";var hL=Mo&&Mo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Mo,"__esModule",{value:!0});Mo.ConnectableObservable=void 0;var mL=Oe(),yS=Nt(),vL=Km(),gL=Z(),bL=G(),_L=function(e){hL(t,e);function t(r,n){var i=e.call(this)||this;return i.source=r,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,bL.hasLift(r)&&(i.lift=r.lift),i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new yS.Subscription;var i=this.getSubject();n.add(this.source.subscribe(gL.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete()},function(o){r._teardown(),i.error(o)},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=yS.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return vL.refCount()(this)},t}(mL.Observable);Mo.ConnectableObservable=_L});var wS=b(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.performanceTimestampProvider=void 0;Mu.performanceTimestampProvider={now:function(){return(Mu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Ym=b(br=>{"use strict";var xS=br&&br.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},SS=br&&br.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(br,"__esModule",{value:!0});br.animationFrameProvider=void 0;var yL=Nt();br.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=br.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new yL.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=br.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,SS([],xS(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=br.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,SS([],xS(e)))},delegate:void 0}});var AS=b(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.animationFrames=void 0;var wL=Oe(),xL=wS(),OS=Ym();function SL(e){return e?ES(e):OL}Gc.animationFrames=SL;function ES(e){return new wL.Observable(function(t){var r=e||xL.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=OS.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&OS.animationFrameProvider.cancelAnimationFrame(i)}})}var OL=ES()});var Zm=b($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.ObjectUnsubscribedError=void 0;var EL=Mn();$c.ObjectUnsubscribedError=EL.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var ut=b(Dr=>{"use strict";var PS=Dr&&Dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),AL=Dr&&Dr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AnonymousSubject=Dr.Subject=void 0;var TS=Oe(),Xm=Nt(),TL=Zm(),PL=nn(),Jm=zc(),RS=function(e){PS(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 n=new Qm(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new TL.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Jm.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=AL(n.currentObservers),u=a.next();!u.done;u=a.next()){var l=u.value;l.next(r)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Jm.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;Jm.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.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 n=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?Xm.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new Xm.Subscription(function(){n.currentObservers=null,PL.arrRemove(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new TS.Observable;return r.source=this,r},t.create=function(r,n){return new Qm(r,n)},t}(TS.Observable);Dr.Subject=RS;var Qm=function(e){PS(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Xm.EMPTY_SUBSCRIPTION},t}(RS);Dr.AnonymousSubject=Qm});var ev=b(ko=>{"use strict";var RL=ko&&ko.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ko,"__esModule",{value:!0});ko.BehaviorSubject=void 0;var ML=ut(),kL=function(e){RL(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(ML.Subject);ko.BehaviorSubject=kL});var Kc=b(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.dateTimestampProvider=void 0;ku.dateTimestampProvider={now:function(){return(ku.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Yc=b(Co=>{"use strict";var CL=Co&&Co.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Co,"__esModule",{value:!0});Co.ReplaySubject=void 0;var qL=ut(),IL=Kc(),jL=function(e){CL(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=IL.dateTimestampProvider);var o=e.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return t.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,u=n._timestampProvider,l=n._windowTime;i||(o.push(r),!a&&o.push(u.now()+l)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,u=a.slice(),l=0;l<u.length&&!r.closed;l+=o?1:2)r.next(u[l]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,u=(a?1:2)*n;if(n<1/0&&u<o.length&&o.splice(0,o.length-u),!a){for(var l=i.now(),s=0,c=1;c<o.length&&o[c]<=l;c+=2)s=c;s&&o.splice(0,s+1)}},t}(qL.Subject);Co.ReplaySubject=jL});var Zc=b(qo=>{"use strict";var FL=qo&&qo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qo,"__esModule",{value:!0});qo.AsyncSubject=void 0;var LL=ut(),NL=function(e){FL(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n._hasValue,a=n._value,u=n.thrownError,l=n.isStopped,s=n._isComplete;i?r.error(u):(l||s)&&(o&&r.next(a),r.complete())},t.prototype.next=function(r){this.isStopped||(this._value=r,this._hasValue=!0)},t.prototype.complete=function(){var r=this,n=r._hasValue,i=r._value,o=r._isComplete;o||(this._isComplete=!0,n&&e.prototype.next.call(this,i),e.prototype.complete.call(this))},t}(LL.Subject);qo.AsyncSubject=NL});var MS=b(Io=>{"use strict";var DL=Io&&Io.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Io,"__esModule",{value:!0});Io.Action=void 0;var zL=Nt(),BL=function(e){DL(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(zL.Subscription);Io.Action=BL});var qS=b(zr=>{"use strict";var kS=zr&&zr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},CS=zr&&zr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(zr,"__esModule",{value:!0});zr.intervalProvider=void 0;zr.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=zr.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,CS([e,t],kS(r))):setInterval.apply(void 0,CS([e,t],kS(r)))},clearInterval:function(e){var t=zr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Fo=b(jo=>{"use strict";var UL=jo&&jo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(jo,"__esModule",{value:!0});jo.AsyncAction=void 0;var WL=MS(),IS=qS(),HL=nn(),VL=function(e){UL(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),IS.intervalProvider.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&IS.intervalProvider.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var i=!1,o;try{this.work(r)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,HL.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(WL.Action);jo.AsyncAction=VL});var FS=b(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.TestTools=Lo.Immediate=void 0;var GL=1,tv,Jc={};function jS(e){return e in Jc?(delete Jc[e],!0):!1}Lo.Immediate={setImmediate:function(e){var t=GL++;return Jc[t]=!0,tv||(tv=Promise.resolve()),tv.then(function(){return jS(t)&&e()}),t},clearImmediate:function(e){jS(e)}};Lo.TestTools={pending:function(){return Object.keys(Jc).length}}});var NS=b(Br=>{"use strict";var $L=Br&&Br.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},KL=Br&&Br.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Br,"__esModule",{value:!0});Br.immediateProvider=void 0;var LS=FS(),YL=LS.Immediate.setImmediate,ZL=LS.Immediate.clearImmediate;Br.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Br.immediateProvider.delegate;return(r?.setImmediate||YL).apply(void 0,KL([],$L(e)))},clearImmediate:function(e){var t=Br.immediateProvider.delegate;return(t?.clearImmediate||ZL)(e)},delegate:void 0}});var zS=b(No=>{"use strict";var JL=No&&No.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(No,"__esModule",{value:!0});No.AsapAction=void 0;var XL=Fo(),DS=NS(),QL=function(e){JL(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=DS.immediateProvider.setImmediate(r.flush.bind(r,void 0))))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&(DS.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(XL.AsyncAction);No.AsapAction=QL});var rv=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.Scheduler=void 0;var eN=Kc(),tN=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=eN.dateTimestampProvider.now,e}();Xc.Scheduler=tN});var zo=b(Do=>{"use strict";var rN=Do&&Do.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Do,"__esModule",{value:!0});Do.AsyncScheduler=void 0;var BS=rv(),nN=function(e){rN(t,e);function t(r,n){n===void 0&&(n=BS.Scheduler.now);var i=e.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},t}(BS.Scheduler);Do.AsyncScheduler=nN});var US=b(Bo=>{"use strict";var iN=Bo&&Bo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.AsapScheduler=void 0;var oN=zo(),aN=function(e){iN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(oN.AsyncScheduler);Bo.AsapScheduler=aN});var WS=b(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.asap=Ci.asapScheduler=void 0;var uN=zS(),sN=US();Ci.asapScheduler=new sN.AsapScheduler(uN.AsapAction);Ci.asap=Ci.asapScheduler});var qt=b(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.async=qi.asyncScheduler=void 0;var cN=Fo(),lN=zo();qi.asyncScheduler=new lN.AsyncScheduler(cN.AsyncAction);qi.async=qi.asyncScheduler});var HS=b(Uo=>{"use strict";var fN=Uo&&Uo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.QueueAction=void 0;var dN=Fo(),pN=function(e){fN(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.flush(this),0)},t}(dN.AsyncAction);Uo.QueueAction=pN});var VS=b(Wo=>{"use strict";var hN=Wo&&Wo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.QueueScheduler=void 0;var mN=zo(),vN=function(e){hN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(mN.AsyncScheduler);Wo.QueueScheduler=vN});var GS=b(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.queue=Ii.queueScheduler=void 0;var gN=HS(),bN=VS();Ii.queueScheduler=new bN.QueueScheduler(gN.QueueAction);Ii.queue=Ii.queueScheduler});var KS=b(Ho=>{"use strict";var _N=Ho&&Ho.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.AnimationFrameAction=void 0;var yN=Fo(),$S=Ym(),wN=function(e){_N(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=$S.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&($S.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(yN.AsyncAction);Ho.AnimationFrameAction=wN});var YS=b(Vo=>{"use strict";var xN=Vo&&Vo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Vo,"__esModule",{value:!0});Vo.AnimationFrameScheduler=void 0;var SN=zo(),ON=function(e){xN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(SN.AsyncScheduler);Vo.AnimationFrameScheduler=ON});var ZS=b(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.animationFrame=ji.animationFrameScheduler=void 0;var EN=KS(),AN=YS();ji.animationFrameScheduler=new AN.AnimationFrameScheduler(EN.AnimationFrameAction);ji.animationFrame=ji.animationFrameScheduler});var QS=b(Cn=>{"use strict";var JS=Cn&&Cn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.VirtualAction=Cn.VirtualTimeScheduler=void 0;var TN=Fo(),PN=Nt(),RN=zo(),MN=function(e){JS(t,e);function t(r,n){r===void 0&&(r=XS),n===void 0&&(n=1/0);var i=e.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return t.prototype.flush=function(){for(var r=this,n=r.actions,i=r.maxFrames,o,a;(a=n[0])&&a.delay<=i&&(n.shift(),this.frame=a.delay,!(o=a.execute(a.state,a.delay))););if(o){for(;a=n.shift();)a.unsubscribe();throw o}},t.frameTimeFactor=10,t}(RN.AsyncScheduler);Cn.VirtualTimeScheduler=MN;var XS=function(e){JS(t,e);function t(r,n,i){i===void 0&&(i=r.index+=1);var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o.index=i,o.active=!0,o.index=r.index=i,o}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}else return PN.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,i){i===void 0&&(i=0),this.delay=r.frame+i;var o=r.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,i){i===void 0&&(i=0)},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(TN.AsyncAction);Cn.VirtualAction=XS});var _r=b(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.empty=Fi.EMPTY=void 0;var eO=Oe();Fi.EMPTY=new eO.Observable(function(e){return e.complete()});function kN(e){return e?CN(e):Fi.EMPTY}Fi.empty=kN;function CN(e){return new eO.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var Cu=b(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.isScheduler=void 0;var qN=we();function IN(e){return e&&qN.isFunction(e.schedule)}Qc.isScheduler=IN});var It=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.popNumber=qn.popScheduler=qn.popResultSelector=void 0;var jN=we(),FN=Cu();function nv(e){return e[e.length-1]}function LN(e){return jN.isFunction(nv(e))?e.pop():void 0}qn.popResultSelector=LN;function NN(e){return FN.isScheduler(nv(e))?e.pop():void 0}qn.popScheduler=NN;function DN(e,t){return typeof nv(e)=="number"?e.pop():t}qn.popNumber=DN});var tl=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.isArrayLike=void 0;el.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var iv=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.isPromise=void 0;var zN=we();function BN(e){return zN.isFunction(e?.then)}rl.isPromise=BN});var ov=b(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.isInteropObservable=void 0;var UN=Tu(),WN=we();function HN(e){return WN.isFunction(e[UN.observable])}nl.isInteropObservable=HN});var av=b(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.isAsyncIterable=void 0;var VN=we();function GN(e){return Symbol.asyncIterator&&VN.isFunction(e?.[Symbol.asyncIterator])}il.isAsyncIterable=GN});var uv=b(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.createInvalidObservableTypeError=void 0;function $N(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.")}ol.createInvalidObservableTypeError=$N});var sv=b(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.iterator=Go.getSymbolIterator=void 0;function tO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Go.getSymbolIterator=tO;Go.iterator=tO()});var cv=b(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.isIterable=void 0;var KN=sv(),YN=we();function ZN(e){return YN.isFunction(e?.[KN.iterator])}al.isIterable=ZN});var ul=b(Xt=>{"use strict";var JN=Xt&&Xt.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},$o=Xt&&Xt.__await||function(e){return this instanceof $o?(this.v=e,this):new $o(e)},XN=Xt&&Xt.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(f){n[f]&&(i[f]=function(p){return new Promise(function(h,m){o.push([f,p,h,m])>1||u(f,p)})})}function u(f,p){try{l(n[f](p))}catch(h){d(o[0][3],h)}}function l(f){f.value instanceof $o?Promise.resolve(f.value.v).then(s,c):d(o[0][2],f)}function s(f){u("next",f)}function c(f){u("throw",f)}function d(f,p){f(p),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.isReadableStreamLike=Xt.readableStreamLikeToAsyncGenerator=void 0;var QN=we();function eD(e){return XN(this,arguments,function(){var r,n,i,o;return JN(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,$o(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,$o(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,$o(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Xt.readableStreamLikeToAsyncGenerator=eD;function tD(e){return QN.isFunction(e?.getReader)}Xt.isReadableStreamLike=tD});var oe=b(Ce=>{"use strict";var rD=Ce&&Ce.__awaiter||function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(c){try{s(n.next(c))}catch(d){a(d)}}function l(c){try{s(n.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((n=n.apply(e,t||[])).next())})},nD=Ce&&Ce.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},iD=Ce&&Ce.__asyncValues||function(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 lv=="function"?lv(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,l){a=e[o](a),i(u,l,a.done,a.value)})}}function i(o,a,u,l){Promise.resolve(l).then(function(s){o({value:s,done:u})},a)}},lv=Ce&&Ce.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fromReadableStreamLike=Ce.fromAsyncIterable=Ce.fromIterable=Ce.fromPromise=Ce.fromArrayLike=Ce.fromInteropObservable=Ce.innerFrom=void 0;var oD=tl(),aD=iv(),Ko=Oe(),uD=ov(),sD=av(),cD=uv(),lD=cv(),rO=ul(),fD=we(),dD=Bm(),pD=Tu();function hD(e){if(e instanceof Ko.Observable)return e;if(e!=null){if(uD.isInteropObservable(e))return nO(e);if(oD.isArrayLike(e))return iO(e);if(aD.isPromise(e))return oO(e);if(sD.isAsyncIterable(e))return fv(e);if(lD.isIterable(e))return aO(e);if(rO.isReadableStreamLike(e))return uO(e)}throw cD.createInvalidObservableTypeError(e)}Ce.innerFrom=hD;function nO(e){return new Ko.Observable(function(t){var r=e[pD.observable]();if(fD.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}Ce.fromInteropObservable=nO;function iO(e){return new Ko.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}Ce.fromArrayLike=iO;function oO(e){return new Ko.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,dD.reportUnhandledError)})}Ce.fromPromise=oO;function aO(e){return new Ko.Observable(function(t){var r,n;try{for(var i=lv(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()})}Ce.fromIterable=aO;function fv(e){return new Ko.Observable(function(t){mD(e,t).catch(function(r){return t.error(r)})})}Ce.fromAsyncIterable=fv;function uO(e){return fv(rO.readableStreamLikeToAsyncGenerator(e))}Ce.fromReadableStreamLike=uO;function mD(e,t){var r,n,i,o;return rD(this,void 0,void 0,function(){var a,u;return nD(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=iD(e),l.label=1;case 1:return[4,r.next()];case 2:if(n=l.sent(),!!n.done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=l.sent(),i={error:u},[3,11];case 6:return l.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:l.sent(),l.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]}})})}});var on=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.executeSchedule=void 0;function vD(e,t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}sl.executeSchedule=vD});var qu=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.observeOn=void 0;var dv=on(),gD=G(),bD=Z();function _D(e,t){return t===void 0&&(t=0),gD.operate(function(r,n){r.subscribe(bD.createOperatorSubscriber(n,function(i){return dv.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return dv.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return dv.executeSchedule(n,e,function(){return n.error(i)},t)}))})}cl.observeOn=_D});var Iu=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.subscribeOn=void 0;var yD=G();function wD(e,t){return t===void 0&&(t=0),yD.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}ll.subscribeOn=wD});var sO=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.scheduleObservable=void 0;var xD=oe(),SD=qu(),OD=Iu();function ED(e,t){return xD.innerFrom(e).pipe(OD.subscribeOn(t),SD.observeOn(t))}fl.scheduleObservable=ED});var cO=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.schedulePromise=void 0;var AD=oe(),TD=qu(),PD=Iu();function RD(e,t){return AD.innerFrom(e).pipe(PD.subscribeOn(t),TD.observeOn(t))}dl.schedulePromise=RD});var lO=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.scheduleArray=void 0;var MD=Oe();function kD(e,t){return new MD.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}pl.scheduleArray=kD});var pv=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.scheduleIterable=void 0;var CD=Oe(),qD=sv(),ID=we(),fO=on();function jD(e,t){return new CD.Observable(function(r){var n;return fO.executeSchedule(r,t,function(){n=e[qD.iterator](),fO.executeSchedule(r,t,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(u){r.error(u);return}a?r.complete():r.next(o)},0,!0)}),function(){return ID.isFunction(n?.return)&&n.return()}})}hl.scheduleIterable=jD});var hv=b(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.scheduleAsyncIterable=void 0;var FD=Oe(),dO=on();function LD(e,t){if(!e)throw new Error("Iterable cannot be null");return new FD.Observable(function(r){dO.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();dO.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}ml.scheduleAsyncIterable=LD});var pO=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.scheduleReadableStreamLike=void 0;var ND=hv(),DD=ul();function zD(e,t){return ND.scheduleAsyncIterable(DD.readableStreamLikeToAsyncGenerator(e),t)}vl.scheduleReadableStreamLike=zD});var mv=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.scheduled=void 0;var BD=sO(),UD=cO(),WD=lO(),HD=pv(),VD=hv(),GD=ov(),$D=iv(),KD=tl(),YD=cv(),ZD=av(),JD=uv(),XD=ul(),QD=pO();function e5(e,t){if(e!=null){if(GD.isInteropObservable(e))return BD.scheduleObservable(e,t);if(KD.isArrayLike(e))return WD.scheduleArray(e,t);if($D.isPromise(e))return UD.schedulePromise(e,t);if(ZD.isAsyncIterable(e))return VD.scheduleAsyncIterable(e,t);if(YD.isIterable(e))return HD.scheduleIterable(e,t);if(XD.isReadableStreamLike(e))return QD.scheduleReadableStreamLike(e,t)}throw JD.createInvalidObservableTypeError(e)}gl.scheduled=e5});var an=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.from=void 0;var t5=mv(),r5=oe();function n5(e,t){return t?t5.scheduled(e,t):r5.innerFrom(e)}bl.from=n5});var yl=b(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.of=void 0;var i5=It(),o5=an();function a5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i5.popScheduler(e);return o5.from(e,r)}_l.of=a5});var vv=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.throwError=void 0;var u5=Oe(),s5=we();function c5(e,t){var r=s5.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new u5.Observable(t?function(i){return t.schedule(n,0,i)}:n)}wl.throwError=c5});var xl=b(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.observeNotification=un.Notification=un.NotificationKind=void 0;var l5=_r(),f5=yl(),d5=vv(),p5=we(),h5;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(h5=un.NotificationKind||(un.NotificationKind={}));var m5=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return hO(this,t)},e.prototype.do=function(t,r,n){var i=this,o=i.kind,a=i.value,u=i.error;return o==="N"?t?.(a):o==="E"?r?.(u):n?.()},e.prototype.accept=function(t,r,n){var i;return p5.isFunction((i=t)===null||i===void 0?void 0:i.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,i=t.error,o=r==="N"?f5.of(n):r==="E"?d5.throwError(function(){return i}):r==="C"?l5.EMPTY:0;if(!o)throw new TypeError("Unexpected notification kind "+r);return o},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}();un.Notification=m5;function hO(e,t){var r,n,i,o=e,a=o.kind,u=o.value,l=o.error;if(typeof a!="string")throw new TypeError('Invalid notification, missing "kind"');a==="N"?(r=t.next)===null||r===void 0||r.call(t,u):a==="E"?(n=t.error)===null||n===void 0||n.call(t,l):(i=t.complete)===null||i===void 0||i.call(t)}un.observeNotification=hO});var vO=b(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.isObservable=void 0;var v5=Oe(),mO=we();function g5(e){return!!e&&(e instanceof v5.Observable||mO.isFunction(e.lift)&&mO.isFunction(e.subscribe))}Sl.isObservable=g5});var In=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.EmptyError=void 0;var b5=Mn();Ol.EmptyError=b5.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var gO=b(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.lastValueFrom=void 0;var _5=In();function y5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=!1,a;e.subscribe({next:function(u){a=u,o=!0},error:i,complete:function(){o?n(a):r?n(t.defaultValue):i(new _5.EmptyError)}})})}El.lastValueFrom=y5});var bO=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.firstValueFrom=void 0;var w5=In(),x5=To();function S5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new x5.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new w5.EmptyError)}});e.subscribe(o)})}Al.firstValueFrom=S5});var gv=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.ArgumentOutOfRangeError=void 0;var O5=Mn();Tl.ArgumentOutOfRangeError=O5.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var bv=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.NotFoundError=void 0;var E5=Mn();Pl.NotFoundError=E5.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var _v=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.SequenceError=void 0;var A5=Mn();Rl.SequenceError=A5.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var kl=b(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.isValidDate=void 0;function T5(e){return e instanceof Date&&!isNaN(e)}Ml.isValidDate=T5});var Cl=b(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.timeout=Li.TimeoutError=void 0;var P5=qt(),R5=kl(),M5=G(),k5=oe(),C5=Mn(),q5=Z(),I5=on();Li.TimeoutError=C5.createErrorClass(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function j5(e,t){var r=R5.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?F5:o,u=r.scheduler,l=u===void 0?t??P5.asyncScheduler:u,s=r.meta,c=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return M5.operate(function(d,f){var p,h,m=null,g=0,_=function(w){h=I5.executeSchedule(f,l,function(){try{p.unsubscribe(),k5.innerFrom(a({meta:c,lastValue:m,seen:g})).subscribe(f)}catch(y){f.error(y)}},w)};p=d.subscribe(q5.createOperatorSubscriber(f,function(w){h?.unsubscribe(),g++,f.next(m=w),i>0&&_(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),m=null})),!g&&_(n!=null?typeof n=="number"?n:+n-l.now():i)})}Li.timeout=j5;function F5(e){throw new Li.TimeoutError(e)}});var jn=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.map=void 0;var L5=G(),N5=Z();function D5(e,t){return L5.operate(function(r,n){var i=0;r.subscribe(N5.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}ql.map=D5});var Ln=b(Fn=>{"use strict";var z5=Fn&&Fn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},B5=Fn&&Fn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.mapOneOrManyArgs=void 0;var U5=jn(),W5=Array.isArray;function H5(e,t){return W5(t)?e.apply(void 0,B5([],z5(t))):e(t)}function V5(e){return U5.map(function(t){return H5(e,t)})}Fn.mapOneOrManyArgs=V5});var wv=b(Nn=>{"use strict";var G5=Nn&&Nn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},_O=Nn&&Nn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.bindCallbackInternals=void 0;var $5=Cu(),K5=Oe(),Y5=Iu(),Z5=Ln(),J5=qu(),X5=Zc();function yv(e,t,r,n){if(r)if($5.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return yv(e,t,n).apply(this,i).pipe(Z5.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return yv(e,t).apply(this,i).pipe(Y5.subscribeOn(n),J5.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new X5.AsyncSubject,l=!0;return new K5.Observable(function(s){var c=u.subscribe(s);if(l){l=!1;var d=!1,f=!1;t.apply(i,_O(_O([],G5(o)),[function(){for(var p=[],h=0;h<arguments.length;h++)p[h]=arguments[h];if(e){var m=p.shift();if(m!=null){u.error(m);return}}u.next(1<p.length?p:p[0]),f=!0,d&&u.complete()}])),f&&u.complete(),d=!0}return c})}}Nn.bindCallbackInternals=yv});var yO=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.bindCallback=void 0;var Q5=wv();function e3(e,t,r){return Q5.bindCallbackInternals(!1,e,t,r)}Il.bindCallback=e3});var wO=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.bindNodeCallback=void 0;var t3=wv();function r3(e,t,r){return t3.bindCallbackInternals(!0,e,t,r)}jl.bindNodeCallback=r3});var xv=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.argsArgArrayOrObject=void 0;var n3=Array.isArray,i3=Object.getPrototypeOf,o3=Object.prototype,a3=Object.keys;function u3(e){if(e.length===1){var t=e[0];if(n3(t))return{args:t,keys:null};if(s3(t)){var r=a3(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}Fl.argsArgArrayOrObject=u3;function s3(e){return e&&typeof e=="object"&&i3(e)===o3}});var Sv=b(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.createObject=void 0;function c3(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Ll.createObject=c3});var Nl=b(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.combineLatestInit=Yo.combineLatest=void 0;var l3=Oe(),f3=xv(),OO=an(),EO=at(),d3=Ln(),xO=It(),p3=Sv(),h3=Z(),m3=on();function v3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xO.popScheduler(e),n=xO.popResultSelector(e),i=f3.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return OO.from([],r);var u=new l3.Observable(AO(o,r,a?function(l){return p3.createObject(a,l)}:EO.identity));return n?u.pipe(d3.mapOneOrManyArgs(n)):u}Yo.combineLatest=v3;function AO(e,t,r){return r===void 0&&(r=EO.identity),function(n){SO(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,l=function(c){SO(t,function(){var d=OO.from(e[c],t),f=!1;d.subscribe(h3.createOperatorSubscriber(n,function(p){o[c]=p,f||(f=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)l(s)},n)}}Yo.combineLatestInit=AO;function SO(e,t,r){e?m3.executeSchedule(r,e,t):t()}});var zl=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.mergeInternals=void 0;var g3=oe(),b3=on(),TO=Z();function _3(e,t,r,n,i,o,a,u){var l=[],s=0,c=0,d=!1,f=function(){d&&!l.length&&!s&&t.complete()},p=function(m){return s<n?h(m):l.push(m)},h=function(m){o&&t.next(m),s++;var g=!1;g3.innerFrom(r(m,c++)).subscribe(TO.createOperatorSubscriber(t,function(_){i?.(_),o?p(_):t.next(_)},function(){g=!0},void 0,function(){if(g)try{s--;for(var _=function(){var w=l.shift();a?b3.executeSchedule(t,a,function(){return h(w)}):h(w)};l.length&&s<n;)_();f()}catch(w){t.error(w)}}))};return e.subscribe(TO.createOperatorSubscriber(t,p,function(){d=!0,f()})),function(){u?.()}}Dl.mergeInternals=_3});var sn=b(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.mergeMap=void 0;var y3=jn(),w3=oe(),x3=G(),S3=zl(),O3=we();function PO(e,t,r){return r===void 0&&(r=1/0),O3.isFunction(t)?PO(function(n,i){return y3.map(function(o,a){return t(n,o,i,a)})(w3.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),x3.operate(function(n,i){return S3.mergeInternals(n,i,e,r)}))}Bl.mergeMap=PO});var ju=b(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.mergeAll=void 0;var E3=sn(),A3=at();function T3(e){return e===void 0&&(e=1/0),E3.mergeMap(A3.identity,e)}Ul.mergeAll=T3});var Hl=b(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.concatAll=void 0;var P3=ju();function R3(){return P3.mergeAll(1)}Wl.concatAll=R3});var Fu=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.concat=void 0;var M3=Hl(),k3=It(),C3=an();function q3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return M3.concatAll()(C3.from(e,k3.popScheduler(e)))}Vl.concat=q3});var Lu=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.defer=void 0;var I3=Oe(),j3=oe();function F3(e){return new I3.Observable(function(t){j3.innerFrom(e()).subscribe(t)})}Gl.defer=F3});var RO=b($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.connectable=void 0;var L3=ut(),N3=Oe(),D3=Lu(),z3={connector:function(){return new L3.Subject},resetOnDisconnect:!0};function B3(e,t){t===void 0&&(t=z3);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new N3.Observable(function(l){return a.subscribe(l)});return u.connect=function(){return(!r||r.closed)&&(r=D3.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}$l.connectable=B3});var MO=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.forkJoin=void 0;var U3=Oe(),W3=xv(),H3=oe(),V3=It(),G3=Z(),$3=Ln(),K3=Sv();function Y3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=V3.popResultSelector(e),n=W3.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new U3.Observable(function(u){var l=i.length;if(!l){u.complete();return}for(var s=new Array(l),c=l,d=l,f=function(h){var m=!1;H3.innerFrom(i[h]).subscribe(G3.createOperatorSubscriber(u,function(g){m||(m=!0,d--),s[h]=g},function(){return c--},void 0,function(){(!c||!m)&&(d||u.next(o?K3.createObject(o,s):s),u.complete())}))},p=0;p<l;p++)f(p)});return r?a.pipe($3.mapOneOrManyArgs(r)):a}Kl.forkJoin=Y3});var CO=b(Zo=>{"use strict";var Z3=Zo&&Zo.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};Object.defineProperty(Zo,"__esModule",{value:!0});Zo.fromEvent=void 0;var J3=oe(),X3=Oe(),Q3=sn(),e6=tl(),Ni=we(),t6=Ln(),r6=["addListener","removeListener"],n6=["addEventListener","removeEventListener"],i6=["on","off"];function Ov(e,t,r,n){if(Ni.isFunction(r)&&(n=r,r=void 0),n)return Ov(e,t,r).pipe(t6.mapOneOrManyArgs(n));var i=Z3(u6(e)?n6.map(function(u){return function(l){return e[u](t,l,r)}}):o6(e)?r6.map(kO(e,t)):a6(e)?i6.map(kO(e,t)):[],2),o=i[0],a=i[1];if(!o&&e6.isArrayLike(e))return Q3.mergeMap(function(u){return Ov(u,t,r)})(J3.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new X3.Observable(function(u){var l=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return u.next(1<s.length?s:s[0])};return o(l),function(){return a(l)}})}Zo.fromEvent=Ov;function kO(e,t){return function(r){return function(n){return e[r](t,n)}}}function o6(e){return Ni.isFunction(e.addListener)&&Ni.isFunction(e.removeListener)}function a6(e){return Ni.isFunction(e.on)&&Ni.isFunction(e.off)}function u6(e){return Ni.isFunction(e.addEventListener)&&Ni.isFunction(e.removeEventListener)}});var IO=b(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.fromEventPattern=void 0;var s6=Oe(),c6=we(),l6=Ln();function qO(e,t,r){return r?qO(e,t).pipe(l6.mapOneOrManyArgs(r)):new s6.Observable(function(n){var i=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return n.next(a.length===1?a[0]:a)},o=e(i);return c6.isFunction(t)?function(){return t(i,o)}:void 0})}Yl.fromEventPattern=qO});var FO=b(Jo=>{"use strict";var f6=Jo&&Jo.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.generate=void 0;var jO=at(),d6=Cu(),p6=Lu(),h6=pv();function m6(e,t,r,n,i){var o,a,u,l;arguments.length===1?(o=e,l=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,u=a===void 0?jO.identity:a,i=o.scheduler):(l=e,!n||d6.isScheduler(n)?(u=jO.identity,i=n):u=n);function s(){var c;return f6(this,function(d){switch(d.label){case 0:c=l,d.label=1;case 1:return!t||t(c)?[4,u(c)]:[3,4];case 2:d.sent(),d.label=3;case 3:return c=r(c),[3,1];case 4:return[2]}})}return p6.defer(i?function(){return h6.scheduleIterable(s(),i)}:s)}Jo.generate=m6});var LO=b(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.iif=void 0;var v6=Lu();function g6(e,t,r){return v6.defer(function(){return e()?t:r})}Zl.iif=g6});var Dn=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.timer=void 0;var b6=Oe(),_6=qt(),y6=Cu(),w6=kl();function x6(e,t,r){e===void 0&&(e=0),r===void 0&&(r=_6.async);var n=-1;return t!=null&&(y6.isScheduler(t)?r=t:n=t),new b6.Observable(function(i){var o=w6.isValidDate(e)?+e-r.now():e;o<0&&(o=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}Jl.timer=x6});var Ev=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.interval=void 0;var S6=qt(),O6=Dn();function E6(e,t){return e===void 0&&(e=0),t===void 0&&(t=S6.asyncScheduler),e<0&&(e=0),O6.timer(e,e,t)}Xl.interval=E6});var DO=b(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.merge=void 0;var A6=ju(),T6=oe(),P6=_r(),NO=It(),R6=an();function M6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=NO.popScheduler(e),n=NO.popNumber(e,1/0),i=e;return i.length?i.length===1?T6.innerFrom(i[0]):A6.mergeAll(n)(R6.from(i,r)):P6.EMPTY}Ql.merge=M6});var Av=b(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.never=Di.NEVER=void 0;var k6=Oe(),C6=ot();Di.NEVER=new k6.Observable(C6.noop);function q6(){return Di.NEVER}Di.never=q6});var zi=b(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.argsOrArgArray=void 0;var I6=Array.isArray;function j6(e){return e.length===1&&I6(e[0])?e[0]:e}ef.argsOrArgArray=j6});var Tv=b(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.onErrorResumeNext=void 0;var F6=Oe(),L6=zi(),N6=Z(),zO=ot(),D6=oe();function z6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=L6.argsOrArgArray(e);return new F6.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=D6.innerFrom(r[i++])}catch{o();return}var u=new N6.OperatorSubscriber(n,void 0,zO.noop,zO.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}tf.onErrorResumeNext=z6});var BO=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.pairs=void 0;var B6=an();function U6(e,t){return B6.from(Object.entries(e),t)}rf.pairs=U6});var UO=b(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.not=void 0;function W6(e,t){return function(r,n){return!e.call(t,r,n)}}nf.not=W6});var Bi=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.filter=void 0;var H6=G(),V6=Z();function G6(e,t){return H6.operate(function(r,n){var i=0;r.subscribe(V6.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}of.filter=G6});var VO=b(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.partition=void 0;var $6=UO(),WO=Bi(),HO=oe();function K6(e,t,r){return[WO.filter(t,r)(HO.innerFrom(e)),WO.filter($6.not(t,r))(HO.innerFrom(e))]}af.partition=K6});var Pv=b(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.raceInit=Xo.race=void 0;var Y6=Oe(),GO=oe(),Z6=zi(),J6=Z();function X6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=Z6.argsOrArgArray(e),e.length===1?GO.innerFrom(e[0]):new Y6.Observable($O(e))}Xo.race=X6;function $O(e){return function(t){for(var r=[],n=function(o){r.push(GO.innerFrom(e[o]).subscribe(J6.createOperatorSubscriber(t,function(a){if(r){for(var u=0;u<r.length;u++)u!==o&&r[u].unsubscribe();r=null}t.next(a)})))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}Xo.raceInit=$O});var KO=b(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.range=void 0;var Q6=Oe(),e8=_r();function t8(e,t,r){if(t==null&&(t=e,e=0),t<=0)return e8.EMPTY;var n=t+e;return new Q6.Observable(r?function(i){var o=e;return r.schedule(function(){o<n?(i.next(o++),this.schedule()):i.complete()})}:function(i){for(var o=e;o<n&&!i.closed;)i.next(o++);i.complete()})}uf.range=t8});var YO=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.using=void 0;var r8=Oe(),n8=oe(),i8=_r();function o8(e,t){return new r8.Observable(function(r){var n=e(),i=t(n),o=i?n8.innerFrom(i):i8.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}sf.using=o8});var cf=b(zn=>{"use strict";var a8=zn&&zn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},u8=zn&&zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(zn,"__esModule",{value:!0});zn.zip=void 0;var s8=Oe(),c8=oe(),l8=zi(),f8=_r(),d8=Z(),p8=It();function h8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=p8.popResultSelector(e),n=l8.argsOrArgArray(e);return n.length?new s8.Observable(function(i){var o=n.map(function(){return[]}),a=n.map(function(){return!1});i.add(function(){o=a=null});for(var u=function(s){c8.innerFrom(n[s]).subscribe(d8.createOperatorSubscriber(i,function(c){if(o[s].push(c),o.every(function(f){return f.length})){var d=o.map(function(f){return f.shift()});i.next(r?r.apply(void 0,u8([],a8(d))):d),o.some(function(f,p){return!f.length&&a[p]})&&i.complete()}},function(){a[s]=!0,!o[s].length&&i.complete()}))},l=0;!i.closed&&l<n.length;l++)u(l);return function(){o=a=null}}):f8.EMPTY}zn.zip=h8});var JO=b(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:!0})});var Rv=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.audit=void 0;var m8=G(),v8=oe(),XO=Z();function g8(e){return m8.operate(function(t,r){var n=!1,i=null,o=null,a=!1,u=function(){if(o?.unsubscribe(),o=null,n){n=!1;var s=i;i=null,r.next(s)}a&&r.complete()},l=function(){o=null,a&&r.complete()};t.subscribe(XO.createOperatorSubscriber(r,function(s){n=!0,i=s,o||v8.innerFrom(e(s)).subscribe(o=XO.createOperatorSubscriber(r,u,l))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}lf.audit=g8});var QO=b(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.auditTime=void 0;var b8=qt(),_8=Rv(),y8=Dn();function w8(e,t){return t===void 0&&(t=b8.asyncScheduler),_8.audit(function(){return y8.timer(e,t)})}ff.auditTime=w8});var tE=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.buffer=void 0;var x8=G(),S8=ot(),eE=Z(),O8=oe();function E8(e){return x8.operate(function(t,r){var n=[];return t.subscribe(eE.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),O8.innerFrom(e).subscribe(eE.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},S8.noop)),function(){n=null}})}df.buffer=E8});var rE=b(Qo=>{"use strict";var Mv=Qo&&Qo.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.bufferCount=void 0;var A8=G(),T8=Z(),P8=nn();function R8(e,t){return t===void 0&&(t=null),t=t??e,A8.operate(function(r,n){var i=[],o=0;r.subscribe(T8.createOperatorSubscriber(n,function(a){var u,l,s,c,d=null;o++%t===0&&i.push([]);try{for(var f=Mv(i),p=f.next();!p.done;p=f.next()){var h=p.value;h.push(a),e<=h.length&&(d=d??[],d.push(h))}}catch(_){u={error:_}}finally{try{p&&!p.done&&(l=f.return)&&l.call(f)}finally{if(u)throw u.error}}if(d)try{for(var m=Mv(d),g=m.next();!g.done;g=m.next()){var h=g.value;P8.arrRemove(i,h),n.next(h)}}catch(_){s={error:_}}finally{try{g&&!g.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var l=Mv(i),s=l.next();!s.done;s=l.next()){var c=s.value;n.next(c)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}Qo.bufferCount=R8});var iE=b(ea=>{"use strict";var M8=ea&&ea.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ea,"__esModule",{value:!0});ea.bufferTime=void 0;var k8=Nt(),C8=G(),q8=Z(),I8=nn(),j8=qt(),F8=It(),nE=on();function L8(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=F8.popScheduler(n))!==null&&t!==void 0?t:j8.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return C8.operate(function(l,s){var c=[],d=!1,f=function(m){var g=m.buffer,_=m.subs;_.unsubscribe(),I8.arrRemove(c,m),s.next(g),d&&p()},p=function(){if(c){var m=new k8.Subscription;s.add(m);var g=[],_={buffer:g,subs:m};c.push(_),nE.executeSchedule(m,o,function(){return f(_)},e)}};a!==null&&a>=0?nE.executeSchedule(s,o,p,a,!0):d=!0,p();var h=q8.createOperatorSubscriber(s,function(m){var g,_,w=c.slice();try{for(var y=M8(w),x=y.next();!x.done;x=y.next()){var O=x.value,A=O.buffer;A.push(m),u<=A.length&&f(O)}}catch(T){g={error:T}}finally{try{x&&!x.done&&(_=y.return)&&_.call(y)}finally{if(g)throw g.error}}},function(){for(;c?.length;)s.next(c.shift().buffer);h?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return c=null});l.subscribe(h)})}ea.bufferTime=L8});var uE=b(ta=>{"use strict";var N8=ta&&ta.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ta,"__esModule",{value:!0});ta.bufferToggle=void 0;var D8=Nt(),z8=G(),oE=oe(),kv=Z(),aE=ot(),B8=nn();function U8(e,t){return z8.operate(function(r,n){var i=[];oE.innerFrom(e).subscribe(kv.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new D8.Subscription,l=function(){B8.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(oE.innerFrom(t(o)).subscribe(kv.createOperatorSubscriber(n,l,aE.noop)))},aE.noop)),r.subscribe(kv.createOperatorSubscriber(n,function(o){var a,u;try{for(var l=N8(i),s=l.next();!s.done;s=l.next()){var c=s.value;c.push(o)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}ta.bufferToggle=U8});var cE=b(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.bufferWhen=void 0;var W8=G(),H8=ot(),sE=Z(),V8=oe();function G8(e){return W8.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),V8.innerFrom(e()).subscribe(i=sE.createOperatorSubscriber(r,o,H8.noop))};o(),t.subscribe(sE.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}pf.bufferWhen=G8});var fE=b(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.catchError=void 0;var $8=oe(),K8=Z(),Y8=G();function lE(e){return Y8.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(K8.createOperatorSubscriber(r,void 0,void 0,function(a){o=$8.innerFrom(e(a,lE(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}hf.catchError=lE});var Cv=b(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.scanInternals=void 0;var Z8=Z();function J8(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(Z8.createOperatorSubscriber(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}mf.scanInternals=J8});var ra=b(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.reduce=void 0;var X8=Cv(),Q8=G();function ez(e,t){return Q8.operate(X8.scanInternals(e,t,arguments.length>=2,!1,!0))}vf.reduce=ez});var qv=b(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.toArray=void 0;var tz=ra(),rz=G(),nz=function(e,t){return e.push(t),e};function iz(){return rz.operate(function(e,t){tz.reduce(nz,[])(e).subscribe(t)})}gf.toArray=iz});var Iv=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.joinAllInternals=void 0;var oz=at(),az=Ln(),uz=Pu(),sz=sn(),cz=qv();function lz(e,t){return uz.pipe(cz.toArray(),sz.mergeMap(function(r){return e(r)}),t?az.mapOneOrManyArgs(t):oz.identity)}bf.joinAllInternals=lz});var jv=b(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.combineLatestAll=void 0;var fz=Nl(),dz=Iv();function pz(e){return dz.joinAllInternals(fz.combineLatest,e)}_f.combineLatestAll=pz});var dE=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.combineAll=void 0;var hz=jv();yf.combineAll=hz.combineLatestAll});var vE=b(Bn=>{"use strict";var pE=Bn&&Bn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},hE=Bn&&Bn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.combineLatest=void 0;var mz=Nl(),vz=G(),gz=zi(),bz=Ln(),_z=Pu(),yz=It();function mE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=yz.popResultSelector(e);return r?_z.pipe(mE.apply(void 0,hE([],pE(e))),bz.mapOneOrManyArgs(r)):vz.operate(function(n,i){mz.combineLatestInit(hE([n],pE(gz.argsOrArgArray(e))))(i)})}Bn.combineLatest=mE});var gE=b(Un=>{"use strict";var wz=Un&&Un.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},xz=Un&&Un.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Un,"__esModule",{value:!0});Un.combineLatestWith=void 0;var Sz=vE();function Oz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Sz.combineLatest.apply(void 0,xz([],wz(e)))}Un.combineLatestWith=Oz});var Fv=b(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.concatMap=void 0;var bE=sn(),Ez=we();function Az(e,t){return Ez.isFunction(t)?bE.mergeMap(e,t,1):bE.mergeMap(e,1)}wf.concatMap=Az});var yE=b(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.concatMapTo=void 0;var _E=Fv(),Tz=we();function Pz(e,t){return Tz.isFunction(t)?_E.concatMap(function(){return e},t):_E.concatMap(function(){return e})}xf.concatMapTo=Pz});var wE=b(Wn=>{"use strict";var Rz=Wn&&Wn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Mz=Wn&&Wn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.concat=void 0;var kz=G(),Cz=Hl(),qz=It(),Iz=an();function jz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=qz.popScheduler(e);return kz.operate(function(n,i){Cz.concatAll()(Iz.from(Mz([n],Rz(e)),r)).subscribe(i)})}Wn.concat=jz});var xE=b(Hn=>{"use strict";var Fz=Hn&&Hn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Lz=Hn&&Hn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.concatWith=void 0;var Nz=wE();function Dz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nz.concat.apply(void 0,Lz([],Fz(e)))}Hn.concatWith=Dz});var SE=b(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.fromSubscribable=void 0;var zz=Oe();function Bz(e){return new zz.Observable(function(t){return e.subscribe(t)})}Sf.fromSubscribable=Bz});var Ef=b(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.connect=void 0;var Uz=ut(),Wz=oe(),Hz=G(),Vz=SE(),Gz={connector:function(){return new Uz.Subject}};function $z(e,t){t===void 0&&(t=Gz);var r=t.connector;return Hz.operate(function(n,i){var o=r();Wz.innerFrom(e(Vz.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}Of.connect=$z});var OE=b(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.count=void 0;var Kz=ra();function Yz(e){return Kz.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}Af.count=Yz});var AE=b(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.debounce=void 0;var Zz=G(),Jz=ot(),EE=Z(),Xz=oe();function Qz(e){return Zz.operate(function(t,r){var n=!1,i=null,o=null,a=function(){if(o?.unsubscribe(),o=null,n){n=!1;var u=i;i=null,r.next(u)}};t.subscribe(EE.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=EE.createOperatorSubscriber(r,a,Jz.noop),Xz.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}Tf.debounce=Qz});var TE=b(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.debounceTime=void 0;var eB=qt(),tB=G(),rB=Z();function nB(e,t){return t===void 0&&(t=eB.asyncScheduler),tB.operate(function(r,n){var i=null,o=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var s=o;o=null,n.next(s)}};function l(){var s=a+e,c=t.now();if(c<s){i=this.schedule(void 0,s-c),n.add(i);return}u()}r.subscribe(rB.createOperatorSubscriber(n,function(s){o=s,a=t.now(),i||(i=t.schedule(l,e),n.add(i))},function(){u(),n.complete()},void 0,function(){o=i=null}))})}Pf.debounceTime=nB});var Nu=b(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.defaultIfEmpty=void 0;var iB=G(),oB=Z();function aB(e){return iB.operate(function(t,r){var n=!1;t.subscribe(oB.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}Rf.defaultIfEmpty=aB});var Du=b(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.take=void 0;var uB=_r(),sB=G(),cB=Z();function lB(e){return e<=0?function(){return uB.EMPTY}:sB.operate(function(t,r){var n=0;t.subscribe(cB.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}Mf.take=lB});var Lv=b(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.ignoreElements=void 0;var fB=G(),dB=Z(),pB=ot();function hB(){return fB.operate(function(e,t){e.subscribe(dB.createOperatorSubscriber(t,pB.noop))})}kf.ignoreElements=hB});var Nv=b(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.mapTo=void 0;var mB=jn();function vB(e){return mB.map(function(){return e})}Cf.mapTo=vB});var Dv=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.delayWhen=void 0;var gB=Fu(),PE=Du(),bB=Lv(),_B=Nv(),yB=sn(),wB=oe();function RE(e,t){return t?function(r){return gB.concat(t.pipe(PE.take(1),bB.ignoreElements()),r.pipe(RE(e)))}:yB.mergeMap(function(r,n){return wB.innerFrom(e(r,n)).pipe(PE.take(1),_B.mapTo(r))})}qf.delayWhen=RE});var ME=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.delay=void 0;var xB=qt(),SB=Dv(),OB=Dn();function EB(e,t){t===void 0&&(t=xB.asyncScheduler);var r=OB.timer(e,t);return SB.delayWhen(function(){return r})}If.delay=EB});var kE=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.dematerialize=void 0;var AB=xl(),TB=G(),PB=Z();function RB(){return TB.operate(function(e,t){e.subscribe(PB.createOperatorSubscriber(t,function(r){return AB.observeNotification(r,t)}))})}jf.dematerialize=RB});var qE=b(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.distinct=void 0;var MB=G(),CE=Z(),kB=ot(),CB=oe();function qB(e,t){return MB.operate(function(r,n){var i=new Set;r.subscribe(CE.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&CB.innerFrom(t).subscribe(CE.createOperatorSubscriber(n,function(){return i.clear()},kB.noop))})}Ff.distinct=qB});var zv=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.distinctUntilChanged=void 0;var IB=at(),jB=G(),FB=Z();function LB(e,t){return t===void 0&&(t=IB.identity),e=e??NB,jB.operate(function(r,n){var i,o=!0;r.subscribe(FB.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}Lf.distinctUntilChanged=LB;function NB(e,t){return e===t}});var IE=b(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.distinctUntilKeyChanged=void 0;var DB=zv();function zB(e,t){return DB.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Nf.distinctUntilKeyChanged=zB});var zu=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.throwIfEmpty=void 0;var BB=In(),UB=G(),WB=Z();function HB(e){return e===void 0&&(e=VB),UB.operate(function(t,r){var n=!1;t.subscribe(WB.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Df.throwIfEmpty=HB;function VB(){return new BB.EmptyError}});var FE=b(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.elementAt=void 0;var jE=gv(),GB=Bi(),$B=zu(),KB=Nu(),YB=Du();function ZB(e,t){if(e<0)throw new jE.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(GB.filter(function(i,o){return o===e}),YB.take(1),r?KB.defaultIfEmpty(t):$B.throwIfEmpty(function(){return new jE.ArgumentOutOfRangeError}))}}zf.elementAt=ZB});var LE=b(Vn=>{"use strict";var JB=Vn&&Vn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},XB=Vn&&Vn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.endWith=void 0;var QB=Fu(),eU=yl();function tU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return QB.concat(r,eU.of.apply(void 0,XB([],JB(e))))}}Vn.endWith=tU});var NE=b(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.every=void 0;var rU=G(),nU=Z();function iU(e,t){return rU.operate(function(r,n){var i=0;r.subscribe(nU.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}Bf.every=iU});var Bv=b(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.exhaustMap=void 0;var oU=jn(),DE=oe(),aU=G(),zE=Z();function BE(e,t){return t?function(r){return r.pipe(BE(function(n,i){return DE.innerFrom(e(n,i)).pipe(oU.map(function(o,a){return t(n,o,i,a)}))}))}:aU.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(zE.createOperatorSubscriber(n,function(u){o||(o=zE.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),DE.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}Uf.exhaustMap=BE});var Uv=b(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.exhaustAll=void 0;var uU=Bv(),sU=at();function cU(){return uU.exhaustMap(sU.identity)}Wf.exhaustAll=cU});var UE=b(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.exhaust=void 0;var lU=Uv();Hf.exhaust=lU.exhaustAll});var WE=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.expand=void 0;var fU=G(),dU=zl();function pU(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,fU.operate(function(n,i){return dU.mergeInternals(n,i,e,t,void 0,!0,r)})}Vf.expand=pU});var HE=b(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.finalize=void 0;var hU=G();function mU(e){return hU.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}Gf.finalize=mU});var Wv=b(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.createFind=na.find=void 0;var vU=G(),gU=Z();function bU(e,t){return vU.operate(VE(e,t,"value"))}na.find=bU;function VE(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(gU.createOperatorSubscriber(o,function(u){var l=a++;e.call(t,u,l,i)&&(o.next(n?l:u),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}na.createFind=VE});var GE=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.findIndex=void 0;var _U=G(),yU=Wv();function wU(e,t){return _U.operate(yU.createFind(e,t,"index"))}$f.findIndex=wU});var $E=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.first=void 0;var xU=In(),SU=Bi(),OU=Du(),EU=Nu(),AU=zu(),TU=at();function PU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?SU.filter(function(i,o){return e(i,o,n)}):TU.identity,OU.take(1),r?EU.defaultIfEmpty(t):AU.throwIfEmpty(function(){return new xU.EmptyError}))}}Kf.first=PU});var YE=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.groupBy=void 0;var RU=Oe(),MU=oe(),kU=ut(),CU=G(),KE=Z();function qU(e,t,r,n){return CU.operate(function(i,o){var a;!t||typeof t=="function"?a=t:(r=t.duration,a=t.element,n=t.connector);var u=new Map,l=function(h){u.forEach(h),h(o)},s=function(h){return l(function(m){return m.error(h)})},c=0,d=!1,f=new KE.OperatorSubscriber(o,function(h){try{var m=e(h),g=u.get(m);if(!g){u.set(m,g=n?n():new kU.Subject);var _=p(m,g);if(o.next(_),r){var w=KE.createOperatorSubscriber(g,function(){g.complete(),w?.unsubscribe()},void 0,void 0,function(){return u.delete(m)});f.add(MU.innerFrom(r(_)).subscribe(w))}}g.next(a?a(h):h)}catch(y){s(y)}},function(){return l(function(h){return h.complete()})},s,function(){return u.clear()},function(){return d=!0,c===0});i.subscribe(f);function p(h,m){var g=new RU.Observable(function(_){c++;var w=m.subscribe(_);return function(){w.unsubscribe(),--c===0&&d&&f.unsubscribe()}});return g.key=h,g}})}Yf.groupBy=qU});var ZE=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.isEmpty=void 0;var IU=G(),jU=Z();function FU(){return IU.operate(function(e,t){e.subscribe(jU.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}Zf.isEmpty=FU});var Hv=b(ia=>{"use strict";var LU=ia&&ia.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ia,"__esModule",{value:!0});ia.takeLast=void 0;var NU=_r(),DU=G(),zU=Z();function BU(e){return e<=0?function(){return NU.EMPTY}:DU.operate(function(t,r){var n=[];t.subscribe(zU.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=LU(n),u=a.next();!u.done;u=a.next()){var l=u.value;r.next(l)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}ia.takeLast=BU});var JE=b(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.last=void 0;var UU=In(),WU=Bi(),HU=Hv(),VU=zu(),GU=Nu(),$U=at();function KU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?WU.filter(function(i,o){return e(i,o,n)}):$U.identity,HU.takeLast(1),r?GU.defaultIfEmpty(t):VU.throwIfEmpty(function(){return new UU.EmptyError}))}}Jf.last=KU});var XE=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.materialize=void 0;var Vv=xl(),YU=G(),ZU=Z();function JU(){return YU.operate(function(e,t){e.subscribe(ZU.createOperatorSubscriber(t,function(r){t.next(Vv.Notification.createNext(r))},function(){t.next(Vv.Notification.createComplete()),t.complete()},function(r){t.next(Vv.Notification.createError(r)),t.complete()}))})}Xf.materialize=JU});var QE=b(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.max=void 0;var XU=ra(),QU=we();function eW(e){return XU.reduce(QU.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}Qf.max=eW});var eA=b(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.flatMap=void 0;var tW=sn();ed.flatMap=tW.mergeMap});var rA=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.mergeMapTo=void 0;var tA=sn(),rW=we();function nW(e,t,r){return r===void 0&&(r=1/0),rW.isFunction(t)?tA.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),tA.mergeMap(function(){return e},r))}td.mergeMapTo=nW});var nA=b(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.mergeScan=void 0;var iW=G(),oW=zl();function aW(e,t,r){return r===void 0&&(r=1/0),iW.operate(function(n,i){var o=t;return oW.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}rd.mergeScan=aW});var oA=b(Gn=>{"use strict";var uW=Gn&&Gn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},sW=Gn&&Gn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.merge=void 0;var cW=G(),lW=zi(),fW=ju(),iA=It(),dW=an();function pW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=iA.popScheduler(e),n=iA.popNumber(e,1/0);return e=lW.argsOrArgArray(e),cW.operate(function(i,o){fW.mergeAll(n)(dW.from(sW([i],uW(e)),r)).subscribe(o)})}Gn.merge=pW});var aA=b($n=>{"use strict";var hW=$n&&$n.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},mW=$n&&$n.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty($n,"__esModule",{value:!0});$n.mergeWith=void 0;var vW=oA();function gW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return vW.merge.apply(void 0,mW([],hW(e)))}$n.mergeWith=gW});var uA=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.min=void 0;var bW=ra(),_W=we();function yW(e){return bW.reduce(_W.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}nd.min=yW});var od=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.multicast=void 0;var wW=Ru(),sA=we(),xW=Ef();function SW(e,t){var r=sA.isFunction(e)?e:function(){return e};return sA.isFunction(t)?xW.connect(t,{connector:r}):function(n){return new wW.ConnectableObservable(n,r)}}id.multicast=SW});var lA=b(Ur=>{"use strict";var OW=Ur&&Ur.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},EW=Ur&&Ur.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.onErrorResumeNext=Ur.onErrorResumeNextWith=void 0;var AW=zi(),TW=Tv();function cA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=AW.argsOrArgArray(e);return function(n){return TW.onErrorResumeNext.apply(void 0,EW([n],OW(r)))}}Ur.onErrorResumeNextWith=cA;Ur.onErrorResumeNext=cA});var fA=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.pairwise=void 0;var PW=G(),RW=Z();function MW(){return PW.operate(function(e,t){var r,n=!1;e.subscribe(RW.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}ad.pairwise=MW});var dA=b(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.pluck=void 0;var kW=jn();function CW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw new Error("list of properties cannot be empty.");return kW.map(function(n){for(var i=n,o=0;o<r;o++){var a=i?.[e[o]];if(typeof a<"u")i=a;else return}return i})}ud.pluck=CW});var pA=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.publish=void 0;var qW=ut(),IW=od(),jW=Ef();function FW(e){return e?function(t){return jW.connect(e)(t)}:function(t){return IW.multicast(new qW.Subject)(t)}}sd.publish=FW});var hA=b(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.publishBehavior=void 0;var LW=ev(),NW=Ru();function DW(e){return function(t){var r=new LW.BehaviorSubject(e);return new NW.ConnectableObservable(t,function(){return r})}}cd.publishBehavior=DW});var mA=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.publishLast=void 0;var zW=Zc(),BW=Ru();function UW(){return function(e){var t=new zW.AsyncSubject;return new BW.ConnectableObservable(e,function(){return t})}}ld.publishLast=UW});var gA=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.publishReplay=void 0;var WW=Yc(),HW=od(),vA=we();function VW(e,t,r,n){r&&!vA.isFunction(r)&&(n=r);var i=vA.isFunction(r)?r:void 0;return function(o){return HW.multicast(new WW.ReplaySubject(e,t,n),i)(o)}}fd.publishReplay=VW});var bA=b(Kn=>{"use strict";var GW=Kn&&Kn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},$W=Kn&&Kn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.raceWith=void 0;var KW=Pv(),YW=G(),ZW=at();function JW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?YW.operate(function(r,n){KW.raceInit($W([r],GW(e)))(n)}):ZW.identity}Kn.raceWith=JW});var yA=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.repeat=void 0;var XW=_r(),QW=G(),_A=Z(),e4=oe(),t4=Dn();function r4(e){var t,r=1/0,n;return e!=null&&(typeof e=="object"?(t=e.count,r=t===void 0?1/0:t,n=e.delay):r=e),r<=0?function(){return XW.EMPTY}:QW.operate(function(i,o){var a=0,u,l=function(){if(u?.unsubscribe(),u=null,n!=null){var c=typeof n=="number"?t4.timer(n):e4.innerFrom(n(a)),d=_A.createOperatorSubscriber(o,function(){d.unsubscribe(),s()});c.subscribe(d)}else s()},s=function(){var c=!1;u=i.subscribe(_A.createOperatorSubscriber(o,void 0,function(){++a<r?u?l():c=!0:o.complete()})),c&&l()};s()})}dd.repeat=r4});var xA=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.repeatWhen=void 0;var n4=oe(),i4=ut(),o4=G(),wA=Z();function a4(e){return o4.operate(function(t,r){var n,i=!1,o,a=!1,u=!1,l=function(){return u&&a&&(r.complete(),!0)},s=function(){return o||(o=new i4.Subject,n4.innerFrom(e(o)).subscribe(wA.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,l()}))),o},c=function(){u=!1,n=t.subscribe(wA.createOperatorSubscriber(r,void 0,function(){u=!0,!l()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}pd.repeatWhen=a4});var OA=b(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.retry=void 0;var u4=G(),SA=Z(),s4=at(),c4=Dn(),l4=oe();function f4(e){e===void 0&&(e=1/0);var t;e&&typeof e=="object"?t=e:t={count:e};var r=t.count,n=r===void 0?1/0:r,i=t.delay,o=t.resetOnSuccess,a=o===void 0?!1:o;return n<=0?s4.identity:u4.operate(function(u,l){var s=0,c,d=function(){var f=!1;c=u.subscribe(SA.createOperatorSubscriber(l,function(p){a&&(s=0),l.next(p)},void 0,function(p){if(s++<n){var h=function(){c?(c.unsubscribe(),c=null,d()):f=!0};if(i!=null){var m=typeof i=="number"?c4.timer(i):l4.innerFrom(i(p,s)),g=SA.createOperatorSubscriber(l,function(){g.unsubscribe(),h()},function(){l.complete()});m.subscribe(g)}else h()}else l.error(p)})),f&&(c.unsubscribe(),c=null,d())};d()})}hd.retry=f4});var AA=b(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.retryWhen=void 0;var d4=oe(),p4=ut(),h4=G(),EA=Z();function m4(e){return h4.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(EA.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new p4.Subject,d4.innerFrom(e(o)).subscribe(EA.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}md.retryWhen=m4});var Gv=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.sample=void 0;var v4=oe(),g4=G(),b4=ot(),TA=Z();function _4(e){return g4.operate(function(t,r){var n=!1,i=null;t.subscribe(TA.createOperatorSubscriber(r,function(o){n=!0,i=o})),v4.innerFrom(e).subscribe(TA.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},b4.noop))})}vd.sample=_4});var PA=b(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.sampleTime=void 0;var y4=qt(),w4=Gv(),x4=Ev();function S4(e,t){return t===void 0&&(t=y4.asyncScheduler),w4.sample(x4.interval(e,t))}gd.sampleTime=S4});var RA=b(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.scan=void 0;var O4=G(),E4=Cv();function A4(e,t){return O4.operate(E4.scanInternals(e,t,arguments.length>=2,!0))}bd.scan=A4});var kA=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.sequenceEqual=void 0;var T4=G(),P4=Z(),R4=oe();function M4(e,t){return t===void 0&&(t=function(r,n){return r===n}),T4.operate(function(r,n){var i=MA(),o=MA(),a=function(l){n.next(l),n.complete()},u=function(l,s){var c=P4.createOperatorSubscriber(n,function(d){var f=s.buffer,p=s.complete;f.length===0?p?a(!1):l.buffer.push(d):!t(d,f.shift())&&a(!1)},function(){l.complete=!0;var d=s.complete,f=s.buffer;d&&a(f.length===0),c?.unsubscribe()});return c};r.subscribe(u(i,o)),R4.innerFrom(e).subscribe(u(o,i))})}_d.sequenceEqual=M4;function MA(){return{buffer:[],complete:!1}}});var Kv=b(Yn=>{"use strict";var k4=Yn&&Yn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},C4=Yn&&Yn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.share=void 0;var CA=oe(),q4=ut(),qA=To(),I4=G();function j4(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new q4.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,u=e.resetOnRefCountZero,l=u===void 0?!0:u;return function(s){var c,d,f,p=0,h=!1,m=!1,g=function(){d?.unsubscribe(),d=void 0},_=function(){g(),c=f=void 0,h=m=!1},w=function(){var y=c;_(),y?.unsubscribe()};return I4.operate(function(y,x){p++,!m&&!h&&g();var O=f=f??r();x.add(function(){p--,p===0&&!m&&!h&&(d=$v(w,l))}),O.subscribe(x),!c&&p>0&&(c=new qA.SafeSubscriber({next:function(A){return O.next(A)},error:function(A){m=!0,g(),d=$v(_,i,A),O.error(A)},complete:function(){h=!0,g(),d=$v(_,a),O.complete()}}),CA.innerFrom(y).subscribe(c))})(s)}}Yn.share=j4;function $v(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t!==!1){var i=new qA.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return CA.innerFrom(t.apply(void 0,C4([],k4(r)))).subscribe(i)}}});var IA=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.shareReplay=void 0;var F4=Yc(),L4=Kv();function N4(e,t,r){var n,i,o,a,u=!1;return e&&typeof e=="object"?(n=e.bufferSize,a=n===void 0?1/0:n,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,u=o===void 0?!1:o,r=e.scheduler):a=e??1/0,L4.share({connector:function(){return new F4.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}yd.shareReplay=N4});var jA=b(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.single=void 0;var D4=In(),z4=_v(),B4=bv(),U4=G(),W4=Z();function H4(e){return U4.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(W4.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new z4.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new B4.NotFoundError("No matching values"):new D4.EmptyError)}))})}wd.single=H4});var FA=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.skip=void 0;var V4=Bi();function G4(e){return V4.filter(function(t,r){return e<=r})}xd.skip=G4});var LA=b(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.skipLast=void 0;var $4=at(),K4=G(),Y4=Z();function Z4(e){return e<=0?$4.identity:K4.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(Y4.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var u=a%e,l=n[u];n[u]=o,r.next(l)}})),function(){n=null}})}Sd.skipLast=Z4});var DA=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.skipUntil=void 0;var J4=G(),NA=Z(),X4=oe(),Q4=ot();function e7(e){return J4.operate(function(t,r){var n=!1,i=NA.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},Q4.noop);X4.innerFrom(e).subscribe(i),t.subscribe(NA.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}Od.skipUntil=e7});var zA=b(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.skipWhile=void 0;var t7=G(),r7=Z();function n7(e){return t7.operate(function(t,r){var n=!1,i=0;t.subscribe(r7.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}Ed.skipWhile=n7});var UA=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.startWith=void 0;var BA=Fu(),i7=It(),o7=G();function a7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i7.popScheduler(e);return o7.operate(function(n,i){(r?BA.concat(e,n,r):BA.concat(e,n)).subscribe(i)})}Ad.startWith=a7});var Bu=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.switchMap=void 0;var u7=oe(),s7=G(),WA=Z();function c7(e,t){return s7.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(WA.createOperatorSubscriber(n,function(l){i?.unsubscribe();var s=0,c=o++;u7.innerFrom(e(l,c)).subscribe(i=WA.createOperatorSubscriber(n,function(d){return n.next(t?t(l,d,c,s++):d)},function(){i=null,u()}))},function(){a=!0,u()}))})}Td.switchMap=c7});var HA=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.switchAll=void 0;var l7=Bu(),f7=at();function d7(){return l7.switchMap(f7.identity)}Pd.switchAll=d7});var GA=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.switchMapTo=void 0;var VA=Bu(),p7=we();function h7(e,t){return p7.isFunction(t)?VA.switchMap(function(){return e},t):VA.switchMap(function(){return e})}Rd.switchMapTo=h7});var $A=b(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.switchScan=void 0;var m7=Bu(),v7=G();function g7(e,t){return v7.operate(function(r,n){var i=t;return m7.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}Md.switchScan=g7});var KA=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.takeUntil=void 0;var b7=G(),_7=Z(),y7=oe(),w7=ot();function x7(e){return b7.operate(function(t,r){y7.innerFrom(e).subscribe(_7.createOperatorSubscriber(r,function(){return r.complete()},w7.noop)),!r.closed&&t.subscribe(r)})}kd.takeUntil=x7});var YA=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.takeWhile=void 0;var S7=G(),O7=Z();function E7(e,t){return t===void 0&&(t=!1),S7.operate(function(r,n){var i=0;r.subscribe(O7.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Cd.takeWhile=E7});var ZA=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.tap=void 0;var A7=we(),T7=G(),P7=Z(),R7=at();function M7(e,t,r){var n=A7.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?T7.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(P7.createOperatorSubscriber(o,function(l){var s;(s=n.next)===null||s===void 0||s.call(n,l),o.next(l)},function(){var l;u=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},function(l){var s;u=!1,(s=n.error)===null||s===void 0||s.call(n,l),o.error(l)},function(){var l,s;u&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(s=n.finalize)===null||s===void 0||s.call(n)}))}):R7.identity}qd.tap=M7});var Yv=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.throttle=void 0;var k7=G(),JA=Z(),C7=oe();function q7(e,t){return k7.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,u=i.trailing,l=u===void 0?!1:u,s=!1,c=null,d=null,f=!1,p=function(){d?.unsubscribe(),d=null,l&&(g(),f&&n.complete())},h=function(){d=null,f&&n.complete()},m=function(_){return d=C7.innerFrom(e(_)).subscribe(JA.createOperatorSubscriber(n,p,h))},g=function(){if(s){s=!1;var _=c;c=null,n.next(_),!f&&m(_)}};r.subscribe(JA.createOperatorSubscriber(n,function(_){s=!0,c=_,!(d&&!d.closed)&&(a?g():m(_))},function(){f=!0,!(l&&s&&d&&!d.closed)&&n.complete()}))})}Id.throttle=q7});var XA=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.throttleTime=void 0;var I7=qt(),j7=Yv(),F7=Dn();function L7(e,t,r){t===void 0&&(t=I7.asyncScheduler);var n=F7.timer(e,t);return j7.throttle(function(){return n},r)}jd.throttleTime=L7});var eT=b(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.TimeInterval=oa.timeInterval=void 0;var N7=qt(),D7=G(),z7=Z();function B7(e){return e===void 0&&(e=N7.asyncScheduler),D7.operate(function(t,r){var n=e.now();t.subscribe(z7.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new QA(i,a))}))})}oa.timeInterval=B7;var QA=function(){function e(t,r){this.value=t,this.interval=r}return e}();oa.TimeInterval=QA});var tT=b(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.timeoutWith=void 0;var U7=qt(),W7=kl(),H7=Cl();function V7(e,t,r){var n,i,o;if(r=r??U7.async,W7.isValidDate(e)?n=e:typeof e=="number"&&(i=e),t)o=function(){return t};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return H7.timeout({first:n,each:i,scheduler:r,with:o})}Fd.timeoutWith=V7});var rT=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.timestamp=void 0;var G7=Kc(),$7=jn();function K7(e){return e===void 0&&(e=G7.dateTimestampProvider),$7.map(function(t){return{value:t,timestamp:e.now()}})}Ld.timestamp=K7});var oT=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.window=void 0;var nT=ut(),Y7=G(),iT=Z(),Z7=ot(),J7=oe();function X7(e){return Y7.operate(function(t,r){var n=new nT.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(iT.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),J7.innerFrom(e).subscribe(iT.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new nT.Subject)},Z7.noop,i)),function(){n?.unsubscribe(),n=null}})}Nd.window=X7});var uT=b(aa=>{"use strict";var Q7=aa&&aa.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(aa,"__esModule",{value:!0});aa.windowCount=void 0;var aT=ut(),eH=G(),tH=Z();function rH(e,t){t===void 0&&(t=0);var r=t>0?t:e;return eH.operate(function(n,i){var o=[new aT.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(tH.createOperatorSubscriber(i,function(l){var s,c;try{for(var d=Q7(o),f=d.next();!f.done;f=d.next()){var p=f.value;p.next(l)}}catch(g){s={error:g}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(s)throw s.error}}var h=u-e+1;if(h>=0&&h%r===0&&o.shift().complete(),++u%r===0){var m=new aT.Subject;o.push(m),i.next(m.asObservable())}},function(){for(;o.length>0;)o.shift().complete();i.complete()},function(l){for(;o.length>0;)o.shift().error(l);i.error(l)},function(){a=null,o=null}))})}aa.windowCount=rH});var cT=b(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.windowTime=void 0;var nH=ut(),iH=qt(),oH=Nt(),aH=G(),uH=Z(),sH=nn(),cH=It(),sT=on();function lH(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=cH.popScheduler(n))!==null&&t!==void 0?t:iH.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return aH.operate(function(l,s){var c=[],d=!1,f=function(g){var _=g.window,w=g.subs;_.complete(),w.unsubscribe(),sH.arrRemove(c,g),d&&p()},p=function(){if(c){var g=new oH.Subscription;s.add(g);var _=new nH.Subject,w={window:_,subs:g,seen:0};c.push(w),s.next(_.asObservable()),sT.executeSchedule(g,o,function(){return f(w)},e)}};a!==null&&a>=0?sT.executeSchedule(s,o,p,a,!0):d=!0,p();var h=function(g){return c.slice().forEach(g)},m=function(g){h(function(_){var w=_.window;return g(w)}),g(s),s.unsubscribe()};return l.subscribe(uH.createOperatorSubscriber(s,function(g){h(function(_){_.window.next(g),u<=++_.seen&&f(_)})},function(){return m(function(g){return g.complete()})},function(g){return m(function(_){return _.error(g)})})),function(){c=null}})}Dd.windowTime=lH});var dT=b(ua=>{"use strict";var fH=ua&&ua.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ua,"__esModule",{value:!0});ua.windowToggle=void 0;var dH=ut(),pH=Nt(),hH=G(),lT=oe(),Zv=Z(),fT=ot(),mH=nn();function vH(e,t){return hH.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};lT.innerFrom(e).subscribe(Zv.createOperatorSubscriber(n,function(a){var u=new dH.Subject;i.push(u);var l=new pH.Subscription,s=function(){mH.arrRemove(i,u),u.complete(),l.unsubscribe()},c;try{c=lT.innerFrom(t(a))}catch(d){o(d);return}n.next(u.asObservable()),l.add(c.subscribe(Zv.createOperatorSubscriber(n,s,fT.noop,o)))},fT.noop)),r.subscribe(Zv.createOperatorSubscriber(n,function(a){var u,l,s=i.slice();try{for(var c=fH(s),d=c.next();!d.done;d=c.next()){var f=d.value;f.next(a)}}catch(p){u={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(u)throw u.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},o,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}ua.windowToggle=vH});var hT=b(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.windowWhen=void 0;var gH=ut(),bH=G(),pT=Z(),_H=oe();function yH(e){return bH.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new gH.Subject,r.next(n.asObservable());var u;try{u=_H.innerFrom(e())}catch(l){o(l);return}u.subscribe(i=pT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(pT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}zd.windowWhen=yH});var bT=b(Zn=>{"use strict";var mT=Zn&&Zn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},vT=Zn&&Zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.withLatestFrom=void 0;var wH=G(),gT=Z(),xH=oe(),SH=at(),OH=ot(),EH=It();function AH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=EH.popResultSelector(e);return wH.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),l=!1,s=function(d){xH.innerFrom(e[d]).subscribe(gT.createOperatorSubscriber(i,function(f){a[d]=f,!l&&!u[d]&&(u[d]=!0,(l=u.every(SH.identity))&&(u=null))},OH.noop))},c=0;c<o;c++)s(c);n.subscribe(gT.createOperatorSubscriber(i,function(d){if(l){var f=vT([d],mT(a));i.next(r?r.apply(void 0,vT([],mT(f))):f)}}))})}Zn.withLatestFrom=AH});var _T=b(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.zipAll=void 0;var TH=cf(),PH=Iv();function RH(e){return PH.joinAllInternals(TH.zip,e)}Bd.zipAll=RH});var yT=b(Jn=>{"use strict";var MH=Jn&&Jn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},kH=Jn&&Jn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.zip=void 0;var CH=cf(),qH=G();function IH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return qH.operate(function(r,n){CH.zip.apply(void 0,kH([r],MH(e))).subscribe(n)})}Jn.zip=IH});var wT=b(Xn=>{"use strict";var jH=Xn&&Xn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},FH=Xn&&Xn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.zipWith=void 0;var LH=yT();function NH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return LH.zip.apply(void 0,FH([],jH(e)))}Xn.zipWith=NH});var PT=b(v=>{"use strict";var DH=v&&v.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),zH=v&&v.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&DH(t,e,r)};Object.defineProperty(v,"__esModule",{value:!0});v.interval=v.iif=v.generate=v.fromEventPattern=v.fromEvent=v.from=v.forkJoin=v.empty=v.defer=v.connectable=v.concat=v.combineLatest=v.bindNodeCallback=v.bindCallback=v.UnsubscriptionError=v.TimeoutError=v.SequenceError=v.ObjectUnsubscribedError=v.NotFoundError=v.EmptyError=v.ArgumentOutOfRangeError=v.firstValueFrom=v.lastValueFrom=v.isObservable=v.identity=v.noop=v.pipe=v.NotificationKind=v.Notification=v.Subscriber=v.Subscription=v.Scheduler=v.VirtualAction=v.VirtualTimeScheduler=v.animationFrameScheduler=v.animationFrame=v.queueScheduler=v.queue=v.asyncScheduler=v.async=v.asapScheduler=v.asap=v.AsyncSubject=v.ReplaySubject=v.BehaviorSubject=v.Subject=v.animationFrames=v.observable=v.ConnectableObservable=v.Observable=void 0;v.filter=v.expand=v.exhaustMap=v.exhaustAll=v.exhaust=v.every=v.endWith=v.elementAt=v.distinctUntilKeyChanged=v.distinctUntilChanged=v.distinct=v.dematerialize=v.delayWhen=v.delay=v.defaultIfEmpty=v.debounceTime=v.debounce=v.count=v.connect=v.concatWith=v.concatMapTo=v.concatMap=v.concatAll=v.combineLatestWith=v.combineLatestAll=v.combineAll=v.catchError=v.bufferWhen=v.bufferToggle=v.bufferTime=v.bufferCount=v.buffer=v.auditTime=v.audit=v.config=v.NEVER=v.EMPTY=v.scheduled=v.zip=v.using=v.timer=v.throwError=v.range=v.race=v.partition=v.pairs=v.onErrorResumeNext=v.of=v.never=v.merge=void 0;v.switchMap=v.switchAll=v.subscribeOn=v.startWith=v.skipWhile=v.skipUntil=v.skipLast=v.skip=v.single=v.shareReplay=v.share=v.sequenceEqual=v.scan=v.sampleTime=v.sample=v.refCount=v.retryWhen=v.retry=v.repeatWhen=v.repeat=v.reduce=v.raceWith=v.publishReplay=v.publishLast=v.publishBehavior=v.publish=v.pluck=v.pairwise=v.onErrorResumeNextWith=v.observeOn=v.multicast=v.min=v.mergeWith=v.mergeScan=v.mergeMapTo=v.mergeMap=v.flatMap=v.mergeAll=v.max=v.materialize=v.mapTo=v.map=v.last=v.isEmpty=v.ignoreElements=v.groupBy=v.first=v.findIndex=v.find=v.finalize=void 0;v.zipWith=v.zipAll=v.withLatestFrom=v.windowWhen=v.windowToggle=v.windowTime=v.windowCount=v.window=v.toArray=v.timestamp=v.timeoutWith=v.timeout=v.timeInterval=v.throwIfEmpty=v.throttleTime=v.throttle=v.tap=v.takeWhile=v.takeUntil=v.takeLast=v.take=v.switchScan=v.switchMapTo=void 0;var BH=Oe();Object.defineProperty(v,"Observable",{enumerable:!0,get:function(){return BH.Observable}});var UH=Ru();Object.defineProperty(v,"ConnectableObservable",{enumerable:!0,get:function(){return UH.ConnectableObservable}});var WH=Tu();Object.defineProperty(v,"observable",{enumerable:!0,get:function(){return WH.observable}});var HH=AS();Object.defineProperty(v,"animationFrames",{enumerable:!0,get:function(){return HH.animationFrames}});var VH=ut();Object.defineProperty(v,"Subject",{enumerable:!0,get:function(){return VH.Subject}});var GH=ev();Object.defineProperty(v,"BehaviorSubject",{enumerable:!0,get:function(){return GH.BehaviorSubject}});var $H=Yc();Object.defineProperty(v,"ReplaySubject",{enumerable:!0,get:function(){return $H.ReplaySubject}});var KH=Zc();Object.defineProperty(v,"AsyncSubject",{enumerable:!0,get:function(){return KH.AsyncSubject}});var xT=WS();Object.defineProperty(v,"asap",{enumerable:!0,get:function(){return xT.asap}});Object.defineProperty(v,"asapScheduler",{enumerable:!0,get:function(){return xT.asapScheduler}});var ST=qt();Object.defineProperty(v,"async",{enumerable:!0,get:function(){return ST.async}});Object.defineProperty(v,"asyncScheduler",{enumerable:!0,get:function(){return ST.asyncScheduler}});var OT=GS();Object.defineProperty(v,"queue",{enumerable:!0,get:function(){return OT.queue}});Object.defineProperty(v,"queueScheduler",{enumerable:!0,get:function(){return OT.queueScheduler}});var ET=ZS();Object.defineProperty(v,"animationFrame",{enumerable:!0,get:function(){return ET.animationFrame}});Object.defineProperty(v,"animationFrameScheduler",{enumerable:!0,get:function(){return ET.animationFrameScheduler}});var AT=QS();Object.defineProperty(v,"VirtualTimeScheduler",{enumerable:!0,get:function(){return AT.VirtualTimeScheduler}});Object.defineProperty(v,"VirtualAction",{enumerable:!0,get:function(){return AT.VirtualAction}});var YH=rv();Object.defineProperty(v,"Scheduler",{enumerable:!0,get:function(){return YH.Scheduler}});var ZH=Nt();Object.defineProperty(v,"Subscription",{enumerable:!0,get:function(){return ZH.Subscription}});var JH=To();Object.defineProperty(v,"Subscriber",{enumerable:!0,get:function(){return JH.Subscriber}});var TT=xl();Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return TT.Notification}});Object.defineProperty(v,"NotificationKind",{enumerable:!0,get:function(){return TT.NotificationKind}});var XH=Pu();Object.defineProperty(v,"pipe",{enumerable:!0,get:function(){return XH.pipe}});var QH=ot();Object.defineProperty(v,"noop",{enumerable:!0,get:function(){return QH.noop}});var eV=at();Object.defineProperty(v,"identity",{enumerable:!0,get:function(){return eV.identity}});var tV=vO();Object.defineProperty(v,"isObservable",{enumerable:!0,get:function(){return tV.isObservable}});var rV=gO();Object.defineProperty(v,"lastValueFrom",{enumerable:!0,get:function(){return rV.lastValueFrom}});var nV=bO();Object.defineProperty(v,"firstValueFrom",{enumerable:!0,get:function(){return nV.firstValueFrom}});var iV=gv();Object.defineProperty(v,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return iV.ArgumentOutOfRangeError}});var oV=In();Object.defineProperty(v,"EmptyError",{enumerable:!0,get:function(){return oV.EmptyError}});var aV=bv();Object.defineProperty(v,"NotFoundError",{enumerable:!0,get:function(){return aV.NotFoundError}});var uV=Zm();Object.defineProperty(v,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return uV.ObjectUnsubscribedError}});var sV=_v();Object.defineProperty(v,"SequenceError",{enumerable:!0,get:function(){return sV.SequenceError}});var cV=Cl();Object.defineProperty(v,"TimeoutError",{enumerable:!0,get:function(){return cV.TimeoutError}});var lV=Lm();Object.defineProperty(v,"UnsubscriptionError",{enumerable:!0,get:function(){return lV.UnsubscriptionError}});var fV=yO();Object.defineProperty(v,"bindCallback",{enumerable:!0,get:function(){return fV.bindCallback}});var dV=wO();Object.defineProperty(v,"bindNodeCallback",{enumerable:!0,get:function(){return dV.bindNodeCallback}});var pV=Nl();Object.defineProperty(v,"combineLatest",{enumerable:!0,get:function(){return pV.combineLatest}});var hV=Fu();Object.defineProperty(v,"concat",{enumerable:!0,get:function(){return hV.concat}});var mV=RO();Object.defineProperty(v,"connectable",{enumerable:!0,get:function(){return mV.connectable}});var vV=Lu();Object.defineProperty(v,"defer",{enumerable:!0,get:function(){return vV.defer}});var gV=_r();Object.defineProperty(v,"empty",{enumerable:!0,get:function(){return gV.empty}});var bV=MO();Object.defineProperty(v,"forkJoin",{enumerable:!0,get:function(){return bV.forkJoin}});var _V=an();Object.defineProperty(v,"from",{enumerable:!0,get:function(){return _V.from}});var yV=CO();Object.defineProperty(v,"fromEvent",{enumerable:!0,get:function(){return yV.fromEvent}});var wV=IO();Object.defineProperty(v,"fromEventPattern",{enumerable:!0,get:function(){return wV.fromEventPattern}});var xV=FO();Object.defineProperty(v,"generate",{enumerable:!0,get:function(){return xV.generate}});var SV=LO();Object.defineProperty(v,"iif",{enumerable:!0,get:function(){return SV.iif}});var OV=Ev();Object.defineProperty(v,"interval",{enumerable:!0,get:function(){return OV.interval}});var EV=DO();Object.defineProperty(v,"merge",{enumerable:!0,get:function(){return EV.merge}});var AV=Av();Object.defineProperty(v,"never",{enumerable:!0,get:function(){return AV.never}});var TV=yl();Object.defineProperty(v,"of",{enumerable:!0,get:function(){return TV.of}});var PV=Tv();Object.defineProperty(v,"onErrorResumeNext",{enumerable:!0,get:function(){return PV.onErrorResumeNext}});var RV=BO();Object.defineProperty(v,"pairs",{enumerable:!0,get:function(){return RV.pairs}});var MV=VO();Object.defineProperty(v,"partition",{enumerable:!0,get:function(){return MV.partition}});var kV=Pv();Object.defineProperty(v,"race",{enumerable:!0,get:function(){return kV.race}});var CV=KO();Object.defineProperty(v,"range",{enumerable:!0,get:function(){return CV.range}});var qV=vv();Object.defineProperty(v,"throwError",{enumerable:!0,get:function(){return qV.throwError}});var IV=Dn();Object.defineProperty(v,"timer",{enumerable:!0,get:function(){return IV.timer}});var jV=YO();Object.defineProperty(v,"using",{enumerable:!0,get:function(){return jV.using}});var FV=cf();Object.defineProperty(v,"zip",{enumerable:!0,get:function(){return FV.zip}});var LV=mv();Object.defineProperty(v,"scheduled",{enumerable:!0,get:function(){return LV.scheduled}});var NV=_r();Object.defineProperty(v,"EMPTY",{enumerable:!0,get:function(){return NV.EMPTY}});var DV=Av();Object.defineProperty(v,"NEVER",{enumerable:!0,get:function(){return DV.NEVER}});zH(JO(),v);var zV=Eo();Object.defineProperty(v,"config",{enumerable:!0,get:function(){return zV.config}});var BV=Rv();Object.defineProperty(v,"audit",{enumerable:!0,get:function(){return BV.audit}});var UV=QO();Object.defineProperty(v,"auditTime",{enumerable:!0,get:function(){return UV.auditTime}});var WV=tE();Object.defineProperty(v,"buffer",{enumerable:!0,get:function(){return WV.buffer}});var HV=rE();Object.defineProperty(v,"bufferCount",{enumerable:!0,get:function(){return HV.bufferCount}});var VV=iE();Object.defineProperty(v,"bufferTime",{enumerable:!0,get:function(){return VV.bufferTime}});var GV=uE();Object.defineProperty(v,"bufferToggle",{enumerable:!0,get:function(){return GV.bufferToggle}});var $V=cE();Object.defineProperty(v,"bufferWhen",{enumerable:!0,get:function(){return $V.bufferWhen}});var KV=fE();Object.defineProperty(v,"catchError",{enumerable:!0,get:function(){return KV.catchError}});var YV=dE();Object.defineProperty(v,"combineAll",{enumerable:!0,get:function(){return YV.combineAll}});var ZV=jv();Object.defineProperty(v,"combineLatestAll",{enumerable:!0,get:function(){return ZV.combineLatestAll}});var JV=gE();Object.defineProperty(v,"combineLatestWith",{enumerable:!0,get:function(){return JV.combineLatestWith}});var XV=Hl();Object.defineProperty(v,"concatAll",{enumerable:!0,get:function(){return XV.concatAll}});var QV=Fv();Object.defineProperty(v,"concatMap",{enumerable:!0,get:function(){return QV.concatMap}});var eG=yE();Object.defineProperty(v,"concatMapTo",{enumerable:!0,get:function(){return eG.concatMapTo}});var tG=xE();Object.defineProperty(v,"concatWith",{enumerable:!0,get:function(){return tG.concatWith}});var rG=Ef();Object.defineProperty(v,"connect",{enumerable:!0,get:function(){return rG.connect}});var nG=OE();Object.defineProperty(v,"count",{enumerable:!0,get:function(){return nG.count}});var iG=AE();Object.defineProperty(v,"debounce",{enumerable:!0,get:function(){return iG.debounce}});var oG=TE();Object.defineProperty(v,"debounceTime",{enumerable:!0,get:function(){return oG.debounceTime}});var aG=Nu();Object.defineProperty(v,"defaultIfEmpty",{enumerable:!0,get:function(){return aG.defaultIfEmpty}});var uG=ME();Object.defineProperty(v,"delay",{enumerable:!0,get:function(){return uG.delay}});var sG=Dv();Object.defineProperty(v,"delayWhen",{enumerable:!0,get:function(){return sG.delayWhen}});var cG=kE();Object.defineProperty(v,"dematerialize",{enumerable:!0,get:function(){return cG.dematerialize}});var lG=qE();Object.defineProperty(v,"distinct",{enumerable:!0,get:function(){return lG.distinct}});var fG=zv();Object.defineProperty(v,"distinctUntilChanged",{enumerable:!0,get:function(){return fG.distinctUntilChanged}});var dG=IE();Object.defineProperty(v,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return dG.distinctUntilKeyChanged}});var pG=FE();Object.defineProperty(v,"elementAt",{enumerable:!0,get:function(){return pG.elementAt}});var hG=LE();Object.defineProperty(v,"endWith",{enumerable:!0,get:function(){return hG.endWith}});var mG=NE();Object.defineProperty(v,"every",{enumerable:!0,get:function(){return mG.every}});var vG=UE();Object.defineProperty(v,"exhaust",{enumerable:!0,get:function(){return vG.exhaust}});var gG=Uv();Object.defineProperty(v,"exhaustAll",{enumerable:!0,get:function(){return gG.exhaustAll}});var bG=Bv();Object.defineProperty(v,"exhaustMap",{enumerable:!0,get:function(){return bG.exhaustMap}});var _G=WE();Object.defineProperty(v,"expand",{enumerable:!0,get:function(){return _G.expand}});var yG=Bi();Object.defineProperty(v,"filter",{enumerable:!0,get:function(){return yG.filter}});var wG=HE();Object.defineProperty(v,"finalize",{enumerable:!0,get:function(){return wG.finalize}});var xG=Wv();Object.defineProperty(v,"find",{enumerable:!0,get:function(){return xG.find}});var SG=GE();Object.defineProperty(v,"findIndex",{enumerable:!0,get:function(){return SG.findIndex}});var OG=$E();Object.defineProperty(v,"first",{enumerable:!0,get:function(){return OG.first}});var EG=YE();Object.defineProperty(v,"groupBy",{enumerable:!0,get:function(){return EG.groupBy}});var AG=Lv();Object.defineProperty(v,"ignoreElements",{enumerable:!0,get:function(){return AG.ignoreElements}});var TG=ZE();Object.defineProperty(v,"isEmpty",{enumerable:!0,get:function(){return TG.isEmpty}});var PG=JE();Object.defineProperty(v,"last",{enumerable:!0,get:function(){return PG.last}});var RG=jn();Object.defineProperty(v,"map",{enumerable:!0,get:function(){return RG.map}});var MG=Nv();Object.defineProperty(v,"mapTo",{enumerable:!0,get:function(){return MG.mapTo}});var kG=XE();Object.defineProperty(v,"materialize",{enumerable:!0,get:function(){return kG.materialize}});var CG=QE();Object.defineProperty(v,"max",{enumerable:!0,get:function(){return CG.max}});var qG=ju();Object.defineProperty(v,"mergeAll",{enumerable:!0,get:function(){return qG.mergeAll}});var IG=eA();Object.defineProperty(v,"flatMap",{enumerable:!0,get:function(){return IG.flatMap}});var jG=sn();Object.defineProperty(v,"mergeMap",{enumerable:!0,get:function(){return jG.mergeMap}});var FG=rA();Object.defineProperty(v,"mergeMapTo",{enumerable:!0,get:function(){return FG.mergeMapTo}});var LG=nA();Object.defineProperty(v,"mergeScan",{enumerable:!0,get:function(){return LG.mergeScan}});var NG=aA();Object.defineProperty(v,"mergeWith",{enumerable:!0,get:function(){return NG.mergeWith}});var DG=uA();Object.defineProperty(v,"min",{enumerable:!0,get:function(){return DG.min}});var zG=od();Object.defineProperty(v,"multicast",{enumerable:!0,get:function(){return zG.multicast}});var BG=qu();Object.defineProperty(v,"observeOn",{enumerable:!0,get:function(){return BG.observeOn}});var UG=lA();Object.defineProperty(v,"onErrorResumeNextWith",{enumerable:!0,get:function(){return UG.onErrorResumeNextWith}});var WG=fA();Object.defineProperty(v,"pairwise",{enumerable:!0,get:function(){return WG.pairwise}});var HG=dA();Object.defineProperty(v,"pluck",{enumerable:!0,get:function(){return HG.pluck}});var VG=pA();Object.defineProperty(v,"publish",{enumerable:!0,get:function(){return VG.publish}});var GG=hA();Object.defineProperty(v,"publishBehavior",{enumerable:!0,get:function(){return GG.publishBehavior}});var $G=mA();Object.defineProperty(v,"publishLast",{enumerable:!0,get:function(){return $G.publishLast}});var KG=gA();Object.defineProperty(v,"publishReplay",{enumerable:!0,get:function(){return KG.publishReplay}});var YG=bA();Object.defineProperty(v,"raceWith",{enumerable:!0,get:function(){return YG.raceWith}});var ZG=ra();Object.defineProperty(v,"reduce",{enumerable:!0,get:function(){return ZG.reduce}});var JG=yA();Object.defineProperty(v,"repeat",{enumerable:!0,get:function(){return JG.repeat}});var XG=xA();Object.defineProperty(v,"repeatWhen",{enumerable:!0,get:function(){return XG.repeatWhen}});var QG=OA();Object.defineProperty(v,"retry",{enumerable:!0,get:function(){return QG.retry}});var e9=AA();Object.defineProperty(v,"retryWhen",{enumerable:!0,get:function(){return e9.retryWhen}});var t9=Km();Object.defineProperty(v,"refCount",{enumerable:!0,get:function(){return t9.refCount}});var r9=Gv();Object.defineProperty(v,"sample",{enumerable:!0,get:function(){return r9.sample}});var n9=PA();Object.defineProperty(v,"sampleTime",{enumerable:!0,get:function(){return n9.sampleTime}});var i9=RA();Object.defineProperty(v,"scan",{enumerable:!0,get:function(){return i9.scan}});var o9=kA();Object.defineProperty(v,"sequenceEqual",{enumerable:!0,get:function(){return o9.sequenceEqual}});var a9=Kv();Object.defineProperty(v,"share",{enumerable:!0,get:function(){return a9.share}});var u9=IA();Object.defineProperty(v,"shareReplay",{enumerable:!0,get:function(){return u9.shareReplay}});var s9=jA();Object.defineProperty(v,"single",{enumerable:!0,get:function(){return s9.single}});var c9=FA();Object.defineProperty(v,"skip",{enumerable:!0,get:function(){return c9.skip}});var l9=LA();Object.defineProperty(v,"skipLast",{enumerable:!0,get:function(){return l9.skipLast}});var f9=DA();Object.defineProperty(v,"skipUntil",{enumerable:!0,get:function(){return f9.skipUntil}});var d9=zA();Object.defineProperty(v,"skipWhile",{enumerable:!0,get:function(){return d9.skipWhile}});var p9=UA();Object.defineProperty(v,"startWith",{enumerable:!0,get:function(){return p9.startWith}});var h9=Iu();Object.defineProperty(v,"subscribeOn",{enumerable:!0,get:function(){return h9.subscribeOn}});var m9=HA();Object.defineProperty(v,"switchAll",{enumerable:!0,get:function(){return m9.switchAll}});var v9=Bu();Object.defineProperty(v,"switchMap",{enumerable:!0,get:function(){return v9.switchMap}});var g9=GA();Object.defineProperty(v,"switchMapTo",{enumerable:!0,get:function(){return g9.switchMapTo}});var b9=$A();Object.defineProperty(v,"switchScan",{enumerable:!0,get:function(){return b9.switchScan}});var _9=Du();Object.defineProperty(v,"take",{enumerable:!0,get:function(){return _9.take}});var y9=Hv();Object.defineProperty(v,"takeLast",{enumerable:!0,get:function(){return y9.takeLast}});var w9=KA();Object.defineProperty(v,"takeUntil",{enumerable:!0,get:function(){return w9.takeUntil}});var x9=YA();Object.defineProperty(v,"takeWhile",{enumerable:!0,get:function(){return x9.takeWhile}});var S9=ZA();Object.defineProperty(v,"tap",{enumerable:!0,get:function(){return S9.tap}});var O9=Yv();Object.defineProperty(v,"throttle",{enumerable:!0,get:function(){return O9.throttle}});var E9=XA();Object.defineProperty(v,"throttleTime",{enumerable:!0,get:function(){return E9.throttleTime}});var A9=zu();Object.defineProperty(v,"throwIfEmpty",{enumerable:!0,get:function(){return A9.throwIfEmpty}});var T9=eT();Object.defineProperty(v,"timeInterval",{enumerable:!0,get:function(){return T9.timeInterval}});var P9=Cl();Object.defineProperty(v,"timeout",{enumerable:!0,get:function(){return P9.timeout}});var R9=tT();Object.defineProperty(v,"timeoutWith",{enumerable:!0,get:function(){return R9.timeoutWith}});var M9=rT();Object.defineProperty(v,"timestamp",{enumerable:!0,get:function(){return M9.timestamp}});var k9=qv();Object.defineProperty(v,"toArray",{enumerable:!0,get:function(){return k9.toArray}});var C9=oT();Object.defineProperty(v,"window",{enumerable:!0,get:function(){return C9.window}});var q9=uT();Object.defineProperty(v,"windowCount",{enumerable:!0,get:function(){return q9.windowCount}});var I9=cT();Object.defineProperty(v,"windowTime",{enumerable:!0,get:function(){return I9.windowTime}});var j9=dT();Object.defineProperty(v,"windowToggle",{enumerable:!0,get:function(){return j9.windowToggle}});var F9=hT();Object.defineProperty(v,"windowWhen",{enumerable:!0,get:function(){return F9.windowWhen}});var L9=bT();Object.defineProperty(v,"withLatestFrom",{enumerable:!0,get:function(){return L9.withLatestFrom}});var N9=_T();Object.defineProperty(v,"zipAll",{enumerable:!0,get:function(){return N9.zipAll}});var D9=wT();Object.defineProperty(v,"zipWith",{enumerable:!0,get:function(){return D9.zipWith}})});var Xv=b(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.checkAbortSignal=MT;Ui.abortBreakPoint=B9;Ui.makeAbortError=kT;Ui.observeAbortSignal=U9;Ui.isAbortException=W9;var RT=PT(),Jv=class extends Error{};function MT(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw kT()}}function z9(e){return new Promise(t=>setTimeout(t,e))}async function B9(e){await z9(1),MT(e)}function kT(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Jv("aborted");return e.code="ERR_ABORTED",e}function U9(e){return e?(0,RT.fromEvent)(e,"abort"):new RT.Observable}function W9(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var CT=b(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});eg.makeAbortableReaction=G9;var H9=Oc(),Uu=vt(),V9=Xv(),Qv=om();function G9(e,t,r,n,i,o,a){let u;function l(s){(0,V9.isAbortException)(s)||(console.error(s),(0,Uu.isAlive)(e)&&a(s))}(0,Uu.addDisposer)(e,(0,H9.reaction)(()=>{try{return t(e)}catch(s){l(s);return}},async(s,c)=>{if(u&&(0,Qv.stopStopToken)(u),!!(0,Uu.isAlive)(e)){u=(0,Qv.createStopToken)(),i(u);try{let d=await r(s,u,e,c);(0,Uu.isAlive)(e)&&o(d)}catch(d){l(d)}}},n)),(0,Uu.addDisposer)(e,()=>{u&&(0,Qv.stopStopToken)(u)})}});var xo=b(L=>{"use strict";var $9=L&&L.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Hi=L&&L.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&$9(t,e,r)},qT=L&&L.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L,"__esModule",{value:!0});L.makeAbortableReaction=L.blobToDataURL=L.isFeature=L.SimpleFeature=L.defaultCodonTable=L.defaultStops=L.defaultStarts=L.rIC=L.complementTable=L.isElectron=void 0;L.useDebounce=Q9;L.useWidthSetter=e$;L.useDebouncedCallback=t$;L.findParentThat=IT;L.springAnimate=r$;L.findParentThatIs=Hu;L.getSession=n$;L.getContainingView=jT;L.getContainingTrack=i$;L.getContainingDisplay=o$;L.assembleLocString=a$;L.assembleLocStringFast=FT;L.parseLocStringOneBased=LT;L.parseLocString=tg;L.compareLocs=NT;L.compareLocStrings=u$;L.clamp=s$;L.bpToPx=rg;L.radToDeg=d$;L.degToRad=p$;L.polarToCartesian=h$;L.cartesianToPolar=m$;L.featureSpanPx=v$;L.bpSpanPx=DT;L.iterMap=g$;L.findLastIndex=b$;L.findLast=_$;L.renameRegionIfNeeded=zT;L.renameRegionsIfNeeded=y$;L.minmax=w$;L.shorten=BT;L.stringify=x$;L.revcom=S$;L.reverse=O$;L.complement=E$;L.measureText=UT;L.getFrame=T$;L.generateCodonTable=P$;L.updateStatus=ng;L.updateStatus2=R$;L.hashCode=WT;L.objectHash=M$;L.bytesForRegions=k$;L.isSupportedIndexingAdapter=C$;L.getBpDisplayStr=q$;L.toLocale=sa;L.getTickDisplayStr=I$;L.getViewParams=j$;L.getLayoutId=F$;L.useLocalStorage=L$;L.getUriLink=HT;L.getStr=VT;L.coarseStripHTML=GT;L.linkify=N$;L.measureGridWidth=D$;L.getEnv=z$;L.localStorageGetItem=og;L.localStorageSetItem=B$;L.max=$T;L.min=U$;L.sum=KT;L.avg=W$;L.groupBy=H$;L.notEmpty=V$;L.mergeIntervals=YT;L.gatherOverlaps=G$;L.stripAlpha=$$;L.getStrokeProps=K$;L.getFillProps=Y$;L.renderToStaticMarkup=Z$;L.isGzip=ZT;L.fetchAndMaybeUnzip=JT;L.fetchAndMaybeUnzipText=J$;L.isObject=XT;L.localStorageGetNumber=X$;L.localStorageGetBoolean=Q$;L.testAdapter=eK;var Wi=Ye(),K9=Jp(),Y9=qT(b1()),yr=vt(),Z9=Xs(),J9=y1(),ig=D1(),X9=om(),Wu=Sc();Hi(Sc(),L);Hi(Dx(),L);Hi(zx(),L);Hi(Bx(),L);Hi(Cm(),L);Hi(Qx(),L);function Q9(e,t){let[r,n]=(0,Wi.useState)(e);return(0,Wi.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function e$(e,t){let[r,{width:n}]=(0,Y9.default)();return(0,Wi.useEffect)(()=>{n&&(0,yr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function t$(e,t=400){let r=(0,Wi.useRef)(null),n=(0,Wi.useRef)(null);return(0,Wi.useEffect)(()=>{n.current&&clearTimeout(n.current)},[]),function(...o){r.current=o,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current&&e(...r.current)},t)}}function IT(e,t){if(!(0,yr.hasParent)(e))throw new Error("node does not have parent");let r=(0,yr.getParent)(e);for(;r&&(0,yr.isAlive)(r);){if(t(r))return r;if((0,yr.hasParent)(r))r=(0,yr.getParent)(r);else break}throw new Error("no matching node found")}function r$(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function c(d){let f=Date.now(),p=d.lastPosition,h=d.lastTime||f,m=d.lastVelocity||0;f>h+64&&(h=f);let g=Math.floor(f-h);for(let O=0;O<g;++O){let A=-o*(p-t),T=-a*m,R=(A+T)/1;m+=R*1/1e3,p+=m*1/1e3}let _=Math.abs(m)<=i,w=o!==0?Math.abs(t-p)<=i:!0;(u&&o!==0?e<t?p>t:p<t:!1)||_&&w?(r(t),n()):(r(p),s=requestAnimationFrame(()=>{c({lastPosition:p,lastTime:f,lastVelocity:m})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Hu(e,t){return IT(e,t)}function n$(e){try{return Hu(e,Wu.isSessionModel)}catch{throw new Error("no session model found!")}}function jT(e){try{return Hu(e,Wu.isViewModel)}catch{throw new Error("no containing view found")}}function i$(e){try{return Hu(e,Wu.isTrackModel)}catch{throw new Error("no containing track found")}}function o$(e){try{return Hu(e,Wu.isDisplayModel)}catch{throw new Error("no containing display found")}}function a$(e){return FT(e,sa)}function FT(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,u=r?`{${r}}`:"",l;i!==void 0?l=`:${t(i+1)}`:o!==void 0?l=":1":l="";let s;o!==void 0?s=i!==void 0&&i+1===o?"":`..${t(o)}`:s=i!==void 0?"..":"";let c="";return a&&(c="[rev]"),`${u}${n}${l}${s}${c}`}function LT(e,t){if(!e)throw new Error("no location string provided, could not parse");let r=!1;e.endsWith("[rev]")&&(r=!0,e=e.replace(/\[rev]$/,"")),e=e.replace(/\s/,"");let n=/({(.+)})?(.+)/.exec(e);if(!n)throw new Error(`invalid location string: "${e}"`);let[,,i,o]=n,a=i,u=o;if(!a&&u.startsWith("{}"))throw new Error(`no assembly name was provided in location "${u}"`);let l=u.lastIndexOf(":");if(l===-1){if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`Unknown reference sequence "${u}"`)}let s=u.slice(0,l),c=u.slice(l+1);if(t(s,a)&&t(u,a))throw new Error(`ambiguous location string: "${e}"`);if(t(s,a))if(c){let d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(c),f=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(d){let[,p,,,,h]=d;if(p!==void 0&&h!==void 0)return{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+h.replaceAll(",",""),reversed:r}}else if(f){let[,p,,,h]=f;if(p!==void 0)return h?{assemblyName:a,refName:s,start:+p.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+p.replaceAll(",",""),reversed:r}}else throw new Error(`could not parse range "${c}" on location "${e}"`)}else return{assemblyName:a,refName:s,reversed:r};else if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`unknown reference sequence name in location "${e}"`)}function tg(e,t){let r=LT(e,t);return typeof r.start=="number"&&(r.start-=1),r}function NT(e,t){let r=e.assemblyName||t.assemblyName?(e.assemblyName||"").localeCompare(t.assemblyName||""):0;if(r)return r;let n=e.refName||t.refName?(e.refName||"").localeCompare(t.refName||""):0;if(n)return n;if(e.start!==void 0&&t.start!==void 0){let i=e.start-t.start;if(i)return i}if(e.end!==void 0&&t.end!==void 0){let i=e.end-t.end;if(i)return i}return 0}function u$(e,t,r){let n=tg(e,r),i=tg(t,r);return NT(n,i)}function s$(e,t,r){return e<t?t:e>r?r:e}function c$(e){return Math.round(e*10)/10}function rg(e,{reversed:t,end:r=0,start:n=0},i){return c$((t?r-e:e-n)/i)}var l$=180/Math.PI,f$=Math.PI/180;function d$(e){return e*l$%360}function p$(e){return e*f$%(2*Math.PI)}function h$(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function m$(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function v$(e,t,r){return DT(e.get("start"),e.get("end"),t,r)}function DT(e,t,r,n){let i=rg(e,r,n),o=rg(t,r,n);return r.reversed?[o,i]:[i,o]}function g$(e,t,r){let n=Array.from({length:r||0}),i=0;for(let o of e)n[i]=t(o),i+=1;return n}function b$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function _$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function zT(e,t){if((0,yr.isStateTreeNode)(t)&&!(0,yr.isAlive)(t))return t;if(e?.[t.refName]){t=(0,yr.isStateTreeNode)(t)?{...(0,yr.getSnapshot)(t)}:{...t};let r=e[t.refName];if(r)return{...t,refName:r,originalRefName:t.refName}}return t}async function y$(e,t){let{regions:r=[],adapterConfig:n}=t;if(!t.sessionId)throw new Error("sessionId is required");let i=r.map(a=>a.assemblyName),o=Object.fromEntries(await Promise.all([...new Set(i)].map(async a=>[a,await e.getRefNameMapForAdapter(n,a,t)])));return{...t,regions:r.map((a,u)=>zT(o[i[u]],a))}}function w$(e,t){return[Math.min(e,t),Math.max(e,t)]}function BT(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function x$({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${BT(e)}:${sa(t)}${n?" (out of bounds)":""}`:""].join("")}L.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");L.complementTable={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"};function S$(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=L.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function O$(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function E$(e){var t;let r="";for(let n=0;n<e.length;n++)r+=(t=L.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}L.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var A$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2796875,.2765625,.3546875,.5546875,.5546875,.8890625,.665625,.190625,.3328125,.3328125,.3890625,.5828125,.2765625,.3328125,.2765625,.3015625,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.2765625,.2765625,.584375,.5828125,.584375,.5546875,1.0140625,.665625,.665625,.721875,.721875,.665625,.609375,.7765625,.721875,.2765625,.5,.665625,.5546875,.8328125,.721875,.7765625,.665625,.7765625,.721875,.665625,.609375,.721875,.665625,.94375,.665625,.665625,.609375,.2765625,.3546875,.2765625,.4765625,.5546875,.3328125,.5546875,.5546875,.5,.5546875,.5546875,.2765625,.5546875,.5546875,.221875,.240625,.5,.221875,.8328125,.5546875,.5546875,.5546875,.5546875,.3328125,.5,.2765625,.5546875,.5,.721875,.5,.5,.5,.3546875,.259375,.353125,.5890625];function UT(e,t=10){var r;let n=.5279276315789471,i=String(e),o=0;for(let a=0;a<i.length;a++){let u=i.charCodeAt(a);o+=(r=A$[u])!==null&&r!==void 0?r:n}return o*t}function T$(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}L.defaultStarts=["ATG"];L.defaultStops=["TAA","TAG","TGA"];L.defaultCodonTable={TCA:"S",TCC:"S",TCG:"S",TCT:"S",TTC:"F",TTT:"F",TTA:"L",TTG:"L",TAC:"Y",TAT:"Y",TAA:"*",TAG:"*",TGC:"C",TGT:"C",TGA:"*",TGG:"W",CTA:"L",CTC:"L",CTG:"L",CTT:"L",CCA:"P",CCC:"P",CCG:"P",CCT:"P",CAC:"H",CAT:"H",CAA:"Q",CAG:"Q",CGA:"R",CGC:"R",CGG:"R",CGT:"R",ATA:"I",ATC:"I",ATT:"I",ATG:"M",ACA:"T",ACC:"T",ACG:"T",ACT:"T",AAC:"N",AAT:"N",AAA:"K",AAG:"K",AGC:"S",AGT:"S",AGA:"R",AGG:"R",GTA:"V",GTC:"V",GTG:"V",GTT:"V",GCA:"A",GCC:"A",GCG:"A",GCT:"A",GAC:"D",GAT:"D",GAA:"E",GAG:"E",GGA:"G",GGC:"G",GGG:"G",GGT:"G"};function P$(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r],i=[];for(let o=0;o<3;o++){let a=r.charAt(o);i[o]=[],i[o][0]=a.toUpperCase(),i[o][1]=a.toLowerCase()}for(let o=0;o<2;o++){let a=i[0][o];for(let u=0;u<2;u++){let l=i[1][u];for(let s=0;s<2;s++){let c=i[2][s],d=a+l+c;t[d]=n}}}}),t}async function ng(e,t,r){t(e);let n=await r();return t(""),n}async function R$(e,t,r,n){t(e);let i=await n();return(0,X9.checkStopToken)(r),t(""),i}function WT(e){let t=0;if(e.length===0)return t;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function M$(e){return`${WT(JSON.stringify(e))}`}async function k$(e,t){return(await Promise.all(e.map(n=>t.blocksForRange(n.refName,n.start,n.end)))).flat().map(n=>({start:n.minv.blockPosition,end:n.maxv.blockPosition+65535})).reduce((n,i)=>n+i.end-i.start,0)}function C$(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function q$(e){return Math.floor(e/1e6)>0?`${Number.parseFloat((e/1e6).toPrecision(3))}Mbp`:Math.floor(e/1e3)>0?`${Number.parseFloat((e/1e3).toPrecision(3))}Kbp`:`${sa(Math.floor(e))}bp`}function sa(e){return e.toLocaleString("en-US")}function I$(e,t){return Math.floor(t/1e3)>0?`${sa(Number.parseFloat((e/1e6).toFixed(2)))}M`:sa(Math.floor(e))}function j$(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=jT(e),o=r?.contentBlocks[0]||{},a=n?.contentBlocks[0]||{},u=n?.contentBlocks[1]||{};return{offsetPx:t?0:i-a.offsetPx,offsetPx1:t?0:i-u.offsetPx,start:o.start,end:o.end}}function F$({sessionId:e,layoutId:t}){return`${e}-${t}`}function L$(e,t){let[r,n]=(0,Wi.useState)(()=>{if(typeof window>"u")return t;try{let o=window.localStorage.getItem(e);return o?JSON.parse(o):t}catch(o){return console.error(o),t}});return[r,o=>{try{let a=o instanceof Function?o(r):o;n(a),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(a))}catch(a){console.error(a)}}]}function HT(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function VT(e){return XT(e)?(0,Wu.isUriLocation)(e)?HT(e):JSON.stringify(e):String(e)}function GT(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function N$(e){let t=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|])/gi;return e.replaceAll(t,`$1<a href='$2' target="_blank">$2</a>`)}function D$(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return $T(e.map(u=>VT(u)).map(u=>a?GT(u):u).map(u=>UT(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function z$(e){return(0,yr.getEnv)(e)}function og(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function B$(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function $T(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function U$(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function KT(e){let t=0;for(let r of e)t+=r;return t}function W$(e){return KT(e)/e.length}function H$(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function V$(e){return e!=null}function YT(e,t=5e3){if(e.length<=1)return e;let r=[],n=null;e=e.sort((i,o)=>i.start-o.start),r.push(e[0]);for(let i=1;i<e.length;i++)n=r.at(-1),n.end+t<e[i].start-t?r.push(e[i]):n.end<e[i].end&&(n.end=Math.max(n.end,e[i].end),r.pop(),r.push(n));return r}function G$(e,t=5e3){let r={};for(let n of e)r[n.refName]||(r[n.refName]=[]),r[n.refName].push(n);return Object.values(r).flatMap(n=>YT(n.sort((i,o)=>i.start-o.start),t))}function $$(e){return(0,ig.colord)(e).alpha(1).toHex()}function K$(e){let t=(0,ig.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}function Y$(e){let t=(0,ig.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}function Z$(e){let t=document.createElement("div");return(0,Z9.flushSync)(()=>{(0,J9.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function ZT(e){return e[0]===31&&e[1]===139&&e[2]===8}async function JT(e,t){let{statusCallback:r=()=>{}}=t||{},n=await ng("Downloading file",r,()=>e.readFile(t));return ZT(n)?await ng("Unzipping",r,()=>(0,K9.unzip)(n)):n}async function J$(e,t){let r=await JT(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function XT(e){return typeof e=="object"&&e!==null}function X$(e,t){var r;return+((r=og(e))!==null&&r!==void 0?r:t)}function Q$(e,t){return!!JSON.parse(og(e)||JSON.stringify(t))}function eK(e,t,r,n){return t.test(e)&&!r||r===n}var QT=tS();Object.defineProperty(L,"SimpleFeature",{enumerable:!0,get:function(){return qT(QT).default}});Object.defineProperty(L,"isFeature",{enumerable:!0,get:function(){return QT.isFeature}});var tK=Im();Object.defineProperty(L,"blobToDataURL",{enumerable:!0,get:function(){return tK.blobToDataURL}});var rK=CT();Object.defineProperty(L,"makeAbortableReaction",{enumerable:!0,get:function(){return rK.makeAbortableReaction}});Hi(Xv(),L)});var nP=b(Vu=>{"use strict";var rP=Vu&&Vu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.default=cK;var nK=Ua(),eP=rP(m1()),iK=rP(g1()),oK=xo(),aK=["a","b","br","code","div","em","h1","h2","h3","h4","h5","h6","i","img","li","p","pre","span","small","strong","table","tbody","sup","sub","td","tfoot","th","thead","tr","u","ul"],tP=!1,uK=new RegExp(aK.map(e=>`<${e}\\b[^>]*>`).join("|"),"i");function sK(e){return uK.test(e)}function cK({html:e,className:t}){let r=(0,oK.linkify)(`${e}`),n=sK(r)?r:(0,iK.default)(r);return tP||(tP=!0,eP.default.addHook("afterSanitizeAttributes",i=>{i.tagName==="A"&&(i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target","_blank"))})),(0,nK.jsx)("span",{className:t,dangerouslySetInnerHTML:{__html:eP.default.sanitize(n)}})}});var Qn=b((hne,iP)=>{iP.exports=JBrowseExports["mobx-react"]});var oP,lK,ag,aP=pt(()=>{"use strict";oP=V(Ye()),lK=e=>{let{color:t="rgb(255,255,255,0.8)"}=e;return oP.default.createElement("rect",{...e,fill:t})},ag=lK});var Vi,uP,fK,sP,cP=pt(()=>{"use strict";Vi=V(Ye()),uP=V(Qn()),fK=(0,uP.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return Vi.default.createElement(Vi.default.Fragment,null,r?[...r.links()].map(i=>{let{source:o,target:a}=i,u=o.x,l=a.x,s=n?a.len:a.y,c=n?o.len:o.y;return Vi.default.createElement(Vi.default.Fragment,{key:[u,l,s,c].join("-")},Vi.default.createElement("line",{stroke:"black",x1:c,y1:u,x2:c,y2:l}),Vi.default.createElement("line",{stroke:"black",x1:c,y1:l,x2:s,y2:l}))}):null)}),sP=fK});var ei,lP,dK,fP,dP=pt(()=>{"use strict";ei=V(Ye()),lP=V(Qn());aP();cP();dK=(0,lP.observer)(function({model:e,labelWidth:t,svgFontSize:r}){let{totalHeight:n,treeWidth:i,samples:o=[],rowHeight:a}=e,u=a>=8,l=Math.min(20,a);return ei.default.createElement(ei.default.Fragment,null,ei.default.createElement(ag,{y:0,x:0,width:t+5+i,height:n}),ei.default.createElement(sP,{model:e}),ei.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,c)=>ei.default.createElement(ag,{key:`${s.id}-${c}`,y:c*a,x:0,width:t+5,height:l,color:s.color})),u?o.map((s,c)=>ei.default.createElement("text",{key:`${s.id}-${c}`,y:c*a+a/2,dominantBaseline:"middle",x:2,fontSize:r},s.label)):null))}),fP=dK});var Ud,pP,hP,pK,mP,vP=pt(()=>{"use strict";Ud=V(Ye()),pP=V(Lt()),hP=V(Qn()),pK=(0,hP.observer)(function({children:e,model:t,exportSVG:r}){if(r)return Ud.default.createElement(Ud.default.Fragment,null,e);{let{totalHeight:n}=t;return Ud.default.createElement("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:n,width:(0,pP.getContainingView)(t).width}},e)}}),mP=pK});function gP(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}var bP=pt(()=>{"use strict"});var ug,_P,yP,hK,Wd,sg=pt(()=>{"use strict";ug=V(Ye()),_P=V(Lt()),yP=V(Qn());dP();vP();bP();hK=(0,yP.observer)(function(e){let{model:t}=e,{rowHeight:r,samples:n}=t,i=Math.min(Math.max(r,8),14),o=r>=8,a=20,u=gP(n?.map(l=>(0,_P.measureText)(l.label,i)).map(l=>o?l:a)||[],0);return ug.default.createElement(mP,{...e},ug.default.createElement(fP,{model:t,labelWidth:u,svgFontSize:i}))}),Wd=hK});var PP=b((Rne,TP)=>{TP.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var WP=b((die,UP)=>{"use strict";UP.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var $u=b((pie,HP)=>{HP.exports=JBrowseExports["@jbrowse/core/ui"]});var ZP={};np(ZP,{renderSvg:()=>qK});async function qK(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,YP.getContainingView)(e),u=`mafclip-${i}`;return Wr.default.createElement(Wr.default.Fragment,null,Wr.default.createElement("defs",null,Wr.default.createElement("clipPath",{id:u},Wr.default.createElement("rect",{x:0,y:0,width:a,height:n}))),Wr.default.createElement("g",{clipPath:`url(#${u})`},Wr.default.createElement("g",{id:"snpcov"},await r(t)),Wr.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},Wr.default.createElement(Wd,{model:e,orientation:"left",exportSVG:!0}))))}var Wr,YP,JP=pt(()=>{"use strict";Wr=V(Ye()),YP=V(Lt());sg()});var gR=b(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.default=LK;var vR=xo();function LK(e,t="",r=5e3){let n=[e];for(;n.length;){let i=n.pop();for(let[o,a]of Object.entries(i)){if(t.length>r)return(0,vR.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return(0,vR.hashCode)(t)}});var bR=b(Yu=>{"use strict";var NK=Yu&&Yu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.adapterConfigCacheKey=zK;var DK=NK(gR());function zK(e={}){return`${(0,DK.default)(e)}`}});var yR=b(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.getAdapter=_R;Zu.freeAdapterResources=UK;Zu.clearAdapterCache=WK;var BK=bR(),Gi={};async function _R(e,t,r){let n=(0,BK.adapterConfigCacheKey)(r);if(!Gi[n]){let o=r?.type;if(!o)throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(r)}`);let a=e.getAdapterType(o);if(!a)throw new Error(`unknown data adapter type ${o}`);let u=a.configSchema.create(r,{pluginManager:e}),l=_R.bind(null,e,t),s=await a.getAdapterClass(),c=new s(u,l,e);Gi[n]={dataAdapter:c,sessionIds:new Set([t])}}let i=Gi[n];return i.sessionIds.add(t),i}function UK(e){let t=0,r=Object.keys(e);if(r.length===1&&r[0]==="sessionId"){let{sessionId:n}=e;Object.entries(Gi).forEach(([i,o])=>{o.sessionIds.delete(n),o.sessionIds.size===0&&(t+=1,delete Gi[i])})}else Object.values(Gi).forEach(n=>{let i=e.regions||(e.region?[e.region]:[]);for(let o of i)o.refName!==void 0&&n.dataAdapter.freeResources(o)});return t}function WK(){Gi={}}});var wR=b(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});var Sg=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};Og.default=Sg});var SR=b(Ag=>{"use strict";Object.defineProperty(Ag,"__esModule",{value:!0});Ag.default=Eg;var xR=e=>typeof e=="object"&&e!==null,HK=e=>xR(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function Eg(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{i.forEach(o=>{t(o),xR(o)&&Eg(o,t,r)})};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),HK(i)&&(Array.isArray(i)?n(i):Eg(i,t,r))}});var ER=b(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.UNSUPPORTED=Le.UNKNOWN=void 0;Le.getTrackAssemblyNames=VK;Le.getConfAssemblyNames=OR;Le.getRpcSessionId=GK;Le.getParentRenderProps=$K;Le.getBlob=KK;Le.getBlobMap=YK;Le.setBlobMap=ZK;Le.storeBlobLocation=XK;Le.makeIndex=QK;Le.makeIndexType=eY;Le.getFileName=tY;Le.guessAdapter=rY;Le.guessTrackType=nY;Le.generateUnsupportedTrackConf=iY;Le.generateUnknownTrackConf=oY;Le.getTrackName=aY;var pa=vt(),Ju=xo(),da=ym();function VK(e){return OR(e.configuration)}function OR(e){let t=(0,da.readConfObject)(e,"assemblyNames");if(!t){let r=(0,pa.getParent)(e);if("sequence"in r)return[(0,da.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function GK(e){let t;for(let r=e;!(0,pa.isRoot)(r);r=(0,pa.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t}function $K(e){for(let t=(0,pa.getParent)(e);!(0,pa.isRoot)(t);t=(0,pa.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}Le.UNKNOWN="UNKNOWN";Le.UNSUPPORTED="UNSUPPORTED";var Zd={};function KK(e){return Zd[e]}function YK(){return Zd}function ZK(e){Zd=e}var JK=0;function XK(e){if("blob"in e){let t=`b${+Date.now()}-${JK++}`;return Zd[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function QK(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function eY(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function tY(e){let t="uri"in e?e.uri:void 0,r="localPath"in e?e.localPath:void 0,n="blobId"in e?e:void 0;return n?.name||t?.slice(t.lastIndexOf("/")+1)||r?.slice(r.replace(/\\/g,"/").lastIndexOf("/")+1)||""}function rY(e,t,r,n){if(n){let{pluginManager:i}=(0,Ju.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,l,s)=>{})(e,t,r);if(a)return a}return{type:Le.UNKNOWN}}function nY(e,t){if(t){let r=(0,Ju.getSession)(t),i=(0,Ju.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function iY(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,Ju.objectHash)(n),n}function oY(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unknown)`,description:`Could not determine track type for "${t}"`,category:r,trackId:""};return n.trackId=(0,Ju.objectHash)(n),n}function aY(e,t){let r=(0,da.readConfObject)(e,"name");if(!r&&(0,da.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,da.readConfObject)(n,"displayName")||(0,da.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var PR=b(Xu=>{"use strict";var TR=Xu&&Xu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xu,"__esModule",{value:!0});var uY=TR(wR()),sY=TR(SR()),AR=ER(),Jd=Sc(),Tg=class extends uY.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,AR.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,Jd.isAppRootModel)(n)||t.internetAccountPreAuthorization)return t;let i=n.findAppropriateInternetAccount(t);return i&&r!=="MainThreadRpcDriver"&&(t.internetAccountPreAuthorization=await i.getPreAuthorizationInformation(t)),t}async deserializeArguments(t,r){return t.blobMap&&(0,AR.setBlobMap)(t.blobMap),t}async serializeReturn(t,r,n){return t}async deserializeReturn(t,r,n){var i;let o;try{o=await t}catch(a){if((0,Jd.isAuthNeededException)(a)){let u=(i=this.pluginManager.rootModel)===null||i===void 0?void 0:i.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(a.url).origin}`,{},a.url);throw new Jd.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,sY.default)(t,i=>{(0,Jd.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};Xu.default=Tg});var RR=b(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});var cY=hm(),Pg=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,cY.stringToJexlExpression)(r),string:r};throw new Error(`invalid inputFilter string "${r}"`)})}passes(...t){for(let r of this.filterChain)if(!r.expr.evalSync({feature:t[0]}))return!1;return!0}toJSON(){return{filters:this.filterChain.map(t=>t.string)}}static fromJSON(t){return new e(t)}};Rg.default=Pg});var kR=b(Qu=>{"use strict";var MR=Qu&&Qu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qu,"__esModule",{value:!0});var lY=MR(PR()),fY=xo(),dY=MR(RR()),Mg=class extends lY.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new dY.default({filters:t.filters}):void 0}}async serializeArguments(t,r){var n,i,o;let u=(i=(n=this.pluginManager.rootModel)===null||n===void 0?void 0:n.session)===null||i===void 0?void 0:i.assemblyManager;if(!u)throw new Error("no assembly manager");let l=await(0,fY.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(l,r)}};Qu.default=Mg});var hY={};np(hY,{default:()=>Qd});var UR=V(Xg());var Qg="1.2.1";var Sy=V(Gr());var gy=V(Jp()),by=V(Os()),Fa=V(Lt()),Ps=V(Es()),_y=V(As());var Ht=null;try{Ht=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Se(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}Se.prototype.__isLong__;Object.defineProperty(Se.prototype,"__isLong__",{value:!0});function ct(e){return(e&&e.__isLong__)===!0}function ny(e){var t=Math.clz32(e&-e);return e?31-t:t}Se.isLong=ct;var iy={},oy={};function hi(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=oy[e],n)?n:(r=he(e,0,!0),i&&(oy[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=iy[e],n)?n:(r=he(e,e<0?-1:0,!1),i&&(iy[e]=r),r))}Se.fromInt=hi;function Vt(e,t){if(isNaN(e))return t?Jr:ar;if(t){if(e<0)return Jr;if(e>=cy)return dy}else{if(e<=-uy)return At;if(e+1>=uy)return fy}return e<0?Vt(-e,t).neg():he(e%oo|0,e/oo|0,t)}Se.fromNumber=Vt;function he(e,t,r){return new Se(e,t,r)}Se.fromBits=he;var Ts=Math.pow;function Qp(e,t,r){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(r=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?Jr:ar;if(r=r||10,r<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return Qp(e.substring(1),t,r).neg();for(var i=Vt(Ts(r,8)),o=ar,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+u),r);if(u<8){var s=Vt(Ts(r,u));o=o.mul(s).add(Vt(l))}else o=o.mul(i),o=o.add(Vt(l))}return o.unsigned=t,o}Se.fromString=Qp;function Gt(e,t){return typeof e=="number"?Vt(e,t):typeof e=="string"?Qp(e,t):he(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Se.fromValue=Gt;var ay=65536,mC=1<<24,oo=ay*ay,cy=oo*oo,uy=cy/2,sy=hi(mC),ar=hi(0);Se.ZERO=ar;var Jr=hi(0,!0);Se.UZERO=Jr;var io=hi(1);Se.ONE=io;var ly=hi(1,!0);Se.UONE=ly;var Xp=hi(-1);Se.NEG_ONE=Xp;var fy=he(-1,2147483647,!1);Se.MAX_VALUE=fy;var dy=he(-1,-1,!0);Se.MAX_UNSIGNED_VALUE=dy;var At=he(0,-2147483648,!1);Se.MIN_VALUE=At;var U=Se.prototype;U.toInt=function(){return this.unsigned?this.low>>>0:this.low};U.toNumber=function(){return this.unsigned?(this.high>>>0)*oo+(this.low>>>0):this.high*oo+(this.low>>>0)};U.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(At)){var r=Vt(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=Vt(Ts(t,6),this.unsigned),a=this,u="";;){var l=a.div(o),s=a.sub(l.mul(o)).toInt()>>>0,c=s.toString(t);if(a=l,a.isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}};U.getHighBits=function(){return this.high};U.getHighBitsUnsigned=function(){return this.high>>>0};U.getLowBits=function(){return this.low};U.getLowBitsUnsigned=function(){return this.low>>>0};U.getNumBitsAbs=function(){if(this.isNegative())return this.eq(At)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return this.high!=0?r+33:r+1};U.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};U.isZero=function(){return this.high===0&&this.low===0};U.eqz=U.isZero;U.isNegative=function(){return!this.unsigned&&this.high<0};U.isPositive=function(){return this.unsigned||this.high>=0};U.isOdd=function(){return(this.low&1)===1};U.isEven=function(){return(this.low&1)===0};U.equals=function(t){return ct(t)||(t=Gt(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};U.eq=U.equals;U.notEquals=function(t){return!this.eq(t)};U.neq=U.notEquals;U.ne=U.notEquals;U.lessThan=function(t){return this.comp(t)<0};U.lt=U.lessThan;U.lessThanOrEqual=function(t){return this.comp(t)<=0};U.lte=U.lessThanOrEqual;U.le=U.lessThanOrEqual;U.greaterThan=function(t){return this.comp(t)>0};U.gt=U.greaterThan;U.greaterThanOrEqual=function(t){return this.comp(t)>=0};U.gte=U.greaterThanOrEqual;U.ge=U.greaterThanOrEqual;U.compare=function(t){if(ct(t)||(t=Gt(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1};U.comp=U.compare;U.negate=function(){return!this.unsigned&&this.eq(At)?At:this.not().add(io)};U.neg=U.negate;U.add=function(t){ct(t)||(t=Gt(t));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,s=t.low&65535,c=0,d=0,f=0,p=0;return p+=o+s,f+=p>>>16,p&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=n+u,c+=d>>>16,d&=65535,c+=r+a,c&=65535,he(f<<16|p,c<<16|d,this.unsigned)};U.subtract=function(t){return ct(t)||(t=Gt(t)),this.add(t.neg())};U.sub=U.subtract;U.multiply=function(t){if(this.isZero())return this;if(ct(t)||(t=Gt(t)),Ht){var r=Ht.mul(this.low,this.high,t.low,t.high);return he(r,Ht.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Jr:ar;if(this.eq(At))return t.isOdd()?At:ar;if(t.eq(At))return this.isOdd()?At:ar;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(sy)&&t.lt(sy))return Vt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,u=t.high>>>16,l=t.high&65535,s=t.low>>>16,c=t.low&65535,d=0,f=0,p=0,h=0;return h+=a*c,p+=h>>>16,h&=65535,p+=o*c,f+=p>>>16,p&=65535,p+=a*s,f+=p>>>16,p&=65535,f+=i*c,d+=f>>>16,f&=65535,f+=o*s,d+=f>>>16,f&=65535,f+=a*l,d+=f>>>16,f&=65535,d+=n*c+i*s+o*l+a*u,d&=65535,he(p<<16|h,d<<16|f,this.unsigned)};U.mul=U.multiply;U.divide=function(t){if(ct(t)||(t=Gt(t)),t.isZero())throw Error("division by zero");if(Ht){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Ht.div_u:Ht.div_s)(this.low,this.high,t.low,t.high);return he(r,Ht.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Jr:ar;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Jr;if(t.gt(this.shru(1)))return ly;o=Jr}else{if(this.eq(At)){if(t.eq(io)||t.eq(Xp))return At;if(t.eq(At))return io;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(ar)?t.isNegative()?io:Xp:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(At))return this.unsigned?Jr:ar;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=ar}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(n)/Math.LN2),l=u<=48?1:Ts(2,u-48),s=Vt(n),c=s.mul(t);c.isNegative()||c.gt(i);)n-=l,s=Vt(n,this.unsigned),c=s.mul(t);s.isZero()&&(s=io),o=o.add(s),i=i.sub(c)}return o};U.div=U.divide;U.modulo=function(t){if(ct(t)||(t=Gt(t)),Ht){var r=(this.unsigned?Ht.rem_u:Ht.rem_s)(this.low,this.high,t.low,t.high);return he(r,Ht.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};U.mod=U.modulo;U.rem=U.modulo;U.not=function(){return he(~this.low,~this.high,this.unsigned)};U.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};U.clz=U.countLeadingZeros;U.countTrailingZeros=function(){return this.low?ny(this.low):ny(this.high)+32};U.ctz=U.countTrailingZeros;U.and=function(t){return ct(t)||(t=Gt(t)),he(this.low&t.low,this.high&t.high,this.unsigned)};U.or=function(t){return ct(t)||(t=Gt(t)),he(this.low|t.low,this.high|t.high,this.unsigned)};U.xor=function(t){return ct(t)||(t=Gt(t)),he(this.low^t.low,this.high^t.high,this.unsigned)};U.shiftLeft=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?he(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):he(0,this.low<<t-32,this.unsigned)};U.shl=U.shiftLeft;U.shiftRight=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?he(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):he(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};U.shr=U.shiftRight;U.shiftRightUnsigned=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?he(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?he(this.high,0,this.unsigned):he(this.high>>>t-32,0,this.unsigned)};U.shru=U.shiftRightUnsigned;U.shr_u=U.shiftRightUnsigned;U.rotateLeft=function(t){var r;return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?he(this.high,this.low,this.unsigned):t<32?(r=32-t,he(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,he(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};U.rotl=U.rotateLeft;U.rotateRight=function(t){var r;return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?he(this.high,this.low,this.unsigned):t<32?(r=32-t,he(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,he(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};U.rotr=U.rotateRight;U.toSigned=function(){return this.unsigned?he(this.low,this.high,!1):this};U.toUnsigned=function(){return this.unsigned?this:he(this.low,this.high,!0)};U.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};U.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};U.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};Se.fromBytes=function(t,r,n){return n?Se.fromBytesLE(t,r):Se.fromBytesBE(t,r)};Se.fromBytesLE=function(t,r){return new Se(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Se.fromBytesBE=function(t,r){return new Se(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};typeof BigInt=="function"&&(Se.fromBigInt=function(t,r){var n=Number(BigInt.asIntN(32,t)),i=Number(BigInt.asIntN(32,t>>BigInt(32)));return he(n,i,r)},Se.fromValue=function(t,r){return typeof t=="bigint"?fromBigInt(t,r):Gt(t,r)},U.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});var py=Se;var ja=class{blockPosition;dataPosition;constructor(t,r){this.blockPosition=t,this.dataPosition=r}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}};function mi(e){let t=[],r={},n=e.split(/\s*(;|\(|\)|,|:)\s*/);for(let i=0;i<n.length;i++){let o=n[i],a={};switch(o){case"(":r.children=[a],t.push(r),r=a;break;case",":t.at(-1)?.children.push(a),r=a;break;case")":r=t.pop();break;case":":break;default:{let u=n[i-1];u===")"||u==="("||u===","?r.name=o:u===":"&&(r.length=Number.parseFloat(o))}}}return r}function vC(e){return typeof e[0]=="string"}function bn(e){return vC(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function hy(e){let t=e.split(" "),r=[];for(let n=0;n<t.length;){let i=t[n++];if(i==="i"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}if(i==="s"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}else i==="d"?r.push({type:i,row:+t[n++]}):i==="g"?r.push({type:i,row:+t[n++],gapLen:+t[n++]}):i==="G"&&r.push({type:i,row:+t[n++],gapSubstring:t[n++]})}return r}function my(e,t){let r=0,n=[],i=new TextDecoder("utf8");for(;r<e.length;){let o=e.indexOf(10,r);if(o===-1)break;let a=e.subarray(r,o),u=i.decode(a).trim();if(u){let l=t(u);l&&n.push(l)}r=o+1}return n}var vy=(e=0)=>+(+e).toFixed(1),La=class extends by.BaseFeatureDataAdapter{setupP;async getRefNames(){let t=await this.setup();return Object.keys(t)}setupPre(){return this.setupP||(this.setupP=this.readTaiFile().catch(t=>{throw this.setupP=void 0,t})),this.setupP}setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,Fa.updateStatus)("Downloading index",r,()=>this.setupPre())}async readTaiFile(){let r=(await(0,Ps.openLocation)(this.getConf("taiLocation")).readFile("utf8")).split(`
6
- `).map(u=>u.trim()).filter(u=>!!u),n={},i="",o=0,a=0;for(let u of r){let[l,s,c]=u.split(" "),d=a+ +c,f=l==="*"?i:l.split(".").at(-1),p=py.fromNumber(d),h=p.shiftRightUnsigned(16),m=p.and(65535),g=new ja(h.toNumber(),m.toNumber());n[f]||(n[f]=[],i="",o=0,a=0);let _=+s+o;n[f].push({chrStart:_,virtualOffset:g}),i=f,o=_,a=d}return n}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,_y.ObservableCreate)(async i=>{try{let o=await this.setup(),a=await(0,Fa.updateStatus)("Downloading alignments",n,()=>this.getLines(t,o));if(a){let u={},l=[],s,c=0,d=0;if(my(a,f=>{if(c++%100===0&&n(`Processing ${vy(d/1e6)}/${vy(a.length/1e6)}Mb`),d+=f.length,f){let[p,h]=f.split(" ; ");if(h){for(let g of hy(h))if(g.type==="i"){l.splice(g.row,0,g),u[g.asm]||(u[g.asm]={start:g.start,strand:g.strand,srcSize:g.length,chr:g.ref,data:""});let _=u[g.asm];_.data+=" ".repeat(Math.max(0,c-_.data.length))}else if(g.type==="s"){u[g.asm]||(u[g.asm]={start:g.start,strand:g.strand,srcSize:g.length,chr:g.ref,data:""});let _=u[g.asm];_.data+=" ".repeat(Math.max(0,c-_.data.length)),l[g.row]=g}else g.type==="d"&&l.splice(g.row,1);s||(s=l[0])}let m=p.length;for(let g=0;g<m;g++){let _=p[g],w=l[g];w&&(u[w.asm].data+=_)}}}),s){let f=u[s.asm];i.next(new Fa.SimpleFeature({uniqueId:`${f.start}-${f.data.length}`,refName:t.refName,start:f.start,end:f.start+f.data.length,strand:f.strand,alignments:u,seq:f.data}))}}n(""),i.complete()}catch(o){i.error(o)}})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Ps.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?mi(n):void 0}}async getLines(t,r){let n=(0,Ps.openLocation)(this.getConf("tafGzLocation")),i=r[t.refName];if(i){let o,a;for(let u=0;u<i.length;u++)if(i[u].chrStart>=t.start){o=i[Math.max(u-1,0)];break}for(let u=0;u<i.length;u++)if(t.end<=i[u].chrStart){a=i[u+1];break}if(a=a??i.at(-1),o&&a){let u=await n.read(a.virtualOffset.blockPosition-o.virtualOffset.blockPosition,o.virtualOffset.blockPosition);return(await(0,gy.unzip)(u)).slice(o.virtualOffset.dataPosition)}}}freeResources(){}};var wy=V(_n());var gC=(0,wy.ConfigurationSchema)("BgzipTaffyAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},tafGzLocation:{type:"fileLocation",description:"bgzip taffy file",defaultValue:{uri:"/path/to/my.taf",locationType:"UriLocation"}},taiLocation:{type:"fileLocation",description:"taffy index",defaultValue:{uri:"/path/to/my.taf.gz.tai",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),xy=gC;function eh(e){return e.addAdapterType(()=>new Sy.AdapterType({name:"BgzipTaffyAdapter",AdapterClass:La,configSchema:xy}))}var Uy=V(Gr());var Fy=V(Os()),Is=V(Lt()),Ly=V(Es()),Ny=V(As()),Dy=V(vt());var th=function(e,t){return th=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},th(e,t)};function Na(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");th(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function rh(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ao(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function uo(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Mr(e){return typeof e=="function"}function Rs(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Ms=Rs(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
5
+ `):"",this.name="UnsubscriptionError",this.errors=r}})});var nn=b(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.arrRemove=void 0;function kF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}jc.arrRemove=kF});var Nt=b(kt=>{"use strict";var rS=kt&&kt.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},nS=kt&&kt.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},iS=kt&&kt.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(kt,"__esModule",{value:!0});kt.isSubscription=kt.EMPTY_SUBSCRIPTION=kt.Subscription=void 0;var Au=we(),Nm=Lm(),oS=nn(),Dm=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=rS(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Au.isFunction(c))try{c()}catch(m){o=m instanceof Nm.UnsubscriptionError?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=rS(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{aS(h)}catch(m){o=o??[],m instanceof Nm.UnsubscriptionError?o=iS(iS([],nS(o)),nS(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(o)throw new Nm.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)aS(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)&&oS.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&oS.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();kt.Subscription=Dm;kt.EMPTY_SUBSCRIPTION=Dm.EMPTY;function qF(e){return e instanceof Dm||e&&"closed"in e&&Au.isFunction(e.remove)&&Au.isFunction(e.add)&&Au.isFunction(e.unsubscribe)}kt.isSubscription=qF;function aS(e){Au.isFunction(e)?e():e.unsubscribe()}});var Eo=b(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.config=void 0;Fc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var zm=b(Lr=>{"use strict";var uS=Lr&&Lr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},sS=Lr&&Lr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.timeoutProvider=void 0;Lr.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Lr.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,sS([e,t],uS(r))):setTimeout.apply(void 0,sS([e,t],uS(r)))},clearTimeout:function(e){var t=Lr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var Bm=b(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.reportUnhandledError=void 0;var IF=Eo(),jF=zm();function FF(e){jF.timeoutProvider.setTimeout(function(){var t=IF.config.onUnhandledError;if(t)t(e);else throw e})}Lc.reportUnhandledError=FF});var ot=b(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.noop=void 0;function LF(){}Nc.noop=LF});var cS=b(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.createNotification=Nr.nextNotification=Nr.errorNotification=Nr.COMPLETE_NOTIFICATION=void 0;Nr.COMPLETE_NOTIFICATION=function(){return Dc("C",void 0,void 0)}();function NF(e){return Dc("E",void 0,e)}Nr.errorNotification=NF;function DF(e){return Dc("N",e,void 0)}Nr.nextNotification=DF;function Dc(e,t,r){return{kind:e,value:t,error:r}}Nr.createNotification=Dc});var zc=b(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.captureError=Ao.errorContext=void 0;var lS=Eo(),Ci=null;function zF(e){if(lS.config.useDeprecatedSynchronousErrorHandling){var t=!Ci;if(t&&(Ci={errorThrown:!1,error:null}),e(),t){var r=Ci,n=r.errorThrown,i=r.error;if(Ci=null,n)throw i}}else e()}Ao.errorContext=zF;function BF(e){lS.config.useDeprecatedSynchronousErrorHandling&&Ci&&(Ci.errorThrown=!0,Ci.error=e)}Ao.captureError=BF});var To=b(gr=>{"use strict";var pS=gr&&gr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(gr,"__esModule",{value:!0});gr.EMPTY_OBSERVER=gr.SafeSubscriber=gr.Subscriber=void 0;var UF=we(),fS=Nt(),Vm=Eo(),WF=Bm(),dS=ot(),Um=cS(),HF=zm(),VF=zc(),hS=function(e){pS(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,fS.isSubscription(r)&&r.add(n)):n.destination=gr.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new mS(r,n,i)},t.prototype.next=function(r){this.isStopped?Hm(Um.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Hm(Um.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Hm(Um.COMPLETE_NOTIFICATION,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}(fS.Subscription);gr.Subscriber=hS;var GF=Function.prototype.bind;function Wm(e,t){return GF.call(e,t)}var $F=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(n){Bc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Bc(n)}else Bc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Bc(r)}},e}(),mS=function(e){pS(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(UF.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&Vm.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Wm(r.next,u),error:r.error&&Wm(r.error,u),complete:r.complete&&Wm(r.complete,u)}):a=r}return o.destination=new $F(a),o}return t}(hS);gr.SafeSubscriber=mS;function Bc(e){Vm.config.useDeprecatedSynchronousErrorHandling?VF.captureError(e):WF.reportUnhandledError(e)}function KF(e){throw e}function Hm(e,t){var r=Vm.config.onStoppedNotification;r&&HF.timeoutProvider.setTimeout(function(){return r(e,t)})}gr.EMPTY_OBSERVER={closed:!0,next:dS.noop,error:KF,complete:dS.noop}});var Tu=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.observable=void 0;Uc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var at=b(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.identity=void 0;function YF(e){return e}Wc.identity=YF});var Pu=b(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.pipeFromArray=Po.pipe=void 0;var ZF=at();function JF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return vS(e)}Po.pipe=JF;function vS(e){return e.length===0?ZF.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Po.pipeFromArray=vS});var Oe=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.Observable=void 0;var $m=To(),XF=Nt(),QF=Tu(),eL=Pu(),tL=Eo(),Gm=we(),rL=zc(),nL=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,n){var i=this,o=oL(t)?t:new $m.SafeSubscriber(t,r,n);return rL.errorContext(function(){var a=i,u=a.operator,l=a.source;o.add(u?u.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=gS(r),new r(function(i,o){var a=new $m.SafeSubscriber({next:function(u){try{t(u)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[QF.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return eL.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=gS(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();Hc.Observable=nL;function gS(e){var t;return(t=e??tL.config.Promise)!==null&&t!==void 0?t:Promise}function iL(e){return e&&Gm.isFunction(e.next)&&Gm.isFunction(e.error)&&Gm.isFunction(e.complete)}function oL(e){return e&&e instanceof $m.Subscriber||iL(e)&&XF.isSubscription(e)}});var G=b(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.operate=Ro.hasLift=void 0;var aL=we();function bS(e){return aL.isFunction(e?.lift)}Ro.hasLift=bS;function uL(e){return function(t){if(bS(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}Ro.operate=uL});var Z=b(Cn=>{"use strict";var sL=Cn&&Cn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.OperatorSubscriber=Cn.createOperatorSubscriber=void 0;var cL=To();function lL(e,t,r,n,i){return new _S(e,t,r,n,i)}Cn.createOperatorSubscriber=lL;var _S=function(e){sL(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(cL.Subscriber);Cn.OperatorSubscriber=_S});var Km=b(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.refCount=void 0;var fL=G(),dL=Z();function pL(){return fL.operate(function(e,t){var r=null;e._refCount++;var n=dL.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var i=e._connection,o=r;r=null,i&&(!o||i===o)&&i.unsubscribe(),t.unsubscribe()});e.subscribe(n),n.closed||(r=e.connect())})}Vc.refCount=pL});var Ru=b(Mo=>{"use strict";var hL=Mo&&Mo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Mo,"__esModule",{value:!0});Mo.ConnectableObservable=void 0;var mL=Oe(),yS=Nt(),vL=Km(),gL=Z(),bL=G(),_L=function(e){hL(t,e);function t(r,n){var i=e.call(this)||this;return i.source=r,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,bL.hasLift(r)&&(i.lift=r.lift),i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new yS.Subscription;var i=this.getSubject();n.add(this.source.subscribe(gL.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete()},function(o){r._teardown(),i.error(o)},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=yS.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return vL.refCount()(this)},t}(mL.Observable);Mo.ConnectableObservable=_L});var wS=b(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.performanceTimestampProvider=void 0;Mu.performanceTimestampProvider={now:function(){return(Mu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Ym=b(br=>{"use strict";var xS=br&&br.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},SS=br&&br.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(br,"__esModule",{value:!0});br.animationFrameProvider=void 0;var yL=Nt();br.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=br.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new yL.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=br.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,SS([],xS(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=br.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,SS([],xS(e)))},delegate:void 0}});var AS=b(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.animationFrames=void 0;var wL=Oe(),xL=wS(),OS=Ym();function SL(e){return e?ES(e):OL}Gc.animationFrames=SL;function ES(e){return new wL.Observable(function(t){var r=e||xL.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=OS.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&OS.animationFrameProvider.cancelAnimationFrame(i)}})}var OL=ES()});var Zm=b($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.ObjectUnsubscribedError=void 0;var EL=Mn();$c.ObjectUnsubscribedError=EL.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var ut=b(Dr=>{"use strict";var PS=Dr&&Dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),AL=Dr&&Dr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AnonymousSubject=Dr.Subject=void 0;var TS=Oe(),Xm=Nt(),TL=Zm(),PL=nn(),Jm=zc(),RS=function(e){PS(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 n=new Qm(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new TL.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Jm.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=AL(n.currentObservers),u=a.next();!u.done;u=a.next()){var l=u.value;l.next(r)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Jm.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;Jm.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.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 n=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?Xm.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new Xm.Subscription(function(){n.currentObservers=null,PL.arrRemove(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new TS.Observable;return r.source=this,r},t.create=function(r,n){return new Qm(r,n)},t}(TS.Observable);Dr.Subject=RS;var Qm=function(e){PS(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Xm.EMPTY_SUBSCRIPTION},t}(RS);Dr.AnonymousSubject=Qm});var ev=b(Co=>{"use strict";var RL=Co&&Co.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Co,"__esModule",{value:!0});Co.BehaviorSubject=void 0;var ML=ut(),CL=function(e){RL(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(ML.Subject);Co.BehaviorSubject=CL});var Kc=b(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.dateTimestampProvider=void 0;Cu.dateTimestampProvider={now:function(){return(Cu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Yc=b(ko=>{"use strict";var kL=ko&&ko.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ko,"__esModule",{value:!0});ko.ReplaySubject=void 0;var qL=ut(),IL=Kc(),jL=function(e){kL(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=IL.dateTimestampProvider);var o=e.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return t.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,u=n._timestampProvider,l=n._windowTime;i||(o.push(r),!a&&o.push(u.now()+l)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,u=a.slice(),l=0;l<u.length&&!r.closed;l+=o?1:2)r.next(u[l]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,u=(a?1:2)*n;if(n<1/0&&u<o.length&&o.splice(0,o.length-u),!a){for(var l=i.now(),s=0,c=1;c<o.length&&o[c]<=l;c+=2)s=c;s&&o.splice(0,s+1)}},t}(qL.Subject);ko.ReplaySubject=jL});var Zc=b(qo=>{"use strict";var FL=qo&&qo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qo,"__esModule",{value:!0});qo.AsyncSubject=void 0;var LL=ut(),NL=function(e){FL(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n._hasValue,a=n._value,u=n.thrownError,l=n.isStopped,s=n._isComplete;i?r.error(u):(l||s)&&(o&&r.next(a),r.complete())},t.prototype.next=function(r){this.isStopped||(this._value=r,this._hasValue=!0)},t.prototype.complete=function(){var r=this,n=r._hasValue,i=r._value,o=r._isComplete;o||(this._isComplete=!0,n&&e.prototype.next.call(this,i),e.prototype.complete.call(this))},t}(LL.Subject);qo.AsyncSubject=NL});var MS=b(Io=>{"use strict";var DL=Io&&Io.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Io,"__esModule",{value:!0});Io.Action=void 0;var zL=Nt(),BL=function(e){DL(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(zL.Subscription);Io.Action=BL});var qS=b(zr=>{"use strict";var CS=zr&&zr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},kS=zr&&zr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(zr,"__esModule",{value:!0});zr.intervalProvider=void 0;zr.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=zr.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,kS([e,t],CS(r))):setInterval.apply(void 0,kS([e,t],CS(r)))},clearInterval:function(e){var t=zr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Fo=b(jo=>{"use strict";var UL=jo&&jo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(jo,"__esModule",{value:!0});jo.AsyncAction=void 0;var WL=MS(),IS=qS(),HL=nn(),VL=function(e){UL(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),IS.intervalProvider.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&IS.intervalProvider.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var i=!1,o;try{this.work(r)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,HL.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(WL.Action);jo.AsyncAction=VL});var FS=b(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.TestTools=Lo.Immediate=void 0;var GL=1,tv,Jc={};function jS(e){return e in Jc?(delete Jc[e],!0):!1}Lo.Immediate={setImmediate:function(e){var t=GL++;return Jc[t]=!0,tv||(tv=Promise.resolve()),tv.then(function(){return jS(t)&&e()}),t},clearImmediate:function(e){jS(e)}};Lo.TestTools={pending:function(){return Object.keys(Jc).length}}});var NS=b(Br=>{"use strict";var $L=Br&&Br.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},KL=Br&&Br.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Br,"__esModule",{value:!0});Br.immediateProvider=void 0;var LS=FS(),YL=LS.Immediate.setImmediate,ZL=LS.Immediate.clearImmediate;Br.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Br.immediateProvider.delegate;return(r?.setImmediate||YL).apply(void 0,KL([],$L(e)))},clearImmediate:function(e){var t=Br.immediateProvider.delegate;return(t?.clearImmediate||ZL)(e)},delegate:void 0}});var zS=b(No=>{"use strict";var JL=No&&No.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(No,"__esModule",{value:!0});No.AsapAction=void 0;var XL=Fo(),DS=NS(),QL=function(e){JL(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=DS.immediateProvider.setImmediate(r.flush.bind(r,void 0))))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&(DS.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(XL.AsyncAction);No.AsapAction=QL});var rv=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.Scheduler=void 0;var eN=Kc(),tN=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=eN.dateTimestampProvider.now,e}();Xc.Scheduler=tN});var zo=b(Do=>{"use strict";var rN=Do&&Do.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Do,"__esModule",{value:!0});Do.AsyncScheduler=void 0;var BS=rv(),nN=function(e){rN(t,e);function t(r,n){n===void 0&&(n=BS.Scheduler.now);var i=e.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},t}(BS.Scheduler);Do.AsyncScheduler=nN});var US=b(Bo=>{"use strict";var iN=Bo&&Bo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.AsapScheduler=void 0;var oN=zo(),aN=function(e){iN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(oN.AsyncScheduler);Bo.AsapScheduler=aN});var WS=b(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.asap=ki.asapScheduler=void 0;var uN=zS(),sN=US();ki.asapScheduler=new sN.AsapScheduler(uN.AsapAction);ki.asap=ki.asapScheduler});var qt=b(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.async=qi.asyncScheduler=void 0;var cN=Fo(),lN=zo();qi.asyncScheduler=new lN.AsyncScheduler(cN.AsyncAction);qi.async=qi.asyncScheduler});var HS=b(Uo=>{"use strict";var fN=Uo&&Uo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.QueueAction=void 0;var dN=Fo(),pN=function(e){fN(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.flush(this),0)},t}(dN.AsyncAction);Uo.QueueAction=pN});var VS=b(Wo=>{"use strict";var hN=Wo&&Wo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.QueueScheduler=void 0;var mN=zo(),vN=function(e){hN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(mN.AsyncScheduler);Wo.QueueScheduler=vN});var GS=b(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.queue=Ii.queueScheduler=void 0;var gN=HS(),bN=VS();Ii.queueScheduler=new bN.QueueScheduler(gN.QueueAction);Ii.queue=Ii.queueScheduler});var KS=b(Ho=>{"use strict";var _N=Ho&&Ho.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.AnimationFrameAction=void 0;var yN=Fo(),$S=Ym(),wN=function(e){_N(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=$S.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&($S.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(yN.AsyncAction);Ho.AnimationFrameAction=wN});var YS=b(Vo=>{"use strict";var xN=Vo&&Vo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Vo,"__esModule",{value:!0});Vo.AnimationFrameScheduler=void 0;var SN=zo(),ON=function(e){xN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(SN.AsyncScheduler);Vo.AnimationFrameScheduler=ON});var ZS=b(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.animationFrame=ji.animationFrameScheduler=void 0;var EN=KS(),AN=YS();ji.animationFrameScheduler=new AN.AnimationFrameScheduler(EN.AnimationFrameAction);ji.animationFrame=ji.animationFrameScheduler});var QS=b(kn=>{"use strict";var JS=kn&&kn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(kn,"__esModule",{value:!0});kn.VirtualAction=kn.VirtualTimeScheduler=void 0;var TN=Fo(),PN=Nt(),RN=zo(),MN=function(e){JS(t,e);function t(r,n){r===void 0&&(r=XS),n===void 0&&(n=1/0);var i=e.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return t.prototype.flush=function(){for(var r=this,n=r.actions,i=r.maxFrames,o,a;(a=n[0])&&a.delay<=i&&(n.shift(),this.frame=a.delay,!(o=a.execute(a.state,a.delay))););if(o){for(;a=n.shift();)a.unsubscribe();throw o}},t.frameTimeFactor=10,t}(RN.AsyncScheduler);kn.VirtualTimeScheduler=MN;var XS=function(e){JS(t,e);function t(r,n,i){i===void 0&&(i=r.index+=1);var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o.index=i,o.active=!0,o.index=r.index=i,o}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}else return PN.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,i){i===void 0&&(i=0),this.delay=r.frame+i;var o=r.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,i){i===void 0&&(i=0)},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(TN.AsyncAction);kn.VirtualAction=XS});var _r=b(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.empty=Fi.EMPTY=void 0;var eO=Oe();Fi.EMPTY=new eO.Observable(function(e){return e.complete()});function CN(e){return e?kN(e):Fi.EMPTY}Fi.empty=CN;function kN(e){return new eO.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var ku=b(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.isScheduler=void 0;var qN=we();function IN(e){return e&&qN.isFunction(e.schedule)}Qc.isScheduler=IN});var It=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.popNumber=qn.popScheduler=qn.popResultSelector=void 0;var jN=we(),FN=ku();function nv(e){return e[e.length-1]}function LN(e){return jN.isFunction(nv(e))?e.pop():void 0}qn.popResultSelector=LN;function NN(e){return FN.isScheduler(nv(e))?e.pop():void 0}qn.popScheduler=NN;function DN(e,t){return typeof nv(e)=="number"?e.pop():t}qn.popNumber=DN});var tl=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.isArrayLike=void 0;el.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var iv=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.isPromise=void 0;var zN=we();function BN(e){return zN.isFunction(e?.then)}rl.isPromise=BN});var ov=b(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.isInteropObservable=void 0;var UN=Tu(),WN=we();function HN(e){return WN.isFunction(e[UN.observable])}nl.isInteropObservable=HN});var av=b(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.isAsyncIterable=void 0;var VN=we();function GN(e){return Symbol.asyncIterator&&VN.isFunction(e?.[Symbol.asyncIterator])}il.isAsyncIterable=GN});var uv=b(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.createInvalidObservableTypeError=void 0;function $N(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.")}ol.createInvalidObservableTypeError=$N});var sv=b(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.iterator=Go.getSymbolIterator=void 0;function tO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Go.getSymbolIterator=tO;Go.iterator=tO()});var cv=b(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.isIterable=void 0;var KN=sv(),YN=we();function ZN(e){return YN.isFunction(e?.[KN.iterator])}al.isIterable=ZN});var ul=b(Xt=>{"use strict";var JN=Xt&&Xt.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},$o=Xt&&Xt.__await||function(e){return this instanceof $o?(this.v=e,this):new $o(e)},XN=Xt&&Xt.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(f){n[f]&&(i[f]=function(p){return new Promise(function(h,m){o.push([f,p,h,m])>1||u(f,p)})})}function u(f,p){try{l(n[f](p))}catch(h){d(o[0][3],h)}}function l(f){f.value instanceof $o?Promise.resolve(f.value.v).then(s,c):d(o[0][2],f)}function s(f){u("next",f)}function c(f){u("throw",f)}function d(f,p){f(p),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.isReadableStreamLike=Xt.readableStreamLikeToAsyncGenerator=void 0;var QN=we();function eD(e){return XN(this,arguments,function(){var r,n,i,o;return JN(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,$o(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,$o(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,$o(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Xt.readableStreamLikeToAsyncGenerator=eD;function tD(e){return QN.isFunction(e?.getReader)}Xt.isReadableStreamLike=tD});var oe=b(ke=>{"use strict";var rD=ke&&ke.__awaiter||function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(c){try{s(n.next(c))}catch(d){a(d)}}function l(c){try{s(n.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((n=n.apply(e,t||[])).next())})},nD=ke&&ke.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},iD=ke&&ke.__asyncValues||function(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 lv=="function"?lv(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,l){a=e[o](a),i(u,l,a.done,a.value)})}}function i(o,a,u,l){Promise.resolve(l).then(function(s){o({value:s,done:u})},a)}},lv=ke&&ke.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ke,"__esModule",{value:!0});ke.fromReadableStreamLike=ke.fromAsyncIterable=ke.fromIterable=ke.fromPromise=ke.fromArrayLike=ke.fromInteropObservable=ke.innerFrom=void 0;var oD=tl(),aD=iv(),Ko=Oe(),uD=ov(),sD=av(),cD=uv(),lD=cv(),rO=ul(),fD=we(),dD=Bm(),pD=Tu();function hD(e){if(e instanceof Ko.Observable)return e;if(e!=null){if(uD.isInteropObservable(e))return nO(e);if(oD.isArrayLike(e))return iO(e);if(aD.isPromise(e))return oO(e);if(sD.isAsyncIterable(e))return fv(e);if(lD.isIterable(e))return aO(e);if(rO.isReadableStreamLike(e))return uO(e)}throw cD.createInvalidObservableTypeError(e)}ke.innerFrom=hD;function nO(e){return new Ko.Observable(function(t){var r=e[pD.observable]();if(fD.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}ke.fromInteropObservable=nO;function iO(e){return new Ko.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}ke.fromArrayLike=iO;function oO(e){return new Ko.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,dD.reportUnhandledError)})}ke.fromPromise=oO;function aO(e){return new Ko.Observable(function(t){var r,n;try{for(var i=lv(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()})}ke.fromIterable=aO;function fv(e){return new Ko.Observable(function(t){mD(e,t).catch(function(r){return t.error(r)})})}ke.fromAsyncIterable=fv;function uO(e){return fv(rO.readableStreamLikeToAsyncGenerator(e))}ke.fromReadableStreamLike=uO;function mD(e,t){var r,n,i,o;return rD(this,void 0,void 0,function(){var a,u;return nD(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=iD(e),l.label=1;case 1:return[4,r.next()];case 2:if(n=l.sent(),!!n.done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=l.sent(),i={error:u},[3,11];case 6:return l.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:l.sent(),l.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]}})})}});var on=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.executeSchedule=void 0;function vD(e,t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}sl.executeSchedule=vD});var qu=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.observeOn=void 0;var dv=on(),gD=G(),bD=Z();function _D(e,t){return t===void 0&&(t=0),gD.operate(function(r,n){r.subscribe(bD.createOperatorSubscriber(n,function(i){return dv.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return dv.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return dv.executeSchedule(n,e,function(){return n.error(i)},t)}))})}cl.observeOn=_D});var Iu=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.subscribeOn=void 0;var yD=G();function wD(e,t){return t===void 0&&(t=0),yD.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}ll.subscribeOn=wD});var sO=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.scheduleObservable=void 0;var xD=oe(),SD=qu(),OD=Iu();function ED(e,t){return xD.innerFrom(e).pipe(OD.subscribeOn(t),SD.observeOn(t))}fl.scheduleObservable=ED});var cO=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.schedulePromise=void 0;var AD=oe(),TD=qu(),PD=Iu();function RD(e,t){return AD.innerFrom(e).pipe(PD.subscribeOn(t),TD.observeOn(t))}dl.schedulePromise=RD});var lO=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.scheduleArray=void 0;var MD=Oe();function CD(e,t){return new MD.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}pl.scheduleArray=CD});var pv=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.scheduleIterable=void 0;var kD=Oe(),qD=sv(),ID=we(),fO=on();function jD(e,t){return new kD.Observable(function(r){var n;return fO.executeSchedule(r,t,function(){n=e[qD.iterator](),fO.executeSchedule(r,t,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(u){r.error(u);return}a?r.complete():r.next(o)},0,!0)}),function(){return ID.isFunction(n?.return)&&n.return()}})}hl.scheduleIterable=jD});var hv=b(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.scheduleAsyncIterable=void 0;var FD=Oe(),dO=on();function LD(e,t){if(!e)throw new Error("Iterable cannot be null");return new FD.Observable(function(r){dO.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();dO.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}ml.scheduleAsyncIterable=LD});var pO=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.scheduleReadableStreamLike=void 0;var ND=hv(),DD=ul();function zD(e,t){return ND.scheduleAsyncIterable(DD.readableStreamLikeToAsyncGenerator(e),t)}vl.scheduleReadableStreamLike=zD});var mv=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.scheduled=void 0;var BD=sO(),UD=cO(),WD=lO(),HD=pv(),VD=hv(),GD=ov(),$D=iv(),KD=tl(),YD=cv(),ZD=av(),JD=uv(),XD=ul(),QD=pO();function e5(e,t){if(e!=null){if(GD.isInteropObservable(e))return BD.scheduleObservable(e,t);if(KD.isArrayLike(e))return WD.scheduleArray(e,t);if($D.isPromise(e))return UD.schedulePromise(e,t);if(ZD.isAsyncIterable(e))return VD.scheduleAsyncIterable(e,t);if(YD.isIterable(e))return HD.scheduleIterable(e,t);if(XD.isReadableStreamLike(e))return QD.scheduleReadableStreamLike(e,t)}throw JD.createInvalidObservableTypeError(e)}gl.scheduled=e5});var an=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.from=void 0;var t5=mv(),r5=oe();function n5(e,t){return t?t5.scheduled(e,t):r5.innerFrom(e)}bl.from=n5});var yl=b(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.of=void 0;var i5=It(),o5=an();function a5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i5.popScheduler(e);return o5.from(e,r)}_l.of=a5});var vv=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.throwError=void 0;var u5=Oe(),s5=we();function c5(e,t){var r=s5.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new u5.Observable(t?function(i){return t.schedule(n,0,i)}:n)}wl.throwError=c5});var xl=b(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.observeNotification=un.Notification=un.NotificationKind=void 0;var l5=_r(),f5=yl(),d5=vv(),p5=we(),h5;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(h5=un.NotificationKind||(un.NotificationKind={}));var m5=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return hO(this,t)},e.prototype.do=function(t,r,n){var i=this,o=i.kind,a=i.value,u=i.error;return o==="N"?t?.(a):o==="E"?r?.(u):n?.()},e.prototype.accept=function(t,r,n){var i;return p5.isFunction((i=t)===null||i===void 0?void 0:i.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,i=t.error,o=r==="N"?f5.of(n):r==="E"?d5.throwError(function(){return i}):r==="C"?l5.EMPTY:0;if(!o)throw new TypeError("Unexpected notification kind "+r);return o},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}();un.Notification=m5;function hO(e,t){var r,n,i,o=e,a=o.kind,u=o.value,l=o.error;if(typeof a!="string")throw new TypeError('Invalid notification, missing "kind"');a==="N"?(r=t.next)===null||r===void 0||r.call(t,u):a==="E"?(n=t.error)===null||n===void 0||n.call(t,l):(i=t.complete)===null||i===void 0||i.call(t)}un.observeNotification=hO});var vO=b(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.isObservable=void 0;var v5=Oe(),mO=we();function g5(e){return!!e&&(e instanceof v5.Observable||mO.isFunction(e.lift)&&mO.isFunction(e.subscribe))}Sl.isObservable=g5});var In=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.EmptyError=void 0;var b5=Mn();Ol.EmptyError=b5.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var gO=b(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.lastValueFrom=void 0;var _5=In();function y5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=!1,a;e.subscribe({next:function(u){a=u,o=!0},error:i,complete:function(){o?n(a):r?n(t.defaultValue):i(new _5.EmptyError)}})})}El.lastValueFrom=y5});var bO=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.firstValueFrom=void 0;var w5=In(),x5=To();function S5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new x5.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new w5.EmptyError)}});e.subscribe(o)})}Al.firstValueFrom=S5});var gv=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.ArgumentOutOfRangeError=void 0;var O5=Mn();Tl.ArgumentOutOfRangeError=O5.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var bv=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.NotFoundError=void 0;var E5=Mn();Pl.NotFoundError=E5.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var _v=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.SequenceError=void 0;var A5=Mn();Rl.SequenceError=A5.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var Cl=b(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.isValidDate=void 0;function T5(e){return e instanceof Date&&!isNaN(e)}Ml.isValidDate=T5});var kl=b(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.timeout=Li.TimeoutError=void 0;var P5=qt(),R5=Cl(),M5=G(),C5=oe(),k5=Mn(),q5=Z(),I5=on();Li.TimeoutError=k5.createErrorClass(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function j5(e,t){var r=R5.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?F5:o,u=r.scheduler,l=u===void 0?t??P5.asyncScheduler:u,s=r.meta,c=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return M5.operate(function(d,f){var p,h,m=null,g=0,_=function(w){h=I5.executeSchedule(f,l,function(){try{p.unsubscribe(),C5.innerFrom(a({meta:c,lastValue:m,seen:g})).subscribe(f)}catch(y){f.error(y)}},w)};p=d.subscribe(q5.createOperatorSubscriber(f,function(w){h?.unsubscribe(),g++,f.next(m=w),i>0&&_(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),m=null})),!g&&_(n!=null?typeof n=="number"?n:+n-l.now():i)})}Li.timeout=j5;function F5(e){throw new Li.TimeoutError(e)}});var jn=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.map=void 0;var L5=G(),N5=Z();function D5(e,t){return L5.operate(function(r,n){var i=0;r.subscribe(N5.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}ql.map=D5});var Ln=b(Fn=>{"use strict";var z5=Fn&&Fn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},B5=Fn&&Fn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.mapOneOrManyArgs=void 0;var U5=jn(),W5=Array.isArray;function H5(e,t){return W5(t)?e.apply(void 0,B5([],z5(t))):e(t)}function V5(e){return U5.map(function(t){return H5(e,t)})}Fn.mapOneOrManyArgs=V5});var wv=b(Nn=>{"use strict";var G5=Nn&&Nn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},_O=Nn&&Nn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.bindCallbackInternals=void 0;var $5=ku(),K5=Oe(),Y5=Iu(),Z5=Ln(),J5=qu(),X5=Zc();function yv(e,t,r,n){if(r)if($5.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return yv(e,t,n).apply(this,i).pipe(Z5.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return yv(e,t).apply(this,i).pipe(Y5.subscribeOn(n),J5.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new X5.AsyncSubject,l=!0;return new K5.Observable(function(s){var c=u.subscribe(s);if(l){l=!1;var d=!1,f=!1;t.apply(i,_O(_O([],G5(o)),[function(){for(var p=[],h=0;h<arguments.length;h++)p[h]=arguments[h];if(e){var m=p.shift();if(m!=null){u.error(m);return}}u.next(1<p.length?p:p[0]),f=!0,d&&u.complete()}])),f&&u.complete(),d=!0}return c})}}Nn.bindCallbackInternals=yv});var yO=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.bindCallback=void 0;var Q5=wv();function e3(e,t,r){return Q5.bindCallbackInternals(!1,e,t,r)}Il.bindCallback=e3});var wO=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.bindNodeCallback=void 0;var t3=wv();function r3(e,t,r){return t3.bindCallbackInternals(!0,e,t,r)}jl.bindNodeCallback=r3});var xv=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.argsArgArrayOrObject=void 0;var n3=Array.isArray,i3=Object.getPrototypeOf,o3=Object.prototype,a3=Object.keys;function u3(e){if(e.length===1){var t=e[0];if(n3(t))return{args:t,keys:null};if(s3(t)){var r=a3(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}Fl.argsArgArrayOrObject=u3;function s3(e){return e&&typeof e=="object"&&i3(e)===o3}});var Sv=b(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.createObject=void 0;function c3(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Ll.createObject=c3});var Nl=b(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.combineLatestInit=Yo.combineLatest=void 0;var l3=Oe(),f3=xv(),OO=an(),EO=at(),d3=Ln(),xO=It(),p3=Sv(),h3=Z(),m3=on();function v3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xO.popScheduler(e),n=xO.popResultSelector(e),i=f3.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return OO.from([],r);var u=new l3.Observable(AO(o,r,a?function(l){return p3.createObject(a,l)}:EO.identity));return n?u.pipe(d3.mapOneOrManyArgs(n)):u}Yo.combineLatest=v3;function AO(e,t,r){return r===void 0&&(r=EO.identity),function(n){SO(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,l=function(c){SO(t,function(){var d=OO.from(e[c],t),f=!1;d.subscribe(h3.createOperatorSubscriber(n,function(p){o[c]=p,f||(f=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)l(s)},n)}}Yo.combineLatestInit=AO;function SO(e,t,r){e?m3.executeSchedule(r,e,t):t()}});var zl=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.mergeInternals=void 0;var g3=oe(),b3=on(),TO=Z();function _3(e,t,r,n,i,o,a,u){var l=[],s=0,c=0,d=!1,f=function(){d&&!l.length&&!s&&t.complete()},p=function(m){return s<n?h(m):l.push(m)},h=function(m){o&&t.next(m),s++;var g=!1;g3.innerFrom(r(m,c++)).subscribe(TO.createOperatorSubscriber(t,function(_){i?.(_),o?p(_):t.next(_)},function(){g=!0},void 0,function(){if(g)try{s--;for(var _=function(){var w=l.shift();a?b3.executeSchedule(t,a,function(){return h(w)}):h(w)};l.length&&s<n;)_();f()}catch(w){t.error(w)}}))};return e.subscribe(TO.createOperatorSubscriber(t,p,function(){d=!0,f()})),function(){u?.()}}Dl.mergeInternals=_3});var sn=b(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.mergeMap=void 0;var y3=jn(),w3=oe(),x3=G(),S3=zl(),O3=we();function PO(e,t,r){return r===void 0&&(r=1/0),O3.isFunction(t)?PO(function(n,i){return y3.map(function(o,a){return t(n,o,i,a)})(w3.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),x3.operate(function(n,i){return S3.mergeInternals(n,i,e,r)}))}Bl.mergeMap=PO});var ju=b(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.mergeAll=void 0;var E3=sn(),A3=at();function T3(e){return e===void 0&&(e=1/0),E3.mergeMap(A3.identity,e)}Ul.mergeAll=T3});var Hl=b(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.concatAll=void 0;var P3=ju();function R3(){return P3.mergeAll(1)}Wl.concatAll=R3});var Fu=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.concat=void 0;var M3=Hl(),C3=It(),k3=an();function q3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return M3.concatAll()(k3.from(e,C3.popScheduler(e)))}Vl.concat=q3});var Lu=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.defer=void 0;var I3=Oe(),j3=oe();function F3(e){return new I3.Observable(function(t){j3.innerFrom(e()).subscribe(t)})}Gl.defer=F3});var RO=b($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.connectable=void 0;var L3=ut(),N3=Oe(),D3=Lu(),z3={connector:function(){return new L3.Subject},resetOnDisconnect:!0};function B3(e,t){t===void 0&&(t=z3);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new N3.Observable(function(l){return a.subscribe(l)});return u.connect=function(){return(!r||r.closed)&&(r=D3.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}$l.connectable=B3});var MO=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.forkJoin=void 0;var U3=Oe(),W3=xv(),H3=oe(),V3=It(),G3=Z(),$3=Ln(),K3=Sv();function Y3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=V3.popResultSelector(e),n=W3.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new U3.Observable(function(u){var l=i.length;if(!l){u.complete();return}for(var s=new Array(l),c=l,d=l,f=function(h){var m=!1;H3.innerFrom(i[h]).subscribe(G3.createOperatorSubscriber(u,function(g){m||(m=!0,d--),s[h]=g},function(){return c--},void 0,function(){(!c||!m)&&(d||u.next(o?K3.createObject(o,s):s),u.complete())}))},p=0;p<l;p++)f(p)});return r?a.pipe($3.mapOneOrManyArgs(r)):a}Kl.forkJoin=Y3});var kO=b(Zo=>{"use strict";var Z3=Zo&&Zo.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};Object.defineProperty(Zo,"__esModule",{value:!0});Zo.fromEvent=void 0;var J3=oe(),X3=Oe(),Q3=sn(),e6=tl(),Ni=we(),t6=Ln(),r6=["addListener","removeListener"],n6=["addEventListener","removeEventListener"],i6=["on","off"];function Ov(e,t,r,n){if(Ni.isFunction(r)&&(n=r,r=void 0),n)return Ov(e,t,r).pipe(t6.mapOneOrManyArgs(n));var i=Z3(u6(e)?n6.map(function(u){return function(l){return e[u](t,l,r)}}):o6(e)?r6.map(CO(e,t)):a6(e)?i6.map(CO(e,t)):[],2),o=i[0],a=i[1];if(!o&&e6.isArrayLike(e))return Q3.mergeMap(function(u){return Ov(u,t,r)})(J3.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new X3.Observable(function(u){var l=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return u.next(1<s.length?s:s[0])};return o(l),function(){return a(l)}})}Zo.fromEvent=Ov;function CO(e,t){return function(r){return function(n){return e[r](t,n)}}}function o6(e){return Ni.isFunction(e.addListener)&&Ni.isFunction(e.removeListener)}function a6(e){return Ni.isFunction(e.on)&&Ni.isFunction(e.off)}function u6(e){return Ni.isFunction(e.addEventListener)&&Ni.isFunction(e.removeEventListener)}});var IO=b(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.fromEventPattern=void 0;var s6=Oe(),c6=we(),l6=Ln();function qO(e,t,r){return r?qO(e,t).pipe(l6.mapOneOrManyArgs(r)):new s6.Observable(function(n){var i=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return n.next(a.length===1?a[0]:a)},o=e(i);return c6.isFunction(t)?function(){return t(i,o)}:void 0})}Yl.fromEventPattern=qO});var FO=b(Jo=>{"use strict";var f6=Jo&&Jo.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.generate=void 0;var jO=at(),d6=ku(),p6=Lu(),h6=pv();function m6(e,t,r,n,i){var o,a,u,l;arguments.length===1?(o=e,l=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,u=a===void 0?jO.identity:a,i=o.scheduler):(l=e,!n||d6.isScheduler(n)?(u=jO.identity,i=n):u=n);function s(){var c;return f6(this,function(d){switch(d.label){case 0:c=l,d.label=1;case 1:return!t||t(c)?[4,u(c)]:[3,4];case 2:d.sent(),d.label=3;case 3:return c=r(c),[3,1];case 4:return[2]}})}return p6.defer(i?function(){return h6.scheduleIterable(s(),i)}:s)}Jo.generate=m6});var LO=b(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.iif=void 0;var v6=Lu();function g6(e,t,r){return v6.defer(function(){return e()?t:r})}Zl.iif=g6});var Dn=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.timer=void 0;var b6=Oe(),_6=qt(),y6=ku(),w6=Cl();function x6(e,t,r){e===void 0&&(e=0),r===void 0&&(r=_6.async);var n=-1;return t!=null&&(y6.isScheduler(t)?r=t:n=t),new b6.Observable(function(i){var o=w6.isValidDate(e)?+e-r.now():e;o<0&&(o=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}Jl.timer=x6});var Ev=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.interval=void 0;var S6=qt(),O6=Dn();function E6(e,t){return e===void 0&&(e=0),t===void 0&&(t=S6.asyncScheduler),e<0&&(e=0),O6.timer(e,e,t)}Xl.interval=E6});var DO=b(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.merge=void 0;var A6=ju(),T6=oe(),P6=_r(),NO=It(),R6=an();function M6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=NO.popScheduler(e),n=NO.popNumber(e,1/0),i=e;return i.length?i.length===1?T6.innerFrom(i[0]):A6.mergeAll(n)(R6.from(i,r)):P6.EMPTY}Ql.merge=M6});var Av=b(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.never=Di.NEVER=void 0;var C6=Oe(),k6=ot();Di.NEVER=new C6.Observable(k6.noop);function q6(){return Di.NEVER}Di.never=q6});var zi=b(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.argsOrArgArray=void 0;var I6=Array.isArray;function j6(e){return e.length===1&&I6(e[0])?e[0]:e}ef.argsOrArgArray=j6});var Tv=b(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.onErrorResumeNext=void 0;var F6=Oe(),L6=zi(),N6=Z(),zO=ot(),D6=oe();function z6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=L6.argsOrArgArray(e);return new F6.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=D6.innerFrom(r[i++])}catch{o();return}var u=new N6.OperatorSubscriber(n,void 0,zO.noop,zO.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}tf.onErrorResumeNext=z6});var BO=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.pairs=void 0;var B6=an();function U6(e,t){return B6.from(Object.entries(e),t)}rf.pairs=U6});var UO=b(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.not=void 0;function W6(e,t){return function(r,n){return!e.call(t,r,n)}}nf.not=W6});var Bi=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.filter=void 0;var H6=G(),V6=Z();function G6(e,t){return H6.operate(function(r,n){var i=0;r.subscribe(V6.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}of.filter=G6});var VO=b(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.partition=void 0;var $6=UO(),WO=Bi(),HO=oe();function K6(e,t,r){return[WO.filter(t,r)(HO.innerFrom(e)),WO.filter($6.not(t,r))(HO.innerFrom(e))]}af.partition=K6});var Pv=b(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.raceInit=Xo.race=void 0;var Y6=Oe(),GO=oe(),Z6=zi(),J6=Z();function X6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=Z6.argsOrArgArray(e),e.length===1?GO.innerFrom(e[0]):new Y6.Observable($O(e))}Xo.race=X6;function $O(e){return function(t){for(var r=[],n=function(o){r.push(GO.innerFrom(e[o]).subscribe(J6.createOperatorSubscriber(t,function(a){if(r){for(var u=0;u<r.length;u++)u!==o&&r[u].unsubscribe();r=null}t.next(a)})))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}Xo.raceInit=$O});var KO=b(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.range=void 0;var Q6=Oe(),e8=_r();function t8(e,t,r){if(t==null&&(t=e,e=0),t<=0)return e8.EMPTY;var n=t+e;return new Q6.Observable(r?function(i){var o=e;return r.schedule(function(){o<n?(i.next(o++),this.schedule()):i.complete()})}:function(i){for(var o=e;o<n&&!i.closed;)i.next(o++);i.complete()})}uf.range=t8});var YO=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.using=void 0;var r8=Oe(),n8=oe(),i8=_r();function o8(e,t){return new r8.Observable(function(r){var n=e(),i=t(n),o=i?n8.innerFrom(i):i8.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}sf.using=o8});var cf=b(zn=>{"use strict";var a8=zn&&zn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},u8=zn&&zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(zn,"__esModule",{value:!0});zn.zip=void 0;var s8=Oe(),c8=oe(),l8=zi(),f8=_r(),d8=Z(),p8=It();function h8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=p8.popResultSelector(e),n=l8.argsOrArgArray(e);return n.length?new s8.Observable(function(i){var o=n.map(function(){return[]}),a=n.map(function(){return!1});i.add(function(){o=a=null});for(var u=function(s){c8.innerFrom(n[s]).subscribe(d8.createOperatorSubscriber(i,function(c){if(o[s].push(c),o.every(function(f){return f.length})){var d=o.map(function(f){return f.shift()});i.next(r?r.apply(void 0,u8([],a8(d))):d),o.some(function(f,p){return!f.length&&a[p]})&&i.complete()}},function(){a[s]=!0,!o[s].length&&i.complete()}))},l=0;!i.closed&&l<n.length;l++)u(l);return function(){o=a=null}}):f8.EMPTY}zn.zip=h8});var JO=b(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:!0})});var Rv=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.audit=void 0;var m8=G(),v8=oe(),XO=Z();function g8(e){return m8.operate(function(t,r){var n=!1,i=null,o=null,a=!1,u=function(){if(o?.unsubscribe(),o=null,n){n=!1;var s=i;i=null,r.next(s)}a&&r.complete()},l=function(){o=null,a&&r.complete()};t.subscribe(XO.createOperatorSubscriber(r,function(s){n=!0,i=s,o||v8.innerFrom(e(s)).subscribe(o=XO.createOperatorSubscriber(r,u,l))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}lf.audit=g8});var QO=b(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.auditTime=void 0;var b8=qt(),_8=Rv(),y8=Dn();function w8(e,t){return t===void 0&&(t=b8.asyncScheduler),_8.audit(function(){return y8.timer(e,t)})}ff.auditTime=w8});var tE=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.buffer=void 0;var x8=G(),S8=ot(),eE=Z(),O8=oe();function E8(e){return x8.operate(function(t,r){var n=[];return t.subscribe(eE.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),O8.innerFrom(e).subscribe(eE.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},S8.noop)),function(){n=null}})}df.buffer=E8});var rE=b(Qo=>{"use strict";var Mv=Qo&&Qo.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.bufferCount=void 0;var A8=G(),T8=Z(),P8=nn();function R8(e,t){return t===void 0&&(t=null),t=t??e,A8.operate(function(r,n){var i=[],o=0;r.subscribe(T8.createOperatorSubscriber(n,function(a){var u,l,s,c,d=null;o++%t===0&&i.push([]);try{for(var f=Mv(i),p=f.next();!p.done;p=f.next()){var h=p.value;h.push(a),e<=h.length&&(d=d??[],d.push(h))}}catch(_){u={error:_}}finally{try{p&&!p.done&&(l=f.return)&&l.call(f)}finally{if(u)throw u.error}}if(d)try{for(var m=Mv(d),g=m.next();!g.done;g=m.next()){var h=g.value;P8.arrRemove(i,h),n.next(h)}}catch(_){s={error:_}}finally{try{g&&!g.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var l=Mv(i),s=l.next();!s.done;s=l.next()){var c=s.value;n.next(c)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}Qo.bufferCount=R8});var iE=b(ea=>{"use strict";var M8=ea&&ea.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ea,"__esModule",{value:!0});ea.bufferTime=void 0;var C8=Nt(),k8=G(),q8=Z(),I8=nn(),j8=qt(),F8=It(),nE=on();function L8(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=F8.popScheduler(n))!==null&&t!==void 0?t:j8.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return k8.operate(function(l,s){var c=[],d=!1,f=function(m){var g=m.buffer,_=m.subs;_.unsubscribe(),I8.arrRemove(c,m),s.next(g),d&&p()},p=function(){if(c){var m=new C8.Subscription;s.add(m);var g=[],_={buffer:g,subs:m};c.push(_),nE.executeSchedule(m,o,function(){return f(_)},e)}};a!==null&&a>=0?nE.executeSchedule(s,o,p,a,!0):d=!0,p();var h=q8.createOperatorSubscriber(s,function(m){var g,_,w=c.slice();try{for(var y=M8(w),x=y.next();!x.done;x=y.next()){var O=x.value,A=O.buffer;A.push(m),u<=A.length&&f(O)}}catch(T){g={error:T}}finally{try{x&&!x.done&&(_=y.return)&&_.call(y)}finally{if(g)throw g.error}}},function(){for(;c?.length;)s.next(c.shift().buffer);h?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return c=null});l.subscribe(h)})}ea.bufferTime=L8});var uE=b(ta=>{"use strict";var N8=ta&&ta.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ta,"__esModule",{value:!0});ta.bufferToggle=void 0;var D8=Nt(),z8=G(),oE=oe(),Cv=Z(),aE=ot(),B8=nn();function U8(e,t){return z8.operate(function(r,n){var i=[];oE.innerFrom(e).subscribe(Cv.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new D8.Subscription,l=function(){B8.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(oE.innerFrom(t(o)).subscribe(Cv.createOperatorSubscriber(n,l,aE.noop)))},aE.noop)),r.subscribe(Cv.createOperatorSubscriber(n,function(o){var a,u;try{for(var l=N8(i),s=l.next();!s.done;s=l.next()){var c=s.value;c.push(o)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}ta.bufferToggle=U8});var cE=b(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.bufferWhen=void 0;var W8=G(),H8=ot(),sE=Z(),V8=oe();function G8(e){return W8.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),V8.innerFrom(e()).subscribe(i=sE.createOperatorSubscriber(r,o,H8.noop))};o(),t.subscribe(sE.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}pf.bufferWhen=G8});var fE=b(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.catchError=void 0;var $8=oe(),K8=Z(),Y8=G();function lE(e){return Y8.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(K8.createOperatorSubscriber(r,void 0,void 0,function(a){o=$8.innerFrom(e(a,lE(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}hf.catchError=lE});var kv=b(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.scanInternals=void 0;var Z8=Z();function J8(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(Z8.createOperatorSubscriber(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}mf.scanInternals=J8});var ra=b(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.reduce=void 0;var X8=kv(),Q8=G();function ez(e,t){return Q8.operate(X8.scanInternals(e,t,arguments.length>=2,!1,!0))}vf.reduce=ez});var qv=b(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.toArray=void 0;var tz=ra(),rz=G(),nz=function(e,t){return e.push(t),e};function iz(){return rz.operate(function(e,t){tz.reduce(nz,[])(e).subscribe(t)})}gf.toArray=iz});var Iv=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.joinAllInternals=void 0;var oz=at(),az=Ln(),uz=Pu(),sz=sn(),cz=qv();function lz(e,t){return uz.pipe(cz.toArray(),sz.mergeMap(function(r){return e(r)}),t?az.mapOneOrManyArgs(t):oz.identity)}bf.joinAllInternals=lz});var jv=b(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.combineLatestAll=void 0;var fz=Nl(),dz=Iv();function pz(e){return dz.joinAllInternals(fz.combineLatest,e)}_f.combineLatestAll=pz});var dE=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.combineAll=void 0;var hz=jv();yf.combineAll=hz.combineLatestAll});var vE=b(Bn=>{"use strict";var pE=Bn&&Bn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},hE=Bn&&Bn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.combineLatest=void 0;var mz=Nl(),vz=G(),gz=zi(),bz=Ln(),_z=Pu(),yz=It();function mE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=yz.popResultSelector(e);return r?_z.pipe(mE.apply(void 0,hE([],pE(e))),bz.mapOneOrManyArgs(r)):vz.operate(function(n,i){mz.combineLatestInit(hE([n],pE(gz.argsOrArgArray(e))))(i)})}Bn.combineLatest=mE});var gE=b(Un=>{"use strict";var wz=Un&&Un.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},xz=Un&&Un.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Un,"__esModule",{value:!0});Un.combineLatestWith=void 0;var Sz=vE();function Oz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Sz.combineLatest.apply(void 0,xz([],wz(e)))}Un.combineLatestWith=Oz});var Fv=b(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.concatMap=void 0;var bE=sn(),Ez=we();function Az(e,t){return Ez.isFunction(t)?bE.mergeMap(e,t,1):bE.mergeMap(e,1)}wf.concatMap=Az});var yE=b(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.concatMapTo=void 0;var _E=Fv(),Tz=we();function Pz(e,t){return Tz.isFunction(t)?_E.concatMap(function(){return e},t):_E.concatMap(function(){return e})}xf.concatMapTo=Pz});var wE=b(Wn=>{"use strict";var Rz=Wn&&Wn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Mz=Wn&&Wn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.concat=void 0;var Cz=G(),kz=Hl(),qz=It(),Iz=an();function jz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=qz.popScheduler(e);return Cz.operate(function(n,i){kz.concatAll()(Iz.from(Mz([n],Rz(e)),r)).subscribe(i)})}Wn.concat=jz});var xE=b(Hn=>{"use strict";var Fz=Hn&&Hn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Lz=Hn&&Hn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.concatWith=void 0;var Nz=wE();function Dz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nz.concat.apply(void 0,Lz([],Fz(e)))}Hn.concatWith=Dz});var SE=b(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.fromSubscribable=void 0;var zz=Oe();function Bz(e){return new zz.Observable(function(t){return e.subscribe(t)})}Sf.fromSubscribable=Bz});var Ef=b(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.connect=void 0;var Uz=ut(),Wz=oe(),Hz=G(),Vz=SE(),Gz={connector:function(){return new Uz.Subject}};function $z(e,t){t===void 0&&(t=Gz);var r=t.connector;return Hz.operate(function(n,i){var o=r();Wz.innerFrom(e(Vz.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}Of.connect=$z});var OE=b(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.count=void 0;var Kz=ra();function Yz(e){return Kz.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}Af.count=Yz});var AE=b(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.debounce=void 0;var Zz=G(),Jz=ot(),EE=Z(),Xz=oe();function Qz(e){return Zz.operate(function(t,r){var n=!1,i=null,o=null,a=function(){if(o?.unsubscribe(),o=null,n){n=!1;var u=i;i=null,r.next(u)}};t.subscribe(EE.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=EE.createOperatorSubscriber(r,a,Jz.noop),Xz.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}Tf.debounce=Qz});var TE=b(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.debounceTime=void 0;var eB=qt(),tB=G(),rB=Z();function nB(e,t){return t===void 0&&(t=eB.asyncScheduler),tB.operate(function(r,n){var i=null,o=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var s=o;o=null,n.next(s)}};function l(){var s=a+e,c=t.now();if(c<s){i=this.schedule(void 0,s-c),n.add(i);return}u()}r.subscribe(rB.createOperatorSubscriber(n,function(s){o=s,a=t.now(),i||(i=t.schedule(l,e),n.add(i))},function(){u(),n.complete()},void 0,function(){o=i=null}))})}Pf.debounceTime=nB});var Nu=b(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.defaultIfEmpty=void 0;var iB=G(),oB=Z();function aB(e){return iB.operate(function(t,r){var n=!1;t.subscribe(oB.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}Rf.defaultIfEmpty=aB});var Du=b(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.take=void 0;var uB=_r(),sB=G(),cB=Z();function lB(e){return e<=0?function(){return uB.EMPTY}:sB.operate(function(t,r){var n=0;t.subscribe(cB.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}Mf.take=lB});var Lv=b(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.ignoreElements=void 0;var fB=G(),dB=Z(),pB=ot();function hB(){return fB.operate(function(e,t){e.subscribe(dB.createOperatorSubscriber(t,pB.noop))})}Cf.ignoreElements=hB});var Nv=b(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.mapTo=void 0;var mB=jn();function vB(e){return mB.map(function(){return e})}kf.mapTo=vB});var Dv=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.delayWhen=void 0;var gB=Fu(),PE=Du(),bB=Lv(),_B=Nv(),yB=sn(),wB=oe();function RE(e,t){return t?function(r){return gB.concat(t.pipe(PE.take(1),bB.ignoreElements()),r.pipe(RE(e)))}:yB.mergeMap(function(r,n){return wB.innerFrom(e(r,n)).pipe(PE.take(1),_B.mapTo(r))})}qf.delayWhen=RE});var ME=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.delay=void 0;var xB=qt(),SB=Dv(),OB=Dn();function EB(e,t){t===void 0&&(t=xB.asyncScheduler);var r=OB.timer(e,t);return SB.delayWhen(function(){return r})}If.delay=EB});var CE=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.dematerialize=void 0;var AB=xl(),TB=G(),PB=Z();function RB(){return TB.operate(function(e,t){e.subscribe(PB.createOperatorSubscriber(t,function(r){return AB.observeNotification(r,t)}))})}jf.dematerialize=RB});var qE=b(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.distinct=void 0;var MB=G(),kE=Z(),CB=ot(),kB=oe();function qB(e,t){return MB.operate(function(r,n){var i=new Set;r.subscribe(kE.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&kB.innerFrom(t).subscribe(kE.createOperatorSubscriber(n,function(){return i.clear()},CB.noop))})}Ff.distinct=qB});var zv=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.distinctUntilChanged=void 0;var IB=at(),jB=G(),FB=Z();function LB(e,t){return t===void 0&&(t=IB.identity),e=e??NB,jB.operate(function(r,n){var i,o=!0;r.subscribe(FB.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}Lf.distinctUntilChanged=LB;function NB(e,t){return e===t}});var IE=b(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.distinctUntilKeyChanged=void 0;var DB=zv();function zB(e,t){return DB.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Nf.distinctUntilKeyChanged=zB});var zu=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.throwIfEmpty=void 0;var BB=In(),UB=G(),WB=Z();function HB(e){return e===void 0&&(e=VB),UB.operate(function(t,r){var n=!1;t.subscribe(WB.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Df.throwIfEmpty=HB;function VB(){return new BB.EmptyError}});var FE=b(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.elementAt=void 0;var jE=gv(),GB=Bi(),$B=zu(),KB=Nu(),YB=Du();function ZB(e,t){if(e<0)throw new jE.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(GB.filter(function(i,o){return o===e}),YB.take(1),r?KB.defaultIfEmpty(t):$B.throwIfEmpty(function(){return new jE.ArgumentOutOfRangeError}))}}zf.elementAt=ZB});var LE=b(Vn=>{"use strict";var JB=Vn&&Vn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},XB=Vn&&Vn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.endWith=void 0;var QB=Fu(),eU=yl();function tU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return QB.concat(r,eU.of.apply(void 0,XB([],JB(e))))}}Vn.endWith=tU});var NE=b(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.every=void 0;var rU=G(),nU=Z();function iU(e,t){return rU.operate(function(r,n){var i=0;r.subscribe(nU.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}Bf.every=iU});var Bv=b(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.exhaustMap=void 0;var oU=jn(),DE=oe(),aU=G(),zE=Z();function BE(e,t){return t?function(r){return r.pipe(BE(function(n,i){return DE.innerFrom(e(n,i)).pipe(oU.map(function(o,a){return t(n,o,i,a)}))}))}:aU.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(zE.createOperatorSubscriber(n,function(u){o||(o=zE.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),DE.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}Uf.exhaustMap=BE});var Uv=b(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.exhaustAll=void 0;var uU=Bv(),sU=at();function cU(){return uU.exhaustMap(sU.identity)}Wf.exhaustAll=cU});var UE=b(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.exhaust=void 0;var lU=Uv();Hf.exhaust=lU.exhaustAll});var WE=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.expand=void 0;var fU=G(),dU=zl();function pU(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,fU.operate(function(n,i){return dU.mergeInternals(n,i,e,t,void 0,!0,r)})}Vf.expand=pU});var HE=b(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.finalize=void 0;var hU=G();function mU(e){return hU.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}Gf.finalize=mU});var Wv=b(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.createFind=na.find=void 0;var vU=G(),gU=Z();function bU(e,t){return vU.operate(VE(e,t,"value"))}na.find=bU;function VE(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(gU.createOperatorSubscriber(o,function(u){var l=a++;e.call(t,u,l,i)&&(o.next(n?l:u),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}na.createFind=VE});var GE=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.findIndex=void 0;var _U=G(),yU=Wv();function wU(e,t){return _U.operate(yU.createFind(e,t,"index"))}$f.findIndex=wU});var $E=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.first=void 0;var xU=In(),SU=Bi(),OU=Du(),EU=Nu(),AU=zu(),TU=at();function PU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?SU.filter(function(i,o){return e(i,o,n)}):TU.identity,OU.take(1),r?EU.defaultIfEmpty(t):AU.throwIfEmpty(function(){return new xU.EmptyError}))}}Kf.first=PU});var YE=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.groupBy=void 0;var RU=Oe(),MU=oe(),CU=ut(),kU=G(),KE=Z();function qU(e,t,r,n){return kU.operate(function(i,o){var a;!t||typeof t=="function"?a=t:(r=t.duration,a=t.element,n=t.connector);var u=new Map,l=function(h){u.forEach(h),h(o)},s=function(h){return l(function(m){return m.error(h)})},c=0,d=!1,f=new KE.OperatorSubscriber(o,function(h){try{var m=e(h),g=u.get(m);if(!g){u.set(m,g=n?n():new CU.Subject);var _=p(m,g);if(o.next(_),r){var w=KE.createOperatorSubscriber(g,function(){g.complete(),w?.unsubscribe()},void 0,void 0,function(){return u.delete(m)});f.add(MU.innerFrom(r(_)).subscribe(w))}}g.next(a?a(h):h)}catch(y){s(y)}},function(){return l(function(h){return h.complete()})},s,function(){return u.clear()},function(){return d=!0,c===0});i.subscribe(f);function p(h,m){var g=new RU.Observable(function(_){c++;var w=m.subscribe(_);return function(){w.unsubscribe(),--c===0&&d&&f.unsubscribe()}});return g.key=h,g}})}Yf.groupBy=qU});var ZE=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.isEmpty=void 0;var IU=G(),jU=Z();function FU(){return IU.operate(function(e,t){e.subscribe(jU.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}Zf.isEmpty=FU});var Hv=b(ia=>{"use strict";var LU=ia&&ia.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ia,"__esModule",{value:!0});ia.takeLast=void 0;var NU=_r(),DU=G(),zU=Z();function BU(e){return e<=0?function(){return NU.EMPTY}:DU.operate(function(t,r){var n=[];t.subscribe(zU.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=LU(n),u=a.next();!u.done;u=a.next()){var l=u.value;r.next(l)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}ia.takeLast=BU});var JE=b(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.last=void 0;var UU=In(),WU=Bi(),HU=Hv(),VU=zu(),GU=Nu(),$U=at();function KU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?WU.filter(function(i,o){return e(i,o,n)}):$U.identity,HU.takeLast(1),r?GU.defaultIfEmpty(t):VU.throwIfEmpty(function(){return new UU.EmptyError}))}}Jf.last=KU});var XE=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.materialize=void 0;var Vv=xl(),YU=G(),ZU=Z();function JU(){return YU.operate(function(e,t){e.subscribe(ZU.createOperatorSubscriber(t,function(r){t.next(Vv.Notification.createNext(r))},function(){t.next(Vv.Notification.createComplete()),t.complete()},function(r){t.next(Vv.Notification.createError(r)),t.complete()}))})}Xf.materialize=JU});var QE=b(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.max=void 0;var XU=ra(),QU=we();function eW(e){return XU.reduce(QU.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}Qf.max=eW});var eA=b(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.flatMap=void 0;var tW=sn();ed.flatMap=tW.mergeMap});var rA=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.mergeMapTo=void 0;var tA=sn(),rW=we();function nW(e,t,r){return r===void 0&&(r=1/0),rW.isFunction(t)?tA.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),tA.mergeMap(function(){return e},r))}td.mergeMapTo=nW});var nA=b(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.mergeScan=void 0;var iW=G(),oW=zl();function aW(e,t,r){return r===void 0&&(r=1/0),iW.operate(function(n,i){var o=t;return oW.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}rd.mergeScan=aW});var oA=b(Gn=>{"use strict";var uW=Gn&&Gn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},sW=Gn&&Gn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.merge=void 0;var cW=G(),lW=zi(),fW=ju(),iA=It(),dW=an();function pW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=iA.popScheduler(e),n=iA.popNumber(e,1/0);return e=lW.argsOrArgArray(e),cW.operate(function(i,o){fW.mergeAll(n)(dW.from(sW([i],uW(e)),r)).subscribe(o)})}Gn.merge=pW});var aA=b($n=>{"use strict";var hW=$n&&$n.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},mW=$n&&$n.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty($n,"__esModule",{value:!0});$n.mergeWith=void 0;var vW=oA();function gW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return vW.merge.apply(void 0,mW([],hW(e)))}$n.mergeWith=gW});var uA=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.min=void 0;var bW=ra(),_W=we();function yW(e){return bW.reduce(_W.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}nd.min=yW});var od=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.multicast=void 0;var wW=Ru(),sA=we(),xW=Ef();function SW(e,t){var r=sA.isFunction(e)?e:function(){return e};return sA.isFunction(t)?xW.connect(t,{connector:r}):function(n){return new wW.ConnectableObservable(n,r)}}id.multicast=SW});var lA=b(Ur=>{"use strict";var OW=Ur&&Ur.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},EW=Ur&&Ur.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.onErrorResumeNext=Ur.onErrorResumeNextWith=void 0;var AW=zi(),TW=Tv();function cA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=AW.argsOrArgArray(e);return function(n){return TW.onErrorResumeNext.apply(void 0,EW([n],OW(r)))}}Ur.onErrorResumeNextWith=cA;Ur.onErrorResumeNext=cA});var fA=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.pairwise=void 0;var PW=G(),RW=Z();function MW(){return PW.operate(function(e,t){var r,n=!1;e.subscribe(RW.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}ad.pairwise=MW});var dA=b(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.pluck=void 0;var CW=jn();function kW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw new Error("list of properties cannot be empty.");return CW.map(function(n){for(var i=n,o=0;o<r;o++){var a=i?.[e[o]];if(typeof a<"u")i=a;else return}return i})}ud.pluck=kW});var pA=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.publish=void 0;var qW=ut(),IW=od(),jW=Ef();function FW(e){return e?function(t){return jW.connect(e)(t)}:function(t){return IW.multicast(new qW.Subject)(t)}}sd.publish=FW});var hA=b(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.publishBehavior=void 0;var LW=ev(),NW=Ru();function DW(e){return function(t){var r=new LW.BehaviorSubject(e);return new NW.ConnectableObservable(t,function(){return r})}}cd.publishBehavior=DW});var mA=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.publishLast=void 0;var zW=Zc(),BW=Ru();function UW(){return function(e){var t=new zW.AsyncSubject;return new BW.ConnectableObservable(e,function(){return t})}}ld.publishLast=UW});var gA=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.publishReplay=void 0;var WW=Yc(),HW=od(),vA=we();function VW(e,t,r,n){r&&!vA.isFunction(r)&&(n=r);var i=vA.isFunction(r)?r:void 0;return function(o){return HW.multicast(new WW.ReplaySubject(e,t,n),i)(o)}}fd.publishReplay=VW});var bA=b(Kn=>{"use strict";var GW=Kn&&Kn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},$W=Kn&&Kn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.raceWith=void 0;var KW=Pv(),YW=G(),ZW=at();function JW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?YW.operate(function(r,n){KW.raceInit($W([r],GW(e)))(n)}):ZW.identity}Kn.raceWith=JW});var yA=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.repeat=void 0;var XW=_r(),QW=G(),_A=Z(),e4=oe(),t4=Dn();function r4(e){var t,r=1/0,n;return e!=null&&(typeof e=="object"?(t=e.count,r=t===void 0?1/0:t,n=e.delay):r=e),r<=0?function(){return XW.EMPTY}:QW.operate(function(i,o){var a=0,u,l=function(){if(u?.unsubscribe(),u=null,n!=null){var c=typeof n=="number"?t4.timer(n):e4.innerFrom(n(a)),d=_A.createOperatorSubscriber(o,function(){d.unsubscribe(),s()});c.subscribe(d)}else s()},s=function(){var c=!1;u=i.subscribe(_A.createOperatorSubscriber(o,void 0,function(){++a<r?u?l():c=!0:o.complete()})),c&&l()};s()})}dd.repeat=r4});var xA=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.repeatWhen=void 0;var n4=oe(),i4=ut(),o4=G(),wA=Z();function a4(e){return o4.operate(function(t,r){var n,i=!1,o,a=!1,u=!1,l=function(){return u&&a&&(r.complete(),!0)},s=function(){return o||(o=new i4.Subject,n4.innerFrom(e(o)).subscribe(wA.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,l()}))),o},c=function(){u=!1,n=t.subscribe(wA.createOperatorSubscriber(r,void 0,function(){u=!0,!l()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}pd.repeatWhen=a4});var OA=b(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.retry=void 0;var u4=G(),SA=Z(),s4=at(),c4=Dn(),l4=oe();function f4(e){e===void 0&&(e=1/0);var t;e&&typeof e=="object"?t=e:t={count:e};var r=t.count,n=r===void 0?1/0:r,i=t.delay,o=t.resetOnSuccess,a=o===void 0?!1:o;return n<=0?s4.identity:u4.operate(function(u,l){var s=0,c,d=function(){var f=!1;c=u.subscribe(SA.createOperatorSubscriber(l,function(p){a&&(s=0),l.next(p)},void 0,function(p){if(s++<n){var h=function(){c?(c.unsubscribe(),c=null,d()):f=!0};if(i!=null){var m=typeof i=="number"?c4.timer(i):l4.innerFrom(i(p,s)),g=SA.createOperatorSubscriber(l,function(){g.unsubscribe(),h()},function(){l.complete()});m.subscribe(g)}else h()}else l.error(p)})),f&&(c.unsubscribe(),c=null,d())};d()})}hd.retry=f4});var AA=b(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.retryWhen=void 0;var d4=oe(),p4=ut(),h4=G(),EA=Z();function m4(e){return h4.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(EA.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new p4.Subject,d4.innerFrom(e(o)).subscribe(EA.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}md.retryWhen=m4});var Gv=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.sample=void 0;var v4=oe(),g4=G(),b4=ot(),TA=Z();function _4(e){return g4.operate(function(t,r){var n=!1,i=null;t.subscribe(TA.createOperatorSubscriber(r,function(o){n=!0,i=o})),v4.innerFrom(e).subscribe(TA.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},b4.noop))})}vd.sample=_4});var PA=b(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.sampleTime=void 0;var y4=qt(),w4=Gv(),x4=Ev();function S4(e,t){return t===void 0&&(t=y4.asyncScheduler),w4.sample(x4.interval(e,t))}gd.sampleTime=S4});var RA=b(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.scan=void 0;var O4=G(),E4=kv();function A4(e,t){return O4.operate(E4.scanInternals(e,t,arguments.length>=2,!0))}bd.scan=A4});var CA=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.sequenceEqual=void 0;var T4=G(),P4=Z(),R4=oe();function M4(e,t){return t===void 0&&(t=function(r,n){return r===n}),T4.operate(function(r,n){var i=MA(),o=MA(),a=function(l){n.next(l),n.complete()},u=function(l,s){var c=P4.createOperatorSubscriber(n,function(d){var f=s.buffer,p=s.complete;f.length===0?p?a(!1):l.buffer.push(d):!t(d,f.shift())&&a(!1)},function(){l.complete=!0;var d=s.complete,f=s.buffer;d&&a(f.length===0),c?.unsubscribe()});return c};r.subscribe(u(i,o)),R4.innerFrom(e).subscribe(u(o,i))})}_d.sequenceEqual=M4;function MA(){return{buffer:[],complete:!1}}});var Kv=b(Yn=>{"use strict";var C4=Yn&&Yn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},k4=Yn&&Yn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.share=void 0;var kA=oe(),q4=ut(),qA=To(),I4=G();function j4(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new q4.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,u=e.resetOnRefCountZero,l=u===void 0?!0:u;return function(s){var c,d,f,p=0,h=!1,m=!1,g=function(){d?.unsubscribe(),d=void 0},_=function(){g(),c=f=void 0,h=m=!1},w=function(){var y=c;_(),y?.unsubscribe()};return I4.operate(function(y,x){p++,!m&&!h&&g();var O=f=f??r();x.add(function(){p--,p===0&&!m&&!h&&(d=$v(w,l))}),O.subscribe(x),!c&&p>0&&(c=new qA.SafeSubscriber({next:function(A){return O.next(A)},error:function(A){m=!0,g(),d=$v(_,i,A),O.error(A)},complete:function(){h=!0,g(),d=$v(_,a),O.complete()}}),kA.innerFrom(y).subscribe(c))})(s)}}Yn.share=j4;function $v(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t!==!1){var i=new qA.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return kA.innerFrom(t.apply(void 0,k4([],C4(r)))).subscribe(i)}}});var IA=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.shareReplay=void 0;var F4=Yc(),L4=Kv();function N4(e,t,r){var n,i,o,a,u=!1;return e&&typeof e=="object"?(n=e.bufferSize,a=n===void 0?1/0:n,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,u=o===void 0?!1:o,r=e.scheduler):a=e??1/0,L4.share({connector:function(){return new F4.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}yd.shareReplay=N4});var jA=b(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.single=void 0;var D4=In(),z4=_v(),B4=bv(),U4=G(),W4=Z();function H4(e){return U4.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(W4.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new z4.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new B4.NotFoundError("No matching values"):new D4.EmptyError)}))})}wd.single=H4});var FA=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.skip=void 0;var V4=Bi();function G4(e){return V4.filter(function(t,r){return e<=r})}xd.skip=G4});var LA=b(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.skipLast=void 0;var $4=at(),K4=G(),Y4=Z();function Z4(e){return e<=0?$4.identity:K4.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(Y4.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var u=a%e,l=n[u];n[u]=o,r.next(l)}})),function(){n=null}})}Sd.skipLast=Z4});var DA=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.skipUntil=void 0;var J4=G(),NA=Z(),X4=oe(),Q4=ot();function e7(e){return J4.operate(function(t,r){var n=!1,i=NA.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},Q4.noop);X4.innerFrom(e).subscribe(i),t.subscribe(NA.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}Od.skipUntil=e7});var zA=b(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.skipWhile=void 0;var t7=G(),r7=Z();function n7(e){return t7.operate(function(t,r){var n=!1,i=0;t.subscribe(r7.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}Ed.skipWhile=n7});var UA=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.startWith=void 0;var BA=Fu(),i7=It(),o7=G();function a7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i7.popScheduler(e);return o7.operate(function(n,i){(r?BA.concat(e,n,r):BA.concat(e,n)).subscribe(i)})}Ad.startWith=a7});var Bu=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.switchMap=void 0;var u7=oe(),s7=G(),WA=Z();function c7(e,t){return s7.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(WA.createOperatorSubscriber(n,function(l){i?.unsubscribe();var s=0,c=o++;u7.innerFrom(e(l,c)).subscribe(i=WA.createOperatorSubscriber(n,function(d){return n.next(t?t(l,d,c,s++):d)},function(){i=null,u()}))},function(){a=!0,u()}))})}Td.switchMap=c7});var HA=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.switchAll=void 0;var l7=Bu(),f7=at();function d7(){return l7.switchMap(f7.identity)}Pd.switchAll=d7});var GA=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.switchMapTo=void 0;var VA=Bu(),p7=we();function h7(e,t){return p7.isFunction(t)?VA.switchMap(function(){return e},t):VA.switchMap(function(){return e})}Rd.switchMapTo=h7});var $A=b(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.switchScan=void 0;var m7=Bu(),v7=G();function g7(e,t){return v7.operate(function(r,n){var i=t;return m7.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}Md.switchScan=g7});var KA=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.takeUntil=void 0;var b7=G(),_7=Z(),y7=oe(),w7=ot();function x7(e){return b7.operate(function(t,r){y7.innerFrom(e).subscribe(_7.createOperatorSubscriber(r,function(){return r.complete()},w7.noop)),!r.closed&&t.subscribe(r)})}Cd.takeUntil=x7});var YA=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.takeWhile=void 0;var S7=G(),O7=Z();function E7(e,t){return t===void 0&&(t=!1),S7.operate(function(r,n){var i=0;r.subscribe(O7.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}kd.takeWhile=E7});var ZA=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.tap=void 0;var A7=we(),T7=G(),P7=Z(),R7=at();function M7(e,t,r){var n=A7.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?T7.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(P7.createOperatorSubscriber(o,function(l){var s;(s=n.next)===null||s===void 0||s.call(n,l),o.next(l)},function(){var l;u=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},function(l){var s;u=!1,(s=n.error)===null||s===void 0||s.call(n,l),o.error(l)},function(){var l,s;u&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(s=n.finalize)===null||s===void 0||s.call(n)}))}):R7.identity}qd.tap=M7});var Yv=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.throttle=void 0;var C7=G(),JA=Z(),k7=oe();function q7(e,t){return C7.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,u=i.trailing,l=u===void 0?!1:u,s=!1,c=null,d=null,f=!1,p=function(){d?.unsubscribe(),d=null,l&&(g(),f&&n.complete())},h=function(){d=null,f&&n.complete()},m=function(_){return d=k7.innerFrom(e(_)).subscribe(JA.createOperatorSubscriber(n,p,h))},g=function(){if(s){s=!1;var _=c;c=null,n.next(_),!f&&m(_)}};r.subscribe(JA.createOperatorSubscriber(n,function(_){s=!0,c=_,!(d&&!d.closed)&&(a?g():m(_))},function(){f=!0,!(l&&s&&d&&!d.closed)&&n.complete()}))})}Id.throttle=q7});var XA=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.throttleTime=void 0;var I7=qt(),j7=Yv(),F7=Dn();function L7(e,t,r){t===void 0&&(t=I7.asyncScheduler);var n=F7.timer(e,t);return j7.throttle(function(){return n},r)}jd.throttleTime=L7});var eT=b(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.TimeInterval=oa.timeInterval=void 0;var N7=qt(),D7=G(),z7=Z();function B7(e){return e===void 0&&(e=N7.asyncScheduler),D7.operate(function(t,r){var n=e.now();t.subscribe(z7.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new QA(i,a))}))})}oa.timeInterval=B7;var QA=function(){function e(t,r){this.value=t,this.interval=r}return e}();oa.TimeInterval=QA});var tT=b(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.timeoutWith=void 0;var U7=qt(),W7=Cl(),H7=kl();function V7(e,t,r){var n,i,o;if(r=r??U7.async,W7.isValidDate(e)?n=e:typeof e=="number"&&(i=e),t)o=function(){return t};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return H7.timeout({first:n,each:i,scheduler:r,with:o})}Fd.timeoutWith=V7});var rT=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.timestamp=void 0;var G7=Kc(),$7=jn();function K7(e){return e===void 0&&(e=G7.dateTimestampProvider),$7.map(function(t){return{value:t,timestamp:e.now()}})}Ld.timestamp=K7});var oT=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.window=void 0;var nT=ut(),Y7=G(),iT=Z(),Z7=ot(),J7=oe();function X7(e){return Y7.operate(function(t,r){var n=new nT.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(iT.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),J7.innerFrom(e).subscribe(iT.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new nT.Subject)},Z7.noop,i)),function(){n?.unsubscribe(),n=null}})}Nd.window=X7});var uT=b(aa=>{"use strict";var Q7=aa&&aa.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(aa,"__esModule",{value:!0});aa.windowCount=void 0;var aT=ut(),eH=G(),tH=Z();function rH(e,t){t===void 0&&(t=0);var r=t>0?t:e;return eH.operate(function(n,i){var o=[new aT.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(tH.createOperatorSubscriber(i,function(l){var s,c;try{for(var d=Q7(o),f=d.next();!f.done;f=d.next()){var p=f.value;p.next(l)}}catch(g){s={error:g}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(s)throw s.error}}var h=u-e+1;if(h>=0&&h%r===0&&o.shift().complete(),++u%r===0){var m=new aT.Subject;o.push(m),i.next(m.asObservable())}},function(){for(;o.length>0;)o.shift().complete();i.complete()},function(l){for(;o.length>0;)o.shift().error(l);i.error(l)},function(){a=null,o=null}))})}aa.windowCount=rH});var cT=b(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.windowTime=void 0;var nH=ut(),iH=qt(),oH=Nt(),aH=G(),uH=Z(),sH=nn(),cH=It(),sT=on();function lH(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=cH.popScheduler(n))!==null&&t!==void 0?t:iH.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return aH.operate(function(l,s){var c=[],d=!1,f=function(g){var _=g.window,w=g.subs;_.complete(),w.unsubscribe(),sH.arrRemove(c,g),d&&p()},p=function(){if(c){var g=new oH.Subscription;s.add(g);var _=new nH.Subject,w={window:_,subs:g,seen:0};c.push(w),s.next(_.asObservable()),sT.executeSchedule(g,o,function(){return f(w)},e)}};a!==null&&a>=0?sT.executeSchedule(s,o,p,a,!0):d=!0,p();var h=function(g){return c.slice().forEach(g)},m=function(g){h(function(_){var w=_.window;return g(w)}),g(s),s.unsubscribe()};return l.subscribe(uH.createOperatorSubscriber(s,function(g){h(function(_){_.window.next(g),u<=++_.seen&&f(_)})},function(){return m(function(g){return g.complete()})},function(g){return m(function(_){return _.error(g)})})),function(){c=null}})}Dd.windowTime=lH});var dT=b(ua=>{"use strict";var fH=ua&&ua.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ua,"__esModule",{value:!0});ua.windowToggle=void 0;var dH=ut(),pH=Nt(),hH=G(),lT=oe(),Zv=Z(),fT=ot(),mH=nn();function vH(e,t){return hH.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};lT.innerFrom(e).subscribe(Zv.createOperatorSubscriber(n,function(a){var u=new dH.Subject;i.push(u);var l=new pH.Subscription,s=function(){mH.arrRemove(i,u),u.complete(),l.unsubscribe()},c;try{c=lT.innerFrom(t(a))}catch(d){o(d);return}n.next(u.asObservable()),l.add(c.subscribe(Zv.createOperatorSubscriber(n,s,fT.noop,o)))},fT.noop)),r.subscribe(Zv.createOperatorSubscriber(n,function(a){var u,l,s=i.slice();try{for(var c=fH(s),d=c.next();!d.done;d=c.next()){var f=d.value;f.next(a)}}catch(p){u={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(u)throw u.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},o,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}ua.windowToggle=vH});var hT=b(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.windowWhen=void 0;var gH=ut(),bH=G(),pT=Z(),_H=oe();function yH(e){return bH.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new gH.Subject,r.next(n.asObservable());var u;try{u=_H.innerFrom(e())}catch(l){o(l);return}u.subscribe(i=pT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(pT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}zd.windowWhen=yH});var bT=b(Zn=>{"use strict";var mT=Zn&&Zn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},vT=Zn&&Zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.withLatestFrom=void 0;var wH=G(),gT=Z(),xH=oe(),SH=at(),OH=ot(),EH=It();function AH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=EH.popResultSelector(e);return wH.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),l=!1,s=function(d){xH.innerFrom(e[d]).subscribe(gT.createOperatorSubscriber(i,function(f){a[d]=f,!l&&!u[d]&&(u[d]=!0,(l=u.every(SH.identity))&&(u=null))},OH.noop))},c=0;c<o;c++)s(c);n.subscribe(gT.createOperatorSubscriber(i,function(d){if(l){var f=vT([d],mT(a));i.next(r?r.apply(void 0,vT([],mT(f))):f)}}))})}Zn.withLatestFrom=AH});var _T=b(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.zipAll=void 0;var TH=cf(),PH=Iv();function RH(e){return PH.joinAllInternals(TH.zip,e)}Bd.zipAll=RH});var yT=b(Jn=>{"use strict";var MH=Jn&&Jn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},CH=Jn&&Jn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.zip=void 0;var kH=cf(),qH=G();function IH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return qH.operate(function(r,n){kH.zip.apply(void 0,CH([r],MH(e))).subscribe(n)})}Jn.zip=IH});var wT=b(Xn=>{"use strict";var jH=Xn&&Xn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},FH=Xn&&Xn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.zipWith=void 0;var LH=yT();function NH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return LH.zip.apply(void 0,FH([],jH(e)))}Xn.zipWith=NH});var PT=b(v=>{"use strict";var DH=v&&v.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),zH=v&&v.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&DH(t,e,r)};Object.defineProperty(v,"__esModule",{value:!0});v.interval=v.iif=v.generate=v.fromEventPattern=v.fromEvent=v.from=v.forkJoin=v.empty=v.defer=v.connectable=v.concat=v.combineLatest=v.bindNodeCallback=v.bindCallback=v.UnsubscriptionError=v.TimeoutError=v.SequenceError=v.ObjectUnsubscribedError=v.NotFoundError=v.EmptyError=v.ArgumentOutOfRangeError=v.firstValueFrom=v.lastValueFrom=v.isObservable=v.identity=v.noop=v.pipe=v.NotificationKind=v.Notification=v.Subscriber=v.Subscription=v.Scheduler=v.VirtualAction=v.VirtualTimeScheduler=v.animationFrameScheduler=v.animationFrame=v.queueScheduler=v.queue=v.asyncScheduler=v.async=v.asapScheduler=v.asap=v.AsyncSubject=v.ReplaySubject=v.BehaviorSubject=v.Subject=v.animationFrames=v.observable=v.ConnectableObservable=v.Observable=void 0;v.filter=v.expand=v.exhaustMap=v.exhaustAll=v.exhaust=v.every=v.endWith=v.elementAt=v.distinctUntilKeyChanged=v.distinctUntilChanged=v.distinct=v.dematerialize=v.delayWhen=v.delay=v.defaultIfEmpty=v.debounceTime=v.debounce=v.count=v.connect=v.concatWith=v.concatMapTo=v.concatMap=v.concatAll=v.combineLatestWith=v.combineLatestAll=v.combineAll=v.catchError=v.bufferWhen=v.bufferToggle=v.bufferTime=v.bufferCount=v.buffer=v.auditTime=v.audit=v.config=v.NEVER=v.EMPTY=v.scheduled=v.zip=v.using=v.timer=v.throwError=v.range=v.race=v.partition=v.pairs=v.onErrorResumeNext=v.of=v.never=v.merge=void 0;v.switchMap=v.switchAll=v.subscribeOn=v.startWith=v.skipWhile=v.skipUntil=v.skipLast=v.skip=v.single=v.shareReplay=v.share=v.sequenceEqual=v.scan=v.sampleTime=v.sample=v.refCount=v.retryWhen=v.retry=v.repeatWhen=v.repeat=v.reduce=v.raceWith=v.publishReplay=v.publishLast=v.publishBehavior=v.publish=v.pluck=v.pairwise=v.onErrorResumeNextWith=v.observeOn=v.multicast=v.min=v.mergeWith=v.mergeScan=v.mergeMapTo=v.mergeMap=v.flatMap=v.mergeAll=v.max=v.materialize=v.mapTo=v.map=v.last=v.isEmpty=v.ignoreElements=v.groupBy=v.first=v.findIndex=v.find=v.finalize=void 0;v.zipWith=v.zipAll=v.withLatestFrom=v.windowWhen=v.windowToggle=v.windowTime=v.windowCount=v.window=v.toArray=v.timestamp=v.timeoutWith=v.timeout=v.timeInterval=v.throwIfEmpty=v.throttleTime=v.throttle=v.tap=v.takeWhile=v.takeUntil=v.takeLast=v.take=v.switchScan=v.switchMapTo=void 0;var BH=Oe();Object.defineProperty(v,"Observable",{enumerable:!0,get:function(){return BH.Observable}});var UH=Ru();Object.defineProperty(v,"ConnectableObservable",{enumerable:!0,get:function(){return UH.ConnectableObservable}});var WH=Tu();Object.defineProperty(v,"observable",{enumerable:!0,get:function(){return WH.observable}});var HH=AS();Object.defineProperty(v,"animationFrames",{enumerable:!0,get:function(){return HH.animationFrames}});var VH=ut();Object.defineProperty(v,"Subject",{enumerable:!0,get:function(){return VH.Subject}});var GH=ev();Object.defineProperty(v,"BehaviorSubject",{enumerable:!0,get:function(){return GH.BehaviorSubject}});var $H=Yc();Object.defineProperty(v,"ReplaySubject",{enumerable:!0,get:function(){return $H.ReplaySubject}});var KH=Zc();Object.defineProperty(v,"AsyncSubject",{enumerable:!0,get:function(){return KH.AsyncSubject}});var xT=WS();Object.defineProperty(v,"asap",{enumerable:!0,get:function(){return xT.asap}});Object.defineProperty(v,"asapScheduler",{enumerable:!0,get:function(){return xT.asapScheduler}});var ST=qt();Object.defineProperty(v,"async",{enumerable:!0,get:function(){return ST.async}});Object.defineProperty(v,"asyncScheduler",{enumerable:!0,get:function(){return ST.asyncScheduler}});var OT=GS();Object.defineProperty(v,"queue",{enumerable:!0,get:function(){return OT.queue}});Object.defineProperty(v,"queueScheduler",{enumerable:!0,get:function(){return OT.queueScheduler}});var ET=ZS();Object.defineProperty(v,"animationFrame",{enumerable:!0,get:function(){return ET.animationFrame}});Object.defineProperty(v,"animationFrameScheduler",{enumerable:!0,get:function(){return ET.animationFrameScheduler}});var AT=QS();Object.defineProperty(v,"VirtualTimeScheduler",{enumerable:!0,get:function(){return AT.VirtualTimeScheduler}});Object.defineProperty(v,"VirtualAction",{enumerable:!0,get:function(){return AT.VirtualAction}});var YH=rv();Object.defineProperty(v,"Scheduler",{enumerable:!0,get:function(){return YH.Scheduler}});var ZH=Nt();Object.defineProperty(v,"Subscription",{enumerable:!0,get:function(){return ZH.Subscription}});var JH=To();Object.defineProperty(v,"Subscriber",{enumerable:!0,get:function(){return JH.Subscriber}});var TT=xl();Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return TT.Notification}});Object.defineProperty(v,"NotificationKind",{enumerable:!0,get:function(){return TT.NotificationKind}});var XH=Pu();Object.defineProperty(v,"pipe",{enumerable:!0,get:function(){return XH.pipe}});var QH=ot();Object.defineProperty(v,"noop",{enumerable:!0,get:function(){return QH.noop}});var eV=at();Object.defineProperty(v,"identity",{enumerable:!0,get:function(){return eV.identity}});var tV=vO();Object.defineProperty(v,"isObservable",{enumerable:!0,get:function(){return tV.isObservable}});var rV=gO();Object.defineProperty(v,"lastValueFrom",{enumerable:!0,get:function(){return rV.lastValueFrom}});var nV=bO();Object.defineProperty(v,"firstValueFrom",{enumerable:!0,get:function(){return nV.firstValueFrom}});var iV=gv();Object.defineProperty(v,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return iV.ArgumentOutOfRangeError}});var oV=In();Object.defineProperty(v,"EmptyError",{enumerable:!0,get:function(){return oV.EmptyError}});var aV=bv();Object.defineProperty(v,"NotFoundError",{enumerable:!0,get:function(){return aV.NotFoundError}});var uV=Zm();Object.defineProperty(v,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return uV.ObjectUnsubscribedError}});var sV=_v();Object.defineProperty(v,"SequenceError",{enumerable:!0,get:function(){return sV.SequenceError}});var cV=kl();Object.defineProperty(v,"TimeoutError",{enumerable:!0,get:function(){return cV.TimeoutError}});var lV=Lm();Object.defineProperty(v,"UnsubscriptionError",{enumerable:!0,get:function(){return lV.UnsubscriptionError}});var fV=yO();Object.defineProperty(v,"bindCallback",{enumerable:!0,get:function(){return fV.bindCallback}});var dV=wO();Object.defineProperty(v,"bindNodeCallback",{enumerable:!0,get:function(){return dV.bindNodeCallback}});var pV=Nl();Object.defineProperty(v,"combineLatest",{enumerable:!0,get:function(){return pV.combineLatest}});var hV=Fu();Object.defineProperty(v,"concat",{enumerable:!0,get:function(){return hV.concat}});var mV=RO();Object.defineProperty(v,"connectable",{enumerable:!0,get:function(){return mV.connectable}});var vV=Lu();Object.defineProperty(v,"defer",{enumerable:!0,get:function(){return vV.defer}});var gV=_r();Object.defineProperty(v,"empty",{enumerable:!0,get:function(){return gV.empty}});var bV=MO();Object.defineProperty(v,"forkJoin",{enumerable:!0,get:function(){return bV.forkJoin}});var _V=an();Object.defineProperty(v,"from",{enumerable:!0,get:function(){return _V.from}});var yV=kO();Object.defineProperty(v,"fromEvent",{enumerable:!0,get:function(){return yV.fromEvent}});var wV=IO();Object.defineProperty(v,"fromEventPattern",{enumerable:!0,get:function(){return wV.fromEventPattern}});var xV=FO();Object.defineProperty(v,"generate",{enumerable:!0,get:function(){return xV.generate}});var SV=LO();Object.defineProperty(v,"iif",{enumerable:!0,get:function(){return SV.iif}});var OV=Ev();Object.defineProperty(v,"interval",{enumerable:!0,get:function(){return OV.interval}});var EV=DO();Object.defineProperty(v,"merge",{enumerable:!0,get:function(){return EV.merge}});var AV=Av();Object.defineProperty(v,"never",{enumerable:!0,get:function(){return AV.never}});var TV=yl();Object.defineProperty(v,"of",{enumerable:!0,get:function(){return TV.of}});var PV=Tv();Object.defineProperty(v,"onErrorResumeNext",{enumerable:!0,get:function(){return PV.onErrorResumeNext}});var RV=BO();Object.defineProperty(v,"pairs",{enumerable:!0,get:function(){return RV.pairs}});var MV=VO();Object.defineProperty(v,"partition",{enumerable:!0,get:function(){return MV.partition}});var CV=Pv();Object.defineProperty(v,"race",{enumerable:!0,get:function(){return CV.race}});var kV=KO();Object.defineProperty(v,"range",{enumerable:!0,get:function(){return kV.range}});var qV=vv();Object.defineProperty(v,"throwError",{enumerable:!0,get:function(){return qV.throwError}});var IV=Dn();Object.defineProperty(v,"timer",{enumerable:!0,get:function(){return IV.timer}});var jV=YO();Object.defineProperty(v,"using",{enumerable:!0,get:function(){return jV.using}});var FV=cf();Object.defineProperty(v,"zip",{enumerable:!0,get:function(){return FV.zip}});var LV=mv();Object.defineProperty(v,"scheduled",{enumerable:!0,get:function(){return LV.scheduled}});var NV=_r();Object.defineProperty(v,"EMPTY",{enumerable:!0,get:function(){return NV.EMPTY}});var DV=Av();Object.defineProperty(v,"NEVER",{enumerable:!0,get:function(){return DV.NEVER}});zH(JO(),v);var zV=Eo();Object.defineProperty(v,"config",{enumerable:!0,get:function(){return zV.config}});var BV=Rv();Object.defineProperty(v,"audit",{enumerable:!0,get:function(){return BV.audit}});var UV=QO();Object.defineProperty(v,"auditTime",{enumerable:!0,get:function(){return UV.auditTime}});var WV=tE();Object.defineProperty(v,"buffer",{enumerable:!0,get:function(){return WV.buffer}});var HV=rE();Object.defineProperty(v,"bufferCount",{enumerable:!0,get:function(){return HV.bufferCount}});var VV=iE();Object.defineProperty(v,"bufferTime",{enumerable:!0,get:function(){return VV.bufferTime}});var GV=uE();Object.defineProperty(v,"bufferToggle",{enumerable:!0,get:function(){return GV.bufferToggle}});var $V=cE();Object.defineProperty(v,"bufferWhen",{enumerable:!0,get:function(){return $V.bufferWhen}});var KV=fE();Object.defineProperty(v,"catchError",{enumerable:!0,get:function(){return KV.catchError}});var YV=dE();Object.defineProperty(v,"combineAll",{enumerable:!0,get:function(){return YV.combineAll}});var ZV=jv();Object.defineProperty(v,"combineLatestAll",{enumerable:!0,get:function(){return ZV.combineLatestAll}});var JV=gE();Object.defineProperty(v,"combineLatestWith",{enumerable:!0,get:function(){return JV.combineLatestWith}});var XV=Hl();Object.defineProperty(v,"concatAll",{enumerable:!0,get:function(){return XV.concatAll}});var QV=Fv();Object.defineProperty(v,"concatMap",{enumerable:!0,get:function(){return QV.concatMap}});var eG=yE();Object.defineProperty(v,"concatMapTo",{enumerable:!0,get:function(){return eG.concatMapTo}});var tG=xE();Object.defineProperty(v,"concatWith",{enumerable:!0,get:function(){return tG.concatWith}});var rG=Ef();Object.defineProperty(v,"connect",{enumerable:!0,get:function(){return rG.connect}});var nG=OE();Object.defineProperty(v,"count",{enumerable:!0,get:function(){return nG.count}});var iG=AE();Object.defineProperty(v,"debounce",{enumerable:!0,get:function(){return iG.debounce}});var oG=TE();Object.defineProperty(v,"debounceTime",{enumerable:!0,get:function(){return oG.debounceTime}});var aG=Nu();Object.defineProperty(v,"defaultIfEmpty",{enumerable:!0,get:function(){return aG.defaultIfEmpty}});var uG=ME();Object.defineProperty(v,"delay",{enumerable:!0,get:function(){return uG.delay}});var sG=Dv();Object.defineProperty(v,"delayWhen",{enumerable:!0,get:function(){return sG.delayWhen}});var cG=CE();Object.defineProperty(v,"dematerialize",{enumerable:!0,get:function(){return cG.dematerialize}});var lG=qE();Object.defineProperty(v,"distinct",{enumerable:!0,get:function(){return lG.distinct}});var fG=zv();Object.defineProperty(v,"distinctUntilChanged",{enumerable:!0,get:function(){return fG.distinctUntilChanged}});var dG=IE();Object.defineProperty(v,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return dG.distinctUntilKeyChanged}});var pG=FE();Object.defineProperty(v,"elementAt",{enumerable:!0,get:function(){return pG.elementAt}});var hG=LE();Object.defineProperty(v,"endWith",{enumerable:!0,get:function(){return hG.endWith}});var mG=NE();Object.defineProperty(v,"every",{enumerable:!0,get:function(){return mG.every}});var vG=UE();Object.defineProperty(v,"exhaust",{enumerable:!0,get:function(){return vG.exhaust}});var gG=Uv();Object.defineProperty(v,"exhaustAll",{enumerable:!0,get:function(){return gG.exhaustAll}});var bG=Bv();Object.defineProperty(v,"exhaustMap",{enumerable:!0,get:function(){return bG.exhaustMap}});var _G=WE();Object.defineProperty(v,"expand",{enumerable:!0,get:function(){return _G.expand}});var yG=Bi();Object.defineProperty(v,"filter",{enumerable:!0,get:function(){return yG.filter}});var wG=HE();Object.defineProperty(v,"finalize",{enumerable:!0,get:function(){return wG.finalize}});var xG=Wv();Object.defineProperty(v,"find",{enumerable:!0,get:function(){return xG.find}});var SG=GE();Object.defineProperty(v,"findIndex",{enumerable:!0,get:function(){return SG.findIndex}});var OG=$E();Object.defineProperty(v,"first",{enumerable:!0,get:function(){return OG.first}});var EG=YE();Object.defineProperty(v,"groupBy",{enumerable:!0,get:function(){return EG.groupBy}});var AG=Lv();Object.defineProperty(v,"ignoreElements",{enumerable:!0,get:function(){return AG.ignoreElements}});var TG=ZE();Object.defineProperty(v,"isEmpty",{enumerable:!0,get:function(){return TG.isEmpty}});var PG=JE();Object.defineProperty(v,"last",{enumerable:!0,get:function(){return PG.last}});var RG=jn();Object.defineProperty(v,"map",{enumerable:!0,get:function(){return RG.map}});var MG=Nv();Object.defineProperty(v,"mapTo",{enumerable:!0,get:function(){return MG.mapTo}});var CG=XE();Object.defineProperty(v,"materialize",{enumerable:!0,get:function(){return CG.materialize}});var kG=QE();Object.defineProperty(v,"max",{enumerable:!0,get:function(){return kG.max}});var qG=ju();Object.defineProperty(v,"mergeAll",{enumerable:!0,get:function(){return qG.mergeAll}});var IG=eA();Object.defineProperty(v,"flatMap",{enumerable:!0,get:function(){return IG.flatMap}});var jG=sn();Object.defineProperty(v,"mergeMap",{enumerable:!0,get:function(){return jG.mergeMap}});var FG=rA();Object.defineProperty(v,"mergeMapTo",{enumerable:!0,get:function(){return FG.mergeMapTo}});var LG=nA();Object.defineProperty(v,"mergeScan",{enumerable:!0,get:function(){return LG.mergeScan}});var NG=aA();Object.defineProperty(v,"mergeWith",{enumerable:!0,get:function(){return NG.mergeWith}});var DG=uA();Object.defineProperty(v,"min",{enumerable:!0,get:function(){return DG.min}});var zG=od();Object.defineProperty(v,"multicast",{enumerable:!0,get:function(){return zG.multicast}});var BG=qu();Object.defineProperty(v,"observeOn",{enumerable:!0,get:function(){return BG.observeOn}});var UG=lA();Object.defineProperty(v,"onErrorResumeNextWith",{enumerable:!0,get:function(){return UG.onErrorResumeNextWith}});var WG=fA();Object.defineProperty(v,"pairwise",{enumerable:!0,get:function(){return WG.pairwise}});var HG=dA();Object.defineProperty(v,"pluck",{enumerable:!0,get:function(){return HG.pluck}});var VG=pA();Object.defineProperty(v,"publish",{enumerable:!0,get:function(){return VG.publish}});var GG=hA();Object.defineProperty(v,"publishBehavior",{enumerable:!0,get:function(){return GG.publishBehavior}});var $G=mA();Object.defineProperty(v,"publishLast",{enumerable:!0,get:function(){return $G.publishLast}});var KG=gA();Object.defineProperty(v,"publishReplay",{enumerable:!0,get:function(){return KG.publishReplay}});var YG=bA();Object.defineProperty(v,"raceWith",{enumerable:!0,get:function(){return YG.raceWith}});var ZG=ra();Object.defineProperty(v,"reduce",{enumerable:!0,get:function(){return ZG.reduce}});var JG=yA();Object.defineProperty(v,"repeat",{enumerable:!0,get:function(){return JG.repeat}});var XG=xA();Object.defineProperty(v,"repeatWhen",{enumerable:!0,get:function(){return XG.repeatWhen}});var QG=OA();Object.defineProperty(v,"retry",{enumerable:!0,get:function(){return QG.retry}});var e9=AA();Object.defineProperty(v,"retryWhen",{enumerable:!0,get:function(){return e9.retryWhen}});var t9=Km();Object.defineProperty(v,"refCount",{enumerable:!0,get:function(){return t9.refCount}});var r9=Gv();Object.defineProperty(v,"sample",{enumerable:!0,get:function(){return r9.sample}});var n9=PA();Object.defineProperty(v,"sampleTime",{enumerable:!0,get:function(){return n9.sampleTime}});var i9=RA();Object.defineProperty(v,"scan",{enumerable:!0,get:function(){return i9.scan}});var o9=CA();Object.defineProperty(v,"sequenceEqual",{enumerable:!0,get:function(){return o9.sequenceEqual}});var a9=Kv();Object.defineProperty(v,"share",{enumerable:!0,get:function(){return a9.share}});var u9=IA();Object.defineProperty(v,"shareReplay",{enumerable:!0,get:function(){return u9.shareReplay}});var s9=jA();Object.defineProperty(v,"single",{enumerable:!0,get:function(){return s9.single}});var c9=FA();Object.defineProperty(v,"skip",{enumerable:!0,get:function(){return c9.skip}});var l9=LA();Object.defineProperty(v,"skipLast",{enumerable:!0,get:function(){return l9.skipLast}});var f9=DA();Object.defineProperty(v,"skipUntil",{enumerable:!0,get:function(){return f9.skipUntil}});var d9=zA();Object.defineProperty(v,"skipWhile",{enumerable:!0,get:function(){return d9.skipWhile}});var p9=UA();Object.defineProperty(v,"startWith",{enumerable:!0,get:function(){return p9.startWith}});var h9=Iu();Object.defineProperty(v,"subscribeOn",{enumerable:!0,get:function(){return h9.subscribeOn}});var m9=HA();Object.defineProperty(v,"switchAll",{enumerable:!0,get:function(){return m9.switchAll}});var v9=Bu();Object.defineProperty(v,"switchMap",{enumerable:!0,get:function(){return v9.switchMap}});var g9=GA();Object.defineProperty(v,"switchMapTo",{enumerable:!0,get:function(){return g9.switchMapTo}});var b9=$A();Object.defineProperty(v,"switchScan",{enumerable:!0,get:function(){return b9.switchScan}});var _9=Du();Object.defineProperty(v,"take",{enumerable:!0,get:function(){return _9.take}});var y9=Hv();Object.defineProperty(v,"takeLast",{enumerable:!0,get:function(){return y9.takeLast}});var w9=KA();Object.defineProperty(v,"takeUntil",{enumerable:!0,get:function(){return w9.takeUntil}});var x9=YA();Object.defineProperty(v,"takeWhile",{enumerable:!0,get:function(){return x9.takeWhile}});var S9=ZA();Object.defineProperty(v,"tap",{enumerable:!0,get:function(){return S9.tap}});var O9=Yv();Object.defineProperty(v,"throttle",{enumerable:!0,get:function(){return O9.throttle}});var E9=XA();Object.defineProperty(v,"throttleTime",{enumerable:!0,get:function(){return E9.throttleTime}});var A9=zu();Object.defineProperty(v,"throwIfEmpty",{enumerable:!0,get:function(){return A9.throwIfEmpty}});var T9=eT();Object.defineProperty(v,"timeInterval",{enumerable:!0,get:function(){return T9.timeInterval}});var P9=kl();Object.defineProperty(v,"timeout",{enumerable:!0,get:function(){return P9.timeout}});var R9=tT();Object.defineProperty(v,"timeoutWith",{enumerable:!0,get:function(){return R9.timeoutWith}});var M9=rT();Object.defineProperty(v,"timestamp",{enumerable:!0,get:function(){return M9.timestamp}});var C9=qv();Object.defineProperty(v,"toArray",{enumerable:!0,get:function(){return C9.toArray}});var k9=oT();Object.defineProperty(v,"window",{enumerable:!0,get:function(){return k9.window}});var q9=uT();Object.defineProperty(v,"windowCount",{enumerable:!0,get:function(){return q9.windowCount}});var I9=cT();Object.defineProperty(v,"windowTime",{enumerable:!0,get:function(){return I9.windowTime}});var j9=dT();Object.defineProperty(v,"windowToggle",{enumerable:!0,get:function(){return j9.windowToggle}});var F9=hT();Object.defineProperty(v,"windowWhen",{enumerable:!0,get:function(){return F9.windowWhen}});var L9=bT();Object.defineProperty(v,"withLatestFrom",{enumerable:!0,get:function(){return L9.withLatestFrom}});var N9=_T();Object.defineProperty(v,"zipAll",{enumerable:!0,get:function(){return N9.zipAll}});var D9=wT();Object.defineProperty(v,"zipWith",{enumerable:!0,get:function(){return D9.zipWith}})});var Xv=b(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.checkAbortSignal=MT;Ui.abortBreakPoint=B9;Ui.makeAbortError=CT;Ui.observeAbortSignal=U9;Ui.isAbortException=W9;var RT=PT(),Jv=class extends Error{};function MT(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw CT()}}function z9(e){return new Promise(t=>setTimeout(t,e))}async function B9(e){await z9(1),MT(e)}function CT(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Jv("aborted");return e.code="ERR_ABORTED",e}function U9(e){return e?(0,RT.fromEvent)(e,"abort"):new RT.Observable}function W9(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var kT=b(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});eg.makeAbortableReaction=G9;var H9=Oc(),Uu=vt(),V9=Xv(),Qv=om();function G9(e,t,r,n,i,o,a){let u;function l(s){(0,V9.isAbortException)(s)||(console.error(s),(0,Uu.isAlive)(e)&&a(s))}(0,Uu.addDisposer)(e,(0,H9.reaction)(()=>{try{return t(e)}catch(s){l(s);return}},async(s,c)=>{if(u&&(0,Qv.stopStopToken)(u),!!(0,Uu.isAlive)(e)){u=(0,Qv.createStopToken)(),i(u);try{let d=await r(s,u,e,c);(0,Uu.isAlive)(e)&&o(d)}catch(d){l(d)}}},n)),(0,Uu.addDisposer)(e,()=>{u&&(0,Qv.stopStopToken)(u)})}});var xo=b(L=>{"use strict";var $9=L&&L.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Hi=L&&L.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&$9(t,e,r)},qT=L&&L.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L,"__esModule",{value:!0});L.makeAbortableReaction=L.blobToDataURL=L.isFeature=L.SimpleFeature=L.defaultCodonTable=L.defaultStops=L.defaultStarts=L.rIC=L.complementTable=L.isElectron=void 0;L.useDebounce=Q9;L.useWidthSetter=e$;L.useDebouncedCallback=t$;L.findParentThat=IT;L.springAnimate=r$;L.findParentThatIs=Hu;L.getSession=n$;L.getContainingView=jT;L.getContainingTrack=i$;L.getContainingDisplay=o$;L.assembleLocString=a$;L.assembleLocStringFast=FT;L.parseLocStringOneBased=LT;L.parseLocString=tg;L.compareLocs=NT;L.compareLocStrings=u$;L.clamp=s$;L.bpToPx=rg;L.radToDeg=d$;L.degToRad=p$;L.polarToCartesian=h$;L.cartesianToPolar=m$;L.featureSpanPx=v$;L.bpSpanPx=DT;L.iterMap=g$;L.findLastIndex=b$;L.findLast=_$;L.renameRegionIfNeeded=zT;L.renameRegionsIfNeeded=y$;L.minmax=w$;L.shorten=BT;L.stringify=x$;L.revcom=S$;L.reverse=O$;L.complement=E$;L.measureText=UT;L.getFrame=T$;L.generateCodonTable=P$;L.updateStatus=ng;L.updateStatus2=R$;L.hashCode=WT;L.objectHash=M$;L.bytesForRegions=C$;L.isSupportedIndexingAdapter=k$;L.getBpDisplayStr=q$;L.toLocale=sa;L.getTickDisplayStr=I$;L.getViewParams=j$;L.getLayoutId=F$;L.useLocalStorage=L$;L.getUriLink=HT;L.getStr=VT;L.coarseStripHTML=GT;L.linkify=N$;L.measureGridWidth=D$;L.getEnv=z$;L.localStorageGetItem=og;L.localStorageSetItem=B$;L.max=$T;L.min=U$;L.sum=KT;L.avg=W$;L.groupBy=H$;L.notEmpty=V$;L.mergeIntervals=YT;L.gatherOverlaps=G$;L.stripAlpha=$$;L.getStrokeProps=K$;L.getFillProps=Y$;L.renderToStaticMarkup=Z$;L.isGzip=ZT;L.fetchAndMaybeUnzip=JT;L.fetchAndMaybeUnzipText=J$;L.isObject=XT;L.localStorageGetNumber=X$;L.localStorageGetBoolean=Q$;L.testAdapter=eK;var Wi=Ye(),K9=Jp(),Y9=qT(b1()),yr=vt(),Z9=Xs(),J9=y1(),ig=D1(),X9=om(),Wu=Sc();Hi(Sc(),L);Hi(Dx(),L);Hi(zx(),L);Hi(Bx(),L);Hi(km(),L);Hi(Qx(),L);function Q9(e,t){let[r,n]=(0,Wi.useState)(e);return(0,Wi.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function e$(e,t){let[r,{width:n}]=(0,Y9.default)();return(0,Wi.useEffect)(()=>{n&&(0,yr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function t$(e,t=400){let r=(0,Wi.useRef)(null),n=(0,Wi.useRef)(null);return(0,Wi.useEffect)(()=>{n.current&&clearTimeout(n.current)},[]),function(...o){r.current=o,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current&&e(...r.current)},t)}}function IT(e,t){if(!(0,yr.hasParent)(e))throw new Error("node does not have parent");let r=(0,yr.getParent)(e);for(;r&&(0,yr.isAlive)(r);){if(t(r))return r;if((0,yr.hasParent)(r))r=(0,yr.getParent)(r);else break}throw new Error("no matching node found")}function r$(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function c(d){let f=Date.now(),p=d.lastPosition,h=d.lastTime||f,m=d.lastVelocity||0;f>h+64&&(h=f);let g=Math.floor(f-h);for(let O=0;O<g;++O){let A=-o*(p-t),T=-a*m,R=(A+T)/1;m+=R*1/1e3,p+=m*1/1e3}let _=Math.abs(m)<=i,w=o!==0?Math.abs(t-p)<=i:!0;(u&&o!==0?e<t?p>t:p<t:!1)||_&&w?(r(t),n()):(r(p),s=requestAnimationFrame(()=>{c({lastPosition:p,lastTime:f,lastVelocity:m})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Hu(e,t){return IT(e,t)}function n$(e){try{return Hu(e,Wu.isSessionModel)}catch{throw new Error("no session model found!")}}function jT(e){try{return Hu(e,Wu.isViewModel)}catch{throw new Error("no containing view found")}}function i$(e){try{return Hu(e,Wu.isTrackModel)}catch{throw new Error("no containing track found")}}function o$(e){try{return Hu(e,Wu.isDisplayModel)}catch{throw new Error("no containing display found")}}function a$(e){return FT(e,sa)}function FT(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,u=r?`{${r}}`:"",l;i!==void 0?l=`:${t(i+1)}`:o!==void 0?l=":1":l="";let s;o!==void 0?s=i!==void 0&&i+1===o?"":`..${t(o)}`:s=i!==void 0?"..":"";let c="";return a&&(c="[rev]"),`${u}${n}${l}${s}${c}`}function LT(e,t){if(!e)throw new Error("no location string provided, could not parse");let r=!1;e.endsWith("[rev]")&&(r=!0,e=e.replace(/\[rev]$/,"")),e=e.replace(/\s/,"");let n=/({(.+)})?(.+)/.exec(e);if(!n)throw new Error(`invalid location string: "${e}"`);let[,,i,o]=n,a=i,u=o;if(!a&&u.startsWith("{}"))throw new Error(`no assembly name was provided in location "${u}"`);let l=u.lastIndexOf(":");if(l===-1){if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`Unknown reference sequence "${u}"`)}let s=u.slice(0,l),c=u.slice(l+1);if(t(s,a)&&t(u,a))throw new Error(`ambiguous location string: "${e}"`);if(t(s,a))if(c){let d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(c),f=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(d){let[,p,,,,h]=d;if(p!==void 0&&h!==void 0)return{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+h.replaceAll(",",""),reversed:r}}else if(f){let[,p,,,h]=f;if(p!==void 0)return h?{assemblyName:a,refName:s,start:+p.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+p.replaceAll(",",""),reversed:r}}else throw new Error(`could not parse range "${c}" on location "${e}"`)}else return{assemblyName:a,refName:s,reversed:r};else if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`unknown reference sequence name in location "${e}"`)}function tg(e,t){let r=LT(e,t);return typeof r.start=="number"&&(r.start-=1),r}function NT(e,t){let r=e.assemblyName||t.assemblyName?(e.assemblyName||"").localeCompare(t.assemblyName||""):0;if(r)return r;let n=e.refName||t.refName?(e.refName||"").localeCompare(t.refName||""):0;if(n)return n;if(e.start!==void 0&&t.start!==void 0){let i=e.start-t.start;if(i)return i}if(e.end!==void 0&&t.end!==void 0){let i=e.end-t.end;if(i)return i}return 0}function u$(e,t,r){let n=tg(e,r),i=tg(t,r);return NT(n,i)}function s$(e,t,r){return e<t?t:e>r?r:e}function c$(e){return Math.round(e*10)/10}function rg(e,{reversed:t,end:r=0,start:n=0},i){return c$((t?r-e:e-n)/i)}var l$=180/Math.PI,f$=Math.PI/180;function d$(e){return e*l$%360}function p$(e){return e*f$%(2*Math.PI)}function h$(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function m$(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function v$(e,t,r){return DT(e.get("start"),e.get("end"),t,r)}function DT(e,t,r,n){let i=rg(e,r,n),o=rg(t,r,n);return r.reversed?[o,i]:[i,o]}function g$(e,t,r){let n=Array.from({length:r||0}),i=0;for(let o of e)n[i]=t(o),i+=1;return n}function b$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function _$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function zT(e,t){if((0,yr.isStateTreeNode)(t)&&!(0,yr.isAlive)(t))return t;if(e?.[t.refName]){t=(0,yr.isStateTreeNode)(t)?{...(0,yr.getSnapshot)(t)}:{...t};let r=e[t.refName];if(r)return{...t,refName:r,originalRefName:t.refName}}return t}async function y$(e,t){let{regions:r=[],adapterConfig:n}=t;if(!t.sessionId)throw new Error("sessionId is required");let i=r.map(a=>a.assemblyName),o=Object.fromEntries(await Promise.all([...new Set(i)].map(async a=>[a,await e.getRefNameMapForAdapter(n,a,t)])));return{...t,regions:r.map((a,u)=>zT(o[i[u]],a))}}function w$(e,t){return[Math.min(e,t),Math.max(e,t)]}function BT(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function x$({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${BT(e)}:${sa(t)}${n?" (out of bounds)":""}`:""].join("")}L.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");L.complementTable={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"};function S$(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=L.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function O$(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function E$(e){var t;let r="";for(let n=0;n<e.length;n++)r+=(t=L.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}L.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var A$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2796875,.2765625,.3546875,.5546875,.5546875,.8890625,.665625,.190625,.3328125,.3328125,.3890625,.5828125,.2765625,.3328125,.2765625,.3015625,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.2765625,.2765625,.584375,.5828125,.584375,.5546875,1.0140625,.665625,.665625,.721875,.721875,.665625,.609375,.7765625,.721875,.2765625,.5,.665625,.5546875,.8328125,.721875,.7765625,.665625,.7765625,.721875,.665625,.609375,.721875,.665625,.94375,.665625,.665625,.609375,.2765625,.3546875,.2765625,.4765625,.5546875,.3328125,.5546875,.5546875,.5,.5546875,.5546875,.2765625,.5546875,.5546875,.221875,.240625,.5,.221875,.8328125,.5546875,.5546875,.5546875,.5546875,.3328125,.5,.2765625,.5546875,.5,.721875,.5,.5,.5,.3546875,.259375,.353125,.5890625];function UT(e,t=10){var r;let n=.5279276315789471,i=String(e),o=0;for(let a=0;a<i.length;a++){let u=i.charCodeAt(a);o+=(r=A$[u])!==null&&r!==void 0?r:n}return o*t}function T$(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}L.defaultStarts=["ATG"];L.defaultStops=["TAA","TAG","TGA"];L.defaultCodonTable={TCA:"S",TCC:"S",TCG:"S",TCT:"S",TTC:"F",TTT:"F",TTA:"L",TTG:"L",TAC:"Y",TAT:"Y",TAA:"*",TAG:"*",TGC:"C",TGT:"C",TGA:"*",TGG:"W",CTA:"L",CTC:"L",CTG:"L",CTT:"L",CCA:"P",CCC:"P",CCG:"P",CCT:"P",CAC:"H",CAT:"H",CAA:"Q",CAG:"Q",CGA:"R",CGC:"R",CGG:"R",CGT:"R",ATA:"I",ATC:"I",ATT:"I",ATG:"M",ACA:"T",ACC:"T",ACG:"T",ACT:"T",AAC:"N",AAT:"N",AAA:"K",AAG:"K",AGC:"S",AGT:"S",AGA:"R",AGG:"R",GTA:"V",GTC:"V",GTG:"V",GTT:"V",GCA:"A",GCC:"A",GCG:"A",GCT:"A",GAC:"D",GAT:"D",GAA:"E",GAG:"E",GGA:"G",GGC:"G",GGG:"G",GGT:"G"};function P$(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r],i=[];for(let o=0;o<3;o++){let a=r.charAt(o);i[o]=[],i[o][0]=a.toUpperCase(),i[o][1]=a.toLowerCase()}for(let o=0;o<2;o++){let a=i[0][o];for(let u=0;u<2;u++){let l=i[1][u];for(let s=0;s<2;s++){let c=i[2][s],d=a+l+c;t[d]=n}}}}),t}async function ng(e,t,r){t(e);let n=await r();return t(""),n}async function R$(e,t,r,n){t(e);let i=await n();return(0,X9.checkStopToken)(r),t(""),i}function WT(e){let t=0;if(e.length===0)return t;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function M$(e){return`${WT(JSON.stringify(e))}`}async function C$(e,t){return(await Promise.all(e.map(n=>t.blocksForRange(n.refName,n.start,n.end)))).flat().map(n=>({start:n.minv.blockPosition,end:n.maxv.blockPosition+65535})).reduce((n,i)=>n+i.end-i.start,0)}function k$(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function q$(e){return Math.floor(e/1e6)>0?`${Number.parseFloat((e/1e6).toPrecision(3))}Mbp`:Math.floor(e/1e3)>0?`${Number.parseFloat((e/1e3).toPrecision(3))}Kbp`:`${sa(Math.floor(e))}bp`}function sa(e){return e.toLocaleString("en-US")}function I$(e,t){return Math.floor(t/1e3)>0?`${sa(Number.parseFloat((e/1e6).toFixed(2)))}M`:sa(Math.floor(e))}function j$(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=jT(e),o=r?.contentBlocks[0]||{},a=n?.contentBlocks[0]||{},u=n?.contentBlocks[1]||{};return{offsetPx:t?0:i-a.offsetPx,offsetPx1:t?0:i-u.offsetPx,start:o.start,end:o.end}}function F$({sessionId:e,layoutId:t}){return`${e}-${t}`}function L$(e,t){let[r,n]=(0,Wi.useState)(()=>{if(typeof window>"u")return t;try{let o=window.localStorage.getItem(e);return o?JSON.parse(o):t}catch(o){return console.error(o),t}});return[r,o=>{try{let a=o instanceof Function?o(r):o;n(a),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(a))}catch(a){console.error(a)}}]}function HT(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function VT(e){return XT(e)?(0,Wu.isUriLocation)(e)?HT(e):JSON.stringify(e):String(e)}function GT(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function N$(e){let t=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|])/gi;return e.replaceAll(t,`$1<a href='$2' target="_blank">$2</a>`)}function D$(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return $T(e.map(u=>VT(u)).map(u=>a?GT(u):u).map(u=>UT(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function z$(e){return(0,yr.getEnv)(e)}function og(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function B$(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function $T(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function U$(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function KT(e){let t=0;for(let r of e)t+=r;return t}function W$(e){return KT(e)/e.length}function H$(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function V$(e){return e!=null}function YT(e,t=5e3){if(e.length<=1)return e;let r=[],n=null;e=e.sort((i,o)=>i.start-o.start),r.push(e[0]);for(let i=1;i<e.length;i++)n=r.at(-1),n.end+t<e[i].start-t?r.push(e[i]):n.end<e[i].end&&(n.end=Math.max(n.end,e[i].end),r.pop(),r.push(n));return r}function G$(e,t=5e3){let r={};for(let n of e)r[n.refName]||(r[n.refName]=[]),r[n.refName].push(n);return Object.values(r).flatMap(n=>YT(n.sort((i,o)=>i.start-o.start),t))}function $$(e){return(0,ig.colord)(e).alpha(1).toHex()}function K$(e){let t=(0,ig.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}function Y$(e){let t=(0,ig.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}function Z$(e){let t=document.createElement("div");return(0,Z9.flushSync)(()=>{(0,J9.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function ZT(e){return e[0]===31&&e[1]===139&&e[2]===8}async function JT(e,t){let{statusCallback:r=()=>{}}=t||{},n=await ng("Downloading file",r,()=>e.readFile(t));return ZT(n)?await ng("Unzipping",r,()=>(0,K9.unzip)(n)):n}async function J$(e,t){let r=await JT(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function XT(e){return typeof e=="object"&&e!==null}function X$(e,t){var r;return+((r=og(e))!==null&&r!==void 0?r:t)}function Q$(e,t){return!!JSON.parse(og(e)||JSON.stringify(t))}function eK(e,t,r,n){return t.test(e)&&!r||r===n}var QT=tS();Object.defineProperty(L,"SimpleFeature",{enumerable:!0,get:function(){return qT(QT).default}});Object.defineProperty(L,"isFeature",{enumerable:!0,get:function(){return QT.isFeature}});var tK=Im();Object.defineProperty(L,"blobToDataURL",{enumerable:!0,get:function(){return tK.blobToDataURL}});var rK=kT();Object.defineProperty(L,"makeAbortableReaction",{enumerable:!0,get:function(){return rK.makeAbortableReaction}});Hi(Xv(),L)});var nP=b(Vu=>{"use strict";var rP=Vu&&Vu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.default=cK;var nK=Ua(),eP=rP(m1()),iK=rP(g1()),oK=xo(),aK=["a","b","br","code","div","em","h1","h2","h3","h4","h5","h6","i","img","li","p","pre","span","small","strong","table","tbody","sup","sub","td","tfoot","th","thead","tr","u","ul"],tP=!1,uK=new RegExp(aK.map(e=>`<${e}\\b[^>]*>`).join("|"),"i");function sK(e){return uK.test(e)}function cK({html:e,className:t}){let r=(0,oK.linkify)(`${e}`),n=sK(r)?r:(0,iK.default)(r);return tP||(tP=!0,eP.default.addHook("afterSanitizeAttributes",i=>{i.tagName==="A"&&(i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target","_blank"))})),(0,nK.jsx)("span",{className:t,dangerouslySetInnerHTML:{__html:eP.default.sanitize(n)}})}});var Qn=b((hne,iP)=>{iP.exports=JBrowseExports["mobx-react"]});var oP,lK,ag,aP=pt(()=>{"use strict";oP=V(Ye()),lK=e=>{let{color:t="rgb(255,255,255,0.5)"}=e;return oP.default.createElement("rect",{...e,fill:t})},ag=lK});var Vi,uP,fK,sP,cP=pt(()=>{"use strict";Vi=V(Ye()),uP=V(Qn()),fK=(0,uP.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return Vi.default.createElement(Vi.default.Fragment,null,r?[...r.links()].map(i=>{let{source:o,target:a}=i,u=o.x,l=a.x,s=n?a.len:a.y,c=n?o.len:o.y;return Vi.default.createElement(Vi.default.Fragment,{key:[u,l,s,c].join("-")},Vi.default.createElement("line",{stroke:"black",x1:c,y1:u,x2:c,y2:l}),Vi.default.createElement("line",{stroke:"black",x1:c,y1:l,x2:s,y2:l}))}):null)}),sP=fK});var ei,lP,dK,fP,dP=pt(()=>{"use strict";ei=V(Ye()),lP=V(Qn());aP();cP();dK=(0,lP.observer)(function({model:e,labelWidth:t,svgFontSize:r}){let{totalHeight:n,treeWidth:i,samples:o=[],rowHeight:a}=e,u=a>=8,l=Math.min(20,a);return ei.default.createElement(ei.default.Fragment,null,ei.default.createElement(ag,{y:0,x:0,width:t+5+i,height:n}),ei.default.createElement(sP,{model:e}),ei.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,c)=>ei.default.createElement(ag,{key:`${s.id}-${c}`,y:c*a,x:0,width:t+5,height:l,color:s.color})),u?o.map((s,c)=>ei.default.createElement("text",{key:`${s.id}-${c}`,dominantBaseline:"middle",fontSize:r,x:2,y:c*a+a/2},s.label)):null))}),fP=dK});var Ud,pP,hP,pK,mP,vP=pt(()=>{"use strict";Ud=V(Ye()),pP=V(Lt()),hP=V(Qn()),pK=(0,hP.observer)(function({children:e,model:t,exportSVG:r}){if(r)return Ud.default.createElement(Ud.default.Fragment,null,e);{let{totalHeight:n}=t;return Ud.default.createElement("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:n,width:(0,pP.getContainingView)(t).width}},e)}}),mP=pK});function gP(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}var bP=pt(()=>{"use strict"});var ug,_P,yP,hK,Wd,sg=pt(()=>{"use strict";ug=V(Ye()),_P=V(Lt()),yP=V(Qn());dP();vP();bP();hK=(0,yP.observer)(function(e){let{model:t}=e,{rowHeight:r,samples:n}=t,i=Math.min(Math.max(r,8),14),o=r>=8,a=20,u=gP(n?.map(l=>(0,_P.measureText)(l.label,i)).map(l=>o?l:a)||[],0);return ug.default.createElement(mP,{...e},ug.default.createElement(fP,{model:t,labelWidth:u,svgFontSize:i}))}),Wd=hK});var PP=b((Rne,TP)=>{TP.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var WP=b((die,UP)=>{"use strict";UP.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var $u=b((pie,HP)=>{HP.exports=JBrowseExports["@jbrowse/core/ui"]});var ZP={};np(ZP,{renderSvg:()=>qK});async function qK(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,YP.getContainingView)(e),u=`mafclip-${i}`;return Wr.default.createElement(Wr.default.Fragment,null,Wr.default.createElement("defs",null,Wr.default.createElement("clipPath",{id:u},Wr.default.createElement("rect",{x:0,y:0,width:a,height:n}))),Wr.default.createElement("g",{clipPath:`url(#${u})`},Wr.default.createElement("g",{id:"snpcov"},await r(t)),Wr.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},Wr.default.createElement(Wd,{model:e,orientation:"left",exportSVG:!0}))))}var Wr,YP,JP=pt(()=>{"use strict";Wr=V(Ye()),YP=V(Lt());sg()});var gR=b(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.default=LK;var vR=xo();function LK(e,t="",r=5e3){let n=[e];for(;n.length;){let i=n.pop();for(let[o,a]of Object.entries(i)){if(t.length>r)return(0,vR.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return(0,vR.hashCode)(t)}});var bR=b(Yu=>{"use strict";var NK=Yu&&Yu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.adapterConfigCacheKey=zK;var DK=NK(gR());function zK(e={}){return`${(0,DK.default)(e)}`}});var yR=b(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.getAdapter=_R;Zu.freeAdapterResources=UK;Zu.clearAdapterCache=WK;var BK=bR(),Gi={};async function _R(e,t,r){let n=(0,BK.adapterConfigCacheKey)(r);if(!Gi[n]){let o=r?.type;if(!o)throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(r)}`);let a=e.getAdapterType(o);if(!a)throw new Error(`unknown data adapter type ${o}`);let u=a.configSchema.create(r,{pluginManager:e}),l=_R.bind(null,e,t),s=await a.getAdapterClass(),c=new s(u,l,e);Gi[n]={dataAdapter:c,sessionIds:new Set([t])}}let i=Gi[n];return i.sessionIds.add(t),i}function UK(e){let t=0,r=Object.keys(e);if(r.length===1&&r[0]==="sessionId"){let{sessionId:n}=e;Object.entries(Gi).forEach(([i,o])=>{o.sessionIds.delete(n),o.sessionIds.size===0&&(t+=1,delete Gi[i])})}else Object.values(Gi).forEach(n=>{let i=e.regions||(e.region?[e.region]:[]);for(let o of i)o.refName!==void 0&&n.dataAdapter.freeResources(o)});return t}function WK(){Gi={}}});var wR=b(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});var Sg=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};Og.default=Sg});var SR=b(Ag=>{"use strict";Object.defineProperty(Ag,"__esModule",{value:!0});Ag.default=Eg;var xR=e=>typeof e=="object"&&e!==null,HK=e=>xR(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function Eg(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{i.forEach(o=>{t(o),xR(o)&&Eg(o,t,r)})};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),HK(i)&&(Array.isArray(i)?n(i):Eg(i,t,r))}});var ER=b(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.UNSUPPORTED=Le.UNKNOWN=void 0;Le.getTrackAssemblyNames=VK;Le.getConfAssemblyNames=OR;Le.getRpcSessionId=GK;Le.getParentRenderProps=$K;Le.getBlob=KK;Le.getBlobMap=YK;Le.setBlobMap=ZK;Le.storeBlobLocation=XK;Le.makeIndex=QK;Le.makeIndexType=eY;Le.getFileName=tY;Le.guessAdapter=rY;Le.guessTrackType=nY;Le.generateUnsupportedTrackConf=iY;Le.generateUnknownTrackConf=oY;Le.getTrackName=aY;var pa=vt(),Ju=xo(),da=ym();function VK(e){return OR(e.configuration)}function OR(e){let t=(0,da.readConfObject)(e,"assemblyNames");if(!t){let r=(0,pa.getParent)(e);if("sequence"in r)return[(0,da.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function GK(e){let t;for(let r=e;!(0,pa.isRoot)(r);r=(0,pa.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t}function $K(e){for(let t=(0,pa.getParent)(e);!(0,pa.isRoot)(t);t=(0,pa.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}Le.UNKNOWN="UNKNOWN";Le.UNSUPPORTED="UNSUPPORTED";var Zd={};function KK(e){return Zd[e]}function YK(){return Zd}function ZK(e){Zd=e}var JK=0;function XK(e){if("blob"in e){let t=`b${+Date.now()}-${JK++}`;return Zd[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function QK(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function eY(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function tY(e){let t="uri"in e?e.uri:void 0,r="localPath"in e?e.localPath:void 0,n="blobId"in e?e:void 0;return n?.name||t?.slice(t.lastIndexOf("/")+1)||r?.slice(r.replace(/\\/g,"/").lastIndexOf("/")+1)||""}function rY(e,t,r,n){if(n){let{pluginManager:i}=(0,Ju.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,l,s)=>{})(e,t,r);if(a)return a}return{type:Le.UNKNOWN}}function nY(e,t){if(t){let r=(0,Ju.getSession)(t),i=(0,Ju.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function iY(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,Ju.objectHash)(n),n}function oY(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unknown)`,description:`Could not determine track type for "${t}"`,category:r,trackId:""};return n.trackId=(0,Ju.objectHash)(n),n}function aY(e,t){let r=(0,da.readConfObject)(e,"name");if(!r&&(0,da.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,da.readConfObject)(n,"displayName")||(0,da.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var PR=b(Xu=>{"use strict";var TR=Xu&&Xu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xu,"__esModule",{value:!0});var uY=TR(wR()),sY=TR(SR()),AR=ER(),Jd=Sc(),Tg=class extends uY.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,AR.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,Jd.isAppRootModel)(n)||t.internetAccountPreAuthorization)return t;let i=n.findAppropriateInternetAccount(t);return i&&r!=="MainThreadRpcDriver"&&(t.internetAccountPreAuthorization=await i.getPreAuthorizationInformation(t)),t}async deserializeArguments(t,r){return t.blobMap&&(0,AR.setBlobMap)(t.blobMap),t}async serializeReturn(t,r,n){return t}async deserializeReturn(t,r,n){var i;let o;try{o=await t}catch(a){if((0,Jd.isAuthNeededException)(a)){let u=(i=this.pluginManager.rootModel)===null||i===void 0?void 0:i.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(a.url).origin}`,{},a.url);throw new Jd.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,sY.default)(t,i=>{(0,Jd.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};Xu.default=Tg});var RR=b(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});var cY=hm(),Pg=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,cY.stringToJexlExpression)(r),string:r};throw new Error(`invalid inputFilter string "${r}"`)})}passes(...t){for(let r of this.filterChain)if(!r.expr.evalSync({feature:t[0]}))return!1;return!0}toJSON(){return{filters:this.filterChain.map(t=>t.string)}}static fromJSON(t){return new e(t)}};Rg.default=Pg});var CR=b(Qu=>{"use strict";var MR=Qu&&Qu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qu,"__esModule",{value:!0});var lY=MR(PR()),fY=xo(),dY=MR(RR()),Mg=class extends lY.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new dY.default({filters:t.filters}):void 0}}async serializeArguments(t,r){var n,i,o;let u=(i=(n=this.pluginManager.rootModel)===null||n===void 0?void 0:n.session)===null||i===void 0?void 0:i.assemblyManager;if(!u)throw new Error("no assembly manager");let l=await(0,fY.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(l,r)}};Qu.default=Mg});var hY={};np(hY,{default:()=>Qd});var UR=V(Xg());var Qg="1.2.2";var Sy=V(Gr());var gy=V(Jp()),by=V(Os()),Fa=V(Lt()),Ps=V(Es()),_y=V(As());var Ht=null;try{Ht=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Se(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}Se.prototype.__isLong__;Object.defineProperty(Se.prototype,"__isLong__",{value:!0});function ct(e){return(e&&e.__isLong__)===!0}function ny(e){var t=Math.clz32(e&-e);return e?31-t:t}Se.isLong=ct;var iy={},oy={};function hi(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=oy[e],n)?n:(r=he(e,0,!0),i&&(oy[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=iy[e],n)?n:(r=he(e,e<0?-1:0,!1),i&&(iy[e]=r),r))}Se.fromInt=hi;function Vt(e,t){if(isNaN(e))return t?Jr:ar;if(t){if(e<0)return Jr;if(e>=cy)return dy}else{if(e<=-uy)return At;if(e+1>=uy)return fy}return e<0?Vt(-e,t).neg():he(e%oo|0,e/oo|0,t)}Se.fromNumber=Vt;function he(e,t,r){return new Se(e,t,r)}Se.fromBits=he;var Ts=Math.pow;function Qp(e,t,r){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(r=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?Jr:ar;if(r=r||10,r<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return Qp(e.substring(1),t,r).neg();for(var i=Vt(Ts(r,8)),o=ar,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+u),r);if(u<8){var s=Vt(Ts(r,u));o=o.mul(s).add(Vt(l))}else o=o.mul(i),o=o.add(Vt(l))}return o.unsigned=t,o}Se.fromString=Qp;function Gt(e,t){return typeof e=="number"?Vt(e,t):typeof e=="string"?Qp(e,t):he(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Se.fromValue=Gt;var ay=65536,mk=1<<24,oo=ay*ay,cy=oo*oo,uy=cy/2,sy=hi(mk),ar=hi(0);Se.ZERO=ar;var Jr=hi(0,!0);Se.UZERO=Jr;var io=hi(1);Se.ONE=io;var ly=hi(1,!0);Se.UONE=ly;var Xp=hi(-1);Se.NEG_ONE=Xp;var fy=he(-1,2147483647,!1);Se.MAX_VALUE=fy;var dy=he(-1,-1,!0);Se.MAX_UNSIGNED_VALUE=dy;var At=he(0,-2147483648,!1);Se.MIN_VALUE=At;var U=Se.prototype;U.toInt=function(){return this.unsigned?this.low>>>0:this.low};U.toNumber=function(){return this.unsigned?(this.high>>>0)*oo+(this.low>>>0):this.high*oo+(this.low>>>0)};U.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(At)){var r=Vt(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=Vt(Ts(t,6),this.unsigned),a=this,u="";;){var l=a.div(o),s=a.sub(l.mul(o)).toInt()>>>0,c=s.toString(t);if(a=l,a.isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}};U.getHighBits=function(){return this.high};U.getHighBitsUnsigned=function(){return this.high>>>0};U.getLowBits=function(){return this.low};U.getLowBitsUnsigned=function(){return this.low>>>0};U.getNumBitsAbs=function(){if(this.isNegative())return this.eq(At)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return this.high!=0?r+33:r+1};U.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};U.isZero=function(){return this.high===0&&this.low===0};U.eqz=U.isZero;U.isNegative=function(){return!this.unsigned&&this.high<0};U.isPositive=function(){return this.unsigned||this.high>=0};U.isOdd=function(){return(this.low&1)===1};U.isEven=function(){return(this.low&1)===0};U.equals=function(t){return ct(t)||(t=Gt(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};U.eq=U.equals;U.notEquals=function(t){return!this.eq(t)};U.neq=U.notEquals;U.ne=U.notEquals;U.lessThan=function(t){return this.comp(t)<0};U.lt=U.lessThan;U.lessThanOrEqual=function(t){return this.comp(t)<=0};U.lte=U.lessThanOrEqual;U.le=U.lessThanOrEqual;U.greaterThan=function(t){return this.comp(t)>0};U.gt=U.greaterThan;U.greaterThanOrEqual=function(t){return this.comp(t)>=0};U.gte=U.greaterThanOrEqual;U.ge=U.greaterThanOrEqual;U.compare=function(t){if(ct(t)||(t=Gt(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1};U.comp=U.compare;U.negate=function(){return!this.unsigned&&this.eq(At)?At:this.not().add(io)};U.neg=U.negate;U.add=function(t){ct(t)||(t=Gt(t));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,s=t.low&65535,c=0,d=0,f=0,p=0;return p+=o+s,f+=p>>>16,p&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=n+u,c+=d>>>16,d&=65535,c+=r+a,c&=65535,he(f<<16|p,c<<16|d,this.unsigned)};U.subtract=function(t){return ct(t)||(t=Gt(t)),this.add(t.neg())};U.sub=U.subtract;U.multiply=function(t){if(this.isZero())return this;if(ct(t)||(t=Gt(t)),Ht){var r=Ht.mul(this.low,this.high,t.low,t.high);return he(r,Ht.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Jr:ar;if(this.eq(At))return t.isOdd()?At:ar;if(t.eq(At))return this.isOdd()?At:ar;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(sy)&&t.lt(sy))return Vt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,u=t.high>>>16,l=t.high&65535,s=t.low>>>16,c=t.low&65535,d=0,f=0,p=0,h=0;return h+=a*c,p+=h>>>16,h&=65535,p+=o*c,f+=p>>>16,p&=65535,p+=a*s,f+=p>>>16,p&=65535,f+=i*c,d+=f>>>16,f&=65535,f+=o*s,d+=f>>>16,f&=65535,f+=a*l,d+=f>>>16,f&=65535,d+=n*c+i*s+o*l+a*u,d&=65535,he(p<<16|h,d<<16|f,this.unsigned)};U.mul=U.multiply;U.divide=function(t){if(ct(t)||(t=Gt(t)),t.isZero())throw Error("division by zero");if(Ht){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Ht.div_u:Ht.div_s)(this.low,this.high,t.low,t.high);return he(r,Ht.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Jr:ar;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Jr;if(t.gt(this.shru(1)))return ly;o=Jr}else{if(this.eq(At)){if(t.eq(io)||t.eq(Xp))return At;if(t.eq(At))return io;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(ar)?t.isNegative()?io:Xp:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(At))return this.unsigned?Jr:ar;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=ar}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(n)/Math.LN2),l=u<=48?1:Ts(2,u-48),s=Vt(n),c=s.mul(t);c.isNegative()||c.gt(i);)n-=l,s=Vt(n,this.unsigned),c=s.mul(t);s.isZero()&&(s=io),o=o.add(s),i=i.sub(c)}return o};U.div=U.divide;U.modulo=function(t){if(ct(t)||(t=Gt(t)),Ht){var r=(this.unsigned?Ht.rem_u:Ht.rem_s)(this.low,this.high,t.low,t.high);return he(r,Ht.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};U.mod=U.modulo;U.rem=U.modulo;U.not=function(){return he(~this.low,~this.high,this.unsigned)};U.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};U.clz=U.countLeadingZeros;U.countTrailingZeros=function(){return this.low?ny(this.low):ny(this.high)+32};U.ctz=U.countTrailingZeros;U.and=function(t){return ct(t)||(t=Gt(t)),he(this.low&t.low,this.high&t.high,this.unsigned)};U.or=function(t){return ct(t)||(t=Gt(t)),he(this.low|t.low,this.high|t.high,this.unsigned)};U.xor=function(t){return ct(t)||(t=Gt(t)),he(this.low^t.low,this.high^t.high,this.unsigned)};U.shiftLeft=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?he(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):he(0,this.low<<t-32,this.unsigned)};U.shl=U.shiftLeft;U.shiftRight=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?he(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):he(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};U.shr=U.shiftRight;U.shiftRightUnsigned=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?he(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?he(this.high,0,this.unsigned):he(this.high>>>t-32,0,this.unsigned)};U.shru=U.shiftRightUnsigned;U.shr_u=U.shiftRightUnsigned;U.rotateLeft=function(t){var r;return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?he(this.high,this.low,this.unsigned):t<32?(r=32-t,he(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,he(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};U.rotl=U.rotateLeft;U.rotateRight=function(t){var r;return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?he(this.high,this.low,this.unsigned):t<32?(r=32-t,he(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,he(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};U.rotr=U.rotateRight;U.toSigned=function(){return this.unsigned?he(this.low,this.high,!1):this};U.toUnsigned=function(){return this.unsigned?this:he(this.low,this.high,!0)};U.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};U.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};U.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};Se.fromBytes=function(t,r,n){return n?Se.fromBytesLE(t,r):Se.fromBytesBE(t,r)};Se.fromBytesLE=function(t,r){return new Se(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Se.fromBytesBE=function(t,r){return new Se(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};typeof BigInt=="function"&&(Se.fromBigInt=function(t,r){var n=Number(BigInt.asIntN(32,t)),i=Number(BigInt.asIntN(32,t>>BigInt(32)));return he(n,i,r)},Se.fromValue=function(t,r){return typeof t=="bigint"?fromBigInt(t,r):Gt(t,r)},U.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});var py=Se;var ja=class{blockPosition;dataPosition;constructor(t,r){this.blockPosition=t,this.dataPosition=r}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}};function mi(e){let t=[],r={},n=e.split(/\s*(;|\(|\)|,|:)\s*/);for(let i=0;i<n.length;i++){let o=n[i],a={};switch(o){case"(":r.children=[a],t.push(r),r=a;break;case",":t.at(-1)?.children.push(a),r=a;break;case")":r=t.pop();break;case":":break;default:{let u=n[i-1];u===")"||u==="("||u===","?r.name=o:u===":"&&(r.length=Number.parseFloat(o))}}}return r}function vk(e){return typeof e[0]=="string"}function bn(e){return vk(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function hy(e){let t=e.split(" "),r=[];for(let n=0;n<t.length;){let i=t[n++];if(i==="i"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}if(i==="s"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}else i==="d"?r.push({type:i,row:+t[n++]}):i==="g"?r.push({type:i,row:+t[n++],gapLen:+t[n++]}):i==="G"&&r.push({type:i,row:+t[n++],gapSubstring:t[n++]})}return r}function my(e,t){let r=0,n=[],i=new TextDecoder("utf8");for(;r<e.length;){let o=e.indexOf(10,r);if(o===-1)break;let a=e.subarray(r,o),u=i.decode(a).trim();if(u){let l=t(u);l&&n.push(l)}r=o+1}return n}var vy=(e=0)=>+(+e).toFixed(1),La=class extends by.BaseFeatureDataAdapter{setupP;async getRefNames(){let t=await this.setup();return Object.keys(t)}setupPre(){return this.setupP||(this.setupP=this.readTaiFile().catch(t=>{throw this.setupP=void 0,t})),this.setupP}setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,Fa.updateStatus)("Downloading index",r,()=>this.setupPre())}async readTaiFile(){let r=(await(0,Ps.openLocation)(this.getConf("taiLocation")).readFile("utf8")).split(`
6
+ `).map(u=>u.trim()).filter(u=>!!u),n={},i="",o=0,a=0;for(let u of r){let[l,s,c]=u.split(" "),d=a+ +c,f=l==="*"?i:l.split(".").at(-1),p=py.fromNumber(d),h=p.shiftRightUnsigned(16),m=p.and(65535),g=new ja(h.toNumber(),m.toNumber());n[f]||(n[f]=[],i="",o=0,a=0);let _=+s+o;n[f].push({chrStart:_,virtualOffset:g}),i=f,o=_,a=d}return n}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,_y.ObservableCreate)(async i=>{try{let o=await this.setup(),a=await(0,Fa.updateStatus)("Downloading alignments",n,()=>this.getLines(t,o));if(a){let u={},l=[],s,c=0,d=0;if(my(a,f=>{if(c++%100===0&&n(`Processing ${vy(d/1e6)}/${vy(a.length/1e6)}Mb`),d+=f.length,f){let[p,h]=f.split(" ; ");if(h){for(let g of hy(h))if(g.type==="i"){l.splice(g.row,0,g),u[g.asm]||(u[g.asm]={start:g.start,strand:g.strand,srcSize:g.length,chr:g.ref,data:""});let _=u[g.asm];_.data+=" ".repeat(Math.max(0,c-_.data.length))}else if(g.type==="s"){u[g.asm]||(u[g.asm]={start:g.start,strand:g.strand,srcSize:g.length,chr:g.ref,data:""});let _=u[g.asm];_.data+=" ".repeat(Math.max(0,c-_.data.length)),l[g.row]=g}else g.type==="d"&&l.splice(g.row,1);s||(s=l[0])}let m=p.length;for(let g=0;g<m;g++){let _=p[g],w=l[g];w&&(u[w.asm].data+=_)}}}),s){let f=u[s.asm];i.next(new Fa.SimpleFeature({uniqueId:`${f.start}-${f.data.length}`,refName:t.refName,start:f.start,end:f.start+f.data.length,strand:f.strand,alignments:u,seq:f.data}))}}n(""),i.complete()}catch(o){i.error(o)}})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Ps.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?mi(n):void 0}}async getLines(t,r){let n=(0,Ps.openLocation)(this.getConf("tafGzLocation")),i=r[t.refName];if(i){let o,a;for(let u=0;u<i.length;u++)if(i[u].chrStart>=t.start){o=i[Math.max(u-1,0)];break}for(let u=0;u<i.length;u++)if(t.end<=i[u].chrStart){a=i[u+1];break}if(a=a??i.at(-1),o&&a){let u=await n.read(a.virtualOffset.blockPosition-o.virtualOffset.blockPosition,o.virtualOffset.blockPosition);return(await(0,gy.unzip)(u)).slice(o.virtualOffset.dataPosition)}}}freeResources(){}};var wy=V(_n());var gk=(0,wy.ConfigurationSchema)("BgzipTaffyAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},tafGzLocation:{type:"fileLocation",description:"bgzip taffy file",defaultValue:{uri:"/path/to/my.taf",locationType:"UriLocation"}},taiLocation:{type:"fileLocation",description:"taffy index",defaultValue:{uri:"/path/to/my.taf.gz.tai",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),xy=gk;function eh(e){return e.addAdapterType(()=>new Sy.AdapterType({name:"BgzipTaffyAdapter",AdapterClass:La,configSchema:xy}))}var Uy=V(Gr());var Fy=V(Os()),Is=V(Lt()),Ly=V(Es()),Ny=V(As()),Dy=V(vt());var th=function(e,t){return th=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},th(e,t)};function Na(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");th(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function rh(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ao(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function uo(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Mr(e){return typeof e=="function"}function Rs(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Ms=Rs(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
7
7
  `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
8
- `):"",this.name="UnsubscriptionError",this.errors=r}});function nh(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var ks=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=rh(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Mr(c))try{c()}catch(m){o=m instanceof Ms?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=rh(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{Ey(h)}catch(m){o=o??[],m instanceof Ms?o=uo(uo([],ao(o)),ao(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(o)throw new Ms(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Ey(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)&&nh(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&nh(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var RZ=ks.EMPTY;function Ay(e){return e instanceof ks||e&&"closed"in e&&Mr(e.remove)&&Mr(e.add)&&Mr(e.unsubscribe)}function Ey(e){Mr(e)?e():e.unsubscribe()}var yn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var so={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=so.delegate;return i?.setTimeout?i.setTimeout.apply(i,uo([e,t],ao(r))):setTimeout.apply(void 0,uo([e,t],ao(r)))},clearTimeout:function(e){var t=so.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Ty(e){so.setTimeout(function(){var t=yn.onUnhandledError;if(t)t(e);else throw e})}function ih(){}var Py=function(){return oh("C",void 0,void 0)}();function Ry(e){return oh("E",void 0,e)}function My(e){return oh("N",e,void 0)}function oh(e,t,r){return{kind:e,value:t,error:r}}var ah=null;function ky(e){yn.useDeprecatedSynchronousErrorHandling&&ah&&(ah.errorThrown=!0,ah.error=e)}var ch=function(e){Na(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Ay(r)&&r.add(n)):n.destination=wC,n}return t.create=function(r,n,i){return new lh(r,n,i)},t.prototype.next=function(r){this.isStopped?sh(My(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?sh(Ry(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?sh(Py,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}(ks);var bC=Function.prototype.bind;function uh(e,t){return bC.call(e,t)}var _C=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(n){Cs(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Cs(n)}else Cs(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Cs(r)}},e}(),lh=function(e){Na(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(Mr(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&yn.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&uh(r.next,u),error:r.error&&uh(r.error,u),complete:r.complete&&uh(r.complete,u)}):a=r}return o.destination=new _C(a),o}return t}(ch);function Cs(e){yn.useDeprecatedSynchronousErrorHandling?ky(e):Ty(e)}function yC(e){throw e}function sh(e,t){var r=yn.onStoppedNotification;r&&so.setTimeout(function(){return r(e,t)})}var wC={closed:!0,next:ih,error:yC,complete:ih};function xC(e){return Mr(e?.lift)}function qs(e){return function(t){if(xC(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Cy(e,t,r,n,i){return new SC(e,t,r,n,i)}var SC=function(e){Na(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(ch);var qy=Rs(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Da(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new lh({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new qy)}});e.subscribe(o)})}function Iy(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(Cy(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}function jy(e,t){return qs(Iy(e,t,arguments.length>=2,!1,!0))}var OC=function(e,t){return e.push(t),e};function za(){return qs(function(e,t){jy(OC,[])(e).subscribe(t)})}var Ba=class extends Fy.BaseFeatureDataAdapter{setupP;async setup(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,Dy.getSnapshot)(this.config),type:"BigBedAdapter"})).dataAdapter}}async setupPre(){return this.setupP||(this.setupP=this.setup().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async getRefNames(){let{adapter:t}=await this.setup();return t.getRefNames()}async getHeader(){let{adapter:t}=await this.setup();return t.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,Ny.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(),a=await(0,Is.updateStatus)("Downloading alignment",n,()=>Da(o.getFeatures(t).pipe(za())));for(let u of a){let s=u.get("mafBlock").split(";"),c,d=[],f={},p=[];for(let h of s)h.startsWith("s")&&(c?(d.push(h.split(/ +/)[6]),p.push(h)):(c=h.split(/ +/)[6],d.push(c),p.push(h)));for(let h=0;h<p.length;h++){let g=p[h].split(/ +/),_=g[1].split("."),w=_[0],y=_[1];f[w]={chr:y,start:+g[1],srcSize:+g[2],strand:g[3]==="+"?1:-1,unknown:+g[4],data:d[h]}}i.next(new Is.SimpleFeature({id:u.id(),data:{start:u.get("start"),end:u.get("end"),refName:u.get("refName"),seq:d[0],alignments:f}}))}i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Ly.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?mi(n):void 0}}freeResources(){}};var zy=V(_n());var EC=(0,zy.ConfigurationSchema)("BigMafAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bigBedLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bb",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),By=EC;function fh(e){return e.addAdapterType(()=>new Uy.AdapterType({name:"BigMafAdapter",AdapterClass:Ba,configSchema:By}))}var eR=V(Gr());var xt=V(Ye()),wP=V(Qw()),xP=V(nP()),Hd=V(Lt()),SP=V(Qn()),OP=V(Xa());sg();var mK=(0,OP.makeStyles)()({cursor:{pointerEvents:"none"}}),vK=(0,SP.observer)(function(e){let{model:t}=e,{classes:r}=mK(),{pluginManager:n}=(0,Hd.getEnv)(t),{rowHeight:i,height:o,scrollTop:a,samples:u}=t,l=(0,xt.useRef)(null),s=n.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=s.exports,[d,f]=(0,xt.useState)(),[p,h]=(0,xt.useState)(),{width:m}=(0,Hd.getContainingView)(t);return xt.default.createElement("div",{ref:l,onMouseMove:g=>{let _=l.current?.getBoundingClientRect(),w=_?.top||0,y=_?.left||0;f(g.clientY-w),h(g.clientX-y)},onMouseLeave:()=>{f(void 0),h(void 0)}},xt.default.createElement(c,{...e}),xt.default.createElement(Wd,{model:t}),d&&u?xt.default.createElement("div",{style:{position:"relative"}},xt.default.createElement("svg",{className:r.cursor,width:m,height:o,style:{position:"absolute",top:a}},xt.default.createElement("line",{x1:0,x2:m,y1:d-a,y2:d-a,stroke:"black"}),xt.default.createElement("line",{x1:p,x2:p,y1:0,y2:o,stroke:"black"})),xt.default.createElement(wP.default,null,xt.default.createElement(xP.default,{html:Object.entries(u[Math.floor(d/i)]||{}).filter(([g])=>g!=="color"&&g!=="id").map(([g,_])=>`${g}:${_}`).join(`
9
- `)}))):null)}),EP=vK;var AP=V(_n());function cg(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,AP.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var $d=V(_n()),la=V(Lt()),XP=V(PP());function Vd(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Gd(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function gK(e,t){return e.parent===t.parent?1:2}function bK(e){return e.reduce(_K,0)/e.length}function _K(e,t){return e+t.x}function yK(e){return 1+e.reduce(wK,0)}function wK(e,t){return Math.max(e,t.y)}function xK(e){for(var t;t=e.children;)e=t[0];return e}function SK(e){for(var t;t=e.children;)e=t[t.length-1];return e}function lg(){var e=gK,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(f){var p=f.children;p?(f.x=bK(p),f.y=yK(p)):(f.x=a?u+=e(f,a):0,f.y=0,a=f)});var l=xK(o),s=SK(o),c=l.x-e(l,s)/2,d=s.x+e(s,l)/2;return o.eachAfter(n?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*r}:function(f){f.x=(f.x-c)/(d-c)*t,f.y=(1-(o.y?f.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}function OK(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function RP(){return this.eachAfter(OK)}function MP(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function kP(e,t){for(var r=this,n=[r],i,o,a=-1;r=n.pop();)if(e.call(t,r,++a,this),i=r.children)for(o=i.length-1;o>=0;--o)n.push(i[o]);return this}function CP(e,t){for(var r=this,n=[r],i=[],o,a,u,l=-1;r=n.pop();)if(i.push(r),o=r.children)for(a=0,u=o.length;a<u;++a)n.push(o[a]);for(;r=i.pop();)e.call(t,r,++l,this);return this}function qP(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function IP(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}function jP(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function FP(e){for(var t=this,r=EK(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function EK(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function LP(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function NP(){return Array.from(this)}function DP(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function zP(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*BP(){var e=this,t,r=[e],n,i,o;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,o=n.length;i<o;++i)r.push(n[i]);while(r.length)}function ca(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=PK)):t===void 0&&(t=TK);for(var r=new Gu(e),n,i=[r],o,a,u,l;n=i.pop();)if((a=t(n.data))&&(l=(a=Array.from(a)).length))for(n.children=a,u=l-1;u>=0;--u)i.push(o=a[u]=new Gu(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(MK)}function AK(){return ca(this).eachBefore(RK)}function TK(e){return e.children}function PK(e){return Array.isArray(e)?e[1]:null}function RK(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function MK(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Gu(e){this.data=e,this.depth=this.height=0,this.parent=null}Gu.prototype=ca.prototype={constructor:Gu,count:RP,each:MP,eachAfter:CP,eachBefore:kP,find:qP,sum:IP,sort:jP,path:FP,ancestors:LP,descendants:NP,leaves:DP,links:zP,copy:AK,[Symbol.iterator]:BP};var pg=V(WP()),QP=V(Oc()),ti=V(vt());var Qt=V(Ye()),VP=V($u()),er=V(mc()),GP=V(Qn()),$P=V(Xa()),kK=(0,$P.makeStyles)()({root:{width:500}}),CK=(0,GP.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=kK(),[i,o]=(0,Qt.useState)(`${t.rowHeight}`),[a,u]=(0,Qt.useState)(`${t.rowProportion}`);return Qt.default.createElement(VP.Dialog,{open:!0,onClose:r,title:"Set row height"},Qt.default.createElement(er.DialogContent,{className:n.root},Qt.default.createElement(er.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Qt.default.createElement(er.TextField,{value:i,helperText:"Enter row height",onChange:l=>{o(l.target.value)}}),Qt.default.createElement(er.TextField,{value:a,helperText:"Enter row proportion",onChange:l=>{u(l.target.value)}}),Qt.default.createElement(er.DialogActions,null,Qt.default.createElement(er.Button,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,onClick:()=>{t.setRowProportion(+a),t.setRowHeight(+i),r()}},"Submit"),Qt.default.createElement(er.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel"))))}),KP=CK;function fg(e){return(e.data.length||0)+(e.children&&Gd(e.children,fg)||0)}function dg(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{dg(n,t,r)})}function hg(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return ti.types.compose("LinearMafDisplay",n,ti.types.model({type:ti.types.literal("LinearMafDisplay"),configuration:(0,$d.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80})).volatile(()=>({prefersOffset:!0,volatileSamples:void 0,volatileTree:void 0})).actions(i=>({setRowHeight(o){i.rowHeight=o},setRowProportion(o){i.rowProportion=o},setShowAllLetters(o){i.showAllLetters=o},setMismatchRendering(o){i.mismatchRendering=o},setSamples({samples:o,tree:a}){(0,pg.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,pg.default)(a,i.volatileTree)||(i.volatileTree=a)}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,$d.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,la.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?ca(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>Vd(o.data.length||1,a.data.length||1)):void 0}})).views(i=>({get hierarchy(){let o=i.root;if(o){let a=i.treeAreaWidth;return lg().size([this.totalHeight,a]).separation(()=>1)(o),dg(o,o.data.length=0,a/fg(o)),o}else return},get samples(){return this.rowNames?bn(this.rowNames):i.volatileSamples},get totalHeight(){return this.samples?this.samples.length*i.rowHeight:1},get leaves(){return i.root?.leaves()},get rowNames(){return this.leaves?.map(o=>o.data.name)}})).views(i=>{let{trackMenuItems:o,renderProps:a}=i;return{get treeWidth(){return i.hierarchy?i.treeAreaWidth:0},renderProps(){let{showAllLetters:u,rendererConfig:l,samples:s,rowHeight:c,rowProportion:d,mismatchRendering:f}=i;return{...a(),notReady:!i.volatileSamples||!i.volatileTree||super.notReady,config:l,samples:s,rowHeight:c,rowProportion:d,showAllLetters:u,mismatchRendering:f}},trackMenuItems(){return[...o(),{label:"Set row height",onClick:()=>{(0,la.getSession)(i).queueDialog(u=>[KP,{model:i,handleClose:u}])}},{label:"Show all letters",type:"checkbox",checked:i.showAllLetters,onClick:()=>{i.setShowAllLetters(!i.showAllLetters)}},{label:"Draw mismatches as single color",type:"checkbox",checked:!i.mismatchRendering,onClick:()=>{i.setMismatchRendering(!i.mismatchRendering)}}]}}}).actions(i=>({afterCreate(){(0,ti.addDisposer)(i,(0,QP.autorun)(async()=>{try{let{rpcManager:o}=(0,la.getSession)(i),a=(0,XP.getRpcSessionId)(i),u=await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:l=>{(0,ti.isAlive)(i)&&i.setMessage(l)}});i.setSamples(u)}catch(o){console.error(o),(0,la.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(JP(),ZP));return u(i,a,o)}}})}function mg(e){e.addDisplayType(()=>{let t=cg(e),r=hg(t,e);return new eR.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:EP,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var oR=V(Gr()),Yd=V(Lt());var nR=V($u()),bg=V(Lt());var vg=V(Lt());function tR(e){return Object.fromEntries(Object.entries(gg(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function gg(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function Kd(e,t,r,n,i,o,a){t+n<0||t>o||(a&&(e.fillStyle=a),e.fillRect(t,r,n,i))}function rR(){let e=(0,vg.measureText)("A"),t=(0,vg.measureText)("M")-2;return{charWidth:e,charHeight:t}}function iR({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:l,rowProportion:s,features:c}=t,d=r[0],f=(d.end-d.start)/n,p=i*s,h=(0,nR.createJBrowseTheme)(a),m=gg(h),g=tR(h),{charHeight:_}=rR(),w=new Map(l.map((R,k)=>[R.id,k])),y=1/n,x=.4,O=i/2,A=p/2,T=(i-p)/2;e.font="bold 10px Courier New,monospace";for(let R of c.values()){let[k]=(0,bg.featureSpanPx)(R,d,n),M=R.get("alignments"),P=R.get("seq").toLowerCase(),N=Object.entries(M);for(let[C,I]of N){let W=I.data,j=W.toLowerCase(),D=w.get(C);if(D===void 0)continue;let F=i*D;e.beginPath(),e.fillStyle="black";for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){if(j[q]==="-"){let $=k+y*B;e.moveTo($,F+O),e.lineTo($+y+x,F+O)}B++}if(e.stroke(),!o){e.fillStyle="lightgrey";for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){let $=j[q],Q=k+y*B;P[q]===$&&$!=="-"&&Kd(e,Q,T+F,y+x,p,f),B++}}for(let q=0,B=0;q<j.length;q++){let $=j[q];if(P[q]!=="-"){if($!=="-"){let Q=k+y*B;P[q]!==$&&$!==" "?Kd(e,Q,T+F,y+x,p,f,u?m[$]??"black":"orange"):o&&Kd(e,Q,T+F,y+x,p,f,u?m[$]??"black":"lightblue")}B++}}let z=10;if(y>=z){for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){let $=k+y*B,Q=(y-z)/2+1,ge=j[q];(o||P[q]!==ge)&&ge!=="-"&&(e.fillStyle=u?g[ge]??"white":"black",i>_&&e.fillText(W[q]||"",$+Q,A+F+3)),B++}}}}for(let R of c.values()){let[k]=(0,bg.featureSpanPx)(R,d,n),M=R.get("alignments"),P=R.get("seq").toLowerCase();for(let[N,C]of Object.entries(M)){let W=C.data.toLowerCase(),j=w.get(N);if(j===void 0)continue;let D=i*j;e.beginPath(),e.fillStyle="purple";for(let F=0,z=0;F<W.length;F++){let q="";for(;P[F]==="-";)W[F]!=="-"&&W[F]!==" "&&(q+=W[F]),F++;if(q.length>0){let B=k+y*z-1;e.rect(B,T+D,1,p),n<1&&(e.rect(B-2,T+D,5,1),e.rect(B-2,T+D+p-1,5,1))}z++}e.fill()}}}var Ku=class extends oR.FeatureRendererType{getExpandedRegion(t){let{start:r,end:n}=t,i=1;return{...t,start:Math.floor(Math.max(r-i,0)),end:Math.ceil(n+i)}}async render(t){let{statusCallback:r=()=>{},regions:n,bpPerPx:i,samples:o,rowHeight:a}=t,u=n[0],l=o.length*(a+1)+100,s=(u.end-u.start)/i,c=await this.getFeatures(t),d=await(0,Yd.renderToAbstractCanvas)(s,l,t,async p=>{await(0,Yd.updateStatus)("Rendering alignment",r,()=>{iR({ctx:p,renderArgs:{...t,features:c}})})});return{...await super.render({...t,...d,width:s,height:l}),...d,features:new Map,width:s,height:l,containsNoTransferables:!0}}};var aR=V(Ye()),uR=V($u()),sR=V(Qn()),IK=(0,sR.observer)(function(e){return aR.default.createElement(uR.PrerenderedCanvas,{...e})}),cR=IK;var lR=V(_n());var jK=(0,lR.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),fR=jK;function _g(e){e.addRendererType(()=>new Ku({name:"LinearMafRenderer",ReactComponent:cR,configSchema:fR,pluginManager:e}))}var hR=V(Gr()),mR=V(vt());var ce=V(Ye()),cn=V($u()),fa=V(Lt()),Fe=V(mc()),dR=V(vt()),pR=V(Xa()),FK=(0,pR.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function yg({model:e}){let{classes:t}=FK(),[r,n]=(0,ce.useState)(""),[i,o]=(0,ce.useState)(),[a,u]=(0,ce.useState)(),[l,s]=(0,ce.useState)(),[c,d]=(0,ce.useState)(),[f,p]=(0,ce.useState)("MAF track"),[h,m]=(0,ce.useState)("BigMafAdapter"),[g,_]=(0,ce.useState)("TBI"),w=(0,dR.getRoot)(e);return ce.default.createElement(Fe.Paper,{className:t.paper},ce.default.createElement(Fe.Paper,null,c?ce.default.createElement(cn.ErrorMessage,{error:c}):null,ce.default.createElement(Fe.FormControl,null,ce.default.createElement(Fe.FormLabel,null,"File type"),ce.default.createElement(Fe.RadioGroup,{value:h,onChange:y=>{m(y.target.value)}},["BigMafAdapter","MafTabixAdapter","BgzipTaffyAdapter"].map(y=>ce.default.createElement(Fe.FormControlLabel,{key:y,value:y,control:ce.default.createElement(Fe.Radio,null),checked:h===y,label:y})))),h==="BigMafAdapter"?ce.default.createElement(cn.FileSelector,{location:i,name:"Path to bigMaf",rootModel:w,setLocation:y=>{o(y)}}):h==="MafTabixAdapter"?ce.default.createElement(ce.default.Fragment,null,ce.default.createElement(Fe.FormControl,null,ce.default.createElement(Fe.FormLabel,null,"Index type"),ce.default.createElement(Fe.RadioGroup,{value:h,onChange:y=>{_(y.target.value)}},["TBI","CSI"].map(y=>ce.default.createElement(Fe.FormControlLabel,{key:y,value:y,control:ce.default.createElement(Fe.Radio,null),checked:g===y,label:y})))),ce.default.createElement(cn.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(cn.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:w,setLocation:y=>{u(y)}})):ce.default.createElement(ce.default.Fragment,null,ce.default.createElement(cn.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(cn.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:w,setLocation:y=>{u(y)}}))),ce.default.createElement("div",null,ce.default.createElement(cn.FileSelector,{location:l,name:"Path to newick tree (.nh)",rootModel:w,setLocation:y=>{s(y)}}),ce.default.createElement(Fe.TextField,{multiline:!0,rows:10,value:r,onChange:y=>{n(y.target.value)},helperText:"Sample names (optional if .nh supplied, required if not)",placeholder:"Enter sample names from the MAF file, one per line, or JSON formatted array of samples",variant:"outlined",fullWidth:!0})),ce.default.createElement(Fe.TextField,{value:f,helperText:"Track name",onChange:y=>{p(y.target.value)}}),ce.default.createElement(Fe.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let y=(0,fa.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let O=[`${f.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,y.adminMode?"":"-sessionTrack"].join("");(0,fa.isSessionWithAddTracks)(y)&&(y.addTrackConf({trackId:O,type:"MafTrack",name:f,assemblyNames:[e.assembly],adapter:h==="BigMafAdapter"?{type:h,bigBedLocation:i,samples:x,nhLocation:l}:h==="MafTabixAdapter"?{type:h,bedGzLocation:i,nhLocation:l,index:{indexType:g,location:a},samples:x}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:l,samples:x}}),e.view?.showTrack(O)),e.clearData(),(0,fa.isSessionModelWithWidgets)(y)&&y.hideWidget(e)}catch(y){d(y)}}},"Submit"))}function wg(e){e.addAddTrackWorkflowType(()=>new hR.AddTrackWorkflowType({name:"MAF track",ReactComponent:yg,stateModel:mR.types.model({})}))}var CR=V(yR()),qR=V(kR()),kg=class extends qR.default{name="MafGetSamples";async execute(t,r){let n=this.pluginManager,i=await this.deserializeArguments(t,r),{regions:o,adapterConfig:a,sessionId:u}=i,{dataAdapter:l}=await(0,CR.getAdapter)(n,u,a);return l.getSamples(o,i)}};function Cg(e){e.addRpcMethod(()=>new kg(e))}var DR=V(Gr());var IR=V(Os()),ha=V(Lt()),jR=V(Es()),FR=V(As()),LR=V(vt());var es=class extends IR.BaseFeatureDataAdapter{setupP;async setupPre(){let t=this.config;if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,LR.getSnapshot)(t),type:"BedTabixAdapter"})).dataAdapter}}async setupPre2(){return this.setupP||(this.setupP=this.setupPre().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,ha.updateStatus)("Downloading index",r,()=>this.setupPre2())}async getRefNames(t){let{adapter:r}=await this.setup(t);return r.getRefNames()}async getHeader(t){let{adapter:r}=await this.setup(t);return r.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,FR.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,ha.updateStatus)("Downloading alignments",n,()=>Da(o.getFeatures(t).pipe(za())));await(0,ha.updateStatus)("Processing alignments",n,()=>{let u="",l=this.getConf("refAssemblyName");for(let s of a){let c=s.get("field5").split(","),d={};for(let f=0;f<c.length;f++){let p=c[f],h=p.split(":")[5],m=p.split(":"),g=m[0].split("."),[_,w="",...y]=g,x,O="";g.length===2?(x=_,O=w):Number.isNaN(+w)?(x=_,O=[w,...y].join(".")):(x=`${_}.${w}`,O=y.join(".")),x&&(u=u||x,d[x]={chr:O,start:+m[1],srcSize:+m[2],strand:m[3]==="-"?-1:1,unknown:+m[4],data:h})}i.next(new ha.SimpleFeature({id:s.id(),data:{start:s.get("start"),end:s.get("end"),refName:s.get("refName"),name:s.get("name"),score:s.get("score"),alignments:d,seq:d[l||t.assemblyName]?.data||d[u]?.data}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,jR.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?mi(n):void 0}}freeResources(){}};var qg=V(_n());var pY=(0,qg.ConfigurationSchema)("MafTabixAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bedGzLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi",locationType:"UriLocation"}},refAssemblyName:{type:"string",defaultValue:""},index:(0,qg.ConfigurationSchema)("Index",{location:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi"}},indexType:{type:"string",defaultValue:"TBI"}}),nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),NR=pY;function Ig(e){return e.addAdapterType(()=>new DR.AdapterType({name:"MafTabixAdapter",AdapterClass:es,configSchema:NR}))}var Xd=V(Gr());var zR=V(_n()),BR=V(Gr());function jg(e){return(0,zR.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,BR.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function Fg(e){return e.addTrackType(()=>{let t=jg(e);return new Xd.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,Xd.createBaseTrackModel)(e,"MafTrack",t)})})}var Qd=class extends UR.default{name="MafViewerPlugin";version=Qg;install(t){fh(t),Fg(t),mg(t),_g(t),Ig(t),eh(t),wg(t),Cg(t)}configure(t){}};return Zg(hY);})();
8
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function nh(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Cs=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=rh(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Mr(c))try{c()}catch(m){o=m instanceof Ms?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=rh(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{Ey(h)}catch(m){o=o??[],m instanceof Ms?o=uo(uo([],ao(o)),ao(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(o)throw new Ms(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Ey(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)&&nh(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&nh(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var RZ=Cs.EMPTY;function Ay(e){return e instanceof Cs||e&&"closed"in e&&Mr(e.remove)&&Mr(e.add)&&Mr(e.unsubscribe)}function Ey(e){Mr(e)?e():e.unsubscribe()}var yn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var so={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=so.delegate;return i?.setTimeout?i.setTimeout.apply(i,uo([e,t],ao(r))):setTimeout.apply(void 0,uo([e,t],ao(r)))},clearTimeout:function(e){var t=so.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Ty(e){so.setTimeout(function(){var t=yn.onUnhandledError;if(t)t(e);else throw e})}function ih(){}var Py=function(){return oh("C",void 0,void 0)}();function Ry(e){return oh("E",void 0,e)}function My(e){return oh("N",e,void 0)}function oh(e,t,r){return{kind:e,value:t,error:r}}var ah=null;function Cy(e){yn.useDeprecatedSynchronousErrorHandling&&ah&&(ah.errorThrown=!0,ah.error=e)}var ch=function(e){Na(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Ay(r)&&r.add(n)):n.destination=wk,n}return t.create=function(r,n,i){return new lh(r,n,i)},t.prototype.next=function(r){this.isStopped?sh(My(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?sh(Ry(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?sh(Py,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}(Cs);var bk=Function.prototype.bind;function uh(e,t){return bk.call(e,t)}var _k=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(n){ks(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){ks(n)}else ks(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ks(r)}},e}(),lh=function(e){Na(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(Mr(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&yn.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&uh(r.next,u),error:r.error&&uh(r.error,u),complete:r.complete&&uh(r.complete,u)}):a=r}return o.destination=new _k(a),o}return t}(ch);function ks(e){yn.useDeprecatedSynchronousErrorHandling?Cy(e):Ty(e)}function yk(e){throw e}function sh(e,t){var r=yn.onStoppedNotification;r&&so.setTimeout(function(){return r(e,t)})}var wk={closed:!0,next:ih,error:yk,complete:ih};function xk(e){return Mr(e?.lift)}function qs(e){return function(t){if(xk(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function ky(e,t,r,n,i){return new Sk(e,t,r,n,i)}var Sk=function(e){Na(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(ch);var qy=Rs(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Da(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new lh({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new qy)}});e.subscribe(o)})}function Iy(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(ky(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}function jy(e,t){return qs(Iy(e,t,arguments.length>=2,!1,!0))}var Ok=function(e,t){return e.push(t),e};function za(){return qs(function(e,t){jy(Ok,[])(e).subscribe(t)})}var Ba=class extends Fy.BaseFeatureDataAdapter{setupP;async setup(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,Dy.getSnapshot)(this.config),type:"BigBedAdapter"})).dataAdapter}}async setupPre(){return this.setupP||(this.setupP=this.setup().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async getRefNames(){let{adapter:t}=await this.setup();return t.getRefNames()}async getHeader(){let{adapter:t}=await this.setup();return t.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,Ny.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(),a=await(0,Is.updateStatus)("Downloading alignment",n,()=>Da(o.getFeatures(t).pipe(za())));for(let u of a){let s=u.get("mafBlock").split(";"),c,d=[],f={},p=[];for(let h of s)h.startsWith("s")&&(c?(d.push(h.split(/ +/)[6]),p.push(h)):(c=h.split(/ +/)[6],d.push(c),p.push(h)));for(let h=0;h<p.length;h++){let g=p[h].split(/ +/),_=g[1].split("."),w=_[0],y=_[1];f[w]={chr:y,start:+g[1],srcSize:+g[2],strand:g[3]==="+"?1:-1,unknown:+g[4],data:d[h]}}i.next(new Is.SimpleFeature({id:u.id(),data:{start:u.get("start"),end:u.get("end"),refName:u.get("refName"),seq:d[0],alignments:f}}))}i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Ly.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?mi(n):void 0}}freeResources(){}};var zy=V(_n());var Ek=(0,zy.ConfigurationSchema)("BigMafAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bigBedLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bb",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),By=Ek;function fh(e){return e.addAdapterType(()=>new Uy.AdapterType({name:"BigMafAdapter",AdapterClass:Ba,configSchema:By}))}var eR=V(Gr());var xt=V(Ye()),wP=V(Qw()),xP=V(nP()),Hd=V(Lt()),SP=V(Qn()),OP=V(Xa());sg();var mK=(0,OP.makeStyles)()({cursor:{pointerEvents:"none"}}),vK=(0,SP.observer)(function(e){let{model:t}=e,{classes:r}=mK(),{pluginManager:n}=(0,Hd.getEnv)(t),{rowHeight:i,height:o,scrollTop:a,samples:u}=t,l=(0,xt.useRef)(null),s=n.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=s.exports,[d,f]=(0,xt.useState)(),[p,h]=(0,xt.useState)(),{width:m}=(0,Hd.getContainingView)(t);return xt.default.createElement("div",{ref:l,onMouseMove:g=>{let _=l.current?.getBoundingClientRect(),w=_?.top||0,y=_?.left||0;f(g.clientY-w),h(g.clientX-y)},onMouseLeave:()=>{f(void 0),h(void 0)}},xt.default.createElement(c,{...e}),xt.default.createElement(Wd,{model:t}),d&&u?xt.default.createElement("div",{style:{position:"relative"}},xt.default.createElement("svg",{className:r.cursor,width:m,height:o,style:{position:"absolute",top:a}},xt.default.createElement("line",{x1:0,x2:m,y1:d-a,y2:d-a,stroke:"black"}),xt.default.createElement("line",{x1:p,x2:p,y1:0,y2:o,stroke:"black"})),xt.default.createElement(wP.default,null,xt.default.createElement(xP.default,{html:Object.entries(u[Math.floor(d/i)]||{}).filter(([g])=>g!=="color"&&g!=="id").map(([g,_])=>`${g}:${_}`).join(`
9
+ `)}))):null)}),EP=vK;var AP=V(_n());function cg(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,AP.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var $d=V(_n()),la=V(Lt()),XP=V(PP());function Vd(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Gd(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function gK(e,t){return e.parent===t.parent?1:2}function bK(e){return e.reduce(_K,0)/e.length}function _K(e,t){return e+t.x}function yK(e){return 1+e.reduce(wK,0)}function wK(e,t){return Math.max(e,t.y)}function xK(e){for(var t;t=e.children;)e=t[0];return e}function SK(e){for(var t;t=e.children;)e=t[t.length-1];return e}function lg(){var e=gK,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(f){var p=f.children;p?(f.x=bK(p),f.y=yK(p)):(f.x=a?u+=e(f,a):0,f.y=0,a=f)});var l=xK(o),s=SK(o),c=l.x-e(l,s)/2,d=s.x+e(s,l)/2;return o.eachAfter(n?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*r}:function(f){f.x=(f.x-c)/(d-c)*t,f.y=(1-(o.y?f.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}function OK(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function RP(){return this.eachAfter(OK)}function MP(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function CP(e,t){for(var r=this,n=[r],i,o,a=-1;r=n.pop();)if(e.call(t,r,++a,this),i=r.children)for(o=i.length-1;o>=0;--o)n.push(i[o]);return this}function kP(e,t){for(var r=this,n=[r],i=[],o,a,u,l=-1;r=n.pop();)if(i.push(r),o=r.children)for(a=0,u=o.length;a<u;++a)n.push(o[a]);for(;r=i.pop();)e.call(t,r,++l,this);return this}function qP(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function IP(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}function jP(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function FP(e){for(var t=this,r=EK(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function EK(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function LP(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function NP(){return Array.from(this)}function DP(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function zP(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*BP(){var e=this,t,r=[e],n,i,o;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,o=n.length;i<o;++i)r.push(n[i]);while(r.length)}function ca(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=PK)):t===void 0&&(t=TK);for(var r=new Gu(e),n,i=[r],o,a,u,l;n=i.pop();)if((a=t(n.data))&&(l=(a=Array.from(a)).length))for(n.children=a,u=l-1;u>=0;--u)i.push(o=a[u]=new Gu(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(MK)}function AK(){return ca(this).eachBefore(RK)}function TK(e){return e.children}function PK(e){return Array.isArray(e)?e[1]:null}function RK(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function MK(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Gu(e){this.data=e,this.depth=this.height=0,this.parent=null}Gu.prototype=ca.prototype={constructor:Gu,count:RP,each:MP,eachAfter:kP,eachBefore:CP,find:qP,sum:IP,sort:jP,path:FP,ancestors:LP,descendants:NP,leaves:DP,links:zP,copy:AK,[Symbol.iterator]:BP};var pg=V(WP()),QP=V(Oc()),ti=V(vt());var Qt=V(Ye()),VP=V($u()),er=V(mc()),GP=V(Qn()),$P=V(Xa()),CK=(0,$P.makeStyles)()({root:{width:500}}),kK=(0,GP.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=CK(),[i,o]=(0,Qt.useState)(`${t.rowHeight}`),[a,u]=(0,Qt.useState)(`${t.rowProportion}`);return Qt.default.createElement(VP.Dialog,{open:!0,onClose:r,title:"Set row height"},Qt.default.createElement(er.DialogContent,{className:n.root},Qt.default.createElement(er.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Qt.default.createElement(er.TextField,{value:i,helperText:"Enter row height",onChange:l=>{o(l.target.value)}}),Qt.default.createElement(er.TextField,{value:a,helperText:"Enter row proportion",onChange:l=>{u(l.target.value)}}),Qt.default.createElement(er.DialogActions,null,Qt.default.createElement(er.Button,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,onClick:()=>{t.setRowProportion(+a),t.setRowHeight(+i),r()}},"Submit"),Qt.default.createElement(er.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel"))))}),KP=kK;function fg(e){return(e.data.length||0)+(e.children&&Gd(e.children,fg)||0)}function dg(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{dg(n,t,r)})}function hg(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return ti.types.compose("LinearMafDisplay",n,ti.types.model({type:ti.types.literal("LinearMafDisplay"),configuration:(0,$d.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80})).volatile(()=>({prefersOffset:!0,volatileSamples:void 0,volatileTree:void 0})).actions(i=>({setRowHeight(o){i.rowHeight=o},setRowProportion(o){i.rowProportion=o},setShowAllLetters(o){i.showAllLetters=o},setMismatchRendering(o){i.mismatchRendering=o},setSamples({samples:o,tree:a}){(0,pg.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,pg.default)(a,i.volatileTree)||(i.volatileTree=a)}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,$d.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,la.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?ca(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>Vd(o.data.length||1,a.data.length||1)):void 0}})).views(i=>({get hierarchy(){let o=i.root;if(o){let a=i.treeAreaWidth;return lg().size([this.totalHeight,a]).separation(()=>1)(o),dg(o,o.data.length=0,a/fg(o)),o}else return},get samples(){return this.rowNames?bn(this.rowNames):i.volatileSamples},get totalHeight(){return this.samples?this.samples.length*i.rowHeight:1},get leaves(){return i.root?.leaves()},get rowNames(){return this.leaves?.map(o=>o.data.name)}})).views(i=>{let{trackMenuItems:o,renderProps:a}=i;return{get treeWidth(){return i.hierarchy?i.treeAreaWidth:0},renderProps(){let{showAllLetters:u,rendererConfig:l,samples:s,rowHeight:c,rowProportion:d,mismatchRendering:f}=i;return{...a(),notReady:!i.volatileSamples&&!i.volatileTree||super.notReady,config:l,samples:s,rowHeight:c,rowProportion:d,showAllLetters:u,mismatchRendering:f}},trackMenuItems(){return[...o(),{label:"Set feature height",type:"subMenu",subMenu:[{label:"Normal",onClick:()=>{i.setRowHeight(15),i.setRowProportion(.8)}},{label:"Compact",onClick:()=>{i.setRowHeight(8),i.setRowProportion(.9)}},{label:"Manually set height",onClick:()=>{(0,la.getSession)(i).queueDialog(u=>[KP,{model:i,handleClose:u}])}}]},{label:"Show all letters",type:"checkbox",checked:i.showAllLetters,onClick:()=>{i.setShowAllLetters(!i.showAllLetters)}},{label:"Draw mismatches as single color",type:"checkbox",checked:!i.mismatchRendering,onClick:()=>{i.setMismatchRendering(!i.mismatchRendering)}}]}}}).actions(i=>({afterCreate(){(0,ti.addDisposer)(i,(0,QP.autorun)(async()=>{try{let{rpcManager:o}=(0,la.getSession)(i),a=(0,XP.getRpcSessionId)(i),u=await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:l=>{(0,ti.isAlive)(i)&&i.setMessage(l)}});i.setSamples(u)}catch(o){console.error(o),(0,la.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(JP(),ZP));return u(i,a,o)}}})}function mg(e){e.addDisplayType(()=>{let t=cg(e),r=hg(t,e);return new eR.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:EP,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var oR=V(Gr()),Yd=V(Lt());var nR=V($u()),bg=V(Lt());var vg=V(Lt());function tR(e){return Object.fromEntries(Object.entries(gg(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function gg(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function Kd(e,t,r,n,i,o,a){t+n<0||t>o||(a&&(e.fillStyle=a),e.fillRect(t,r,n,i))}function rR(){let e=(0,vg.measureText)("A"),t=(0,vg.measureText)("M")-2;return{charWidth:e,charHeight:t}}function iR({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:l,rowProportion:s,features:c}=t,d=r[0],f=(d.end-d.start)/n,p=i*s,h=(0,nR.createJBrowseTheme)(a),m=gg(h),g=tR(h),{charHeight:_}=rR(),w=new Map(l.map((R,C)=>[R.id,C])),y=1/n,x=.4,O=i/2,A=p/2,T=(i-p)/2;e.font="bold 10px Courier New,monospace";for(let R of c.values()){let[C]=(0,bg.featureSpanPx)(R,d,n),M=R.get("alignments"),P=R.get("seq").toLowerCase(),N=Object.entries(M);for(let[k,I]of N){let W=I.data,j=W.toLowerCase(),D=w.get(k);if(D===void 0)continue;let F=i*D;e.beginPath(),e.fillStyle="black";for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){if(j[q]==="-"){let $=C+y*B;e.moveTo($,F+O),e.lineTo($+y+x,F+O)}B++}if(e.stroke(),!o){e.fillStyle="lightgrey";for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){let $=j[q],Q=C+y*B;P[q]===$&&$!=="-"&&Kd(e,Q,T+F,y+x,p,f),B++}}for(let q=0,B=0;q<j.length;q++){let $=j[q];if(P[q]!=="-"){if($!=="-"){let Q=C+y*B;P[q]!==$&&$!==" "?Kd(e,Q,T+F,y+x,p,f,u?m[$]??"black":"orange"):o&&Kd(e,Q,T+F,y+x,p,f,u?m[$]??"black":"lightblue")}B++}}let z=10;if(y>=z){for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){let $=C+y*B,Q=(y-z)/2+1,ge=j[q];(o||P[q]!==ge)&&ge!=="-"&&(e.fillStyle=u?g[ge]??"white":"black",i>_&&e.fillText(W[q]||"",$+Q,A+F+3)),B++}}}}for(let R of c.values()){let[C]=(0,bg.featureSpanPx)(R,d,n),M=R.get("alignments"),P=R.get("seq").toLowerCase();for(let[N,k]of Object.entries(M)){let W=k.data.toLowerCase(),j=w.get(N);if(j===void 0)continue;let D=i*j;e.beginPath(),e.fillStyle="purple";for(let F=0,z=0;F<W.length;F++){let q="";for(;P[F]==="-";)W[F]!=="-"&&W[F]!==" "&&(q+=W[F]),F++;if(q.length>0){let B=C+y*z-1;e.rect(B,T+D,1,p),n<1&&(e.rect(B-2,T+D,5,1),e.rect(B-2,T+D+p-1,5,1))}z++}e.fill()}}}var Ku=class extends oR.FeatureRendererType{getExpandedRegion(t){let{start:r,end:n}=t,i=1;return{...t,start:Math.floor(Math.max(r-i,0)),end:Math.ceil(n+i)}}async render(t){let{statusCallback:r=()=>{},regions:n,bpPerPx:i,samples:o,rowHeight:a}=t,u=n[0],l=o.length*(a+1)+100,s=(u.end-u.start)/i,c=await this.getFeatures(t),d=await(0,Yd.renderToAbstractCanvas)(s,l,t,async p=>{await(0,Yd.updateStatus)("Rendering alignment",r,()=>{iR({ctx:p,renderArgs:{...t,features:c}})})});return{...await super.render({...t,...d,width:s,height:l}),...d,features:new Map,width:s,height:l,containsNoTransferables:!0}}};var aR=V(Ye()),uR=V($u()),sR=V(Qn()),IK=(0,sR.observer)(function(e){return aR.default.createElement(uR.PrerenderedCanvas,{...e})}),cR=IK;var lR=V(_n());var jK=(0,lR.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),fR=jK;function _g(e){e.addRendererType(()=>new Ku({name:"LinearMafRenderer",ReactComponent:cR,configSchema:fR,pluginManager:e}))}var hR=V(Gr()),mR=V(vt());var ce=V(Ye()),cn=V($u()),fa=V(Lt()),Fe=V(mc()),dR=V(vt()),pR=V(Xa()),FK=(0,pR.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function yg({model:e}){let{classes:t}=FK(),[r,n]=(0,ce.useState)(""),[i,o]=(0,ce.useState)(),[a,u]=(0,ce.useState)(),[l,s]=(0,ce.useState)(),[c,d]=(0,ce.useState)(),[f,p]=(0,ce.useState)("MAF track"),[h,m]=(0,ce.useState)("BigMafAdapter"),[g,_]=(0,ce.useState)("TBI"),w=(0,dR.getRoot)(e);return ce.default.createElement(Fe.Paper,{className:t.paper},ce.default.createElement(Fe.Paper,null,c?ce.default.createElement(cn.ErrorMessage,{error:c}):null,ce.default.createElement(Fe.FormControl,null,ce.default.createElement(Fe.FormLabel,null,"File type"),ce.default.createElement(Fe.RadioGroup,{value:h,onChange:y=>{m(y.target.value)}},["BigMafAdapter","MafTabixAdapter","BgzipTaffyAdapter"].map(y=>ce.default.createElement(Fe.FormControlLabel,{key:y,value:y,control:ce.default.createElement(Fe.Radio,null),checked:h===y,label:y})))),h==="BigMafAdapter"?ce.default.createElement(cn.FileSelector,{location:i,name:"Path to bigMaf",rootModel:w,setLocation:y=>{o(y)}}):h==="MafTabixAdapter"?ce.default.createElement(ce.default.Fragment,null,ce.default.createElement(Fe.FormControl,null,ce.default.createElement(Fe.FormLabel,null,"Index type"),ce.default.createElement(Fe.RadioGroup,{value:h,onChange:y=>{_(y.target.value)}},["TBI","CSI"].map(y=>ce.default.createElement(Fe.FormControlLabel,{key:y,value:y,control:ce.default.createElement(Fe.Radio,null),checked:g===y,label:y})))),ce.default.createElement(cn.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(cn.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:w,setLocation:y=>{u(y)}})):ce.default.createElement(ce.default.Fragment,null,ce.default.createElement(cn.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(cn.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:w,setLocation:y=>{u(y)}}))),ce.default.createElement("div",null,ce.default.createElement(cn.FileSelector,{location:l,name:"Path to newick tree (.nh)",rootModel:w,setLocation:y=>{s(y)}}),ce.default.createElement(Fe.TextField,{multiline:!0,rows:10,value:r,onChange:y=>{n(y.target.value)},helperText:"Sample names (optional if .nh supplied, required if not)",placeholder:"Enter sample names from the MAF file, one per line, or JSON formatted array of samples",variant:"outlined",fullWidth:!0})),ce.default.createElement(Fe.TextField,{value:f,helperText:"Track name",onChange:y=>{p(y.target.value)}}),ce.default.createElement(Fe.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let y=(0,fa.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let O=[`${f.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,y.adminMode?"":"-sessionTrack"].join("");(0,fa.isSessionWithAddTracks)(y)&&(y.addTrackConf({trackId:O,type:"MafTrack",name:f,assemblyNames:[e.assembly],adapter:h==="BigMafAdapter"?{type:h,bigBedLocation:i,samples:x,nhLocation:l}:h==="MafTabixAdapter"?{type:h,bedGzLocation:i,nhLocation:l,index:{indexType:g,location:a},samples:x}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:l,samples:x}}),e.view?.showTrack(O)),e.clearData(),(0,fa.isSessionModelWithWidgets)(y)&&y.hideWidget(e)}catch(y){d(y)}}},"Submit"))}function wg(e){e.addAddTrackWorkflowType(()=>new hR.AddTrackWorkflowType({name:"MAF track",ReactComponent:yg,stateModel:mR.types.model({})}))}var kR=V(yR()),qR=V(CR()),Cg=class extends qR.default{name="MafGetSamples";async execute(t,r){let n=this.pluginManager,i=await this.deserializeArguments(t,r),{regions:o,adapterConfig:a,sessionId:u}=i,{dataAdapter:l}=await(0,kR.getAdapter)(n,u,a);return l.getSamples(o,i)}};function kg(e){e.addRpcMethod(()=>new Cg(e))}var DR=V(Gr());var IR=V(Os()),ha=V(Lt()),jR=V(Es()),FR=V(As()),LR=V(vt());var es=class extends IR.BaseFeatureDataAdapter{setupP;async setupPre(){let t=this.config;if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,LR.getSnapshot)(t),type:"BedTabixAdapter"})).dataAdapter}}async setupPre2(){return this.setupP||(this.setupP=this.setupPre().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,ha.updateStatus)("Downloading index",r,()=>this.setupPre2())}async getRefNames(t){let{adapter:r}=await this.setup(t);return r.getRefNames()}async getHeader(t){let{adapter:r}=await this.setup(t);return r.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,FR.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,ha.updateStatus)("Downloading alignments",n,()=>Da(o.getFeatures(t).pipe(za())));await(0,ha.updateStatus)("Processing alignments",n,()=>{let u="",l=this.getConf("refAssemblyName");for(let s of a){let c=s.get("field5").split(","),d={};for(let f=0;f<c.length;f++){let p=c[f],h=p.split(":")[5],m=p.split(":"),g=m[0].split("."),[_,w="",...y]=g,x,O="";g.length===2?(x=_,O=w):Number.isNaN(+w)?(x=_,O=[w,...y].join(".")):(x=`${_}.${w}`,O=y.join(".")),x&&(u=u||x,d[x]={chr:O,start:+m[1],srcSize:+m[2],strand:m[3]==="-"?-1:1,unknown:+m[4],data:h})}i.next(new ha.SimpleFeature({id:s.id(),data:{start:s.get("start"),end:s.get("end"),refName:s.get("refName"),name:s.get("name"),score:s.get("score"),alignments:d,seq:d[l||t.assemblyName]?.data||d[u]?.data}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,jR.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?mi(n):void 0}}freeResources(){}};var qg=V(_n());var pY=(0,qg.ConfigurationSchema)("MafTabixAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bedGzLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi",locationType:"UriLocation"}},refAssemblyName:{type:"string",defaultValue:""},index:(0,qg.ConfigurationSchema)("Index",{location:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi"}},indexType:{type:"string",defaultValue:"TBI"}}),nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),NR=pY;function Ig(e){return e.addAdapterType(()=>new DR.AdapterType({name:"MafTabixAdapter",AdapterClass:es,configSchema:NR}))}var Xd=V(Gr());var zR=V(_n()),BR=V(Gr());function jg(e){return(0,zR.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,BR.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function Fg(e){return e.addTrackType(()=>{let t=jg(e);return new Xd.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,Xd.createBaseTrackModel)(e,"MafTrack",t)})})}var Qd=class extends UR.default{name="MafViewerPlugin";version=Qg;install(t){fh(t),Fg(t),mg(t),_g(t),Ig(t),eh(t),wg(t),kg(t)}configure(t){}};return Zg(hY);})();
10
10
  /*! Bundled license information:
11
11
 
12
12
  tabbable/dist/index.esm.js: