jbrowse-plugin-mafviewer 1.1.2 → 1.1.3
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.
- package/dist/BigMafAdapter/BigMafAdapter.d.ts +8 -0
- package/dist/BigMafAdapter/BigMafAdapter.js +15 -0
- package/dist/BigMafAdapter/BigMafAdapter.js.map +1 -1
- package/dist/LinearMafDisplay/components/Tree.js +5 -1
- package/dist/LinearMafDisplay/components/Tree.js.map +1 -1
- package/dist/LinearMafDisplay/stateModel.d.ts +2 -6
- package/dist/LinearMafDisplay/stateModel.js +6 -1
- package/dist/LinearMafDisplay/stateModel.js.map +1 -1
- package/dist/MafAddTrackWorkflow/AddTrackWorkflow.js +2 -2
- package/dist/MafAddTrackWorkflow/AddTrackWorkflow.js.map +1 -1
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +8 -8
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +3 -3
- package/package.json +1 -1
- package/src/BigMafAdapter/BigMafAdapter.ts +20 -0
- package/src/LinearMafDisplay/components/Tree.tsx +9 -1
- package/src/LinearMafDisplay/stateModel.ts +3 -1
- package/src/MafAddTrackWorkflow/AddTrackWorkflow.tsx +3 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";var JBrowsePluginMafViewer=(()=>{var LR=Object.create;var rs=Object.defineProperty;var NR=Object.getOwnPropertyDescriptor;var DR=Object.getOwnPropertyNames;var zR=Object.getPrototypeOf,BR=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),Jd=(e,t)=>{for(var r in t)rs(e,r,{get:t[r],enumerable:!0})},zb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of DR(t))!BR.call(e,i)&&i!==r&&rs(e,i,{get:()=>t[i],enumerable:!(n=NR(t,i))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?LR(zR(e)):{},zb(t||!e||!e.__esModule?rs(r,"default",{value:e,enumerable:!0}):r,e)),Bb=e=>zb(rs({},"__esModule",{value:!0}),e);var Wb=b((aY,Ub)=>{Ub.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Vr=b((sY,Vb)=>{Vb.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var Xd=b(()=>{});var tp=b(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});function Gb(e){return(typeof e=="object"&&e!==null&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}var Qd=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(`${Gb(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${Gb(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 c=await u.arrayBuffer(),s=u.headers.get("content-range"),l=/\/(\d+)$/.exec(s||"");return l?.[1]&&(this._stat={size:parseInt(l[1],10)}),new Uint8Array(c.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(){}};ep.default=Qd});var Kb=b($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:!0})});var Yb=b(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var rp=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(){}};np.default=rp});var ip=b(et=>{"use strict";var WR=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]}),HR=et&&et.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&WR(t,e,r)},ha=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=$R;et.fromUrl=Zb;var VR=ha(Xd()),GR=ha(tp());HR(Kb(),et);function Zb(e,t={}){return new GR.default(e,t)}function $R(e,t,r,n={}){if(r!==void 0)return r;if(e!==void 0)return Zb(e,n);if(t!==void 0)return new VR.default(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}var KR=Yb();Object.defineProperty(et,"BlobFile",{enumerable:!0,get:function(){return ha(KR).default}});var YR=tp();Object.defineProperty(et,"RemoteFile",{enumerable:!0,get:function(){return ha(YR).default}});var ZR=Xd();Object.defineProperty(et,"LocalFile",{enumerable:!0,get:function(){return ha(ZR).default}})});var Gr=b(ht=>{"use strict";var JR=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function XR(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)XR(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 QR={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}},eM={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,QR)):(ht.Buf8=Array,ht.Buf16=Array,ht.Buf32=Array,ht.assign(ht,eM))};ht.setTyped(JR)});var _g=b(Gi=>{"use strict";var tM=Gr(),rM=4,Jb=0,Xb=1,nM=2;function Vi(e){for(var t=e.length;--t>=0;)e[t]=0}var iM=0,ig=1,oM=2,aM=3,uM=258,fp=29,ya=256,va=ya+1+fp,Hi=30,dp=19,og=2*va+1,ti=15,op=16,sM=7,pp=256,ag=16,ug=17,sg=18,cp=[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],ns=[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],cM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cg=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],lM=512,$r=new Array((va+2)*2);Vi($r);var ma=new Array(Hi*2);Vi(ma);var ba=new Array(lM);Vi(ba);var ga=new Array(uM-aM+1);Vi(ga);var hp=new Array(fp);Vi(hp);var is=new Array(Hi);Vi(is);function ap(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 lg,fg,dg;function up(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function pg(e){return e<256?ba[e]:ba[256+(e>>>7)]}function _a(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>op-r?(e.bi_buf|=t<<e.bi_valid&65535,_a(e,e.bi_buf),e.bi_buf=t>>op-e.bi_valid,e.bi_valid+=r-op):(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 hg(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function fM(e){e.bi_valid===16?(_a(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 dM(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,c=t.stat_desc.max_length,s,l,d,f,p,h,m=0;for(f=0;f<=ti;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<og;s++)l=e.heap[s],f=r[r[l*2+1]*2+1]+1,f>c&&(f=c,m++),r[l*2+1]=f,!(l>n)&&(e.bl_count[f]++,p=0,l>=u&&(p=a[l-u]),h=r[l*2],e.opt_len+=h*(f+p),o&&(e.static_len+=h*(i[l*2+1]+p)));if(m!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(f=c;f!==0;f--)for(l=e.bl_count[f];l!==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),l--)}}function mg(e,t,r){var n=new Array(ti+1),i=0,o,a;for(o=1;o<=ti;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]=hg(n[u]++,u))}}function pM(){var e,t,r,n,i,o=new Array(ti+1);for(r=0,n=0;n<fp-1;n++)for(hp[n]=r,e=0;e<1<<cp[n];e++)ga[r++]=n;for(ga[r-1]=n,i=0,n=0;n<16;n++)for(is[n]=i,e=0;e<1<<ns[n];e++)ba[i++]=n;for(i>>=7;n<Hi;n++)for(is[n]=i<<7,e=0;e<1<<ns[n]-7;e++)ba[256+i++]=n;for(t=0;t<=ti;t++)o[t]=0;for(e=0;e<=143;)$r[e*2+1]=8,e++,o[8]++;for(;e<=255;)$r[e*2+1]=9,e++,o[9]++;for(;e<=279;)$r[e*2+1]=7,e++,o[7]++;for(;e<=287;)$r[e*2+1]=8,e++,o[8]++;for(mg($r,va+1,o),e=0;e<Hi;e++)ma[e*2+1]=5,ma[e*2]=hg(e,5);lg=new ap($r,cp,ya+1,va,ti),fg=new ap(ma,ns,0,Hi,ti),dg=new ap(new Array(0),cM,0,dp,sM)}function vg(e){var t;for(t=0;t<va;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Hi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<dp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[pp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function bg(e){e.bi_valid>8?_a(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 hM(e,t,r,n){bg(e),n&&(_a(e,r),_a(e,~r)),tM.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function Qb(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 sp(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&Qb(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Qb(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function eg(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=ga[i],Or(e,a+ya+1,t),u=cp[a],u!==0&&(i-=hp[a],Et(e,i,u)),n--,a=pg(n),Or(e,a,r),u=ns[a],u!==0&&(n-=is[a],Et(e,n,u)));while(o<e.last_lit);Or(e,pp,t)}function lp(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,c=-1,s;for(e.heap_len=0,e.heap_max=og,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=c=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=c<2?++c:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,i&&(e.static_len-=n[s*2+1]);for(t.max_code=c,a=e.heap_len>>1;a>=1;a--)sp(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],sp(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++,sp(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],dM(e,t),mg(r,c,e.bl_count)}function tg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,c=7,s=4;for(a===0&&(c=138,s=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++u<c&&o===a)&&(u<s?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[ag*2]++):u<=10?e.bl_tree[ug*2]++:e.bl_tree[sg*2]++,u=0,i=o,a===0?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4))}function rg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,c=7,s=4;for(a===0&&(c=138,s=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++u<c&&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,ag,e.bl_tree),Et(e,u-3,2)):u<=10?(Or(e,ug,e.bl_tree),Et(e,u-3,3)):(Or(e,sg,e.bl_tree),Et(e,u-11,7));u=0,i=o,a===0?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4)}}function mM(e){var t;for(tg(e,e.dyn_ltree,e.l_desc.max_code),tg(e,e.dyn_dtree,e.d_desc.max_code),lp(e,e.bl_desc),t=dp-1;t>=3&&e.bl_tree[cg[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function vM(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[cg[i]*2+1],3);rg(e,e.dyn_ltree,t-1),rg(e,e.dyn_dtree,r-1)}function bM(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Jb;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Xb;for(r=32;r<ya;r++)if(e.dyn_ltree[r*2]!==0)return Xb;return Jb}var ng=!1;function gM(e){ng||(pM(),ng=!0),e.l_desc=new up(e.dyn_ltree,lg),e.d_desc=new up(e.dyn_dtree,fg),e.bl_desc=new up(e.bl_tree,dg),e.bi_buf=0,e.bi_valid=0,vg(e)}function gg(e,t,r,n){Et(e,(iM<<1)+(n?1:0),3),hM(e,t,r,!0)}function _M(e){Et(e,ig<<1,3),Or(e,pp,$r),fM(e)}function yM(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===nM&&(e.strm.data_type=bM(e)),lp(e,e.l_desc),lp(e,e.d_desc),a=mM(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?gg(e,t,r,n):e.strategy===rM||o===i?(Et(e,(ig<<1)+(n?1:0),3),eg(e,$r,ma)):(Et(e,(oM<<1)+(n?1:0),3),vM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),eg(e,e.dyn_ltree,e.dyn_dtree)),vg(e),n&&bg(e)}function wM(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[(ga[r]+ya+1)*2]++,e.dyn_dtree[pg(t)*2]++),e.last_lit===e.lit_bufsize-1}Gi._tr_init=gM;Gi._tr_stored_block=gg;Gi._tr_flush_block=yM;Gi._tr_tally=wM;Gi._tr_align=_M});var mp=b((bY,yg)=>{"use strict";function xM(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}yg.exports=xM});var vp=b((gY,wg)=>{"use strict";function SM(){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 OM=SM();function EM(e,t,r,n){var i=OM,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}wg.exports=EM});var os=b((_Y,xg)=>{"use strict";xg.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 kg=b(Tr=>{"use strict";var mt=Gr(),zt=_g(),Ag=mp(),fn=vp(),AM=os(),oi=0,TM=1,PM=3,vn=4,Sg=5,Ar=0,Og=1,Bt=-2,RM=-3,bp=-5,MM=-1,kM=1,as=2,CM=3,qM=4,IM=0,jM=2,ls=8,FM=9,LM=15,NM=8,DM=29,zM=256,_p=zM+1+DM,BM=30,UM=19,WM=2*_p+1,HM=15,de=3,hn=258,tr=hn+de+1,VM=32,fs=42,yp=69,us=73,ss=91,cs=103,ri=113,xa=666,Ve=1,Sa=2,ni=3,Yi=4,GM=3;function mn(e,t){return e.msg=AM[t],t}function Eg(e){return(e<<1)-(e>4?9:0)}function pn(e){for(var t=e.length;--t>=0;)e[t]=0}function dn(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){zt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,dn(e.strm)}function he(e,t){e.pending_buf[e.pending++]=t}function wa(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function $M(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=Ag(e.adler,t,i,r):e.state.wrap===2&&(e.adler=fn(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Tg(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,u=e.nice_match,c=e.strstart>e.w_size-tr?e.strstart-(e.w_size-tr):0,s=e.window,l=e.w_mask,d=e.prev,f=e.strstart+hn,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=hn-(f-n),n=f-hn,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&l])>c&&--r!==0);return a<=e.lookahead?a:e.lookahead}function ii(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-tr)){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=$M(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<tr&&e.strm.avail_in!==0)}function KM(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ii(e),e.lookahead===0&&t===oi)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-tr&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===vn?(tt(e,!0),e.strm.avail_out===0?ni:Yi):(e.strstart>e.block_start&&(tt(e,!1),e.strm.avail_out===0),Ve)}function gp(e,t){for(var r,n;;){if(e.lookahead<tr){if(ii(e),e.lookahead<tr&&t===oi)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-tr&&(e.match_length=Tg(e,r)),e.match_length>=de)if(n=zt._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=zt._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===vn?(tt(e,!0),e.strm.avail_out===0?ni:Yi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Sa}function $i(e,t){for(var r,n,i;;){if(e.lookahead<tr){if(ii(e),e.lookahead<tr&&t===oi)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-tr&&(e.match_length=Tg(e,r),e.match_length<=5&&(e.strategy===kM||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=zt._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=zt._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=zt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===vn?(tt(e,!0),e.strm.avail_out===0?ni:Yi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Sa}function YM(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=hn){if(ii(e),e.lookahead<=hn&&t===oi)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+hn;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=hn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(r=zt._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=zt._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===vn?(tt(e,!0),e.strm.avail_out===0?ni:Yi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Sa}function ZM(e,t){for(var r;;){if(e.lookahead===0&&(ii(e),e.lookahead===0)){if(t===oi)return Ve;break}if(e.match_length=0,r=zt._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===vn?(tt(e,!0),e.strm.avail_out===0?ni:Yi):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Sa}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 Ki;Ki=[new Er(0,0,0,0,KM),new Er(4,4,8,4,gp),new Er(4,5,16,8,gp),new Er(4,6,32,32,gp),new Er(4,4,16,16,$i),new Er(8,16,32,32,$i),new Er(8,16,128,128,$i),new Er(8,32,128,256,$i),new Er(32,128,258,1024,$i),new Er(32,258,258,4096,$i)];function JM(e){e.window_size=2*e.w_size,pn(e.head),e.max_lazy_match=Ki[e.level].max_lazy,e.good_match=Ki[e.level].good_length,e.nice_match=Ki[e.level].nice_length,e.max_chain_length=Ki[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 XM(){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=ls,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(WM*2),this.dyn_dtree=new mt.Buf16((2*BM+1)*2),this.bl_tree=new mt.Buf16((2*UM+1)*2),pn(this.dyn_ltree),pn(this.dyn_dtree),pn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new mt.Buf16(HM+1),this.heap=new mt.Buf16(2*_p+1),pn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new mt.Buf16(2*_p+1),pn(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 Pg(e){var t;return!e||!e.state?mn(e,Bt):(e.total_in=e.total_out=0,e.data_type=jM,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fs:ri,e.adler=t.wrap===2?0:1,t.last_flush=oi,zt._tr_init(t),Ar)}function Rg(e){var t=Pg(e);return t===Ar&&JM(e.state),t}function QM(e,t){return!e||!e.state||e.state.wrap!==2?Bt:(e.state.gzhead=t,Ar)}function Mg(e,t,r,n,i,o){if(!e)return Bt;var a=1;if(t===MM&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>FM||r!==ls||n<8||n>15||t<0||t>9||o<0||o>qM)return mn(e,Bt);n===8&&(n=9);var u=new XM;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,Rg(e)}function ek(e,t){return Mg(e,t,ls,LM,NM,IM)}function tk(e,t){var r,n,i,o;if(!e||!e.state||t>Sg||t<0)return e?mn(e,Bt):Bt;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===xa&&t!==vn)return mn(e,e.avail_out===0?bp:Bt);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===fs)if(n.wrap===2)e.adler=0,he(n,31),he(n,139),he(n,8),n.gzhead?(he(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)),he(n,n.gzhead.time&255),he(n,n.gzhead.time>>8&255),he(n,n.gzhead.time>>16&255),he(n,n.gzhead.time>>24&255),he(n,n.level===9?2:n.strategy>=as||n.level<2?4:0),he(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(he(n,n.gzhead.extra.length&255),he(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=fn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=yp):(he(n,0),he(n,0),he(n,0),he(n,0),he(n,0),he(n,n.level===9?2:n.strategy>=as||n.level<2?4:0),he(n,GM),n.status=ri);else{var a=ls+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=as||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=VM),a+=31-a%31,n.status=ri,wa(n,a),n.strstart!==0&&(wa(n,e.adler>>>16),wa(n,e.adler&65535)),e.adler=1}if(n.status===yp)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=fn(e.adler,n.pending_buf,n.pending-i,i)),dn(e),i=n.pending,n.pending===n.pending_buf_size));)he(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=us)}else n.status=us;if(n.status===us)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),dn(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,he(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=ss)}else n.status=ss;if(n.status===ss)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),dn(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,he(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=cs)}else n.status=cs;if(n.status===cs&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&dn(e),n.pending+2<=n.pending_buf_size&&(he(n,e.adler&255),he(n,e.adler>>8&255),e.adler=0,n.status=ri)):n.status=ri),n.pending!==0){if(dn(e),e.avail_out===0)return n.last_flush=-1,Ar}else if(e.avail_in===0&&Eg(t)<=Eg(r)&&t!==vn)return mn(e,bp);if(n.status===xa&&e.avail_in!==0)return mn(e,bp);if(e.avail_in!==0||n.lookahead!==0||t!==oi&&n.status!==xa){var c=n.strategy===as?ZM(n,t):n.strategy===CM?YM(n,t):Ki[n.level].func(n,t);if((c===ni||c===Yi)&&(n.status=xa),c===Ve||c===ni)return e.avail_out===0&&(n.last_flush=-1),Ar;if(c===Sa&&(t===TM?zt._tr_align(n):t!==Sg&&(zt._tr_stored_block(n,0,0,!1),t===PM&&(pn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),dn(e),e.avail_out===0))return n.last_flush=-1,Ar}return t!==vn?Ar:n.wrap<=0?Og:(n.wrap===2?(he(n,e.adler&255),he(n,e.adler>>8&255),he(n,e.adler>>16&255),he(n,e.adler>>24&255),he(n,e.total_in&255),he(n,e.total_in>>8&255),he(n,e.total_in>>16&255),he(n,e.total_in>>24&255)):(wa(n,e.adler>>>16),wa(n,e.adler&65535)),dn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ar:Og)}function rk(e){var t;return!e||!e.state?Bt:(t=e.state.status,t!==fs&&t!==yp&&t!==us&&t!==ss&&t!==cs&&t!==ri&&t!==xa?mn(e,Bt):(e.state=null,t===ri?mn(e,RM):Ar))}function nk(e,t){var r=t.length,n,i,o,a,u,c,s,l;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==fs||n.lookahead))return Bt;for(a===1&&(e.adler=Ag(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(pn(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new mt.Buf8(n.w_size),mt.arraySet(l,t,r-n.w_size,n.w_size,0),t=l,r=n.w_size),u=e.avail_in,c=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,ii(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,ii(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=c,e.input=s,e.avail_in=u,n.wrap=a,Ar}Tr.deflateInit=ek;Tr.deflateInit2=Mg;Tr.deflateReset=Rg;Tr.deflateResetKeep=Pg;Tr.deflateSetHeader=QM;Tr.deflate=tk;Tr.deflateEnd=rk;Tr.deflateSetDictionary=nk;Tr.deflateInfo="pako deflate (from Nodeca project)"});var wp=b(Zi=>{"use strict";var ds=Gr(),Cg=!0,qg=!0;try{String.fromCharCode.apply(null,[0])}catch{Cg=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{qg=!1}var Oa=new ds.Buf8(256);for(Kr=0;Kr<256;Kr++)Oa[Kr]=Kr>=252?6:Kr>=248?5:Kr>=240?4:Kr>=224?3:Kr>=192?2:1;var Kr;Oa[254]=Oa[254]=1;Zi.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 ds.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 Ig(e,t){if(t<65534&&(e.subarray&&qg||!e.subarray&&Cg))return String.fromCharCode.apply(null,ds.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Zi.buf2binstring=function(e){return Ig(e,e.length)};Zi.binstring2buf=function(e){for(var t=new ds.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Zi.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=Oa[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 Ig(u,n)};Zi.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+Oa[e[r]]>t?r:t}});var xp=b((xY,jg)=>{"use strict";function ik(){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}jg.exports=ik});var Dg=b(Ta=>{"use strict";var Ea=kg(),Aa=Gr(),Op=wp(),Ep=os(),ok=xp(),Ng=Object.prototype.toString,ak=0,Sp=4,Ji=0,Fg=1,Lg=2,uk=-1,sk=0,ck=8;function ai(e){if(!(this instanceof ai))return new ai(e);this.options=Aa.assign({level:uk,method:ck,chunkSize:16384,windowBits:15,memLevel:8,strategy:sk,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 ok,this.strm.avail_out=0;var r=Ea.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Ji)throw new Error(Ep[r]);if(t.header&&Ea.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Op.string2buf(t.dictionary):Ng.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Ea.deflateSetDictionary(this.strm,n),r!==Ji)throw new Error(Ep[r]);this._dict_set=!0}}ai.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?Sp:ak,typeof e=="string"?r.input=Op.string2buf(e):Ng.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 Aa.Buf8(n),r.next_out=0,r.avail_out=n),i=Ea.deflate(r,o),i!==Fg&&i!==Ji)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===Sp||o===Lg))&&(this.options.to==="string"?this.onData(Op.buf2binstring(Aa.shrinkBuf(r.output,r.next_out))):this.onData(Aa.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Fg);return o===Sp?(i=Ea.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Ji):(o===Lg&&(this.onEnd(Ji),r.avail_out=0),!0)};ai.prototype.onData=function(e){this.chunks.push(e)};ai.prototype.onEnd=function(e){e===Ji&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Aa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ap(e,t){var r=new ai(t);if(r.push(e,!0),r.err)throw r.msg||Ep[r.err];return r.result}function lk(e,t){return t=t||{},t.raw=!0,Ap(e,t)}function fk(e,t){return t=t||{},t.gzip=!0,Ap(e,t)}Ta.Deflate=ai;Ta.deflate=Ap;Ta.deflateRaw=lk;Ta.gzip=fk});var Bg=b((OY,zg)=>{"use strict";var ps=30,dk=12;zg.exports=function(t,r){var n,i,o,a,u,c,s,l,d,f,p,h,m,g,_,y,w,E,S,A,T,M,C,R,k;n=t.state,i=t.next_in,R=t.input,o=i+(t.avail_in-5),a=t.next_out,k=t.output,u=a-(r-t.avail_out),c=a+(t.avail_out-257),s=n.dmax,l=n.wsize,d=n.whave,f=n.wnext,p=n.window,h=n.hold,m=n.bits,g=n.lencode,_=n.distcode,y=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{m<15&&(h+=R[i++]<<m,m+=8,h+=R[i++]<<m,m+=8),E=g[h&y];t:for(;;){if(S=E>>>24,h>>>=S,m-=S,S=E>>>16&255,S===0)k[a++]=E&65535;else if(S&16){A=E&65535,S&=15,S&&(m<S&&(h+=R[i++]<<m,m+=8),A+=h&(1<<S)-1,h>>>=S,m-=S),m<15&&(h+=R[i++]<<m,m+=8,h+=R[i++]<<m,m+=8),E=_[h&w];r:for(;;){if(S=E>>>24,h>>>=S,m-=S,S=E>>>16&255,S&16){if(T=E&65535,S&=15,m<S&&(h+=R[i++]<<m,m+=8,m<S&&(h+=R[i++]<<m,m+=8)),T+=h&(1<<S)-1,T>s){t.msg="invalid distance too far back",n.mode=ps;break e}if(h>>>=S,m-=S,S=a-u,T>S){if(S=T-S,S>d&&n.sane){t.msg="invalid distance too far back",n.mode=ps;break e}if(M=0,C=p,f===0){if(M+=l-S,S<A){A-=S;do k[a++]=p[M++];while(--S);M=a-T,C=k}}else if(f<S){if(M+=l+f-S,S-=f,S<A){A-=S;do k[a++]=p[M++];while(--S);if(M=0,f<A){S=f,A-=S;do k[a++]=p[M++];while(--S);M=a-T,C=k}}}else if(M+=f-S,S<A){A-=S;do k[a++]=p[M++];while(--S);M=a-T,C=k}for(;A>2;)k[a++]=C[M++],k[a++]=C[M++],k[a++]=C[M++],A-=3;A&&(k[a++]=C[M++],A>1&&(k[a++]=C[M++]))}else{M=a-T;do k[a++]=k[M++],k[a++]=k[M++],k[a++]=k[M++],A-=3;while(A>2);A&&(k[a++]=k[M++],A>1&&(k[a++]=k[M++]))}}else if(S&64){t.msg="invalid distance code",n.mode=ps;break e}else{E=_[(E&65535)+(h&(1<<S)-1)];continue r}break}}else if(S&64)if(S&32){n.mode=dk;break e}else{t.msg="invalid literal/length code",n.mode=ps;break e}else{E=g[(E&65535)+(h&(1<<S)-1)];continue t}break}}while(i<o&&a<c);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<c?257+(c-a):257-(a-c),n.hold=h,n.bits=m}});var Kg=b((EY,$g)=>{"use strict";var Ug=Gr(),Xi=15,Wg=852,Hg=592,Vg=0,Tp=1,Gg=2,pk=[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],hk=[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],mk=[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],vk=[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];$g.exports=function(t,r,n,i,o,a,u,c){var s=c.bits,l=0,d=0,f=0,p=0,h=0,m=0,g=0,_=0,y=0,w=0,E,S,A,T,M,C=null,R=0,k,D=new Ug.Buf16(Xi+1),P=new Ug.Buf16(Xi+1),I=null,B=0,F,q,L;for(l=0;l<=Xi;l++)D[l]=0;for(d=0;d<i;d++)D[r[n+d]]++;for(h=s,p=Xi;p>=1&&D[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,c.bits=1,0;for(f=1;f<p&&D[f]===0;f++);for(h<f&&(h=f),_=1,l=1;l<=Xi;l++)if(_<<=1,_-=D[l],_<0)return-1;if(_>0&&(t===Vg||p!==1))return-1;for(P[1]=0,l=1;l<Xi;l++)P[l+1]=P[l]+D[l];for(d=0;d<i;d++)r[n+d]!==0&&(u[P[r[n+d]]++]=d);if(t===Vg?(C=I=u,k=19):t===Tp?(C=pk,R-=257,I=hk,B-=257,k=256):(C=mk,I=vk,k=-1),w=0,d=0,l=f,M=a,m=h,g=0,A=-1,y=1<<h,T=y-1,t===Tp&&y>Wg||t===Gg&&y>Hg)return 1;for(;;){F=l-g,u[d]<k?(q=0,L=u[d]):u[d]>k?(q=I[B+u[d]],L=C[R+u[d]]):(q=96,L=0),E=1<<l-g,S=1<<m,f=S;do S-=E,o[M+(w>>g)+S]=F<<24|q<<16|L|0;while(S!==0);for(E=1<<l-1;w&E;)E>>=1;if(E!==0?(w&=E-1,w+=E):w=0,d++,--D[l]===0){if(l===p)break;l=r[n+u[d]]}if(l>h&&(w&T)!==A){for(g===0&&(g=h),M+=f,m=l-g,_=1<<m;m+g<p&&(_-=D[m+g],!(_<=0));)m++,_<<=1;if(y+=1<<m,t===Tp&&y>Wg||t===Gg&&y>Hg)return 1;A=w&T,o[A]=h<<24|m<<16|M-a|0}}return w!==0&&(o[M+w]=l-g<<24|64<<16|0),c.bits=h,0}});var R_=b(rr=>{"use strict";var Nt=Gr(),qp=mp(),Pr=vp(),bk=Bg(),Pa=Kg(),gk=0,y_=1,w_=2,Yg=4,_k=5,hs=6,ui=0,yk=1,wk=2,Ut=-2,x_=-3,Ip=-4,xk=-5,Zg=8,S_=1,Jg=2,Xg=3,Qg=4,e_=5,t_=6,r_=7,n_=8,i_=9,o_=10,bs=11,Yr=12,Pp=13,a_=14,Rp=15,u_=16,s_=17,c_=18,l_=19,ms=20,vs=21,f_=22,d_=23,p_=24,h_=25,m_=26,Mp=27,v_=28,b_=29,Me=30,jp=31,Sk=32,Ok=852,Ek=592,Ak=15,Tk=Ak;function g_(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Pk(){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 Nt.Buf16(320),this.work=new Nt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function O_(e){var t;return!e||!e.state?Ut:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=S_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Nt.Buf32(Ok),t.distcode=t.distdyn=new Nt.Buf32(Ek),t.sane=1,t.back=-1,ui)}function E_(e){var t;return!e||!e.state?Ut:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,O_(e))}function A_(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))?Ut:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,E_(e))}function T_(e,t){var r,n;return e?(n=new Pk,e.state=n,n.window=null,r=A_(e,t),r!==ui&&(e.state=null),r):Ut}function Rk(e){return T_(e,Tk)}var __=!0,kp,Cp;function Mk(e){if(__){var t;for(kp=new Nt.Buf32(512),Cp=new Nt.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(Pa(y_,e.lens,0,288,kp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Pa(w_,e.lens,0,32,Cp,0,e.work,{bits:5}),__=!1}e.lencode=kp,e.lenbits=9,e.distcode=Cp,e.distbits=5}function P_(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 Nt.Buf8(o.wsize)),n>=o.wsize?(Nt.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),Nt.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Nt.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 kk(e,t){var r,n,i,o,a,u,c,s,l,d,f,p,h,m,g=0,_,y,w,E,S,A,T,M,C=new Nt.Buf8(4),R,k,D=[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 Ut;r=e.state,r.mode===Yr&&(r.mode=Pp),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,l=r.bits,d=u,f=c,M=ui;e:for(;;)switch(r.mode){case S_:if(r.wrap===0){r.mode=Pp;break}for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0,r.mode=Jg;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)!==Zg){e.msg="unknown compression method",r.mode=Me;break}if(s>>>=4,l-=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?o_:Yr,s=0,l=0;break;case Jg:for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(r.flags=s,(r.flags&255)!==Zg){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,l=0,r.mode=Xg;case Xg:for(;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0,r.mode=Qg;case Qg:for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0,r.mode=e_;case e_:if(r.flags&1024){for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0}else r.head&&(r.head.extra=null);r.mode=t_;case t_: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)),Nt.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=r_;case r_: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=n_;case n_: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=i_;case i_:if(r.flags&512){for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(s!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Me;break}s=0,l=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Yr;break;case o_:for(;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}e.adler=r.check=g_(s),s=0,l=0,r.mode=bs;case bs:if(r.havedict===0)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=l,wk;e.adler=r.check=1,r.mode=Yr;case Yr:if(t===_k||t===hs)break e;case Pp:if(r.last){s>>>=l&7,l-=l&7,r.mode=Mp;break}for(;l<3;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}switch(r.last=s&1,s>>>=1,l-=1,s&3){case 0:r.mode=a_;break;case 1:if(Mk(r),r.mode=ms,t===hs){s>>>=2,l-=2;break e}break;case 2:r.mode=s_;break;case 3:e.msg="invalid block type",r.mode=Me}s>>>=2,l-=2;break;case a_:for(s>>>=l&7,l-=l&7;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Me;break}if(r.length=s&65535,s=0,l=0,r.mode=Rp,t===hs)break e;case Rp:r.mode=u_;case u_:if(p=r.length,p){if(p>u&&(p=u),p>c&&(p=c),p===0)break e;Nt.arraySet(i,n,o,p,a),u-=p,o+=p,c-=p,a+=p,r.length-=p;break}r.mode=Yr;break;case s_:for(;l<14;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(r.nlen=(s&31)+257,s>>>=5,l-=5,r.ndist=(s&31)+1,s>>>=5,l-=5,r.ncode=(s&15)+4,s>>>=4,l-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Me;break}r.have=0,r.mode=c_;case c_:for(;r.have<r.ncode;){for(;l<3;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}r.lens[D[r.have++]]=s&7,s>>>=3,l-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},M=Pa(gk,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,M){e.msg="invalid code lengths set",r.mode=Me;break}r.have=0,r.mode=l_;case l_:for(;r.have<r.nlen+r.ndist;){for(;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,y=g>>>16&255,w=g&65535,!(_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(w<16)s>>>=_,l-=_,r.lens[r.have++]=w;else{if(w===16){for(k=_+2;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(s>>>=_,l-=_,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,l-=2}else if(w===17){for(k=_+3;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=_,l-=_,T=0,p=3+(s&7),s>>>=3,l-=3}else{for(k=_+7;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=_,l-=_,T=0,p=11+(s&127),s>>>=7,l-=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,R={bits:r.lenbits},M=Pa(y_,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,M){e.msg="invalid literal/lengths set",r.mode=Me;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},M=Pa(w_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,M){e.msg="invalid distances set",r.mode=Me;break}if(r.mode=ms,t===hs)break e;case ms:r.mode=vs;case vs:if(u>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=l,bk(e,f),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,l=r.bits,r.mode===Yr&&(r.back=-1);break}for(r.back=0;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,y=g>>>16&255,w=g&65535,!(_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(y&&!(y&240)){for(E=_,S=y,A=w;g=r.lencode[A+((s&(1<<E+S)-1)>>E)],_=g>>>24,y=g>>>16&255,w=g&65535,!(E+_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=E,l-=E,r.back+=E}if(s>>>=_,l-=_,r.back+=_,r.length=w,y===0){r.mode=m_;break}if(y&32){r.back=-1,r.mode=Yr;break}if(y&64){e.msg="invalid literal/length code",r.mode=Me;break}r.extra=y&15,r.mode=f_;case f_:if(r.extra){for(k=r.extra;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}r.length+=s&(1<<r.extra)-1,s>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=d_;case d_:for(;g=r.distcode[s&(1<<r.distbits)-1],_=g>>>24,y=g>>>16&255,w=g&65535,!(_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(!(y&240)){for(E=_,S=y,A=w;g=r.distcode[A+((s&(1<<E+S)-1)>>E)],_=g>>>24,y=g>>>16&255,w=g&65535,!(E+_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=E,l-=E,r.back+=E}if(s>>>=_,l-=_,r.back+=_,y&64){e.msg="invalid distance code",r.mode=Me;break}r.offset=w,r.extra=y&15,r.mode=p_;case p_:if(r.extra){for(k=r.extra;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}r.offset+=s&(1<<r.extra)-1,s>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Me;break}r.mode=h_;case h_:if(c===0)break e;if(p=f-c,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>c&&(p=c),c-=p,r.length-=p;do i[a++]=m[h++];while(--p);r.length===0&&(r.mode=vs);break;case m_:if(c===0)break e;i[a++]=r.length,c--,r.mode=vs;break;case Mp:if(r.wrap){for(;l<32;){if(u===0)break e;u--,s|=n[o++]<<l,l+=8}if(f-=c,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?Pr(r.check,i,f,a-f):qp(r.check,i,f,a-f)),f=c,(r.flags?s:g_(s))!==r.check){e.msg="incorrect data check",r.mode=Me;break}s=0,l=0}r.mode=v_;case v_:if(r.wrap&&r.flags){for(;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(s!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Me;break}s=0,l=0}r.mode=b_;case b_:M=yk;break e;case Me:M=x_;break e;case jp:return Ip;case Sk:default:return Ut}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=l,(r.wsize||f!==e.avail_out&&r.mode<Me&&(r.mode<Mp||t!==Yg))&&P_(e,e.output,e.next_out,f-e.avail_out)?(r.mode=jp,Ip):(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):qp(r.check,i,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Yr?128:0)+(r.mode===ms||r.mode===Rp?256:0),(d===0&&f===0||t===Yg)&&M===ui&&(M=xk),M)}function Ck(e){if(!e||!e.state)return Ut;var t=e.state;return t.window&&(t.window=null),e.state=null,ui}function qk(e,t){var r;return!e||!e.state||(r=e.state,!(r.wrap&2))?Ut:(r.head=t,t.done=!1,ui)}function Ik(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==bs)?Ut:n.mode===bs&&(i=1,i=qp(i,t,r,0),i!==n.check)?x_:(o=P_(e,t,r,r),o?(n.mode=jp,Ip):(n.havedict=1,ui))}rr.inflateReset=E_;rr.inflateReset2=A_;rr.inflateResetKeep=O_;rr.inflateInit=Rk;rr.inflateInit2=T_;rr.inflate=kk;rr.inflateEnd=Ck;rr.inflateGetHeader=qk;rr.inflateSetDictionary=Ik;rr.inflateInfo="pako inflate (from Nodeca project)"});var Fp=b((TY,M_)=>{"use strict";M_.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 C_=b((PY,k_)=>{"use strict";function jk(){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}k_.exports=jk});var I_=b(Ma=>{"use strict";var Qi=R_(),Ra=Gr(),gs=wp(),ze=Fp(),Lp=os(),Fk=xp(),Lk=C_(),q_=Object.prototype.toString;function si(e){if(!(this instanceof si))return new si(e);this.options=Ra.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||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Fk,this.strm.avail_out=0;var r=Qi.inflateInit2(this.strm,t.windowBits);if(r!==ze.Z_OK)throw new Error(Lp[r]);if(this.header=new Lk,Qi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=gs.string2buf(t.dictionary):q_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Qi.inflateSetDictionary(this.strm,t.dictionary),r!==ze.Z_OK)))throw new Error(Lp[r])}si.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,u,c,s,l=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?ze.Z_FINISH:ze.Z_NO_FLUSH,typeof e=="string"?r.input=gs.binstring2buf(e):q_.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),o=Qi.inflate(r,ze.Z_NO_FLUSH),o===ze.Z_NEED_DICT&&i&&(o=Qi.inflateSetDictionary(this.strm,i)),o===ze.Z_BUF_ERROR&&l===!0&&(o=ze.Z_OK,l=!1),o!==ze.Z_STREAM_END&&o!==ze.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===ze.Z_STREAM_END||r.avail_in===0&&(a===ze.Z_FINISH||a===ze.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=gs.utf8border(r.output,r.next_out),c=r.next_out-u,s=gs.buf2string(r.output,u),r.next_out=c,r.avail_out=n-c,c&&Ra.arraySet(r.output,r.output,u,c,0),this.onData(s)):this.onData(Ra.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(l=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==ze.Z_STREAM_END);return o===ze.Z_STREAM_END&&(a=ze.Z_FINISH),a===ze.Z_FINISH?(o=Qi.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===ze.Z_OK):(a===ze.Z_SYNC_FLUSH&&(this.onEnd(ze.Z_OK),r.avail_out=0),!0)};si.prototype.onData=function(e){this.chunks.push(e)};si.prototype.onEnd=function(e){e===ze.Z_OK&&(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 Np(e,t){var r=new si(t);if(r.push(e,!0),r.err)throw r.msg||Lp[r.err];return r.result}function Nk(e,t){return t=t||{},t.raw=!0,Np(e,t)}Ma.Inflate=si;Ma.inflate=Np;Ma.inflateRaw=Nk;Ma.ungzip=Np});var L_=b((MY,F_)=>{"use strict";var Dk=Gr().assign,zk=Dg(),Bk=I_(),Uk=Fp(),j_={};Dk(j_,zk,Bk,Uk);F_.exports=j_});var Dp=b(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.sum=N_;_s.concatUint8Array=Wk;function N_(e){let t=0;for(let r of e)t+=r.length;return t}function Wk(e){let t=new Uint8Array(N_(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var zp=b(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.unzip=Hk;ws.unzipChunkSlice=Vk;var ys=L_(),D_=Dp();async function Hk(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new ys.Inflate,{strm:t}=n,n.push(o,ys.Z_SYNC_FLUSH),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,D_.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function Vk(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,u=[],c=[],s=[],l=0;do{let d=e.subarray(o-n.blockPosition),f=new ys.Inflate;if({strm:r}=f,f.push(d,ys.Z_SYNC_FLUSH),f.err)throw new Error(f.msg);let p=f.result;u.push(p);let h=p.length;c.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[l]=u[l].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),c.push(o),s.push(a);break}l++}while(r.avail_in);return{buffer:(0,D_.concatUint8Array)(u),cpositions:c,dpositions:s}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var z_=b(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL=void 0;Rr.longFromBytesToUnsigned=Gk;Rr.TWO_PWR_16_DBL=65536;Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL*Rr.TWO_PWR_16_DBL;function Gk(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 U_=b(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var $k=ip(),Bp=z_(),xs=1;function B_(e,t,r){let n=t[xs],i=r?r[xs]:1/0;return n<=e&&i>e?0:n<e?-1:1}var Up=class{constructor({filehandle:t,path:r}){if(t)this.filehandle=t;else if(r)this.filehandle=new $k.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,Bp.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,Bp.longFromBytesToUnsigned)(o,a*16),c=(0,Bp.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[u,c]}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,c=Math.floor(i.length/2),s=B_(r,i[c],i[c+1]);for(;s!==0;)s>0?u=c-1:s<0&&(a=c+1),c=Math.ceil((u-a)/2)+a,s=B_(r,i[c],i[c+1]);o.push(i[c]);let l=c+1;for(;l<i.length&&(o.push(i[l]),!(i[l][xs]>=n));l+=1);return o[o.length-1][xs]<n&&o.push([]),o}};Wp.default=Up});var W_=b(ka=>{"use strict";var Kk=ka&&ka.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ka,"__esModule",{value:!0});var Yk=ip(),Zk=zp(),Jk=Kk(U_()),Xk=Dp(),Hp=class{constructor({filehandle:t,path:r,gziFilehandle:n,gziPath:i}){if(t)this.filehandle=t;else if(r)this.filehandle=new Yk.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 Jk.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,Zk.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],c=u>=r?0:r-u,s=Math.min(r+t,u+a.length)-u;c>=0&&c<a.length&&i.push(a.subarray(c,s))}return(0,Xk.concatUint8Array)(i)}};ka.default=Hp});var Vp=b(nr=>{"use strict";var Qk=nr&&nr.__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]}),eC=nr&&nr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Qk(t,e,r)},tC=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nr,"__esModule",{value:!0});nr.BgzfFilehandle=void 0;var rC=W_();Object.defineProperty(nr,"BgzfFilehandle",{enumerable:!0,get:function(){return tC(rC).default}});eC(zp(),nr)});var Ss=b((LY,H_)=>{H_.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var ir=b((NY,V_)=>{V_.exports=JBrowseExports["@jbrowse/core/util"]});var Gp=b((DY,G_)=>{G_.exports=JBrowseExports["@jbrowse/core/util/io"]});var Os=b((zY,$_)=>{$_.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var bn=b((eZ,ly)=>{ly.exports=JBrowseExports["@jbrowse/core/configuration"]});var vt=b((oZ,hy)=>{hy.exports=JBrowseExports["mobx-state-tree"]});var Ye=b((hJ,qy)=>{qy.exports=JBrowseExports.react});var Da=b((mJ,Iy)=>{Iy.exports=JBrowseExports["react/jsx-runtime"]});function qs(){return typeof window<"u"}function kr(e){return jy(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=(jy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jy(e){return qs()?e instanceof Node||e instanceof rt(e).Node:!1}function _e(e){return qs()?e instanceof Element||e instanceof rt(e).Element:!1}function qe(e){return qs()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function Cs(e){return!qs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}function ao(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Fy(e){return["table","td","th"].includes(kr(e))}function za(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Is(e){let t=uo(),r=_e(e)?bt(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 Ly(e){let t=ur(e);for(;qe(t)&&!cr(t);){if(Is(t))return t;if(za(t))return null;t=ur(t)}return null}function uo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cr(e){return["html","body","#document"].includes(kr(e))}function bt(e){return rt(e).getComputedStyle(e)}function Ba(e){return _e(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||Cs(e)&&e.host||sr(e);return Cs(t)?t.host:t}function Ny(e){let t=ur(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&ao(t)?t:Ny(t)}function Tt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ny(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=rt(i);if(o){let u=js(a);return t.concat(a,a.visualViewport||[],ao(i)?i:[],u&&r?Tt(u):[])}return t.concat(i,Tt(i,[],r))}function js(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ua=pt(()=>{});function Vt(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&&Cs(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Fs(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ls(){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 sh(e){return e.mozInputSource===0&&e.isTrusted?!0:uh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ns(e){return hC()?!1:!uh()&&e.width===0&&e.height===0||uh()&&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 ch(){return/apple/i.test(navigator.vendor)}function uh(){let e=/android/i;return e.test(Fs())||e.test(Ls())}function Dy(){return Fs().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function hC(){return Ls().includes("jsdom/")}function li(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function zy(e){return"nativeEvent"in e}function By(e){return e.matches("html,body")}function Ze(e){return e?.ownerDocument||document}function Ds(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 zs(e){return qe(e)&&e.matches(mC)}function Je(e){e.preventDefault(),e.stopPropagation()}function lh(e){return e?e.getAttribute("role")==="combobox"&&zs(e):!1}var mC,Uy=pt(()=>{Ua();mC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"});function Bs(e,t,r){return De(e,gt(t,r))}function Pt(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function Us(e){return e==="x"?"y":"x"}function Ws(e){return e==="y"?"height":"width"}function Cr(e){return["top","bottom"].includes(Rt(e))?"y":"x"}function Hs(e){return Us(Cr(e))}function ph(e,t,r){r===void 0&&(r=!1);let n=Gt(e),i=Hs(e),o=Ws(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ha(a)),[a,Ha(a)]}function Hy(e){let t=Ha(e);return[Wa(e),t,Wa(t)]}function Wa(e){return e.replace(/start|end/g,t=>bC[t])}function gC(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 Vy(e,t,r,n){let i=Gt(e),o=gC(Rt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Wa)))),o}function Ha(e){return e.replace(/left|right|bottom|top/g,t=>vC[t])}function _C(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vs(e){return typeof e!="number"?_C(e):{top:e,right:e,bottom:e,left:e}}function Jr(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 fh,Wy,dh,gt,De,fi,_n,fr,vC,bC,Va=pt(()=>{fh=["top","right","bottom","left"],Wy=["start","end"],dh=fh.reduce((e,t)=>e.concat(t,t+"-"+Wy[0],t+"-"+Wy[1]),[]),gt=Math.min,De=Math.max,fi=Math.round,_n=Math.floor,fr=e=>({x:e,y:e}),vC={left:"right",right:"left",bottom:"top",top:"bottom"},bC={start:"end",end:"start"}});var yC,Gs,$y,so,$s,Ks,wC,xC,SC,Ky,Yy,OC,EC,Zy,AC,TC,PC,RC,MC,kC,CC,Gy,qC,IC,jC,hh,FC,LC,Ga,Jy,Xy=pt(()=>{yC=["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])"],Gs=yC.join(","),$y=typeof Element>"u",so=$y?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,$s=!$y&&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},Ks=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},wC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},xC=function(t,r,n){if(Ks(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Gs));return r&&so.call(t,Gs)&&i.unshift(t),i=i.filter(n),i},SC=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Ks(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),c=u.length?u:a.children,s=e(c,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:a,candidates:s})}else{var l=so.call(a,Gs);l&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!Ks(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},Ky=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Yy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||wC(t))&&!Ky(t)?0:t.tabIndex},OC=function(t,r){var n=Yy(t);return n<0&&r&&!Ky(t)?0:n},EC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Zy=function(t){return t.tagName==="INPUT"},AC=function(t){return Zy(t)&&t.type==="hidden"},TC=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},PC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},RC=function(t){if(!t.name)return!0;var r=t.form||$s(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=PC(i,t.form);return!o||o===t},MC=function(t){return Zy(t)&&t.type==="radio"},kC=function(t){return MC(t)&&!RC(t)},CC=function(t){var r,n=t&&$s(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,u,c;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var s,l,d;n=$s(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((l=i)!==null&&l!==void 0&&(d=l.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},Gy=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},qC=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=so.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(so.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var c=t.parentElement,s=$s(t);if(c&&!c.shadowRoot&&i(c)===!0)return Gy(t);t.assignedSlot?t=t.assignedSlot:!c&&s!==t.ownerDocument?t=s.host:t=c}t=u}if(CC(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Gy(t);return!1},IC=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 so.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},jC=function(t,r){return!(r.disabled||Ks(r)||AC(r)||qC(r,t)||TC(r)||IC(r))},hh=function(t,r){return!(kC(r)||Yy(r)<0||!jC(t,r))},FC=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},LC=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,c=OC(u,a),s=a?e(i.candidates):u;c===0?a?r.push.apply(r,s):r.push(u):n.push({documentOrder:o,tabIndex:c,item:i,isScope:a,content:s})}),n.sort(EC).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Ga=function(t,r){r=r||{};var n;return r.getShadowRoot?n=SC([t],r.includeContainer,{filter:hh.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:FC}):n=xC(t,r.includeContainer,hh.bind(null,r)),LC(n)},Jy=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return so.call(t,Gs)===!1?!1:hh(r,t)}});var Ys=b((wJ,Qy)=>{Qy.exports=JBrowseExports["react-dom"]});function e0(e,t,r){let{reference:n,floating:i}=e,o=Cr(t),a=Hs(t),u=Ws(a),c=Rt(t),s=o==="y",l=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(c){case"top":p={x:l,y:n.y-i.height};break;case"bottom":p={x:l,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(Gt(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 yn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Pt(t,e),h=Vs(p),g=u[f?d==="floating"?"reference":"floating":d],_=Jr(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:l,strategy:c})),y=d==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),E=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Jr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:y,offsetParent:w,strategy:c}):y);return{top:(_.top-S.top+h.top)/E.y,bottom:(S.bottom-_.bottom+h.bottom)/E.y,left:(_.left-S.left+h.left)/E.x,right:(S.right-_.right+h.right)/E.x}}function NC(e,t,r){return(e?[...r.filter(i=>Gt(i)===e),...r.filter(i=>Gt(i)!==e)]:r.filter(i=>Rt(i)===i)).filter(i=>e?Gt(i)===e||(t?Wa(i)!==i:!1):!0)}function t0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function r0(e){return fh.some(t=>e[t]>=0)}function s0(e){let t=gt(...e.map(o=>o.left)),r=gt(...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 DC(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=>Jr(s0(i)))}async function zC(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=Gt(r),c=Cr(r)==="y",s=["left","top"].includes(a)?-1:1,l=o&&c?-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),c?{x:p*l,y:f*s}:{x:f*s,y:p*l}}var n0,i0,o0,a0,u0,c0,l0,f0,d0,p0,h0=pt(()=>{Va();Va();n0=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:d}=e0(s,n,c),f=n,p={},h=0;for(let m=0;m<u.length;m++){let{name:g,fn:_}=u[m],{x:y,y:w,data:E,reset:S}=await _({x:l,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});l=y??l,d=w??d,p={...p,[g]:{...p[g],...E}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(s=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:l,y:d}=e0(s,f,c)),m=-1)}return{x:l,y:d,placement:f,strategy:i,middlewareData:p}};i0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:s,padding:l=0}=Pt(e,t)||{};if(s==null)return{};let d=Vs(l),f={x:r,y:n},p=Hs(i),h=Ws(p),m=await a.getDimensions(s),g=p==="y",_=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",E=o.reference[h]+o.reference[p]-f[p]-o.floating[h],S=f[p]-o.reference[p],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),T=A?A[w]:0;(!T||!await(a.isElement==null?void 0:a.isElement(A)))&&(T=u.floating[w]||o.floating[h]);let M=E/2-S/2,C=T/2-m[h]/2-1,R=gt(d[_],C),k=gt(d[y],C),D=R,P=T-m[h]-k,I=T/2-m[h]/2+M,B=Bs(D,I,P),F=!c.arrow&&Gt(i)!=null&&I!==B&&o.reference[h]/2-(I<D?R:k)-m[h]/2<0,q=F?I<D?I-D:I-P:0;return{[p]:f[p]+q,data:{[p]:B,centerOffset:I-B-q,...F&&{alignmentOffset:q}},reset:F}}});o0=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:c,elements:s}=t,{crossAxis:l=!1,alignment:d,allowedPlacements:f=dh,autoAlignment:p=!0,...h}=Pt(e,t),m=d!==void 0||f===dh?NC(d||null,p,f):f,g=await yn(t,h),_=((r=a.autoPlacement)==null?void 0:r.index)||0,y=m[_];if(y==null)return{};let w=ph(y,o,await(c.isRTL==null?void 0:c.isRTL(s.floating)));if(u!==y)return{reset:{placement:m[0]}};let E=[g[Rt(y)],g[w[0]],g[w[1]]],S=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:y,overflows:E}],A=m[_+1];if(A)return{data:{index:_+1,overflows:S},reset:{placement:A}};let T=S.map(R=>{let k=Gt(R.placement);return[R.placement,k&&l?R.overflows.slice(0,2).reduce((D,P)=>D+P,0):R.overflows[0],R.overflows]}).sort((R,k)=>R[1]-k[1]),C=((i=T.filter(R=>R[2].slice(0,Gt(R[0])?2:3).every(k=>k<=0))[0])==null?void 0:i[0])||T[0][0];return C!==u?{data:{index:_+1,overflows:S},reset:{placement:C}}:{}}}},a0=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:c,elements:s}=t,{mainAxis:l=!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),y=Cr(u),w=Rt(u)===u,E=await(c.isRTL==null?void 0:c.isRTL(s.floating)),S=f||(w||!m?[Ha(u)]:Hy(u)),A=h!=="none";!f&&A&&S.push(...Vy(u,m,h,E));let T=[u,...S],M=await yn(t,g),C=[],R=((n=o.flip)==null?void 0:n.overflows)||[];if(l&&C.push(M[_]),d){let I=ph(i,a,E);C.push(M[I[0]],M[I[1]])}if(R=[...R,{placement:i,overflows:C}],!C.every(I=>I<=0)){var k,D;let I=(((k=o.flip)==null?void 0:k.index)||0)+1,B=T[I];if(B)return{data:{index:I,overflows:R},reset:{placement:B}};let F=(D=R.filter(q=>q.overflows[0]<=0).sort((q,L)=>q.overflows[1]-L.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(p){case"bestFit":{var P;let q=(P=R.filter(L=>{if(A){let j=Cr(L.placement);return j===y||j==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(j=>j>0).reduce((j,z)=>j+z,0)]).sort((L,j)=>L[1]-j[1])[0])==null?void 0:P[0];q&&(F=q);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};u0=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 yn(t,{...i,elementContext:"reference"}),a=t0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:r0(a)}}}case"escaped":{let o=await yn(t,{...i,altBoundary:!0}),a=t0(o,r.floating);return{data:{escapedOffsets:a,escaped:r0(a)}}}default:return{}}}}};c0=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:c,y:s}=Pt(e,t),l=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),d=DC(l),f=Jr(s0(l)),p=Vs(u);function h(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&s!=null)return d.find(g=>c>g.left-p.left&&c<g.right+p.right&&s>g.top-p.top&&s<g.bottom+p.bottom)||f;if(d.length>=2){if(Cr(r)==="y"){let R=d[0],k=d[d.length-1],D=Rt(r)==="top",P=R.top,I=k.bottom,B=D?R.left:k.left,F=D?R.right:k.right,q=F-B,L=I-P;return{top:P,bottom:I,left:B,right:F,width:q,height:L,x:B,y:P}}let g=Rt(r)==="left",_=De(...d.map(R=>R.right)),y=gt(...d.map(R=>R.left)),w=d.filter(R=>g?R.left===y:R.right===_),E=w[0].top,S=w[w.length-1].bottom,A=y,T=_,M=T-A,C=S-E;return{top:E,bottom:S,left:A,right:T,width:M,height:C,x:A,y:E}}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}}:{}}}};l0=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,c=await zC(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},f0=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}=g;return{x:_,y}}},...c}=Pt(e,t),s={x:r,y:n},l=await yn(t,c),d=Cr(Rt(i)),f=Us(d),p=s[f],h=s[d];if(o){let g=f==="y"?"top":"left",_=f==="y"?"bottom":"right",y=p+l[g],w=p-l[_];p=Bs(y,p,w)}if(a){let g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",y=h+l[g],w=h-l[_];h=Bs(y,h,w)}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}}}}}},d0=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:c=!0,crossAxis:s=!0}=Pt(e,t),l={x:r,y:n},d=Cr(i),f=Us(d),p=l[f],h=l[d],m=Pt(u,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){let w=f==="y"?"height":"width",E=o.reference[f]-o.floating[w]+g.mainAxis,S=o.reference[f]+o.reference[w]-g.mainAxis;p<E?p=E:p>S&&(p=S)}if(s){var _,y;let w=f==="y"?"width":"height",E=["top","left"].includes(Rt(i)),S=o.reference[d]-o.floating[w]+(E&&((_=a.offset)==null?void 0:_[d])||0)+(E?0:g.crossAxis),A=o.reference[d]+o.reference[w]+(E?0:((y=a.offset)==null?void 0:y[d])||0)-(E?g.crossAxis:0);h<S?h=S:h>A&&(h=A)}return{[f]:p,[d]:h}}}},p0=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:c=()=>{},...s}=Pt(e,t),l=await yn(t,s),d=Rt(i),f=Gt(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 y=m-l.top-l.bottom,w=h-l.left-l.right,E=gt(m-l[g],y),S=gt(h-l[_],w),A=!t.middlewareData.shift,T=E,M=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(M=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=y),A&&!f){let R=De(l.left,0),k=De(l.right,0),D=De(l.top,0),P=De(l.bottom,0);p?M=h-2*(R!==0||k!==0?R+k:De(l.left,l.right)):T=m-2*(D!==0||P!==0?D+P:De(l.top,l.bottom))}await c({...t,availableWidth:M,availableHeight:T});let C=await a.getDimensions(u.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}}});function b0(e){let t=bt(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=fi(r)!==o||fi(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function vh(e){return _e(e)?e:e.contextElement}function co(e){let t=vh(e);if(!qe(t))return fr(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=b0(t),a=(o?fi(r.width):r.width)/n,u=(o?fi(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function g0(e){let t=rt(e);return!uo()||!t.visualViewport?BC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UC(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rt(e)?!1:t}function di(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=vh(e),a=fr(1);t&&(n?_e(n)&&(a=co(n)):a=co(e));let u=UC(o,r,n)?g0(o):fr(0),c=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,l=i.width/a.x,d=i.height/a.y;if(o){let f=rt(o),p=n&&_e(n)?rt(n):n,h=f,m=js(h);for(;m&&n&&p!==h;){let g=co(m),_=m.getBoundingClientRect(),y=bt(m),w=_.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,E=_.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,s*=g.y,l*=g.x,d*=g.y,c+=w,s+=E,h=rt(m),m=js(h)}}return Jr({width:l,height:d,x:c,y:s})}function bh(e,t){let r=Ba(e).scrollLeft;return t?t.left+r:di(sr(e)).left+r}function _0(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:bh(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function WC(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=sr(n),u=t?za(t.floating):!1;if(n===a||u&&o)return r;let c={scrollLeft:0,scrollTop:0},s=fr(1),l=fr(0),d=qe(n);if((d||!d&&!o)&&((kr(n)!=="body"||ao(a))&&(c=Ba(n)),qe(n))){let p=di(n);s=co(n),l.x=p.x+n.clientLeft,l.y=p.y+n.clientTop}let f=a&&!d&&!o?_0(a,c,!0):fr(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-c.scrollLeft*s.x+l.x+f.x,y:r.y*s.y-c.scrollTop*s.y+l.y+f.y}}function HC(e){return Array.from(e.getClientRects())}function VC(e){let t=sr(e),r=Ba(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+bh(e),u=-r.scrollTop;return bt(n).direction==="rtl"&&(a+=De(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function GC(e,t){let r=rt(e),n=sr(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;let s=uo();(!s||s&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u,y:c}}function $C(e,t){let r=di(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=qe(e)?co(e):fr(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,s=n*o.y;return{width:a,height:u,x:c,y:s}}function m0(e,t,r){let n;if(t==="viewport")n=GC(e,r);else if(t==="document")n=VC(sr(e));else if(_e(t))n=$C(t,r);else{let i=g0(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Jr(n)}function y0(e,t){let r=ur(e);return r===t||!_e(r)||cr(r)?!1:bt(r).position==="fixed"||y0(r,t)}function KC(e,t){let r=t.get(e);if(r)return r;let n=Tt(e,[],!1).filter(u=>_e(u)&&kr(u)!=="body"),i=null,o=bt(e).position==="fixed",a=o?ur(e):e;for(;_e(a)&&!cr(a);){let u=bt(a),c=Is(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ao(a)&&!c&&y0(e,a))?n=n.filter(l=>l!==a):i=u,a=ur(a)}return t.set(e,n),n}function YC(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?za(t)?[]:KC(t,this._c):[].concat(r),n],u=a[0],c=a.reduce((s,l)=>{let d=m0(t,l,i);return s.top=De(d.top,s.top),s.right=gt(d.right,s.right),s.bottom=gt(d.bottom,s.bottom),s.left=De(d.left,s.left),s},m0(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ZC(e){let{width:t,height:r}=b0(e);return{width:t,height:r}}function JC(e,t,r){let n=qe(t),i=sr(t),o=r==="fixed",a=di(e,!0,o,t),u={scrollLeft:0,scrollTop:0},c=fr(0);if(n||!n&&!o)if((kr(t)!=="body"||ao(i))&&(u=Ba(t)),n){let f=di(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else i&&(c.x=bh(i));let s=i&&!n&&!o?_0(i,u):fr(0),l=a.left+u.scrollLeft-c.x-s.x,d=a.top+u.scrollTop-c.y-s.y;return{x:l,y:d,width:a.width,height:a.height}}function mh(e){return bt(e).position==="static"}function v0(e,t){if(!qe(e)||bt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sr(e)===r&&(r=r.ownerDocument.body),r}function w0(e,t){let r=rt(e);if(za(e))return r;if(!qe(e)){let i=ur(e);for(;i&&!cr(i);){if(_e(i)&&!mh(i))return i;i=ur(i)}return r}let n=v0(e,t);for(;n&&Fy(n)&&mh(n);)n=v0(n,t);return n&&cr(n)&&mh(n)&&!Is(n)?r:n||Ly(e)||r}function QC(e){return bt(e).direction==="rtl"}function x0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eq(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,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();let s=e.getBoundingClientRect(),{left:l,top:d,width:f,height:p}=s;if(u||t(),!f||!p)return;let h=_n(d),m=_n(i.clientWidth-(l+f)),g=_n(i.clientHeight-(d+p)),_=_n(l),w={rootMargin:-h+"px "+-m+"px "+-g+"px "+-_+"px",threshold:De(0,gt(1,c))||1},E=!0;function S(A){let T=A[0].intersectionRatio;if(T!==c){if(!E)return a();T?a(!1,T):n=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!x0(s,e.getBoundingClientRect())&&a(),E=!1}try{r=new IntersectionObserver(S,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,w)}r.observe(e)}return a(!0),o}function gh(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:c=!1}=n,s=vh(e),l=i||o?[...s?Tt(s):[],...Tt(t)]:[];l.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});let d=s&&u?eq(s,r):null,f=-1,p=null;a&&(p=new ResizeObserver(_=>{let[y]=_;y&&y.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),s&&!c&&p.observe(s),p.observe(t));let h,m=c?di(e):null;c&&g();function g(){let _=di(e);m&&!x0(m,_)&&r(),m=_,h=requestAnimationFrame(g)}return r(),()=>{var _;l.forEach(y=>{i&&y.removeEventListener("scroll",r),o&&y.removeEventListener("resize",r)}),d?.(),(_=p)==null||_.disconnect(),p=null,c&&cancelAnimationFrame(h)}}var BC,XC,Zs,pi,S0,O0,E0,A0,T0,P0,_h,R0,M0,$a,yh=pt(()=>{h0();Va();Ua();Ua();BC=fr(0);XC=async function(e){let t=this.getOffsetParent||w0,r=this.getDimensions,n=await r(e.floating);return{reference:JC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};Zs={convertOffsetParentRelativeRectToViewportRelativeRect:WC,getDocumentElement:sr,getClippingRect:YC,getOffsetParent:w0,getElementRects:XC,getClientRects:HC,getDimensions:ZC,getScale:co,isElement:_e,isRTL:QC};pi=yn,S0=l0,O0=o0,E0=f0,A0=a0,T0=p0,P0=u0,_h=i0,R0=c0,M0=d0,$a=(e,t,r)=>{let n=new Map,i={platform:Zs,...r},o={...i.platform,_c:n};return n0(e,t,{...i,platform:o})}});function Xs(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(!Xs(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)&&!Xs(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function q0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function k0(e,t){let r=q0(e);return Math.round(t*r)/r}function wh(e){let t=He.useRef(e);return Js(()=>{t.current=e}),t}function I0(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:c,open:s}=e,[l,d]=He.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=He.useState(n);Xs(f,n)||p(n);let[h,m]=He.useState(null),[g,_]=He.useState(null),y=He.useCallback(L=>{L!==A.current&&(A.current=L,m(L))},[]),w=He.useCallback(L=>{L!==T.current&&(T.current=L,_(L))},[]),E=o||h,S=a||g,A=He.useRef(null),T=He.useRef(null),M=He.useRef(l),C=c!=null,R=wh(c),k=wh(i),D=wh(s),P=He.useCallback(()=>{if(!A.current||!T.current)return;let L={placement:t,strategy:r,middleware:f};k.current&&(L.platform=k.current),$a(A.current,T.current,L).then(j=>{let z={...j,isPositioned:D.current!==!1};I.current&&!Xs(M.current,z)&&(M.current=z,C0.flushSync(()=>{d(z)}))})},[f,t,r,k,D]);Js(()=>{s===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[s]);let I=He.useRef(!1);Js(()=>(I.current=!0,()=>{I.current=!1}),[]),Js(()=>{if(E&&(A.current=E),S&&(T.current=S),E&&S){if(R.current)return R.current(E,S,P);P()}},[E,S,P,R,C]);let B=He.useMemo(()=>({reference:A,floating:T,setReference:y,setFloating:w}),[y,w]),F=He.useMemo(()=>({reference:E,floating:S}),[E,S]),q=He.useMemo(()=>{let L={position:r,left:0,top:0};if(!F.floating)return L;let j=k0(F.floating,l.x),z=k0(F.floating,l.y);return u?{...L,transform:"translate("+j+"px, "+z+"px)",...q0(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:j,top:z}},[r,u,F.floating,l.x,l.y]);return He.useMemo(()=>({...l,update:P,refs:B,elements:F,floatingStyles:q}),[l,P,B,F,q])}var He,Qs,C0,Js,tq,ec,j0,F0,L0,N0,D0,z0,B0,U0,xh=pt(()=>{yh();yh();He=V(Ye(),1),Qs=V(Ye(),1),C0=V(Ys(),1),Js=typeof document<"u"?Qs.useLayoutEffect:Qs.useEffect;tq=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?_h({element:n.current,padding:i}).fn(r):{}:n?_h({element:n,padding:i}).fn(r):{}}}},ec=(e,t)=>({...S0(e),options:[e,t]}),j0=(e,t)=>({...E0(e),options:[e,t]}),F0=(e,t)=>({...M0(e),options:[e,t]}),L0=(e,t)=>({...A0(e),options:[e,t]}),N0=(e,t)=>({...T0(e),options:[e,t]}),D0=(e,t)=>({...O0(e),options:[e,t]}),z0=(e,t)=>({...P0(e),options:[e,t]}),B0=(e,t)=>({...R0(e),options:[e,t]}),U0=(e,t)=>({...tq(e),options:[e,t]})});var Nw={};Jd(Nw,{Composite:()=>aq,CompositeItem:()=>uq,FloatingArrow:()=>fq,FloatingDelayGroup:()=>vq,FloatingFocusManager:()=>Tq,FloatingList:()=>gw,FloatingNode:()=>pq,FloatingOverlay:()=>Rq,FloatingPortal:()=>Oq,FloatingTree:()=>hq,arrow:()=>U0,autoPlacement:()=>D0,autoUpdate:()=>gh,computePosition:()=>$a,detectOverflow:()=>pi,flip:()=>L0,getOverflowAncestors:()=>Tt,hide:()=>z0,inline:()=>B0,inner:()=>Gq,limitShift:()=>F0,offset:()=>ec,platform:()=>Zs,safePolygon:()=>Yq,shift:()=>j0,size:()=>N0,useClick:()=>Mq,useClientPoint:()=>Cq,useDelayGroup:()=>bq,useDelayGroupContext:()=>Pw,useDismiss:()=>jq,useFloating:()=>Fq,useFloatingNodeId:()=>dq,useFloatingParentNodeId:()=>_i,useFloatingPortalNode:()=>Iw,useFloatingRootContext:()=>Fw,useFloatingTree:()=>yi,useFocus:()=>Lq,useHover:()=>mq,useId:()=>bo,useInnerOffset:()=>$q,useInteractions:()=>Nq,useListItem:()=>_w,useListNavigation:()=>zq,useMergeRefs:()=>uc,useRole:()=>Uq,useTransitionStatus:()=>Lw,useTransitionStyles:()=>Hq,useTypeahead:()=>Vq});function uc(e){return O.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=O.useRef(()=>{});return nq(()=>{t.current=e}),O.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 tc(e,t,r){return Math.floor(e/t)!==r}function po(e,t){return t<0||t>=e.current.length}function oc(e,t){return nt(e,{disabledIndices:t})}function Ph(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&&vi(a,u,i));return u}function pw(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:u,minIndex:c,maxIndex:s,prevIndex:l,stopEvent:d=!1}=t,f=l;if(r.key===mo){if(d&&Je(r),l===-1)f=s;else if(f=nt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:u}),i&&(l-a<c||f<0)){let p=l%a,h=s%a,m=s-(h-p);h===p?f=s:f=h>p?m:m-a}po(e,f)&&(f=l)}if(r.key===Xr&&(d&&Je(r),l===-1?f=c:(f=nt(e,{startingIndex:l,amount:a,disabledIndices:u}),i&&l+a>s&&(f=nt(e,{startingIndex:l%a-a,amount:a,disabledIndices:u}))),po(e,f)&&(f=l)),n==="both"){let p=_n(l/a);r.key===(o?dr:pr)&&(d&&Je(r),l%a!==a-1?(f=nt(e,{startingIndex:l,disabledIndices:u}),i&&tc(f,a,p)&&(f=nt(e,{startingIndex:l-l%a-1,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:l-l%a-1,disabledIndices:u})),tc(f,a,p)&&(f=l)),r.key===(o?pr:dr)&&(d&&Je(r),l%a!==0?(f=nt(e,{startingIndex:l,decrement:!0,disabledIndices:u}),i&&tc(f,a,p)&&(f=nt(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:u})),tc(f,a,p)&&(f=l));let h=_n(s/a)===p;po(e,f)&&(i&&h?f=r.key===(o?pr:dr)?s:nt(e,{startingIndex:l-l%a-1,disabledIndices:u}):f=l)}return f}function hw(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:u,height:c}=o;u>t;let s=!1;for(r&&(i=0);!s;){let l=[];for(let d=0;d<u;d++)for(let f=0;f<c;f++)l.push(i+d+f*t);i%t+u<=t&&l.every(d=>n[d]==null)?(l.forEach(d=>{n[d]=a}),s=!0):i++}}),[...n]}function mw(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 vw(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function vi(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 iq(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 oq(e,t){if(e.size!==t.size)return!1;for(let[r,n]of e.entries())if(n!==t.get(r))return!1;return!0}function gw(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=O.useState(()=>new Map),a=O.useCallback(c=>{o(s=>new Map(s).set(c,null))},[]),u=O.useCallback(c=>{o(s=>{let l=new Map(s);return l.delete(c),l})},[]);return pe(()=>{let c=new Map(i);Array.from(c.keys()).sort(iq).forEach((l,d)=>{c.set(l,d)}),oq(i,c)||o(c)},[i]),(0,Oe.jsx)(bw.Provider,{value:O.useMemo(()=>({register:a,unregister:u,map:i,elementsRef:r,labelsRef:n}),[a,u,i,r,n]),children:t})}function _w(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=O.useContext(bw),[u,c]=O.useState(null),s=O.useRef(null),l=O.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&&c(d)},[i]),O.useMemo(()=>({ref:l,index:u??-1}),[u,l])}function yw(e,t){return typeof e=="function"?e(t):e?O.cloneElement(e,t):(0,Oe.jsx)("div",{...t})}function cq(){let[e,t]=O.useState(()=>W0?H0():void 0);return pe(()=>{e==null&&t(H0())},[]),O.useEffect(()=>{W0=!0},[]),e}function Ow(){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 dq(e){let t=bo(),r=yi(),n=_i(),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 pq(e){let{children:t,id:r}=e,n=_i();return(0,Oe.jsx)(Ew.Provider,{value:O.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function hq(e){let{children:t}=e,r=O.useRef([]),n=O.useCallback(a=>{r.current=[...r.current,a]},[]),i=O.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),o=O.useState(()=>Ow())[0];return(0,Oe.jsx)(Aw.Provider,{value:O.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function gi(e){return"data-floating-ui-"+e}function it(e){let t=(0,vo.useRef)(e);return pe(()=>{t.current=e}),t}function ac(e,t,r){return r&&!li(r)?0:typeof e=="number"?e:e?.[t]}function mq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:u=!0,delay:c=0,handleClose:s=null,mouseOnly:l=!1,restMs:d=0,move:f=!0}=t,p=yi(),h=_i(),m=it(s),g=it(c),_=it(r),y=O.useRef(),w=O.useRef(-1),E=O.useRef(),S=O.useRef(-1),A=O.useRef(!0),T=O.useRef(!1),M=O.useRef(()=>{}),C=O.useRef(!1),R=O.useCallback(()=>{var q;let L=(q=i.current.openEvent)==null?void 0:q.type;return L?.includes("mouse")&&L!=="mousedown"},[i]);O.useEffect(()=>{if(!u)return;function q(L){let{open:j}=L;j||(clearTimeout(w.current),clearTimeout(S.current),A.current=!0,C.current=!1)}return o.on("openchange",q),()=>{o.off("openchange",q)}},[u,o]),O.useEffect(()=>{if(!u||!m.current||!r)return;function q(j){R()&&n(!1,j,"hover")}let L=Ze(a.floating).documentElement;return L.addEventListener("mouseleave",q),()=>{L.removeEventListener("mouseleave",q)}},[a.floating,r,n,u,m,R]);let k=O.useCallback(function(q,L,j){L===void 0&&(L=!0),j===void 0&&(j="hover");let z=ac(g.current,"close",y.current);z&&!E.current?(clearTimeout(w.current),w.current=window.setTimeout(()=>n(!1,q,j),z)):L&&(clearTimeout(w.current),n(!1,q,j))},[g,n]),D=Ie(()=>{M.current(),E.current=void 0}),P=Ie(()=>{if(T.current){let q=Ze(a.floating).body;q.style.pointerEvents="",q.removeAttribute(V0),T.current=!1}}),I=Ie(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);O.useEffect(()=>{if(!u)return;function q(H){if(clearTimeout(w.current),A.current=!1,l&&!li(y.current)||d>0&&!ac(g.current,"open"))return;let re=ac(g.current,"open",y.current);re?w.current=window.setTimeout(()=>{_.current||n(!0,H,"hover")},re):r||n(!0,H,"hover")}function L(H){if(I())return;M.current();let re=Ze(a.floating);if(clearTimeout(S.current),C.current=!1,m.current&&i.current.floatingContext){r||clearTimeout(w.current),E.current=m.current({...i.current.floatingContext,tree:p,x:H.clientX,y:H.clientY,onClose(){P(),D(),I()||k(H,!0,"safe-polygon")}});let Se=E.current;re.addEventListener("mousemove",Se),M.current=()=>{re.removeEventListener("mousemove",Se)};return}(y.current==="touch"?!Ne(a.floating,H.relatedTarget):!0)&&k(H)}function j(H){I()||i.current.floatingContext&&(m.current==null||m.current({...i.current.floatingContext,tree:p,x:H.clientX,y:H.clientY,onClose(){P(),D(),I()||k(H)}})(H))}if(_e(a.domReference)){var z;let H=a.domReference;return r&&H.addEventListener("mouseleave",j),(z=a.floating)==null||z.addEventListener("mouseleave",j),f&&H.addEventListener("mousemove",q,{once:!0}),H.addEventListener("mouseenter",q),H.addEventListener("mouseleave",L),()=>{var re;r&&H.removeEventListener("mouseleave",j),(re=a.floating)==null||re.removeEventListener("mouseleave",j),f&&H.removeEventListener("mousemove",q),H.removeEventListener("mouseenter",q),H.removeEventListener("mouseleave",L)}}},[a,u,e,l,d,f,k,D,P,n,r,_,p,g,m,i,I]),pe(()=>{var q;if(u&&r&&(q=m.current)!=null&&q.__options.blockPointerEvents&&R()){T.current=!0;let j=a.floating;if(_e(a.domReference)&&j){var L;let z=Ze(a.floating).body;z.setAttribute(V0,"");let H=a.domReference,re=p==null||(L=p.nodesRef.current.find(ne=>ne.id===h))==null||(L=L.context)==null?void 0:L.elements.floating;return re&&(re.style.pointerEvents=""),z.style.pointerEvents="none",H.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{z.style.pointerEvents="",H.style.pointerEvents="",j.style.pointerEvents=""}}}},[u,r,h,a,p,m,R]),pe(()=>{r||(y.current=void 0,C.current=!1,D(),P())},[r,D,P]),O.useEffect(()=>()=>{D(),clearTimeout(w.current),clearTimeout(S.current),P()},[u,a.domReference,D,P]);let B=O.useMemo(()=>{function q(L){y.current=L.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(L){let{nativeEvent:j}=L;function z(){!A.current&&!_.current&&n(!0,j,"hover")}l&&!li(y.current)||r||d===0||C.current&&L.movementX**2+L.movementY**2<2||(clearTimeout(S.current),y.current==="touch"?z():(C.current=!0,S.current=window.setTimeout(z,d)))}}},[l,n,r,_,d]),F=O.useMemo(()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(q){I()||k(q.nativeEvent,!1)}}),[k,I]);return O.useMemo(()=>u?{reference:B,floating:F}:{},[u,B,F])}function vq(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=O.useReducer((c,s)=>({...c,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=O.useRef(null),u=O.useCallback(c=>{o({currentId:c})},[]);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,Oe.jsx)(Tw.Provider,{value:O.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function bq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,c=Pw(),{currentId:s,setCurrentId:l,initialDelay:d,setState:f,timeoutMs:p}=c;return pe(()=>{a&&s&&(f({delay:{open:1,close:ac(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&&(l===Rh||!r||l(u))},[a,r,l,u]),c}function hi(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(G0);let o=()=>e?.focus({preventScroll:r});i?o():G0=requestAnimationFrame(o)}function $0(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 bi(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 gq(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),bi(e,o).forEach(c=>{i(c.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function wq(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=yq(t,e),u=new Set,c=new Set(a),s=[];nc[i]||(nc[i]=new WeakMap);let l=nc[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||c.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",_=lo.get(h)||0,y=o?_+1:_,w=(l.get(h)||0)+1;lo.set(h,y),l.set(h,w),s.push(h),y===1&&g&&rc.add(h),w===1&&h.setAttribute(i,""),!g&&o&&h.setAttribute(o,"true")}})}return Oh++,()=>{s.forEach(p=>{let h=lo.get(p)||0,m=o?h-1:h,g=(l.get(p)||0)-1;lo.set(p,m),l.set(p,g),m||(!rc.has(p)&&o&&p.removeAttribute(o),rc.delete(p)),g||p.removeAttribute(i)}),Oh--,Oh||(lo=new WeakMap,lo=new WeakMap,rc=new WeakSet,nc={})}}function K0(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=Ze(e[0]).body;return wq(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}function Mw(e,t){let r=Ga(e,cc());t==="prev"&&r.reverse();let n=r.indexOf(Vt(Ze(e)));return r.slice(n+1)[0]}function kw(){return Mw(document.body,"next")}function Cw(){return Mw(document.body,"prev")}function Ka(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ne(r,n)}function xq(e){Ga(e,cc()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function Y0(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 Z0(e){e.key==="Tab"&&(e.target,clearTimeout(Sq))}function Iw(e){e===void 0&&(e={});let{id:t,root:r}=e,n=bo(),i=jw(),[o,a]=O.useState(null),u=O.useRef(null);return pe(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),pe(()=>{if(!n||u.current)return;let c=t?document.getElementById(t):null;if(!c)return;let s=document.createElement("div");s.id=n,s.setAttribute(J0,""),c.appendChild(s),u.current=s,a(s)},[t,n]),pe(()=>{if(r===null||!n||u.current)return;let c=r||i?.portalNode;c&&!_e(c)&&(c=c.current),c=c||document.body;let s=null;t&&(s=document.createElement("div"),s.id=t,c.appendChild(s));let l=document.createElement("div");l.id=n,l.setAttribute(J0,""),c=s||c,c.appendChild(l),u.current=l,a(l)},[t,r,n,i]),o}function Oq(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=Iw({id:r,root:n}),[a,u]=O.useState(null),c=O.useRef(null),s=O.useRef(null),l=O.useRef(null),d=O.useRef(null),f=a?.modal,p=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return O.useEffect(()=>{if(!o||!i||f)return;function m(g){o&&Ka(g)&&(g.type==="focusin"?Y0:xq)(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]),O.useEffect(()=>{o&&(p||Y0(o))},[p,o]),(0,Oe.jsxs)(qw.Provider,{value:O.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:s,beforeInsideRef:l,afterInsideRef:d,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,Oe.jsx)(sc,{"data-type":"outside",ref:c,onFocus:m=>{if(Ka(m,o)){var g;(g=l.current)==null||g.focus()}else{let _=Cw()||a?.domReference;_?.focus()}}}),h&&o&&(0,Oe.jsx)("span",{"aria-owns":o.id,style:lc}),o&&ho.createPortal(t,o),h&&o&&(0,Oe.jsx)(sc,{"data-type":"outside",ref:s,onFocus:m=>{if(Ka(m,o)){var g;(g=d.current)==null||g.focus()}else{let _=kw()||a?.domReference;_?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}function kh(e){return e?e.hasAttribute(Mh)?e:e.querySelector("["+Mh+"]")||e:null}function Eh(e){mi=mi.filter(t=>t.isConnected),e&&kr(e)!=="body"&&(mi.push(e),mi.length>X0&&(mi=mi.slice(-X0)))}function Q0(){return mi.slice().reverse().find(e=>e.isConnected)}function Eq(e){let t=cc();return Jy(e,t)?e:Ga(e,t)[0]||e}function Tq(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:u=!0,restoreFocus:c=!1,modal:s=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1}=e,{open:p,onOpenChange:h,events:m,dataRef:g,elements:{domReference:_,floating:y}}=t,w=Ie(()=>{var $;return($=g.current.floatingContext)==null?void 0:$.nodeId}),E=typeof a=="number"&&a<0,S=lh(_)&&E,A=_q(),T=A?o:!0,M=!T||A&&f,C=it(i),R=it(a),k=it(u),D=yi(),P=jw(),I=O.useRef(null),B=O.useRef(null),F=O.useRef(!1),q=O.useRef(!1),L=O.useRef(-1),j=P!=null,z=kh(y),H=Ie(function($){return $===void 0&&($=z),$?Ga($,cc()):[]}),re=Ie($=>{let te=H($);return C.current.map(X=>_&&X==="reference"?_:z&&X==="floating"?z:te).filter(Boolean).flat()});O.useEffect(()=>{if(n||!s)return;function $(X){if(X.key==="Tab"){Ne(z,Vt(Ze(z)))&&H().length===0&&!S&&Je(X);let Q=re(),ge=lr(X);C.current[0]==="reference"&&ge===_&&(Je(X),X.shiftKey?hi(Q[Q.length-1]):hi(Q[1])),C.current[1]==="floating"&&ge===z&&X.shiftKey&&(Je(X),hi(Q[0]))}}let te=Ze(z);return te.addEventListener("keydown",$),()=>{te.removeEventListener("keydown",$)}},[n,_,z,s,C,S,H,re]),O.useEffect(()=>{if(n||!y)return;function $(te){let X=lr(te),ge=H().indexOf(X);ge!==-1&&(L.current=ge)}return y.addEventListener("focusin",$),()=>{y.removeEventListener("focusin",$)}},[n,y,H]),O.useEffect(()=>{if(n||!d)return;function $(){q.current=!0,setTimeout(()=>{q.current=!1})}function te(X){let Q=X.relatedTarget;queueMicrotask(()=>{let ge=w(),we=!(Ne(_,Q)||Ne(y,Q)||Ne(Q,y)||Ne(P?.portalNode,Q)||Q!=null&&Q.hasAttribute(gi("focus-guard"))||D&&(bi(D.nodesRef.current,ge).find(be=>{var Ue,Pe;return Ne((Ue=be.context)==null?void 0:Ue.elements.floating,Q)||Ne((Pe=be.context)==null?void 0:Pe.elements.domReference,Q)})||$0(D.nodesRef.current,ge).find(be=>{var Ue,Pe,ft;return[(Ue=be.context)==null?void 0:Ue.elements.floating,kh((Pe=be.context)==null?void 0:Pe.elements.floating)].includes(Q)||((ft=be.context)==null?void 0:ft.elements.domReference)===Q})));if(c&&we&&Vt(Ze(z))===Ze(z).body){qe(z)&&z.focus();let be=L.current,Ue=H(),Pe=Ue[be]||Ue[Ue.length-1]||z;qe(Pe)&&Pe.focus()}(S||!s)&&Q&&we&&!q.current&&Q!==Q0()&&(F.current=!0,h(!1,X,"focus-out"))})}if(y&&qe(_))return _.addEventListener("focusout",te),_.addEventListener("pointerdown",$),y.addEventListener("focusout",te),()=>{_.removeEventListener("focusout",te),_.removeEventListener("pointerdown",$),y.removeEventListener("focusout",te)}},[n,_,y,z,s,D,P,h,d,c,H,S,w]);let ne=O.useRef(null),Se=O.useRef(null),le=uc([ne,P?.beforeInsideRef]),Te=uc([Se,P?.afterInsideRef]);O.useEffect(()=>{var $;if(n||!y)return;let te=Array.from((P==null||($=P.portalNode)==null?void 0:$.querySelectorAll("["+gi("portal")+"]"))||[]),X=D&&!s?$0(D?.nodesRef.current,w()).map(we=>{var be;return(be=we.context)==null?void 0:be.elements.floating}):[],Q=[y,...te,...X,I.current,B.current,ne.current,Se.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,C.current.includes("reference")||S?_:null].filter(we=>we!=null),ge=s||S?K0(Q,!M,M):K0(Q);return()=>{ge()}},[n,_,y,s,C,P,S,T,M,D,w]),pe(()=>{if(n||!qe(z))return;let $=Ze(z),te=Vt($);queueMicrotask(()=>{let X=re(z),Q=R.current,ge=(typeof Q=="number"?X[Q]:Q.current)||z,we=Ne(z,te);!E&&!we&&p&&hi(ge,{preventScroll:ge===z})})},[n,p,z,E,re,R]),pe(()=>{if(n||!z)return;let $=!1,te=Ze(z),X=Vt(te),ge=g.current.openEvent;Eh(X);function we(Pe){let{open:ft,reason:ee,event:fe,nested:Z}=Pe;ft&&(ge=fe),ee==="escape-key"&&_&&Eh(_),["hover","safe-polygon"].includes(ee)&&fe.type==="mouseleave"&&(F.current=!0),ee==="outside-press"&&(Z?(F.current=!1,$=!0):F.current=!(sh(fe)||Ns(fe)))}m.on("openchange",we);let be=te.createElement("span");be.setAttribute("tabindex","-1"),be.setAttribute("aria-hidden","true"),Object.assign(be.style,lc),j&&_&&_.insertAdjacentElement("afterend",be);function Ue(){return typeof k.current=="boolean"?Q0()||be:k.current.current||be}return()=>{m.off("openchange",we);let Pe=Vt(te),ft=Ne(y,Pe)||D&&bi(D.nodesRef.current,w()).some(Z=>{var oe;return Ne((oe=Z.context)==null?void 0:oe.elements.floating,Pe)});(ft||ge&&["click","mousedown"].includes(ge.type))&&_&&Eh(_);let fe=Ue();queueMicrotask(()=>{let Z=Eq(fe);k.current&&!F.current&&qe(Z)&&(!(Z!==Pe&&Pe!==te.body)||ft)&&Z.focus({preventScroll:$}),be.remove()})}},[n,y,z,k,g,m,D,j,_,w]),O.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[n]),pe(()=>{if(!n&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:d,open:p,onOpenChange:h,domReference:_}),()=>{P.setFocusManagerState(null)}},[n,P,s,p,h,d,_]),pe(()=>{if(n||!z||typeof MutationObserver!="function"||E)return;let $=()=>{let X=z.getAttribute("tabindex"),Q=H(),ge=Vt(Ze(y)),we=Q.indexOf(ge);we!==-1&&(L.current=we),C.current.includes("floating")||ge!==_&&Q.length===0?X!=="0"&&z.setAttribute("tabindex","0"):X!=="-1"&&z.setAttribute("tabindex","-1")};$();let te=new MutationObserver($);return te.observe(z,{childList:!0,subtree:!0,attributes:!0}),()=>{te.disconnect()}},[n,y,z,_,C,H,E]);function Ee($){return n||!l||!s?null:(0,Oe.jsx)(Aq,{ref:$==="start"?I:B,onClick:te=>h(!1,te.nativeEvent),children:typeof l=="string"?l:"Dismiss"})}let ae=!n&&T&&(s?!S:!0)&&(j||s);return(0,Oe.jsxs)(Oe.Fragment,{children:[ae&&(0,Oe.jsx)(sc,{"data-type":"inside",ref:le,onFocus:$=>{if(s){let X=re();hi(i[0]==="reference"?X[0]:X[X.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(F.current=!1,Ka($,P.portalNode)){let X=kw()||_;X?.focus()}else{var te;(te=P.beforeOutsideRef.current)==null||te.focus()}}}),!S&&Ee("start"),r,Ee("end"),ae&&(0,Oe.jsx)(sc,{"data-type":"inside",ref:Te,onFocus:$=>{if(s)hi(re()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(d&&(F.current=!0),Ka($,P.portalNode)){let X=Cw()||_;X?.focus()}else{var te;(te=P.afterOutsideRef.current)==null||te.focus()}}})]})}function Pq(){let e=/iP(hone|ad|od)|iOS/.test(Fs()),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,c;let s=((u=window.visualViewport)==null?void 0:u.offsetLeft)||0,l=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(l))+"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 tw(e){return qe(e.target)&&e.target.tagName==="BUTTON"}function rw(e){return zs(e)}function Mq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:u="click",toggle:c=!0,ignoreMouse:s=!1,keyboardHandlers:l=!0,stickIfOpen:d=!0}=t,f=O.useRef(),p=O.useRef(!1),h=O.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){let g=f.current;m.button===0&&u!=="click"&&(li(g,!0)&&s||(r&&c&&(!(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}li(g,!0)&&s||(r&&c&&(!(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||!l||tw(m))&&(m.key===" "&&!rw(o)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&n(!(r&&c),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!l||tw(m)||rw(o)||m.key===" "&&p.current&&(p.current=!1,n(!(r&&c),m.nativeEvent,"click"))}}),[i,o,u,s,l,n,r,d,c]);return O.useMemo(()=>a?{reference:h}:{},[a,h])}function kq(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",c=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((o=t.dataRef.current.openEvent)==null?void 0:o.type)||"")&&t.pointerType!=="touch",l=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&&c&&(n=a.y-t.y),f-=r||0,p-=n||0,l=0,d=0,!i||s?(l=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=u&&t.x!=null?t.x:f,p=c&&t.y!=null?t.y:p):i&&!s&&(d=t.axis==="x"?a.height:d,l=t.axis==="y"?a.width:l),i=!0,{width:l,height:d,x:f,y:p,top:p,right:f+l,bottom:p+d,left:f}}}}function nw(e){return e!=null&&e.clientX!=null}function Cq(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:u=!0,axis:c="both",x:s=null,y:l=null}=t,d=O.useRef(!1),f=O.useRef(null),[p,h]=O.useState(),[m,g]=O.useState([]),_=Ie((A,T)=>{d.current||n.current.openEvent&&!nw(n.current.openEvent)||a.setPositionReference(kq(o,{x:A,y:T,axis:c,dataRef:n,pointerType:p}))}),y=Ie(A=>{s!=null||l!=null||(r?f.current||g([]):_(A.clientX,A.clientY))}),w=li(p)?i:r,E=O.useCallback(()=>{if(!w||!u||s!=null||l!=null)return;let A=rt(i);function T(M){let C=lr(M);Ne(i,C)?(A.removeEventListener("mousemove",T),f.current=null):_(M.clientX,M.clientY)}if(!n.current.openEvent||nw(n.current.openEvent)){A.addEventListener("mousemove",T);let M=()=>{A.removeEventListener("mousemove",T),f.current=null};return f.current=M,M}a.setPositionReference(o)},[w,u,s,l,i,n,a,o,_]);O.useEffect(()=>E(),[E,m]),O.useEffect(()=>{u&&!i&&(d.current=!1)},[u,i]),O.useEffect(()=>{!u&&r&&(d.current=!0)},[u,r]),pe(()=>{u&&(s!=null||l!=null)&&(d.current=!1,_(s,l))},[u,s,l,_]);let S=O.useMemo(()=>{function A(T){let{pointerType:M}=T;h(M)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:y,onMouseEnter:y}},[y]);return O.useMemo(()=>u?{reference:S}:{},[u,S])}function jq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:u=!0,outsidePress:c=!0,outsidePressEvent:s="pointerdown",referencePress:l=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,m=yi(),g=Ie(typeof c=="function"?c:()=>!1),_=typeof c=="function"?g:c,y=O.useRef(!1),w=O.useRef(!1),{escapeKey:E,outsidePress:S}=iw(p),{escapeKey:A,outsidePress:T}=iw(h),M=O.useRef(!1),C=Ie(B=>{var F;if(!r||!a||!u||B.key!=="Escape"||M.current)return;let q=(F=o.current.floatingContext)==null?void 0:F.nodeId,L=m?bi(m.nodesRef.current,q):[];if(!E&&(B.stopPropagation(),L.length>0)){let j=!0;if(L.forEach(z=>{var H;if((H=z.context)!=null&&H.open&&!z.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}n(!1,zy(B)?B.nativeEvent:B,"escape-key")}),R=Ie(B=>{var F;let q=()=>{var L;C(B),(L=lr(B))==null||L.removeEventListener("keydown",q)};(F=lr(B))==null||F.addEventListener("keydown",q)}),k=Ie(B=>{var F;let q=y.current;y.current=!1;let L=w.current;if(w.current=!1,s==="click"&&L||q||typeof _=="function"&&!_(B))return;let j=lr(B),z="["+gi("inert")+"]",H=Ze(i.floating).querySelectorAll(z),re=_e(j)?j:null;for(;re&&!cr(re);){let Te=ur(re);if(cr(Te)||!_e(Te))break;re=Te}if(H.length&&_e(j)&&!By(j)&&!Ne(j,i.floating)&&Array.from(H).every(Te=>!Ne(re,Te)))return;if(qe(j)&&I){let Te=cr(j),Ee=bt(j),ae=/auto|scroll/,$=Te||ae.test(Ee.overflowX),te=Te||ae.test(Ee.overflowY),X=$&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,Q=te&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,ge=Ee.direction==="rtl",we=Q&&(ge?B.offsetX<=j.offsetWidth-j.clientWidth:B.offsetX>j.clientWidth),be=X&&B.offsetY>j.clientHeight;if(we||be)return}let ne=(F=o.current.floatingContext)==null?void 0:F.nodeId,Se=m&&bi(m.nodesRef.current,ne).some(Te=>{var Ee;return Ds(B,(Ee=Te.context)==null?void 0:Ee.elements.floating)});if(Ds(B,i.floating)||Ds(B,i.domReference)||Se)return;let le=m?bi(m.nodesRef.current,ne):[];if(le.length>0){let Te=!0;if(le.forEach(Ee=>{var ae;if((ae=Ee.context)!=null&&ae.open&&!Ee.context.dataRef.current.__outsidePressBubbles){Te=!1;return}}),!Te)return}n(!1,B,"outside-press")}),D=Ie(B=>{var F;let q=()=>{var L;k(B),(L=lr(B))==null||L.removeEventListener(s,q)};(F=lr(B))==null||F.addEventListener(s,q)});O.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=E,o.current.__outsidePressBubbles=S;let B=-1;function F(H){n(!1,H,"ancestor-scroll")}function q(){window.clearTimeout(B),M.current=!0}function L(){B=window.setTimeout(()=>{M.current=!1},uo()?5:0)}let j=Ze(i.floating);u&&(j.addEventListener("keydown",A?R:C,A),j.addEventListener("compositionstart",q),j.addEventListener("compositionend",L)),_&&j.addEventListener(s,T?D:k,T);let z=[];return f&&(_e(i.domReference)&&(z=Tt(i.domReference)),_e(i.floating)&&(z=z.concat(Tt(i.floating))),!_e(i.reference)&&i.reference&&i.reference.contextElement&&(z=z.concat(Tt(i.reference.contextElement)))),z=z.filter(H=>{var re;return H!==((re=j.defaultView)==null?void 0:re.visualViewport)}),z.forEach(H=>{H.addEventListener("scroll",F,{passive:!0})}),()=>{u&&(j.removeEventListener("keydown",A?R:C,A),j.removeEventListener("compositionstart",q),j.removeEventListener("compositionend",L)),_&&j.removeEventListener(s,T?D:k,T),z.forEach(H=>{H.removeEventListener("scroll",F)}),window.clearTimeout(B)}},[o,i,u,_,s,r,n,f,a,E,S,C,A,R,k,T,D]),O.useEffect(()=>{y.current=!1},[_,s]);let P=O.useMemo(()=>({onKeyDown:C,...l&&{[qq[d]]:B=>{n(!1,B.nativeEvent,"reference-press")},...d!=="click"&&{onClick(B){n(!1,B.nativeEvent,"reference-press")}}}}),[C,n,l,d]),I=O.useMemo(()=>({onKeyDown:C,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Iq[s]]:()=>{y.current=!0}}),[C,s]);return O.useMemo(()=>a?{reference:P,floating:I}:{},[a,P,I])}function Fw(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=bo(),o=O.useRef({}),[a]=O.useState(()=>Ow()),u=_i()!=null,[c,s]=O.useState(n.reference),l=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=O.useMemo(()=>({setPositionReference:s}),[]),f=O.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return O.useMemo(()=>({dataRef:o,open:t,onOpenChange:l,elements:f,events:a,floatingId:i,refs:d}),[t,l,f,a,i,d])}function Fq(e){e===void 0&&(e={});let{nodeId:t}=e,r=Fw({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=O.useState(null),[u,c]=O.useState(null),l=i?.domReference||o,d=O.useRef(null),f=yi();pe(()=>{l&&(d.current=l)},[l]);let p=I0({...e,elements:{...i,...u&&{reference:u}}}),h=O.useCallback(w=>{let E=_e(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;c(E),p.refs.setReference(E)},[p.refs]),m=O.useCallback(w=>{(_e(w)||w===null)&&(d.current=w,a(w)),(_e(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!_e(w))&&p.refs.setReference(w)},[p.refs]),g=O.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),_=O.useMemo(()=>({...p.elements,domReference:l}),[p.elements,l]),y=O.useMemo(()=>({...p,...n,refs:g,elements:_,nodeId:t}),[p,g,_,t,n]);return pe(()=>{n.dataRef.current.floatingContext=y;let w=f?.nodesRef.current.find(E=>E.id===t);w&&(w.context=y)}),O.useMemo(()=>({...p,context:y,refs:g,elements:_}),[p,g,_,y])}function Lq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:u=!0,visibleOnly:c=!0}=t,s=O.useRef(!1),l=O.useRef(),d=O.useRef(!0);O.useEffect(()=>{if(!u)return;let p=rt(a.domReference);function h(){!r&&qe(a.domReference)&&a.domReference===Vt(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]),O.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]),O.useEffect(()=>()=>{clearTimeout(l.current)},[]);let f=O.useMemo(()=>({onPointerDown(p){Ns(p.nativeEvent)||(d.current=!1)},onMouseLeave(){s.current=!1},onFocus(p){if(s.current)return;let h=lr(p.nativeEvent);if(c&&_e(h))try{if(ch()&&Dy())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!zs(h))return}n(!0,p.nativeEvent,"focus")},onBlur(p){s.current=!1;let h=p.relatedTarget,m=p.nativeEvent,g=_e(h)&&h.hasAttribute(gi("focus-guard"))&&h.getAttribute("data-type")==="outside";l.current=window.setTimeout(()=>{var _;let y=Vt(a.domReference?a.domReference.ownerDocument:document);!h&&y===a.domReference||Ne((_=o.current.floatingContext)==null?void 0:_.refs.floating.current,y)||Ne(a.domReference,y)||g||n(!1,m,"focus")})}}),[o,a.domReference,n,c]);return O.useMemo(()=>u?{reference:f}:{},[u,f])}function Ah(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[ow]:a,[aw]:u,...c}=e;o=c}return{...r==="floating"&&{tabIndex:-1,[Mh]:""},...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(c=>{let[s,l]=c;if(!(i&&[ow,aw].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof l=="function"){var d;(d=n.get(s))==null||d.push(l),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]=l}),a),{})}}function Nq(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=O.useCallback(u=>Ah(u,e,"reference"),t),o=O.useCallback(u=>Ah(u,e,"floating"),r),a=O.useCallback(u=>Ah(u,e,"item"),n);return O.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function fc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function uw(e,t){return fc(t,e===mo||e===Xr,e===dr||e===pr)}function Th(e,t,r){return fc(t,e===Xr,r?e===dr:e===pr)||e==="Enter"||e===" "||e===""}function Dq(e,t,r){return fc(t,r?e===dr:e===pr,e===Xr)}function sw(e,t,r){return fc(t,r?e===pr:e===dr,e===mo)}function zq(e,t){let{open:r,onOpenChange:n,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:s=null,allowEscape:l=!1,loop:d=!1,nested:f=!1,rtl:p=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:_=!0,disabledIndices:y=void 0,orientation:w="vertical",cols:E=1,scrollItemIntoView:S=!0,virtualItemRef:A,itemSizes:T,dense:M=!1}=t,C=kh(i.floating),R=it(C),k=_i(),D=yi(),P=Ie(()=>{u(F.current===-1?null:F.current)}),I=lh(i.domReference),B=O.useRef(m),F=O.useRef(s??-1),q=O.useRef(null),L=O.useRef(!0),j=O.useRef(P),z=O.useRef(!!i.floating),H=O.useRef(r),re=O.useRef(!1),ne=O.useRef(!1),Se=it(y),le=it(r),Te=it(S),Ee=it(s),[ae,$]=O.useState(),[te,X]=O.useState(),Q=Ie(()=>{function ee(oe){h?($(oe.id),D?.events.emit("virtualfocus",oe),A&&(A.current=oe)):hi(oe,{sync:re.current,preventScroll:!0})}let fe=o.current[F.current];fe&&ee(fe),(re.current?oe=>oe():requestAnimationFrame)(()=>{let oe=o.current[F.current]||fe;if(!oe)return;fe||ee(oe);let $e=Te.current;$e&&we&&(ne.current||!L.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof $e=="boolean"?{block:"nearest",inline:"nearest"}:$e))})});pe(()=>{c&&(r&&i.floating?B.current&&s!=null&&(ne.current=!0,F.current=s,P()):z.current&&(F.current=-1,j.current()))},[c,r,i.floating,s,P]),pe(()=>{if(c&&r&&i.floating)if(a==null){if(re.current=!1,Ee.current!=null)return;if(z.current&&(F.current=-1,Q()),(!H.current||!z.current)&&B.current&&(q.current!=null||B.current===!0&&q.current==null)){let ee=0,fe=()=>{o.current[0]==null?(ee<2&&(ee?requestAnimationFrame:queueMicrotask)(fe),ee++):(F.current=q.current==null||Th(q.current,w,p)||f?oc(o,Se.current):Ph(o,Se.current),q.current=null,P())};fe()}}else po(o,a)||(F.current=a,Q(),ne.current=!1)},[c,r,i.floating,a,Ee,f,o,w,p,P,Q,Se]),pe(()=>{var ee;if(!c||i.floating||!D||h||!z.current)return;let fe=D.nodesRef.current,Z=(ee=fe.find(We=>We.id===k))==null||(ee=ee.context)==null?void 0:ee.elements.floating,oe=Vt(Ze(i.floating)),$e=fe.some(We=>We.context&&Ne(We.context.elements.floating,oe));Z&&!$e&&L.current&&Z.focus({preventScroll:!0})},[c,i.floating,D,k,h]),pe(()=>{if(!c||!D||!h||k)return;function ee(fe){X(fe.id),A&&(A.current=fe)}return D.events.on("virtualfocus",ee),()=>{D.events.off("virtualfocus",ee)}},[c,D,h,k,A]),pe(()=>{j.current=P,H.current=r,z.current=!!i.floating}),pe(()=>{r||(q.current=null)},[r]);let ge=a!=null,we=O.useMemo(()=>{function ee(Z){if(!r)return;let oe=o.current.indexOf(Z);oe!==-1&&F.current!==oe&&(F.current=oe,P())}return{onFocus(Z){let{currentTarget:oe}=Z;re.current=!0,ee(oe)},onClick:Z=>{let{currentTarget:oe}=Z;return oe.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:oe}=Z;re.current=!0,ne.current=!1,ee(oe)},onPointerLeave(Z){let{pointerType:oe}=Z;if(!(!L.current||oe==="touch")&&(re.current=!0,F.current=-1,P(),!h)){var $e;($e=R.current)==null||$e.focus({preventScroll:!0})}}}}},[r,R,g,o,P,h]),be=Ie(ee=>{if(L.current=!1,re.current=!0,ee.which===229||!le.current&&ee.currentTarget===R.current)return;if(f&&sw(ee.key,w,p)){Je(ee),n(!1,ee.nativeEvent,"list-navigation"),qe(i.domReference)&&(h?D?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let fe=F.current,Z=oc(o,y),oe=Ph(o,y);if(I||(ee.key==="Home"&&(Je(ee),F.current=Z,P()),ee.key==="End"&&(Je(ee),F.current=oe,P())),E>1){let $e=T||Array.from({length:o.current.length},()=>({width:1,height:1})),We=hw($e,E,M),jt=We.findIndex(Ft=>Ft!=null&&!vi(o.current,Ft,y)),Qt=We.reduce((Ft,er,cn)=>er!=null&&!vi(o.current,er,y)?cn:Ft,-1),wr=We[pw({current:We.map(Ft=>Ft!=null?o.current[Ft]:null)},{event:ee,orientation:w,loop:d,rtl:p,cols:E,disabledIndices:vw([...y||o.current.map((Ft,er)=>vi(o.current,er)?er:void 0),void 0],We),minIndex:jt,maxIndex:Qt,prevIndex:mw(F.current>oe?Z:F.current,$e,We,E,ee.key===Xr?"bl":ee.key===(p?dr:pr)?"tr":"tl"),stopEvent:!0})];if(wr!=null&&(F.current=wr,P()),w==="both")return}if(uw(ee.key,w)){if(Je(ee),r&&!h&&Vt(ee.currentTarget.ownerDocument)===ee.currentTarget){F.current=Th(ee.key,w,p)?Z:oe,P();return}Th(ee.key,w,p)?d?F.current=fe>=oe?l&&fe!==o.current.length?-1:Z:nt(o,{startingIndex:fe,disabledIndices:y}):F.current=Math.min(oe,nt(o,{startingIndex:fe,disabledIndices:y})):d?F.current=fe<=Z?l&&fe!==-1?o.current.length:oe:nt(o,{startingIndex:fe,decrement:!0,disabledIndices:y}):F.current=Math.max(Z,nt(o,{startingIndex:fe,decrement:!0,disabledIndices:y})),po(o,F.current)&&(F.current=-1),P()}}),Ue=O.useMemo(()=>h&&r&&ge&&{"aria-activedescendant":te||ae},[h,r,ge,te,ae]),Pe=O.useMemo(()=>({"aria-orientation":w==="both"?void 0:w,...I?{}:Ue,onKeyDown:be,onPointerMove(){L.current=!0}}),[Ue,be,w,I]),ft=O.useMemo(()=>{function ee(Z){m==="auto"&&sh(Z.nativeEvent)&&(B.current=!0)}function fe(Z){B.current=m,m==="auto"&&Ns(Z.nativeEvent)&&(B.current=!0)}return{...Ue,onKeyDown(Z){L.current=!1;let oe=Z.key.startsWith("Arrow"),$e=["Home","End"].includes(Z.key),We=oe||$e,jt=Dq(Z.key,w,p),Qt=sw(Z.key,w,p),wr=uw(Z.key,w),Ft=(f?jt:wr)||Z.key==="Enter"||Z.key.trim()==="";if(h&&r){let ei=D?.nodesRef.current.find(St=>St.parentId==null),Lt=D&&ei?gq(D.nodesRef.current,ei.id):null;if(We&&Lt&&A){let St=new KeyboardEvent("keydown",{key:Z.key,bubbles:!0});if(jt||Qt){var er,cn;let ln=((er=Lt.context)==null?void 0:er.elements.domReference)===Z.currentTarget,Bi=Qt&&!ln?(cn=Lt.context)==null?void 0:cn.elements.domReference:jt?o.current.find(Ui=>Ui?.id===ae):null;Bi&&(Je(Z),Bi.dispatchEvent(St),X(void 0))}if((wr||$e)&&Lt.context&&Lt.context.open&&Lt.parentId&&Z.currentTarget!==Lt.context.elements.domReference){var fa;Je(Z),(fa=Lt.context.elements.domReference)==null||fa.dispatchEvent(St);return}}return be(Z)}if(!(!r&&!_&&oe)){if(Ft&&(q.current=f&&wr?null:Z.key),f){jt&&(Je(Z),r?(F.current=oc(o,Se.current),P()):n(!0,Z.nativeEvent,"list-navigation"));return}wr&&(s!=null&&(F.current=s),Je(Z),!r&&_?n(!0,Z.nativeEvent,"list-navigation"):be(Z),r&&P())}},onFocus(){r&&!h&&(F.current=-1,P())},onPointerDown:fe,onPointerEnter:fe,onMouseDown:ee,onClick:ee}},[ae,Ue,be,Se,m,o,f,P,n,r,_,w,p,s,D,h,A]);return O.useMemo(()=>c?{reference:ft,floating:Pe,item:we}:{},[c,ft,Pe,we])}function Uq(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,u=(r=Bq.get(a))!=null?r:a,c=bo(),l=_i()!=null,d=O.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:c},...u==="menu"&&l&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[u,i,l,n,c,a]),f=O.useMemo(()=>{let h={id:i,...u&&{role:u}};return u==="tooltip"||a==="label"?h:{...h,...u==="menu"&&{"aria-labelledby":c}}},[u,i,c,a]),p=O.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 O.useMemo(()=>o?{reference:d,floating:f,item:p}:{},[o,d,f,p])}function fo(e,t){return typeof e=="function"?e(t):e}function Wq(e,t){let[r,n]=O.useState(e);return e&&!r&&n(!0),O.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function Lw(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,c]=O.useState("unmounted"),s=Wq(r,a);return!s&&u==="close"&&c("unmounted"),pe(()=>{if(n){if(r){c("initial");let l=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(l)}}c("close")}},[r,n]),{isMounted:s,status:u}}function Hq(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,u=e.placement,c=u.split("-")[0],s=O.useMemo(()=>({side:c,placement:u}),[c,u]),l=typeof a=="number",d=(l?a:a.open)||0,f=(l?a:a.close)||0,[p,h]=O.useState(()=>({...fo(o,s),...fo(r,s)})),{isMounted:m,status:g}=Lw(e,{duration:a}),_=it(r),y=it(n),w=it(i),E=it(o);return pe(()=>{let S=fo(_.current,s),A=fo(w.current,s),T=fo(E.current,s),M=fo(y.current,s)||Object.keys(S).reduce((C,R)=>(C[R]="",C),{});if(g==="initial"&&h(C=>({transitionProperty:C.transitionProperty,...T,...S})),g==="open"&&h({transitionProperty:Object.keys(M).map(cw).join(","),transitionDuration:d+"ms",...T,...M}),g==="close"){let C=A||S;h({transitionProperty:Object.keys(C).map(cw).join(","),transitionDuration:f+"ms",...T,...C})}},[f,w,_,y,E,d,g,s]),{isMounted:m,styles:p}}function Vq(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:u,onTypingChange:c,enabled:s=!0,findMatch:l=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=O.useRef(),m=O.useRef(""),g=O.useRef((r=p??a)!=null?r:-1),_=O.useRef(null),y=Ie(u),w=Ie(c),E=it(l),S=it(f);pe(()=>{n&&(clearTimeout(h.current),_.current=null,m.current="")},[n]),pe(()=>{if(n&&m.current===""){var R;g.current=(R=p??a)!=null?R:-1}},[n,p,a]);let A=Ie(R=>{R?i.current.typing||(i.current.typing=R,w(R)):i.current.typing&&(i.current.typing=R,w(R))}),T=Ie(R=>{function k(F,q,L){let j=E.current?E.current(q,L):q.find(z=>z?.toLocaleLowerCase().indexOf(L.toLocaleLowerCase())===0);return j?F.indexOf(j):-1}let D=o.current;if(m.current.length>0&&m.current[0]!==" "&&(k(D,D,m.current)===-1?A(!1):R.key===" "&&Je(R)),D==null||S.current.includes(R.key)||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;n&&R.key!==" "&&(Je(R),A(!0)),D.every(F=>{var q,L;return F?((q=F[0])==null?void 0:q.toLocaleLowerCase())!==((L=F[1])==null?void 0:L.toLocaleLowerCase()):!0})&&m.current===R.key&&(m.current="",g.current=_.current),m.current+=R.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",g.current=_.current,A(!1)},d);let I=g.current,B=k(D,[...D.slice((I||0)+1),...D.slice(0,(I||0)+1)],m.current);B!==-1?(y(B),_.current=B):R.key!==" "&&(m.current="",A(!1))}),M=O.useMemo(()=>({onKeyDown:T}),[T]),C=O.useMemo(()=>({onKeyDown:T,onKeyUp(R){R.key===" "&&A(!1)}}),[T,A]);return O.useMemo(()=>s?{reference:M,floating:C}:{},[s,M,C])}function lw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function $q(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,c=Ie(u),s=O.useRef(!1),l=O.useRef(null),d=O.useRef(null);O.useEffect(()=>{if(!i)return;function p(m){if(m.ctrlKey||!h||o.current==null)return;let g=m.deltaY,_=o.current.top>=-.5,y=o.current.bottom>=-.5,w=h.scrollHeight-h.clientHeight,E=g<0?-1:1,S=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&g>0||!y&&g<0?(m.preventDefault(),ho.flushSync(()=>{c(A=>A+Math[S](g,w*E))})):/firefox/i.test(Ls())&&(h.scrollTop+=g))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{l.current=h.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{l.current=null,d.current=null,h.removeEventListener("wheel",p)}},[i,r,n.floating,o,a,c]);let f=O.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(l.current!==null){let h=p.scrollTop-l.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&ho.flushSync(()=>c(m=>m+h))}requestAnimationFrame(()=>{l.current=p.scrollTop})}}}),[n.floating,c,o,a]);return O.useMemo(()=>i?{floating:f}:{},[i,f])}function fw(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,u=o-1;a<o;u=a++){let[c,s]=t[a]||[0,0],[l,d]=t[u]||[0,0];s>=n!=d>=n&&r<=(l-c)*(n-s)/(d-s)+c&&(i=!i)}return i}function Kq(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Yq(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i,o=!1,a=null,u=null,c=performance.now();function s(d,f){let p=performance.now(),h=p-c;if(a===null||u===null||h===0)return a=d,u=f,c=p,null;let m=d-a,g=f-u,y=Math.sqrt(m*m+g*g)/h;return a=d,u=f,c=p,y}let l=d=>{let{x:f,y:p,placement:h,elements:m,onClose:g,nodeId:_,tree:y}=d;return function(E){function S(){clearTimeout(i),g()}if(clearTimeout(i),!m.domReference||!m.floating||h==null||f==null||p==null)return;let{clientX:A,clientY:T}=E,M=[A,T],C=lr(E),R=E.type==="mouseleave",k=Ne(m.floating,C),D=Ne(m.domReference,C),P=m.domReference.getBoundingClientRect(),I=m.floating.getBoundingClientRect(),B=h.split("-")[0],F=f>I.right-I.width/2,q=p>I.bottom-I.height/2,L=Kq(M,P),j=I.width>P.width,z=I.height>P.height,H=(j?P:I).left,re=(j?P:I).right,ne=(z?P:I).top,Se=(z?P:I).bottom;if(k&&(o=!0,!R))return;if(D&&(o=!1),D&&!R){o=!0;return}if(R&&_e(E.relatedTarget)&&Ne(m.floating,E.relatedTarget)||y&&bi(y.nodesRef.current,_).some(Ee=>{let{context:ae}=Ee;return ae?.open}))return;if(B==="top"&&p>=P.bottom-1||B==="bottom"&&p<=P.top+1||B==="left"&&f>=P.right-1||B==="right"&&f<=P.left+1)return S();let le=[];switch(B){case"top":le=[[H,P.top+1],[H,I.bottom-1],[re,I.bottom-1],[re,P.top+1]];break;case"bottom":le=[[H,I.top+1],[H,P.bottom-1],[re,P.bottom-1],[re,I.top+1]];break;case"left":le=[[I.right-1,Se],[I.right-1,ne],[P.left+1,ne],[P.left+1,Se]];break;case"right":le=[[P.right-1,Se],[P.right-1,ne],[I.left+1,ne],[I.left+1,Se]];break}function Te(Ee){let[ae,$]=Ee;switch(B){case"top":{let te=[j?ae+t/2:F?ae+t*4:ae-t*4,$+t+1],X=[j?ae-t/2:F?ae+t*4:ae-t*4,$+t+1],Q=[[I.left,F||j?I.bottom-t:I.top],[I.right,F?j?I.bottom-t:I.top:I.bottom-t]];return[te,X,...Q]}case"bottom":{let te=[j?ae+t/2:F?ae+t*4:ae-t*4,$-t],X=[j?ae-t/2:F?ae+t*4:ae-t*4,$-t],Q=[[I.left,F||j?I.top+t:I.bottom],[I.right,F?j?I.top+t:I.bottom:I.top+t]];return[te,X,...Q]}case"left":{let te=[ae+t+1,z?$+t/2:q?$+t*4:$-t*4],X=[ae+t+1,z?$-t/2:q?$+t*4:$-t*4];return[...[[q||z?I.right-t:I.left,I.top],[q?z?I.right-t:I.left:I.right-t,I.bottom]],te,X]}case"right":{let te=[ae-t,z?$+t/2:q?$+t*4:$-t*4],X=[ae-t,z?$-t/2:q?$+t*4:$-t*4],Q=[[q||z?I.left+t:I.right,I.top],[q?z?I.left+t:I.right:I.left+t,I.bottom]];return[te,X,...Q]}}}if(!fw([A,T],le)){if(o&&!L)return S();if(!R&&n){let Ee=s(E.clientX,E.clientY);if(Ee!==null&&Ee<.1)return S()}fw([A,T],Te([f,p]))?!o&&n&&(i=window.setTimeout(S,40)):S()}}};return l.__options={blockPointerEvents:r},l}var O,vo,Oe,ho,dw,rq,nq,mo,Xr,dr,pr,pe,bw,ww,xw,Sw,Sh,aq,uq,W0,sq,H0,lq,bo,fq,Ew,Aw,_i,yi,V0,Rh,Tw,Pw,G0,lo,rc,nc,Oh,_q,Rw,yq,cc,lc,Sq,sc,qw,J0,jw,Mh,X0,mi,Aq,ic,ew,Rq,qq,Iq,iw,ow,aw,Bq,cw,Gq,Dw=pt(()=>{O=V(Ye()),vo=V(Ye());Uy();Va();Oe=V(Da());Ua();Xy();ho=V(Ys());xh();xh();dw={...O},rq=dw.useInsertionEffect,nq=rq||(e=>e());mo="ArrowUp",Xr="ArrowDown",dr="ArrowLeft",pr="ArrowRight";pe=typeof document<"u"?vo.useLayoutEffect:vo.useEffect;bw=O.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});ww=O.createContext({activeIndex:0,onNavigate:()=>{}}),xw=[dr,pr],Sw=[mo,Xr],Sh=[...xw,...Sw],aq=O.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:u=1,disabledIndices:c,activeIndex:s,onNavigate:l,itemSizes:d,dense:f=!1,...p}=t,[h,m]=O.useState(0),g=s??h,_=Ie(l??m),y=O.useRef([]),w=n&&typeof n!="function"?n.props:{},E=O.useMemo(()=>({activeIndex:g,onNavigate:_}),[g,_]),S=u>1;function A(M){if(!Sh.includes(M.key))return;let C=g,R=oc(y,c),k=Ph(y,c),D=a?dr:pr,P=a?pr:dr;if(S){let L=d||Array.from({length:y.current.length},()=>({width:1,height:1})),j=hw(L,u,f),z=j.findIndex(ne=>ne!=null&&!vi(y.current,ne,c)),H=j.reduce((ne,Se,le)=>Se!=null&&!vi(y.current,Se,c)?le:ne,-1),re=j[pw({current:j.map(ne=>ne?y.current[ne]:null)},{event:M,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:vw([...c||y.current.map((ne,Se)=>vi(y.current,Se)?Se:void 0),void 0],j),minIndex:z,maxIndex:H,prevIndex:mw(g>k?R:g,L,j,u,M.key===Xr?"bl":M.key===D?"tr":"tl")})];re!=null&&(C=re)}let I={horizontal:[D],vertical:[Xr],both:[D,Xr]}[i],B={horizontal:[P],vertical:[mo],both:[P,mo]}[i],F=S?Sh:{horizontal:xw,vertical:Sw,both:Sh}[i];if(C===g&&[...I,...B].includes(M.key)&&(o&&C===k&&I.includes(M.key)?C=R:o&&C===R&&B.includes(M.key)?C=k:C=nt(y,{startingIndex:C,decrement:B.includes(M.key),disabledIndices:c})),C!==g&&!po(y,C)){var q;M.stopPropagation(),F.includes(M.key)&&M.preventDefault(),_(C),(q=y.current[C])==null||q.focus()}}let T={...p,...w,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(M){p.onKeyDown==null||p.onKeyDown(M),w.onKeyDown==null||w.onKeyDown(M),A(M)}};return(0,Oe.jsx)(ww.Provider,{value:E,children:(0,Oe.jsx)(gw,{elementsRef:y,children:yw(n,T)})})}),uq=O.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=O.useContext(ww),{ref:c,index:s}=_w(),l=uc([c,r,o.ref]),d=a===s,f={...i,...o,ref:l,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 yw(n,f)}),W0=!1,sq=0,H0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sq++;lq=dw.useId,bo=lq||cq,fq=O.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:u=14,height:c=7,tipRadius:s=0,strokeWidth:l=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...m}={},...g}=t,_=bo(),[y,w]=O.useState(!1);if(pe(()=>{if(!i)return;bt(i).direction==="rtl"&&w(!0)},[i]),!i)return null;let[E,S]=n.split("-"),A=E==="top"||E==="bottom",T=d;(A&&a!=null&&a.x||!A&&a!=null&&a.y)&&(T=null);let M=l*2,C=M/2,R=u/2*(s/-8+1),k=c/2*s/4,D=!!p,P=T&&S==="end"?"bottom":"top",I=T&&S==="end"?"right":"left";T&&y&&(I=S==="end"?"left":"right");let B=o?.x!=null?T||o.x:"",F=o?.y!=null?T||o.y:"",q=p||"M0,0"+(" H"+u)+(" L"+(u-R)+","+(c-k))+(" Q"+u/2+","+c+" "+R+","+(c-k))+" Z",L={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[E];return(0,Oe.jsxs)("svg",{...g,"aria-hidden":!0,ref:r,width:D?u:u+M,height:u,viewBox:"0 0 "+u+" "+(c>u?c:u),style:{position:"absolute",pointerEvents:"none",[I]:B,[P]:F,[E]:A||D?"100%":"calc(100% - "+M/2+"px)",transform:[L,h].filter(j=>!!j).join(" "),...m},children:[M>0&&(0,Oe.jsx)("path",{clipPath:"url(#"+_+")",fill:"none",stroke:f,strokeWidth:M+(p?0:1),d:q}),(0,Oe.jsx)("path",{stroke:M&&!p?g.fill:"none",d:q}),(0,Oe.jsx)("clipPath",{id:_,children:(0,Oe.jsx)("rect",{x:-C,y:C*(D?-1:1),width:u+M,height:u})})]})});Ew=O.createContext(null),Aw=O.createContext(null),_i=()=>{var e;return((e=O.useContext(Ew))==null?void 0:e.id)||null},yi=()=>O.useContext(Aw);V0=gi("safe-polygon");Rh=()=>{},Tw=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Rh,setState:Rh,isInstantPhase:!1}),Pw=()=>O.useContext(Tw);G0=0;lo=new WeakMap,rc=new WeakSet,nc={},Oh=0,_q=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Rw=e=>e&&(e.host||Rw(e.parentNode)),yq=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=Rw(r);return e.contains(n)?n:null}).filter(r=>r!=null);cc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});lc={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};sc=O.forwardRef(function(t,r){let[n,i]=O.useState();pe(()=>(ch()&&i("button"),document.addEventListener("keydown",Z0),()=>{document.removeEventListener("keydown",Z0)}),[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[gi("focus-guard")]:"",style:lc};return(0,Oe.jsx)("span",{...t,...o})}),qw=O.createContext(null),J0=gi("portal");jw=()=>O.useContext(qw),Mh="data-floating-ui-focusable";X0=20,mi=[];Aq=O.forwardRef(function(t,r){return(0,Oe.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:lc})});ic=0;ew=()=>{},Rq=O.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return pe(()=>{if(n)return ic++,ic===1&&(ew=Pq()),()=>{ic--,ic===0&&ew()}},[n]),(0,Oe.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});qq={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Iq={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},iw=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}};ow="active",aw="selected";Bq=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);cw=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());Gq=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:c=0,scrollRef:s,...l}=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,y=f===h;if(!p)return{};let w={...t,...await ec(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},E=await pi(lw(w,h.scrollHeight+m+f.clientTop),l),S=await pi(w,{...l,elementContext:"reference"}),A=De(0,E.top),T=w.y+A,R=(h.scrollHeight>h.clientHeight?k=>k:fi)(De(0,h.scrollHeight+(g&&y||_?m*2:0)-A-De(0,E.bottom)));if(h.style.maxHeight=R+"px",h.scrollTop=A,i){let k=h.offsetHeight<p.offsetHeight*gt(u,r.current.length)-1||S.top>=-c||S.bottom>=-c;ho.flushSync(()=>i(k))}return n&&(n.current=await pi(lw({...w,y:T},h.offsetHeight+m+f.clientTop),l)),{y:T}}})});var dc=b((DJ,zw)=>{zw.exports=JBrowseExports["@mui/material"]});var Ya=b((zJ,Bw)=>{Bw.exports=JBrowseExports["tss-react/mui"]});var Ww=b(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});qh.default=Qq;var Uw=Da(),pc=(Dw(),Bb(Nw)),Ch=dc(),Zq=Ya();function Jq(e){return Math.round(e*1e5)/1e5}var Xq=(0,Zq.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Ch.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:`${Jq(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function Qq({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Ch.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=Xq(),{refs:c,floatingStyles:s,context:l}=(0,pc.useFloating)({placement:r,strategy:"fixed",middleware:[(0,pc.offset)(5)]}),d=(0,pc.useClientPoint)(l,e),{getFloatingProps:f}=(0,pc.useInteractions)([d]);return(0,Uw.jsx)(Ch.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,Uw.jsx)("div",{className:u.tooltip,ref:c.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...f(),children:t})})}});var o1=b((UJ,i1)=>{"use strict";var{entries:Qw,setPrototypeOf:Hw,isFrozen:eI,getPrototypeOf:tI,getOwnPropertyDescriptor:rI}=Object,{freeze:yt,seal:$t,create:e1}=Object,{apply:Dh,construct:zh}=typeof Reflect<"u"&&Reflect;yt||(yt=function(t){return t});$t||($t=function(t){return t});Dh||(Dh=function(t,r,n){return t.apply(r,n)});zh||(zh=function(t,r){return new t(...r)});var hc=wt(Array.prototype.forEach),nI=wt(Array.prototype.lastIndexOf),Vw=wt(Array.prototype.pop),Za=wt(Array.prototype.push),iI=wt(Array.prototype.splice),vc=wt(String.prototype.toLowerCase),Ih=wt(String.prototype.toString),Gw=wt(String.prototype.match),Ja=wt(String.prototype.replace),oI=wt(String.prototype.indexOf),aI=wt(String.prototype.trim),hr=wt(Object.prototype.hasOwnProperty),_t=wt(RegExp.prototype.test),Xa=uI(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 Dh(e,t,n)}}function uI(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zh(e,r)}}function ue(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vc;Hw&&Hw(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let o=r(i);o!==i&&(eI(t)||(t[n]=o),i=o)}e[i]=!0}return e}function sI(e){for(let t=0;t<e.length;t++)hr(e,t)||(e[t]=null);return e}function wi(e){let t=e1(null);for(let[r,n]of Qw(e))hr(e,r)&&(Array.isArray(n)?t[r]=sI(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=wi(n):t[r]=n);return t}function Qa(e,t){for(;e!==null;){let n=rI(e,t);if(n){if(n.get)return wt(n.get);if(typeof n.value=="function")return wt(n.value)}e=tI(e)}function r(){return null}return r}var $w=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"]),jh=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"]),Fh=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"]),cI=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"]),Lh=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"]),lI=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Kw=yt(["#text"]),Yw=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"]),Nh=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"]),Zw=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"]),mc=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fI=$t(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dI=$t(/<%[\w\W]*|[\w\W]*%>/gm),pI=$t(/\$\{[\w\W]*/gm),hI=$t(/^data-[\-\w.\u00B7-\uFFFF]+$/),mI=$t(/^aria-[\-\w]+$/),t1=$t(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vI=$t(/^(?:\w+script|data):/i),bI=$t(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),r1=$t(/^html$/i),gI=$t(/^[a-z][.\w]*(-[.\w]+)+$/i),Jw=Object.freeze({__proto__:null,ARIA_ATTR:mI,ATTR_WHITESPACE:bI,CUSTOM_ELEMENT:gI,DATA_ATTR:hI,DOCTYPE_NAME:r1,ERB_EXPR:dI,IS_ALLOWED_URI:t1,IS_SCRIPT_OR_DATA:vI,MUSTACHE_EXPR:fI,TMPLIT_EXPR:pI}),eu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},_I=function(){return typeof window>"u"?null:window},yI=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}},Xw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function n1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_I(),t=J=>n1(J);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==eu.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,n=r,i=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:u,Element:c,NodeFilter:s,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,h=c.prototype,m=Qa(h,"cloneNode"),g=Qa(h,"remove"),_=Qa(h,"nextSibling"),y=Qa(h,"childNodes"),w=Qa(h,"parentNode");if(typeof a=="function"){let J=r.createElement("template");J.content&&J.content.ownerDocument&&(r=J.content.ownerDocument)}let E,S="",{implementation:A,createNodeIterator:T,createDocumentFragment:M,getElementsByTagName:C}=r,{importNode:R}=n,k=Xw();t.isSupported=typeof Qw=="function"&&typeof w=="function"&&A&&A.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:D,ERB_EXPR:P,TMPLIT_EXPR:I,DATA_ATTR:B,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:j}=Jw,{IS_ALLOWED_URI:z}=Jw,H=null,re=ue({},[...$w,...jh,...Fh,...Lh,...Kw]),ne=null,Se=ue({},[...Yw,...Nh,...Zw,...mc]),le=Object.seal(e1(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,Ee=null,ae=!0,$=!0,te=!1,X=!0,Q=!1,ge=!0,we=!1,be=!1,Ue=!1,Pe=!1,ft=!1,ee=!1,fe=!0,Z=!1,oe="user-content-",$e=!0,We=!1,jt={},Qt=null,wr=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"]),Ft=null,er=ue({},["audio","video","img","source","image","track"]),cn=null,fa=ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ei="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",St="http://www.w3.org/1999/xhtml",ln=St,Bi=!1,Ui=null,MR=ue({},[ei,Lt,St],Ih),Qu=ue({},["mi","mo","mn","ms","mtext"]),es=ue({},["annotation-xml"]),kR=ue({},["title","style","font","a","script"]),da=null,CR=["application/xhtml+xml","text/html"],qR="text/html",Ke=null,Wi=null,IR=r.createElement("form"),Pb=function(x){return x instanceof RegExp||x instanceof Function},Yd=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Wi&&Wi===x)){if((!x||typeof x!="object")&&(x={}),x=wi(x),da=CR.indexOf(x.PARSER_MEDIA_TYPE)===-1?qR:x.PARSER_MEDIA_TYPE,Ke=da==="application/xhtml+xml"?Ih:vc,H=hr(x,"ALLOWED_TAGS")?ue({},x.ALLOWED_TAGS,Ke):re,ne=hr(x,"ALLOWED_ATTR")?ue({},x.ALLOWED_ATTR,Ke):Se,Ui=hr(x,"ALLOWED_NAMESPACES")?ue({},x.ALLOWED_NAMESPACES,Ih):MR,cn=hr(x,"ADD_URI_SAFE_ATTR")?ue(wi(fa),x.ADD_URI_SAFE_ATTR,Ke):fa,Ft=hr(x,"ADD_DATA_URI_TAGS")?ue(wi(er),x.ADD_DATA_URI_TAGS,Ke):er,Qt=hr(x,"FORBID_CONTENTS")?ue({},x.FORBID_CONTENTS,Ke):wr,Te=hr(x,"FORBID_TAGS")?ue({},x.FORBID_TAGS,Ke):{},Ee=hr(x,"FORBID_ATTR")?ue({},x.FORBID_ATTR,Ke):{},jt=hr(x,"USE_PROFILES")?x.USE_PROFILES:!1,ae=x.ALLOW_ARIA_ATTR!==!1,$=x.ALLOW_DATA_ATTR!==!1,te=x.ALLOW_UNKNOWN_PROTOCOLS||!1,X=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=x.SAFE_FOR_TEMPLATES||!1,ge=x.SAFE_FOR_XML!==!1,we=x.WHOLE_DOCUMENT||!1,Pe=x.RETURN_DOM||!1,ft=x.RETURN_DOM_FRAGMENT||!1,ee=x.RETURN_TRUSTED_TYPE||!1,Ue=x.FORCE_BODY||!1,fe=x.SANITIZE_DOM!==!1,Z=x.SANITIZE_NAMED_PROPS||!1,$e=x.KEEP_CONTENT!==!1,We=x.IN_PLACE||!1,z=x.ALLOWED_URI_REGEXP||t1,ln=x.NAMESPACE||St,Qu=x.MATHML_TEXT_INTEGRATION_POINTS||Qu,es=x.HTML_INTEGRATION_POINTS||es,le=x.CUSTOM_ELEMENT_HANDLING||{},x.CUSTOM_ELEMENT_HANDLING&&Pb(x.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=x.CUSTOM_ELEMENT_HANDLING.tagNameCheck),x.CUSTOM_ELEMENT_HANDLING&&Pb(x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&($=!1),ft&&(Pe=!0),jt&&(H=ue({},Kw),ne=[],jt.html===!0&&(ue(H,$w),ue(ne,Yw)),jt.svg===!0&&(ue(H,jh),ue(ne,Nh),ue(ne,mc)),jt.svgFilters===!0&&(ue(H,Fh),ue(ne,Nh),ue(ne,mc)),jt.mathMl===!0&&(ue(H,Lh),ue(ne,Zw),ue(ne,mc))),x.ADD_TAGS&&(H===re&&(H=wi(H)),ue(H,x.ADD_TAGS,Ke)),x.ADD_ATTR&&(ne===Se&&(ne=wi(ne)),ue(ne,x.ADD_ATTR,Ke)),x.ADD_URI_SAFE_ATTR&&ue(cn,x.ADD_URI_SAFE_ATTR,Ke),x.FORBID_CONTENTS&&(Qt===wr&&(Qt=wi(Qt)),ue(Qt,x.FORBID_CONTENTS,Ke)),$e&&(H["#text"]=!0),we&&ue(H,["html","head","body"]),H.table&&(ue(H,["tbody"]),delete Te.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=x.TRUSTED_TYPES_POLICY,S=E.createHTML("")}else E===void 0&&(E=yI(p,i)),E!==null&&typeof S=="string"&&(S=E.createHTML(""));yt&&yt(x),Wi=x}},Rb=ue({},[...jh,...Fh,...cI]),Mb=ue({},[...Lh,...lI]),jR=function(x){let W=w(x);(!W||!W.tagName)&&(W={namespaceURI:ln,tagName:"template"});let K=vc(x.tagName),Re=vc(W.tagName);return Ui[x.namespaceURI]?x.namespaceURI===Lt?W.namespaceURI===St?K==="svg":W.namespaceURI===ei?K==="svg"&&(Re==="annotation-xml"||Qu[Re]):!!Rb[K]:x.namespaceURI===ei?W.namespaceURI===St?K==="math":W.namespaceURI===Lt?K==="math"&&es[Re]:!!Mb[K]:x.namespaceURI===St?W.namespaceURI===Lt&&!es[Re]||W.namespaceURI===ei&&!Qu[Re]?!1:!Mb[K]&&(kR[K]||!Rb[K]):!!(da==="application/xhtml+xml"&&Ui[x.namespaceURI]):!1},xr=function(x){Za(t.removed,{element:x});try{w(x).removeChild(x)}catch{g(x)}},ts=function(x,W){try{Za(t.removed,{attribute:W.getAttributeNode(x),from:W})}catch{Za(t.removed,{attribute:null,from:W})}if(W.removeAttribute(x),x==="is")if(Pe||ft)try{xr(W)}catch{}else try{W.setAttribute(x,"")}catch{}},kb=function(x){let W=null,K=null;if(Ue)x="<remove></remove>"+x;else{let Qe=Gw(x,/^[\r\n\t ]+/);K=Qe&&Qe[0]}da==="application/xhtml+xml"&&ln===St&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");let Re=E?E.createHTML(x):x;if(ln===St)try{W=new f().parseFromString(Re,da)}catch{}if(!W||!W.documentElement){W=A.createDocument(ln,"template",null);try{W.documentElement.innerHTML=Bi?S:Re}catch{}}let st=W.body||W.documentElement;return x&&K&&st.insertBefore(r.createTextNode(K),st.childNodes[0]||null),ln===St?C.call(W,we?"html":"body")[0]:we?W.documentElement:st},Cb=function(x){return T.call(x.ownerDocument||x,x,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},Zd=function(x){return x instanceof d&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof l)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},qb=function(x){return typeof u=="function"&&x instanceof u};function Hr(J,x,W){hc(J,K=>{K.call(t,x,W,Wi)})}let Ib=function(x){let W=null;if(Hr(k.beforeSanitizeElements,x,null),Zd(x))return xr(x),!0;let K=Ke(x.nodeName);if(Hr(k.uponSanitizeElement,x,{tagName:K,allowedTags:H}),x.hasChildNodes()&&!qb(x.firstElementChild)&&_t(/<[/\w]/g,x.innerHTML)&&_t(/<[/\w]/g,x.textContent)||x.nodeType===eu.progressingInstruction||ge&&x.nodeType===eu.comment&&_t(/<[/\w]/g,x.data))return xr(x),!0;if(!H[K]||Te[K]){if(!Te[K]&&Fb(K)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,K)||le.tagNameCheck instanceof Function&&le.tagNameCheck(K)))return!1;if($e&&!Qt[K]){let Re=w(x)||x.parentNode,st=y(x)||x.childNodes;if(st&&Re){let Qe=st.length;for(let Ot=Qe-1;Ot>=0;--Ot){let Sr=m(st[Ot],!0);Sr.__removalCount=(x.__removalCount||0)+1,Re.insertBefore(Sr,_(x))}}}return xr(x),!0}return x instanceof c&&!jR(x)||(K==="noscript"||K==="noembed"||K==="noframes")&&_t(/<\/no(script|embed|frames)/i,x.innerHTML)?(xr(x),!0):(Q&&x.nodeType===eu.text&&(W=x.textContent,hc([D,P,I],Re=>{W=Ja(W,Re," ")}),x.textContent!==W&&(Za(t.removed,{element:x.cloneNode()}),x.textContent=W)),Hr(k.afterSanitizeElements,x,null),!1)},jb=function(x,W,K){if(fe&&(W==="id"||W==="name")&&(K in r||K in IR))return!1;if(!($&&!Ee[W]&&_t(B,W))){if(!(ae&&_t(F,W))){if(!ne[W]||Ee[W]){if(!(Fb(x)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,x)||le.tagNameCheck instanceof Function&&le.tagNameCheck(x))&&(le.attributeNameCheck instanceof RegExp&&_t(le.attributeNameCheck,W)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(W))||W==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,K)||le.tagNameCheck instanceof Function&&le.tagNameCheck(K))))return!1}else if(!cn[W]){if(!_t(z,Ja(K,L,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&x!=="script"&&oI(K,"data:")===0&&Ft[x])){if(!(te&&!_t(q,Ja(K,L,"")))){if(K)return!1}}}}}}return!0},Fb=function(x){return x!=="annotation-xml"&&Gw(x,j)},Lb=function(x){Hr(k.beforeSanitizeAttributes,x,null);let{attributes:W}=x;if(!W||Zd(x))return;let K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0},Re=W.length;for(;Re--;){let st=W[Re],{name:Qe,namespaceURI:Ot,value:Sr}=st,pa=Ke(Qe),dt=Qe==="value"?Sr:aI(Sr);if(K.attrName=pa,K.attrValue=dt,K.keepAttr=!0,K.forceKeepAttr=void 0,Hr(k.uponSanitizeAttribute,x,K),dt=K.attrValue,Z&&(pa==="id"||pa==="name")&&(ts(Qe,x),dt=oe+dt),ge&&_t(/((--!?|])>)|<\/(style|title)/i,dt)){ts(Qe,x);continue}if(K.forceKeepAttr||(ts(Qe,x),!K.keepAttr))continue;if(!X&&_t(/\/>/i,dt)){ts(Qe,x);continue}Q&&hc([D,P,I],Db=>{dt=Ja(dt,Db," ")});let Nb=Ke(x.nodeName);if(jb(Nb,pa,dt)){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ot)switch(p.getAttributeType(Nb,pa)){case"TrustedHTML":{dt=E.createHTML(dt);break}case"TrustedScriptURL":{dt=E.createScriptURL(dt);break}}try{Ot?x.setAttributeNS(Ot,Qe,dt):x.setAttribute(Qe,dt),Zd(x)?xr(x):Vw(t.removed)}catch{}}}Hr(k.afterSanitizeAttributes,x,null)},FR=function J(x){let W=null,K=Cb(x);for(Hr(k.beforeSanitizeShadowDOM,x,null);W=K.nextNode();)Hr(k.uponSanitizeShadowNode,W,null),Ib(W),Lb(W),W.content instanceof o&&J(W.content);Hr(k.afterSanitizeShadowDOM,x,null)};return t.sanitize=function(J){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,K=null,Re=null,st=null;if(Bi=!J,Bi&&(J="<!-->"),typeof J!="string"&&!qb(J))if(typeof J.toString=="function"){if(J=J.toString(),typeof J!="string")throw Xa("dirty is not a string, aborting")}else throw Xa("toString is not a function");if(!t.isSupported)return J;if(be||Yd(x),t.removed=[],typeof J=="string"&&(We=!1),We){if(J.nodeName){let Sr=Ke(J.nodeName);if(!H[Sr]||Te[Sr])throw Xa("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof u)W=kb("<!---->"),K=W.ownerDocument.importNode(J,!0),K.nodeType===eu.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?W=K:W.appendChild(K);else{if(!Pe&&!Q&&!we&&J.indexOf("<")===-1)return E&&ee?E.createHTML(J):J;if(W=kb(J),!W)return Pe?null:ee?S:""}W&&Ue&&xr(W.firstChild);let Qe=Cb(We?J:W);for(;Re=Qe.nextNode();)Ib(Re),Lb(Re),Re.content instanceof o&&FR(Re.content);if(We)return J;if(Pe){if(ft)for(st=M.call(W.ownerDocument);W.firstChild;)st.appendChild(W.firstChild);else st=W;return(ne.shadowroot||ne.shadowrootmode)&&(st=R.call(n,st,!0)),st}let Ot=we?W.outerHTML:W.innerHTML;return we&&H["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&_t(r1,W.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
|
|
2
|
-
`+Ot),Q&&hc([D,P,I],Sr=>{Ot=Ja(Ot,Sr," ")}),E&&ee?E.createHTML(Ot):Ot},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yd(J),be=!0},t.clearConfig=function(){Wi=null,be=!1},t.isValidAttribute=function(J,x,W){Wi||Yd({});let K=Ke(J),Re=Ke(x);return jb(K,Re,W)},t.addHook=function(J,x){typeof x=="function"&&Za(k[J],x)},t.removeHook=function(J,x){if(x!==void 0){let W=nI(k[J],x);return W===-1?void 0:iI(k[J],W,1)[0]}return Vw(k[J])},t.removeHooks=function(J){k[J]=[]},t.removeAllHooks=function(){k=Xw()},t}var wI=n1();i1.exports=wI});var u1=b((WJ,a1)=>{"use strict";var xI=/["'&<>]/;a1.exports=SI;function SI(e){var t=""+e,r=xI.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=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";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 s1=b(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.default=OI;var Bh=Ye();function OI(){let e=(0,Bh.useRef)(null),[t,r]=(0,Bh.useState)({width:void 0,height:void 0});return(0,Bh.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 l1=b((VJ,c1)=>{c1.exports=JBrowseExports["react-dom/client"]});var $h=b(xi=>{Object.defineProperty(xi,"__esModule",{value:!0});var EI={grad:.9,turn:360,rad:360/(2*Math.PI)},Qr=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},Kt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},g1=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},f1=function(e){return{r:Kt(e.r,0,255),g:Kt(e.g,0,255),b:Kt(e.b,0,255),a:Kt(e.a)}},Wh=function(e){return{r:Xe(e.r),g:Xe(e.g),b:Xe(e.b),a:Xe(e.a,3)}},AI=/^#([0-9a-f]{3,8})$/i,bc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},_1=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}},y1=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),c=n*(1-(1-t+o)*r),s=o%6;return{r:255*[n,u,a,a,c,n][s],g:255*[c,n,n,u,a,a][s],b:255*[a,a,c,n,n,u][s],a:i}},d1=function(e){return{h:g1(e.h),s:Kt(e.s,0,100),l:Kt(e.l,0,100),a:Kt(e.a)}},p1=function(e){return{h:Xe(e.h),s:Xe(e.s),l:Xe(e.l),a:Xe(e.a,3)}},h1=function(e){return y1((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},tu=function(e){return{h:(t=_1(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},TI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,PI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,RI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,MI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gh={string:[[function(e){var t=AI.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=RI.exec(e)||MI.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:f1({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=TI.exec(e)||PI.exec(e);if(!t)return null;var r,n,i=d1({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(EI[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return h1(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 Qr(t)&&Qr(r)&&Qr(n)?f1({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(!Qr(t)||!Qr(r)||!Qr(n))return null;var a=d1({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return h1(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Qr(t)||!Qr(r)||!Qr(n))return null;var a=function(u){return{h:g1(u.h),s:Kt(u.s,0,100),v:Kt(u.v,0,100),a:Kt(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return y1(a)},"hsv"]]},m1=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]},w1=function(e){return typeof e=="string"?m1(e.trim(),Gh.string):typeof e=="object"&&e!==null?m1(e,Gh.object):[null,void 0]},Hh=function(e,t){var r=tu(e);return{h:r.h,s:Kt(r.s+100*t,0,100),l:r.l,a:r.a}},Vh=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},v1=function(e,t){var r=tu(e);return{h:r.h,s:r.s,l:Kt(r.l+100*t,0,100),a:r.a}},ru=function(){function e(t){this.parsed=w1(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(Vh(this.rgba),2)},e.prototype.isDark=function(){return Vh(this.rgba)<.5},e.prototype.isLight=function(){return Vh(this.rgba)>=.5},e.prototype.toHex=function(){return t=Wh(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?bc(Xe(255*o)):"","#"+bc(r)+bc(n)+bc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Wh(this.rgba)},e.prototype.toRgbString=function(){return t=Wh(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 p1(tu(this.rgba))},e.prototype.toHslString=function(){return t=p1(tu(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=_1(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(Hh(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),qr(Hh(this.rgba,-t))},e.prototype.grayscale=function(){return qr(Hh(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),qr(v1(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),qr(v1(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=tu(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 ru?e:new ru(e)},b1=[];xi.Colord=ru,xi.colord=qr,xi.extend=function(e){e.forEach(function(t){b1.indexOf(t)<0&&(t(ru,Gh),b1.push(t))})},xi.getFormat=function(e){return w1(e)[1]},xi.random=function(){return new ru({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var O1=b(($J,S1)=>{var Ir=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Kh=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Yh=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},Zh=96.422,Jh=100,Xh=82.521,kI=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:Yh(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:Yh(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:Yh(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)}},CI=function(e){var t=Kh(e.r),r=Kh(e.g),n=Kh(e.b);return function(i){return{x:Ir(i.x,0,Zh),y:Ir(i.y,0,Jh),z:Ir(i.z,0,Xh),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}))},nu=216/24389,go=24389/27,x1=function(e){var t=CI(e),r=t.x/Zh,n=t.y/Jh,i=t.z/Xh;return r=r>nu?Math.cbrt(r):(go*r+16)/116,{l:116*(n=n>nu?Math.cbrt(n):(go*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>nu?Math.cbrt(i):(go*i+16)/116)),alpha:t.a}},qI=function(e,t,r){var n,i=x1(e),o=x1(t);return function(a){var u=(a.l+16)/116,c=a.a/500+u,s=u-a.b/200;return kI({x:(Math.pow(c,3)>nu?Math.pow(c,3):(116*c-16)/go)*Zh,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/go)*Jh,z:(Math.pow(s,3)>nu?Math.pow(s,3):(116*s-16)/go)*Xh,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)})};S1.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=qI(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 A1=b((KJ,E1)=>{E1.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,c,s=n[this.toHex()];if(s)return s;if(a?.closest){var l=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=l,c=o[h],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));m<d&&(d=m,f=h)}return f}},t.string.push([function(a){var u=a.toLowerCase(),c=u==="transparent"?"#0000":r[u];return c?new e(c).toRgb():null},"name"])}});var R1=b(wn=>{"use strict";var T1=wn&&wn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wn,"__esModule",{value:!0});wn.colord=wn.Colord=void 0;var II=$h(),jI=T1(O1()),FI=T1(A1());(0,II.extend)([jI.default,FI.default]);var P1=$h();Object.defineProperty(wn,"Colord",{enumerable:!0,get:function(){return P1.Colord}});Object.defineProperty(wn,"colord",{enumerable:!0,get:function(){return P1.colord}})});var Qh=b(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.createStopToken=NI;iu.stopStopToken=DI;iu.checkStopToken=zI;function LI(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function NI(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function DI(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function zI(e){if(typeof jest>"u"&&e!==void 0&&LI()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var k1=b(M1=>{"use strict";Object.defineProperty(M1,"__esModule",{value:!0})});var xn=b((XJ,ou)=>{function BI(e){return e&&e.__esModule?e:{default:e}}ou.exports=BI,ou.exports.__esModule=!0,ou.exports.default=ou.exports});var tm=b((QJ,en)=>{function em(e){"@babel/helpers - typeof";return en.exports=em=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},en.exports.__esModule=!0,en.exports.default=en.exports,em(e)}en.exports=em,en.exports.__esModule=!0,en.exports.default=en.exports});var q1=b((eX,au)=>{var C1=tm().default;function UI(e,t){if(C1(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(C1(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}au.exports=UI,au.exports.__esModule=!0,au.exports.default=au.exports});var rm=b((tX,uu)=>{var WI=tm().default,HI=q1();function VI(e){var t=HI(e,"string");return WI(t)=="symbol"?t:t+""}uu.exports=VI,uu.exports.__esModule=!0,uu.exports.default=uu.exports});var I1=b((rX,su)=>{var GI=rm();function $I(e,t,r){return(t=GI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}su.exports=$I,su.exports.__esModule=!0,su.exports.default=su.exports});var Si=b((nX,cu)=>{function KI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}cu.exports=KI,cu.exports.__esModule=!0,cu.exports.default=cu.exports});var Oi=b((iX,lu)=>{var YI=rm();function j1(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,YI(n.key),n)}}function ZI(e,t,r){return t&&j1(e.prototype,t),r&&j1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}lu.exports=ZI,lu.exports.__esModule=!0,lu.exports.default=lu.exports});var nm=b((oX,fu)=>{function JI(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}fu.exports=JI,fu.exports.__esModule=!0,fu.exports.default=fu.exports});var F1=b((aX,du)=>{var XI=nm();function QI(e){if(Array.isArray(e))return XI(e)}du.exports=QI,du.exports.__esModule=!0,du.exports.default=du.exports});var L1=b((uX,pu)=>{function e2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}pu.exports=e2,pu.exports.__esModule=!0,pu.exports.default=pu.exports});var D1=b((sX,hu)=>{var N1=nm();function t2(e,t){if(e){if(typeof e=="string")return N1(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)?N1(e,t):void 0}}hu.exports=t2,hu.exports.__esModule=!0,hu.exports.default=hu.exports});var z1=b((cX,mu)=>{function r2(){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.`)}mu.exports=r2,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var B1=b((lX,vu)=>{var n2=F1(),i2=L1(),o2=D1(),a2=z1();function u2(e){return n2(e)||i2(e)||o2(e)||a2()}vu.exports=u2,vu.exports.__esModule=!0,vu.exports.default=vu.exports});var U1=b(jr=>{"use strict";var s2=xn(),c2=s2(B1()),l2={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=l2[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,c2.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 V1=b((dX,H1)=>{"use strict";var W1=xn(),f2=W1(Si()),d2=W1(Oi()),p2=U1(),h2=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,f2.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,d2.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return p2[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(c,s){o[i[s]]=c}),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(c,s){c&&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}();H1.exports=h2});var Y1=b((pX,K1)=>{"use strict";var $1=xn(),m2=$1(Si()),v2=$1(Oi()),b2=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,G1=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,g2=/\\\\/,_2=/^\s*$/,y2=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],w2=["[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]+)"],x2=["binaryOp","unaryOp","openParen","openBracket","question","colon"],S2=function(){function e(t){(0,m2.default)(this,e),this._grammar=t}return(0,v2.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(b2))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(G1))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(G1)&&(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("("+[y2.join("|"),n.join("|"),w2.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?x2.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(_2)}},{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(g2,"\\")}}]),e}();K1.exports=S2});var im=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 J1=b(Z1=>{"use strict";var Mt=im();Z1.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 ex=b((vX,Q1)=>{"use strict";var X1=xn(),O2=X1(Si()),E2=X1(Oi()),A2=im(),gc=J1().states,T2=function(){function e(t,r,n){(0,O2.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,E2.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=gc[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=A2[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&&!gc[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(){gc[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=gc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();Q1.exports=T2});var nx=b((bX,rx)=>{"use strict";var tx=xn(),P2=tx(Si()),R2=tx(Oi()),Sn=function(){function e(t){(0,P2.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,R2.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}();Sn.all=function(e){return new Sn(function(t){var r=e.map(function(n){for(;n instanceof Sn;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};Sn.resolve=function(e){return new Sn(function(t){return t(e)})};Sn.reject=function(e){return new Sn(function(t,r){return r(e)})};rx.exports=Sn});var ax=b((gX,ox)=>{"use strict";var ix=xn(),M2=ix(Si()),k2=ix(Oi()),C2=V1(),q2=Y1(),I2=ex(),j2=nx(),F2=function(){function e(t,r){(0,M2.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,k2.default)(e,[{key:"compile",value:function(){var r=new q2(this._grammar),n=new I2(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,j2);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 C2(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();ox.exports=F2});var sx=b(ux=>{"use strict";ux.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 lx=b((yX,am)=>{"use strict";var om=xn(),L2=om(I1()),N2=om(Si()),D2=om(Oi()),z2=ax(),B2=sx(),U2=B2.getGrammar,cx=function(){function e(){(0,N2.default)(this,e),this.expr=this.expr.bind(this),this._grammar=U2()}return(0,D2.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,L2.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 z2(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,c,s){var l=s<i.length?i[s]:"";return u+=c+l,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}();am.exports=new cx;am.exports.Jexl=cx});var fx=b(bu=>{"use strict";var W2=bu&&bu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bu,"__esModule",{value:!0});bu.default=V2;var H2=W2(lx());function V2(){let e=new H2.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 sm=b(gu=>{"use strict";var G2=gu&&gu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gu,"__esModule",{value:!0});gu.stringToJexlExpression=K2;var $2=G2(fx()),um={};function K2(e,t){let r=`nosig|${e}`;if(!um[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,$2.default)().compile(i);um[r]=o}return um[r]}});var dx=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 Y2=e=>crypto.getRandomValues(new Uint8Array(e));kt.random=Y2;var Z2=(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),c=i;for(;c--;)if(a+=e[u[c]&n]||"",a.length===o)return a}}};kt.customRandom=Z2;var J2=(e,t=21)=>(0,kt.customRandom)(e,t,kt.random);kt.customAlphabet=J2;var X2=(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=X2});var cm=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(),Q2=dx();je.ElementId=ve.types.optional(ve.types.identifier,()=>(0,Q2.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 vx=b(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.default=uj;var ke=vt(),ej=_o(),tj=sm(),rj=cm();function nj(){return!0}var ij={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,nj),integer:ke.types.integer,number:ke.types.number,string:ke.types.string,text:ke.types.string,fileLocation:rj.FileLocation,frozen:ke.types.frozen()},px={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},lm=e=>({views:{get valueJSON(){return e.value}}}),hx=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),mx={fileLocation:hx,number:lm,integer:lm,boolean:lm,frozen:hx,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)}}})},oj=ke.types.refinement("JexlString",ke.types.string,e=>e.startsWith("jexl:"));function aj(e){return e?.toJSON?e.toJSON():`"${e}"`}function uj(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=ij[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(oj,r),i)}).volatile(()=>({contextVariable:o})).views(l=>({get isCallback(){return String(l.value).startsWith("jexl:")}})).views(l=>({get expr(){if(l.isCallback){let{pluginManager:d}=(0,ej.getEnv)(l);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,tj.stringToJexlExpression)(String(l.value),d?.jexl)}return{evalSync:()=>l.value}},get valueJSON(){if(!l.isCallback)return aj(l.value)}})).preProcessSnapshot(l=>typeof l=="object"&&l.name===e?l:{name:e,description:t,type:n,value:l}).postProcessSnapshot(l=>typeof l.value=="object"?JSON.stringify(l.value)!==JSON.stringify(i)?l.value:void 0:l.value!==i?l.value:void 0).actions(l=>({set(d){l.value=d},reset(){l.value=i},convertToCallback(){l.isCallback||(l.value=`jexl:${l.valueJSON||"''"}`)},convertToValue(){if(l.isCallback){try{let d=l.expr.evalSync();if(d!==void 0){l.value=d;return}}catch{}if(l.value=i,!(n in px))throw new Error(`no fallbackDefault defined for type ${n}`);l.value=px[n]}}}));mx[n]&&(u=u.extend(mx[n]));let s=ke.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var gx=b(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.getSubType=dm;En.getUnionSubTypes=bx;En.getPropertyType=sj;En.getDefaultValue=cj;En.getEnumerationValues=lj;En.resolveLateType=fj;var On=vt();function dm(e){let t;if((0,On.isOptionalType)(e))t=e._subtype||e.type;else if((0,On.isArrayType)(e)||(0,On.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 bx(e){if(!(0,On.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||dm(e)._types||dm(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function sj(e,t){return e.properties[t]}function cj(e){if(!(0,On.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function lj(e){return bx(e).map(r=>r.value)}function fj(e){return!(0,On.isUnionType)(e)&&!(0,On.isArrayType)(e)&&(0,On.isLateType)(e)?e.getSubType():e}});var pm=b(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.readConfObject=_c;tn.getConf=dj;tn.getTypeNamesFromExplicitlyTypedUnion=_x;tn.isBareConfigurationSchemaType=yx;tn.isConfigurationSchemaType=yo;tn.isConfigurationModel=wx;tn.isConfigurationSlotType=pj;var Be=vt(),An=gx();function _c(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Be.isStateTreeNode)(e)&&(0,Be.isMapType)((0,Be.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Be.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Be.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,Be.isStateTreeNode)(e)&&(0,Be.isMapType)((0,Be.getType)(e))&&(o=e.get(n)),o?_c(o,i,r):void 0}return _c(e,n,r)}}else return structuredClone((0,Be.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function dj(e,t,r){let{configuration:n}=e;if(wx(n))return _c(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function _x(e){if((0,Be.isType)(e)&&(e=(0,An.resolveLateType)(e),(0,Be.isUnionType)(e))){let t=[];return(0,An.getUnionSubTypes)(e).forEach(r=>{r=(0,An.resolveLateType)(r);let n=_x(r);if(n.length||(n=[(0,An.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}),t}return[]}function yx(e){return!!((0,Be.isType)(e)&&((0,Be.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Be.isLateType)(e)))}function yo(e){return(0,Be.isType)(e)?yx(e)?!0:(0,Be.isUnionType)(e)?(0,An.getUnionSubTypes)(e).every(t=>yo(t)||t.name==="undefined"):(0,Be.isOptionalType)(e)&&yo((0,An.getSubType)(e))||(0,Be.isArrayType)(e)&&yo((0,An.getSubType)(e))?!0:!!((0,Be.isMapType)(e)&&yo((0,An.getSubType)(e))):!1}function wx(e){return(0,Be.isStateTreeNode)(e)&&yo((0,Be.getType)(e))}function pj(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var Ox=b(wo=>{"use strict";var hj=wo&&wo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wo,"__esModule",{value:!0});wo.ConfigurationSchema=yj;wo.ConfigurationReference=wj;var Yt=vt(),mj=hj(vx()),xx=pm(),Sx=cm();function vj(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function bj(e){return Array.isArray(e)&&e.length===0}function gj(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 _j(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Yt.types.optional(Yt.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]=Yt.types.identifier,i=r.explicitIdentifier):(n.id=Yt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=Sx.ElementId,i=r.implicitIdentifier):(n.id=Sx.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach(([l,d])=>{if((0,Yt.isType)(d)&&(0,Yt.isLateType)(d)||(0,xx.isConfigurationSchemaType)(d))n[l]=d;else if(typeof d=="string"||typeof d=="number")o[l]=d;else if(typeof d=="object"){if(!d.type)throw new Error(`no type set for config slot ${e}.${l}`);try{n[l]=(0,mj.default)(l,d)}catch(f){throw new Error(`invalid config slot definition for ${e}.${l}: ${f}`)}}else throw new Error(`invalid configuration schema definition, "${l}" must be either a valid configuration slot definition, a constant, or a nested configuration schema`)});let a=Yt.types.model(`${e}ConfigurationSchema`,n).actions(l=>({setSubschema(d,f){if(!(0,xx.isConfigurationSchemaType)(n[d]))throw new Error(`${d} is not a subschema, cannot replace`);let p=(0,Yt.isStateTreeNode)(f)?f:n[d].create(f);return l[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"}:{},c=r.explicitlyTyped?{type:e,...u}:u,s=(0,Yt.getSnapshot)(a.create(c));return a=a.postProcessSnapshot(l=>{let d={},f=!0;for(let[p,h]of Object.entries(l))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&&!vj(h)&&!bj(h)&&(d[p]=h);return f?{}:d}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Yt.types.optional(a,c)}function yj(e,t,r){let{schemaDefinition:n,options:i}=gj(e,t,r),o=_j(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function wj(e){return Yt.types.union(Yt.types.reference(e),e)}});var hm=b(mr=>{"use strict";var xj=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]}),Sj=mr&&mr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&xj(t,e,r)};Object.defineProperty(mr,"__esModule",{value:!0});mr.ConfigurationSchema=mr.ConfigurationReference=void 0;var Ex=Ox();Object.defineProperty(mr,"ConfigurationReference",{enumerable:!0,get:function(){return Ex.ConfigurationReference}});Object.defineProperty(mr,"ConfigurationSchema",{enumerable:!0,get:function(){return Ex.ConfigurationSchema}});Sj(pm(),mr)});var Ax=b(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var mm=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()])}};vm.default=mm});var Tx=b(_u=>{"use strict";var Oj=_u&&_u.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_u,"__esModule",{value:!0});var bm=hm(),Ej=Oj(Ax()),gm=class{constructor(t){this.pluginManager=t,this.adapterCache=new Ej.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,bm.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,bm.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,bm.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())}};_u.default=gm});var yc=b(se=>{"use strict";var Aj=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]}),Tj=se&&se.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Aj(t,e,r)},Pj=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=Mj;se.isSessionModel=Tn;se.isSessionModelWithConfigEditing=kj;se.isSessionWithAddTracks=Cj;se.isSessionWithShareURL=qj;se.isSessionModelWithWidgets=Ij;se.isSessionModelWithConnections=jj;se.isSessionModelWithConnectionEditing=Fj;se.isSessionWithSessionPlugins=Lj;se.isSelectionContainer=Nj;se.isViewModel=Dj;se.isTrackModel=zj;se.isDisplayModel=Bj;se.isTrackViewModel=Uj;se.isAppRootModel=Wj;se.isRootModelWithInternetAccounts=Hj;se.isAbstractMenuManager=Vj;se.isUriLocation=Gj;se.isLocalPathLocation=$j;se.isBlobLocation=Kj;se.isAuthNeededException=Yj;se.isRetryException=Zj;var Rj=vt();Tj(k1(),se);function Mj(e){return(0,Rj.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function Tn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function kj(e){return Tn(e)&&"editConfiguration"in e}function Cj(e){return Tn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function qj(e){return Tn(e)&&"shareURL"in e&&!!e.shareURL}function Ij(e){return Tn(e)&&"widgets"in e}function jj(e){return Tn(e)&&"makeConnection"in e}function Fj(e){return Tn(e)&&"addConnectionConf"in e}function Lj(e){return Tn(e)&&"sessionPlugins"in e}function Nj(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function Dj(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function zj(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function Bj(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function Uj(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function Wj(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function Hj(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function Vj(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function Gj(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function $j(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function Kj(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var _m=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=_m;var ym=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};se.RetryError=ym;function Yj(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function Zj(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var Jj=Tx();Object.defineProperty(se,"TextSearchManager",{enumerable:!0,get:function(){return Pj(Jj).default}})});var wc=b((qX,Px)=>{Px.exports=JBrowseExports.mobx});var Rx=b(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.when=void 0;var Xj=wc();Object.defineProperty(xc,"when",{enumerable:!0,get:function(){return Xj.when}})});var Mx=b(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.intersection2=Qj;yu.doesIntersect2=eF;yu.isContainedWithin=tF;function Qj(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 eF(e,t,r,n){return t>r&&e<n}function tF(e,t,r,n){return r<=e&&n>=t}});var kx=b(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.dedupe=rF;function rF(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 Em=b((LX,jx)=>{"use strict";var Sc={},Ac={},wu={METHOD:"method",PROPERTY:"property"},Oc=class{constructor(t,r){this.inst=t,this.args=r}},xm=class extends Oc{constructor(t,r){super(t,r),this.type=wu.METHOD}execute(t){t[this.inst](...this.args)}},Sm=class extends Oc{constructor(t,r){super(t,r),this.type=wu.PROPERTY}execute(t){t[this.inst]=this.args[0]}},nF={[wu.METHOD]:xm,[wu.PROPERTY]:Sm},Ec=class{constructor(t,r,n){return new nF[t](r,n)}};Object.entries(wu).forEach(([e,t])=>{Object.defineProperty(Ec,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});Ac=Ec;var qx=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")}),xu=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 Ac(t,r,n))}execute(t){t.save(),this[Fr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[Fr.sequence]}}};qx.METHODS.forEach(e=>{Object.defineProperty(xu.prototype,e,{value:function(...r){this[Fr.push](Ac.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});qx.PROPERTIES.forEach(e=>{Object.defineProperty(xu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[Fr.push](Ac.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});Sc=xu;var Ix={},Cx=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function iF(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var Om=class extends Sc{build(t={}){let r=new Sc;return this[Cx.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?iF(u,t):u);r[Cx.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};Ix=Om;jx.exports={CanvasSequence:Sc,CanvasBlueprint:Ix}});var Lx=b((NX,Fx)=>{Fx.exports=!1});var Am=b(lt=>{"use strict";var oF=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=uF;var Dx=Em(),aF=oF(Lx());function uF(e,t){e.serializedCommands?new Dx.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var Nx={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:aF.default};Nx.realOffscreenCanvas?(lt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),lt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,lt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):Nx.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 Dx.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 Pm=b(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.blobToDataURL=sF;function sF(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((BX,Tc)=>{(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"]=" ",m}function c(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,_,y;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,y=_.exec(m),this.__currentElement.setAttribute(h.svgAttr,o("rgb({r},{g},{b})",{r:y[1],g:y[2],b:y[3]})),this.__currentElement.setAttribute(h.svgAttr+"-opacity",y[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,_,y;if(y=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,y.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 l=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 y=l([g-d,_-f]),w=l([p-d,h-f]);if(y[0]*w[1]===y[1]*w[0]){this.lineTo(d,f);return}var E=y[0]*w[0]+y[1]*w[1],S=Math.acos(Math.abs(E)),A=l([y[0]+w[0],y[1]+w[1]]),T=m/Math.sin(S/2),M=d+T*A[0],C=f+T*A[1],R=[-y[1],y[0]],k=[w[1],-w[0]],D=function(B){var F=B[0],q=B[1];return q>=0?Math.acos(F):-Math.acos(F)},P=D(R),I=D(k);this.lineTo(M+R[0]*m,C+R[1]*m),this.arc(M,C,m,P,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":c(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),y=f+p*Math.sin(m),w=d+p*Math.cos(h),E=f+p*Math.sin(h),S=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(w,E),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:p,ry:p,xAxisRotation:0,largeArcFlag:A,sweepFlag:S,endX:_,endY:y})),this.__currentPosition={x:_,y}}},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,y=0,w,E,S,A,T,M,C,R,k,D,P;if(d.length===3)p=d[1],h=d[2],w=f.width,E=f.height,m=w,g=E;else if(d.length===5)p=d[1],h=d[2],m=d[3],g=d[4],w=f.width,E=f.height;else if(d.length===9)_=d[1],y=d[2],w=d[3],E=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(S=this.__closestGroupOrSvg(),C=this.__currentElement,f instanceof t){for(A=f.getSvg(),T=A.childNodes[0];T.childNodes.length;)P=T.childNodes[0].getAttribute("id"),this.__ids[P]=P,this.__defs.appendChild(T.childNodes[0]);M=A.childNodes[1],S.appendChild(M),this.__currentElement=M,this.translate(p,h),this.__currentElement=C}else(f.nodeName==="CANVAS"||f.nodeName==="IMG")&&(R=this.__createElement("image"),R.setAttribute("width",m),R.setAttribute("height",g),R.setAttribute("preserveAspectRatio","none"),(_||y||w!==f.width||E!==f.height)&&(k=this.__document.createElement("canvas"),k.width=m,k.height=g,D=k.getContext("2d"),D.drawImage(f,_,y,w,E,0,0,m,g),f=k),R.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.nodeName==="CANVAS"?f.toDataURL():f.getAttribute("src")),S.appendChild(R),this.__currentElement=R,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 Tc=="object"&&typeof Tc.exports=="object"&&(Tc.exports=t)})()});var Wx=b(vr=>{"use strict";var cF=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]}),lF=vr&&vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fF=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"&&cF(r,t,n[i]);return lF(r,t),r}}();Object.defineProperty(vr,"__esModule",{value:!0});vr.renderToAbstractCanvas=hF;vr.getSerializedSvg=mF;vr.ReactRendering=vF;var Bx=Da(),dF=Ye(),Ux=Em(),pF=Pm(),Rm=Am();async function hF(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,Rm.createCanvas)(Math.ceil(e*a),t*a),c=u.getContext("2d");if(!c)throw new Error("2d canvas rendering not supported on this platform");return c.scale(a,a),{...await n(c),reactElement:(0,Bx.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,pF.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new Ux.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,Rm.createCanvas)(Math.ceil(e*a),t*a),c=u.getContext("2d");if(!c)throw new Error("2d canvas rendering not supported on this platform");return c.scale(a,a),{...await n(c),imageData:await(0,Rm.createImageBitmap)(u)}}}async function mF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>fF(zx())),o=new i.default(t,r);return new Ux.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function vF({rendering:e}){return(0,dF.isValidElement)(e.reactElement)?e.reactElement:(0,Bx.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var Vx=b(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.isFeature=bF;function bF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function Hx(e){return"uniqueId"in e&&typeof e.data!="object"}var Mm=class e{constructor(t){var r;Hx(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=Hx(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})}};Pc.default=Mm});var ye=b(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.isFunction=void 0;function gF(e){return typeof e=="function"}Rc.isFunction=gF});var Pn=b(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.createErrorClass=void 0;function _F(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}Mc.createErrorClass=_F});var km=b(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.UnsubscriptionError=void 0;var yF=Pn();kc.UnsubscriptionError=yF.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
1
|
+
"use strict";var JBrowsePluginMafViewer=(()=>{var NR=Object.create;var rs=Object.defineProperty;var DR=Object.getOwnPropertyDescriptor;var zR=Object.getOwnPropertyNames;var BR=Object.getPrototypeOf,UR=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),Xd=(e,t)=>{for(var r in t)rs(e,r,{get:t[r],enumerable:!0})},zb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zR(t))!UR.call(e,i)&&i!==r&&rs(e,i,{get:()=>t[i],enumerable:!(n=DR(t,i))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?NR(BR(e)):{},zb(t||!e||!e.__esModule?rs(r,"default",{value:e,enumerable:!0}):r,e)),Bb=e=>zb(rs({},"__esModule",{value:!0}),e);var Wb=b((uY,Ub)=>{Ub.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Vr=b((cY,Vb)=>{Vb.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var Qd=b(()=>{});var rp=b(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});function Gb(e){return(typeof e=="object"&&e!==null&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}var ep=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(`${Gb(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${Gb(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 c=await u.arrayBuffer(),s=u.headers.get("content-range"),l=/\/(\d+)$/.exec(s||"");return l?.[1]&&(this._stat={size:parseInt(l[1],10)}),new Uint8Array(c.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(){}};tp.default=ep});var Kb=b($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:!0})});var Yb=b(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var np=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(){}};ip.default=np});var op=b(et=>{"use strict";var HR=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]}),VR=et&&et.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&HR(t,e,r)},ma=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=KR;et.fromUrl=Zb;var GR=ma(Qd()),$R=ma(rp());VR(Kb(),et);function Zb(e,t={}){return new $R.default(e,t)}function KR(e,t,r,n={}){if(r!==void 0)return r;if(e!==void 0)return Zb(e,n);if(t!==void 0)return new GR.default(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}var YR=Yb();Object.defineProperty(et,"BlobFile",{enumerable:!0,get:function(){return ma(YR).default}});var ZR=rp();Object.defineProperty(et,"RemoteFile",{enumerable:!0,get:function(){return ma(ZR).default}});var JR=Qd();Object.defineProperty(et,"LocalFile",{enumerable:!0,get:function(){return ma(JR).default}})});var Gr=b(ht=>{"use strict";var XR=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function QR(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)QR(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 eM={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}},tM={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,eM)):(ht.Buf8=Array,ht.Buf16=Array,ht.Buf32=Array,ht.assign(ht,tM))};ht.setTyped(XR)});var _g=b(Ki=>{"use strict";var rM=Gr(),nM=4,Jb=0,Xb=1,iM=2;function $i(e){for(var t=e.length;--t>=0;)e[t]=0}var oM=0,ig=1,aM=2,uM=3,sM=258,dp=29,wa=256,ba=wa+1+dp,Gi=30,pp=19,og=2*ba+1,ri=15,ap=16,cM=7,hp=256,ag=16,ug=17,sg=18,lp=[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],ns=[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],lM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cg=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fM=512,$r=new Array((ba+2)*2);$i($r);var va=new Array(Gi*2);$i(va);var ga=new Array(fM);$i(ga);var _a=new Array(sM-uM+1);$i(_a);var mp=new Array(dp);$i(mp);var is=new Array(Gi);$i(is);function up(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 lg,fg,dg;function sp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function pg(e){return e<256?ga[e]:ga[256+(e>>>7)]}function ya(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>ap-r?(e.bi_buf|=t<<e.bi_valid&65535,ya(e,e.bi_buf),e.bi_buf=t>>ap-e.bi_valid,e.bi_valid+=r-ap):(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 hg(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function dM(e){e.bi_valid===16?(ya(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 pM(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,c=t.stat_desc.max_length,s,l,d,f,p,h,m=0;for(f=0;f<=ri;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<og;s++)l=e.heap[s],f=r[r[l*2+1]*2+1]+1,f>c&&(f=c,m++),r[l*2+1]=f,!(l>n)&&(e.bl_count[f]++,p=0,l>=u&&(p=a[l-u]),h=r[l*2],e.opt_len+=h*(f+p),o&&(e.static_len+=h*(i[l*2+1]+p)));if(m!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(f=c;f!==0;f--)for(l=e.bl_count[f];l!==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),l--)}}function mg(e,t,r){var n=new Array(ri+1),i=0,o,a;for(o=1;o<=ri;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]=hg(n[u]++,u))}}function hM(){var e,t,r,n,i,o=new Array(ri+1);for(r=0,n=0;n<dp-1;n++)for(mp[n]=r,e=0;e<1<<lp[n];e++)_a[r++]=n;for(_a[r-1]=n,i=0,n=0;n<16;n++)for(is[n]=i,e=0;e<1<<ns[n];e++)ga[i++]=n;for(i>>=7;n<Gi;n++)for(is[n]=i<<7,e=0;e<1<<ns[n]-7;e++)ga[256+i++]=n;for(t=0;t<=ri;t++)o[t]=0;for(e=0;e<=143;)$r[e*2+1]=8,e++,o[8]++;for(;e<=255;)$r[e*2+1]=9,e++,o[9]++;for(;e<=279;)$r[e*2+1]=7,e++,o[7]++;for(;e<=287;)$r[e*2+1]=8,e++,o[8]++;for(mg($r,ba+1,o),e=0;e<Gi;e++)va[e*2+1]=5,va[e*2]=hg(e,5);lg=new up($r,lp,wa+1,ba,ri),fg=new up(va,ns,0,Gi,ri),dg=new up(new Array(0),lM,0,pp,cM)}function vg(e){var t;for(t=0;t<ba;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Gi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<pp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[hp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function bg(e){e.bi_valid>8?ya(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 mM(e,t,r,n){bg(e),n&&(ya(e,r),ya(e,~r)),rM.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function Qb(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 cp(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&Qb(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Qb(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function eg(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=_a[i],Or(e,a+wa+1,t),u=lp[a],u!==0&&(i-=mp[a],Et(e,i,u)),n--,a=pg(n),Or(e,a,r),u=ns[a],u!==0&&(n-=is[a],Et(e,n,u)));while(o<e.last_lit);Or(e,hp,t)}function fp(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,c=-1,s;for(e.heap_len=0,e.heap_max=og,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=c=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=c<2?++c:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,i&&(e.static_len-=n[s*2+1]);for(t.max_code=c,a=e.heap_len>>1;a>=1;a--)cp(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],cp(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++,cp(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],pM(e,t),mg(r,c,e.bl_count)}function tg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,c=7,s=4;for(a===0&&(c=138,s=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++u<c&&o===a)&&(u<s?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[ag*2]++):u<=10?e.bl_tree[ug*2]++:e.bl_tree[sg*2]++,u=0,i=o,a===0?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4))}function rg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,c=7,s=4;for(a===0&&(c=138,s=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++u<c&&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,ag,e.bl_tree),Et(e,u-3,2)):u<=10?(Or(e,ug,e.bl_tree),Et(e,u-3,3)):(Or(e,sg,e.bl_tree),Et(e,u-11,7));u=0,i=o,a===0?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4)}}function vM(e){var t;for(tg(e,e.dyn_ltree,e.l_desc.max_code),tg(e,e.dyn_dtree,e.d_desc.max_code),fp(e,e.bl_desc),t=pp-1;t>=3&&e.bl_tree[cg[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function bM(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[cg[i]*2+1],3);rg(e,e.dyn_ltree,t-1),rg(e,e.dyn_dtree,r-1)}function gM(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Jb;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Xb;for(r=32;r<wa;r++)if(e.dyn_ltree[r*2]!==0)return Xb;return Jb}var ng=!1;function _M(e){ng||(hM(),ng=!0),e.l_desc=new sp(e.dyn_ltree,lg),e.d_desc=new sp(e.dyn_dtree,fg),e.bl_desc=new sp(e.bl_tree,dg),e.bi_buf=0,e.bi_valid=0,vg(e)}function gg(e,t,r,n){Et(e,(oM<<1)+(n?1:0),3),mM(e,t,r,!0)}function yM(e){Et(e,ig<<1,3),Or(e,hp,$r),dM(e)}function wM(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===iM&&(e.strm.data_type=gM(e)),fp(e,e.l_desc),fp(e,e.d_desc),a=vM(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?gg(e,t,r,n):e.strategy===nM||o===i?(Et(e,(ig<<1)+(n?1:0),3),eg(e,$r,va)):(Et(e,(aM<<1)+(n?1:0),3),bM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),eg(e,e.dyn_ltree,e.dyn_dtree)),vg(e),n&&bg(e)}function xM(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[(_a[r]+wa+1)*2]++,e.dyn_dtree[pg(t)*2]++),e.last_lit===e.lit_bufsize-1}Ki._tr_init=_M;Ki._tr_stored_block=gg;Ki._tr_flush_block=wM;Ki._tr_tally=xM;Ki._tr_align=yM});var vp=b((gY,yg)=>{"use strict";function SM(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}yg.exports=SM});var bp=b((_Y,wg)=>{"use strict";function OM(){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 EM=OM();function AM(e,t,r,n){var i=EM,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}wg.exports=AM});var os=b((yY,xg)=>{"use strict";xg.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 kg=b(Tr=>{"use strict";var mt=Gr(),zt=_g(),Ag=vp(),fn=bp(),TM=os(),ai=0,PM=1,RM=3,vn=4,Sg=5,Ar=0,Og=1,Bt=-2,MM=-3,gp=-5,kM=-1,CM=1,as=2,qM=3,IM=4,jM=0,FM=2,ls=8,LM=9,NM=15,DM=8,zM=29,BM=256,yp=BM+1+zM,UM=30,WM=19,HM=2*yp+1,VM=15,de=3,hn=258,tr=hn+de+1,GM=32,fs=42,wp=69,us=73,ss=91,cs=103,ni=113,Sa=666,Ve=1,Oa=2,ii=3,Ji=4,$M=3;function mn(e,t){return e.msg=TM[t],t}function Eg(e){return(e<<1)-(e>4?9:0)}function pn(e){for(var t=e.length;--t>=0;)e[t]=0}function dn(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){zt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,dn(e.strm)}function he(e,t){e.pending_buf[e.pending++]=t}function xa(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function KM(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=Ag(e.adler,t,i,r):e.state.wrap===2&&(e.adler=fn(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Tg(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,u=e.nice_match,c=e.strstart>e.w_size-tr?e.strstart-(e.w_size-tr):0,s=e.window,l=e.w_mask,d=e.prev,f=e.strstart+hn,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=hn-(f-n),n=f-hn,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&l])>c&&--r!==0);return a<=e.lookahead?a:e.lookahead}function oi(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-tr)){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=KM(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<tr&&e.strm.avail_in!==0)}function YM(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(oi(e),e.lookahead===0&&t===ai)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-tr&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===vn?(tt(e,!0),e.strm.avail_out===0?ii:Ji):(e.strstart>e.block_start&&(tt(e,!1),e.strm.avail_out===0),Ve)}function _p(e,t){for(var r,n;;){if(e.lookahead<tr){if(oi(e),e.lookahead<tr&&t===ai)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-tr&&(e.match_length=Tg(e,r)),e.match_length>=de)if(n=zt._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=zt._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===vn?(tt(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Oa}function Yi(e,t){for(var r,n,i;;){if(e.lookahead<tr){if(oi(e),e.lookahead<tr&&t===ai)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-tr&&(e.match_length=Tg(e,r),e.match_length<=5&&(e.strategy===CM||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=zt._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=zt._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=zt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===vn?(tt(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Oa}function ZM(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=hn){if(oi(e),e.lookahead<=hn&&t===ai)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+hn;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=hn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(r=zt._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=zt._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===vn?(tt(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Oa}function JM(e,t){for(var r;;){if(e.lookahead===0&&(oi(e),e.lookahead===0)){if(t===ai)return Ve;break}if(e.match_length=0,r=zt._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===vn?(tt(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Oa}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 Zi;Zi=[new Er(0,0,0,0,YM),new Er(4,4,8,4,_p),new Er(4,5,16,8,_p),new Er(4,6,32,32,_p),new Er(4,4,16,16,Yi),new Er(8,16,32,32,Yi),new Er(8,16,128,128,Yi),new Er(8,32,128,256,Yi),new Er(32,128,258,1024,Yi),new Er(32,258,258,4096,Yi)];function XM(e){e.window_size=2*e.w_size,pn(e.head),e.max_lazy_match=Zi[e.level].max_lazy,e.good_match=Zi[e.level].good_length,e.nice_match=Zi[e.level].nice_length,e.max_chain_length=Zi[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 QM(){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=ls,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(HM*2),this.dyn_dtree=new mt.Buf16((2*UM+1)*2),this.bl_tree=new mt.Buf16((2*WM+1)*2),pn(this.dyn_ltree),pn(this.dyn_dtree),pn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new mt.Buf16(VM+1),this.heap=new mt.Buf16(2*yp+1),pn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new mt.Buf16(2*yp+1),pn(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 Pg(e){var t;return!e||!e.state?mn(e,Bt):(e.total_in=e.total_out=0,e.data_type=FM,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fs:ni,e.adler=t.wrap===2?0:1,t.last_flush=ai,zt._tr_init(t),Ar)}function Rg(e){var t=Pg(e);return t===Ar&&XM(e.state),t}function ek(e,t){return!e||!e.state||e.state.wrap!==2?Bt:(e.state.gzhead=t,Ar)}function Mg(e,t,r,n,i,o){if(!e)return Bt;var a=1;if(t===kM&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>LM||r!==ls||n<8||n>15||t<0||t>9||o<0||o>IM)return mn(e,Bt);n===8&&(n=9);var u=new QM;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,Rg(e)}function tk(e,t){return Mg(e,t,ls,NM,DM,jM)}function rk(e,t){var r,n,i,o;if(!e||!e.state||t>Sg||t<0)return e?mn(e,Bt):Bt;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Sa&&t!==vn)return mn(e,e.avail_out===0?gp:Bt);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===fs)if(n.wrap===2)e.adler=0,he(n,31),he(n,139),he(n,8),n.gzhead?(he(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)),he(n,n.gzhead.time&255),he(n,n.gzhead.time>>8&255),he(n,n.gzhead.time>>16&255),he(n,n.gzhead.time>>24&255),he(n,n.level===9?2:n.strategy>=as||n.level<2?4:0),he(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(he(n,n.gzhead.extra.length&255),he(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=fn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=wp):(he(n,0),he(n,0),he(n,0),he(n,0),he(n,0),he(n,n.level===9?2:n.strategy>=as||n.level<2?4:0),he(n,$M),n.status=ni);else{var a=ls+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=as||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=GM),a+=31-a%31,n.status=ni,xa(n,a),n.strstart!==0&&(xa(n,e.adler>>>16),xa(n,e.adler&65535)),e.adler=1}if(n.status===wp)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=fn(e.adler,n.pending_buf,n.pending-i,i)),dn(e),i=n.pending,n.pending===n.pending_buf_size));)he(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=us)}else n.status=us;if(n.status===us)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),dn(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,he(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=ss)}else n.status=ss;if(n.status===ss)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),dn(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,he(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=fn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=cs)}else n.status=cs;if(n.status===cs&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&dn(e),n.pending+2<=n.pending_buf_size&&(he(n,e.adler&255),he(n,e.adler>>8&255),e.adler=0,n.status=ni)):n.status=ni),n.pending!==0){if(dn(e),e.avail_out===0)return n.last_flush=-1,Ar}else if(e.avail_in===0&&Eg(t)<=Eg(r)&&t!==vn)return mn(e,gp);if(n.status===Sa&&e.avail_in!==0)return mn(e,gp);if(e.avail_in!==0||n.lookahead!==0||t!==ai&&n.status!==Sa){var c=n.strategy===as?JM(n,t):n.strategy===qM?ZM(n,t):Zi[n.level].func(n,t);if((c===ii||c===Ji)&&(n.status=Sa),c===Ve||c===ii)return e.avail_out===0&&(n.last_flush=-1),Ar;if(c===Oa&&(t===PM?zt._tr_align(n):t!==Sg&&(zt._tr_stored_block(n,0,0,!1),t===RM&&(pn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),dn(e),e.avail_out===0))return n.last_flush=-1,Ar}return t!==vn?Ar:n.wrap<=0?Og:(n.wrap===2?(he(n,e.adler&255),he(n,e.adler>>8&255),he(n,e.adler>>16&255),he(n,e.adler>>24&255),he(n,e.total_in&255),he(n,e.total_in>>8&255),he(n,e.total_in>>16&255),he(n,e.total_in>>24&255)):(xa(n,e.adler>>>16),xa(n,e.adler&65535)),dn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ar:Og)}function nk(e){var t;return!e||!e.state?Bt:(t=e.state.status,t!==fs&&t!==wp&&t!==us&&t!==ss&&t!==cs&&t!==ni&&t!==Sa?mn(e,Bt):(e.state=null,t===ni?mn(e,MM):Ar))}function ik(e,t){var r=t.length,n,i,o,a,u,c,s,l;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==fs||n.lookahead))return Bt;for(a===1&&(e.adler=Ag(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(pn(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new mt.Buf8(n.w_size),mt.arraySet(l,t,r-n.w_size,n.w_size,0),t=l,r=n.w_size),u=e.avail_in,c=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,oi(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,oi(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=c,e.input=s,e.avail_in=u,n.wrap=a,Ar}Tr.deflateInit=tk;Tr.deflateInit2=Mg;Tr.deflateReset=Rg;Tr.deflateResetKeep=Pg;Tr.deflateSetHeader=ek;Tr.deflate=rk;Tr.deflateEnd=nk;Tr.deflateSetDictionary=ik;Tr.deflateInfo="pako deflate (from Nodeca project)"});var xp=b(Xi=>{"use strict";var ds=Gr(),Cg=!0,qg=!0;try{String.fromCharCode.apply(null,[0])}catch{Cg=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{qg=!1}var Ea=new ds.Buf8(256);for(Kr=0;Kr<256;Kr++)Ea[Kr]=Kr>=252?6:Kr>=248?5:Kr>=240?4:Kr>=224?3:Kr>=192?2:1;var Kr;Ea[254]=Ea[254]=1;Xi.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 ds.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 Ig(e,t){if(t<65534&&(e.subarray&&qg||!e.subarray&&Cg))return String.fromCharCode.apply(null,ds.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Xi.buf2binstring=function(e){return Ig(e,e.length)};Xi.binstring2buf=function(e){for(var t=new ds.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Xi.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=Ea[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 Ig(u,n)};Xi.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+Ea[e[r]]>t?r:t}});var Sp=b((SY,jg)=>{"use strict";function ok(){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}jg.exports=ok});var Dg=b(Pa=>{"use strict";var Aa=kg(),Ta=Gr(),Ep=xp(),Ap=os(),ak=Sp(),Ng=Object.prototype.toString,uk=0,Op=4,Qi=0,Fg=1,Lg=2,sk=-1,ck=0,lk=8;function ui(e){if(!(this instanceof ui))return new ui(e);this.options=Ta.assign({level:sk,method:lk,chunkSize:16384,windowBits:15,memLevel:8,strategy:ck,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 ak,this.strm.avail_out=0;var r=Aa.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Qi)throw new Error(Ap[r]);if(t.header&&Aa.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Ep.string2buf(t.dictionary):Ng.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Aa.deflateSetDictionary(this.strm,n),r!==Qi)throw new Error(Ap[r]);this._dict_set=!0}}ui.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?Op:uk,typeof e=="string"?r.input=Ep.string2buf(e):Ng.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 Ta.Buf8(n),r.next_out=0,r.avail_out=n),i=Aa.deflate(r,o),i!==Fg&&i!==Qi)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===Op||o===Lg))&&(this.options.to==="string"?this.onData(Ep.buf2binstring(Ta.shrinkBuf(r.output,r.next_out))):this.onData(Ta.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Fg);return o===Op?(i=Aa.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Qi):(o===Lg&&(this.onEnd(Qi),r.avail_out=0),!0)};ui.prototype.onData=function(e){this.chunks.push(e)};ui.prototype.onEnd=function(e){e===Qi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ta.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Tp(e,t){var r=new ui(t);if(r.push(e,!0),r.err)throw r.msg||Ap[r.err];return r.result}function fk(e,t){return t=t||{},t.raw=!0,Tp(e,t)}function dk(e,t){return t=t||{},t.gzip=!0,Tp(e,t)}Pa.Deflate=ui;Pa.deflate=Tp;Pa.deflateRaw=fk;Pa.gzip=dk});var Bg=b((EY,zg)=>{"use strict";var ps=30,pk=12;zg.exports=function(t,r){var n,i,o,a,u,c,s,l,d,f,p,h,m,g,_,w,y,E,S,A,T,M,C,R,k;n=t.state,i=t.next_in,R=t.input,o=i+(t.avail_in-5),a=t.next_out,k=t.output,u=a-(r-t.avail_out),c=a+(t.avail_out-257),s=n.dmax,l=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+=R[i++]<<m,m+=8,h+=R[i++]<<m,m+=8),E=g[h&w];t:for(;;){if(S=E>>>24,h>>>=S,m-=S,S=E>>>16&255,S===0)k[a++]=E&65535;else if(S&16){A=E&65535,S&=15,S&&(m<S&&(h+=R[i++]<<m,m+=8),A+=h&(1<<S)-1,h>>>=S,m-=S),m<15&&(h+=R[i++]<<m,m+=8,h+=R[i++]<<m,m+=8),E=_[h&y];r:for(;;){if(S=E>>>24,h>>>=S,m-=S,S=E>>>16&255,S&16){if(T=E&65535,S&=15,m<S&&(h+=R[i++]<<m,m+=8,m<S&&(h+=R[i++]<<m,m+=8)),T+=h&(1<<S)-1,T>s){t.msg="invalid distance too far back",n.mode=ps;break e}if(h>>>=S,m-=S,S=a-u,T>S){if(S=T-S,S>d&&n.sane){t.msg="invalid distance too far back",n.mode=ps;break e}if(M=0,C=p,f===0){if(M+=l-S,S<A){A-=S;do k[a++]=p[M++];while(--S);M=a-T,C=k}}else if(f<S){if(M+=l+f-S,S-=f,S<A){A-=S;do k[a++]=p[M++];while(--S);if(M=0,f<A){S=f,A-=S;do k[a++]=p[M++];while(--S);M=a-T,C=k}}}else if(M+=f-S,S<A){A-=S;do k[a++]=p[M++];while(--S);M=a-T,C=k}for(;A>2;)k[a++]=C[M++],k[a++]=C[M++],k[a++]=C[M++],A-=3;A&&(k[a++]=C[M++],A>1&&(k[a++]=C[M++]))}else{M=a-T;do k[a++]=k[M++],k[a++]=k[M++],k[a++]=k[M++],A-=3;while(A>2);A&&(k[a++]=k[M++],A>1&&(k[a++]=k[M++]))}}else if(S&64){t.msg="invalid distance code",n.mode=ps;break e}else{E=_[(E&65535)+(h&(1<<S)-1)];continue r}break}}else if(S&64)if(S&32){n.mode=pk;break e}else{t.msg="invalid literal/length code",n.mode=ps;break e}else{E=g[(E&65535)+(h&(1<<S)-1)];continue t}break}}while(i<o&&a<c);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<c?257+(c-a):257-(a-c),n.hold=h,n.bits=m}});var Kg=b((AY,$g)=>{"use strict";var Ug=Gr(),eo=15,Wg=852,Hg=592,Vg=0,Pp=1,Gg=2,hk=[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],mk=[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],vk=[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],bk=[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];$g.exports=function(t,r,n,i,o,a,u,c){var s=c.bits,l=0,d=0,f=0,p=0,h=0,m=0,g=0,_=0,w=0,y=0,E,S,A,T,M,C=null,R=0,k,D=new Ug.Buf16(eo+1),P=new Ug.Buf16(eo+1),I=null,B=0,F,q,L;for(l=0;l<=eo;l++)D[l]=0;for(d=0;d<i;d++)D[r[n+d]]++;for(h=s,p=eo;p>=1&&D[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,c.bits=1,0;for(f=1;f<p&&D[f]===0;f++);for(h<f&&(h=f),_=1,l=1;l<=eo;l++)if(_<<=1,_-=D[l],_<0)return-1;if(_>0&&(t===Vg||p!==1))return-1;for(P[1]=0,l=1;l<eo;l++)P[l+1]=P[l]+D[l];for(d=0;d<i;d++)r[n+d]!==0&&(u[P[r[n+d]]++]=d);if(t===Vg?(C=I=u,k=19):t===Pp?(C=hk,R-=257,I=mk,B-=257,k=256):(C=vk,I=bk,k=-1),y=0,d=0,l=f,M=a,m=h,g=0,A=-1,w=1<<h,T=w-1,t===Pp&&w>Wg||t===Gg&&w>Hg)return 1;for(;;){F=l-g,u[d]<k?(q=0,L=u[d]):u[d]>k?(q=I[B+u[d]],L=C[R+u[d]]):(q=96,L=0),E=1<<l-g,S=1<<m,f=S;do S-=E,o[M+(y>>g)+S]=F<<24|q<<16|L|0;while(S!==0);for(E=1<<l-1;y&E;)E>>=1;if(E!==0?(y&=E-1,y+=E):y=0,d++,--D[l]===0){if(l===p)break;l=r[n+u[d]]}if(l>h&&(y&T)!==A){for(g===0&&(g=h),M+=f,m=l-g,_=1<<m;m+g<p&&(_-=D[m+g],!(_<=0));)m++,_<<=1;if(w+=1<<m,t===Pp&&w>Wg||t===Gg&&w>Hg)return 1;A=y&T,o[A]=h<<24|m<<16|M-a|0}}return y!==0&&(o[M+y]=l-g<<24|64<<16|0),c.bits=h,0}});var R_=b(rr=>{"use strict";var Nt=Gr(),Ip=vp(),Pr=bp(),gk=Bg(),Ra=Kg(),_k=0,y_=1,w_=2,Yg=4,yk=5,hs=6,si=0,wk=1,xk=2,Ut=-2,x_=-3,jp=-4,Sk=-5,Zg=8,S_=1,Jg=2,Xg=3,Qg=4,e_=5,t_=6,r_=7,n_=8,i_=9,o_=10,bs=11,Yr=12,Rp=13,a_=14,Mp=15,u_=16,s_=17,c_=18,l_=19,ms=20,vs=21,f_=22,d_=23,p_=24,h_=25,m_=26,kp=27,v_=28,b_=29,Me=30,Fp=31,Ok=32,Ek=852,Ak=592,Tk=15,Pk=Tk;function g_(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Rk(){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 Nt.Buf16(320),this.work=new Nt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function O_(e){var t;return!e||!e.state?Ut:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=S_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Nt.Buf32(Ek),t.distcode=t.distdyn=new Nt.Buf32(Ak),t.sane=1,t.back=-1,si)}function E_(e){var t;return!e||!e.state?Ut:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,O_(e))}function A_(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))?Ut:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,E_(e))}function T_(e,t){var r,n;return e?(n=new Rk,e.state=n,n.window=null,r=A_(e,t),r!==si&&(e.state=null),r):Ut}function Mk(e){return T_(e,Pk)}var __=!0,Cp,qp;function kk(e){if(__){var t;for(Cp=new Nt.Buf32(512),qp=new Nt.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(Ra(y_,e.lens,0,288,Cp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ra(w_,e.lens,0,32,qp,0,e.work,{bits:5}),__=!1}e.lencode=Cp,e.lenbits=9,e.distcode=qp,e.distbits=5}function P_(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 Nt.Buf8(o.wsize)),n>=o.wsize?(Nt.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),Nt.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Nt.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 Ck(e,t){var r,n,i,o,a,u,c,s,l,d,f,p,h,m,g=0,_,w,y,E,S,A,T,M,C=new Nt.Buf8(4),R,k,D=[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 Ut;r=e.state,r.mode===Yr&&(r.mode=Rp),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,l=r.bits,d=u,f=c,M=si;e:for(;;)switch(r.mode){case S_:if(r.wrap===0){r.mode=Rp;break}for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0,r.mode=Jg;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)!==Zg){e.msg="unknown compression method",r.mode=Me;break}if(s>>>=4,l-=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?o_:Yr,s=0,l=0;break;case Jg:for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(r.flags=s,(r.flags&255)!==Zg){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,l=0,r.mode=Xg;case Xg:for(;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0,r.mode=Qg;case Qg:for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0,r.mode=e_;case e_:if(r.flags&1024){for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=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,l=0}else r.head&&(r.head.extra=null);r.mode=t_;case t_: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)),Nt.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=r_;case r_: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=n_;case n_: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=i_;case i_:if(r.flags&512){for(;l<16;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(s!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Me;break}s=0,l=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Yr;break;case o_:for(;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}e.adler=r.check=g_(s),s=0,l=0,r.mode=bs;case bs:if(r.havedict===0)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=l,xk;e.adler=r.check=1,r.mode=Yr;case Yr:if(t===yk||t===hs)break e;case Rp:if(r.last){s>>>=l&7,l-=l&7,r.mode=kp;break}for(;l<3;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}switch(r.last=s&1,s>>>=1,l-=1,s&3){case 0:r.mode=a_;break;case 1:if(kk(r),r.mode=ms,t===hs){s>>>=2,l-=2;break e}break;case 2:r.mode=s_;break;case 3:e.msg="invalid block type",r.mode=Me}s>>>=2,l-=2;break;case a_:for(s>>>=l&7,l-=l&7;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Me;break}if(r.length=s&65535,s=0,l=0,r.mode=Mp,t===hs)break e;case Mp:r.mode=u_;case u_:if(p=r.length,p){if(p>u&&(p=u),p>c&&(p=c),p===0)break e;Nt.arraySet(i,n,o,p,a),u-=p,o+=p,c-=p,a+=p,r.length-=p;break}r.mode=Yr;break;case s_:for(;l<14;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(r.nlen=(s&31)+257,s>>>=5,l-=5,r.ndist=(s&31)+1,s>>>=5,l-=5,r.ncode=(s&15)+4,s>>>=4,l-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Me;break}r.have=0,r.mode=c_;case c_:for(;r.have<r.ncode;){for(;l<3;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}r.lens[D[r.have++]]=s&7,s>>>=3,l-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},M=Ra(_k,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,M){e.msg="invalid code lengths set",r.mode=Me;break}r.have=0,r.mode=l_;case l_: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,!(_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(y<16)s>>>=_,l-=_,r.lens[r.have++]=y;else{if(y===16){for(k=_+2;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(s>>>=_,l-=_,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,l-=2}else if(y===17){for(k=_+3;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=_,l-=_,T=0,p=3+(s&7),s>>>=3,l-=3}else{for(k=_+7;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=_,l-=_,T=0,p=11+(s&127),s>>>=7,l-=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,R={bits:r.lenbits},M=Ra(y_,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,M){e.msg="invalid literal/lengths set",r.mode=Me;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},M=Ra(w_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,M){e.msg="invalid distances set",r.mode=Me;break}if(r.mode=ms,t===hs)break e;case ms:r.mode=vs;case vs:if(u>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=l,gk(e,f),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,l=r.bits,r.mode===Yr&&(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,!(_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(w&&!(w&240)){for(E=_,S=w,A=y;g=r.lencode[A+((s&(1<<E+S)-1)>>E)],_=g>>>24,w=g>>>16&255,y=g&65535,!(E+_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=E,l-=E,r.back+=E}if(s>>>=_,l-=_,r.back+=_,r.length=y,w===0){r.mode=m_;break}if(w&32){r.back=-1,r.mode=Yr;break}if(w&64){e.msg="invalid literal/length code",r.mode=Me;break}r.extra=w&15,r.mode=f_;case f_:if(r.extra){for(k=r.extra;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}r.length+=s&(1<<r.extra)-1,s>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=d_;case d_:for(;g=r.distcode[s&(1<<r.distbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(!(w&240)){for(E=_,S=w,A=y;g=r.distcode[A+((s&(1<<E+S)-1)>>E)],_=g>>>24,w=g>>>16&255,y=g&65535,!(E+_<=l);){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}s>>>=E,l-=E,r.back+=E}if(s>>>=_,l-=_,r.back+=_,w&64){e.msg="invalid distance code",r.mode=Me;break}r.offset=y,r.extra=w&15,r.mode=p_;case p_:if(r.extra){for(k=r.extra;l<k;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}r.offset+=s&(1<<r.extra)-1,s>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Me;break}r.mode=h_;case h_:if(c===0)break e;if(p=f-c,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>c&&(p=c),c-=p,r.length-=p;do i[a++]=m[h++];while(--p);r.length===0&&(r.mode=vs);break;case m_:if(c===0)break e;i[a++]=r.length,c--,r.mode=vs;break;case kp:if(r.wrap){for(;l<32;){if(u===0)break e;u--,s|=n[o++]<<l,l+=8}if(f-=c,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?Pr(r.check,i,f,a-f):Ip(r.check,i,f,a-f)),f=c,(r.flags?s:g_(s))!==r.check){e.msg="incorrect data check",r.mode=Me;break}s=0,l=0}r.mode=v_;case v_:if(r.wrap&&r.flags){for(;l<32;){if(u===0)break e;u--,s+=n[o++]<<l,l+=8}if(s!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Me;break}s=0,l=0}r.mode=b_;case b_:M=wk;break e;case Me:M=x_;break e;case Fp:return jp;case Ok:default:return Ut}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=l,(r.wsize||f!==e.avail_out&&r.mode<Me&&(r.mode<kp||t!==Yg))&&P_(e,e.output,e.next_out,f-e.avail_out)?(r.mode=Fp,jp):(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):Ip(r.check,i,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Yr?128:0)+(r.mode===ms||r.mode===Mp?256:0),(d===0&&f===0||t===Yg)&&M===si&&(M=Sk),M)}function qk(e){if(!e||!e.state)return Ut;var t=e.state;return t.window&&(t.window=null),e.state=null,si}function Ik(e,t){var r;return!e||!e.state||(r=e.state,!(r.wrap&2))?Ut:(r.head=t,t.done=!1,si)}function jk(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==bs)?Ut:n.mode===bs&&(i=1,i=Ip(i,t,r,0),i!==n.check)?x_:(o=P_(e,t,r,r),o?(n.mode=Fp,jp):(n.havedict=1,si))}rr.inflateReset=E_;rr.inflateReset2=A_;rr.inflateResetKeep=O_;rr.inflateInit=Mk;rr.inflateInit2=T_;rr.inflate=Ck;rr.inflateEnd=qk;rr.inflateGetHeader=Ik;rr.inflateSetDictionary=jk;rr.inflateInfo="pako inflate (from Nodeca project)"});var Lp=b((PY,M_)=>{"use strict";M_.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 C_=b((RY,k_)=>{"use strict";function Fk(){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}k_.exports=Fk});var I_=b(ka=>{"use strict";var to=R_(),Ma=Gr(),gs=xp(),ze=Lp(),Np=os(),Lk=Sp(),Nk=C_(),q_=Object.prototype.toString;function ci(e){if(!(this instanceof ci))return new ci(e);this.options=Ma.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||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Lk,this.strm.avail_out=0;var r=to.inflateInit2(this.strm,t.windowBits);if(r!==ze.Z_OK)throw new Error(Np[r]);if(this.header=new Nk,to.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=gs.string2buf(t.dictionary):q_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=to.inflateSetDictionary(this.strm,t.dictionary),r!==ze.Z_OK)))throw new Error(Np[r])}ci.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,u,c,s,l=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?ze.Z_FINISH:ze.Z_NO_FLUSH,typeof e=="string"?r.input=gs.binstring2buf(e):q_.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 Ma.Buf8(n),r.next_out=0,r.avail_out=n),o=to.inflate(r,ze.Z_NO_FLUSH),o===ze.Z_NEED_DICT&&i&&(o=to.inflateSetDictionary(this.strm,i)),o===ze.Z_BUF_ERROR&&l===!0&&(o=ze.Z_OK,l=!1),o!==ze.Z_STREAM_END&&o!==ze.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===ze.Z_STREAM_END||r.avail_in===0&&(a===ze.Z_FINISH||a===ze.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=gs.utf8border(r.output,r.next_out),c=r.next_out-u,s=gs.buf2string(r.output,u),r.next_out=c,r.avail_out=n-c,c&&Ma.arraySet(r.output,r.output,u,c,0),this.onData(s)):this.onData(Ma.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(l=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==ze.Z_STREAM_END);return o===ze.Z_STREAM_END&&(a=ze.Z_FINISH),a===ze.Z_FINISH?(o=to.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===ze.Z_OK):(a===ze.Z_SYNC_FLUSH&&(this.onEnd(ze.Z_OK),r.avail_out=0),!0)};ci.prototype.onData=function(e){this.chunks.push(e)};ci.prototype.onEnd=function(e){e===ze.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ma.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Dp(e,t){var r=new ci(t);if(r.push(e,!0),r.err)throw r.msg||Np[r.err];return r.result}function Dk(e,t){return t=t||{},t.raw=!0,Dp(e,t)}ka.Inflate=ci;ka.inflate=Dp;ka.inflateRaw=Dk;ka.ungzip=Dp});var L_=b((kY,F_)=>{"use strict";var zk=Gr().assign,Bk=Dg(),Uk=I_(),Wk=Lp(),j_={};zk(j_,Bk,Uk,Wk);F_.exports=j_});var zp=b(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.sum=N_;_s.concatUint8Array=Hk;function N_(e){let t=0;for(let r of e)t+=r.length;return t}function Hk(e){let t=new Uint8Array(N_(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var Bp=b(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.unzip=Vk;ws.unzipChunkSlice=Gk;var ys=L_(),D_=zp();async function Vk(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new ys.Inflate,{strm:t}=n,n.push(o,ys.Z_SYNC_FLUSH),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,D_.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function Gk(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,u=[],c=[],s=[],l=0;do{let d=e.subarray(o-n.blockPosition),f=new ys.Inflate;if({strm:r}=f,f.push(d,ys.Z_SYNC_FLUSH),f.err)throw new Error(f.msg);let p=f.result;u.push(p);let h=p.length;c.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[l]=u[l].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),c.push(o),s.push(a);break}l++}while(r.avail_in);return{buffer:(0,D_.concatUint8Array)(u),cpositions:c,dpositions:s}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var z_=b(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL=void 0;Rr.longFromBytesToUnsigned=$k;Rr.TWO_PWR_16_DBL=65536;Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL*Rr.TWO_PWR_16_DBL;function $k(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 U_=b(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});var Kk=op(),Up=z_(),xs=1;function B_(e,t,r){let n=t[xs],i=r?r[xs]:1/0;return n<=e&&i>e?0:n<e?-1:1}var Wp=class{constructor({filehandle:t,path:r}){if(t)this.filehandle=t;else if(r)this.filehandle=new Kk.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,Up.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,Up.longFromBytesToUnsigned)(o,a*16),c=(0,Up.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[u,c]}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,c=Math.floor(i.length/2),s=B_(r,i[c],i[c+1]);for(;s!==0;)s>0?u=c-1:s<0&&(a=c+1),c=Math.ceil((u-a)/2)+a,s=B_(r,i[c],i[c+1]);o.push(i[c]);let l=c+1;for(;l<i.length&&(o.push(i[l]),!(i[l][xs]>=n));l+=1);return o[o.length-1][xs]<n&&o.push([]),o}};Hp.default=Wp});var W_=b(Ca=>{"use strict";var Yk=Ca&&Ca.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ca,"__esModule",{value:!0});var Zk=op(),Jk=Bp(),Xk=Yk(U_()),Qk=zp(),Vp=class{constructor({filehandle:t,path:r,gziFilehandle:n,gziPath:i}){if(t)this.filehandle=t;else if(r)this.filehandle=new Zk.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 Xk.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,Jk.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],c=u>=r?0:r-u,s=Math.min(r+t,u+a.length)-u;c>=0&&c<a.length&&i.push(a.subarray(c,s))}return(0,Qk.concatUint8Array)(i)}};Ca.default=Vp});var Gp=b(nr=>{"use strict";var eC=nr&&nr.__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]}),tC=nr&&nr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&eC(t,e,r)},rC=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nr,"__esModule",{value:!0});nr.BgzfFilehandle=void 0;var nC=W_();Object.defineProperty(nr,"BgzfFilehandle",{enumerable:!0,get:function(){return rC(nC).default}});tC(Bp(),nr)});var Ss=b((NY,H_)=>{H_.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var ir=b((DY,V_)=>{V_.exports=JBrowseExports["@jbrowse/core/util"]});var Os=b((zY,G_)=>{G_.exports=JBrowseExports["@jbrowse/core/util/io"]});var Es=b((BY,$_)=>{$_.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var gn=b((tZ,ly)=>{ly.exports=JBrowseExports["@jbrowse/core/configuration"]});var vt=b((aZ,hy)=>{hy.exports=JBrowseExports["mobx-state-tree"]});var Ye=b((bJ,Iy)=>{Iy.exports=JBrowseExports.react});var Da=b((gJ,jy)=>{jy.exports=JBrowseExports["react/jsx-runtime"]});function Is(){return typeof window<"u"}function kr(e){return Fy(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=(Fy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fy(e){return Is()?e instanceof Node||e instanceof rt(e).Node:!1}function _e(e){return Is()?e instanceof Element||e instanceof rt(e).Element:!1}function qe(e){return Is()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function qs(e){return!Is()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}function uo(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Ly(e){return["table","td","th"].includes(kr(e))}function za(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function js(e){let t=so(),r=_e(e)?bt(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 Ny(e){let t=ur(e);for(;qe(t)&&!cr(t);){if(js(t))return t;if(za(t))return null;t=ur(t)}return null}function so(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cr(e){return["html","body","#document"].includes(kr(e))}function bt(e){return rt(e).getComputedStyle(e)}function Ba(e){return _e(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||qs(e)&&e.host||sr(e);return qs(t)?t.host:t}function Dy(e){let t=ur(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&uo(t)?t:Dy(t)}function Tt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Dy(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=rt(i);if(o){let u=Fs(a);return t.concat(a,a.visualViewport||[],uo(i)?i:[],u&&r?Tt(u):[])}return t.concat(i,Tt(i,[],r))}function Fs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ua=pt(()=>{});function Vt(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&&qs(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ls(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ns(){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 sh(e){return e.mozInputSource===0&&e.isTrusted?!0:uh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ds(e){return mC()?!1:!uh()&&e.width===0&&e.height===0||uh()&&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 ch(){return/apple/i.test(navigator.vendor)}function uh(){let e=/android/i;return e.test(Ls())||e.test(Ns())}function zy(){return Ls().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function mC(){return Ns().includes("jsdom/")}function di(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function By(e){return"nativeEvent"in e}function Uy(e){return e.matches("html,body")}function Ze(e){return e?.ownerDocument||document}function zs(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 Bs(e){return qe(e)&&e.matches(vC)}function Je(e){e.preventDefault(),e.stopPropagation()}function lh(e){return e?e.getAttribute("role")==="combobox"&&Bs(e):!1}var vC,Wy=pt(()=>{Ua();vC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"});function Us(e,t,r){return De(e,gt(t,r))}function Pt(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function Ws(e){return e==="x"?"y":"x"}function Hs(e){return e==="y"?"height":"width"}function Cr(e){return["top","bottom"].includes(Rt(e))?"y":"x"}function Vs(e){return Ws(Cr(e))}function ph(e,t,r){r===void 0&&(r=!1);let n=Gt(e),i=Vs(e),o=Hs(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ha(a)),[a,Ha(a)]}function Vy(e){let t=Ha(e);return[Wa(e),t,Wa(t)]}function Wa(e){return e.replace(/start|end/g,t=>gC[t])}function _C(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 Gy(e,t,r,n){let i=Gt(e),o=_C(Rt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Wa)))),o}function Ha(e){return e.replace(/left|right|bottom|top/g,t=>bC[t])}function yC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gs(e){return typeof e!="number"?yC(e):{top:e,right:e,bottom:e,left:e}}function Jr(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 fh,Hy,dh,gt,De,pi,yn,fr,bC,gC,Va=pt(()=>{fh=["top","right","bottom","left"],Hy=["start","end"],dh=fh.reduce((e,t)=>e.concat(t,t+"-"+Hy[0],t+"-"+Hy[1]),[]),gt=Math.min,De=Math.max,pi=Math.round,yn=Math.floor,fr=e=>({x:e,y:e}),bC={left:"right",right:"left",bottom:"top",top:"bottom"},gC={start:"end",end:"start"}});var wC,$s,Ky,co,Ks,Ys,xC,SC,OC,Yy,Zy,EC,AC,Jy,TC,PC,RC,MC,kC,CC,qC,$y,IC,jC,FC,hh,LC,NC,Ga,Xy,Qy=pt(()=>{wC=["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])"],$s=wC.join(","),Ky=typeof Element>"u",co=Ky?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ks=!Ky&&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},Ys=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},xC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},SC=function(t,r,n){if(Ys(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll($s));return r&&co.call(t,$s)&&i.unshift(t),i=i.filter(n),i},OC=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Ys(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),c=u.length?u:a.children,s=e(c,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:a,candidates:s})}else{var l=co.call(a,$s);l&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!Ys(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},Yy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Zy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||xC(t))&&!Yy(t)?0:t.tabIndex},EC=function(t,r){var n=Zy(t);return n<0&&r&&!Yy(t)?0:n},AC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Jy=function(t){return t.tagName==="INPUT"},TC=function(t){return Jy(t)&&t.type==="hidden"},PC=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},RC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},MC=function(t){if(!t.name)return!0;var r=t.form||Ks(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=RC(i,t.form);return!o||o===t},kC=function(t){return Jy(t)&&t.type==="radio"},CC=function(t){return kC(t)&&!MC(t)},qC=function(t){var r,n=t&&Ks(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,u,c;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var s,l,d;n=Ks(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((l=i)!==null&&l!==void 0&&(d=l.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},$y=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},IC=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=co.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(co.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var c=t.parentElement,s=Ks(t);if(c&&!c.shadowRoot&&i(c)===!0)return $y(t);t.assignedSlot?t=t.assignedSlot:!c&&s!==t.ownerDocument?t=s.host:t=c}t=u}if(qC(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return $y(t);return!1},jC=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 co.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},FC=function(t,r){return!(r.disabled||Ys(r)||TC(r)||IC(r,t)||PC(r)||jC(r))},hh=function(t,r){return!(CC(r)||Zy(r)<0||!FC(t,r))},LC=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},NC=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,c=EC(u,a),s=a?e(i.candidates):u;c===0?a?r.push.apply(r,s):r.push(u):n.push({documentOrder:o,tabIndex:c,item:i,isScope:a,content:s})}),n.sort(AC).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Ga=function(t,r){r=r||{};var n;return r.getShadowRoot?n=OC([t],r.includeContainer,{filter:hh.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:LC}):n=SC(t,r.includeContainer,hh.bind(null,r)),NC(n)},Xy=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return co.call(t,$s)===!1?!1:hh(r,t)}});var Zs=b((OJ,e0)=>{e0.exports=JBrowseExports["react-dom"]});function t0(e,t,r){let{reference:n,floating:i}=e,o=Cr(t),a=Vs(t),u=Hs(a),c=Rt(t),s=o==="y",l=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(c){case"top":p={x:l,y:n.y-i.height};break;case"bottom":p={x:l,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(Gt(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 wn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Pt(t,e),h=Gs(p),g=u[f?d==="floating"?"reference":"floating":d],_=Jr(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:l,strategy:c})),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)),E=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},S=Jr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:y,strategy:c}):w);return{top:(_.top-S.top+h.top)/E.y,bottom:(S.bottom-_.bottom+h.bottom)/E.y,left:(_.left-S.left+h.left)/E.x,right:(S.right-_.right+h.right)/E.x}}function DC(e,t,r){return(e?[...r.filter(i=>Gt(i)===e),...r.filter(i=>Gt(i)!==e)]:r.filter(i=>Rt(i)===i)).filter(i=>e?Gt(i)===e||(t?Wa(i)!==i:!1):!0)}function r0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function n0(e){return fh.some(t=>e[t]>=0)}function c0(e){let t=gt(...e.map(o=>o.left)),r=gt(...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 zC(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=>Jr(c0(i)))}async function BC(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=Gt(r),c=Cr(r)==="y",s=["left","top"].includes(a)?-1:1,l=o&&c?-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),c?{x:p*l,y:f*s}:{x:f*s,y:p*l}}var i0,o0,a0,u0,s0,l0,f0,d0,p0,h0,m0=pt(()=>{Va();Va();i0=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:d}=t0(s,n,c),f=n,p={},h=0;for(let m=0;m<u.length;m++){let{name:g,fn:_}=u[m],{x:w,y,data:E,reset:S}=await _({x:l,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});l=w??l,d=y??d,p={...p,[g]:{...p[g],...E}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(s=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:l,y:d}=t0(s,f,c)),m=-1)}return{x:l,y:d,placement:f,strategy:i,middlewareData:p}};o0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:s,padding:l=0}=Pt(e,t)||{};if(s==null)return{};let d=Gs(l),f={x:r,y:n},p=Vs(i),h=Hs(p),m=await a.getDimensions(s),g=p==="y",_=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",E=o.reference[h]+o.reference[p]-f[p]-o.floating[h],S=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 M=E/2-S/2,C=T/2-m[h]/2-1,R=gt(d[_],C),k=gt(d[w],C),D=R,P=T-m[h]-k,I=T/2-m[h]/2+M,B=Us(D,I,P),F=!c.arrow&&Gt(i)!=null&&I!==B&&o.reference[h]/2-(I<D?R:k)-m[h]/2<0,q=F?I<D?I-D:I-P:0;return{[p]:f[p]+q,data:{[p]:B,centerOffset:I-B-q,...F&&{alignmentOffset:q}},reset:F}}});a0=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:c,elements:s}=t,{crossAxis:l=!1,alignment:d,allowedPlacements:f=dh,autoAlignment:p=!0,...h}=Pt(e,t),m=d!==void 0||f===dh?DC(d||null,p,f):f,g=await wn(t,h),_=((r=a.autoPlacement)==null?void 0:r.index)||0,w=m[_];if(w==null)return{};let y=ph(w,o,await(c.isRTL==null?void 0:c.isRTL(s.floating)));if(u!==w)return{reset:{placement:m[0]}};let E=[g[Rt(w)],g[y[0]],g[y[1]]],S=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:E}],A=m[_+1];if(A)return{data:{index:_+1,overflows:S},reset:{placement:A}};let T=S.map(R=>{let k=Gt(R.placement);return[R.placement,k&&l?R.overflows.slice(0,2).reduce((D,P)=>D+P,0):R.overflows[0],R.overflows]}).sort((R,k)=>R[1]-k[1]),C=((i=T.filter(R=>R[2].slice(0,Gt(R[0])?2:3).every(k=>k<=0))[0])==null?void 0:i[0])||T[0][0];return C!==u?{data:{index:_+1,overflows:S},reset:{placement:C}}:{}}}},u0=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:c,elements:s}=t,{mainAxis:l=!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,E=await(c.isRTL==null?void 0:c.isRTL(s.floating)),S=f||(y||!m?[Ha(u)]:Vy(u)),A=h!=="none";!f&&A&&S.push(...Gy(u,m,h,E));let T=[u,...S],M=await wn(t,g),C=[],R=((n=o.flip)==null?void 0:n.overflows)||[];if(l&&C.push(M[_]),d){let I=ph(i,a,E);C.push(M[I[0]],M[I[1]])}if(R=[...R,{placement:i,overflows:C}],!C.every(I=>I<=0)){var k,D;let I=(((k=o.flip)==null?void 0:k.index)||0)+1,B=T[I];if(B)return{data:{index:I,overflows:R},reset:{placement:B}};let F=(D=R.filter(q=>q.overflows[0]<=0).sort((q,L)=>q.overflows[1]-L.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(p){case"bestFit":{var P;let q=(P=R.filter(L=>{if(A){let j=Cr(L.placement);return j===w||j==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(j=>j>0).reduce((j,z)=>j+z,0)]).sort((L,j)=>L[1]-j[1])[0])==null?void 0:P[0];q&&(F=q);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};s0=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 wn(t,{...i,elementContext:"reference"}),a=r0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:n0(a)}}}case"escaped":{let o=await wn(t,{...i,altBoundary:!0}),a=r0(o,r.floating);return{data:{escapedOffsets:a,escaped:n0(a)}}}default:return{}}}}};l0=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:c,y:s}=Pt(e,t),l=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),d=zC(l),f=Jr(c0(l)),p=Gs(u);function h(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&s!=null)return d.find(g=>c>g.left-p.left&&c<g.right+p.right&&s>g.top-p.top&&s<g.bottom+p.bottom)||f;if(d.length>=2){if(Cr(r)==="y"){let R=d[0],k=d[d.length-1],D=Rt(r)==="top",P=R.top,I=k.bottom,B=D?R.left:k.left,F=D?R.right:k.right,q=F-B,L=I-P;return{top:P,bottom:I,left:B,right:F,width:q,height:L,x:B,y:P}}let g=Rt(r)==="left",_=De(...d.map(R=>R.right)),w=gt(...d.map(R=>R.left)),y=d.filter(R=>g?R.left===w:R.right===_),E=y[0].top,S=y[y.length-1].bottom,A=w,T=_,M=T-A,C=S-E;return{top:E,bottom:S,left:A,right:T,width:M,height:C,x:A,y:E}}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}}:{}}}};f0=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,c=await BC(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},d0=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}}},...c}=Pt(e,t),s={x:r,y:n},l=await wn(t,c),d=Cr(Rt(i)),f=Ws(d),p=s[f],h=s[d];if(o){let g=f==="y"?"top":"left",_=f==="y"?"bottom":"right",w=p+l[g],y=p-l[_];p=Us(w,p,y)}if(a){let g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=h+l[g],y=h-l[_];h=Us(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}}}}}},p0=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:c=!0,crossAxis:s=!0}=Pt(e,t),l={x:r,y:n},d=Cr(i),f=Ws(d),p=l[f],h=l[d],m=Pt(u,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){let y=f==="y"?"height":"width",E=o.reference[f]-o.floating[y]+g.mainAxis,S=o.reference[f]+o.reference[y]-g.mainAxis;p<E?p=E:p>S&&(p=S)}if(s){var _,w;let y=f==="y"?"width":"height",E=["top","left"].includes(Rt(i)),S=o.reference[d]-o.floating[y]+(E&&((_=a.offset)==null?void 0:_[d])||0)+(E?0:g.crossAxis),A=o.reference[d]+o.reference[y]+(E?0:((w=a.offset)==null?void 0:w[d])||0)-(E?g.crossAxis:0);h<S?h=S:h>A&&(h=A)}return{[f]:p,[d]:h}}}},h0=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:c=()=>{},...s}=Pt(e,t),l=await wn(t,s),d=Rt(i),f=Gt(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-l.top-l.bottom,y=h-l.left-l.right,E=gt(m-l[g],w),S=gt(h-l[_],y),A=!t.middlewareData.shift,T=E,M=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(M=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),A&&!f){let R=De(l.left,0),k=De(l.right,0),D=De(l.top,0),P=De(l.bottom,0);p?M=h-2*(R!==0||k!==0?R+k:De(l.left,l.right)):T=m-2*(D!==0||P!==0?D+P:De(l.top,l.bottom))}await c({...t,availableWidth:M,availableHeight:T});let C=await a.getDimensions(u.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}}});function g0(e){let t=bt(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=pi(r)!==o||pi(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function vh(e){return _e(e)?e:e.contextElement}function lo(e){let t=vh(e);if(!qe(t))return fr(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=g0(t),a=(o?pi(r.width):r.width)/n,u=(o?pi(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function _0(e){let t=rt(e);return!so()||!t.visualViewport?UC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WC(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rt(e)?!1:t}function hi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=vh(e),a=fr(1);t&&(n?_e(n)&&(a=lo(n)):a=lo(e));let u=WC(o,r,n)?_0(o):fr(0),c=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,l=i.width/a.x,d=i.height/a.y;if(o){let f=rt(o),p=n&&_e(n)?rt(n):n,h=f,m=Fs(h);for(;m&&n&&p!==h;){let g=lo(m),_=m.getBoundingClientRect(),w=bt(m),y=_.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,E=_.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,s*=g.y,l*=g.x,d*=g.y,c+=y,s+=E,h=rt(m),m=Fs(h)}}return Jr({width:l,height:d,x:c,y:s})}function bh(e,t){let r=Ba(e).scrollLeft;return t?t.left+r:hi(sr(e)).left+r}function y0(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:bh(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function HC(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=sr(n),u=t?za(t.floating):!1;if(n===a||u&&o)return r;let c={scrollLeft:0,scrollTop:0},s=fr(1),l=fr(0),d=qe(n);if((d||!d&&!o)&&((kr(n)!=="body"||uo(a))&&(c=Ba(n)),qe(n))){let p=hi(n);s=lo(n),l.x=p.x+n.clientLeft,l.y=p.y+n.clientTop}let f=a&&!d&&!o?y0(a,c,!0):fr(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-c.scrollLeft*s.x+l.x+f.x,y:r.y*s.y-c.scrollTop*s.y+l.y+f.y}}function VC(e){return Array.from(e.getClientRects())}function GC(e){let t=sr(e),r=Ba(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+bh(e),u=-r.scrollTop;return bt(n).direction==="rtl"&&(a+=De(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function $C(e,t){let r=rt(e),n=sr(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;let s=so();(!s||s&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u,y:c}}function KC(e,t){let r=hi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=qe(e)?lo(e):fr(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,s=n*o.y;return{width:a,height:u,x:c,y:s}}function v0(e,t,r){let n;if(t==="viewport")n=$C(e,r);else if(t==="document")n=GC(sr(e));else if(_e(t))n=KC(t,r);else{let i=_0(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Jr(n)}function w0(e,t){let r=ur(e);return r===t||!_e(r)||cr(r)?!1:bt(r).position==="fixed"||w0(r,t)}function YC(e,t){let r=t.get(e);if(r)return r;let n=Tt(e,[],!1).filter(u=>_e(u)&&kr(u)!=="body"),i=null,o=bt(e).position==="fixed",a=o?ur(e):e;for(;_e(a)&&!cr(a);){let u=bt(a),c=js(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||uo(a)&&!c&&w0(e,a))?n=n.filter(l=>l!==a):i=u,a=ur(a)}return t.set(e,n),n}function ZC(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?za(t)?[]:YC(t,this._c):[].concat(r),n],u=a[0],c=a.reduce((s,l)=>{let d=v0(t,l,i);return s.top=De(d.top,s.top),s.right=gt(d.right,s.right),s.bottom=gt(d.bottom,s.bottom),s.left=De(d.left,s.left),s},v0(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function JC(e){let{width:t,height:r}=g0(e);return{width:t,height:r}}function XC(e,t,r){let n=qe(t),i=sr(t),o=r==="fixed",a=hi(e,!0,o,t),u={scrollLeft:0,scrollTop:0},c=fr(0);if(n||!n&&!o)if((kr(t)!=="body"||uo(i))&&(u=Ba(t)),n){let f=hi(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else i&&(c.x=bh(i));let s=i&&!n&&!o?y0(i,u):fr(0),l=a.left+u.scrollLeft-c.x-s.x,d=a.top+u.scrollTop-c.y-s.y;return{x:l,y:d,width:a.width,height:a.height}}function mh(e){return bt(e).position==="static"}function b0(e,t){if(!qe(e)||bt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sr(e)===r&&(r=r.ownerDocument.body),r}function x0(e,t){let r=rt(e);if(za(e))return r;if(!qe(e)){let i=ur(e);for(;i&&!cr(i);){if(_e(i)&&!mh(i))return i;i=ur(i)}return r}let n=b0(e,t);for(;n&&Ly(n)&&mh(n);)n=b0(n,t);return n&&cr(n)&&mh(n)&&!js(n)?r:n||Ny(e)||r}function eq(e){return bt(e).direction==="rtl"}function S0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tq(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,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();let s=e.getBoundingClientRect(),{left:l,top:d,width:f,height:p}=s;if(u||t(),!f||!p)return;let h=yn(d),m=yn(i.clientWidth-(l+f)),g=yn(i.clientHeight-(d+p)),_=yn(l),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-_+"px",threshold:De(0,gt(1,c))||1},E=!0;function S(A){let T=A[0].intersectionRatio;if(T!==c){if(!E)return a();T?a(!1,T):n=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!S0(s,e.getBoundingClientRect())&&a(),E=!1}try{r=new IntersectionObserver(S,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,y)}r.observe(e)}return a(!0),o}function gh(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:c=!1}=n,s=vh(e),l=i||o?[...s?Tt(s):[],...Tt(t)]:[];l.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});let d=s&&u?tq(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&&!c&&p.observe(s),p.observe(t));let h,m=c?hi(e):null;c&&g();function g(){let _=hi(e);m&&!S0(m,_)&&r(),m=_,h=requestAnimationFrame(g)}return r(),()=>{var _;l.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d?.(),(_=p)==null||_.disconnect(),p=null,c&&cancelAnimationFrame(h)}}var UC,QC,Js,mi,O0,E0,A0,T0,P0,R0,_h,M0,k0,$a,yh=pt(()=>{m0();Va();Ua();Ua();UC=fr(0);QC=async function(e){let t=this.getOffsetParent||x0,r=this.getDimensions,n=await r(e.floating);return{reference:XC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};Js={convertOffsetParentRelativeRectToViewportRelativeRect:HC,getDocumentElement:sr,getClippingRect:ZC,getOffsetParent:x0,getElementRects:QC,getClientRects:VC,getDimensions:JC,getScale:lo,isElement:_e,isRTL:eq};mi=wn,O0=f0,E0=a0,A0=d0,T0=u0,P0=h0,R0=s0,_h=o0,M0=l0,k0=p0,$a=(e,t,r)=>{let n=new Map,i={platform:Js,...r},o={...i.platform,_c:n};return i0(e,t,{...i,platform:o})}});function Qs(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(!Qs(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)&&!Qs(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function I0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function C0(e,t){let r=I0(e);return Math.round(t*r)/r}function wh(e){let t=He.useRef(e);return Xs(()=>{t.current=e}),t}function j0(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:c,open:s}=e,[l,d]=He.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=He.useState(n);Qs(f,n)||p(n);let[h,m]=He.useState(null),[g,_]=He.useState(null),w=He.useCallback(L=>{L!==A.current&&(A.current=L,m(L))},[]),y=He.useCallback(L=>{L!==T.current&&(T.current=L,_(L))},[]),E=o||h,S=a||g,A=He.useRef(null),T=He.useRef(null),M=He.useRef(l),C=c!=null,R=wh(c),k=wh(i),D=wh(s),P=He.useCallback(()=>{if(!A.current||!T.current)return;let L={placement:t,strategy:r,middleware:f};k.current&&(L.platform=k.current),$a(A.current,T.current,L).then(j=>{let z={...j,isPositioned:D.current!==!1};I.current&&!Qs(M.current,z)&&(M.current=z,q0.flushSync(()=>{d(z)}))})},[f,t,r,k,D]);Xs(()=>{s===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[s]);let I=He.useRef(!1);Xs(()=>(I.current=!0,()=>{I.current=!1}),[]),Xs(()=>{if(E&&(A.current=E),S&&(T.current=S),E&&S){if(R.current)return R.current(E,S,P);P()}},[E,S,P,R,C]);let B=He.useMemo(()=>({reference:A,floating:T,setReference:w,setFloating:y}),[w,y]),F=He.useMemo(()=>({reference:E,floating:S}),[E,S]),q=He.useMemo(()=>{let L={position:r,left:0,top:0};if(!F.floating)return L;let j=C0(F.floating,l.x),z=C0(F.floating,l.y);return u?{...L,transform:"translate("+j+"px, "+z+"px)",...I0(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:j,top:z}},[r,u,F.floating,l.x,l.y]);return He.useMemo(()=>({...l,update:P,refs:B,elements:F,floatingStyles:q}),[l,P,B,F,q])}var He,ec,q0,Xs,rq,tc,F0,L0,N0,D0,z0,B0,U0,W0,xh=pt(()=>{yh();yh();He=V(Ye(),1),ec=V(Ye(),1),q0=V(Zs(),1),Xs=typeof document<"u"?ec.useLayoutEffect:ec.useEffect;rq=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?_h({element:n.current,padding:i}).fn(r):{}:n?_h({element:n,padding:i}).fn(r):{}}}},tc=(e,t)=>({...O0(e),options:[e,t]}),F0=(e,t)=>({...A0(e),options:[e,t]}),L0=(e,t)=>({...k0(e),options:[e,t]}),N0=(e,t)=>({...T0(e),options:[e,t]}),D0=(e,t)=>({...P0(e),options:[e,t]}),z0=(e,t)=>({...E0(e),options:[e,t]}),B0=(e,t)=>({...R0(e),options:[e,t]}),U0=(e,t)=>({...M0(e),options:[e,t]}),W0=(e,t)=>({...rq(e),options:[e,t]})});var Dw={};Xd(Dw,{Composite:()=>uq,CompositeItem:()=>sq,FloatingArrow:()=>dq,FloatingDelayGroup:()=>bq,FloatingFocusManager:()=>Pq,FloatingList:()=>_w,FloatingNode:()=>hq,FloatingOverlay:()=>Mq,FloatingPortal:()=>Eq,FloatingTree:()=>mq,arrow:()=>W0,autoPlacement:()=>z0,autoUpdate:()=>gh,computePosition:()=>$a,detectOverflow:()=>mi,flip:()=>N0,getOverflowAncestors:()=>Tt,hide:()=>B0,inline:()=>U0,inner:()=>$q,limitShift:()=>L0,offset:()=>tc,platform:()=>Js,safePolygon:()=>Zq,shift:()=>F0,size:()=>D0,useClick:()=>kq,useClientPoint:()=>qq,useDelayGroup:()=>gq,useDelayGroupContext:()=>Rw,useDismiss:()=>Fq,useFloating:()=>Lq,useFloatingNodeId:()=>pq,useFloatingParentNodeId:()=>wi,useFloatingPortalNode:()=>jw,useFloatingRootContext:()=>Lw,useFloatingTree:()=>xi,useFocus:()=>Nq,useHover:()=>vq,useId:()=>go,useInnerOffset:()=>Kq,useInteractions:()=>Dq,useListItem:()=>yw,useListNavigation:()=>Bq,useMergeRefs:()=>sc,useRole:()=>Wq,useTransitionStatus:()=>Nw,useTransitionStyles:()=>Vq,useTypeahead:()=>Gq});function sc(e){return O.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=O.useRef(()=>{});return iq(()=>{t.current=e}),O.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 rc(e,t,r){return Math.floor(e/t)!==r}function ho(e,t){return t<0||t>=e.current.length}function ac(e,t){return nt(e,{disabledIndices:t})}function Ph(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&&gi(a,u,i));return u}function hw(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:u,minIndex:c,maxIndex:s,prevIndex:l,stopEvent:d=!1}=t,f=l;if(r.key===vo){if(d&&Je(r),l===-1)f=s;else if(f=nt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:u}),i&&(l-a<c||f<0)){let p=l%a,h=s%a,m=s-(h-p);h===p?f=s:f=h>p?m:m-a}ho(e,f)&&(f=l)}if(r.key===Xr&&(d&&Je(r),l===-1?f=c:(f=nt(e,{startingIndex:l,amount:a,disabledIndices:u}),i&&l+a>s&&(f=nt(e,{startingIndex:l%a-a,amount:a,disabledIndices:u}))),ho(e,f)&&(f=l)),n==="both"){let p=yn(l/a);r.key===(o?dr:pr)&&(d&&Je(r),l%a!==a-1?(f=nt(e,{startingIndex:l,disabledIndices:u}),i&&rc(f,a,p)&&(f=nt(e,{startingIndex:l-l%a-1,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:l-l%a-1,disabledIndices:u})),rc(f,a,p)&&(f=l)),r.key===(o?pr:dr)&&(d&&Je(r),l%a!==0?(f=nt(e,{startingIndex:l,decrement:!0,disabledIndices:u}),i&&rc(f,a,p)&&(f=nt(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:u}))):i&&(f=nt(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:u})),rc(f,a,p)&&(f=l));let h=yn(s/a)===p;ho(e,f)&&(i&&h?f=r.key===(o?pr:dr)?s:nt(e,{startingIndex:l-l%a-1,disabledIndices:u}):f=l)}return f}function mw(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:u,height:c}=o;u>t;let s=!1;for(r&&(i=0);!s;){let l=[];for(let d=0;d<u;d++)for(let f=0;f<c;f++)l.push(i+d+f*t);i%t+u<=t&&l.every(d=>n[d]==null)?(l.forEach(d=>{n[d]=a}),s=!0):i++}}),[...n]}function vw(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 bw(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function gi(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 oq(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 aq(e,t){if(e.size!==t.size)return!1;for(let[r,n]of e.entries())if(n!==t.get(r))return!1;return!0}function _w(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=O.useState(()=>new Map),a=O.useCallback(c=>{o(s=>new Map(s).set(c,null))},[]),u=O.useCallback(c=>{o(s=>{let l=new Map(s);return l.delete(c),l})},[]);return pe(()=>{let c=new Map(i);Array.from(c.keys()).sort(oq).forEach((l,d)=>{c.set(l,d)}),aq(i,c)||o(c)},[i]),(0,Oe.jsx)(gw.Provider,{value:O.useMemo(()=>({register:a,unregister:u,map:i,elementsRef:r,labelsRef:n}),[a,u,i,r,n]),children:t})}function yw(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=O.useContext(gw),[u,c]=O.useState(null),s=O.useRef(null),l=O.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&&c(d)},[i]),O.useMemo(()=>({ref:l,index:u??-1}),[u,l])}function ww(e,t){return typeof e=="function"?e(t):e?O.cloneElement(e,t):(0,Oe.jsx)("div",{...t})}function lq(){let[e,t]=O.useState(()=>H0?V0():void 0);return pe(()=>{e==null&&t(V0())},[]),O.useEffect(()=>{H0=!0},[]),e}function Ew(){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 pq(e){let t=go(),r=xi(),n=wi(),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 hq(e){let{children:t,id:r}=e,n=wi();return(0,Oe.jsx)(Aw.Provider,{value:O.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function mq(e){let{children:t}=e,r=O.useRef([]),n=O.useCallback(a=>{r.current=[...r.current,a]},[]),i=O.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),o=O.useState(()=>Ew())[0];return(0,Oe.jsx)(Tw.Provider,{value:O.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function yi(e){return"data-floating-ui-"+e}function it(e){let t=(0,bo.useRef)(e);return pe(()=>{t.current=e}),t}function uc(e,t,r){return r&&!di(r)?0:typeof e=="number"?e:e?.[t]}function vq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:u=!0,delay:c=0,handleClose:s=null,mouseOnly:l=!1,restMs:d=0,move:f=!0}=t,p=xi(),h=wi(),m=it(s),g=it(c),_=it(r),w=O.useRef(),y=O.useRef(-1),E=O.useRef(),S=O.useRef(-1),A=O.useRef(!0),T=O.useRef(!1),M=O.useRef(()=>{}),C=O.useRef(!1),R=O.useCallback(()=>{var q;let L=(q=i.current.openEvent)==null?void 0:q.type;return L?.includes("mouse")&&L!=="mousedown"},[i]);O.useEffect(()=>{if(!u)return;function q(L){let{open:j}=L;j||(clearTimeout(y.current),clearTimeout(S.current),A.current=!0,C.current=!1)}return o.on("openchange",q),()=>{o.off("openchange",q)}},[u,o]),O.useEffect(()=>{if(!u||!m.current||!r)return;function q(j){R()&&n(!1,j,"hover")}let L=Ze(a.floating).documentElement;return L.addEventListener("mouseleave",q),()=>{L.removeEventListener("mouseleave",q)}},[a.floating,r,n,u,m,R]);let k=O.useCallback(function(q,L,j){L===void 0&&(L=!0),j===void 0&&(j="hover");let z=uc(g.current,"close",w.current);z&&!E.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>n(!1,q,j),z)):L&&(clearTimeout(y.current),n(!1,q,j))},[g,n]),D=Ie(()=>{M.current(),E.current=void 0}),P=Ie(()=>{if(T.current){let q=Ze(a.floating).body;q.style.pointerEvents="",q.removeAttribute(G0),T.current=!1}}),I=Ie(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);O.useEffect(()=>{if(!u)return;function q(H){if(clearTimeout(y.current),A.current=!1,l&&!di(w.current)||d>0&&!uc(g.current,"open"))return;let re=uc(g.current,"open",w.current);re?y.current=window.setTimeout(()=>{_.current||n(!0,H,"hover")},re):r||n(!0,H,"hover")}function L(H){if(I())return;M.current();let re=Ze(a.floating);if(clearTimeout(S.current),C.current=!1,m.current&&i.current.floatingContext){r||clearTimeout(y.current),E.current=m.current({...i.current.floatingContext,tree:p,x:H.clientX,y:H.clientY,onClose(){P(),D(),I()||k(H,!0,"safe-polygon")}});let Se=E.current;re.addEventListener("mousemove",Se),M.current=()=>{re.removeEventListener("mousemove",Se)};return}(w.current==="touch"?!Ne(a.floating,H.relatedTarget):!0)&&k(H)}function j(H){I()||i.current.floatingContext&&(m.current==null||m.current({...i.current.floatingContext,tree:p,x:H.clientX,y:H.clientY,onClose(){P(),D(),I()||k(H)}})(H))}if(_e(a.domReference)){var z;let H=a.domReference;return r&&H.addEventListener("mouseleave",j),(z=a.floating)==null||z.addEventListener("mouseleave",j),f&&H.addEventListener("mousemove",q,{once:!0}),H.addEventListener("mouseenter",q),H.addEventListener("mouseleave",L),()=>{var re;r&&H.removeEventListener("mouseleave",j),(re=a.floating)==null||re.removeEventListener("mouseleave",j),f&&H.removeEventListener("mousemove",q),H.removeEventListener("mouseenter",q),H.removeEventListener("mouseleave",L)}}},[a,u,e,l,d,f,k,D,P,n,r,_,p,g,m,i,I]),pe(()=>{var q;if(u&&r&&(q=m.current)!=null&&q.__options.blockPointerEvents&&R()){T.current=!0;let j=a.floating;if(_e(a.domReference)&&j){var L;let z=Ze(a.floating).body;z.setAttribute(G0,"");let H=a.domReference,re=p==null||(L=p.nodesRef.current.find(ne=>ne.id===h))==null||(L=L.context)==null?void 0:L.elements.floating;return re&&(re.style.pointerEvents=""),z.style.pointerEvents="none",H.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{z.style.pointerEvents="",H.style.pointerEvents="",j.style.pointerEvents=""}}}},[u,r,h,a,p,m,R]),pe(()=>{r||(w.current=void 0,C.current=!1,D(),P())},[r,D,P]),O.useEffect(()=>()=>{D(),clearTimeout(y.current),clearTimeout(S.current),P()},[u,a.domReference,D,P]);let B=O.useMemo(()=>{function q(L){w.current=L.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(L){let{nativeEvent:j}=L;function z(){!A.current&&!_.current&&n(!0,j,"hover")}l&&!di(w.current)||r||d===0||C.current&&L.movementX**2+L.movementY**2<2||(clearTimeout(S.current),w.current==="touch"?z():(C.current=!0,S.current=window.setTimeout(z,d)))}}},[l,n,r,_,d]),F=O.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(q){I()||k(q.nativeEvent,!1)}}),[k,I]);return O.useMemo(()=>u?{reference:B,floating:F}:{},[u,B,F])}function bq(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=O.useReducer((c,s)=>({...c,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=O.useRef(null),u=O.useCallback(c=>{o({currentId:c})},[]);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,Oe.jsx)(Pw.Provider,{value:O.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function gq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,c=Rw(),{currentId:s,setCurrentId:l,initialDelay:d,setState:f,timeoutMs:p}=c;return pe(()=>{a&&s&&(f({delay:{open:1,close:uc(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&&(l===Rh||!r||l(u))},[a,r,l,u]),c}function vi(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame($0);let o=()=>e?.focus({preventScroll:r});i?o():$0=requestAnimationFrame(o)}function K0(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 _i(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 _q(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),_i(e,o).forEach(c=>{i(c.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function xq(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=wq(t,e),u=new Set,c=new Set(a),s=[];ic[i]||(ic[i]=new WeakMap);let l=ic[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||c.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",_=fo.get(h)||0,w=o?_+1:_,y=(l.get(h)||0)+1;fo.set(h,w),l.set(h,y),s.push(h),w===1&&g&&nc.add(h),y===1&&h.setAttribute(i,""),!g&&o&&h.setAttribute(o,"true")}})}return Oh++,()=>{s.forEach(p=>{let h=fo.get(p)||0,m=o?h-1:h,g=(l.get(p)||0)-1;fo.set(p,m),l.set(p,g),m||(!nc.has(p)&&o&&p.removeAttribute(o),nc.delete(p)),g||p.removeAttribute(i)}),Oh--,Oh||(fo=new WeakMap,fo=new WeakMap,nc=new WeakSet,ic={})}}function Y0(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=Ze(e[0]).body;return xq(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}function kw(e,t){let r=Ga(e,lc());t==="prev"&&r.reverse();let n=r.indexOf(Vt(Ze(e)));return r.slice(n+1)[0]}function Cw(){return kw(document.body,"next")}function qw(){return kw(document.body,"prev")}function Ka(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ne(r,n)}function Sq(e){Ga(e,lc()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function Z0(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 J0(e){e.key==="Tab"&&(e.target,clearTimeout(Oq))}function jw(e){e===void 0&&(e={});let{id:t,root:r}=e,n=go(),i=Fw(),[o,a]=O.useState(null),u=O.useRef(null);return pe(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),pe(()=>{if(!n||u.current)return;let c=t?document.getElementById(t):null;if(!c)return;let s=document.createElement("div");s.id=n,s.setAttribute(X0,""),c.appendChild(s),u.current=s,a(s)},[t,n]),pe(()=>{if(r===null||!n||u.current)return;let c=r||i?.portalNode;c&&!_e(c)&&(c=c.current),c=c||document.body;let s=null;t&&(s=document.createElement("div"),s.id=t,c.appendChild(s));let l=document.createElement("div");l.id=n,l.setAttribute(X0,""),c=s||c,c.appendChild(l),u.current=l,a(l)},[t,r,n,i]),o}function Eq(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=jw({id:r,root:n}),[a,u]=O.useState(null),c=O.useRef(null),s=O.useRef(null),l=O.useRef(null),d=O.useRef(null),f=a?.modal,p=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return O.useEffect(()=>{if(!o||!i||f)return;function m(g){o&&Ka(g)&&(g.type==="focusin"?Z0:Sq)(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]),O.useEffect(()=>{o&&(p||Z0(o))},[p,o]),(0,Oe.jsxs)(Iw.Provider,{value:O.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:s,beforeInsideRef:l,afterInsideRef:d,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,Oe.jsx)(cc,{"data-type":"outside",ref:c,onFocus:m=>{if(Ka(m,o)){var g;(g=l.current)==null||g.focus()}else{let _=qw()||a?.domReference;_?.focus()}}}),h&&o&&(0,Oe.jsx)("span",{"aria-owns":o.id,style:fc}),o&&mo.createPortal(t,o),h&&o&&(0,Oe.jsx)(cc,{"data-type":"outside",ref:s,onFocus:m=>{if(Ka(m,o)){var g;(g=d.current)==null||g.focus()}else{let _=Cw()||a?.domReference;_?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}function kh(e){return e?e.hasAttribute(Mh)?e:e.querySelector("["+Mh+"]")||e:null}function Eh(e){bi=bi.filter(t=>t.isConnected),e&&kr(e)!=="body"&&(bi.push(e),bi.length>Q0&&(bi=bi.slice(-Q0)))}function ew(){return bi.slice().reverse().find(e=>e.isConnected)}function Aq(e){let t=lc();return Xy(e,t)?e:Ga(e,t)[0]||e}function Pq(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:u=!0,restoreFocus:c=!1,modal:s=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1}=e,{open:p,onOpenChange:h,events:m,dataRef:g,elements:{domReference:_,floating:w}}=t,y=Ie(()=>{var $;return($=g.current.floatingContext)==null?void 0:$.nodeId}),E=typeof a=="number"&&a<0,S=lh(_)&&E,A=yq(),T=A?o:!0,M=!T||A&&f,C=it(i),R=it(a),k=it(u),D=xi(),P=Fw(),I=O.useRef(null),B=O.useRef(null),F=O.useRef(!1),q=O.useRef(!1),L=O.useRef(-1),j=P!=null,z=kh(w),H=Ie(function($){return $===void 0&&($=z),$?Ga($,lc()):[]}),re=Ie($=>{let te=H($);return C.current.map(X=>_&&X==="reference"?_:z&&X==="floating"?z:te).filter(Boolean).flat()});O.useEffect(()=>{if(n||!s)return;function $(X){if(X.key==="Tab"){Ne(z,Vt(Ze(z)))&&H().length===0&&!S&&Je(X);let Q=re(),ge=lr(X);C.current[0]==="reference"&&ge===_&&(Je(X),X.shiftKey?vi(Q[Q.length-1]):vi(Q[1])),C.current[1]==="floating"&&ge===z&&X.shiftKey&&(Je(X),vi(Q[0]))}}let te=Ze(z);return te.addEventListener("keydown",$),()=>{te.removeEventListener("keydown",$)}},[n,_,z,s,C,S,H,re]),O.useEffect(()=>{if(n||!w)return;function $(te){let X=lr(te),ge=H().indexOf(X);ge!==-1&&(L.current=ge)}return w.addEventListener("focusin",$),()=>{w.removeEventListener("focusin",$)}},[n,w,H]),O.useEffect(()=>{if(n||!d)return;function $(){q.current=!0,setTimeout(()=>{q.current=!1})}function te(X){let Q=X.relatedTarget;queueMicrotask(()=>{let ge=y(),we=!(Ne(_,Q)||Ne(w,Q)||Ne(Q,w)||Ne(P?.portalNode,Q)||Q!=null&&Q.hasAttribute(yi("focus-guard"))||D&&(_i(D.nodesRef.current,ge).find(be=>{var Ue,Pe;return Ne((Ue=be.context)==null?void 0:Ue.elements.floating,Q)||Ne((Pe=be.context)==null?void 0:Pe.elements.domReference,Q)})||K0(D.nodesRef.current,ge).find(be=>{var Ue,Pe,ft;return[(Ue=be.context)==null?void 0:Ue.elements.floating,kh((Pe=be.context)==null?void 0:Pe.elements.floating)].includes(Q)||((ft=be.context)==null?void 0:ft.elements.domReference)===Q})));if(c&&we&&Vt(Ze(z))===Ze(z).body){qe(z)&&z.focus();let be=L.current,Ue=H(),Pe=Ue[be]||Ue[Ue.length-1]||z;qe(Pe)&&Pe.focus()}(S||!s)&&Q&&we&&!q.current&&Q!==ew()&&(F.current=!0,h(!1,X,"focus-out"))})}if(w&&qe(_))return _.addEventListener("focusout",te),_.addEventListener("pointerdown",$),w.addEventListener("focusout",te),()=>{_.removeEventListener("focusout",te),_.removeEventListener("pointerdown",$),w.removeEventListener("focusout",te)}},[n,_,w,z,s,D,P,h,d,c,H,S,y]);let ne=O.useRef(null),Se=O.useRef(null),le=sc([ne,P?.beforeInsideRef]),Te=sc([Se,P?.afterInsideRef]);O.useEffect(()=>{var $;if(n||!w)return;let te=Array.from((P==null||($=P.portalNode)==null?void 0:$.querySelectorAll("["+yi("portal")+"]"))||[]),X=D&&!s?K0(D?.nodesRef.current,y()).map(we=>{var be;return(be=we.context)==null?void 0:be.elements.floating}):[],Q=[w,...te,...X,I.current,B.current,ne.current,Se.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,C.current.includes("reference")||S?_:null].filter(we=>we!=null),ge=s||S?Y0(Q,!M,M):Y0(Q);return()=>{ge()}},[n,_,w,s,C,P,S,T,M,D,y]),pe(()=>{if(n||!qe(z))return;let $=Ze(z),te=Vt($);queueMicrotask(()=>{let X=re(z),Q=R.current,ge=(typeof Q=="number"?X[Q]:Q.current)||z,we=Ne(z,te);!E&&!we&&p&&vi(ge,{preventScroll:ge===z})})},[n,p,z,E,re,R]),pe(()=>{if(n||!z)return;let $=!1,te=Ze(z),X=Vt(te),ge=g.current.openEvent;Eh(X);function we(Pe){let{open:ft,reason:ee,event:fe,nested:Z}=Pe;ft&&(ge=fe),ee==="escape-key"&&_&&Eh(_),["hover","safe-polygon"].includes(ee)&&fe.type==="mouseleave"&&(F.current=!0),ee==="outside-press"&&(Z?(F.current=!1,$=!0):F.current=!(sh(fe)||Ds(fe)))}m.on("openchange",we);let be=te.createElement("span");be.setAttribute("tabindex","-1"),be.setAttribute("aria-hidden","true"),Object.assign(be.style,fc),j&&_&&_.insertAdjacentElement("afterend",be);function Ue(){return typeof k.current=="boolean"?ew()||be:k.current.current||be}return()=>{m.off("openchange",we);let Pe=Vt(te),ft=Ne(w,Pe)||D&&_i(D.nodesRef.current,y()).some(Z=>{var oe;return Ne((oe=Z.context)==null?void 0:oe.elements.floating,Pe)});(ft||ge&&["click","mousedown"].includes(ge.type))&&_&&Eh(_);let fe=Ue();queueMicrotask(()=>{let Z=Aq(fe);k.current&&!F.current&&qe(Z)&&(!(Z!==Pe&&Pe!==te.body)||ft)&&Z.focus({preventScroll:$}),be.remove()})}},[n,w,z,k,g,m,D,j,_,y]),O.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[n]),pe(()=>{if(!n&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:d,open:p,onOpenChange:h,domReference:_}),()=>{P.setFocusManagerState(null)}},[n,P,s,p,h,d,_]),pe(()=>{if(n||!z||typeof MutationObserver!="function"||E)return;let $=()=>{let X=z.getAttribute("tabindex"),Q=H(),ge=Vt(Ze(w)),we=Q.indexOf(ge);we!==-1&&(L.current=we),C.current.includes("floating")||ge!==_&&Q.length===0?X!=="0"&&z.setAttribute("tabindex","0"):X!=="-1"&&z.setAttribute("tabindex","-1")};$();let te=new MutationObserver($);return te.observe(z,{childList:!0,subtree:!0,attributes:!0}),()=>{te.disconnect()}},[n,w,z,_,C,H,E]);function Ee($){return n||!l||!s?null:(0,Oe.jsx)(Tq,{ref:$==="start"?I:B,onClick:te=>h(!1,te.nativeEvent),children:typeof l=="string"?l:"Dismiss"})}let ae=!n&&T&&(s?!S:!0)&&(j||s);return(0,Oe.jsxs)(Oe.Fragment,{children:[ae&&(0,Oe.jsx)(cc,{"data-type":"inside",ref:le,onFocus:$=>{if(s){let X=re();vi(i[0]==="reference"?X[0]:X[X.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(F.current=!1,Ka($,P.portalNode)){let X=Cw()||_;X?.focus()}else{var te;(te=P.beforeOutsideRef.current)==null||te.focus()}}}),!S&&Ee("start"),r,Ee("end"),ae&&(0,Oe.jsx)(cc,{"data-type":"inside",ref:Te,onFocus:$=>{if(s)vi(re()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(d&&(F.current=!0),Ka($,P.portalNode)){let X=qw()||_;X?.focus()}else{var te;(te=P.afterOutsideRef.current)==null||te.focus()}}})]})}function Rq(){let e=/iP(hone|ad|od)|iOS/.test(Ls()),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,c;let s=((u=window.visualViewport)==null?void 0:u.offsetLeft)||0,l=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(l))+"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 rw(e){return qe(e.target)&&e.target.tagName==="BUTTON"}function nw(e){return Bs(e)}function kq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:u="click",toggle:c=!0,ignoreMouse:s=!1,keyboardHandlers:l=!0,stickIfOpen:d=!0}=t,f=O.useRef(),p=O.useRef(!1),h=O.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){let g=f.current;m.button===0&&u!=="click"&&(di(g,!0)&&s||(r&&c&&(!(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}di(g,!0)&&s||(r&&c&&(!(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||!l||rw(m))&&(m.key===" "&&!nw(o)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&n(!(r&&c),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!l||rw(m)||nw(o)||m.key===" "&&p.current&&(p.current=!1,n(!(r&&c),m.nativeEvent,"click"))}}),[i,o,u,s,l,n,r,d,c]);return O.useMemo(()=>a?{reference:h}:{},[a,h])}function Cq(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",c=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((o=t.dataRef.current.openEvent)==null?void 0:o.type)||"")&&t.pointerType!=="touch",l=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&&c&&(n=a.y-t.y),f-=r||0,p-=n||0,l=0,d=0,!i||s?(l=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=u&&t.x!=null?t.x:f,p=c&&t.y!=null?t.y:p):i&&!s&&(d=t.axis==="x"?a.height:d,l=t.axis==="y"?a.width:l),i=!0,{width:l,height:d,x:f,y:p,top:p,right:f+l,bottom:p+d,left:f}}}}function iw(e){return e!=null&&e.clientX!=null}function qq(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:u=!0,axis:c="both",x:s=null,y:l=null}=t,d=O.useRef(!1),f=O.useRef(null),[p,h]=O.useState(),[m,g]=O.useState([]),_=Ie((A,T)=>{d.current||n.current.openEvent&&!iw(n.current.openEvent)||a.setPositionReference(Cq(o,{x:A,y:T,axis:c,dataRef:n,pointerType:p}))}),w=Ie(A=>{s!=null||l!=null||(r?f.current||g([]):_(A.clientX,A.clientY))}),y=di(p)?i:r,E=O.useCallback(()=>{if(!y||!u||s!=null||l!=null)return;let A=rt(i);function T(M){let C=lr(M);Ne(i,C)?(A.removeEventListener("mousemove",T),f.current=null):_(M.clientX,M.clientY)}if(!n.current.openEvent||iw(n.current.openEvent)){A.addEventListener("mousemove",T);let M=()=>{A.removeEventListener("mousemove",T),f.current=null};return f.current=M,M}a.setPositionReference(o)},[y,u,s,l,i,n,a,o,_]);O.useEffect(()=>E(),[E,m]),O.useEffect(()=>{u&&!i&&(d.current=!1)},[u,i]),O.useEffect(()=>{!u&&r&&(d.current=!0)},[u,r]),pe(()=>{u&&(s!=null||l!=null)&&(d.current=!1,_(s,l))},[u,s,l,_]);let S=O.useMemo(()=>{function A(T){let{pointerType:M}=T;h(M)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:w,onMouseEnter:w}},[w]);return O.useMemo(()=>u?{reference:S}:{},[u,S])}function Fq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:u=!0,outsidePress:c=!0,outsidePressEvent:s="pointerdown",referencePress:l=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,m=xi(),g=Ie(typeof c=="function"?c:()=>!1),_=typeof c=="function"?g:c,w=O.useRef(!1),y=O.useRef(!1),{escapeKey:E,outsidePress:S}=ow(p),{escapeKey:A,outsidePress:T}=ow(h),M=O.useRef(!1),C=Ie(B=>{var F;if(!r||!a||!u||B.key!=="Escape"||M.current)return;let q=(F=o.current.floatingContext)==null?void 0:F.nodeId,L=m?_i(m.nodesRef.current,q):[];if(!E&&(B.stopPropagation(),L.length>0)){let j=!0;if(L.forEach(z=>{var H;if((H=z.context)!=null&&H.open&&!z.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}n(!1,By(B)?B.nativeEvent:B,"escape-key")}),R=Ie(B=>{var F;let q=()=>{var L;C(B),(L=lr(B))==null||L.removeEventListener("keydown",q)};(F=lr(B))==null||F.addEventListener("keydown",q)}),k=Ie(B=>{var F;let q=w.current;w.current=!1;let L=y.current;if(y.current=!1,s==="click"&&L||q||typeof _=="function"&&!_(B))return;let j=lr(B),z="["+yi("inert")+"]",H=Ze(i.floating).querySelectorAll(z),re=_e(j)?j:null;for(;re&&!cr(re);){let Te=ur(re);if(cr(Te)||!_e(Te))break;re=Te}if(H.length&&_e(j)&&!Uy(j)&&!Ne(j,i.floating)&&Array.from(H).every(Te=>!Ne(re,Te)))return;if(qe(j)&&I){let Te=cr(j),Ee=bt(j),ae=/auto|scroll/,$=Te||ae.test(Ee.overflowX),te=Te||ae.test(Ee.overflowY),X=$&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,Q=te&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,ge=Ee.direction==="rtl",we=Q&&(ge?B.offsetX<=j.offsetWidth-j.clientWidth:B.offsetX>j.clientWidth),be=X&&B.offsetY>j.clientHeight;if(we||be)return}let ne=(F=o.current.floatingContext)==null?void 0:F.nodeId,Se=m&&_i(m.nodesRef.current,ne).some(Te=>{var Ee;return zs(B,(Ee=Te.context)==null?void 0:Ee.elements.floating)});if(zs(B,i.floating)||zs(B,i.domReference)||Se)return;let le=m?_i(m.nodesRef.current,ne):[];if(le.length>0){let Te=!0;if(le.forEach(Ee=>{var ae;if((ae=Ee.context)!=null&&ae.open&&!Ee.context.dataRef.current.__outsidePressBubbles){Te=!1;return}}),!Te)return}n(!1,B,"outside-press")}),D=Ie(B=>{var F;let q=()=>{var L;k(B),(L=lr(B))==null||L.removeEventListener(s,q)};(F=lr(B))==null||F.addEventListener(s,q)});O.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=E,o.current.__outsidePressBubbles=S;let B=-1;function F(H){n(!1,H,"ancestor-scroll")}function q(){window.clearTimeout(B),M.current=!0}function L(){B=window.setTimeout(()=>{M.current=!1},so()?5:0)}let j=Ze(i.floating);u&&(j.addEventListener("keydown",A?R:C,A),j.addEventListener("compositionstart",q),j.addEventListener("compositionend",L)),_&&j.addEventListener(s,T?D:k,T);let z=[];return f&&(_e(i.domReference)&&(z=Tt(i.domReference)),_e(i.floating)&&(z=z.concat(Tt(i.floating))),!_e(i.reference)&&i.reference&&i.reference.contextElement&&(z=z.concat(Tt(i.reference.contextElement)))),z=z.filter(H=>{var re;return H!==((re=j.defaultView)==null?void 0:re.visualViewport)}),z.forEach(H=>{H.addEventListener("scroll",F,{passive:!0})}),()=>{u&&(j.removeEventListener("keydown",A?R:C,A),j.removeEventListener("compositionstart",q),j.removeEventListener("compositionend",L)),_&&j.removeEventListener(s,T?D:k,T),z.forEach(H=>{H.removeEventListener("scroll",F)}),window.clearTimeout(B)}},[o,i,u,_,s,r,n,f,a,E,S,C,A,R,k,T,D]),O.useEffect(()=>{w.current=!1},[_,s]);let P=O.useMemo(()=>({onKeyDown:C,...l&&{[Iq[d]]:B=>{n(!1,B.nativeEvent,"reference-press")},...d!=="click"&&{onClick(B){n(!1,B.nativeEvent,"reference-press")}}}}),[C,n,l,d]),I=O.useMemo(()=>({onKeyDown:C,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[jq[s]]:()=>{w.current=!0}}),[C,s]);return O.useMemo(()=>a?{reference:P,floating:I}:{},[a,P,I])}function Lw(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=go(),o=O.useRef({}),[a]=O.useState(()=>Ew()),u=wi()!=null,[c,s]=O.useState(n.reference),l=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=O.useMemo(()=>({setPositionReference:s}),[]),f=O.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return O.useMemo(()=>({dataRef:o,open:t,onOpenChange:l,elements:f,events:a,floatingId:i,refs:d}),[t,l,f,a,i,d])}function Lq(e){e===void 0&&(e={});let{nodeId:t}=e,r=Lw({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=O.useState(null),[u,c]=O.useState(null),l=i?.domReference||o,d=O.useRef(null),f=xi();pe(()=>{l&&(d.current=l)},[l]);let p=j0({...e,elements:{...i,...u&&{reference:u}}}),h=O.useCallback(y=>{let E=_e(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;c(E),p.refs.setReference(E)},[p.refs]),m=O.useCallback(y=>{(_e(y)||y===null)&&(d.current=y,a(y)),(_e(p.refs.reference.current)||p.refs.reference.current===null||y!==null&&!_e(y))&&p.refs.setReference(y)},[p.refs]),g=O.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),_=O.useMemo(()=>({...p.elements,domReference:l}),[p.elements,l]),w=O.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(E=>E.id===t);y&&(y.context=w)}),O.useMemo(()=>({...p,context:w,refs:g,elements:_}),[p,g,_,w])}function Nq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:u=!0,visibleOnly:c=!0}=t,s=O.useRef(!1),l=O.useRef(),d=O.useRef(!0);O.useEffect(()=>{if(!u)return;let p=rt(a.domReference);function h(){!r&&qe(a.domReference)&&a.domReference===Vt(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]),O.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]),O.useEffect(()=>()=>{clearTimeout(l.current)},[]);let f=O.useMemo(()=>({onPointerDown(p){Ds(p.nativeEvent)||(d.current=!1)},onMouseLeave(){s.current=!1},onFocus(p){if(s.current)return;let h=lr(p.nativeEvent);if(c&&_e(h))try{if(ch()&&zy())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Bs(h))return}n(!0,p.nativeEvent,"focus")},onBlur(p){s.current=!1;let h=p.relatedTarget,m=p.nativeEvent,g=_e(h)&&h.hasAttribute(yi("focus-guard"))&&h.getAttribute("data-type")==="outside";l.current=window.setTimeout(()=>{var _;let w=Vt(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,c]);return O.useMemo(()=>u?{reference:f}:{},[u,f])}function Ah(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[aw]:a,[uw]:u,...c}=e;o=c}return{...r==="floating"&&{tabIndex:-1,[Mh]:""},...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(c=>{let[s,l]=c;if(!(i&&[aw,uw].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof l=="function"){var d;(d=n.get(s))==null||d.push(l),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]=l}),a),{})}}function Dq(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=O.useCallback(u=>Ah(u,e,"reference"),t),o=O.useCallback(u=>Ah(u,e,"floating"),r),a=O.useCallback(u=>Ah(u,e,"item"),n);return O.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function dc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function sw(e,t){return dc(t,e===vo||e===Xr,e===dr||e===pr)}function Th(e,t,r){return dc(t,e===Xr,r?e===dr:e===pr)||e==="Enter"||e===" "||e===""}function zq(e,t,r){return dc(t,r?e===dr:e===pr,e===Xr)}function cw(e,t,r){return dc(t,r?e===pr:e===dr,e===vo)}function Bq(e,t){let{open:r,onOpenChange:n,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:s=null,allowEscape:l=!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:E=1,scrollItemIntoView:S=!0,virtualItemRef:A,itemSizes:T,dense:M=!1}=t,C=kh(i.floating),R=it(C),k=wi(),D=xi(),P=Ie(()=>{u(F.current===-1?null:F.current)}),I=lh(i.domReference),B=O.useRef(m),F=O.useRef(s??-1),q=O.useRef(null),L=O.useRef(!0),j=O.useRef(P),z=O.useRef(!!i.floating),H=O.useRef(r),re=O.useRef(!1),ne=O.useRef(!1),Se=it(w),le=it(r),Te=it(S),Ee=it(s),[ae,$]=O.useState(),[te,X]=O.useState(),Q=Ie(()=>{function ee(oe){h?($(oe.id),D?.events.emit("virtualfocus",oe),A&&(A.current=oe)):vi(oe,{sync:re.current,preventScroll:!0})}let fe=o.current[F.current];fe&&ee(fe),(re.current?oe=>oe():requestAnimationFrame)(()=>{let oe=o.current[F.current]||fe;if(!oe)return;fe||ee(oe);let $e=Te.current;$e&&we&&(ne.current||!L.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof $e=="boolean"?{block:"nearest",inline:"nearest"}:$e))})});pe(()=>{c&&(r&&i.floating?B.current&&s!=null&&(ne.current=!0,F.current=s,P()):z.current&&(F.current=-1,j.current()))},[c,r,i.floating,s,P]),pe(()=>{if(c&&r&&i.floating)if(a==null){if(re.current=!1,Ee.current!=null)return;if(z.current&&(F.current=-1,Q()),(!H.current||!z.current)&&B.current&&(q.current!=null||B.current===!0&&q.current==null)){let ee=0,fe=()=>{o.current[0]==null?(ee<2&&(ee?requestAnimationFrame:queueMicrotask)(fe),ee++):(F.current=q.current==null||Th(q.current,y,p)||f?ac(o,Se.current):Ph(o,Se.current),q.current=null,P())};fe()}}else ho(o,a)||(F.current=a,Q(),ne.current=!1)},[c,r,i.floating,a,Ee,f,o,y,p,P,Q,Se]),pe(()=>{var ee;if(!c||i.floating||!D||h||!z.current)return;let fe=D.nodesRef.current,Z=(ee=fe.find(We=>We.id===k))==null||(ee=ee.context)==null?void 0:ee.elements.floating,oe=Vt(Ze(i.floating)),$e=fe.some(We=>We.context&&Ne(We.context.elements.floating,oe));Z&&!$e&&L.current&&Z.focus({preventScroll:!0})},[c,i.floating,D,k,h]),pe(()=>{if(!c||!D||!h||k)return;function ee(fe){X(fe.id),A&&(A.current=fe)}return D.events.on("virtualfocus",ee),()=>{D.events.off("virtualfocus",ee)}},[c,D,h,k,A]),pe(()=>{j.current=P,H.current=r,z.current=!!i.floating}),pe(()=>{r||(q.current=null)},[r]);let ge=a!=null,we=O.useMemo(()=>{function ee(Z){if(!r)return;let oe=o.current.indexOf(Z);oe!==-1&&F.current!==oe&&(F.current=oe,P())}return{onFocus(Z){let{currentTarget:oe}=Z;re.current=!0,ee(oe)},onClick:Z=>{let{currentTarget:oe}=Z;return oe.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:oe}=Z;re.current=!0,ne.current=!1,ee(oe)},onPointerLeave(Z){let{pointerType:oe}=Z;if(!(!L.current||oe==="touch")&&(re.current=!0,F.current=-1,P(),!h)){var $e;($e=R.current)==null||$e.focus({preventScroll:!0})}}}}},[r,R,g,o,P,h]),be=Ie(ee=>{if(L.current=!1,re.current=!0,ee.which===229||!le.current&&ee.currentTarget===R.current)return;if(f&&cw(ee.key,y,p)){Je(ee),n(!1,ee.nativeEvent,"list-navigation"),qe(i.domReference)&&(h?D?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let fe=F.current,Z=ac(o,w),oe=Ph(o,w);if(I||(ee.key==="Home"&&(Je(ee),F.current=Z,P()),ee.key==="End"&&(Je(ee),F.current=oe,P())),E>1){let $e=T||Array.from({length:o.current.length},()=>({width:1,height:1})),We=mw($e,E,M),jt=We.findIndex(Ft=>Ft!=null&&!gi(o.current,Ft,w)),Qt=We.reduce((Ft,er,cn)=>er!=null&&!gi(o.current,er,w)?cn:Ft,-1),wr=We[hw({current:We.map(Ft=>Ft!=null?o.current[Ft]:null)},{event:ee,orientation:y,loop:d,rtl:p,cols:E,disabledIndices:bw([...w||o.current.map((Ft,er)=>gi(o.current,er)?er:void 0),void 0],We),minIndex:jt,maxIndex:Qt,prevIndex:vw(F.current>oe?Z:F.current,$e,We,E,ee.key===Xr?"bl":ee.key===(p?dr:pr)?"tr":"tl"),stopEvent:!0})];if(wr!=null&&(F.current=wr,P()),y==="both")return}if(sw(ee.key,y)){if(Je(ee),r&&!h&&Vt(ee.currentTarget.ownerDocument)===ee.currentTarget){F.current=Th(ee.key,y,p)?Z:oe,P();return}Th(ee.key,y,p)?d?F.current=fe>=oe?l&&fe!==o.current.length?-1:Z:nt(o,{startingIndex:fe,disabledIndices:w}):F.current=Math.min(oe,nt(o,{startingIndex:fe,disabledIndices:w})):d?F.current=fe<=Z?l&&fe!==-1?o.current.length:oe:nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w}):F.current=Math.max(Z,nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w})),ho(o,F.current)&&(F.current=-1),P()}}),Ue=O.useMemo(()=>h&&r&&ge&&{"aria-activedescendant":te||ae},[h,r,ge,te,ae]),Pe=O.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...I?{}:Ue,onKeyDown:be,onPointerMove(){L.current=!0}}),[Ue,be,y,I]),ft=O.useMemo(()=>{function ee(Z){m==="auto"&&sh(Z.nativeEvent)&&(B.current=!0)}function fe(Z){B.current=m,m==="auto"&&Ds(Z.nativeEvent)&&(B.current=!0)}return{...Ue,onKeyDown(Z){L.current=!1;let oe=Z.key.startsWith("Arrow"),$e=["Home","End"].includes(Z.key),We=oe||$e,jt=zq(Z.key,y,p),Qt=cw(Z.key,y,p),wr=sw(Z.key,y),Ft=(f?jt:wr)||Z.key==="Enter"||Z.key.trim()==="";if(h&&r){let ti=D?.nodesRef.current.find(St=>St.parentId==null),Lt=D&&ti?_q(D.nodesRef.current,ti.id):null;if(We&&Lt&&A){let St=new KeyboardEvent("keydown",{key:Z.key,bubbles:!0});if(jt||Qt){var er,cn;let ln=((er=Lt.context)==null?void 0:er.elements.domReference)===Z.currentTarget,Wi=Qt&&!ln?(cn=Lt.context)==null?void 0:cn.elements.domReference:jt?o.current.find(Hi=>Hi?.id===ae):null;Wi&&(Je(Z),Wi.dispatchEvent(St),X(void 0))}if((wr||$e)&&Lt.context&&Lt.context.open&&Lt.parentId&&Z.currentTarget!==Lt.context.elements.domReference){var da;Je(Z),(da=Lt.context.elements.domReference)==null||da.dispatchEvent(St);return}}return be(Z)}if(!(!r&&!_&&oe)){if(Ft&&(q.current=f&&wr?null:Z.key),f){jt&&(Je(Z),r?(F.current=ac(o,Se.current),P()):n(!0,Z.nativeEvent,"list-navigation"));return}wr&&(s!=null&&(F.current=s),Je(Z),!r&&_?n(!0,Z.nativeEvent,"list-navigation"):be(Z),r&&P())}},onFocus(){r&&!h&&(F.current=-1,P())},onPointerDown:fe,onPointerEnter:fe,onMouseDown:ee,onClick:ee}},[ae,Ue,be,Se,m,o,f,P,n,r,_,y,p,s,D,h,A]);return O.useMemo(()=>c?{reference:ft,floating:Pe,item:we}:{},[c,ft,Pe,we])}function Wq(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,u=(r=Uq.get(a))!=null?r:a,c=go(),l=wi()!=null,d=O.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:c},...u==="menu"&&l&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[u,i,l,n,c,a]),f=O.useMemo(()=>{let h={id:i,...u&&{role:u}};return u==="tooltip"||a==="label"?h:{...h,...u==="menu"&&{"aria-labelledby":c}}},[u,i,c,a]),p=O.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 O.useMemo(()=>o?{reference:d,floating:f,item:p}:{},[o,d,f,p])}function po(e,t){return typeof e=="function"?e(t):e}function Hq(e,t){let[r,n]=O.useState(e);return e&&!r&&n(!0),O.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function Nw(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,c]=O.useState("unmounted"),s=Hq(r,a);return!s&&u==="close"&&c("unmounted"),pe(()=>{if(n){if(r){c("initial");let l=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(l)}}c("close")}},[r,n]),{isMounted:s,status:u}}function Vq(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,u=e.placement,c=u.split("-")[0],s=O.useMemo(()=>({side:c,placement:u}),[c,u]),l=typeof a=="number",d=(l?a:a.open)||0,f=(l?a:a.close)||0,[p,h]=O.useState(()=>({...po(o,s),...po(r,s)})),{isMounted:m,status:g}=Nw(e,{duration:a}),_=it(r),w=it(n),y=it(i),E=it(o);return pe(()=>{let S=po(_.current,s),A=po(y.current,s),T=po(E.current,s),M=po(w.current,s)||Object.keys(S).reduce((C,R)=>(C[R]="",C),{});if(g==="initial"&&h(C=>({transitionProperty:C.transitionProperty,...T,...S})),g==="open"&&h({transitionProperty:Object.keys(M).map(lw).join(","),transitionDuration:d+"ms",...T,...M}),g==="close"){let C=A||S;h({transitionProperty:Object.keys(C).map(lw).join(","),transitionDuration:f+"ms",...T,...C})}},[f,y,_,w,E,d,g,s]),{isMounted:m,styles:p}}function Gq(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:u,onTypingChange:c,enabled:s=!0,findMatch:l=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=O.useRef(),m=O.useRef(""),g=O.useRef((r=p??a)!=null?r:-1),_=O.useRef(null),w=Ie(u),y=Ie(c),E=it(l),S=it(f);pe(()=>{n&&(clearTimeout(h.current),_.current=null,m.current="")},[n]),pe(()=>{if(n&&m.current===""){var R;g.current=(R=p??a)!=null?R:-1}},[n,p,a]);let A=Ie(R=>{R?i.current.typing||(i.current.typing=R,y(R)):i.current.typing&&(i.current.typing=R,y(R))}),T=Ie(R=>{function k(F,q,L){let j=E.current?E.current(q,L):q.find(z=>z?.toLocaleLowerCase().indexOf(L.toLocaleLowerCase())===0);return j?F.indexOf(j):-1}let D=o.current;if(m.current.length>0&&m.current[0]!==" "&&(k(D,D,m.current)===-1?A(!1):R.key===" "&&Je(R)),D==null||S.current.includes(R.key)||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;n&&R.key!==" "&&(Je(R),A(!0)),D.every(F=>{var q,L;return F?((q=F[0])==null?void 0:q.toLocaleLowerCase())!==((L=F[1])==null?void 0:L.toLocaleLowerCase()):!0})&&m.current===R.key&&(m.current="",g.current=_.current),m.current+=R.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",g.current=_.current,A(!1)},d);let I=g.current,B=k(D,[...D.slice((I||0)+1),...D.slice(0,(I||0)+1)],m.current);B!==-1?(w(B),_.current=B):R.key!==" "&&(m.current="",A(!1))}),M=O.useMemo(()=>({onKeyDown:T}),[T]),C=O.useMemo(()=>({onKeyDown:T,onKeyUp(R){R.key===" "&&A(!1)}}),[T,A]);return O.useMemo(()=>s?{reference:M,floating:C}:{},[s,M,C])}function fw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function Kq(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,c=Ie(u),s=O.useRef(!1),l=O.useRef(null),d=O.useRef(null);O.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,E=g<0?-1:1,S=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&g>0||!w&&g<0?(m.preventDefault(),mo.flushSync(()=>{c(A=>A+Math[S](g,y*E))})):/firefox/i.test(Ns())&&(h.scrollTop+=g))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{l.current=h.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{l.current=null,d.current=null,h.removeEventListener("wheel",p)}},[i,r,n.floating,o,a,c]);let f=O.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(l.current!==null){let h=p.scrollTop-l.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&mo.flushSync(()=>c(m=>m+h))}requestAnimationFrame(()=>{l.current=p.scrollTop})}}}),[n.floating,c,o,a]);return O.useMemo(()=>i?{floating:f}:{},[i,f])}function dw(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,u=o-1;a<o;u=a++){let[c,s]=t[a]||[0,0],[l,d]=t[u]||[0,0];s>=n!=d>=n&&r<=(l-c)*(n-s)/(d-s)+c&&(i=!i)}return i}function Yq(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Zq(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i,o=!1,a=null,u=null,c=performance.now();function s(d,f){let p=performance.now(),h=p-c;if(a===null||u===null||h===0)return a=d,u=f,c=p,null;let m=d-a,g=f-u,w=Math.sqrt(m*m+g*g)/h;return a=d,u=f,c=p,w}let l=d=>{let{x:f,y:p,placement:h,elements:m,onClose:g,nodeId:_,tree:w}=d;return function(E){function S(){clearTimeout(i),g()}if(clearTimeout(i),!m.domReference||!m.floating||h==null||f==null||p==null)return;let{clientX:A,clientY:T}=E,M=[A,T],C=lr(E),R=E.type==="mouseleave",k=Ne(m.floating,C),D=Ne(m.domReference,C),P=m.domReference.getBoundingClientRect(),I=m.floating.getBoundingClientRect(),B=h.split("-")[0],F=f>I.right-I.width/2,q=p>I.bottom-I.height/2,L=Yq(M,P),j=I.width>P.width,z=I.height>P.height,H=(j?P:I).left,re=(j?P:I).right,ne=(z?P:I).top,Se=(z?P:I).bottom;if(k&&(o=!0,!R))return;if(D&&(o=!1),D&&!R){o=!0;return}if(R&&_e(E.relatedTarget)&&Ne(m.floating,E.relatedTarget)||w&&_i(w.nodesRef.current,_).some(Ee=>{let{context:ae}=Ee;return ae?.open}))return;if(B==="top"&&p>=P.bottom-1||B==="bottom"&&p<=P.top+1||B==="left"&&f>=P.right-1||B==="right"&&f<=P.left+1)return S();let le=[];switch(B){case"top":le=[[H,P.top+1],[H,I.bottom-1],[re,I.bottom-1],[re,P.top+1]];break;case"bottom":le=[[H,I.top+1],[H,P.bottom-1],[re,P.bottom-1],[re,I.top+1]];break;case"left":le=[[I.right-1,Se],[I.right-1,ne],[P.left+1,ne],[P.left+1,Se]];break;case"right":le=[[P.right-1,Se],[P.right-1,ne],[I.left+1,ne],[I.left+1,Se]];break}function Te(Ee){let[ae,$]=Ee;switch(B){case"top":{let te=[j?ae+t/2:F?ae+t*4:ae-t*4,$+t+1],X=[j?ae-t/2:F?ae+t*4:ae-t*4,$+t+1],Q=[[I.left,F||j?I.bottom-t:I.top],[I.right,F?j?I.bottom-t:I.top:I.bottom-t]];return[te,X,...Q]}case"bottom":{let te=[j?ae+t/2:F?ae+t*4:ae-t*4,$-t],X=[j?ae-t/2:F?ae+t*4:ae-t*4,$-t],Q=[[I.left,F||j?I.top+t:I.bottom],[I.right,F?j?I.top+t:I.bottom:I.top+t]];return[te,X,...Q]}case"left":{let te=[ae+t+1,z?$+t/2:q?$+t*4:$-t*4],X=[ae+t+1,z?$-t/2:q?$+t*4:$-t*4];return[...[[q||z?I.right-t:I.left,I.top],[q?z?I.right-t:I.left:I.right-t,I.bottom]],te,X]}case"right":{let te=[ae-t,z?$+t/2:q?$+t*4:$-t*4],X=[ae-t,z?$-t/2:q?$+t*4:$-t*4],Q=[[q||z?I.left+t:I.right,I.top],[q?z?I.left+t:I.right:I.left+t,I.bottom]];return[te,X,...Q]}}}if(!dw([A,T],le)){if(o&&!L)return S();if(!R&&n){let Ee=s(E.clientX,E.clientY);if(Ee!==null&&Ee<.1)return S()}dw([A,T],Te([f,p]))?!o&&n&&(i=window.setTimeout(S,40)):S()}}};return l.__options={blockPointerEvents:r},l}var O,bo,Oe,mo,pw,nq,iq,vo,Xr,dr,pr,pe,gw,xw,Sw,Ow,Sh,uq,sq,H0,cq,V0,fq,go,dq,Aw,Tw,wi,xi,G0,Rh,Pw,Rw,$0,fo,nc,ic,Oh,yq,Mw,wq,lc,fc,Oq,cc,Iw,X0,Fw,Mh,Q0,bi,Tq,oc,tw,Mq,Iq,jq,ow,aw,uw,Uq,lw,$q,zw=pt(()=>{O=V(Ye()),bo=V(Ye());Wy();Va();Oe=V(Da());Ua();Qy();mo=V(Zs());xh();xh();pw={...O},nq=pw.useInsertionEffect,iq=nq||(e=>e());vo="ArrowUp",Xr="ArrowDown",dr="ArrowLeft",pr="ArrowRight";pe=typeof document<"u"?bo.useLayoutEffect:bo.useEffect;gw=O.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});xw=O.createContext({activeIndex:0,onNavigate:()=>{}}),Sw=[dr,pr],Ow=[vo,Xr],Sh=[...Sw,...Ow],uq=O.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:u=1,disabledIndices:c,activeIndex:s,onNavigate:l,itemSizes:d,dense:f=!1,...p}=t,[h,m]=O.useState(0),g=s??h,_=Ie(l??m),w=O.useRef([]),y=n&&typeof n!="function"?n.props:{},E=O.useMemo(()=>({activeIndex:g,onNavigate:_}),[g,_]),S=u>1;function A(M){if(!Sh.includes(M.key))return;let C=g,R=ac(w,c),k=Ph(w,c),D=a?dr:pr,P=a?pr:dr;if(S){let L=d||Array.from({length:w.current.length},()=>({width:1,height:1})),j=mw(L,u,f),z=j.findIndex(ne=>ne!=null&&!gi(w.current,ne,c)),H=j.reduce((ne,Se,le)=>Se!=null&&!gi(w.current,Se,c)?le:ne,-1),re=j[hw({current:j.map(ne=>ne?w.current[ne]:null)},{event:M,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:bw([...c||w.current.map((ne,Se)=>gi(w.current,Se)?Se:void 0),void 0],j),minIndex:z,maxIndex:H,prevIndex:vw(g>k?R:g,L,j,u,M.key===Xr?"bl":M.key===D?"tr":"tl")})];re!=null&&(C=re)}let I={horizontal:[D],vertical:[Xr],both:[D,Xr]}[i],B={horizontal:[P],vertical:[vo],both:[P,vo]}[i],F=S?Sh:{horizontal:Sw,vertical:Ow,both:Sh}[i];if(C===g&&[...I,...B].includes(M.key)&&(o&&C===k&&I.includes(M.key)?C=R:o&&C===R&&B.includes(M.key)?C=k:C=nt(w,{startingIndex:C,decrement:B.includes(M.key),disabledIndices:c})),C!==g&&!ho(w,C)){var q;M.stopPropagation(),F.includes(M.key)&&M.preventDefault(),_(C),(q=w.current[C])==null||q.focus()}}let T={...p,...y,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(M){p.onKeyDown==null||p.onKeyDown(M),y.onKeyDown==null||y.onKeyDown(M),A(M)}};return(0,Oe.jsx)(xw.Provider,{value:E,children:(0,Oe.jsx)(_w,{elementsRef:w,children:ww(n,T)})})}),sq=O.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=O.useContext(xw),{ref:c,index:s}=yw(),l=sc([c,r,o.ref]),d=a===s,f={...i,...o,ref:l,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 ww(n,f)}),H0=!1,cq=0,V0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+cq++;fq=pw.useId,go=fq||lq,dq=O.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:u=14,height:c=7,tipRadius:s=0,strokeWidth:l=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...m}={},...g}=t,_=go(),[w,y]=O.useState(!1);if(pe(()=>{if(!i)return;bt(i).direction==="rtl"&&y(!0)},[i]),!i)return null;let[E,S]=n.split("-"),A=E==="top"||E==="bottom",T=d;(A&&a!=null&&a.x||!A&&a!=null&&a.y)&&(T=null);let M=l*2,C=M/2,R=u/2*(s/-8+1),k=c/2*s/4,D=!!p,P=T&&S==="end"?"bottom":"top",I=T&&S==="end"?"right":"left";T&&w&&(I=S==="end"?"left":"right");let B=o?.x!=null?T||o.x:"",F=o?.y!=null?T||o.y:"",q=p||"M0,0"+(" H"+u)+(" L"+(u-R)+","+(c-k))+(" Q"+u/2+","+c+" "+R+","+(c-k))+" Z",L={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[E];return(0,Oe.jsxs)("svg",{...g,"aria-hidden":!0,ref:r,width:D?u:u+M,height:u,viewBox:"0 0 "+u+" "+(c>u?c:u),style:{position:"absolute",pointerEvents:"none",[I]:B,[P]:F,[E]:A||D?"100%":"calc(100% - "+M/2+"px)",transform:[L,h].filter(j=>!!j).join(" "),...m},children:[M>0&&(0,Oe.jsx)("path",{clipPath:"url(#"+_+")",fill:"none",stroke:f,strokeWidth:M+(p?0:1),d:q}),(0,Oe.jsx)("path",{stroke:M&&!p?g.fill:"none",d:q}),(0,Oe.jsx)("clipPath",{id:_,children:(0,Oe.jsx)("rect",{x:-C,y:C*(D?-1:1),width:u+M,height:u})})]})});Aw=O.createContext(null),Tw=O.createContext(null),wi=()=>{var e;return((e=O.useContext(Aw))==null?void 0:e.id)||null},xi=()=>O.useContext(Tw);G0=yi("safe-polygon");Rh=()=>{},Pw=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Rh,setState:Rh,isInstantPhase:!1}),Rw=()=>O.useContext(Pw);$0=0;fo=new WeakMap,nc=new WeakSet,ic={},Oh=0,yq=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Mw=e=>e&&(e.host||Mw(e.parentNode)),wq=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=Mw(r);return e.contains(n)?n:null}).filter(r=>r!=null);lc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});fc={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};cc=O.forwardRef(function(t,r){let[n,i]=O.useState();pe(()=>(ch()&&i("button"),document.addEventListener("keydown",J0),()=>{document.removeEventListener("keydown",J0)}),[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[yi("focus-guard")]:"",style:fc};return(0,Oe.jsx)("span",{...t,...o})}),Iw=O.createContext(null),X0=yi("portal");Fw=()=>O.useContext(Iw),Mh="data-floating-ui-focusable";Q0=20,bi=[];Tq=O.forwardRef(function(t,r){return(0,Oe.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:fc})});oc=0;tw=()=>{},Mq=O.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return pe(()=>{if(n)return oc++,oc===1&&(tw=Rq()),()=>{oc--,oc===0&&tw()}},[n]),(0,Oe.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});Iq={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},jq={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ow=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}};aw="active",uw="selected";Uq=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);lw=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());$q=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:c=0,scrollRef:s,...l}=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 tc(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-o).fn(t)},E=await mi(fw(y,h.scrollHeight+m+f.clientTop),l),S=await mi(y,{...l,elementContext:"reference"}),A=De(0,E.top),T=y.y+A,R=(h.scrollHeight>h.clientHeight?k=>k:pi)(De(0,h.scrollHeight+(g&&w||_?m*2:0)-A-De(0,E.bottom)));if(h.style.maxHeight=R+"px",h.scrollTop=A,i){let k=h.offsetHeight<p.offsetHeight*gt(u,r.current.length)-1||S.top>=-c||S.bottom>=-c;mo.flushSync(()=>i(k))}return n&&(n.current=await mi(fw({...y,y:T},h.offsetHeight+m+f.clientTop),l)),{y:T}}})});var pc=b((UJ,Bw)=>{Bw.exports=JBrowseExports["@mui/material"]});var Ya=b((WJ,Uw)=>{Uw.exports=JBrowseExports["tss-react/mui"]});var Hw=b(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});qh.default=eI;var Ww=Da(),hc=(zw(),Bb(Dw)),Ch=pc(),Jq=Ya();function Xq(e){return Math.round(e*1e5)/1e5}var Qq=(0,Jq.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Ch.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:`${Xq(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function eI({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Ch.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=Qq(),{refs:c,floatingStyles:s,context:l}=(0,hc.useFloating)({placement:r,strategy:"fixed",middleware:[(0,hc.offset)(5)]}),d=(0,hc.useClientPoint)(l,e),{getFloatingProps:f}=(0,hc.useInteractions)([d]);return(0,Ww.jsx)(Ch.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,Ww.jsx)("div",{className:u.tooltip,ref:c.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...f(),children:t})})}});var a1=b((VJ,o1)=>{"use strict";var{entries:e1,setPrototypeOf:Vw,isFrozen:tI,getPrototypeOf:rI,getOwnPropertyDescriptor:nI}=Object,{freeze:yt,seal:$t,create:t1}=Object,{apply:Dh,construct:zh}=typeof Reflect<"u"&&Reflect;yt||(yt=function(t){return t});$t||($t=function(t){return t});Dh||(Dh=function(t,r,n){return t.apply(r,n)});zh||(zh=function(t,r){return new t(...r)});var mc=wt(Array.prototype.forEach),iI=wt(Array.prototype.lastIndexOf),Gw=wt(Array.prototype.pop),Za=wt(Array.prototype.push),oI=wt(Array.prototype.splice),bc=wt(String.prototype.toLowerCase),Ih=wt(String.prototype.toString),$w=wt(String.prototype.match),Ja=wt(String.prototype.replace),aI=wt(String.prototype.indexOf),uI=wt(String.prototype.trim),hr=wt(Object.prototype.hasOwnProperty),_t=wt(RegExp.prototype.test),Xa=sI(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 Dh(e,t,n)}}function sI(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zh(e,r)}}function ue(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bc;Vw&&Vw(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let o=r(i);o!==i&&(tI(t)||(t[n]=o),i=o)}e[i]=!0}return e}function cI(e){for(let t=0;t<e.length;t++)hr(e,t)||(e[t]=null);return e}function Si(e){let t=t1(null);for(let[r,n]of e1(e))hr(e,r)&&(Array.isArray(n)?t[r]=cI(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Si(n):t[r]=n);return t}function Qa(e,t){for(;e!==null;){let n=nI(e,t);if(n){if(n.get)return wt(n.get);if(typeof n.value=="function")return wt(n.value)}e=rI(e)}function r(){return null}return r}var Kw=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"]),jh=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"]),Fh=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"]),lI=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"]),Lh=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"]),fI=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yw=yt(["#text"]),Zw=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"]),Nh=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"]),Jw=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"]),vc=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dI=$t(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pI=$t(/<%[\w\W]*|[\w\W]*%>/gm),hI=$t(/\$\{[\w\W]*/gm),mI=$t(/^data-[\-\w.\u00B7-\uFFFF]+$/),vI=$t(/^aria-[\-\w]+$/),r1=$t(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bI=$t(/^(?:\w+script|data):/i),gI=$t(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),n1=$t(/^html$/i),_I=$t(/^[a-z][.\w]*(-[.\w]+)+$/i),Xw=Object.freeze({__proto__:null,ARIA_ATTR:vI,ATTR_WHITESPACE:gI,CUSTOM_ELEMENT:_I,DATA_ATTR:mI,DOCTYPE_NAME:n1,ERB_EXPR:pI,IS_ALLOWED_URI:r1,IS_SCRIPT_OR_DATA:bI,MUSTACHE_EXPR:dI,TMPLIT_EXPR:hI}),eu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},yI=function(){return typeof window>"u"?null:window},wI=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}},Qw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function i1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yI(),t=J=>i1(J);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==eu.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,n=r,i=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:u,Element:c,NodeFilter:s,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,h=c.prototype,m=Qa(h,"cloneNode"),g=Qa(h,"remove"),_=Qa(h,"nextSibling"),w=Qa(h,"childNodes"),y=Qa(h,"parentNode");if(typeof a=="function"){let J=r.createElement("template");J.content&&J.content.ownerDocument&&(r=J.content.ownerDocument)}let E,S="",{implementation:A,createNodeIterator:T,createDocumentFragment:M,getElementsByTagName:C}=r,{importNode:R}=n,k=Qw();t.isSupported=typeof e1=="function"&&typeof y=="function"&&A&&A.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:D,ERB_EXPR:P,TMPLIT_EXPR:I,DATA_ATTR:B,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:j}=Xw,{IS_ALLOWED_URI:z}=Xw,H=null,re=ue({},[...Kw,...jh,...Fh,...Lh,...Yw]),ne=null,Se=ue({},[...Zw,...Nh,...Jw,...vc]),le=Object.seal(t1(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,Ee=null,ae=!0,$=!0,te=!1,X=!0,Q=!1,ge=!0,we=!1,be=!1,Ue=!1,Pe=!1,ft=!1,ee=!1,fe=!0,Z=!1,oe="user-content-",$e=!0,We=!1,jt={},Qt=null,wr=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"]),Ft=null,er=ue({},["audio","video","img","source","image","track"]),cn=null,da=ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ti="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",St="http://www.w3.org/1999/xhtml",ln=St,Wi=!1,Hi=null,kR=ue({},[ti,Lt,St],Ih),Qu=ue({},["mi","mo","mn","ms","mtext"]),es=ue({},["annotation-xml"]),CR=ue({},["title","style","font","a","script"]),pa=null,qR=["application/xhtml+xml","text/html"],IR="text/html",Ke=null,Vi=null,jR=r.createElement("form"),Pb=function(x){return x instanceof RegExp||x instanceof Function},Zd=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Vi&&Vi===x)){if((!x||typeof x!="object")&&(x={}),x=Si(x),pa=qR.indexOf(x.PARSER_MEDIA_TYPE)===-1?IR:x.PARSER_MEDIA_TYPE,Ke=pa==="application/xhtml+xml"?Ih:bc,H=hr(x,"ALLOWED_TAGS")?ue({},x.ALLOWED_TAGS,Ke):re,ne=hr(x,"ALLOWED_ATTR")?ue({},x.ALLOWED_ATTR,Ke):Se,Hi=hr(x,"ALLOWED_NAMESPACES")?ue({},x.ALLOWED_NAMESPACES,Ih):kR,cn=hr(x,"ADD_URI_SAFE_ATTR")?ue(Si(da),x.ADD_URI_SAFE_ATTR,Ke):da,Ft=hr(x,"ADD_DATA_URI_TAGS")?ue(Si(er),x.ADD_DATA_URI_TAGS,Ke):er,Qt=hr(x,"FORBID_CONTENTS")?ue({},x.FORBID_CONTENTS,Ke):wr,Te=hr(x,"FORBID_TAGS")?ue({},x.FORBID_TAGS,Ke):{},Ee=hr(x,"FORBID_ATTR")?ue({},x.FORBID_ATTR,Ke):{},jt=hr(x,"USE_PROFILES")?x.USE_PROFILES:!1,ae=x.ALLOW_ARIA_ATTR!==!1,$=x.ALLOW_DATA_ATTR!==!1,te=x.ALLOW_UNKNOWN_PROTOCOLS||!1,X=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=x.SAFE_FOR_TEMPLATES||!1,ge=x.SAFE_FOR_XML!==!1,we=x.WHOLE_DOCUMENT||!1,Pe=x.RETURN_DOM||!1,ft=x.RETURN_DOM_FRAGMENT||!1,ee=x.RETURN_TRUSTED_TYPE||!1,Ue=x.FORCE_BODY||!1,fe=x.SANITIZE_DOM!==!1,Z=x.SANITIZE_NAMED_PROPS||!1,$e=x.KEEP_CONTENT!==!1,We=x.IN_PLACE||!1,z=x.ALLOWED_URI_REGEXP||r1,ln=x.NAMESPACE||St,Qu=x.MATHML_TEXT_INTEGRATION_POINTS||Qu,es=x.HTML_INTEGRATION_POINTS||es,le=x.CUSTOM_ELEMENT_HANDLING||{},x.CUSTOM_ELEMENT_HANDLING&&Pb(x.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=x.CUSTOM_ELEMENT_HANDLING.tagNameCheck),x.CUSTOM_ELEMENT_HANDLING&&Pb(x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&($=!1),ft&&(Pe=!0),jt&&(H=ue({},Yw),ne=[],jt.html===!0&&(ue(H,Kw),ue(ne,Zw)),jt.svg===!0&&(ue(H,jh),ue(ne,Nh),ue(ne,vc)),jt.svgFilters===!0&&(ue(H,Fh),ue(ne,Nh),ue(ne,vc)),jt.mathMl===!0&&(ue(H,Lh),ue(ne,Jw),ue(ne,vc))),x.ADD_TAGS&&(H===re&&(H=Si(H)),ue(H,x.ADD_TAGS,Ke)),x.ADD_ATTR&&(ne===Se&&(ne=Si(ne)),ue(ne,x.ADD_ATTR,Ke)),x.ADD_URI_SAFE_ATTR&&ue(cn,x.ADD_URI_SAFE_ATTR,Ke),x.FORBID_CONTENTS&&(Qt===wr&&(Qt=Si(Qt)),ue(Qt,x.FORBID_CONTENTS,Ke)),$e&&(H["#text"]=!0),we&&ue(H,["html","head","body"]),H.table&&(ue(H,["tbody"]),delete Te.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=x.TRUSTED_TYPES_POLICY,S=E.createHTML("")}else E===void 0&&(E=wI(p,i)),E!==null&&typeof S=="string"&&(S=E.createHTML(""));yt&&yt(x),Vi=x}},Rb=ue({},[...jh,...Fh,...lI]),Mb=ue({},[...Lh,...fI]),FR=function(x){let W=y(x);(!W||!W.tagName)&&(W={namespaceURI:ln,tagName:"template"});let K=bc(x.tagName),Re=bc(W.tagName);return Hi[x.namespaceURI]?x.namespaceURI===Lt?W.namespaceURI===St?K==="svg":W.namespaceURI===ti?K==="svg"&&(Re==="annotation-xml"||Qu[Re]):!!Rb[K]:x.namespaceURI===ti?W.namespaceURI===St?K==="math":W.namespaceURI===Lt?K==="math"&&es[Re]:!!Mb[K]:x.namespaceURI===St?W.namespaceURI===Lt&&!es[Re]||W.namespaceURI===ti&&!Qu[Re]?!1:!Mb[K]&&(CR[K]||!Rb[K]):!!(pa==="application/xhtml+xml"&&Hi[x.namespaceURI]):!1},xr=function(x){Za(t.removed,{element:x});try{y(x).removeChild(x)}catch{g(x)}},ts=function(x,W){try{Za(t.removed,{attribute:W.getAttributeNode(x),from:W})}catch{Za(t.removed,{attribute:null,from:W})}if(W.removeAttribute(x),x==="is")if(Pe||ft)try{xr(W)}catch{}else try{W.setAttribute(x,"")}catch{}},kb=function(x){let W=null,K=null;if(Ue)x="<remove></remove>"+x;else{let Qe=$w(x,/^[\r\n\t ]+/);K=Qe&&Qe[0]}pa==="application/xhtml+xml"&&ln===St&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");let Re=E?E.createHTML(x):x;if(ln===St)try{W=new f().parseFromString(Re,pa)}catch{}if(!W||!W.documentElement){W=A.createDocument(ln,"template",null);try{W.documentElement.innerHTML=Wi?S:Re}catch{}}let st=W.body||W.documentElement;return x&&K&&st.insertBefore(r.createTextNode(K),st.childNodes[0]||null),ln===St?C.call(W,we?"html":"body")[0]:we?W.documentElement:st},Cb=function(x){return T.call(x.ownerDocument||x,x,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},Jd=function(x){return x instanceof d&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof l)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},qb=function(x){return typeof u=="function"&&x instanceof u};function Hr(J,x,W){mc(J,K=>{K.call(t,x,W,Vi)})}let Ib=function(x){let W=null;if(Hr(k.beforeSanitizeElements,x,null),Jd(x))return xr(x),!0;let K=Ke(x.nodeName);if(Hr(k.uponSanitizeElement,x,{tagName:K,allowedTags:H}),x.hasChildNodes()&&!qb(x.firstElementChild)&&_t(/<[/\w]/g,x.innerHTML)&&_t(/<[/\w]/g,x.textContent)||x.nodeType===eu.progressingInstruction||ge&&x.nodeType===eu.comment&&_t(/<[/\w]/g,x.data))return xr(x),!0;if(!H[K]||Te[K]){if(!Te[K]&&Fb(K)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,K)||le.tagNameCheck instanceof Function&&le.tagNameCheck(K)))return!1;if($e&&!Qt[K]){let Re=y(x)||x.parentNode,st=w(x)||x.childNodes;if(st&&Re){let Qe=st.length;for(let Ot=Qe-1;Ot>=0;--Ot){let Sr=m(st[Ot],!0);Sr.__removalCount=(x.__removalCount||0)+1,Re.insertBefore(Sr,_(x))}}}return xr(x),!0}return x instanceof c&&!FR(x)||(K==="noscript"||K==="noembed"||K==="noframes")&&_t(/<\/no(script|embed|frames)/i,x.innerHTML)?(xr(x),!0):(Q&&x.nodeType===eu.text&&(W=x.textContent,mc([D,P,I],Re=>{W=Ja(W,Re," ")}),x.textContent!==W&&(Za(t.removed,{element:x.cloneNode()}),x.textContent=W)),Hr(k.afterSanitizeElements,x,null),!1)},jb=function(x,W,K){if(fe&&(W==="id"||W==="name")&&(K in r||K in jR))return!1;if(!($&&!Ee[W]&&_t(B,W))){if(!(ae&&_t(F,W))){if(!ne[W]||Ee[W]){if(!(Fb(x)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,x)||le.tagNameCheck instanceof Function&&le.tagNameCheck(x))&&(le.attributeNameCheck instanceof RegExp&&_t(le.attributeNameCheck,W)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(W))||W==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,K)||le.tagNameCheck instanceof Function&&le.tagNameCheck(K))))return!1}else if(!cn[W]){if(!_t(z,Ja(K,L,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&x!=="script"&&aI(K,"data:")===0&&Ft[x])){if(!(te&&!_t(q,Ja(K,L,"")))){if(K)return!1}}}}}}return!0},Fb=function(x){return x!=="annotation-xml"&&$w(x,j)},Lb=function(x){Hr(k.beforeSanitizeAttributes,x,null);let{attributes:W}=x;if(!W||Jd(x))return;let K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0},Re=W.length;for(;Re--;){let st=W[Re],{name:Qe,namespaceURI:Ot,value:Sr}=st,ha=Ke(Qe),dt=Qe==="value"?Sr:uI(Sr);if(K.attrName=ha,K.attrValue=dt,K.keepAttr=!0,K.forceKeepAttr=void 0,Hr(k.uponSanitizeAttribute,x,K),dt=K.attrValue,Z&&(ha==="id"||ha==="name")&&(ts(Qe,x),dt=oe+dt),ge&&_t(/((--!?|])>)|<\/(style|title)/i,dt)){ts(Qe,x);continue}if(K.forceKeepAttr||(ts(Qe,x),!K.keepAttr))continue;if(!X&&_t(/\/>/i,dt)){ts(Qe,x);continue}Q&&mc([D,P,I],Db=>{dt=Ja(dt,Db," ")});let Nb=Ke(x.nodeName);if(jb(Nb,ha,dt)){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ot)switch(p.getAttributeType(Nb,ha)){case"TrustedHTML":{dt=E.createHTML(dt);break}case"TrustedScriptURL":{dt=E.createScriptURL(dt);break}}try{Ot?x.setAttributeNS(Ot,Qe,dt):x.setAttribute(Qe,dt),Jd(x)?xr(x):Gw(t.removed)}catch{}}}Hr(k.afterSanitizeAttributes,x,null)},LR=function J(x){let W=null,K=Cb(x);for(Hr(k.beforeSanitizeShadowDOM,x,null);W=K.nextNode();)Hr(k.uponSanitizeShadowNode,W,null),Ib(W),Lb(W),W.content instanceof o&&J(W.content);Hr(k.afterSanitizeShadowDOM,x,null)};return t.sanitize=function(J){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,K=null,Re=null,st=null;if(Wi=!J,Wi&&(J="<!-->"),typeof J!="string"&&!qb(J))if(typeof J.toString=="function"){if(J=J.toString(),typeof J!="string")throw Xa("dirty is not a string, aborting")}else throw Xa("toString is not a function");if(!t.isSupported)return J;if(be||Zd(x),t.removed=[],typeof J=="string"&&(We=!1),We){if(J.nodeName){let Sr=Ke(J.nodeName);if(!H[Sr]||Te[Sr])throw Xa("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof u)W=kb("<!---->"),K=W.ownerDocument.importNode(J,!0),K.nodeType===eu.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?W=K:W.appendChild(K);else{if(!Pe&&!Q&&!we&&J.indexOf("<")===-1)return E&&ee?E.createHTML(J):J;if(W=kb(J),!W)return Pe?null:ee?S:""}W&&Ue&&xr(W.firstChild);let Qe=Cb(We?J:W);for(;Re=Qe.nextNode();)Ib(Re),Lb(Re),Re.content instanceof o&&LR(Re.content);if(We)return J;if(Pe){if(ft)for(st=M.call(W.ownerDocument);W.firstChild;)st.appendChild(W.firstChild);else st=W;return(ne.shadowroot||ne.shadowrootmode)&&(st=R.call(n,st,!0)),st}let Ot=we?W.outerHTML:W.innerHTML;return we&&H["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&_t(n1,W.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
|
|
2
|
+
`+Ot),Q&&mc([D,P,I],Sr=>{Ot=Ja(Ot,Sr," ")}),E&&ee?E.createHTML(Ot):Ot},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zd(J),be=!0},t.clearConfig=function(){Vi=null,be=!1},t.isValidAttribute=function(J,x,W){Vi||Zd({});let K=Ke(J),Re=Ke(x);return jb(K,Re,W)},t.addHook=function(J,x){typeof x=="function"&&Za(k[J],x)},t.removeHook=function(J,x){if(x!==void 0){let W=iI(k[J],x);return W===-1?void 0:oI(k[J],W,1)[0]}return Gw(k[J])},t.removeHooks=function(J){k[J]=[]},t.removeAllHooks=function(){k=Qw()},t}var xI=i1();o1.exports=xI});var s1=b((GJ,u1)=>{"use strict";var SI=/["'&<>]/;u1.exports=OI;function OI(e){var t=""+e,r=SI.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=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";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 c1=b(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.default=EI;var Bh=Ye();function EI(){let e=(0,Bh.useRef)(null),[t,r]=(0,Bh.useState)({width:void 0,height:void 0});return(0,Bh.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 f1=b((KJ,l1)=>{l1.exports=JBrowseExports["react-dom/client"]});var $h=b(Oi=>{Object.defineProperty(Oi,"__esModule",{value:!0});var AI={grad:.9,turn:360,rad:360/(2*Math.PI)},Qr=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},Kt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},_1=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},d1=function(e){return{r:Kt(e.r,0,255),g:Kt(e.g,0,255),b:Kt(e.b,0,255),a:Kt(e.a)}},Wh=function(e){return{r:Xe(e.r),g:Xe(e.g),b:Xe(e.b),a:Xe(e.a,3)}},TI=/^#([0-9a-f]{3,8})$/i,gc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},y1=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}},w1=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),c=n*(1-(1-t+o)*r),s=o%6;return{r:255*[n,u,a,a,c,n][s],g:255*[c,n,n,u,a,a][s],b:255*[a,a,c,n,n,u][s],a:i}},p1=function(e){return{h:_1(e.h),s:Kt(e.s,0,100),l:Kt(e.l,0,100),a:Kt(e.a)}},h1=function(e){return{h:Xe(e.h),s:Xe(e.s),l:Xe(e.l),a:Xe(e.a,3)}},m1=function(e){return w1((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},tu=function(e){return{h:(t=y1(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},PI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,RI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,MI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gh={string:[[function(e){var t=TI.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=MI.exec(e)||kI.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:d1({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=PI.exec(e)||RI.exec(e);if(!t)return null;var r,n,i=p1({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(AI[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return m1(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 Qr(t)&&Qr(r)&&Qr(n)?d1({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(!Qr(t)||!Qr(r)||!Qr(n))return null;var a=p1({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return m1(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Qr(t)||!Qr(r)||!Qr(n))return null;var a=function(u){return{h:_1(u.h),s:Kt(u.s,0,100),v:Kt(u.v,0,100),a:Kt(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return w1(a)},"hsv"]]},v1=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]},x1=function(e){return typeof e=="string"?v1(e.trim(),Gh.string):typeof e=="object"&&e!==null?v1(e,Gh.object):[null,void 0]},Hh=function(e,t){var r=tu(e);return{h:r.h,s:Kt(r.s+100*t,0,100),l:r.l,a:r.a}},Vh=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},b1=function(e,t){var r=tu(e);return{h:r.h,s:r.s,l:Kt(r.l+100*t,0,100),a:r.a}},ru=function(){function e(t){this.parsed=x1(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(Vh(this.rgba),2)},e.prototype.isDark=function(){return Vh(this.rgba)<.5},e.prototype.isLight=function(){return Vh(this.rgba)>=.5},e.prototype.toHex=function(){return t=Wh(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?gc(Xe(255*o)):"","#"+gc(r)+gc(n)+gc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Wh(this.rgba)},e.prototype.toRgbString=function(){return t=Wh(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 h1(tu(this.rgba))},e.prototype.toHslString=function(){return t=h1(tu(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=y1(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(Hh(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),qr(Hh(this.rgba,-t))},e.prototype.grayscale=function(){return qr(Hh(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),qr(b1(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),qr(b1(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=tu(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 ru?e:new ru(e)},g1=[];Oi.Colord=ru,Oi.colord=qr,Oi.extend=function(e){e.forEach(function(t){g1.indexOf(t)<0&&(t(ru,Gh),g1.push(t))})},Oi.getFormat=function(e){return x1(e)[1]},Oi.random=function(){return new ru({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var E1=b((ZJ,O1)=>{var Ir=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Kh=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Yh=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},Zh=96.422,Jh=100,Xh=82.521,CI=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:Yh(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:Yh(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:Yh(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)}},qI=function(e){var t=Kh(e.r),r=Kh(e.g),n=Kh(e.b);return function(i){return{x:Ir(i.x,0,Zh),y:Ir(i.y,0,Jh),z:Ir(i.z,0,Xh),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}))},nu=216/24389,_o=24389/27,S1=function(e){var t=qI(e),r=t.x/Zh,n=t.y/Jh,i=t.z/Xh;return r=r>nu?Math.cbrt(r):(_o*r+16)/116,{l:116*(n=n>nu?Math.cbrt(n):(_o*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>nu?Math.cbrt(i):(_o*i+16)/116)),alpha:t.a}},II=function(e,t,r){var n,i=S1(e),o=S1(t);return function(a){var u=(a.l+16)/116,c=a.a/500+u,s=u-a.b/200;return CI({x:(Math.pow(c,3)>nu?Math.pow(c,3):(116*c-16)/_o)*Zh,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/_o)*Jh,z:(Math.pow(s,3)>nu?Math.pow(s,3):(116*s-16)/_o)*Xh,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)})};O1.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=II(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 T1=b((JJ,A1)=>{A1.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,c,s=n[this.toHex()];if(s)return s;if(a?.closest){var l=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=l,c=o[h],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));m<d&&(d=m,f=h)}return f}},t.string.push([function(a){var u=a.toLowerCase(),c=u==="transparent"?"#0000":r[u];return c?new e(c).toRgb():null},"name"])}});var M1=b(xn=>{"use strict";var P1=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xn,"__esModule",{value:!0});xn.colord=xn.Colord=void 0;var jI=$h(),FI=P1(E1()),LI=P1(T1());(0,jI.extend)([FI.default,LI.default]);var R1=$h();Object.defineProperty(xn,"Colord",{enumerable:!0,get:function(){return R1.Colord}});Object.defineProperty(xn,"colord",{enumerable:!0,get:function(){return R1.colord}})});var Qh=b(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.createStopToken=DI;iu.stopStopToken=zI;iu.checkStopToken=BI;function NI(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function DI(){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 BI(e){if(typeof jest>"u"&&e!==void 0&&NI()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var C1=b(k1=>{"use strict";Object.defineProperty(k1,"__esModule",{value:!0})});var Sn=b((tX,ou)=>{function UI(e){return e&&e.__esModule?e:{default:e}}ou.exports=UI,ou.exports.__esModule=!0,ou.exports.default=ou.exports});var tm=b((rX,en)=>{function em(e){"@babel/helpers - typeof";return en.exports=em=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},en.exports.__esModule=!0,en.exports.default=en.exports,em(e)}en.exports=em,en.exports.__esModule=!0,en.exports.default=en.exports});var I1=b((nX,au)=>{var q1=tm().default;function WI(e,t){if(q1(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(q1(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}au.exports=WI,au.exports.__esModule=!0,au.exports.default=au.exports});var rm=b((iX,uu)=>{var HI=tm().default,VI=I1();function GI(e){var t=VI(e,"string");return HI(t)=="symbol"?t:t+""}uu.exports=GI,uu.exports.__esModule=!0,uu.exports.default=uu.exports});var j1=b((oX,su)=>{var $I=rm();function KI(e,t,r){return(t=$I(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}su.exports=KI,su.exports.__esModule=!0,su.exports.default=su.exports});var Ei=b((aX,cu)=>{function YI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}cu.exports=YI,cu.exports.__esModule=!0,cu.exports.default=cu.exports});var Ai=b((uX,lu)=>{var ZI=rm();function F1(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,ZI(n.key),n)}}function JI(e,t,r){return t&&F1(e.prototype,t),r&&F1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}lu.exports=JI,lu.exports.__esModule=!0,lu.exports.default=lu.exports});var nm=b((sX,fu)=>{function XI(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}fu.exports=XI,fu.exports.__esModule=!0,fu.exports.default=fu.exports});var L1=b((cX,du)=>{var QI=nm();function e2(e){if(Array.isArray(e))return QI(e)}du.exports=e2,du.exports.__esModule=!0,du.exports.default=du.exports});var N1=b((lX,pu)=>{function t2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}pu.exports=t2,pu.exports.__esModule=!0,pu.exports.default=pu.exports});var z1=b((fX,hu)=>{var D1=nm();function r2(e,t){if(e){if(typeof e=="string")return D1(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)?D1(e,t):void 0}}hu.exports=r2,hu.exports.__esModule=!0,hu.exports.default=hu.exports});var B1=b((dX,mu)=>{function n2(){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.`)}mu.exports=n2,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var U1=b((pX,vu)=>{var i2=L1(),o2=N1(),a2=z1(),u2=B1();function s2(e){return i2(e)||o2(e)||a2(e)||u2()}vu.exports=s2,vu.exports.__esModule=!0,vu.exports.default=vu.exports});var W1=b(jr=>{"use strict";var c2=Sn(),l2=c2(U1()),f2={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=f2[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,l2.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 G1=b((mX,V1)=>{"use strict";var H1=Sn(),d2=H1(Ei()),p2=H1(Ai()),h2=W1(),m2=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,d2.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,p2.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return h2[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(c,s){o[i[s]]=c}),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(c,s){c&&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}();V1.exports=m2});var Z1=b((vX,Y1)=>{"use strict";var K1=Sn(),v2=K1(Ei()),b2=K1(Ai()),g2=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,$1=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,_2=/\\\\/,y2=/^\s*$/,w2=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],x2=["[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]+)"],S2=["binaryOp","unaryOp","openParen","openBracket","question","colon"],O2=function(){function e(t){(0,v2.default)(this,e),this._grammar=t}return(0,b2.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(g2))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($1))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($1)&&(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("("+[w2.join("|"),n.join("|"),x2.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?S2.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(y2)}},{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(_2,"\\")}}]),e}();Y1.exports=O2});var im=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 X1=b(J1=>{"use strict";var Mt=im();J1.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 tx=b((_X,ex)=>{"use strict";var Q1=Sn(),E2=Q1(Ei()),A2=Q1(Ai()),T2=im(),_c=X1().states,P2=function(){function e(t,r,n){(0,E2.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,A2.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=_c[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=T2[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&&!_c[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(){_c[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=_c[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();ex.exports=P2});var ix=b((yX,nx)=>{"use strict";var rx=Sn(),R2=rx(Ei()),M2=rx(Ai()),On=function(){function e(t){(0,R2.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,M2.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}();On.all=function(e){return new On(function(t){var r=e.map(function(n){for(;n instanceof On;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};On.resolve=function(e){return new On(function(t){return t(e)})};On.reject=function(e){return new On(function(t,r){return r(e)})};nx.exports=On});var ux=b((wX,ax)=>{"use strict";var ox=Sn(),k2=ox(Ei()),C2=ox(Ai()),q2=G1(),I2=Z1(),j2=tx(),F2=ix(),L2=function(){function e(t,r){(0,k2.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,C2.default)(e,[{key:"compile",value:function(){var r=new I2(this._grammar),n=new j2(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,F2);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 q2(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();ax.exports=L2});var cx=b(sx=>{"use strict";sx.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 fx=b((SX,am)=>{"use strict";var om=Sn(),N2=om(j1()),D2=om(Ei()),z2=om(Ai()),B2=ux(),U2=cx(),W2=U2.getGrammar,lx=function(){function e(){(0,D2.default)(this,e),this.expr=this.expr.bind(this),this._grammar=W2()}return(0,z2.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,N2.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 B2(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,c,s){var l=s<i.length?i[s]:"";return u+=c+l,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}();am.exports=new lx;am.exports.Jexl=lx});var dx=b(bu=>{"use strict";var H2=bu&&bu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bu,"__esModule",{value:!0});bu.default=G2;var V2=H2(fx());function G2(){let e=new V2.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 sm=b(gu=>{"use strict";var $2=gu&&gu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gu,"__esModule",{value:!0});gu.stringToJexlExpression=Y2;var K2=$2(dx()),um={};function Y2(e,t){let r=`nosig|${e}`;if(!um[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,K2.default)().compile(i);um[r]=o}return um[r]}});var px=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 Z2=e=>crypto.getRandomValues(new Uint8Array(e));kt.random=Z2;var J2=(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),c=i;for(;c--;)if(a+=e[u[c]&n]||"",a.length===o)return a}}};kt.customRandom=J2;var X2=(e,t=21)=>(0,kt.customRandom)(e,t,kt.random);kt.customAlphabet=X2;var Q2=(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=Q2});var cm=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(),ej=px();je.ElementId=ve.types.optional(ve.types.identifier,()=>(0,ej.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 bx=b(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.default=sj;var ke=vt(),tj=yo(),rj=sm(),nj=cm();function ij(){return!0}var oj={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,ij),integer:ke.types.integer,number:ke.types.number,string:ke.types.string,text:ke.types.string,fileLocation:nj.FileLocation,frozen:ke.types.frozen()},hx={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},lm=e=>({views:{get valueJSON(){return e.value}}}),mx=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),vx={fileLocation:mx,number:lm,integer:lm,boolean:lm,frozen:mx,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)}}})},aj=ke.types.refinement("JexlString",ke.types.string,e=>e.startsWith("jexl:"));function uj(e){return e?.toJSON?e.toJSON():`"${e}"`}function sj(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=oj[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(aj,r),i)}).volatile(()=>({contextVariable:o})).views(l=>({get isCallback(){return String(l.value).startsWith("jexl:")}})).views(l=>({get expr(){if(l.isCallback){let{pluginManager:d}=(0,tj.getEnv)(l);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,rj.stringToJexlExpression)(String(l.value),d?.jexl)}return{evalSync:()=>l.value}},get valueJSON(){if(!l.isCallback)return uj(l.value)}})).preProcessSnapshot(l=>typeof l=="object"&&l.name===e?l:{name:e,description:t,type:n,value:l}).postProcessSnapshot(l=>typeof l.value=="object"?JSON.stringify(l.value)!==JSON.stringify(i)?l.value:void 0:l.value!==i?l.value:void 0).actions(l=>({set(d){l.value=d},reset(){l.value=i},convertToCallback(){l.isCallback||(l.value=`jexl:${l.valueJSON||"''"}`)},convertToValue(){if(l.isCallback){try{let d=l.expr.evalSync();if(d!==void 0){l.value=d;return}}catch{}if(l.value=i,!(n in hx))throw new Error(`no fallbackDefault defined for type ${n}`);l.value=hx[n]}}}));vx[n]&&(u=u.extend(vx[n]));let s=ke.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var _x=b(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.getSubType=dm;An.getUnionSubTypes=gx;An.getPropertyType=cj;An.getDefaultValue=lj;An.getEnumerationValues=fj;An.resolveLateType=dj;var En=vt();function dm(e){let t;if((0,En.isOptionalType)(e))t=e._subtype||e.type;else if((0,En.isArrayType)(e)||(0,En.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 gx(e){if(!(0,En.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||dm(e)._types||dm(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function cj(e,t){return e.properties[t]}function lj(e){if(!(0,En.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function fj(e){return gx(e).map(r=>r.value)}function dj(e){return!(0,En.isUnionType)(e)&&!(0,En.isArrayType)(e)&&(0,En.isLateType)(e)?e.getSubType():e}});var pm=b(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.readConfObject=yc;tn.getConf=pj;tn.getTypeNamesFromExplicitlyTypedUnion=yx;tn.isBareConfigurationSchemaType=wx;tn.isConfigurationSchemaType=wo;tn.isConfigurationModel=xx;tn.isConfigurationSlotType=hj;var Be=vt(),Tn=_x();function yc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Be.isStateTreeNode)(e)&&(0,Be.isMapType)((0,Be.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Be.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Be.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,Be.isStateTreeNode)(e)&&(0,Be.isMapType)((0,Be.getType)(e))&&(o=e.get(n)),o?yc(o,i,r):void 0}return yc(e,n,r)}}else return structuredClone((0,Be.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function pj(e,t,r){let{configuration:n}=e;if(xx(n))return yc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function yx(e){if((0,Be.isType)(e)&&(e=(0,Tn.resolveLateType)(e),(0,Be.isUnionType)(e))){let t=[];return(0,Tn.getUnionSubTypes)(e).forEach(r=>{r=(0,Tn.resolveLateType)(r);let n=yx(r);if(n.length||(n=[(0,Tn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}),t}return[]}function wx(e){return!!((0,Be.isType)(e)&&((0,Be.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Be.isLateType)(e)))}function wo(e){return(0,Be.isType)(e)?wx(e)?!0:(0,Be.isUnionType)(e)?(0,Tn.getUnionSubTypes)(e).every(t=>wo(t)||t.name==="undefined"):(0,Be.isOptionalType)(e)&&wo((0,Tn.getSubType)(e))||(0,Be.isArrayType)(e)&&wo((0,Tn.getSubType)(e))?!0:!!((0,Be.isMapType)(e)&&wo((0,Tn.getSubType)(e))):!1}function xx(e){return(0,Be.isStateTreeNode)(e)&&wo((0,Be.getType)(e))}function hj(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var Ex=b(xo=>{"use strict";var mj=xo&&xo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xo,"__esModule",{value:!0});xo.ConfigurationSchema=wj;xo.ConfigurationReference=xj;var Yt=vt(),vj=mj(bx()),Sx=pm(),Ox=cm();function bj(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function gj(e){return Array.isArray(e)&&e.length===0}function _j(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 yj(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Yt.types.optional(Yt.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]=Yt.types.identifier,i=r.explicitIdentifier):(n.id=Yt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=Ox.ElementId,i=r.implicitIdentifier):(n.id=Ox.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach(([l,d])=>{if((0,Yt.isType)(d)&&(0,Yt.isLateType)(d)||(0,Sx.isConfigurationSchemaType)(d))n[l]=d;else if(typeof d=="string"||typeof d=="number")o[l]=d;else if(typeof d=="object"){if(!d.type)throw new Error(`no type set for config slot ${e}.${l}`);try{n[l]=(0,vj.default)(l,d)}catch(f){throw new Error(`invalid config slot definition for ${e}.${l}: ${f}`)}}else throw new Error(`invalid configuration schema definition, "${l}" must be either a valid configuration slot definition, a constant, or a nested configuration schema`)});let a=Yt.types.model(`${e}ConfigurationSchema`,n).actions(l=>({setSubschema(d,f){if(!(0,Sx.isConfigurationSchemaType)(n[d]))throw new Error(`${d} is not a subschema, cannot replace`);let p=(0,Yt.isStateTreeNode)(f)?f:n[d].create(f);return l[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"}:{},c=r.explicitlyTyped?{type:e,...u}:u,s=(0,Yt.getSnapshot)(a.create(c));return a=a.postProcessSnapshot(l=>{let d={},f=!0;for(let[p,h]of Object.entries(l))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&&!bj(h)&&!gj(h)&&(d[p]=h);return f?{}:d}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Yt.types.optional(a,c)}function wj(e,t,r){let{schemaDefinition:n,options:i}=_j(e,t,r),o=yj(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function xj(e){return Yt.types.union(Yt.types.reference(e),e)}});var hm=b(mr=>{"use strict";var Sj=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]}),Oj=mr&&mr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Sj(t,e,r)};Object.defineProperty(mr,"__esModule",{value:!0});mr.ConfigurationSchema=mr.ConfigurationReference=void 0;var Ax=Ex();Object.defineProperty(mr,"ConfigurationReference",{enumerable:!0,get:function(){return Ax.ConfigurationReference}});Object.defineProperty(mr,"ConfigurationSchema",{enumerable:!0,get:function(){return Ax.ConfigurationSchema}});Oj(pm(),mr)});var Tx=b(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var mm=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()])}};vm.default=mm});var Px=b(_u=>{"use strict";var Ej=_u&&_u.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_u,"__esModule",{value:!0});var bm=hm(),Aj=Ej(Tx()),gm=class{constructor(t){this.pluginManager=t,this.adapterCache=new Aj.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,bm.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,bm.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,bm.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())}};_u.default=gm});var wc=b(se=>{"use strict";var Tj=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]}),Pj=se&&se.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Tj(t,e,r)},Rj=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=kj;se.isSessionModel=Pn;se.isSessionModelWithConfigEditing=Cj;se.isSessionWithAddTracks=qj;se.isSessionWithShareURL=Ij;se.isSessionModelWithWidgets=jj;se.isSessionModelWithConnections=Fj;se.isSessionModelWithConnectionEditing=Lj;se.isSessionWithSessionPlugins=Nj;se.isSelectionContainer=Dj;se.isViewModel=zj;se.isTrackModel=Bj;se.isDisplayModel=Uj;se.isTrackViewModel=Wj;se.isAppRootModel=Hj;se.isRootModelWithInternetAccounts=Vj;se.isAbstractMenuManager=Gj;se.isUriLocation=$j;se.isLocalPathLocation=Kj;se.isBlobLocation=Yj;se.isAuthNeededException=Zj;se.isRetryException=Jj;var Mj=vt();Pj(C1(),se);function kj(e){return(0,Mj.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function Pn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function Cj(e){return Pn(e)&&"editConfiguration"in e}function qj(e){return Pn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function Ij(e){return Pn(e)&&"shareURL"in e&&!!e.shareURL}function jj(e){return Pn(e)&&"widgets"in e}function Fj(e){return Pn(e)&&"makeConnection"in e}function Lj(e){return Pn(e)&&"addConnectionConf"in e}function Nj(e){return Pn(e)&&"sessionPlugins"in e}function Dj(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function zj(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function Bj(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function Uj(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function Wj(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function Hj(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function Vj(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function Gj(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function $j(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function Kj(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function Yj(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var _m=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=_m;var ym=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};se.RetryError=ym;function Zj(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function Jj(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var Xj=Px();Object.defineProperty(se,"TextSearchManager",{enumerable:!0,get:function(){return Rj(Xj).default}})});var xc=b((FX,Rx)=>{Rx.exports=JBrowseExports.mobx});var Mx=b(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.when=void 0;var Qj=xc();Object.defineProperty(Sc,"when",{enumerable:!0,get:function(){return Qj.when}})});var kx=b(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.intersection2=eF;yu.doesIntersect2=tF;yu.isContainedWithin=rF;function eF(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 tF(e,t,r,n){return t>r&&e<n}function rF(e,t,r,n){return r<=e&&n>=t}});var Cx=b(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.dedupe=nF;function nF(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 Em=b((zX,Fx)=>{"use strict";var Oc={},Tc={},wu={METHOD:"method",PROPERTY:"property"},Ec=class{constructor(t,r){this.inst=t,this.args=r}},xm=class extends Ec{constructor(t,r){super(t,r),this.type=wu.METHOD}execute(t){t[this.inst](...this.args)}},Sm=class extends Ec{constructor(t,r){super(t,r),this.type=wu.PROPERTY}execute(t){t[this.inst]=this.args[0]}},iF={[wu.METHOD]:xm,[wu.PROPERTY]:Sm},Ac=class{constructor(t,r,n){return new iF[t](r,n)}};Object.entries(wu).forEach(([e,t])=>{Object.defineProperty(Ac,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});Tc=Ac;var Ix=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")}),xu=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 Tc(t,r,n))}execute(t){t.save(),this[Fr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[Fr.sequence]}}};Ix.METHODS.forEach(e=>{Object.defineProperty(xu.prototype,e,{value:function(...r){this[Fr.push](Tc.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});Ix.PROPERTIES.forEach(e=>{Object.defineProperty(xu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[Fr.push](Tc.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});Oc=xu;var jx={},qx=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function oF(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var Om=class extends Oc{build(t={}){let r=new Oc;return this[qx.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?oF(u,t):u);r[qx.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};jx=Om;Fx.exports={CanvasSequence:Oc,CanvasBlueprint:jx}});var Nx=b((BX,Lx)=>{Lx.exports=!1});var Am=b(lt=>{"use strict";var aF=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=sF;var zx=Em(),uF=aF(Nx());function sF(e,t){e.serializedCommands?new zx.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var Dx={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:uF.default};Dx.realOffscreenCanvas?(lt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),lt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,lt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):Dx.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 zx.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 Pm=b(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.blobToDataURL=cF;function cF(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 Bx=b((HX,Pc)=>{(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"]=" ",m}function c(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 l=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=l([g-d,_-f]),y=l([p-d,h-f]);if(w[0]*y[1]===w[1]*y[0]){this.lineTo(d,f);return}var E=w[0]*y[0]+w[1]*y[1],S=Math.acos(Math.abs(E)),A=l([w[0]+y[0],w[1]+y[1]]),T=m/Math.sin(S/2),M=d+T*A[0],C=f+T*A[1],R=[-w[1],w[0]],k=[y[1],-y[0]],D=function(B){var F=B[0],q=B[1];return q>=0?Math.acos(F):-Math.acos(F)},P=D(R),I=D(k);this.lineTo(M+R[0]*m,C+R[1]*m),this.arc(M,C,m,P,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":c(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),E=f+p*Math.sin(h),S=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,E),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:p,ry:p,xAxisRotation:0,largeArcFlag:A,sweepFlag:S,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,E,S,A,T,M,C,R,k,D,P;if(d.length===3)p=d[1],h=d[2],y=f.width,E=f.height,m=y,g=E;else if(d.length===5)p=d[1],h=d[2],m=d[3],g=d[4],y=f.width,E=f.height;else if(d.length===9)_=d[1],w=d[2],y=d[3],E=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(S=this.__closestGroupOrSvg(),C=this.__currentElement,f instanceof t){for(A=f.getSvg(),T=A.childNodes[0];T.childNodes.length;)P=T.childNodes[0].getAttribute("id"),this.__ids[P]=P,this.__defs.appendChild(T.childNodes[0]);M=A.childNodes[1],S.appendChild(M),this.__currentElement=M,this.translate(p,h),this.__currentElement=C}else(f.nodeName==="CANVAS"||f.nodeName==="IMG")&&(R=this.__createElement("image"),R.setAttribute("width",m),R.setAttribute("height",g),R.setAttribute("preserveAspectRatio","none"),(_||w||y!==f.width||E!==f.height)&&(k=this.__document.createElement("canvas"),k.width=m,k.height=g,D=k.getContext("2d"),D.drawImage(f,_,w,y,E,0,0,m,g),f=k),R.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.nodeName==="CANVAS"?f.toDataURL():f.getAttribute("src")),S.appendChild(R),this.__currentElement=R,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 Pc=="object"&&typeof Pc.exports=="object"&&(Pc.exports=t)})()});var Hx=b(vr=>{"use strict";var lF=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]}),fF=vr&&vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dF=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"&&lF(r,t,n[i]);return fF(r,t),r}}();Object.defineProperty(vr,"__esModule",{value:!0});vr.renderToAbstractCanvas=mF;vr.getSerializedSvg=vF;vr.ReactRendering=bF;var Ux=Da(),pF=Ye(),Wx=Em(),hF=Pm(),Rm=Am();async function mF(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,Rm.createCanvas)(Math.ceil(e*a),t*a),c=u.getContext("2d");if(!c)throw new Error("2d canvas rendering not supported on this platform");return c.scale(a,a),{...await n(c),reactElement:(0,Ux.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,hF.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new Wx.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,Rm.createCanvas)(Math.ceil(e*a),t*a),c=u.getContext("2d");if(!c)throw new Error("2d canvas rendering not supported on this platform");return c.scale(a,a),{...await n(c),imageData:await(0,Rm.createImageBitmap)(u)}}}async function vF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>dF(Bx())),o=new i.default(t,r);return new Wx.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function bF({rendering:e}){return(0,pF.isValidElement)(e.reactElement)?e.reactElement:(0,Ux.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var Gx=b(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.isFeature=gF;function gF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function Vx(e){return"uniqueId"in e&&typeof e.data!="object"}var Mm=class e{constructor(t){var r;Vx(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=Vx(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})}};Rc.default=Mm});var ye=b(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.isFunction=void 0;function _F(e){return typeof e=="function"}Mc.isFunction=_F});var Rn=b(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.createErrorClass=void 0;function yF(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}kc.createErrorClass=yF});var km=b(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.UnsubscriptionError=void 0;var wF=Rn();Cc.UnsubscriptionError=wF.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 rn=b(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.arrRemove=void 0;function wF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}Cc.arrRemove=wF});var Dt=b(Ct=>{"use strict";var Gx=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.")},$x=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},Kx=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 Su=ye(),Cm=km(),Yx=rn(),qm=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=Gx(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(Su.isFunction(l))try{l()}catch(m){o=m instanceof Cm.UnsubscriptionError?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Gx(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{Zx(h)}catch(m){o=o??[],m instanceof Cm.UnsubscriptionError?o=Kx(Kx([],$x(o)),$x(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 Cm.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Zx(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)&&Yx.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Yx.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Ct.Subscription=qm;Ct.EMPTY_SUBSCRIPTION=qm.EMPTY;function xF(e){return e instanceof qm||e&&"closed"in e&&Su.isFunction(e.remove)&&Su.isFunction(e.add)&&Su.isFunction(e.unsubscribe)}Ct.isSubscription=xF;function Zx(e){Su.isFunction(e)?e():e.unsubscribe()}});var xo=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.config=void 0;qc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Im=b(Lr=>{"use strict";var Jx=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},Xx=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,Xx([e,t],Jx(r))):setTimeout.apply(void 0,Xx([e,t],Jx(r)))},clearTimeout:function(e){var t=Lr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var jm=b(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.reportUnhandledError=void 0;var SF=xo(),OF=Im();function EF(e){OF.timeoutProvider.setTimeout(function(){var t=SF.config.onUnhandledError;if(t)t(e);else throw e})}Ic.reportUnhandledError=EF});var ot=b(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.noop=void 0;function AF(){}jc.noop=AF});var Qx=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 Fc("C",void 0,void 0)}();function TF(e){return Fc("E",void 0,e)}Nr.errorNotification=TF;function PF(e){return Fc("N",e,void 0)}Nr.nextNotification=PF;function Fc(e,t,r){return{kind:e,value:t,error:r}}Nr.createNotification=Fc});var Lc=b(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.captureError=So.errorContext=void 0;var eS=xo(),Ei=null;function RF(e){if(eS.config.useDeprecatedSynchronousErrorHandling){var t=!Ei;if(t&&(Ei={errorThrown:!1,error:null}),e(),t){var r=Ei,n=r.errorThrown,i=r.error;if(Ei=null,n)throw i}}else e()}So.errorContext=RF;function MF(e){eS.config.useDeprecatedSynchronousErrorHandling&&Ei&&(Ei.errorThrown=!0,Ei.error=e)}So.captureError=MF});var Oo=b(br=>{"use strict";var nS=br&&br.__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(br,"__esModule",{value:!0});br.EMPTY_OBSERVER=br.SafeSubscriber=br.Subscriber=void 0;var kF=ye(),tS=Dt(),Dm=xo(),CF=jm(),rS=ot(),Fm=Qx(),qF=Im(),IF=Lc(),iS=function(e){nS(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,tS.isSubscription(r)&&r.add(n)):n.destination=br.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new oS(r,n,i)},t.prototype.next=function(r){this.isStopped?Nm(Fm.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Nm(Fm.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Nm(Fm.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}(tS.Subscription);br.Subscriber=iS;var jF=Function.prototype.bind;function Lm(e,t){return jF.call(e,t)}var FF=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){Nc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Nc(n)}else Nc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Nc(r)}},e}(),oS=function(e){nS(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(kF.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&Dm.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Lm(r.next,u),error:r.error&&Lm(r.error,u),complete:r.complete&&Lm(r.complete,u)}):a=r}return o.destination=new FF(a),o}return t}(iS);br.SafeSubscriber=oS;function Nc(e){Dm.config.useDeprecatedSynchronousErrorHandling?IF.captureError(e):CF.reportUnhandledError(e)}function LF(e){throw e}function Nm(e,t){var r=Dm.config.onStoppedNotification;r&&qF.timeoutProvider.setTimeout(function(){return r(e,t)})}br.EMPTY_OBSERVER={closed:!0,next:rS.noop,error:LF,complete:rS.noop}});var Ou=b(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.observable=void 0;Dc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var at=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.identity=void 0;function NF(e){return e}zc.identity=NF});var Eu=b(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.pipeFromArray=Eo.pipe=void 0;var DF=at();function zF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return aS(e)}Eo.pipe=zF;function aS(e){return e.length===0?DF.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Eo.pipeFromArray=aS});var xe=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.Observable=void 0;var Bm=Oo(),BF=Dt(),UF=Ou(),WF=Eu(),HF=xo(),zm=ye(),VF=Lc(),GF=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=KF(t)?t:new Bm.SafeSubscriber(t,r,n);return VF.errorContext(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?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=uS(r),new r(function(i,o){var a=new Bm.SafeSubscriber({next:function(u){try{t(u)}catch(c){o(c),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[UF.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return WF.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=uS(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}();Bc.Observable=GF;function uS(e){var t;return(t=e??HF.config.Promise)!==null&&t!==void 0?t:Promise}function $F(e){return e&&zm.isFunction(e.next)&&zm.isFunction(e.error)&&zm.isFunction(e.complete)}function KF(e){return e&&e instanceof Bm.Subscriber||$F(e)&&BF.isSubscription(e)}});var G=b(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.operate=Ao.hasLift=void 0;var YF=ye();function sS(e){return YF.isFunction(e?.lift)}Ao.hasLift=sS;function ZF(e){return function(t){if(sS(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")}}Ao.operate=ZF});var Y=b(Rn=>{"use strict";var JF=Rn&&Rn.__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(Rn,"__esModule",{value:!0});Rn.OperatorSubscriber=Rn.createOperatorSubscriber=void 0;var XF=Oo();function QF(e,t,r,n,i){return new cS(e,t,r,n,i)}Rn.createOperatorSubscriber=QF;var cS=function(e){JF(t,e);function t(r,n,i,o,a,u){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=n?function(s){try{n(s)}catch(l){r.error(l)}}:e.prototype._next,c._error=o?function(s){try{o(s)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,c}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}(XF.Subscriber);Rn.OperatorSubscriber=cS});var Um=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.refCount=void 0;var eL=G(),tL=Y();function rL(){return eL.operate(function(e,t){var r=null;e._refCount++;var n=tL.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())})}Uc.refCount=rL});var Au=b(To=>{"use strict";var nL=To&&To.__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(To,"__esModule",{value:!0});To.ConnectableObservable=void 0;var iL=xe(),lS=Dt(),oL=Um(),aL=Y(),uL=G(),sL=function(e){nL(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,uL.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 lS.Subscription;var i=this.getSubject();n.add(this.source.subscribe(aL.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=lS.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return oL.refCount()(this)},t}(iL.Observable);To.ConnectableObservable=sL});var fS=b(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.performanceTimestampProvider=void 0;Tu.performanceTimestampProvider={now:function(){return(Tu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Wm=b(gr=>{"use strict";var dS=gr&&gr.__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},pS=gr&&gr.__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(gr,"__esModule",{value:!0});gr.animationFrameProvider=void 0;var cL=Dt();gr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=gr.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new cL.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gr.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,pS([],dS(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gr.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,pS([],dS(e)))},delegate:void 0}});var vS=b(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.animationFrames=void 0;var lL=xe(),fL=fS(),hS=Wm();function dL(e){return e?mS(e):pL}Wc.animationFrames=dL;function mS(e){return new lL.Observable(function(t){var r=e||fL.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=hS.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&hS.animationFrameProvider.cancelAnimationFrame(i)}})}var pL=mS()});var Hm=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.ObjectUnsubscribedError=void 0;var hL=Pn();Hc.ObjectUnsubscribedError=hL.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var ut=b(Dr=>{"use strict";var gS=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)}}(),mL=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 bS=xe(),Gm=Dt(),vL=Hm(),bL=rn(),Vm=Lc(),_S=function(e){gS(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 $m(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new vL.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Vm.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=mL(n.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.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;Vm.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;Vm.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?Gm.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new Gm.Subscription(function(){n.currentObservers=null,bL.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 bS.Observable;return r.source=this,r},t.create=function(r,n){return new $m(r,n)},t}(bS.Observable);Dr.Subject=_S;var $m=function(e){gS(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:Gm.EMPTY_SUBSCRIPTION},t}(_S);Dr.AnonymousSubject=$m});var Km=b(Po=>{"use strict";var gL=Po&&Po.__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(Po,"__esModule",{value:!0});Po.BehaviorSubject=void 0;var _L=ut(),yL=function(e){gL(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}(_L.Subject);Po.BehaviorSubject=yL});var Vc=b(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.dateTimestampProvider=void 0;Pu.dateTimestampProvider={now:function(){return(Pu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Gc=b(Ro=>{"use strict";var wL=Ro&&Ro.__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(Ro,"__esModule",{value:!0});Ro.ReplaySubject=void 0;var xL=ut(),SL=Vc(),OL=function(e){wL(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=SL.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,c=n._windowTime;i||(o.push(r),!a&&o.push(u.now()+c)),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(),c=0;c<u.length&&!r.closed;c+=o?1:2)r.next(u[c]);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 c=i.now(),s=0,l=1;l<o.length&&o[l]<=c;l+=2)s=l;s&&o.splice(0,s+1)}},t}(xL.Subject);Ro.ReplaySubject=OL});var $c=b(Mo=>{"use strict";var EL=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.AsyncSubject=void 0;var AL=ut(),TL=function(e){EL(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,c=n.isStopped,s=n._isComplete;i?r.error(u):(c||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}(AL.Subject);Mo.AsyncSubject=TL});var yS=b(ko=>{"use strict";var PL=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.Action=void 0;var RL=Dt(),ML=function(e){PL(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}(RL.Subscription);ko.Action=ML});var SS=b(zr=>{"use strict";var wS=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},xS=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,xS([e,t],wS(r))):setInterval.apply(void 0,xS([e,t],wS(r)))},clearInterval:function(e){var t=zr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var qo=b(Co=>{"use strict";var kL=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.AsyncAction=void 0;var CL=yS(),OS=SS(),qL=rn(),IL=function(e){kL(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),OS.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&&OS.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,qL.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(CL.Action);Co.AsyncAction=IL});var AS=b(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.TestTools=Io.Immediate=void 0;var jL=1,Ym,Kc={};function ES(e){return e in Kc?(delete Kc[e],!0):!1}Io.Immediate={setImmediate:function(e){var t=jL++;return Kc[t]=!0,Ym||(Ym=Promise.resolve()),Ym.then(function(){return ES(t)&&e()}),t},clearImmediate:function(e){ES(e)}};Io.TestTools={pending:function(){return Object.keys(Kc).length}}});var PS=b(Br=>{"use strict";var FL=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},LL=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 TS=AS(),NL=TS.Immediate.setImmediate,DL=TS.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||NL).apply(void 0,LL([],FL(e)))},clearImmediate:function(e){var t=Br.immediateProvider.delegate;return(t?.clearImmediate||DL)(e)},delegate:void 0}});var MS=b(jo=>{"use strict";var zL=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.AsapAction=void 0;var BL=qo(),RS=PS(),UL=function(e){zL(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=RS.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&&(RS.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(BL.AsyncAction);jo.AsapAction=UL});var Zm=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.Scheduler=void 0;var WL=Vc(),HL=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=WL.dateTimestampProvider.now,e}();Yc.Scheduler=HL});var Lo=b(Fo=>{"use strict";var VL=Fo&&Fo.__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(Fo,"__esModule",{value:!0});Fo.AsyncScheduler=void 0;var kS=Zm(),GL=function(e){VL(t,e);function t(r,n){n===void 0&&(n=kS.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}(kS.Scheduler);Fo.AsyncScheduler=GL});var CS=b(No=>{"use strict";var $L=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.AsapScheduler=void 0;var KL=Lo(),YL=function(e){$L(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}(KL.AsyncScheduler);No.AsapScheduler=YL});var qS=b(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.asap=Ai.asapScheduler=void 0;var ZL=MS(),JL=CS();Ai.asapScheduler=new JL.AsapScheduler(ZL.AsapAction);Ai.asap=Ai.asapScheduler});var qt=b(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.async=Ti.asyncScheduler=void 0;var XL=qo(),QL=Lo();Ti.asyncScheduler=new QL.AsyncScheduler(XL.AsyncAction);Ti.async=Ti.asyncScheduler});var IS=b(Do=>{"use strict";var eN=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.QueueAction=void 0;var tN=qo(),rN=function(e){eN(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}(tN.AsyncAction);Do.QueueAction=rN});var jS=b(zo=>{"use strict";var nN=zo&&zo.__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(zo,"__esModule",{value:!0});zo.QueueScheduler=void 0;var iN=Lo(),oN=function(e){nN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(iN.AsyncScheduler);zo.QueueScheduler=oN});var FS=b(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.queue=Pi.queueScheduler=void 0;var aN=IS(),uN=jS();Pi.queueScheduler=new uN.QueueScheduler(aN.QueueAction);Pi.queue=Pi.queueScheduler});var NS=b(Bo=>{"use strict";var sN=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.AnimationFrameAction=void 0;var cN=qo(),LS=Wm(),lN=function(e){sN(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=LS.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&&(LS.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(cN.AsyncAction);Bo.AnimationFrameAction=lN});var DS=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.AnimationFrameScheduler=void 0;var dN=Lo(),pN=function(e){fN(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}(dN.AsyncScheduler);Uo.AnimationFrameScheduler=pN});var zS=b(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.animationFrame=Ri.animationFrameScheduler=void 0;var hN=NS(),mN=DS();Ri.animationFrameScheduler=new mN.AnimationFrameScheduler(hN.AnimationFrameAction);Ri.animationFrame=Ri.animationFrameScheduler});var WS=b(Mn=>{"use strict";var BS=Mn&&Mn.__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(Mn,"__esModule",{value:!0});Mn.VirtualAction=Mn.VirtualTimeScheduler=void 0;var vN=qo(),bN=Dt(),gN=Lo(),_N=function(e){BS(t,e);function t(r,n){r===void 0&&(r=US),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}(gN.AsyncScheduler);Mn.VirtualTimeScheduler=_N;var US=function(e){BS(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 bN.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}(vN.AsyncAction);Mn.VirtualAction=US});var _r=b(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.empty=Mi.EMPTY=void 0;var HS=xe();Mi.EMPTY=new HS.Observable(function(e){return e.complete()});function yN(e){return e?wN(e):Mi.EMPTY}Mi.empty=yN;function wN(e){return new HS.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var Ru=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.isScheduler=void 0;var xN=ye();function SN(e){return e&&xN.isFunction(e.schedule)}Zc.isScheduler=SN});var It=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.popNumber=kn.popScheduler=kn.popResultSelector=void 0;var ON=ye(),EN=Ru();function Jm(e){return e[e.length-1]}function AN(e){return ON.isFunction(Jm(e))?e.pop():void 0}kn.popResultSelector=AN;function TN(e){return EN.isScheduler(Jm(e))?e.pop():void 0}kn.popScheduler=TN;function PN(e,t){return typeof Jm(e)=="number"?e.pop():t}kn.popNumber=PN});var Xc=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.isArrayLike=void 0;Jc.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var Xm=b(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.isPromise=void 0;var RN=ye();function MN(e){return RN.isFunction(e?.then)}Qc.isPromise=MN});var Qm=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.isInteropObservable=void 0;var kN=Ou(),CN=ye();function qN(e){return CN.isFunction(e[kN.observable])}el.isInteropObservable=qN});var ev=b(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.isAsyncIterable=void 0;var IN=ye();function jN(e){return Symbol.asyncIterator&&IN.isFunction(e?.[Symbol.asyncIterator])}tl.isAsyncIterable=jN});var tv=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.createInvalidObservableTypeError=void 0;function FN(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.")}rl.createInvalidObservableTypeError=FN});var rv=b(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.iterator=Wo.getSymbolIterator=void 0;function VS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Wo.getSymbolIterator=VS;Wo.iterator=VS()});var nv=b(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.isIterable=void 0;var LN=rv(),NN=ye();function DN(e){return NN.isFunction(e?.[LN.iterator])}nl.isIterable=DN});var il=b(Zt=>{"use strict";var zN=Zt&&Zt.__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(l){return c([s,l])}}function c(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(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Ho=Zt&&Zt.__await||function(e){return this instanceof Ho?(this.v=e,this):new Ho(e)},BN=Zt&&Zt.__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{c(n[f](p))}catch(h){d(o[0][3],h)}}function c(f){f.value instanceof Ho?Promise.resolve(f.value.v).then(s,l):d(o[0][2],f)}function s(f){u("next",f)}function l(f){u("throw",f)}function d(f,p){f(p),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.isReadableStreamLike=Zt.readableStreamLikeToAsyncGenerator=void 0;var UN=ye();function WN(e){return BN(this,arguments,function(){var r,n,i,o;return zN(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,Ho(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,Ho(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Ho(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]}})})}Zt.readableStreamLikeToAsyncGenerator=WN;function HN(e){return UN.isFunction(e?.getReader)}Zt.isReadableStreamLike=HN});var ie=b(Ce=>{"use strict";var VN=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(l){try{s(n.next(l))}catch(d){a(d)}}function c(l){try{s(n.throw(l))}catch(d){a(d)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},GN=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(l){return c([s,l])}}function c(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(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},$N=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 iv=="function"?iv(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,c){a=e[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}},iv=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 KN=Xc(),YN=Xm(),Vo=xe(),ZN=Qm(),JN=ev(),XN=tv(),QN=nv(),GS=il(),eD=ye(),tD=jm(),rD=Ou();function nD(e){if(e instanceof Vo.Observable)return e;if(e!=null){if(ZN.isInteropObservable(e))return $S(e);if(KN.isArrayLike(e))return KS(e);if(YN.isPromise(e))return YS(e);if(JN.isAsyncIterable(e))return ov(e);if(QN.isIterable(e))return ZS(e);if(GS.isReadableStreamLike(e))return JS(e)}throw XN.createInvalidObservableTypeError(e)}Ce.innerFrom=nD;function $S(e){return new Vo.Observable(function(t){var r=e[rD.observable]();if(eD.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}Ce.fromInteropObservable=$S;function KS(e){return new Vo.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}Ce.fromArrayLike=KS;function YS(e){return new Vo.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,tD.reportUnhandledError)})}Ce.fromPromise=YS;function ZS(e){return new Vo.Observable(function(t){var r,n;try{for(var i=iv(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=ZS;function ov(e){return new Vo.Observable(function(t){iD(e,t).catch(function(r){return t.error(r)})})}Ce.fromAsyncIterable=ov;function JS(e){return ov(GS.readableStreamLikeToAsyncGenerator(e))}Ce.fromReadableStreamLike=JS;function iD(e,t){var r,n,i,o;return VN(this,void 0,void 0,function(){var a,u;return GN(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=$N(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}});var nn=b(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.executeSchedule=void 0;function oD(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}ol.executeSchedule=oD});var Mu=b(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.observeOn=void 0;var av=nn(),aD=G(),uD=Y();function sD(e,t){return t===void 0&&(t=0),aD.operate(function(r,n){r.subscribe(uD.createOperatorSubscriber(n,function(i){return av.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return av.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return av.executeSchedule(n,e,function(){return n.error(i)},t)}))})}al.observeOn=sD});var ku=b(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.subscribeOn=void 0;var cD=G();function lD(e,t){return t===void 0&&(t=0),cD.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}ul.subscribeOn=lD});var XS=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.scheduleObservable=void 0;var fD=ie(),dD=Mu(),pD=ku();function hD(e,t){return fD.innerFrom(e).pipe(pD.subscribeOn(t),dD.observeOn(t))}sl.scheduleObservable=hD});var QS=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.schedulePromise=void 0;var mD=ie(),vD=Mu(),bD=ku();function gD(e,t){return mD.innerFrom(e).pipe(bD.subscribeOn(t),vD.observeOn(t))}cl.schedulePromise=gD});var eO=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.scheduleArray=void 0;var _D=xe();function yD(e,t){return new _D.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}ll.scheduleArray=yD});var uv=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.scheduleIterable=void 0;var wD=xe(),xD=rv(),SD=ye(),tO=nn();function OD(e,t){return new wD.Observable(function(r){var n;return tO.executeSchedule(r,t,function(){n=e[xD.iterator](),tO.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 SD.isFunction(n?.return)&&n.return()}})}fl.scheduleIterable=OD});var sv=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.scheduleAsyncIterable=void 0;var ED=xe(),rO=nn();function AD(e,t){if(!e)throw new Error("Iterable cannot be null");return new ED.Observable(function(r){rO.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();rO.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}dl.scheduleAsyncIterable=AD});var nO=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.scheduleReadableStreamLike=void 0;var TD=sv(),PD=il();function RD(e,t){return TD.scheduleAsyncIterable(PD.readableStreamLikeToAsyncGenerator(e),t)}pl.scheduleReadableStreamLike=RD});var cv=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.scheduled=void 0;var MD=XS(),kD=QS(),CD=eO(),qD=uv(),ID=sv(),jD=Qm(),FD=Xm(),LD=Xc(),ND=nv(),DD=ev(),zD=tv(),BD=il(),UD=nO();function WD(e,t){if(e!=null){if(jD.isInteropObservable(e))return MD.scheduleObservable(e,t);if(LD.isArrayLike(e))return CD.scheduleArray(e,t);if(FD.isPromise(e))return kD.schedulePromise(e,t);if(DD.isAsyncIterable(e))return ID.scheduleAsyncIterable(e,t);if(ND.isIterable(e))return qD.scheduleIterable(e,t);if(BD.isReadableStreamLike(e))return UD.scheduleReadableStreamLike(e,t)}throw zD.createInvalidObservableTypeError(e)}hl.scheduled=WD});var on=b(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.from=void 0;var HD=cv(),VD=ie();function GD(e,t){return t?HD.scheduled(e,t):VD.innerFrom(e)}ml.from=GD});var bl=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.of=void 0;var $D=It(),KD=on();function YD(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=$D.popScheduler(e);return KD.from(e,r)}vl.of=YD});var lv=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.throwError=void 0;var ZD=xe(),JD=ye();function XD(e,t){var r=JD.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new ZD.Observable(t?function(i){return t.schedule(n,0,i)}:n)}gl.throwError=XD});var _l=b(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.observeNotification=an.Notification=an.NotificationKind=void 0;var QD=_r(),e5=bl(),t5=lv(),r5=ye(),n5;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(n5=an.NotificationKind||(an.NotificationKind={}));var i5=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 iO(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 r5.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"?e5.of(n):r==="E"?t5.throwError(function(){return i}):r==="C"?QD.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}();an.Notification=i5;function iO(e,t){var r,n,i,o=e,a=o.kind,u=o.value,c=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,c):(i=t.complete)===null||i===void 0||i.call(t)}an.observeNotification=iO});var aO=b(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.isObservable=void 0;var o5=xe(),oO=ye();function a5(e){return!!e&&(e instanceof o5.Observable||oO.isFunction(e.lift)&&oO.isFunction(e.subscribe))}yl.isObservable=a5});var Cn=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.EmptyError=void 0;var u5=Pn();wl.EmptyError=u5.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var uO=b(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.lastValueFrom=void 0;var s5=Cn();function c5(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 s5.EmptyError)}})})}xl.lastValueFrom=c5});var sO=b(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.firstValueFrom=void 0;var l5=Cn(),f5=Oo();function d5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new f5.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new l5.EmptyError)}});e.subscribe(o)})}Sl.firstValueFrom=d5});var fv=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.ArgumentOutOfRangeError=void 0;var p5=Pn();Ol.ArgumentOutOfRangeError=p5.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var dv=b(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.NotFoundError=void 0;var h5=Pn();El.NotFoundError=h5.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var pv=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.SequenceError=void 0;var m5=Pn();Al.SequenceError=m5.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var Pl=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.isValidDate=void 0;function v5(e){return e instanceof Date&&!isNaN(e)}Tl.isValidDate=v5});var Rl=b(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.timeout=ki.TimeoutError=void 0;var b5=qt(),g5=Pl(),_5=G(),y5=ie(),w5=Pn(),x5=Y(),S5=nn();ki.TimeoutError=w5.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 O5(e,t){var r=g5.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?E5:o,u=r.scheduler,c=u===void 0?t??b5.asyncScheduler:u,s=r.meta,l=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return _5.operate(function(d,f){var p,h,m=null,g=0,_=function(y){h=S5.executeSchedule(f,c,function(){try{p.unsubscribe(),y5.innerFrom(a({meta:l,lastValue:m,seen:g})).subscribe(f)}catch(w){f.error(w)}},y)};p=d.subscribe(x5.createOperatorSubscriber(f,function(y){h?.unsubscribe(),g++,f.next(m=y),i>0&&_(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),m=null})),!g&&_(n!=null?typeof n=="number"?n:+n-c.now():i)})}ki.timeout=O5;function E5(e){throw new ki.TimeoutError(e)}});var qn=b(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.map=void 0;var A5=G(),T5=Y();function P5(e,t){return A5.operate(function(r,n){var i=0;r.subscribe(T5.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}Ml.map=P5});var jn=b(In=>{"use strict";var R5=In&&In.__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},M5=In&&In.__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(In,"__esModule",{value:!0});In.mapOneOrManyArgs=void 0;var k5=qn(),C5=Array.isArray;function q5(e,t){return C5(t)?e.apply(void 0,M5([],R5(t))):e(t)}function I5(e){return k5.map(function(t){return q5(e,t)})}In.mapOneOrManyArgs=I5});var mv=b(Fn=>{"use strict";var j5=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},cO=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.bindCallbackInternals=void 0;var F5=Ru(),L5=xe(),N5=ku(),D5=jn(),z5=Mu(),B5=$c();function hv(e,t,r,n){if(r)if(F5.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return hv(e,t,n).apply(this,i).pipe(D5.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return hv(e,t).apply(this,i).pipe(N5.subscribeOn(n),z5.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new B5.AsyncSubject,c=!0;return new L5.Observable(function(s){var l=u.subscribe(s);if(c){c=!1;var d=!1,f=!1;t.apply(i,cO(cO([],j5(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 l})}}Fn.bindCallbackInternals=hv});var lO=b(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.bindCallback=void 0;var U5=mv();function W5(e,t,r){return U5.bindCallbackInternals(!1,e,t,r)}kl.bindCallback=W5});var fO=b(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.bindNodeCallback=void 0;var H5=mv();function V5(e,t,r){return H5.bindCallbackInternals(!0,e,t,r)}Cl.bindNodeCallback=V5});var vv=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.argsArgArrayOrObject=void 0;var G5=Array.isArray,$5=Object.getPrototypeOf,K5=Object.prototype,Y5=Object.keys;function Z5(e){if(e.length===1){var t=e[0];if(G5(t))return{args:t,keys:null};if(J5(t)){var r=Y5(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}ql.argsArgArrayOrObject=Z5;function J5(e){return e&&typeof e=="object"&&$5(e)===K5}});var bv=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.createObject=void 0;function X5(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Il.createObject=X5});var jl=b(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.combineLatestInit=Go.combineLatest=void 0;var Q5=xe(),e6=vv(),hO=on(),mO=at(),t6=jn(),dO=It(),r6=bv(),n6=Y(),i6=nn();function o6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=dO.popScheduler(e),n=dO.popResultSelector(e),i=e6.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return hO.from([],r);var u=new Q5.Observable(vO(o,r,a?function(c){return r6.createObject(a,c)}:mO.identity));return n?u.pipe(t6.mapOneOrManyArgs(n)):u}Go.combineLatest=o6;function vO(e,t,r){return r===void 0&&(r=mO.identity),function(n){pO(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,c=function(l){pO(t,function(){var d=hO.from(e[l],t),f=!1;d.subscribe(n6.createOperatorSubscriber(n,function(p){o[l]=p,f||(f=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)c(s)},n)}}Go.combineLatestInit=vO;function pO(e,t,r){e?i6.executeSchedule(r,e,t):t()}});var Ll=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.mergeInternals=void 0;var a6=ie(),u6=nn(),bO=Y();function s6(e,t,r,n,i,o,a,u){var c=[],s=0,l=0,d=!1,f=function(){d&&!c.length&&!s&&t.complete()},p=function(m){return s<n?h(m):c.push(m)},h=function(m){o&&t.next(m),s++;var g=!1;a6.innerFrom(r(m,l++)).subscribe(bO.createOperatorSubscriber(t,function(_){i?.(_),o?p(_):t.next(_)},function(){g=!0},void 0,function(){if(g)try{s--;for(var _=function(){var y=c.shift();a?u6.executeSchedule(t,a,function(){return h(y)}):h(y)};c.length&&s<n;)_();f()}catch(y){t.error(y)}}))};return e.subscribe(bO.createOperatorSubscriber(t,p,function(){d=!0,f()})),function(){u?.()}}Fl.mergeInternals=s6});var un=b(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.mergeMap=void 0;var c6=qn(),l6=ie(),f6=G(),d6=Ll(),p6=ye();function gO(e,t,r){return r===void 0&&(r=1/0),p6.isFunction(t)?gO(function(n,i){return c6.map(function(o,a){return t(n,o,i,a)})(l6.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),f6.operate(function(n,i){return d6.mergeInternals(n,i,e,r)}))}Nl.mergeMap=gO});var Cu=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.mergeAll=void 0;var h6=un(),m6=at();function v6(e){return e===void 0&&(e=1/0),h6.mergeMap(m6.identity,e)}Dl.mergeAll=v6});var Bl=b(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.concatAll=void 0;var b6=Cu();function g6(){return b6.mergeAll(1)}zl.concatAll=g6});var qu=b(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.concat=void 0;var _6=Bl(),y6=It(),w6=on();function x6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _6.concatAll()(w6.from(e,y6.popScheduler(e)))}Ul.concat=x6});var Iu=b(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.defer=void 0;var S6=xe(),O6=ie();function E6(e){return new S6.Observable(function(t){O6.innerFrom(e()).subscribe(t)})}Wl.defer=E6});var _O=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.connectable=void 0;var A6=ut(),T6=xe(),P6=Iu(),R6={connector:function(){return new A6.Subject},resetOnDisconnect:!0};function M6(e,t){t===void 0&&(t=R6);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new T6.Observable(function(c){return a.subscribe(c)});return u.connect=function(){return(!r||r.closed)&&(r=P6.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}Hl.connectable=M6});var yO=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.forkJoin=void 0;var k6=xe(),C6=vv(),q6=ie(),I6=It(),j6=Y(),F6=jn(),L6=bv();function N6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=I6.popResultSelector(e),n=C6.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new k6.Observable(function(u){var c=i.length;if(!c){u.complete();return}for(var s=new Array(c),l=c,d=c,f=function(h){var m=!1;q6.innerFrom(i[h]).subscribe(j6.createOperatorSubscriber(u,function(g){m||(m=!0,d--),s[h]=g},function(){return l--},void 0,function(){(!l||!m)&&(d||u.next(o?L6.createObject(o,s):s),u.complete())}))},p=0;p<c;p++)f(p)});return r?a.pipe(F6.mapOneOrManyArgs(r)):a}Vl.forkJoin=N6});var xO=b($o=>{"use strict";var D6=$o&&$o.__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($o,"__esModule",{value:!0});$o.fromEvent=void 0;var z6=ie(),B6=xe(),U6=un(),W6=Xc(),Ci=ye(),H6=jn(),V6=["addListener","removeListener"],G6=["addEventListener","removeEventListener"],$6=["on","off"];function gv(e,t,r,n){if(Ci.isFunction(r)&&(n=r,r=void 0),n)return gv(e,t,r).pipe(H6.mapOneOrManyArgs(n));var i=D6(Z6(e)?G6.map(function(u){return function(c){return e[u](t,c,r)}}):K6(e)?V6.map(wO(e,t)):Y6(e)?$6.map(wO(e,t)):[],2),o=i[0],a=i[1];if(!o&&W6.isArrayLike(e))return U6.mergeMap(function(u){return gv(u,t,r)})(z6.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new B6.Observable(function(u){var c=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return u.next(1<s.length?s:s[0])};return o(c),function(){return a(c)}})}$o.fromEvent=gv;function wO(e,t){return function(r){return function(n){return e[r](t,n)}}}function K6(e){return Ci.isFunction(e.addListener)&&Ci.isFunction(e.removeListener)}function Y6(e){return Ci.isFunction(e.on)&&Ci.isFunction(e.off)}function Z6(e){return Ci.isFunction(e.addEventListener)&&Ci.isFunction(e.removeEventListener)}});var OO=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.fromEventPattern=void 0;var J6=xe(),X6=ye(),Q6=jn();function SO(e,t,r){return r?SO(e,t).pipe(Q6.mapOneOrManyArgs(r)):new J6.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 X6.isFunction(t)?function(){return t(i,o)}:void 0})}Gl.fromEventPattern=SO});var AO=b(Ko=>{"use strict";var e3=Ko&&Ko.__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(l){return c([s,l])}}function c(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(l){s=[6,l],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(Ko,"__esModule",{value:!0});Ko.generate=void 0;var EO=at(),t3=Ru(),r3=Iu(),n3=uv();function i3(e,t,r,n,i){var o,a,u,c;arguments.length===1?(o=e,c=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,u=a===void 0?EO.identity:a,i=o.scheduler):(c=e,!n||t3.isScheduler(n)?(u=EO.identity,i=n):u=n);function s(){var l;return e3(this,function(d){switch(d.label){case 0:l=c,d.label=1;case 1:return!t||t(l)?[4,u(l)]:[3,4];case 2:d.sent(),d.label=3;case 3:return l=r(l),[3,1];case 4:return[2]}})}return r3.defer(i?function(){return n3.scheduleIterable(s(),i)}:s)}Ko.generate=i3});var TO=b($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.iif=void 0;var o3=Iu();function a3(e,t,r){return o3.defer(function(){return e()?t:r})}$l.iif=a3});var Ln=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.timer=void 0;var u3=xe(),s3=qt(),c3=Ru(),l3=Pl();function f3(e,t,r){e===void 0&&(e=0),r===void 0&&(r=s3.async);var n=-1;return t!=null&&(c3.isScheduler(t)?r=t:n=t),new u3.Observable(function(i){var o=l3.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)})}Kl.timer=f3});var _v=b(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.interval=void 0;var d3=qt(),p3=Ln();function h3(e,t){return e===void 0&&(e=0),t===void 0&&(t=d3.asyncScheduler),e<0&&(e=0),p3.timer(e,e,t)}Yl.interval=h3});var RO=b(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.merge=void 0;var m3=Cu(),v3=ie(),b3=_r(),PO=It(),g3=on();function _3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=PO.popScheduler(e),n=PO.popNumber(e,1/0),i=e;return i.length?i.length===1?v3.innerFrom(i[0]):m3.mergeAll(n)(g3.from(i,r)):b3.EMPTY}Zl.merge=_3});var yv=b(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.never=qi.NEVER=void 0;var y3=xe(),w3=ot();qi.NEVER=new y3.Observable(w3.noop);function x3(){return qi.NEVER}qi.never=x3});var Ii=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.argsOrArgArray=void 0;var S3=Array.isArray;function O3(e){return e.length===1&&S3(e[0])?e[0]:e}Jl.argsOrArgArray=O3});var wv=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.onErrorResumeNext=void 0;var E3=xe(),A3=Ii(),T3=Y(),MO=ot(),P3=ie();function R3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=A3.argsOrArgArray(e);return new E3.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=P3.innerFrom(r[i++])}catch{o();return}var u=new T3.OperatorSubscriber(n,void 0,MO.noop,MO.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}Xl.onErrorResumeNext=R3});var kO=b(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.pairs=void 0;var M3=on();function k3(e,t){return M3.from(Object.entries(e),t)}Ql.pairs=k3});var CO=b(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.not=void 0;function C3(e,t){return function(r,n){return!e.call(t,r,n)}}ef.not=C3});var ji=b(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.filter=void 0;var q3=G(),I3=Y();function j3(e,t){return q3.operate(function(r,n){var i=0;r.subscribe(I3.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}tf.filter=j3});var jO=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.partition=void 0;var F3=CO(),qO=ji(),IO=ie();function L3(e,t,r){return[qO.filter(t,r)(IO.innerFrom(e)),qO.filter(F3.not(t,r))(IO.innerFrom(e))]}rf.partition=L3});var xv=b(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.raceInit=Yo.race=void 0;var N3=xe(),FO=ie(),D3=Ii(),z3=Y();function B3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=D3.argsOrArgArray(e),e.length===1?FO.innerFrom(e[0]):new N3.Observable(LO(e))}Yo.race=B3;function LO(e){return function(t){for(var r=[],n=function(o){r.push(FO.innerFrom(e[o]).subscribe(z3.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)}}Yo.raceInit=LO});var NO=b(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.range=void 0;var U3=xe(),W3=_r();function H3(e,t,r){if(t==null&&(t=e,e=0),t<=0)return W3.EMPTY;var n=t+e;return new U3.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()})}nf.range=H3});var DO=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.using=void 0;var V3=xe(),G3=ie(),$3=_r();function K3(e,t){return new V3.Observable(function(r){var n=e(),i=t(n),o=i?G3.innerFrom(i):$3.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}of.using=K3});var af=b(Nn=>{"use strict";var Y3=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},Z3=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.zip=void 0;var J3=xe(),X3=ie(),Q3=Ii(),e8=_r(),t8=Y(),r8=It();function n8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=r8.popResultSelector(e),n=Q3.argsOrArgArray(e);return n.length?new J3.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){X3.innerFrom(n[s]).subscribe(t8.createOperatorSubscriber(i,function(l){if(o[s].push(l),o.every(function(f){return f.length})){var d=o.map(function(f){return f.shift()});i.next(r?r.apply(void 0,Z3([],Y3(d))):d),o.some(function(f,p){return!f.length&&a[p]})&&i.complete()}},function(){a[s]=!0,!o[s].length&&i.complete()}))},c=0;!i.closed&&c<n.length;c++)u(c);return function(){o=a=null}}):e8.EMPTY}Nn.zip=n8});var BO=b(zO=>{"use strict";Object.defineProperty(zO,"__esModule",{value:!0})});var Sv=b(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.audit=void 0;var i8=G(),o8=ie(),UO=Y();function a8(e){return i8.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()},c=function(){o=null,a&&r.complete()};t.subscribe(UO.createOperatorSubscriber(r,function(s){n=!0,i=s,o||o8.innerFrom(e(s)).subscribe(o=UO.createOperatorSubscriber(r,u,c))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}uf.audit=a8});var WO=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.auditTime=void 0;var u8=qt(),s8=Sv(),c8=Ln();function l8(e,t){return t===void 0&&(t=u8.asyncScheduler),s8.audit(function(){return c8.timer(e,t)})}sf.auditTime=l8});var VO=b(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.buffer=void 0;var f8=G(),d8=ot(),HO=Y(),p8=ie();function h8(e){return f8.operate(function(t,r){var n=[];return t.subscribe(HO.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),p8.innerFrom(e).subscribe(HO.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},d8.noop)),function(){n=null}})}cf.buffer=h8});var GO=b(Zo=>{"use strict";var Ov=Zo&&Zo.__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(Zo,"__esModule",{value:!0});Zo.bufferCount=void 0;var m8=G(),v8=Y(),b8=rn();function g8(e,t){return t===void 0&&(t=null),t=t??e,m8.operate(function(r,n){var i=[],o=0;r.subscribe(v8.createOperatorSubscriber(n,function(a){var u,c,s,l,d=null;o++%t===0&&i.push([]);try{for(var f=Ov(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&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error}}if(d)try{for(var m=Ov(d),g=m.next();!g.done;g=m.next()){var h=g.value;b8.arrRemove(i,h),n.next(h)}}catch(_){s={error:_}}finally{try{g&&!g.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var c=Ov(i),s=c.next();!s.done;s=c.next()){var l=s.value;n.next(l)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=c.return)&&u.call(c)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}Zo.bufferCount=g8});var KO=b(Jo=>{"use strict";var _8=Jo&&Jo.__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(Jo,"__esModule",{value:!0});Jo.bufferTime=void 0;var y8=Dt(),w8=G(),x8=Y(),S8=rn(),O8=qt(),E8=It(),$O=nn();function A8(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=E8.popScheduler(n))!==null&&t!==void 0?t:O8.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return w8.operate(function(c,s){var l=[],d=!1,f=function(m){var g=m.buffer,_=m.subs;_.unsubscribe(),S8.arrRemove(l,m),s.next(g),d&&p()},p=function(){if(l){var m=new y8.Subscription;s.add(m);var g=[],_={buffer:g,subs:m};l.push(_),$O.executeSchedule(m,o,function(){return f(_)},e)}};a!==null&&a>=0?$O.executeSchedule(s,o,p,a,!0):d=!0,p();var h=x8.createOperatorSubscriber(s,function(m){var g,_,y=l.slice();try{for(var w=_8(y),E=w.next();!E.done;E=w.next()){var S=E.value,A=S.buffer;A.push(m),u<=A.length&&f(S)}}catch(T){g={error:T}}finally{try{E&&!E.done&&(_=w.return)&&_.call(w)}finally{if(g)throw g.error}}},function(){for(;l?.length;)s.next(l.shift().buffer);h?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return l=null});c.subscribe(h)})}Jo.bufferTime=A8});var JO=b(Xo=>{"use strict";var T8=Xo&&Xo.__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(Xo,"__esModule",{value:!0});Xo.bufferToggle=void 0;var P8=Dt(),R8=G(),YO=ie(),Ev=Y(),ZO=ot(),M8=rn();function k8(e,t){return R8.operate(function(r,n){var i=[];YO.innerFrom(e).subscribe(Ev.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new P8.Subscription,c=function(){M8.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(YO.innerFrom(t(o)).subscribe(Ev.createOperatorSubscriber(n,c,ZO.noop)))},ZO.noop)),r.subscribe(Ev.createOperatorSubscriber(n,function(o){var a,u;try{for(var c=T8(i),s=c.next();!s.done;s=c.next()){var l=s.value;l.push(o)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=c.return)&&u.call(c)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}Xo.bufferToggle=k8});var QO=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.bufferWhen=void 0;var C8=G(),q8=ot(),XO=Y(),I8=ie();function j8(e){return C8.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),I8.innerFrom(e()).subscribe(i=XO.createOperatorSubscriber(r,o,q8.noop))};o(),t.subscribe(XO.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}lf.bufferWhen=j8});var tE=b(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.catchError=void 0;var F8=ie(),L8=Y(),N8=G();function eE(e){return N8.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(L8.createOperatorSubscriber(r,void 0,void 0,function(a){o=F8.innerFrom(e(a,eE(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}ff.catchError=eE});var Av=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.scanInternals=void 0;var D8=Y();function z8(e,t,r,n,i){return function(o,a){var u=r,c=t,s=0;o.subscribe(D8.createOperatorSubscriber(a,function(l){var d=s++;c=u?e(c,l,d):(u=!0,l),n&&a.next(c)},i&&function(){u&&a.next(c),a.complete()}))}}df.scanInternals=z8});var Qo=b(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.reduce=void 0;var B8=Av(),U8=G();function W8(e,t){return U8.operate(B8.scanInternals(e,t,arguments.length>=2,!1,!0))}pf.reduce=W8});var Tv=b(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.toArray=void 0;var H8=Qo(),V8=G(),G8=function(e,t){return e.push(t),e};function $8(){return V8.operate(function(e,t){H8.reduce(G8,[])(e).subscribe(t)})}hf.toArray=$8});var Pv=b(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.joinAllInternals=void 0;var K8=at(),Y8=jn(),Z8=Eu(),J8=un(),X8=Tv();function Q8(e,t){return Z8.pipe(X8.toArray(),J8.mergeMap(function(r){return e(r)}),t?Y8.mapOneOrManyArgs(t):K8.identity)}mf.joinAllInternals=Q8});var Rv=b(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.combineLatestAll=void 0;var ez=jl(),tz=Pv();function rz(e){return tz.joinAllInternals(ez.combineLatest,e)}vf.combineLatestAll=rz});var rE=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.combineAll=void 0;var nz=Rv();bf.combineAll=nz.combineLatestAll});var aE=b(Dn=>{"use strict";var nE=Dn&&Dn.__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},iE=Dn&&Dn.__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(Dn,"__esModule",{value:!0});Dn.combineLatest=void 0;var iz=jl(),oz=G(),az=Ii(),uz=jn(),sz=Eu(),cz=It();function oE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=cz.popResultSelector(e);return r?sz.pipe(oE.apply(void 0,iE([],nE(e))),uz.mapOneOrManyArgs(r)):oz.operate(function(n,i){iz.combineLatestInit(iE([n],nE(az.argsOrArgArray(e))))(i)})}Dn.combineLatest=oE});var uE=b(zn=>{"use strict";var lz=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},fz=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.combineLatestWith=void 0;var dz=aE();function pz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return dz.combineLatest.apply(void 0,fz([],lz(e)))}zn.combineLatestWith=pz});var Mv=b(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.concatMap=void 0;var sE=un(),hz=ye();function mz(e,t){return hz.isFunction(t)?sE.mergeMap(e,t,1):sE.mergeMap(e,1)}gf.concatMap=mz});var lE=b(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.concatMapTo=void 0;var cE=Mv(),vz=ye();function bz(e,t){return vz.isFunction(t)?cE.concatMap(function(){return e},t):cE.concatMap(function(){return e})}_f.concatMapTo=bz});var fE=b(Bn=>{"use strict";var gz=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},_z=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.concat=void 0;var yz=G(),wz=Bl(),xz=It(),Sz=on();function Oz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xz.popScheduler(e);return yz.operate(function(n,i){wz.concatAll()(Sz.from(_z([n],gz(e)),r)).subscribe(i)})}Bn.concat=Oz});var dE=b(Un=>{"use strict";var Ez=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},Az=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.concatWith=void 0;var Tz=fE();function Pz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Tz.concat.apply(void 0,Az([],Ez(e)))}Un.concatWith=Pz});var pE=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.fromSubscribable=void 0;var Rz=xe();function Mz(e){return new Rz.Observable(function(t){return e.subscribe(t)})}yf.fromSubscribable=Mz});var xf=b(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.connect=void 0;var kz=ut(),Cz=ie(),qz=G(),Iz=pE(),jz={connector:function(){return new kz.Subject}};function Fz(e,t){t===void 0&&(t=jz);var r=t.connector;return qz.operate(function(n,i){var o=r();Cz.innerFrom(e(Iz.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}wf.connect=Fz});var hE=b(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.count=void 0;var Lz=Qo();function Nz(e){return Lz.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}Sf.count=Nz});var vE=b(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.debounce=void 0;var Dz=G(),zz=ot(),mE=Y(),Bz=ie();function Uz(e){return Dz.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(mE.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=mE.createOperatorSubscriber(r,a,zz.noop),Bz.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}Of.debounce=Uz});var bE=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.debounceTime=void 0;var Wz=qt(),Hz=G(),Vz=Y();function Gz(e,t){return t===void 0&&(t=Wz.asyncScheduler),Hz.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 c(){var s=a+e,l=t.now();if(l<s){i=this.schedule(void 0,s-l),n.add(i);return}u()}r.subscribe(Vz.createOperatorSubscriber(n,function(s){o=s,a=t.now(),i||(i=t.schedule(c,e),n.add(i))},function(){u(),n.complete()},void 0,function(){o=i=null}))})}Ef.debounceTime=Gz});var ju=b(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.defaultIfEmpty=void 0;var $z=G(),Kz=Y();function Yz(e){return $z.operate(function(t,r){var n=!1;t.subscribe(Kz.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}Af.defaultIfEmpty=Yz});var Fu=b(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.take=void 0;var Zz=_r(),Jz=G(),Xz=Y();function Qz(e){return e<=0?function(){return Zz.EMPTY}:Jz.operate(function(t,r){var n=0;t.subscribe(Xz.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}Tf.take=Qz});var kv=b(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.ignoreElements=void 0;var eB=G(),tB=Y(),rB=ot();function nB(){return eB.operate(function(e,t){e.subscribe(tB.createOperatorSubscriber(t,rB.noop))})}Pf.ignoreElements=nB});var Cv=b(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.mapTo=void 0;var iB=qn();function oB(e){return iB.map(function(){return e})}Rf.mapTo=oB});var qv=b(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.delayWhen=void 0;var aB=qu(),gE=Fu(),uB=kv(),sB=Cv(),cB=un(),lB=ie();function _E(e,t){return t?function(r){return aB.concat(t.pipe(gE.take(1),uB.ignoreElements()),r.pipe(_E(e)))}:cB.mergeMap(function(r,n){return lB.innerFrom(e(r,n)).pipe(gE.take(1),sB.mapTo(r))})}Mf.delayWhen=_E});var yE=b(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.delay=void 0;var fB=qt(),dB=qv(),pB=Ln();function hB(e,t){t===void 0&&(t=fB.asyncScheduler);var r=pB.timer(e,t);return dB.delayWhen(function(){return r})}kf.delay=hB});var wE=b(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.dematerialize=void 0;var mB=_l(),vB=G(),bB=Y();function gB(){return vB.operate(function(e,t){e.subscribe(bB.createOperatorSubscriber(t,function(r){return mB.observeNotification(r,t)}))})}Cf.dematerialize=gB});var SE=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.distinct=void 0;var _B=G(),xE=Y(),yB=ot(),wB=ie();function xB(e,t){return _B.operate(function(r,n){var i=new Set;r.subscribe(xE.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&wB.innerFrom(t).subscribe(xE.createOperatorSubscriber(n,function(){return i.clear()},yB.noop))})}qf.distinct=xB});var Iv=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.distinctUntilChanged=void 0;var SB=at(),OB=G(),EB=Y();function AB(e,t){return t===void 0&&(t=SB.identity),e=e??TB,OB.operate(function(r,n){var i,o=!0;r.subscribe(EB.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}If.distinctUntilChanged=AB;function TB(e,t){return e===t}});var OE=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.distinctUntilKeyChanged=void 0;var PB=Iv();function RB(e,t){return PB.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}jf.distinctUntilKeyChanged=RB});var Lu=b(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.throwIfEmpty=void 0;var MB=Cn(),kB=G(),CB=Y();function qB(e){return e===void 0&&(e=IB),kB.operate(function(t,r){var n=!1;t.subscribe(CB.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Ff.throwIfEmpty=qB;function IB(){return new MB.EmptyError}});var AE=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.elementAt=void 0;var EE=fv(),jB=ji(),FB=Lu(),LB=ju(),NB=Fu();function DB(e,t){if(e<0)throw new EE.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(jB.filter(function(i,o){return o===e}),NB.take(1),r?LB.defaultIfEmpty(t):FB.throwIfEmpty(function(){return new EE.ArgumentOutOfRangeError}))}}Lf.elementAt=DB});var TE=b(Wn=>{"use strict";var zB=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},BB=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.endWith=void 0;var UB=qu(),WB=bl();function HB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return UB.concat(r,WB.of.apply(void 0,BB([],zB(e))))}}Wn.endWith=HB});var PE=b(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.every=void 0;var VB=G(),GB=Y();function $B(e,t){return VB.operate(function(r,n){var i=0;r.subscribe(GB.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}Nf.every=$B});var jv=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.exhaustMap=void 0;var KB=qn(),RE=ie(),YB=G(),ME=Y();function kE(e,t){return t?function(r){return r.pipe(kE(function(n,i){return RE.innerFrom(e(n,i)).pipe(KB.map(function(o,a){return t(n,o,i,a)}))}))}:YB.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(ME.createOperatorSubscriber(n,function(u){o||(o=ME.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),RE.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}Df.exhaustMap=kE});var Fv=b(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.exhaustAll=void 0;var ZB=jv(),JB=at();function XB(){return ZB.exhaustMap(JB.identity)}zf.exhaustAll=XB});var CE=b(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.exhaust=void 0;var QB=Fv();Bf.exhaust=QB.exhaustAll});var qE=b(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.expand=void 0;var eU=G(),tU=Ll();function rU(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,eU.operate(function(n,i){return tU.mergeInternals(n,i,e,t,void 0,!0,r)})}Uf.expand=rU});var IE=b(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.finalize=void 0;var nU=G();function iU(e){return nU.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}Wf.finalize=iU});var Lv=b(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.createFind=ea.find=void 0;var oU=G(),aU=Y();function uU(e,t){return oU.operate(jE(e,t,"value"))}ea.find=uU;function jE(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(aU.createOperatorSubscriber(o,function(u){var c=a++;e.call(t,u,c,i)&&(o.next(n?c:u),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}ea.createFind=jE});var FE=b(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.findIndex=void 0;var sU=G(),cU=Lv();function lU(e,t){return sU.operate(cU.createFind(e,t,"index"))}Hf.findIndex=lU});var LE=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.first=void 0;var fU=Cn(),dU=ji(),pU=Fu(),hU=ju(),mU=Lu(),vU=at();function bU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?dU.filter(function(i,o){return e(i,o,n)}):vU.identity,pU.take(1),r?hU.defaultIfEmpty(t):mU.throwIfEmpty(function(){return new fU.EmptyError}))}}Vf.first=bU});var DE=b(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.groupBy=void 0;var gU=xe(),_U=ie(),yU=ut(),wU=G(),NE=Y();function xU(e,t,r,n){return wU.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,c=function(h){u.forEach(h),h(o)},s=function(h){return c(function(m){return m.error(h)})},l=0,d=!1,f=new NE.OperatorSubscriber(o,function(h){try{var m=e(h),g=u.get(m);if(!g){u.set(m,g=n?n():new yU.Subject);var _=p(m,g);if(o.next(_),r){var y=NE.createOperatorSubscriber(g,function(){g.complete(),y?.unsubscribe()},void 0,void 0,function(){return u.delete(m)});f.add(_U.innerFrom(r(_)).subscribe(y))}}g.next(a?a(h):h)}catch(w){s(w)}},function(){return c(function(h){return h.complete()})},s,function(){return u.clear()},function(){return d=!0,l===0});i.subscribe(f);function p(h,m){var g=new gU.Observable(function(_){l++;var y=m.subscribe(_);return function(){y.unsubscribe(),--l===0&&d&&f.unsubscribe()}});return g.key=h,g}})}Gf.groupBy=xU});var zE=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.isEmpty=void 0;var SU=G(),OU=Y();function EU(){return SU.operate(function(e,t){e.subscribe(OU.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}$f.isEmpty=EU});var Nv=b(ta=>{"use strict";var AU=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.takeLast=void 0;var TU=_r(),PU=G(),RU=Y();function MU(e){return e<=0?function(){return TU.EMPTY}:PU.operate(function(t,r){var n=[];t.subscribe(RU.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=AU(n),u=a.next();!u.done;u=a.next()){var c=u.value;r.next(c)}}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}))})}ta.takeLast=MU});var BE=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.last=void 0;var kU=Cn(),CU=ji(),qU=Nv(),IU=Lu(),jU=ju(),FU=at();function LU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?CU.filter(function(i,o){return e(i,o,n)}):FU.identity,qU.takeLast(1),r?jU.defaultIfEmpty(t):IU.throwIfEmpty(function(){return new kU.EmptyError}))}}Kf.last=LU});var UE=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.materialize=void 0;var Dv=_l(),NU=G(),DU=Y();function zU(){return NU.operate(function(e,t){e.subscribe(DU.createOperatorSubscriber(t,function(r){t.next(Dv.Notification.createNext(r))},function(){t.next(Dv.Notification.createComplete()),t.complete()},function(r){t.next(Dv.Notification.createError(r)),t.complete()}))})}Yf.materialize=zU});var WE=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.max=void 0;var BU=Qo(),UU=ye();function WU(e){return BU.reduce(UU.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}Zf.max=WU});var HE=b(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.flatMap=void 0;var HU=un();Jf.flatMap=HU.mergeMap});var GE=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.mergeMapTo=void 0;var VE=un(),VU=ye();function GU(e,t,r){return r===void 0&&(r=1/0),VU.isFunction(t)?VE.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),VE.mergeMap(function(){return e},r))}Xf.mergeMapTo=GU});var $E=b(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.mergeScan=void 0;var $U=G(),KU=Ll();function YU(e,t,r){return r===void 0&&(r=1/0),$U.operate(function(n,i){var o=t;return KU.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}Qf.mergeScan=YU});var YE=b(Hn=>{"use strict";var ZU=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},JU=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.merge=void 0;var XU=G(),QU=Ii(),eW=Cu(),KE=It(),tW=on();function rW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=KE.popScheduler(e),n=KE.popNumber(e,1/0);return e=QU.argsOrArgArray(e),XU.operate(function(i,o){eW.mergeAll(n)(tW.from(JU([i],ZU(e)),r)).subscribe(o)})}Hn.merge=rW});var ZE=b(Vn=>{"use strict";var nW=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},iW=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.mergeWith=void 0;var oW=YE();function aW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return oW.merge.apply(void 0,iW([],nW(e)))}Vn.mergeWith=aW});var JE=b(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.min=void 0;var uW=Qo(),sW=ye();function cW(e){return uW.reduce(sW.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}ed.min=cW});var rd=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.multicast=void 0;var lW=Au(),XE=ye(),fW=xf();function dW(e,t){var r=XE.isFunction(e)?e:function(){return e};return XE.isFunction(t)?fW.connect(t,{connector:r}):function(n){return new lW.ConnectableObservable(n,r)}}td.multicast=dW});var eA=b(Ur=>{"use strict";var pW=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},hW=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 mW=Ii(),vW=wv();function QE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=mW.argsOrArgArray(e);return function(n){return vW.onErrorResumeNext.apply(void 0,hW([n],pW(r)))}}Ur.onErrorResumeNextWith=QE;Ur.onErrorResumeNext=QE});var tA=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.pairwise=void 0;var bW=G(),gW=Y();function _W(){return bW.operate(function(e,t){var r,n=!1;e.subscribe(gW.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}nd.pairwise=_W});var rA=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.pluck=void 0;var yW=qn();function wW(){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 yW.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})}id.pluck=wW});var nA=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.publish=void 0;var xW=ut(),SW=rd(),OW=xf();function EW(e){return e?function(t){return OW.connect(e)(t)}:function(t){return SW.multicast(new xW.Subject)(t)}}od.publish=EW});var iA=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.publishBehavior=void 0;var AW=Km(),TW=Au();function PW(e){return function(t){var r=new AW.BehaviorSubject(e);return new TW.ConnectableObservable(t,function(){return r})}}ad.publishBehavior=PW});var oA=b(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.publishLast=void 0;var RW=$c(),MW=Au();function kW(){return function(e){var t=new RW.AsyncSubject;return new MW.ConnectableObservable(e,function(){return t})}}ud.publishLast=kW});var uA=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.publishReplay=void 0;var CW=Gc(),qW=rd(),aA=ye();function IW(e,t,r,n){r&&!aA.isFunction(r)&&(n=r);var i=aA.isFunction(r)?r:void 0;return function(o){return qW.multicast(new CW.ReplaySubject(e,t,n),i)(o)}}sd.publishReplay=IW});var sA=b(Gn=>{"use strict";var jW=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},FW=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.raceWith=void 0;var LW=xv(),NW=G(),DW=at();function zW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?NW.operate(function(r,n){LW.raceInit(FW([r],jW(e)))(n)}):DW.identity}Gn.raceWith=zW});var lA=b(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.repeat=void 0;var BW=_r(),UW=G(),cA=Y(),WW=ie(),HW=Ln();function VW(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 BW.EMPTY}:UW.operate(function(i,o){var a=0,u,c=function(){if(u?.unsubscribe(),u=null,n!=null){var l=typeof n=="number"?HW.timer(n):WW.innerFrom(n(a)),d=cA.createOperatorSubscriber(o,function(){d.unsubscribe(),s()});l.subscribe(d)}else s()},s=function(){var l=!1;u=i.subscribe(cA.createOperatorSubscriber(o,void 0,function(){++a<r?u?c():l=!0:o.complete()})),l&&c()};s()})}cd.repeat=VW});var dA=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.repeatWhen=void 0;var GW=ie(),$W=ut(),KW=G(),fA=Y();function YW(e){return KW.operate(function(t,r){var n,i=!1,o,a=!1,u=!1,c=function(){return u&&a&&(r.complete(),!0)},s=function(){return o||(o=new $W.Subject,GW.innerFrom(e(o)).subscribe(fA.createOperatorSubscriber(r,function(){n?l():i=!0},function(){a=!0,c()}))),o},l=function(){u=!1,n=t.subscribe(fA.createOperatorSubscriber(r,void 0,function(){u=!0,!c()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,l())};l()})}ld.repeatWhen=YW});var hA=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.retry=void 0;var ZW=G(),pA=Y(),JW=at(),XW=Ln(),QW=ie();function e4(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?JW.identity:ZW.operate(function(u,c){var s=0,l,d=function(){var f=!1;l=u.subscribe(pA.createOperatorSubscriber(c,function(p){a&&(s=0),c.next(p)},void 0,function(p){if(s++<n){var h=function(){l?(l.unsubscribe(),l=null,d()):f=!0};if(i!=null){var m=typeof i=="number"?XW.timer(i):QW.innerFrom(i(p,s)),g=pA.createOperatorSubscriber(c,function(){g.unsubscribe(),h()},function(){c.complete()});m.subscribe(g)}else h()}else c.error(p)})),f&&(l.unsubscribe(),l=null,d())};d()})}fd.retry=e4});var vA=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.retryWhen=void 0;var t4=ie(),r4=ut(),n4=G(),mA=Y();function i4(e){return n4.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(mA.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new r4.Subject,t4.innerFrom(e(o)).subscribe(mA.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}dd.retryWhen=i4});var zv=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.sample=void 0;var o4=ie(),a4=G(),u4=ot(),bA=Y();function s4(e){return a4.operate(function(t,r){var n=!1,i=null;t.subscribe(bA.createOperatorSubscriber(r,function(o){n=!0,i=o})),o4.innerFrom(e).subscribe(bA.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},u4.noop))})}pd.sample=s4});var gA=b(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.sampleTime=void 0;var c4=qt(),l4=zv(),f4=_v();function d4(e,t){return t===void 0&&(t=c4.asyncScheduler),l4.sample(f4.interval(e,t))}hd.sampleTime=d4});var _A=b(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.scan=void 0;var p4=G(),h4=Av();function m4(e,t){return p4.operate(h4.scanInternals(e,t,arguments.length>=2,!0))}md.scan=m4});var wA=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.sequenceEqual=void 0;var v4=G(),b4=Y(),g4=ie();function _4(e,t){return t===void 0&&(t=function(r,n){return r===n}),v4.operate(function(r,n){var i=yA(),o=yA(),a=function(c){n.next(c),n.complete()},u=function(c,s){var l=b4.createOperatorSubscriber(n,function(d){var f=s.buffer,p=s.complete;f.length===0?p?a(!1):c.buffer.push(d):!t(d,f.shift())&&a(!1)},function(){c.complete=!0;var d=s.complete,f=s.buffer;d&&a(f.length===0),l?.unsubscribe()});return l};r.subscribe(u(i,o)),g4.innerFrom(e).subscribe(u(o,i))})}vd.sequenceEqual=_4;function yA(){return{buffer:[],complete:!1}}});var Uv=b($n=>{"use strict";var y4=$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},w4=$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.share=void 0;var xA=ie(),x4=ut(),SA=Oo(),S4=G();function O4(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new x4.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,u=e.resetOnRefCountZero,c=u===void 0?!0:u;return function(s){var l,d,f,p=0,h=!1,m=!1,g=function(){d?.unsubscribe(),d=void 0},_=function(){g(),l=f=void 0,h=m=!1},y=function(){var w=l;_(),w?.unsubscribe()};return S4.operate(function(w,E){p++,!m&&!h&&g();var S=f=f??r();E.add(function(){p--,p===0&&!m&&!h&&(d=Bv(y,c))}),S.subscribe(E),!l&&p>0&&(l=new SA.SafeSubscriber({next:function(A){return S.next(A)},error:function(A){m=!0,g(),d=Bv(_,i,A),S.error(A)},complete:function(){h=!0,g(),d=Bv(_,a),S.complete()}}),xA.innerFrom(w).subscribe(l))})(s)}}$n.share=O4;function Bv(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 SA.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return xA.innerFrom(t.apply(void 0,w4([],y4(r)))).subscribe(i)}}});var OA=b(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.shareReplay=void 0;var E4=Gc(),A4=Uv();function T4(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,A4.share({connector:function(){return new E4.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}bd.shareReplay=T4});var EA=b(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.single=void 0;var P4=Cn(),R4=pv(),M4=dv(),k4=G(),C4=Y();function q4(e){return k4.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(C4.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new R4.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new M4.NotFoundError("No matching values"):new P4.EmptyError)}))})}gd.single=q4});var AA=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.skip=void 0;var I4=ji();function j4(e){return I4.filter(function(t,r){return e<=r})}_d.skip=j4});var TA=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.skipLast=void 0;var F4=at(),L4=G(),N4=Y();function D4(e){return e<=0?F4.identity:L4.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(N4.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var u=a%e,c=n[u];n[u]=o,r.next(c)}})),function(){n=null}})}yd.skipLast=D4});var RA=b(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.skipUntil=void 0;var z4=G(),PA=Y(),B4=ie(),U4=ot();function W4(e){return z4.operate(function(t,r){var n=!1,i=PA.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},U4.noop);B4.innerFrom(e).subscribe(i),t.subscribe(PA.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}wd.skipUntil=W4});var MA=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.skipWhile=void 0;var H4=G(),V4=Y();function G4(e){return H4.operate(function(t,r){var n=!1,i=0;t.subscribe(V4.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}xd.skipWhile=G4});var CA=b(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.startWith=void 0;var kA=qu(),$4=It(),K4=G();function Y4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=$4.popScheduler(e);return K4.operate(function(n,i){(r?kA.concat(e,n,r):kA.concat(e,n)).subscribe(i)})}Sd.startWith=Y4});var Nu=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.switchMap=void 0;var Z4=ie(),J4=G(),qA=Y();function X4(e,t){return J4.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(qA.createOperatorSubscriber(n,function(c){i?.unsubscribe();var s=0,l=o++;Z4.innerFrom(e(c,l)).subscribe(i=qA.createOperatorSubscriber(n,function(d){return n.next(t?t(c,d,l,s++):d)},function(){i=null,u()}))},function(){a=!0,u()}))})}Od.switchMap=X4});var IA=b(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.switchAll=void 0;var Q4=Nu(),e7=at();function t7(){return Q4.switchMap(e7.identity)}Ed.switchAll=t7});var FA=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.switchMapTo=void 0;var jA=Nu(),r7=ye();function n7(e,t){return r7.isFunction(t)?jA.switchMap(function(){return e},t):jA.switchMap(function(){return e})}Ad.switchMapTo=n7});var LA=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.switchScan=void 0;var i7=Nu(),o7=G();function a7(e,t){return o7.operate(function(r,n){var i=t;return i7.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}Td.switchScan=a7});var NA=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.takeUntil=void 0;var u7=G(),s7=Y(),c7=ie(),l7=ot();function f7(e){return u7.operate(function(t,r){c7.innerFrom(e).subscribe(s7.createOperatorSubscriber(r,function(){return r.complete()},l7.noop)),!r.closed&&t.subscribe(r)})}Pd.takeUntil=f7});var DA=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.takeWhile=void 0;var d7=G(),p7=Y();function h7(e,t){return t===void 0&&(t=!1),d7.operate(function(r,n){var i=0;r.subscribe(p7.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Rd.takeWhile=h7});var zA=b(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.tap=void 0;var m7=ye(),v7=G(),b7=Y(),g7=at();function _7(e,t,r){var n=m7.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?v7.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(b7.createOperatorSubscriber(o,function(c){var s;(s=n.next)===null||s===void 0||s.call(n,c),o.next(c)},function(){var c;u=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},function(c){var s;u=!1,(s=n.error)===null||s===void 0||s.call(n,c),o.error(c)},function(){var c,s;u&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(s=n.finalize)===null||s===void 0||s.call(n)}))}):g7.identity}Md.tap=_7});var Wv=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.throttle=void 0;var y7=G(),BA=Y(),w7=ie();function x7(e,t){return y7.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,u=i.trailing,c=u===void 0?!1:u,s=!1,l=null,d=null,f=!1,p=function(){d?.unsubscribe(),d=null,c&&(g(),f&&n.complete())},h=function(){d=null,f&&n.complete()},m=function(_){return d=w7.innerFrom(e(_)).subscribe(BA.createOperatorSubscriber(n,p,h))},g=function(){if(s){s=!1;var _=l;l=null,n.next(_),!f&&m(_)}};r.subscribe(BA.createOperatorSubscriber(n,function(_){s=!0,l=_,!(d&&!d.closed)&&(a?g():m(_))},function(){f=!0,!(c&&s&&d&&!d.closed)&&n.complete()}))})}kd.throttle=x7});var UA=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.throttleTime=void 0;var S7=qt(),O7=Wv(),E7=Ln();function A7(e,t,r){t===void 0&&(t=S7.asyncScheduler);var n=E7.timer(e,t);return O7.throttle(function(){return n},r)}Cd.throttleTime=A7});var HA=b(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.TimeInterval=ra.timeInterval=void 0;var T7=qt(),P7=G(),R7=Y();function M7(e){return e===void 0&&(e=T7.asyncScheduler),P7.operate(function(t,r){var n=e.now();t.subscribe(R7.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new WA(i,a))}))})}ra.timeInterval=M7;var WA=function(){function e(t,r){this.value=t,this.interval=r}return e}();ra.TimeInterval=WA});var VA=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.timeoutWith=void 0;var k7=qt(),C7=Pl(),q7=Rl();function I7(e,t,r){var n,i,o;if(r=r??k7.async,C7.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 q7.timeout({first:n,each:i,scheduler:r,with:o})}qd.timeoutWith=I7});var GA=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.timestamp=void 0;var j7=Vc(),F7=qn();function L7(e){return e===void 0&&(e=j7.dateTimestampProvider),F7.map(function(t){return{value:t,timestamp:e.now()}})}Id.timestamp=L7});var YA=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.window=void 0;var $A=ut(),N7=G(),KA=Y(),D7=ot(),z7=ie();function B7(e){return N7.operate(function(t,r){var n=new $A.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(KA.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),z7.innerFrom(e).subscribe(KA.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new $A.Subject)},D7.noop,i)),function(){n?.unsubscribe(),n=null}})}jd.window=B7});var JA=b(na=>{"use strict";var U7=na&&na.__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(na,"__esModule",{value:!0});na.windowCount=void 0;var ZA=ut(),W7=G(),H7=Y();function V7(e,t){t===void 0&&(t=0);var r=t>0?t:e;return W7.operate(function(n,i){var o=[new ZA.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(H7.createOperatorSubscriber(i,function(c){var s,l;try{for(var d=U7(o),f=d.next();!f.done;f=d.next()){var p=f.value;p.next(c)}}catch(g){s={error:g}}finally{try{f&&!f.done&&(l=d.return)&&l.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 ZA.Subject;o.push(m),i.next(m.asObservable())}},function(){for(;o.length>0;)o.shift().complete();i.complete()},function(c){for(;o.length>0;)o.shift().error(c);i.error(c)},function(){a=null,o=null}))})}na.windowCount=V7});var QA=b(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.windowTime=void 0;var G7=ut(),$7=qt(),K7=Dt(),Y7=G(),Z7=Y(),J7=rn(),X7=It(),XA=nn();function Q7(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=X7.popScheduler(n))!==null&&t!==void 0?t:$7.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return Y7.operate(function(c,s){var l=[],d=!1,f=function(g){var _=g.window,y=g.subs;_.complete(),y.unsubscribe(),J7.arrRemove(l,g),d&&p()},p=function(){if(l){var g=new K7.Subscription;s.add(g);var _=new G7.Subject,y={window:_,subs:g,seen:0};l.push(y),s.next(_.asObservable()),XA.executeSchedule(g,o,function(){return f(y)},e)}};a!==null&&a>=0?XA.executeSchedule(s,o,p,a,!0):d=!0,p();var h=function(g){return l.slice().forEach(g)},m=function(g){h(function(_){var y=_.window;return g(y)}),g(s),s.unsubscribe()};return c.subscribe(Z7.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(){l=null}})}Fd.windowTime=Q7});var rT=b(ia=>{"use strict";var eH=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.windowToggle=void 0;var tH=ut(),rH=Dt(),nH=G(),eT=ie(),Hv=Y(),tT=ot(),iH=rn();function oH(e,t){return nH.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};eT.innerFrom(e).subscribe(Hv.createOperatorSubscriber(n,function(a){var u=new tH.Subject;i.push(u);var c=new rH.Subscription,s=function(){iH.arrRemove(i,u),u.complete(),c.unsubscribe()},l;try{l=eT.innerFrom(t(a))}catch(d){o(d);return}n.next(u.asObservable()),c.add(l.subscribe(Hv.createOperatorSubscriber(n,s,tT.noop,o)))},tT.noop)),r.subscribe(Hv.createOperatorSubscriber(n,function(a){var u,c,s=i.slice();try{for(var l=eH(s),d=l.next();!d.done;d=l.next()){var f=d.value;f.next(a)}}catch(p){u={error:p}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}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()}))})}ia.windowToggle=oH});var iT=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.windowWhen=void 0;var aH=ut(),uH=G(),nT=Y(),sH=ie();function cH(e){return uH.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new aH.Subject,r.next(n.asObservable());var u;try{u=sH.innerFrom(e())}catch(c){o(c);return}u.subscribe(i=nT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(nT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}Ld.windowWhen=cH});var sT=b(Kn=>{"use strict";var oT=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},aT=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.withLatestFrom=void 0;var lH=G(),uT=Y(),fH=ie(),dH=at(),pH=ot(),hH=It();function mH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=hH.popResultSelector(e);return lH.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),c=!1,s=function(d){fH.innerFrom(e[d]).subscribe(uT.createOperatorSubscriber(i,function(f){a[d]=f,!c&&!u[d]&&(u[d]=!0,(c=u.every(dH.identity))&&(u=null))},pH.noop))},l=0;l<o;l++)s(l);n.subscribe(uT.createOperatorSubscriber(i,function(d){if(c){var f=aT([d],oT(a));i.next(r?r.apply(void 0,aT([],oT(f))):f)}}))})}Kn.withLatestFrom=mH});var cT=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.zipAll=void 0;var vH=af(),bH=Pv();function gH(e){return bH.joinAllInternals(vH.zip,e)}Nd.zipAll=gH});var lT=b(Yn=>{"use strict";var _H=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},yH=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.zip=void 0;var wH=af(),xH=G();function SH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return xH.operate(function(r,n){wH.zip.apply(void 0,yH([r],_H(e))).subscribe(n)})}Yn.zip=SH});var fT=b(Zn=>{"use strict";var OH=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},EH=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.zipWith=void 0;var AH=lT();function TH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AH.zip.apply(void 0,EH([],OH(e)))}Zn.zipWith=TH});var gT=b(v=>{"use strict";var PH=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]}),RH=v&&v.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&PH(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 MH=xe();Object.defineProperty(v,"Observable",{enumerable:!0,get:function(){return MH.Observable}});var kH=Au();Object.defineProperty(v,"ConnectableObservable",{enumerable:!0,get:function(){return kH.ConnectableObservable}});var CH=Ou();Object.defineProperty(v,"observable",{enumerable:!0,get:function(){return CH.observable}});var qH=vS();Object.defineProperty(v,"animationFrames",{enumerable:!0,get:function(){return qH.animationFrames}});var IH=ut();Object.defineProperty(v,"Subject",{enumerable:!0,get:function(){return IH.Subject}});var jH=Km();Object.defineProperty(v,"BehaviorSubject",{enumerable:!0,get:function(){return jH.BehaviorSubject}});var FH=Gc();Object.defineProperty(v,"ReplaySubject",{enumerable:!0,get:function(){return FH.ReplaySubject}});var LH=$c();Object.defineProperty(v,"AsyncSubject",{enumerable:!0,get:function(){return LH.AsyncSubject}});var dT=qS();Object.defineProperty(v,"asap",{enumerable:!0,get:function(){return dT.asap}});Object.defineProperty(v,"asapScheduler",{enumerable:!0,get:function(){return dT.asapScheduler}});var pT=qt();Object.defineProperty(v,"async",{enumerable:!0,get:function(){return pT.async}});Object.defineProperty(v,"asyncScheduler",{enumerable:!0,get:function(){return pT.asyncScheduler}});var hT=FS();Object.defineProperty(v,"queue",{enumerable:!0,get:function(){return hT.queue}});Object.defineProperty(v,"queueScheduler",{enumerable:!0,get:function(){return hT.queueScheduler}});var mT=zS();Object.defineProperty(v,"animationFrame",{enumerable:!0,get:function(){return mT.animationFrame}});Object.defineProperty(v,"animationFrameScheduler",{enumerable:!0,get:function(){return mT.animationFrameScheduler}});var vT=WS();Object.defineProperty(v,"VirtualTimeScheduler",{enumerable:!0,get:function(){return vT.VirtualTimeScheduler}});Object.defineProperty(v,"VirtualAction",{enumerable:!0,get:function(){return vT.VirtualAction}});var NH=Zm();Object.defineProperty(v,"Scheduler",{enumerable:!0,get:function(){return NH.Scheduler}});var DH=Dt();Object.defineProperty(v,"Subscription",{enumerable:!0,get:function(){return DH.Subscription}});var zH=Oo();Object.defineProperty(v,"Subscriber",{enumerable:!0,get:function(){return zH.Subscriber}});var bT=_l();Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return bT.Notification}});Object.defineProperty(v,"NotificationKind",{enumerable:!0,get:function(){return bT.NotificationKind}});var BH=Eu();Object.defineProperty(v,"pipe",{enumerable:!0,get:function(){return BH.pipe}});var UH=ot();Object.defineProperty(v,"noop",{enumerable:!0,get:function(){return UH.noop}});var WH=at();Object.defineProperty(v,"identity",{enumerable:!0,get:function(){return WH.identity}});var HH=aO();Object.defineProperty(v,"isObservable",{enumerable:!0,get:function(){return HH.isObservable}});var VH=uO();Object.defineProperty(v,"lastValueFrom",{enumerable:!0,get:function(){return VH.lastValueFrom}});var GH=sO();Object.defineProperty(v,"firstValueFrom",{enumerable:!0,get:function(){return GH.firstValueFrom}});var $H=fv();Object.defineProperty(v,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return $H.ArgumentOutOfRangeError}});var KH=Cn();Object.defineProperty(v,"EmptyError",{enumerable:!0,get:function(){return KH.EmptyError}});var YH=dv();Object.defineProperty(v,"NotFoundError",{enumerable:!0,get:function(){return YH.NotFoundError}});var ZH=Hm();Object.defineProperty(v,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return ZH.ObjectUnsubscribedError}});var JH=pv();Object.defineProperty(v,"SequenceError",{enumerable:!0,get:function(){return JH.SequenceError}});var XH=Rl();Object.defineProperty(v,"TimeoutError",{enumerable:!0,get:function(){return XH.TimeoutError}});var QH=km();Object.defineProperty(v,"UnsubscriptionError",{enumerable:!0,get:function(){return QH.UnsubscriptionError}});var eV=lO();Object.defineProperty(v,"bindCallback",{enumerable:!0,get:function(){return eV.bindCallback}});var tV=fO();Object.defineProperty(v,"bindNodeCallback",{enumerable:!0,get:function(){return tV.bindNodeCallback}});var rV=jl();Object.defineProperty(v,"combineLatest",{enumerable:!0,get:function(){return rV.combineLatest}});var nV=qu();Object.defineProperty(v,"concat",{enumerable:!0,get:function(){return nV.concat}});var iV=_O();Object.defineProperty(v,"connectable",{enumerable:!0,get:function(){return iV.connectable}});var oV=Iu();Object.defineProperty(v,"defer",{enumerable:!0,get:function(){return oV.defer}});var aV=_r();Object.defineProperty(v,"empty",{enumerable:!0,get:function(){return aV.empty}});var uV=yO();Object.defineProperty(v,"forkJoin",{enumerable:!0,get:function(){return uV.forkJoin}});var sV=on();Object.defineProperty(v,"from",{enumerable:!0,get:function(){return sV.from}});var cV=xO();Object.defineProperty(v,"fromEvent",{enumerable:!0,get:function(){return cV.fromEvent}});var lV=OO();Object.defineProperty(v,"fromEventPattern",{enumerable:!0,get:function(){return lV.fromEventPattern}});var fV=AO();Object.defineProperty(v,"generate",{enumerable:!0,get:function(){return fV.generate}});var dV=TO();Object.defineProperty(v,"iif",{enumerable:!0,get:function(){return dV.iif}});var pV=_v();Object.defineProperty(v,"interval",{enumerable:!0,get:function(){return pV.interval}});var hV=RO();Object.defineProperty(v,"merge",{enumerable:!0,get:function(){return hV.merge}});var mV=yv();Object.defineProperty(v,"never",{enumerable:!0,get:function(){return mV.never}});var vV=bl();Object.defineProperty(v,"of",{enumerable:!0,get:function(){return vV.of}});var bV=wv();Object.defineProperty(v,"onErrorResumeNext",{enumerable:!0,get:function(){return bV.onErrorResumeNext}});var gV=kO();Object.defineProperty(v,"pairs",{enumerable:!0,get:function(){return gV.pairs}});var _V=jO();Object.defineProperty(v,"partition",{enumerable:!0,get:function(){return _V.partition}});var yV=xv();Object.defineProperty(v,"race",{enumerable:!0,get:function(){return yV.race}});var wV=NO();Object.defineProperty(v,"range",{enumerable:!0,get:function(){return wV.range}});var xV=lv();Object.defineProperty(v,"throwError",{enumerable:!0,get:function(){return xV.throwError}});var SV=Ln();Object.defineProperty(v,"timer",{enumerable:!0,get:function(){return SV.timer}});var OV=DO();Object.defineProperty(v,"using",{enumerable:!0,get:function(){return OV.using}});var EV=af();Object.defineProperty(v,"zip",{enumerable:!0,get:function(){return EV.zip}});var AV=cv();Object.defineProperty(v,"scheduled",{enumerable:!0,get:function(){return AV.scheduled}});var TV=_r();Object.defineProperty(v,"EMPTY",{enumerable:!0,get:function(){return TV.EMPTY}});var PV=yv();Object.defineProperty(v,"NEVER",{enumerable:!0,get:function(){return PV.NEVER}});RH(BO(),v);var RV=xo();Object.defineProperty(v,"config",{enumerable:!0,get:function(){return RV.config}});var MV=Sv();Object.defineProperty(v,"audit",{enumerable:!0,get:function(){return MV.audit}});var kV=WO();Object.defineProperty(v,"auditTime",{enumerable:!0,get:function(){return kV.auditTime}});var CV=VO();Object.defineProperty(v,"buffer",{enumerable:!0,get:function(){return CV.buffer}});var qV=GO();Object.defineProperty(v,"bufferCount",{enumerable:!0,get:function(){return qV.bufferCount}});var IV=KO();Object.defineProperty(v,"bufferTime",{enumerable:!0,get:function(){return IV.bufferTime}});var jV=JO();Object.defineProperty(v,"bufferToggle",{enumerable:!0,get:function(){return jV.bufferToggle}});var FV=QO();Object.defineProperty(v,"bufferWhen",{enumerable:!0,get:function(){return FV.bufferWhen}});var LV=tE();Object.defineProperty(v,"catchError",{enumerable:!0,get:function(){return LV.catchError}});var NV=rE();Object.defineProperty(v,"combineAll",{enumerable:!0,get:function(){return NV.combineAll}});var DV=Rv();Object.defineProperty(v,"combineLatestAll",{enumerable:!0,get:function(){return DV.combineLatestAll}});var zV=uE();Object.defineProperty(v,"combineLatestWith",{enumerable:!0,get:function(){return zV.combineLatestWith}});var BV=Bl();Object.defineProperty(v,"concatAll",{enumerable:!0,get:function(){return BV.concatAll}});var UV=Mv();Object.defineProperty(v,"concatMap",{enumerable:!0,get:function(){return UV.concatMap}});var WV=lE();Object.defineProperty(v,"concatMapTo",{enumerable:!0,get:function(){return WV.concatMapTo}});var HV=dE();Object.defineProperty(v,"concatWith",{enumerable:!0,get:function(){return HV.concatWith}});var VV=xf();Object.defineProperty(v,"connect",{enumerable:!0,get:function(){return VV.connect}});var GV=hE();Object.defineProperty(v,"count",{enumerable:!0,get:function(){return GV.count}});var $V=vE();Object.defineProperty(v,"debounce",{enumerable:!0,get:function(){return $V.debounce}});var KV=bE();Object.defineProperty(v,"debounceTime",{enumerable:!0,get:function(){return KV.debounceTime}});var YV=ju();Object.defineProperty(v,"defaultIfEmpty",{enumerable:!0,get:function(){return YV.defaultIfEmpty}});var ZV=yE();Object.defineProperty(v,"delay",{enumerable:!0,get:function(){return ZV.delay}});var JV=qv();Object.defineProperty(v,"delayWhen",{enumerable:!0,get:function(){return JV.delayWhen}});var XV=wE();Object.defineProperty(v,"dematerialize",{enumerable:!0,get:function(){return XV.dematerialize}});var QV=SE();Object.defineProperty(v,"distinct",{enumerable:!0,get:function(){return QV.distinct}});var eG=Iv();Object.defineProperty(v,"distinctUntilChanged",{enumerable:!0,get:function(){return eG.distinctUntilChanged}});var tG=OE();Object.defineProperty(v,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return tG.distinctUntilKeyChanged}});var rG=AE();Object.defineProperty(v,"elementAt",{enumerable:!0,get:function(){return rG.elementAt}});var nG=TE();Object.defineProperty(v,"endWith",{enumerable:!0,get:function(){return nG.endWith}});var iG=PE();Object.defineProperty(v,"every",{enumerable:!0,get:function(){return iG.every}});var oG=CE();Object.defineProperty(v,"exhaust",{enumerable:!0,get:function(){return oG.exhaust}});var aG=Fv();Object.defineProperty(v,"exhaustAll",{enumerable:!0,get:function(){return aG.exhaustAll}});var uG=jv();Object.defineProperty(v,"exhaustMap",{enumerable:!0,get:function(){return uG.exhaustMap}});var sG=qE();Object.defineProperty(v,"expand",{enumerable:!0,get:function(){return sG.expand}});var cG=ji();Object.defineProperty(v,"filter",{enumerable:!0,get:function(){return cG.filter}});var lG=IE();Object.defineProperty(v,"finalize",{enumerable:!0,get:function(){return lG.finalize}});var fG=Lv();Object.defineProperty(v,"find",{enumerable:!0,get:function(){return fG.find}});var dG=FE();Object.defineProperty(v,"findIndex",{enumerable:!0,get:function(){return dG.findIndex}});var pG=LE();Object.defineProperty(v,"first",{enumerable:!0,get:function(){return pG.first}});var hG=DE();Object.defineProperty(v,"groupBy",{enumerable:!0,get:function(){return hG.groupBy}});var mG=kv();Object.defineProperty(v,"ignoreElements",{enumerable:!0,get:function(){return mG.ignoreElements}});var vG=zE();Object.defineProperty(v,"isEmpty",{enumerable:!0,get:function(){return vG.isEmpty}});var bG=BE();Object.defineProperty(v,"last",{enumerable:!0,get:function(){return bG.last}});var gG=qn();Object.defineProperty(v,"map",{enumerable:!0,get:function(){return gG.map}});var _G=Cv();Object.defineProperty(v,"mapTo",{enumerable:!0,get:function(){return _G.mapTo}});var yG=UE();Object.defineProperty(v,"materialize",{enumerable:!0,get:function(){return yG.materialize}});var wG=WE();Object.defineProperty(v,"max",{enumerable:!0,get:function(){return wG.max}});var xG=Cu();Object.defineProperty(v,"mergeAll",{enumerable:!0,get:function(){return xG.mergeAll}});var SG=HE();Object.defineProperty(v,"flatMap",{enumerable:!0,get:function(){return SG.flatMap}});var OG=un();Object.defineProperty(v,"mergeMap",{enumerable:!0,get:function(){return OG.mergeMap}});var EG=GE();Object.defineProperty(v,"mergeMapTo",{enumerable:!0,get:function(){return EG.mergeMapTo}});var AG=$E();Object.defineProperty(v,"mergeScan",{enumerable:!0,get:function(){return AG.mergeScan}});var TG=ZE();Object.defineProperty(v,"mergeWith",{enumerable:!0,get:function(){return TG.mergeWith}});var PG=JE();Object.defineProperty(v,"min",{enumerable:!0,get:function(){return PG.min}});var RG=rd();Object.defineProperty(v,"multicast",{enumerable:!0,get:function(){return RG.multicast}});var MG=Mu();Object.defineProperty(v,"observeOn",{enumerable:!0,get:function(){return MG.observeOn}});var kG=eA();Object.defineProperty(v,"onErrorResumeNextWith",{enumerable:!0,get:function(){return kG.onErrorResumeNextWith}});var CG=tA();Object.defineProperty(v,"pairwise",{enumerable:!0,get:function(){return CG.pairwise}});var qG=rA();Object.defineProperty(v,"pluck",{enumerable:!0,get:function(){return qG.pluck}});var IG=nA();Object.defineProperty(v,"publish",{enumerable:!0,get:function(){return IG.publish}});var jG=iA();Object.defineProperty(v,"publishBehavior",{enumerable:!0,get:function(){return jG.publishBehavior}});var FG=oA();Object.defineProperty(v,"publishLast",{enumerable:!0,get:function(){return FG.publishLast}});var LG=uA();Object.defineProperty(v,"publishReplay",{enumerable:!0,get:function(){return LG.publishReplay}});var NG=sA();Object.defineProperty(v,"raceWith",{enumerable:!0,get:function(){return NG.raceWith}});var DG=Qo();Object.defineProperty(v,"reduce",{enumerable:!0,get:function(){return DG.reduce}});var zG=lA();Object.defineProperty(v,"repeat",{enumerable:!0,get:function(){return zG.repeat}});var BG=dA();Object.defineProperty(v,"repeatWhen",{enumerable:!0,get:function(){return BG.repeatWhen}});var UG=hA();Object.defineProperty(v,"retry",{enumerable:!0,get:function(){return UG.retry}});var WG=vA();Object.defineProperty(v,"retryWhen",{enumerable:!0,get:function(){return WG.retryWhen}});var HG=Um();Object.defineProperty(v,"refCount",{enumerable:!0,get:function(){return HG.refCount}});var VG=zv();Object.defineProperty(v,"sample",{enumerable:!0,get:function(){return VG.sample}});var GG=gA();Object.defineProperty(v,"sampleTime",{enumerable:!0,get:function(){return GG.sampleTime}});var $G=_A();Object.defineProperty(v,"scan",{enumerable:!0,get:function(){return $G.scan}});var KG=wA();Object.defineProperty(v,"sequenceEqual",{enumerable:!0,get:function(){return KG.sequenceEqual}});var YG=Uv();Object.defineProperty(v,"share",{enumerable:!0,get:function(){return YG.share}});var ZG=OA();Object.defineProperty(v,"shareReplay",{enumerable:!0,get:function(){return ZG.shareReplay}});var JG=EA();Object.defineProperty(v,"single",{enumerable:!0,get:function(){return JG.single}});var XG=AA();Object.defineProperty(v,"skip",{enumerable:!0,get:function(){return XG.skip}});var QG=TA();Object.defineProperty(v,"skipLast",{enumerable:!0,get:function(){return QG.skipLast}});var e9=RA();Object.defineProperty(v,"skipUntil",{enumerable:!0,get:function(){return e9.skipUntil}});var t9=MA();Object.defineProperty(v,"skipWhile",{enumerable:!0,get:function(){return t9.skipWhile}});var r9=CA();Object.defineProperty(v,"startWith",{enumerable:!0,get:function(){return r9.startWith}});var n9=ku();Object.defineProperty(v,"subscribeOn",{enumerable:!0,get:function(){return n9.subscribeOn}});var i9=IA();Object.defineProperty(v,"switchAll",{enumerable:!0,get:function(){return i9.switchAll}});var o9=Nu();Object.defineProperty(v,"switchMap",{enumerable:!0,get:function(){return o9.switchMap}});var a9=FA();Object.defineProperty(v,"switchMapTo",{enumerable:!0,get:function(){return a9.switchMapTo}});var u9=LA();Object.defineProperty(v,"switchScan",{enumerable:!0,get:function(){return u9.switchScan}});var s9=Fu();Object.defineProperty(v,"take",{enumerable:!0,get:function(){return s9.take}});var c9=Nv();Object.defineProperty(v,"takeLast",{enumerable:!0,get:function(){return c9.takeLast}});var l9=NA();Object.defineProperty(v,"takeUntil",{enumerable:!0,get:function(){return l9.takeUntil}});var f9=DA();Object.defineProperty(v,"takeWhile",{enumerable:!0,get:function(){return f9.takeWhile}});var d9=zA();Object.defineProperty(v,"tap",{enumerable:!0,get:function(){return d9.tap}});var p9=Wv();Object.defineProperty(v,"throttle",{enumerable:!0,get:function(){return p9.throttle}});var h9=UA();Object.defineProperty(v,"throttleTime",{enumerable:!0,get:function(){return h9.throttleTime}});var m9=Lu();Object.defineProperty(v,"throwIfEmpty",{enumerable:!0,get:function(){return m9.throwIfEmpty}});var v9=HA();Object.defineProperty(v,"timeInterval",{enumerable:!0,get:function(){return v9.timeInterval}});var b9=Rl();Object.defineProperty(v,"timeout",{enumerable:!0,get:function(){return b9.timeout}});var g9=VA();Object.defineProperty(v,"timeoutWith",{enumerable:!0,get:function(){return g9.timeoutWith}});var _9=GA();Object.defineProperty(v,"timestamp",{enumerable:!0,get:function(){return _9.timestamp}});var y9=Tv();Object.defineProperty(v,"toArray",{enumerable:!0,get:function(){return y9.toArray}});var w9=YA();Object.defineProperty(v,"window",{enumerable:!0,get:function(){return w9.window}});var x9=JA();Object.defineProperty(v,"windowCount",{enumerable:!0,get:function(){return x9.windowCount}});var S9=QA();Object.defineProperty(v,"windowTime",{enumerable:!0,get:function(){return S9.windowTime}});var O9=rT();Object.defineProperty(v,"windowToggle",{enumerable:!0,get:function(){return O9.windowToggle}});var E9=iT();Object.defineProperty(v,"windowWhen",{enumerable:!0,get:function(){return E9.windowWhen}});var A9=sT();Object.defineProperty(v,"withLatestFrom",{enumerable:!0,get:function(){return A9.withLatestFrom}});var T9=cT();Object.defineProperty(v,"zipAll",{enumerable:!0,get:function(){return T9.zipAll}});var P9=fT();Object.defineProperty(v,"zipWith",{enumerable:!0,get:function(){return P9.zipWith}})});var Gv=b(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.checkAbortSignal=yT;Fi.abortBreakPoint=M9;Fi.makeAbortError=wT;Fi.observeAbortSignal=k9;Fi.isAbortException=C9;var _T=gT(),Vv=class extends Error{};function yT(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw wT()}}function R9(e){return new Promise(t=>setTimeout(t,e))}async function M9(e){await R9(1),yT(e)}function wT(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Vv("aborted");return e.code="ERR_ABORTED",e}function k9(e){return e?(0,_T.fromEvent)(e,"abort"):new _T.Observable}function C9(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var xT=b(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});Kv.makeAbortableReaction=j9;var q9=wc(),Du=vt(),I9=Gv(),$v=Qh();function j9(e,t,r,n,i,o,a){let u;function c(s){(0,I9.isAbortException)(s)||(console.error(s),(0,Du.isAlive)(e)&&a(s))}(0,Du.addDisposer)(e,(0,q9.reaction)(()=>{try{return t(e)}catch(s){c(s);return}},async(s,l)=>{if(u&&(0,$v.stopStopToken)(u),!!(0,Du.isAlive)(e)){u=(0,$v.createStopToken)(),i(u);try{let d=await r(s,u,e,l);(0,Du.isAlive)(e)&&o(d)}catch(d){c(d)}}},n)),(0,Du.addDisposer)(e,()=>{u&&(0,$v.stopStopToken)(u)})}});var _o=b(N=>{"use strict";var F9=N&&N.__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]}),Ni=N&&N.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&F9(t,e,r)},ST=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(N,"__esModule",{value:!0});N.makeAbortableReaction=N.blobToDataURL=N.isFeature=N.SimpleFeature=N.defaultCodonTable=N.defaultStops=N.defaultStarts=N.rIC=N.complementTable=N.isElectron=void 0;N.useDebounce=U9;N.useWidthSetter=W9;N.useDebouncedCallback=H9;N.findParentThat=OT;N.springAnimate=V9;N.findParentThatIs=Bu;N.getSession=G9;N.getContainingView=ET;N.getContainingTrack=$9;N.getContainingDisplay=K9;N.assembleLocString=Y9;N.assembleLocStringFast=AT;N.parseLocStringOneBased=TT;N.parseLocString=Yv;N.compareLocs=PT;N.compareLocStrings=Z9;N.clamp=J9;N.bpToPx=Zv;N.radToDeg=t$;N.degToRad=r$;N.polarToCartesian=n$;N.cartesianToPolar=i$;N.featureSpanPx=o$;N.bpSpanPx=RT;N.iterMap=a$;N.findLastIndex=u$;N.findLast=s$;N.renameRegionIfNeeded=MT;N.renameRegionsIfNeeded=c$;N.minmax=l$;N.shorten=kT;N.stringify=f$;N.revcom=d$;N.reverse=p$;N.complement=h$;N.measureText=CT;N.getFrame=v$;N.generateCodonTable=b$;N.updateStatus=Jv;N.updateStatus2=g$;N.hashCode=qT;N.objectHash=_$;N.bytesForRegions=y$;N.isSupportedIndexingAdapter=w$;N.getBpDisplayStr=x$;N.toLocale=oa;N.getTickDisplayStr=S$;N.getViewParams=O$;N.getLayoutId=E$;N.useLocalStorage=A$;N.getUriLink=IT;N.getStr=jT;N.coarseStripHTML=FT;N.linkify=T$;N.measureGridWidth=P$;N.getEnv=R$;N.localStorageGetItem=Qv;N.localStorageSetItem=M$;N.max=LT;N.min=k$;N.sum=NT;N.avg=C$;N.groupBy=q$;N.notEmpty=I$;N.mergeIntervals=DT;N.gatherOverlaps=j$;N.stripAlpha=F$;N.getStrokeProps=L$;N.getFillProps=N$;N.renderToStaticMarkup=D$;N.isGzip=zT;N.fetchAndMaybeUnzip=BT;N.fetchAndMaybeUnzipText=z$;N.isObject=UT;N.localStorageGetNumber=B$;N.localStorageGetBoolean=U$;N.testAdapter=W$;var Li=Ye(),L9=Vp(),N9=ST(s1()),yr=vt(),D9=Ys(),z9=l1(),Xv=R1(),B9=Qh(),zu=yc();Ni(yc(),N);Ni(Rx(),N);Ni(Mx(),N);Ni(kx(),N);Ni(Am(),N);Ni(Wx(),N);function U9(e,t){let[r,n]=(0,Li.useState)(e);return(0,Li.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function W9(e,t){let[r,{width:n}]=(0,N9.default)();return(0,Li.useEffect)(()=>{n&&(0,yr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function H9(e,t=400){let r=(0,Li.useRef)(null),n=(0,Li.useRef)(null);return(0,Li.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 OT(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 V9(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function l(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 S=0;S<g;++S){let A=-o*(p-t),T=-a*m,M=(A+T)/1;m+=M*1/1e3,p+=m*1/1e3}let _=Math.abs(m)<=i,y=o!==0?Math.abs(t-p)<=i:!0;(u&&o!==0?e<t?p>t:p<t:!1)||_&&y?(r(t),n()):(r(p),s=requestAnimationFrame(()=>{l({lastPosition:p,lastTime:f,lastVelocity:m})}))}return[()=>{l({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Bu(e,t){return OT(e,t)}function G9(e){try{return Bu(e,zu.isSessionModel)}catch{throw new Error("no session model found!")}}function ET(e){try{return Bu(e,zu.isViewModel)}catch{throw new Error("no containing view found")}}function $9(e){try{return Bu(e,zu.isTrackModel)}catch{throw new Error("no containing track found")}}function K9(e){try{return Bu(e,zu.isDisplayModel)}catch{throw new Error("no containing display found")}}function Y9(e){return AT(e,oa)}function AT(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,u=r?`{${r}}`:"",c;i!==void 0?c=`:${t(i+1)}`:o!==void 0?c=":1":c="";let s;o!==void 0?s=i!==void 0&&i+1===o?"":`..${t(o)}`:s=i!==void 0?"..":"";let l="";return a&&(l="[rev]"),`${u}${n}${c}${s}${l}`}function TT(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 c=u.lastIndexOf(":");if(c===-1){if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`Unknown reference sequence "${u}"`)}let s=u.slice(0,c),l=u.slice(c+1);if(t(s,a)&&t(u,a))throw new Error(`ambiguous location string: "${e}"`);if(t(s,a))if(l){let d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(l),f=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(l);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 "${l}" 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 Yv(e,t){let r=TT(e,t);return typeof r.start=="number"&&(r.start-=1),r}function PT(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 Z9(e,t,r){let n=Yv(e,r),i=Yv(t,r);return PT(n,i)}function J9(e,t,r){return e<t?t:e>r?r:e}function X9(e){return Math.round(e*10)/10}function Zv(e,{reversed:t,end:r=0,start:n=0},i){return X9((t?r-e:e-n)/i)}var Q9=180/Math.PI,e$=Math.PI/180;function t$(e){return e*Q9%360}function r$(e){return e*e$%(2*Math.PI)}function n$(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function i$(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function o$(e,t,r){return RT(e.get("start"),e.get("end"),t,r)}function RT(e,t,r,n){let i=Zv(e,r,n),o=Zv(t,r,n);return r.reversed?[o,i]:[i,o]}function a$(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 u$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function s$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function MT(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 c$(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)=>MT(o[i[u]],a))}}function l$(e,t){return[Math.min(e,t),Math.max(e,t)]}function kT(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function f$({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${kT(e)}:${oa(t)}${n?" (out of bounds)":""}`:""].join("")}N.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");N.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 d$(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=N.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function p$(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function h$(e){var t;let r="";for(let n=0;n<e.length;n++)r+=(t=N.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}N.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var m$=[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 CT(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=m$[u])!==null&&r!==void 0?r:n}return o*t}function v$(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}N.defaultStarts=["ATG"];N.defaultStops=["TAA","TAG","TGA"];N.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 b$(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 c=i[1][u];for(let s=0;s<2;s++){let l=i[2][s],d=a+c+l;t[d]=n}}}}),t}async function Jv(e,t,r){t(e);let n=await r();return t(""),n}async function g$(e,t,r,n){t(e);let i=await n();return(0,B9.checkStopToken)(r),t(""),i}function qT(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 _$(e){return`${qT(JSON.stringify(e))}`}async function y$(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 w$(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function x$(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`:`${oa(Math.floor(e))}bp`}function oa(e){return e.toLocaleString("en-US")}function S$(e,t){return Math.floor(t/1e3)>0?`${oa(Number.parseFloat((e/1e6).toFixed(2)))}M`:oa(Math.floor(e))}function O$(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=ET(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 E$({sessionId:e,layoutId:t}){return`${e}-${t}`}function A$(e,t){let[r,n]=(0,Li.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 IT(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function jT(e){return UT(e)?(0,zu.isUriLocation)(e)?IT(e):JSON.stringify(e):String(e)}function FT(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function T$(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 P$(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return LT(e.map(u=>jT(u)).map(u=>a?FT(u):u).map(u=>CT(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function R$(e){return(0,yr.getEnv)(e)}function Qv(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function M$(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function LT(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function k$(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function NT(e){let t=0;for(let r of e)t+=r;return t}function C$(e){return NT(e)/e.length}function q$(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function I$(e){return e!=null}function DT(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 j$(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=>DT(n.sort((i,o)=>i.start-o.start),t))}function F$(e){return(0,Xv.colord)(e).alpha(1).toHex()}function L$(e){let t=(0,Xv.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}function N$(e){let t=(0,Xv.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}function D$(e){let t=document.createElement("div");return(0,D9.flushSync)(()=>{(0,z9.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 BT(e,t){let{statusCallback:r=()=>{}}=t||{},n=await Jv("Downloading file",r,()=>e.readFile(t));return zT(n)?await Jv("Unzipping",r,()=>(0,L9.unzip)(n)):n}async function z$(e,t){let r=await BT(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function UT(e){return typeof e=="object"&&e!==null}function B$(e,t){var r;return+((r=Qv(e))!==null&&r!==void 0?r:t)}function U$(e,t){return!!JSON.parse(Qv(e)||JSON.stringify(t))}function W$(e,t,r,n){return t.test(e)&&!r||r===n}var WT=Vx();Object.defineProperty(N,"SimpleFeature",{enumerable:!0,get:function(){return ST(WT).default}});Object.defineProperty(N,"isFeature",{enumerable:!0,get:function(){return WT.isFeature}});var H$=Pm();Object.defineProperty(N,"blobToDataURL",{enumerable:!0,get:function(){return H$.blobToDataURL}});var V$=xT();Object.defineProperty(N,"makeAbortableReaction",{enumerable:!0,get:function(){return V$.makeAbortableReaction}});Ni(Gv(),N)});var $T=b(Uu=>{"use strict";var GT=Uu&&Uu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Uu,"__esModule",{value:!0});Uu.default=X$;var G$=Da(),HT=GT(o1()),$$=GT(u1()),K$=_o(),Y$=["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"],VT=!1,Z$=new RegExp(Y$.map(e=>`<${e}\\b[^>]*>`).join("|"),"i");function J$(e){return Z$.test(e)}function X$({html:e,className:t}){let r=(0,K$.linkify)(`${e}`),n=J$(r)?r:(0,$$.default)(r);return VT||(VT=!0,HT.default.addHook("afterSanitizeAttributes",i=>{i.tagName==="A"&&(i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target","_blank"))})),(0,G$.jsx)("span",{className:t,dangerouslySetInnerHTML:{__html:HT.default.sanitize(n)}})}});var Jn=b((tne,KT)=>{KT.exports=JBrowseExports["mobx-react"]});var YT,Q$,eb,ZT=pt(()=>{"use strict";YT=V(Ye()),Q$=e=>{let{color:t="rgb(255,255,255,0.8)"}=e;return YT.default.createElement("rect",{...e,fill:t})},eb=Q$});var Di,JT,eK,XT,QT=pt(()=>{"use strict";Di=V(Ye()),JT=V(Jn()),eK=(0,JT.observer)(function({model:e}){let{hierarchy:t,showBranchLen:r}=e;return Di.default.createElement(Di.default.Fragment,null,t?[...t.links()].map(n=>{let{source:i,target:o}=n,a=i.x,u=o.x,c=r?o.len:o.y,s=r?i.len:i.y;return Di.default.createElement(Di.default.Fragment,{key:[a,u,c,s].join("-")},Di.default.createElement("line",{stroke:"black",x1:s,y1:a,x2:s,y2:u}),Di.default.createElement("line",{stroke:"black",x1:s,y1:u,x2:c,y2:u}))}):null)}),XT=eK});var Xn,eP,tK,tP,rP=pt(()=>{"use strict";Xn=V(Ye()),eP=V(Jn());ZT();QT();tK=(0,eP.observer)(function({model:e,labelWidth:t,svgFontSize:r}){let{totalHeight:n,treeWidth:i,samples:o,rowHeight:a}=e,u=a>=8,c=Math.min(20,a);return Xn.default.createElement(Xn.default.Fragment,null,Xn.default.createElement(eb,{y:0,x:0,width:t+5+i,height:n}),Xn.default.createElement(XT,{model:e}),Xn.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,l)=>Xn.default.createElement(eb,{key:`${s.id}-${l}`,y:l*a,x:0,width:t+5,height:c,color:s.color})),u?o.map((s,l)=>Xn.default.createElement("text",{key:`${s.id}-${l}`,y:l*a+a/2,dominantBaseline:"middle",x:2,fontSize:r},s.label)):null))}),tP=tK});var Dd,nP,iP,rK,oP,aP=pt(()=>{"use strict";Dd=V(Ye()),nP=V(ir()),iP=V(Jn()),rK=(0,iP.observer)(function({children:e,model:t,exportSVG:r}){if(r)return Dd.default.createElement(Dd.default.Fragment,null,e);{let{rowHeight:n,samples:i}=t;return Dd.default.createElement("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:i.length*n,width:(0,nP.getContainingView)(t).width}},e)}}),oP=rK});function uP(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}var sP=pt(()=>{"use strict"});var tb,cP,lP,nK,zd,rb=pt(()=>{"use strict";tb=V(Ye()),cP=V(ir()),lP=V(Jn());rP();aP();sP();nK=(0,lP.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=uP(n.map(c=>(0,cP.measureText)(c.label,i)).map(c=>o?c:a));return tb.default.createElement(oP,{...e},tb.default.createElement(tP,{model:t,labelWidth:u,svgFontSize:i}))}),zd=nK});var gP=b((vne,bP)=>{bP.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var Hu=b((Qne,CP)=>{CP.exports=JBrowseExports["@jbrowse/core/ui"]});var NP={};Jd(NP,{renderSvg:()=>xK});async function xK(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,LP.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(zd,{model:e,orientation:"left",exportSVG:!0}))))}var Wr,LP,DP=pt(()=>{"use strict";Wr=V(Ye()),LP=V(ir());rb()});var nR=b(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});pb.default=TK;var rR=_o();function TK(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,rR.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return(0,rR.hashCode)(t)}});var iR=b($u=>{"use strict";var PK=$u&&$u.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($u,"__esModule",{value:!0});$u.adapterConfigCacheKey=MK;var RK=PK(nR());function MK(e={}){return`${(0,RK.default)(e)}`}});var aR=b(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.getAdapter=oR;Ku.freeAdapterResources=CK;Ku.clearAdapterCache=qK;var kK=iR(),zi={};async function oR(e,t,r){let n=(0,kK.adapterConfigCacheKey)(r);if(!zi[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}),c=oR.bind(null,e,t),s=await a.getAdapterClass(),l=new s(u,c,e);zi[n]={dataAdapter:l,sessionIds:new Set([t])}}let i=zi[n];return i.sessionIds.add(t),i}function CK(e){let t=0,r=Object.keys(e);if(r.length===1&&r[0]==="sessionId"){let{sessionId:n}=e;Object.entries(zi).forEach(([i,o])=>{o.sessionIds.delete(n),o.sessionIds.size===0&&(t+=1,delete zi[i])})}else Object.values(zi).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 qK(){zi={}}});var uR=b(mb=>{"use strict";Object.defineProperty(mb,"__esModule",{value:!0});var hb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};mb.default=hb});var cR=b(bb=>{"use strict";Object.defineProperty(bb,"__esModule",{value:!0});bb.default=vb;var sR=e=>typeof e=="object"&&e!==null,IK=e=>sR(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function vb(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{i.forEach(o=>{t(o),sR(o)&&vb(o,t,r)})};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),IK(i)&&(Array.isArray(i)?n(i):vb(i,t,r))}});var fR=b(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.UNSUPPORTED=Le.UNKNOWN=void 0;Le.getTrackAssemblyNames=jK;Le.getConfAssemblyNames=lR;Le.getRpcSessionId=FK;Le.getParentRenderProps=LK;Le.getBlob=NK;Le.getBlobMap=DK;Le.setBlobMap=zK;Le.storeBlobLocation=UK;Le.makeIndex=WK;Le.makeIndexType=HK;Le.getFileName=VK;Le.guessAdapter=GK;Le.guessTrackType=$K;Le.generateUnsupportedTrackConf=KK;Le.generateUnknownTrackConf=YK;Le.getTrackName=ZK;var la=vt(),Yu=_o(),ca=hm();function jK(e){return lR(e.configuration)}function lR(e){let t=(0,ca.readConfObject)(e,"assemblyNames");if(!t){let r=(0,la.getParent)(e);if("sequence"in r)return[(0,ca.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function FK(e){let t;for(let r=e;!(0,la.isRoot)(r);r=(0,la.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 LK(e){for(let t=(0,la.getParent)(e);!(0,la.isRoot)(t);t=(0,la.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}Le.UNKNOWN="UNKNOWN";Le.UNSUPPORTED="UNSUPPORTED";var Vd={};function NK(e){return Vd[e]}function DK(){return Vd}function zK(e){Vd=e}var BK=0;function UK(e){if("blob"in e){let t=`b${+Date.now()}-${BK++}`;return Vd[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function WK(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function HK(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function VK(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 GK(e,t,r,n){if(n){let{pluginManager:i}=(0,Yu.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,c,s)=>{})(e,t,r);if(a)return a}return{type:Le.UNKNOWN}}function $K(e,t){if(t){let r=(0,Yu.getSession)(t),i=(0,Yu.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function KK(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,Yu.objectHash)(n),n}function YK(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,Yu.objectHash)(n),n}function ZK(e,t){let r=(0,ca.readConfObject)(e,"name");if(!r&&(0,ca.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,ca.readConfObject)(n,"displayName")||(0,ca.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var hR=b(Zu=>{"use strict";var pR=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zu,"__esModule",{value:!0});var JK=pR(uR()),XK=pR(cR()),dR=fR(),Gd=yc(),gb=class extends JK.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,dR.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,Gd.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,dR.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,Gd.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 Gd.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,XK.default)(t,i=>{(0,Gd.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};Zu.default=gb});var mR=b(yb=>{"use strict";Object.defineProperty(yb,"__esModule",{value:!0});var QK=sm(),_b=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,QK.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)}};yb.default=_b});var bR=b(Ju=>{"use strict";var vR=Ju&&Ju.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ju,"__esModule",{value:!0});var eY=vR(hR()),tY=_o(),rY=vR(mR()),wb=class extends eY.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new rY.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 c=await(0,tY.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(c,r)}};Ju.default=wb});var iY={};Jd(iY,{default:()=>Kd});var RR=V(Wb());var Hb="1.1.2";var py=V(Vr());var ay=V(Vp()),uy=V(Ss()),sy=V(ir()),As=V(Gp()),cy=V(Os());var Wt=null;try{Wt=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 Ae(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}Ae.prototype.__isLong__;Object.defineProperty(Ae.prototype,"__isLong__",{value:!0});function ct(e){return(e&&e.__isLong__)===!0}function K_(e){var t=Math.clz32(e&-e);return e?31-t:t}Ae.isLong=ct;var Y_={},Z_={};function ci(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=Z_[e],n)?n:(r=me(e,0,!0),i&&(Z_[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=Y_[e],n)?n:(r=me(e,e<0?-1:0,!1),i&&(Y_[e]=r),r))}Ae.fromInt=ci;function Ht(e,t){if(isNaN(e))return t?Zr:or;if(t){if(e<0)return Zr;if(e>=ey)return ny}else{if(e<=-X_)return At;if(e+1>=X_)return ry}return e<0?Ht(-e,t).neg():me(e%to|0,e/to|0,t)}Ae.fromNumber=Ht;function me(e,t,r){return new Ae(e,t,r)}Ae.fromBits=me;var Es=Math.pow;function Kp(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?Zr:or;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 Kp(e.substring(1),t,r).neg();for(var i=Ht(Es(r,8)),o=or,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+u),r);if(u<8){var s=Ht(Es(r,u));o=o.mul(s).add(Ht(c))}else o=o.mul(i),o=o.add(Ht(c))}return o.unsigned=t,o}Ae.fromString=Kp;function ar(e,t){return typeof e=="number"?Ht(e,t):typeof e=="string"?Kp(e,t):me(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ae.fromValue=ar;var J_=65536,nC=1<<24,to=J_*J_,ey=to*to,X_=ey/2,Q_=ci(nC),or=ci(0);Ae.ZERO=or;var Zr=ci(0,!0);Ae.UZERO=Zr;var eo=ci(1);Ae.ONE=eo;var ty=ci(1,!0);Ae.UONE=ty;var $p=ci(-1);Ae.NEG_ONE=$p;var ry=me(-1,2147483647,!1);Ae.MAX_VALUE=ry;var ny=me(-1,-1,!0);Ae.MAX_UNSIGNED_VALUE=ny;var At=me(0,-2147483648,!1);Ae.MIN_VALUE=At;var U=Ae.prototype;U.toInt=function(){return this.unsigned?this.low>>>0:this.low};U.toNumber=function(){return this.unsigned?(this.high>>>0)*to+(this.low>>>0):this.high*to+(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=Ht(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=Ht(Es(t,6),this.unsigned),a=this,u="";;){var c=a.div(o),s=a.sub(c.mul(o)).toInt()>>>0,l=s.toString(t);if(a=c,a.isZero())return l+u;for(;l.length<6;)l="0"+l;u=""+l+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);r--);return this.high!=0?r+33:r+1};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=ar(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=ar(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(eo)};U.neg=U.negate;U.add=function(t){ct(t)||(t=ar(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,c=t.low>>>16,s=t.low&65535,l=0,d=0,f=0,p=0;return p+=o+s,f+=p>>>16,p&=65535,f+=i+c,d+=f>>>16,f&=65535,d+=n+u,l+=d>>>16,d&=65535,l+=r+a,l&=65535,me(f<<16|p,l<<16|d,this.unsigned)};U.subtract=function(t){return ct(t)||(t=ar(t)),this.add(t.neg())};U.sub=U.subtract;U.multiply=function(t){if(this.isZero())return this;if(ct(t)||(t=ar(t)),Wt){var r=Wt.mul(this.low,this.high,t.low,t.high);return me(r,Wt.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Zr:or;if(this.eq(At))return t.isOdd()?At:or;if(t.eq(At))return this.isOdd()?At:or;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(Q_)&&t.lt(Q_))return Ht(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,c=t.high&65535,s=t.low>>>16,l=t.low&65535,d=0,f=0,p=0,h=0;return h+=a*l,p+=h>>>16,h&=65535,p+=o*l,f+=p>>>16,p&=65535,p+=a*s,f+=p>>>16,p&=65535,f+=i*l,d+=f>>>16,f&=65535,f+=o*s,d+=f>>>16,f&=65535,f+=a*c,d+=f>>>16,f&=65535,d+=n*l+i*s+o*c+a*u,d&=65535,me(p<<16|h,d<<16|f,this.unsigned)};U.mul=U.multiply;U.divide=function(t){if(ct(t)||(t=ar(t)),t.isZero())throw Error("division by zero");if(Wt){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Wt.div_u:Wt.div_s)(this.low,this.high,t.low,t.high);return me(r,Wt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Zr:or;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Zr;if(t.gt(this.shru(1)))return ty;o=Zr}else{if(this.eq(At)){if(t.eq(eo)||t.eq($p))return At;if(t.eq(At))return eo;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(or)?t.isNegative()?eo:$p:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(At))return this.unsigned?Zr:or;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=or}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),c=u<=48?1:Es(2,u-48),s=Ht(n),l=s.mul(t);l.isNegative()||l.gt(i);)n-=c,s=Ht(n,this.unsigned),l=s.mul(t);s.isZero()&&(s=eo),o=o.add(s),i=i.sub(l)}return o};U.div=U.divide;U.modulo=function(t){if(ct(t)||(t=ar(t)),Wt){var r=(this.unsigned?Wt.rem_u:Wt.rem_s)(this.low,this.high,t.low,t.high);return me(r,Wt.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};U.mod=U.modulo;U.rem=U.modulo;U.not=function(){return me(~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?K_(this.low):K_(this.high)+32};U.ctz=U.countTrailingZeros;U.and=function(t){return ct(t)||(t=ar(t)),me(this.low&t.low,this.high&t.high,this.unsigned)};U.or=function(t){return ct(t)||(t=ar(t)),me(this.low|t.low,this.high|t.high,this.unsigned)};U.xor=function(t){return ct(t)||(t=ar(t)),me(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?me(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):me(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?me(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):me(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?me(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?me(this.high,0,this.unsigned):me(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?me(this.high,this.low,this.unsigned):t<32?(r=32-t,me(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,me(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?me(this.high,this.low,this.unsigned):t<32?(r=32-t,me(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,me(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};U.rotr=U.rotateRight;U.toSigned=function(){return this.unsigned?me(this.low,this.high,!1):this};U.toUnsigned=function(){return this.unsigned?this:me(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]};Ae.fromBytes=function(t,r,n){return n?Ae.fromBytesLE(t,r):Ae.fromBytesBE(t,r)};Ae.fromBytesLE=function(t,r){return new Ae(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Ae.fromBytesBE=function(t,r){return new Ae(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};var iy=Ae;var Ca=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 qa(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 iC(e){return typeof e[0]=="string"}function ro(e){return iC(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function oy(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}var Ia=class extends uy.BaseFeatureDataAdapter{setupP;async getRefNames(){let t=await this.setup();return Object.keys(t)}setup(){return this.setupP||(this.setupP=this.readTaiFile().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async readTaiFile(){let r=(await(0,As.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[c,s,l]=u.split(" "),d=a+ +l,f=c==="*"?i:c.split(".").at(-1),p=iy.fromNumber(d),h=p.shiftRightUnsigned(16),m=p.and(65535),g=new
|
|
7
|
-
`)}}return[]}freeResources(){}};var fy=V(
|
|
5
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}})});var rn=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.arrRemove=void 0;function xF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}qc.arrRemove=xF});var Dt=b(Ct=>{"use strict";var $x=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.")},Kx=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},Yx=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 Su=ye(),Cm=km(),Zx=rn(),qm=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=$x(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(Su.isFunction(l))try{l()}catch(m){o=m instanceof Cm.UnsubscriptionError?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=$x(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{Jx(h)}catch(m){o=o??[],m instanceof Cm.UnsubscriptionError?o=Yx(Yx([],Kx(o)),Kx(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 Cm.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Jx(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)&&Zx.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Zx.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Ct.Subscription=qm;Ct.EMPTY_SUBSCRIPTION=qm.EMPTY;function SF(e){return e instanceof qm||e&&"closed"in e&&Su.isFunction(e.remove)&&Su.isFunction(e.add)&&Su.isFunction(e.unsubscribe)}Ct.isSubscription=SF;function Jx(e){Su.isFunction(e)?e():e.unsubscribe()}});var So=b(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.config=void 0;Ic.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Im=b(Lr=>{"use strict";var Xx=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},Qx=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,Qx([e,t],Xx(r))):setTimeout.apply(void 0,Qx([e,t],Xx(r)))},clearTimeout:function(e){var t=Lr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var jm=b(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.reportUnhandledError=void 0;var OF=So(),EF=Im();function AF(e){EF.timeoutProvider.setTimeout(function(){var t=OF.config.onUnhandledError;if(t)t(e);else throw e})}jc.reportUnhandledError=AF});var ot=b(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.noop=void 0;function TF(){}Fc.noop=TF});var eS=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 Lc("C",void 0,void 0)}();function PF(e){return Lc("E",void 0,e)}Nr.errorNotification=PF;function RF(e){return Lc("N",e,void 0)}Nr.nextNotification=RF;function Lc(e,t,r){return{kind:e,value:t,error:r}}Nr.createNotification=Lc});var Nc=b(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.captureError=Oo.errorContext=void 0;var tS=So(),Ti=null;function MF(e){if(tS.config.useDeprecatedSynchronousErrorHandling){var t=!Ti;if(t&&(Ti={errorThrown:!1,error:null}),e(),t){var r=Ti,n=r.errorThrown,i=r.error;if(Ti=null,n)throw i}}else e()}Oo.errorContext=MF;function kF(e){tS.config.useDeprecatedSynchronousErrorHandling&&Ti&&(Ti.errorThrown=!0,Ti.error=e)}Oo.captureError=kF});var Eo=b(br=>{"use strict";var iS=br&&br.__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(br,"__esModule",{value:!0});br.EMPTY_OBSERVER=br.SafeSubscriber=br.Subscriber=void 0;var CF=ye(),rS=Dt(),Dm=So(),qF=jm(),nS=ot(),Fm=eS(),IF=Im(),jF=Nc(),oS=function(e){iS(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,rS.isSubscription(r)&&r.add(n)):n.destination=br.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new aS(r,n,i)},t.prototype.next=function(r){this.isStopped?Nm(Fm.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Nm(Fm.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Nm(Fm.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}(rS.Subscription);br.Subscriber=oS;var FF=Function.prototype.bind;function Lm(e,t){return FF.call(e,t)}var LF=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){Dc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Dc(n)}else Dc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Dc(r)}},e}(),aS=function(e){iS(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(CF.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&Dm.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Lm(r.next,u),error:r.error&&Lm(r.error,u),complete:r.complete&&Lm(r.complete,u)}):a=r}return o.destination=new LF(a),o}return t}(oS);br.SafeSubscriber=aS;function Dc(e){Dm.config.useDeprecatedSynchronousErrorHandling?jF.captureError(e):qF.reportUnhandledError(e)}function NF(e){throw e}function Nm(e,t){var r=Dm.config.onStoppedNotification;r&&IF.timeoutProvider.setTimeout(function(){return r(e,t)})}br.EMPTY_OBSERVER={closed:!0,next:nS.noop,error:NF,complete:nS.noop}});var Ou=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.observable=void 0;zc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var at=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.identity=void 0;function DF(e){return e}Bc.identity=DF});var Eu=b(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.pipeFromArray=Ao.pipe=void 0;var zF=at();function BF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return uS(e)}Ao.pipe=BF;function uS(e){return e.length===0?zF.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Ao.pipeFromArray=uS});var xe=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.Observable=void 0;var Bm=Eo(),UF=Dt(),WF=Ou(),HF=Eu(),VF=So(),zm=ye(),GF=Nc(),$F=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=YF(t)?t:new Bm.SafeSubscriber(t,r,n);return GF.errorContext(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?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=sS(r),new r(function(i,o){var a=new Bm.SafeSubscriber({next:function(u){try{t(u)}catch(c){o(c),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[WF.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return HF.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=sS(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}();Uc.Observable=$F;function sS(e){var t;return(t=e??VF.config.Promise)!==null&&t!==void 0?t:Promise}function KF(e){return e&&zm.isFunction(e.next)&&zm.isFunction(e.error)&&zm.isFunction(e.complete)}function YF(e){return e&&e instanceof Bm.Subscriber||KF(e)&&UF.isSubscription(e)}});var G=b(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.operate=To.hasLift=void 0;var ZF=ye();function cS(e){return ZF.isFunction(e?.lift)}To.hasLift=cS;function JF(e){return function(t){if(cS(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")}}To.operate=JF});var Y=b(Mn=>{"use strict";var XF=Mn&&Mn.__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(Mn,"__esModule",{value:!0});Mn.OperatorSubscriber=Mn.createOperatorSubscriber=void 0;var QF=Eo();function eL(e,t,r,n,i){return new lS(e,t,r,n,i)}Mn.createOperatorSubscriber=eL;var lS=function(e){XF(t,e);function t(r,n,i,o,a,u){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=n?function(s){try{n(s)}catch(l){r.error(l)}}:e.prototype._next,c._error=o?function(s){try{o(s)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,c}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}(QF.Subscriber);Mn.OperatorSubscriber=lS});var Um=b(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.refCount=void 0;var tL=G(),rL=Y();function nL(){return tL.operate(function(e,t){var r=null;e._refCount++;var n=rL.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())})}Wc.refCount=nL});var Au=b(Po=>{"use strict";var iL=Po&&Po.__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(Po,"__esModule",{value:!0});Po.ConnectableObservable=void 0;var oL=xe(),fS=Dt(),aL=Um(),uL=Y(),sL=G(),cL=function(e){iL(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,sL.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 fS.Subscription;var i=this.getSubject();n.add(this.source.subscribe(uL.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=fS.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return aL.refCount()(this)},t}(oL.Observable);Po.ConnectableObservable=cL});var dS=b(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.performanceTimestampProvider=void 0;Tu.performanceTimestampProvider={now:function(){return(Tu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Wm=b(gr=>{"use strict";var pS=gr&&gr.__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},hS=gr&&gr.__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(gr,"__esModule",{value:!0});gr.animationFrameProvider=void 0;var lL=Dt();gr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=gr.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new lL.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gr.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,hS([],pS(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gr.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,hS([],pS(e)))},delegate:void 0}});var bS=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.animationFrames=void 0;var fL=xe(),dL=dS(),mS=Wm();function pL(e){return e?vS(e):hL}Hc.animationFrames=pL;function vS(e){return new fL.Observable(function(t){var r=e||dL.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=mS.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&mS.animationFrameProvider.cancelAnimationFrame(i)}})}var hL=vS()});var Hm=b(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.ObjectUnsubscribedError=void 0;var mL=Rn();Vc.ObjectUnsubscribedError=mL.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var ut=b(Dr=>{"use strict";var _S=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)}}(),vL=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 gS=xe(),Gm=Dt(),bL=Hm(),gL=rn(),Vm=Nc(),yS=function(e){_S(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 $m(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new bL.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Vm.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=vL(n.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.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;Vm.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;Vm.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?Gm.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new Gm.Subscription(function(){n.currentObservers=null,gL.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 gS.Observable;return r.source=this,r},t.create=function(r,n){return new $m(r,n)},t}(gS.Observable);Dr.Subject=yS;var $m=function(e){_S(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:Gm.EMPTY_SUBSCRIPTION},t}(yS);Dr.AnonymousSubject=$m});var Km=b(Ro=>{"use strict";var _L=Ro&&Ro.__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(Ro,"__esModule",{value:!0});Ro.BehaviorSubject=void 0;var yL=ut(),wL=function(e){_L(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}(yL.Subject);Ro.BehaviorSubject=wL});var Gc=b(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.dateTimestampProvider=void 0;Pu.dateTimestampProvider={now:function(){return(Pu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var $c=b(Mo=>{"use strict";var xL=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.ReplaySubject=void 0;var SL=ut(),OL=Gc(),EL=function(e){xL(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=OL.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,c=n._windowTime;i||(o.push(r),!a&&o.push(u.now()+c)),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(),c=0;c<u.length&&!r.closed;c+=o?1:2)r.next(u[c]);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 c=i.now(),s=0,l=1;l<o.length&&o[l]<=c;l+=2)s=l;s&&o.splice(0,s+1)}},t}(SL.Subject);Mo.ReplaySubject=EL});var Kc=b(ko=>{"use strict";var AL=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.AsyncSubject=void 0;var TL=ut(),PL=function(e){AL(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,c=n.isStopped,s=n._isComplete;i?r.error(u):(c||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}(TL.Subject);ko.AsyncSubject=PL});var wS=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.Action=void 0;var ML=Dt(),kL=function(e){RL(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}(ML.Subscription);Co.Action=kL});var OS=b(zr=>{"use strict";var xS=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},SS=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,SS([e,t],xS(r))):setInterval.apply(void 0,SS([e,t],xS(r)))},clearInterval:function(e){var t=zr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Io=b(qo=>{"use strict";var CL=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.AsyncAction=void 0;var qL=wS(),ES=OS(),IL=rn(),jL=function(e){CL(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),ES.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&&ES.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,IL.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(qL.Action);qo.AsyncAction=jL});var TS=b(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.TestTools=jo.Immediate=void 0;var FL=1,Ym,Yc={};function AS(e){return e in Yc?(delete Yc[e],!0):!1}jo.Immediate={setImmediate:function(e){var t=FL++;return Yc[t]=!0,Ym||(Ym=Promise.resolve()),Ym.then(function(){return AS(t)&&e()}),t},clearImmediate:function(e){AS(e)}};jo.TestTools={pending:function(){return Object.keys(Yc).length}}});var RS=b(Br=>{"use strict";var LL=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},NL=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 PS=TS(),DL=PS.Immediate.setImmediate,zL=PS.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||DL).apply(void 0,NL([],LL(e)))},clearImmediate:function(e){var t=Br.immediateProvider.delegate;return(t?.clearImmediate||zL)(e)},delegate:void 0}});var kS=b(Fo=>{"use strict";var BL=Fo&&Fo.__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(Fo,"__esModule",{value:!0});Fo.AsapAction=void 0;var UL=Io(),MS=RS(),WL=function(e){BL(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=MS.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&&(MS.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(UL.AsyncAction);Fo.AsapAction=WL});var Zm=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.Scheduler=void 0;var HL=Gc(),VL=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=HL.dateTimestampProvider.now,e}();Zc.Scheduler=VL});var No=b(Lo=>{"use strict";var GL=Lo&&Lo.__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(Lo,"__esModule",{value:!0});Lo.AsyncScheduler=void 0;var CS=Zm(),$L=function(e){GL(t,e);function t(r,n){n===void 0&&(n=CS.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}(CS.Scheduler);Lo.AsyncScheduler=$L});var qS=b(Do=>{"use strict";var KL=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.AsapScheduler=void 0;var YL=No(),ZL=function(e){KL(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}(YL.AsyncScheduler);Do.AsapScheduler=ZL});var IS=b(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.asap=Pi.asapScheduler=void 0;var JL=kS(),XL=qS();Pi.asapScheduler=new XL.AsapScheduler(JL.AsapAction);Pi.asap=Pi.asapScheduler});var qt=b(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.async=Ri.asyncScheduler=void 0;var QL=Io(),eN=No();Ri.asyncScheduler=new eN.AsyncScheduler(QL.AsyncAction);Ri.async=Ri.asyncScheduler});var jS=b(zo=>{"use strict";var tN=zo&&zo.__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(zo,"__esModule",{value:!0});zo.QueueAction=void 0;var rN=Io(),nN=function(e){tN(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}(rN.AsyncAction);zo.QueueAction=nN});var FS=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.QueueScheduler=void 0;var oN=No(),aN=function(e){iN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(oN.AsyncScheduler);Bo.QueueScheduler=aN});var LS=b(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.queue=Mi.queueScheduler=void 0;var uN=jS(),sN=FS();Mi.queueScheduler=new sN.QueueScheduler(uN.QueueAction);Mi.queue=Mi.queueScheduler});var DS=b(Uo=>{"use strict";var cN=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.AnimationFrameAction=void 0;var lN=Io(),NS=Wm(),fN=function(e){cN(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=NS.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&&(NS.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(lN.AsyncAction);Uo.AnimationFrameAction=fN});var zS=b(Wo=>{"use strict";var dN=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.AnimationFrameScheduler=void 0;var pN=No(),hN=function(e){dN(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}(pN.AsyncScheduler);Wo.AnimationFrameScheduler=hN});var BS=b(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.animationFrame=ki.animationFrameScheduler=void 0;var mN=DS(),vN=zS();ki.animationFrameScheduler=new vN.AnimationFrameScheduler(mN.AnimationFrameAction);ki.animationFrame=ki.animationFrameScheduler});var HS=b(kn=>{"use strict";var US=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 bN=Io(),gN=Dt(),_N=No(),yN=function(e){US(t,e);function t(r,n){r===void 0&&(r=WS),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}(_N.AsyncScheduler);kn.VirtualTimeScheduler=yN;var WS=function(e){US(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 gN.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}(bN.AsyncAction);kn.VirtualAction=WS});var _r=b(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.empty=Ci.EMPTY=void 0;var VS=xe();Ci.EMPTY=new VS.Observable(function(e){return e.complete()});function wN(e){return e?xN(e):Ci.EMPTY}Ci.empty=wN;function xN(e){return new VS.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var Ru=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.isScheduler=void 0;var SN=ye();function ON(e){return e&&SN.isFunction(e.schedule)}Jc.isScheduler=ON});var It=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.popNumber=Cn.popScheduler=Cn.popResultSelector=void 0;var EN=ye(),AN=Ru();function Jm(e){return e[e.length-1]}function TN(e){return EN.isFunction(Jm(e))?e.pop():void 0}Cn.popResultSelector=TN;function PN(e){return AN.isScheduler(Jm(e))?e.pop():void 0}Cn.popScheduler=PN;function RN(e,t){return typeof Jm(e)=="number"?e.pop():t}Cn.popNumber=RN});var Qc=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.isArrayLike=void 0;Xc.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var Xm=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.isPromise=void 0;var MN=ye();function kN(e){return MN.isFunction(e?.then)}el.isPromise=kN});var Qm=b(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.isInteropObservable=void 0;var CN=Ou(),qN=ye();function IN(e){return qN.isFunction(e[CN.observable])}tl.isInteropObservable=IN});var ev=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.isAsyncIterable=void 0;var jN=ye();function FN(e){return Symbol.asyncIterator&&jN.isFunction(e?.[Symbol.asyncIterator])}rl.isAsyncIterable=FN});var tv=b(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.createInvalidObservableTypeError=void 0;function LN(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.")}nl.createInvalidObservableTypeError=LN});var rv=b(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.iterator=Ho.getSymbolIterator=void 0;function GS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Ho.getSymbolIterator=GS;Ho.iterator=GS()});var nv=b(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.isIterable=void 0;var NN=rv(),DN=ye();function zN(e){return DN.isFunction(e?.[NN.iterator])}il.isIterable=zN});var ol=b(Zt=>{"use strict";var BN=Zt&&Zt.__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(l){return c([s,l])}}function c(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(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Vo=Zt&&Zt.__await||function(e){return this instanceof Vo?(this.v=e,this):new Vo(e)},UN=Zt&&Zt.__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{c(n[f](p))}catch(h){d(o[0][3],h)}}function c(f){f.value instanceof Vo?Promise.resolve(f.value.v).then(s,l):d(o[0][2],f)}function s(f){u("next",f)}function l(f){u("throw",f)}function d(f,p){f(p),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.isReadableStreamLike=Zt.readableStreamLikeToAsyncGenerator=void 0;var WN=ye();function HN(e){return UN(this,arguments,function(){var r,n,i,o;return BN(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,Vo(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,Vo(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Vo(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]}})})}Zt.readableStreamLikeToAsyncGenerator=HN;function VN(e){return WN.isFunction(e?.getReader)}Zt.isReadableStreamLike=VN});var ie=b(Ce=>{"use strict";var GN=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(l){try{s(n.next(l))}catch(d){a(d)}}function c(l){try{s(n.throw(l))}catch(d){a(d)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},$N=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(l){return c([s,l])}}function c(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(l){s=[6,l],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},KN=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 iv=="function"?iv(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,c){a=e[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}},iv=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 YN=Qc(),ZN=Xm(),Go=xe(),JN=Qm(),XN=ev(),QN=tv(),eD=nv(),$S=ol(),tD=ye(),rD=jm(),nD=Ou();function iD(e){if(e instanceof Go.Observable)return e;if(e!=null){if(JN.isInteropObservable(e))return KS(e);if(YN.isArrayLike(e))return YS(e);if(ZN.isPromise(e))return ZS(e);if(XN.isAsyncIterable(e))return ov(e);if(eD.isIterable(e))return JS(e);if($S.isReadableStreamLike(e))return XS(e)}throw QN.createInvalidObservableTypeError(e)}Ce.innerFrom=iD;function KS(e){return new Go.Observable(function(t){var r=e[nD.observable]();if(tD.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}Ce.fromInteropObservable=KS;function YS(e){return new Go.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}Ce.fromArrayLike=YS;function ZS(e){return new Go.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,rD.reportUnhandledError)})}Ce.fromPromise=ZS;function JS(e){return new Go.Observable(function(t){var r,n;try{for(var i=iv(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=JS;function ov(e){return new Go.Observable(function(t){oD(e,t).catch(function(r){return t.error(r)})})}Ce.fromAsyncIterable=ov;function XS(e){return ov($S.readableStreamLikeToAsyncGenerator(e))}Ce.fromReadableStreamLike=XS;function oD(e,t){var r,n,i,o;return GN(this,void 0,void 0,function(){var a,u;return $N(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=KN(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}});var nn=b(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.executeSchedule=void 0;function aD(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}al.executeSchedule=aD});var Mu=b(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.observeOn=void 0;var av=nn(),uD=G(),sD=Y();function cD(e,t){return t===void 0&&(t=0),uD.operate(function(r,n){r.subscribe(sD.createOperatorSubscriber(n,function(i){return av.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return av.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return av.executeSchedule(n,e,function(){return n.error(i)},t)}))})}ul.observeOn=cD});var ku=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.subscribeOn=void 0;var lD=G();function fD(e,t){return t===void 0&&(t=0),lD.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}sl.subscribeOn=fD});var QS=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.scheduleObservable=void 0;var dD=ie(),pD=Mu(),hD=ku();function mD(e,t){return dD.innerFrom(e).pipe(hD.subscribeOn(t),pD.observeOn(t))}cl.scheduleObservable=mD});var eO=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.schedulePromise=void 0;var vD=ie(),bD=Mu(),gD=ku();function _D(e,t){return vD.innerFrom(e).pipe(gD.subscribeOn(t),bD.observeOn(t))}ll.schedulePromise=_D});var tO=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.scheduleArray=void 0;var yD=xe();function wD(e,t){return new yD.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}fl.scheduleArray=wD});var uv=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.scheduleIterable=void 0;var xD=xe(),SD=rv(),OD=ye(),rO=nn();function ED(e,t){return new xD.Observable(function(r){var n;return rO.executeSchedule(r,t,function(){n=e[SD.iterator](),rO.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 OD.isFunction(n?.return)&&n.return()}})}dl.scheduleIterable=ED});var sv=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.scheduleAsyncIterable=void 0;var AD=xe(),nO=nn();function TD(e,t){if(!e)throw new Error("Iterable cannot be null");return new AD.Observable(function(r){nO.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();nO.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}pl.scheduleAsyncIterable=TD});var iO=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.scheduleReadableStreamLike=void 0;var PD=sv(),RD=ol();function MD(e,t){return PD.scheduleAsyncIterable(RD.readableStreamLikeToAsyncGenerator(e),t)}hl.scheduleReadableStreamLike=MD});var cv=b(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.scheduled=void 0;var kD=QS(),CD=eO(),qD=tO(),ID=uv(),jD=sv(),FD=Qm(),LD=Xm(),ND=Qc(),DD=nv(),zD=ev(),BD=tv(),UD=ol(),WD=iO();function HD(e,t){if(e!=null){if(FD.isInteropObservable(e))return kD.scheduleObservable(e,t);if(ND.isArrayLike(e))return qD.scheduleArray(e,t);if(LD.isPromise(e))return CD.schedulePromise(e,t);if(zD.isAsyncIterable(e))return jD.scheduleAsyncIterable(e,t);if(DD.isIterable(e))return ID.scheduleIterable(e,t);if(UD.isReadableStreamLike(e))return WD.scheduleReadableStreamLike(e,t)}throw BD.createInvalidObservableTypeError(e)}ml.scheduled=HD});var on=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.from=void 0;var VD=cv(),GD=ie();function $D(e,t){return t?VD.scheduled(e,t):GD.innerFrom(e)}vl.from=$D});var gl=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.of=void 0;var KD=It(),YD=on();function ZD(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=KD.popScheduler(e);return YD.from(e,r)}bl.of=ZD});var lv=b(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.throwError=void 0;var JD=xe(),XD=ye();function QD(e,t){var r=XD.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new JD.Observable(t?function(i){return t.schedule(n,0,i)}:n)}_l.throwError=QD});var yl=b(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.observeNotification=an.Notification=an.NotificationKind=void 0;var e5=_r(),t5=gl(),r5=lv(),n5=ye(),i5;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(i5=an.NotificationKind||(an.NotificationKind={}));var o5=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 oO(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 n5.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"?t5.of(n):r==="E"?r5.throwError(function(){return i}):r==="C"?e5.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}();an.Notification=o5;function oO(e,t){var r,n,i,o=e,a=o.kind,u=o.value,c=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,c):(i=t.complete)===null||i===void 0||i.call(t)}an.observeNotification=oO});var uO=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.isObservable=void 0;var a5=xe(),aO=ye();function u5(e){return!!e&&(e instanceof a5.Observable||aO.isFunction(e.lift)&&aO.isFunction(e.subscribe))}wl.isObservable=u5});var qn=b(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.EmptyError=void 0;var s5=Rn();xl.EmptyError=s5.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var sO=b(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.lastValueFrom=void 0;var c5=qn();function l5(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 c5.EmptyError)}})})}Sl.lastValueFrom=l5});var cO=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.firstValueFrom=void 0;var f5=qn(),d5=Eo();function p5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new d5.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new f5.EmptyError)}});e.subscribe(o)})}Ol.firstValueFrom=p5});var fv=b(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.ArgumentOutOfRangeError=void 0;var h5=Rn();El.ArgumentOutOfRangeError=h5.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var dv=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.NotFoundError=void 0;var m5=Rn();Al.NotFoundError=m5.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var pv=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.SequenceError=void 0;var v5=Rn();Tl.SequenceError=v5.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var Rl=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.isValidDate=void 0;function b5(e){return e instanceof Date&&!isNaN(e)}Pl.isValidDate=b5});var Ml=b(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.timeout=qi.TimeoutError=void 0;var g5=qt(),_5=Rl(),y5=G(),w5=ie(),x5=Rn(),S5=Y(),O5=nn();qi.TimeoutError=x5.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 E5(e,t){var r=_5.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?A5:o,u=r.scheduler,c=u===void 0?t??g5.asyncScheduler:u,s=r.meta,l=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return y5.operate(function(d,f){var p,h,m=null,g=0,_=function(w){h=O5.executeSchedule(f,c,function(){try{p.unsubscribe(),w5.innerFrom(a({meta:l,lastValue:m,seen:g})).subscribe(f)}catch(y){f.error(y)}},w)};p=d.subscribe(S5.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-c.now():i)})}qi.timeout=E5;function A5(e){throw new qi.TimeoutError(e)}});var In=b(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.map=void 0;var T5=G(),P5=Y();function R5(e,t){return T5.operate(function(r,n){var i=0;r.subscribe(P5.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}kl.map=R5});var Fn=b(jn=>{"use strict";var M5=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},k5=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.mapOneOrManyArgs=void 0;var C5=In(),q5=Array.isArray;function I5(e,t){return q5(t)?e.apply(void 0,k5([],M5(t))):e(t)}function j5(e){return C5.map(function(t){return I5(e,t)})}jn.mapOneOrManyArgs=j5});var mv=b(Ln=>{"use strict";var F5=Ln&&Ln.__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},lO=Ln&&Ln.__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(Ln,"__esModule",{value:!0});Ln.bindCallbackInternals=void 0;var L5=Ru(),N5=xe(),D5=ku(),z5=Fn(),B5=Mu(),U5=Kc();function hv(e,t,r,n){if(r)if(L5.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return hv(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 hv(e,t).apply(this,i).pipe(D5.subscribeOn(n),B5.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new U5.AsyncSubject,c=!0;return new N5.Observable(function(s){var l=u.subscribe(s);if(c){c=!1;var d=!1,f=!1;t.apply(i,lO(lO([],F5(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 l})}}Ln.bindCallbackInternals=hv});var fO=b(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.bindCallback=void 0;var W5=mv();function H5(e,t,r){return W5.bindCallbackInternals(!1,e,t,r)}Cl.bindCallback=H5});var dO=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.bindNodeCallback=void 0;var V5=mv();function G5(e,t,r){return V5.bindCallbackInternals(!0,e,t,r)}ql.bindNodeCallback=G5});var vv=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.argsArgArrayOrObject=void 0;var $5=Array.isArray,K5=Object.getPrototypeOf,Y5=Object.prototype,Z5=Object.keys;function J5(e){if(e.length===1){var t=e[0];if($5(t))return{args:t,keys:null};if(X5(t)){var r=Z5(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}Il.argsArgArrayOrObject=J5;function X5(e){return e&&typeof e=="object"&&K5(e)===Y5}});var bv=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.createObject=void 0;function Q5(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}jl.createObject=Q5});var Fl=b($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.combineLatestInit=$o.combineLatest=void 0;var e6=xe(),t6=vv(),mO=on(),vO=at(),r6=Fn(),pO=It(),n6=bv(),i6=Y(),o6=nn();function a6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pO.popScheduler(e),n=pO.popResultSelector(e),i=t6.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return mO.from([],r);var u=new e6.Observable(bO(o,r,a?function(c){return n6.createObject(a,c)}:vO.identity));return n?u.pipe(r6.mapOneOrManyArgs(n)):u}$o.combineLatest=a6;function bO(e,t,r){return r===void 0&&(r=vO.identity),function(n){hO(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,c=function(l){hO(t,function(){var d=mO.from(e[l],t),f=!1;d.subscribe(i6.createOperatorSubscriber(n,function(p){o[l]=p,f||(f=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)c(s)},n)}}$o.combineLatestInit=bO;function hO(e,t,r){e?o6.executeSchedule(r,e,t):t()}});var Nl=b(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.mergeInternals=void 0;var u6=ie(),s6=nn(),gO=Y();function c6(e,t,r,n,i,o,a,u){var c=[],s=0,l=0,d=!1,f=function(){d&&!c.length&&!s&&t.complete()},p=function(m){return s<n?h(m):c.push(m)},h=function(m){o&&t.next(m),s++;var g=!1;u6.innerFrom(r(m,l++)).subscribe(gO.createOperatorSubscriber(t,function(_){i?.(_),o?p(_):t.next(_)},function(){g=!0},void 0,function(){if(g)try{s--;for(var _=function(){var w=c.shift();a?s6.executeSchedule(t,a,function(){return h(w)}):h(w)};c.length&&s<n;)_();f()}catch(w){t.error(w)}}))};return e.subscribe(gO.createOperatorSubscriber(t,p,function(){d=!0,f()})),function(){u?.()}}Ll.mergeInternals=c6});var un=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.mergeMap=void 0;var l6=In(),f6=ie(),d6=G(),p6=Nl(),h6=ye();function _O(e,t,r){return r===void 0&&(r=1/0),h6.isFunction(t)?_O(function(n,i){return l6.map(function(o,a){return t(n,o,i,a)})(f6.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),d6.operate(function(n,i){return p6.mergeInternals(n,i,e,r)}))}Dl.mergeMap=_O});var Cu=b(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.mergeAll=void 0;var m6=un(),v6=at();function b6(e){return e===void 0&&(e=1/0),m6.mergeMap(v6.identity,e)}zl.mergeAll=b6});var Ul=b(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.concatAll=void 0;var g6=Cu();function _6(){return g6.mergeAll(1)}Bl.concatAll=_6});var qu=b(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.concat=void 0;var y6=Ul(),w6=It(),x6=on();function S6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y6.concatAll()(x6.from(e,w6.popScheduler(e)))}Wl.concat=S6});var Iu=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.defer=void 0;var O6=xe(),E6=ie();function A6(e){return new O6.Observable(function(t){E6.innerFrom(e()).subscribe(t)})}Hl.defer=A6});var yO=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.connectable=void 0;var T6=ut(),P6=xe(),R6=Iu(),M6={connector:function(){return new T6.Subject},resetOnDisconnect:!0};function k6(e,t){t===void 0&&(t=M6);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new P6.Observable(function(c){return a.subscribe(c)});return u.connect=function(){return(!r||r.closed)&&(r=R6.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}Vl.connectable=k6});var wO=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.forkJoin=void 0;var C6=xe(),q6=vv(),I6=ie(),j6=It(),F6=Y(),L6=Fn(),N6=bv();function D6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=j6.popResultSelector(e),n=q6.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new C6.Observable(function(u){var c=i.length;if(!c){u.complete();return}for(var s=new Array(c),l=c,d=c,f=function(h){var m=!1;I6.innerFrom(i[h]).subscribe(F6.createOperatorSubscriber(u,function(g){m||(m=!0,d--),s[h]=g},function(){return l--},void 0,function(){(!l||!m)&&(d||u.next(o?N6.createObject(o,s):s),u.complete())}))},p=0;p<c;p++)f(p)});return r?a.pipe(L6.mapOneOrManyArgs(r)):a}Gl.forkJoin=D6});var SO=b(Ko=>{"use strict";var z6=Ko&&Ko.__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(Ko,"__esModule",{value:!0});Ko.fromEvent=void 0;var B6=ie(),U6=xe(),W6=un(),H6=Qc(),Ii=ye(),V6=Fn(),G6=["addListener","removeListener"],$6=["addEventListener","removeEventListener"],K6=["on","off"];function gv(e,t,r,n){if(Ii.isFunction(r)&&(n=r,r=void 0),n)return gv(e,t,r).pipe(V6.mapOneOrManyArgs(n));var i=z6(J6(e)?$6.map(function(u){return function(c){return e[u](t,c,r)}}):Y6(e)?G6.map(xO(e,t)):Z6(e)?K6.map(xO(e,t)):[],2),o=i[0],a=i[1];if(!o&&H6.isArrayLike(e))return W6.mergeMap(function(u){return gv(u,t,r)})(B6.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new U6.Observable(function(u){var c=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return u.next(1<s.length?s:s[0])};return o(c),function(){return a(c)}})}Ko.fromEvent=gv;function xO(e,t){return function(r){return function(n){return e[r](t,n)}}}function Y6(e){return Ii.isFunction(e.addListener)&&Ii.isFunction(e.removeListener)}function Z6(e){return Ii.isFunction(e.on)&&Ii.isFunction(e.off)}function J6(e){return Ii.isFunction(e.addEventListener)&&Ii.isFunction(e.removeEventListener)}});var EO=b($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.fromEventPattern=void 0;var X6=xe(),Q6=ye(),e3=Fn();function OO(e,t,r){return r?OO(e,t).pipe(e3.mapOneOrManyArgs(r)):new X6.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 Q6.isFunction(t)?function(){return t(i,o)}:void 0})}$l.fromEventPattern=OO});var TO=b(Yo=>{"use strict";var t3=Yo&&Yo.__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(l){return c([s,l])}}function c(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(l){s=[6,l],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(Yo,"__esModule",{value:!0});Yo.generate=void 0;var AO=at(),r3=Ru(),n3=Iu(),i3=uv();function o3(e,t,r,n,i){var o,a,u,c;arguments.length===1?(o=e,c=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,u=a===void 0?AO.identity:a,i=o.scheduler):(c=e,!n||r3.isScheduler(n)?(u=AO.identity,i=n):u=n);function s(){var l;return t3(this,function(d){switch(d.label){case 0:l=c,d.label=1;case 1:return!t||t(l)?[4,u(l)]:[3,4];case 2:d.sent(),d.label=3;case 3:return l=r(l),[3,1];case 4:return[2]}})}return n3.defer(i?function(){return i3.scheduleIterable(s(),i)}:s)}Yo.generate=o3});var PO=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.iif=void 0;var a3=Iu();function u3(e,t,r){return a3.defer(function(){return e()?t:r})}Kl.iif=u3});var Nn=b(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.timer=void 0;var s3=xe(),c3=qt(),l3=Ru(),f3=Rl();function d3(e,t,r){e===void 0&&(e=0),r===void 0&&(r=c3.async);var n=-1;return t!=null&&(l3.isScheduler(t)?r=t:n=t),new s3.Observable(function(i){var o=f3.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)})}Yl.timer=d3});var _v=b(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.interval=void 0;var p3=qt(),h3=Nn();function m3(e,t){return e===void 0&&(e=0),t===void 0&&(t=p3.asyncScheduler),e<0&&(e=0),h3.timer(e,e,t)}Zl.interval=m3});var MO=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.merge=void 0;var v3=Cu(),b3=ie(),g3=_r(),RO=It(),_3=on();function y3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=RO.popScheduler(e),n=RO.popNumber(e,1/0),i=e;return i.length?i.length===1?b3.innerFrom(i[0]):v3.mergeAll(n)(_3.from(i,r)):g3.EMPTY}Jl.merge=y3});var yv=b(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.never=ji.NEVER=void 0;var w3=xe(),x3=ot();ji.NEVER=new w3.Observable(x3.noop);function S3(){return ji.NEVER}ji.never=S3});var Fi=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.argsOrArgArray=void 0;var O3=Array.isArray;function E3(e){return e.length===1&&O3(e[0])?e[0]:e}Xl.argsOrArgArray=E3});var wv=b(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.onErrorResumeNext=void 0;var A3=xe(),T3=Fi(),P3=Y(),kO=ot(),R3=ie();function M3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=T3.argsOrArgArray(e);return new A3.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=R3.innerFrom(r[i++])}catch{o();return}var u=new P3.OperatorSubscriber(n,void 0,kO.noop,kO.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}Ql.onErrorResumeNext=M3});var CO=b(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.pairs=void 0;var k3=on();function C3(e,t){return k3.from(Object.entries(e),t)}ef.pairs=C3});var qO=b(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.not=void 0;function q3(e,t){return function(r,n){return!e.call(t,r,n)}}tf.not=q3});var Li=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.filter=void 0;var I3=G(),j3=Y();function F3(e,t){return I3.operate(function(r,n){var i=0;r.subscribe(j3.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}rf.filter=F3});var FO=b(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.partition=void 0;var L3=qO(),IO=Li(),jO=ie();function N3(e,t,r){return[IO.filter(t,r)(jO.innerFrom(e)),IO.filter(L3.not(t,r))(jO.innerFrom(e))]}nf.partition=N3});var xv=b(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.raceInit=Zo.race=void 0;var D3=xe(),LO=ie(),z3=Fi(),B3=Y();function U3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=z3.argsOrArgArray(e),e.length===1?LO.innerFrom(e[0]):new D3.Observable(NO(e))}Zo.race=U3;function NO(e){return function(t){for(var r=[],n=function(o){r.push(LO.innerFrom(e[o]).subscribe(B3.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)}}Zo.raceInit=NO});var DO=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.range=void 0;var W3=xe(),H3=_r();function V3(e,t,r){if(t==null&&(t=e,e=0),t<=0)return H3.EMPTY;var n=t+e;return new W3.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()})}of.range=V3});var zO=b(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.using=void 0;var G3=xe(),$3=ie(),K3=_r();function Y3(e,t){return new G3.Observable(function(r){var n=e(),i=t(n),o=i?$3.innerFrom(i):K3.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}af.using=Y3});var uf=b(Dn=>{"use strict";var Z3=Dn&&Dn.__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},J3=Dn&&Dn.__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(Dn,"__esModule",{value:!0});Dn.zip=void 0;var X3=xe(),Q3=ie(),e8=Fi(),t8=_r(),r8=Y(),n8=It();function i8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n8.popResultSelector(e),n=e8.argsOrArgArray(e);return n.length?new X3.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){Q3.innerFrom(n[s]).subscribe(r8.createOperatorSubscriber(i,function(l){if(o[s].push(l),o.every(function(f){return f.length})){var d=o.map(function(f){return f.shift()});i.next(r?r.apply(void 0,J3([],Z3(d))):d),o.some(function(f,p){return!f.length&&a[p]})&&i.complete()}},function(){a[s]=!0,!o[s].length&&i.complete()}))},c=0;!i.closed&&c<n.length;c++)u(c);return function(){o=a=null}}):t8.EMPTY}Dn.zip=i8});var UO=b(BO=>{"use strict";Object.defineProperty(BO,"__esModule",{value:!0})});var Sv=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.audit=void 0;var o8=G(),a8=ie(),WO=Y();function u8(e){return o8.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()},c=function(){o=null,a&&r.complete()};t.subscribe(WO.createOperatorSubscriber(r,function(s){n=!0,i=s,o||a8.innerFrom(e(s)).subscribe(o=WO.createOperatorSubscriber(r,u,c))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}sf.audit=u8});var HO=b(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.auditTime=void 0;var s8=qt(),c8=Sv(),l8=Nn();function f8(e,t){return t===void 0&&(t=s8.asyncScheduler),c8.audit(function(){return l8.timer(e,t)})}cf.auditTime=f8});var GO=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.buffer=void 0;var d8=G(),p8=ot(),VO=Y(),h8=ie();function m8(e){return d8.operate(function(t,r){var n=[];return t.subscribe(VO.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),h8.innerFrom(e).subscribe(VO.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},p8.noop)),function(){n=null}})}lf.buffer=m8});var $O=b(Jo=>{"use strict";var Ov=Jo&&Jo.__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(Jo,"__esModule",{value:!0});Jo.bufferCount=void 0;var v8=G(),b8=Y(),g8=rn();function _8(e,t){return t===void 0&&(t=null),t=t??e,v8.operate(function(r,n){var i=[],o=0;r.subscribe(b8.createOperatorSubscriber(n,function(a){var u,c,s,l,d=null;o++%t===0&&i.push([]);try{for(var f=Ov(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&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error}}if(d)try{for(var m=Ov(d),g=m.next();!g.done;g=m.next()){var h=g.value;g8.arrRemove(i,h),n.next(h)}}catch(_){s={error:_}}finally{try{g&&!g.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var c=Ov(i),s=c.next();!s.done;s=c.next()){var l=s.value;n.next(l)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=c.return)&&u.call(c)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}Jo.bufferCount=_8});var YO=b(Xo=>{"use strict";var y8=Xo&&Xo.__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(Xo,"__esModule",{value:!0});Xo.bufferTime=void 0;var w8=Dt(),x8=G(),S8=Y(),O8=rn(),E8=qt(),A8=It(),KO=nn();function T8(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=A8.popScheduler(n))!==null&&t!==void 0?t:E8.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return x8.operate(function(c,s){var l=[],d=!1,f=function(m){var g=m.buffer,_=m.subs;_.unsubscribe(),O8.arrRemove(l,m),s.next(g),d&&p()},p=function(){if(l){var m=new w8.Subscription;s.add(m);var g=[],_={buffer:g,subs:m};l.push(_),KO.executeSchedule(m,o,function(){return f(_)},e)}};a!==null&&a>=0?KO.executeSchedule(s,o,p,a,!0):d=!0,p();var h=S8.createOperatorSubscriber(s,function(m){var g,_,w=l.slice();try{for(var y=y8(w),E=y.next();!E.done;E=y.next()){var S=E.value,A=S.buffer;A.push(m),u<=A.length&&f(S)}}catch(T){g={error:T}}finally{try{E&&!E.done&&(_=y.return)&&_.call(y)}finally{if(g)throw g.error}}},function(){for(;l?.length;)s.next(l.shift().buffer);h?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return l=null});c.subscribe(h)})}Xo.bufferTime=T8});var XO=b(Qo=>{"use strict";var P8=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.bufferToggle=void 0;var R8=Dt(),M8=G(),ZO=ie(),Ev=Y(),JO=ot(),k8=rn();function C8(e,t){return M8.operate(function(r,n){var i=[];ZO.innerFrom(e).subscribe(Ev.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new R8.Subscription,c=function(){k8.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(ZO.innerFrom(t(o)).subscribe(Ev.createOperatorSubscriber(n,c,JO.noop)))},JO.noop)),r.subscribe(Ev.createOperatorSubscriber(n,function(o){var a,u;try{for(var c=P8(i),s=c.next();!s.done;s=c.next()){var l=s.value;l.push(o)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=c.return)&&u.call(c)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}Qo.bufferToggle=C8});var eE=b(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.bufferWhen=void 0;var q8=G(),I8=ot(),QO=Y(),j8=ie();function F8(e){return q8.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),j8.innerFrom(e()).subscribe(i=QO.createOperatorSubscriber(r,o,I8.noop))};o(),t.subscribe(QO.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}ff.bufferWhen=F8});var rE=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.catchError=void 0;var L8=ie(),N8=Y(),D8=G();function tE(e){return D8.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(N8.createOperatorSubscriber(r,void 0,void 0,function(a){o=L8.innerFrom(e(a,tE(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}df.catchError=tE});var Av=b(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.scanInternals=void 0;var z8=Y();function B8(e,t,r,n,i){return function(o,a){var u=r,c=t,s=0;o.subscribe(z8.createOperatorSubscriber(a,function(l){var d=s++;c=u?e(c,l,d):(u=!0,l),n&&a.next(c)},i&&function(){u&&a.next(c),a.complete()}))}}pf.scanInternals=B8});var ea=b(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.reduce=void 0;var U8=Av(),W8=G();function H8(e,t){return W8.operate(U8.scanInternals(e,t,arguments.length>=2,!1,!0))}hf.reduce=H8});var Tv=b(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.toArray=void 0;var V8=ea(),G8=G(),$8=function(e,t){return e.push(t),e};function K8(){return G8.operate(function(e,t){V8.reduce($8,[])(e).subscribe(t)})}mf.toArray=K8});var Pv=b(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.joinAllInternals=void 0;var Y8=at(),Z8=Fn(),J8=Eu(),X8=un(),Q8=Tv();function ez(e,t){return J8.pipe(Q8.toArray(),X8.mergeMap(function(r){return e(r)}),t?Z8.mapOneOrManyArgs(t):Y8.identity)}vf.joinAllInternals=ez});var Rv=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.combineLatestAll=void 0;var tz=Fl(),rz=Pv();function nz(e){return rz.joinAllInternals(tz.combineLatest,e)}bf.combineLatestAll=nz});var nE=b(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.combineAll=void 0;var iz=Rv();gf.combineAll=iz.combineLatestAll});var uE=b(zn=>{"use strict";var iE=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},oE=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.combineLatest=void 0;var oz=Fl(),az=G(),uz=Fi(),sz=Fn(),cz=Eu(),lz=It();function aE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lz.popResultSelector(e);return r?cz.pipe(aE.apply(void 0,oE([],iE(e))),sz.mapOneOrManyArgs(r)):az.operate(function(n,i){oz.combineLatestInit(oE([n],iE(uz.argsOrArgArray(e))))(i)})}zn.combineLatest=aE});var sE=b(Bn=>{"use strict";var fz=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},dz=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.combineLatestWith=void 0;var pz=uE();function hz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pz.combineLatest.apply(void 0,dz([],fz(e)))}Bn.combineLatestWith=hz});var Mv=b(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.concatMap=void 0;var cE=un(),mz=ye();function vz(e,t){return mz.isFunction(t)?cE.mergeMap(e,t,1):cE.mergeMap(e,1)}_f.concatMap=vz});var fE=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.concatMapTo=void 0;var lE=Mv(),bz=ye();function gz(e,t){return bz.isFunction(t)?lE.concatMap(function(){return e},t):lE.concatMap(function(){return e})}yf.concatMapTo=gz});var dE=b(Un=>{"use strict";var _z=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},yz=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.concat=void 0;var wz=G(),xz=Ul(),Sz=It(),Oz=on();function Ez(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Sz.popScheduler(e);return wz.operate(function(n,i){xz.concatAll()(Oz.from(yz([n],_z(e)),r)).subscribe(i)})}Un.concat=Ez});var pE=b(Wn=>{"use strict";var Az=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},Tz=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.concatWith=void 0;var Pz=dE();function Rz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Pz.concat.apply(void 0,Tz([],Az(e)))}Wn.concatWith=Rz});var hE=b(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.fromSubscribable=void 0;var Mz=xe();function kz(e){return new Mz.Observable(function(t){return e.subscribe(t)})}wf.fromSubscribable=kz});var Sf=b(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.connect=void 0;var Cz=ut(),qz=ie(),Iz=G(),jz=hE(),Fz={connector:function(){return new Cz.Subject}};function Lz(e,t){t===void 0&&(t=Fz);var r=t.connector;return Iz.operate(function(n,i){var o=r();qz.innerFrom(e(jz.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}xf.connect=Lz});var mE=b(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.count=void 0;var Nz=ea();function Dz(e){return Nz.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}Of.count=Dz});var bE=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.debounce=void 0;var zz=G(),Bz=ot(),vE=Y(),Uz=ie();function Wz(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(vE.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=vE.createOperatorSubscriber(r,a,Bz.noop),Uz.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}Ef.debounce=Wz});var gE=b(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.debounceTime=void 0;var Hz=qt(),Vz=G(),Gz=Y();function $z(e,t){return t===void 0&&(t=Hz.asyncScheduler),Vz.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 c(){var s=a+e,l=t.now();if(l<s){i=this.schedule(void 0,s-l),n.add(i);return}u()}r.subscribe(Gz.createOperatorSubscriber(n,function(s){o=s,a=t.now(),i||(i=t.schedule(c,e),n.add(i))},function(){u(),n.complete()},void 0,function(){o=i=null}))})}Af.debounceTime=$z});var ju=b(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.defaultIfEmpty=void 0;var Kz=G(),Yz=Y();function Zz(e){return Kz.operate(function(t,r){var n=!1;t.subscribe(Yz.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}Tf.defaultIfEmpty=Zz});var Fu=b(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.take=void 0;var Jz=_r(),Xz=G(),Qz=Y();function eB(e){return e<=0?function(){return Jz.EMPTY}:Xz.operate(function(t,r){var n=0;t.subscribe(Qz.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}Pf.take=eB});var kv=b(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.ignoreElements=void 0;var tB=G(),rB=Y(),nB=ot();function iB(){return tB.operate(function(e,t){e.subscribe(rB.createOperatorSubscriber(t,nB.noop))})}Rf.ignoreElements=iB});var Cv=b(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.mapTo=void 0;var oB=In();function aB(e){return oB.map(function(){return e})}Mf.mapTo=aB});var qv=b(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.delayWhen=void 0;var uB=qu(),_E=Fu(),sB=kv(),cB=Cv(),lB=un(),fB=ie();function yE(e,t){return t?function(r){return uB.concat(t.pipe(_E.take(1),sB.ignoreElements()),r.pipe(yE(e)))}:lB.mergeMap(function(r,n){return fB.innerFrom(e(r,n)).pipe(_E.take(1),cB.mapTo(r))})}kf.delayWhen=yE});var wE=b(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.delay=void 0;var dB=qt(),pB=qv(),hB=Nn();function mB(e,t){t===void 0&&(t=dB.asyncScheduler);var r=hB.timer(e,t);return pB.delayWhen(function(){return r})}Cf.delay=mB});var xE=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.dematerialize=void 0;var vB=yl(),bB=G(),gB=Y();function _B(){return bB.operate(function(e,t){e.subscribe(gB.createOperatorSubscriber(t,function(r){return vB.observeNotification(r,t)}))})}qf.dematerialize=_B});var OE=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.distinct=void 0;var yB=G(),SE=Y(),wB=ot(),xB=ie();function SB(e,t){return yB.operate(function(r,n){var i=new Set;r.subscribe(SE.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&xB.innerFrom(t).subscribe(SE.createOperatorSubscriber(n,function(){return i.clear()},wB.noop))})}If.distinct=SB});var Iv=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.distinctUntilChanged=void 0;var OB=at(),EB=G(),AB=Y();function TB(e,t){return t===void 0&&(t=OB.identity),e=e??PB,EB.operate(function(r,n){var i,o=!0;r.subscribe(AB.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}jf.distinctUntilChanged=TB;function PB(e,t){return e===t}});var EE=b(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.distinctUntilKeyChanged=void 0;var RB=Iv();function MB(e,t){return RB.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Ff.distinctUntilKeyChanged=MB});var Lu=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.throwIfEmpty=void 0;var kB=qn(),CB=G(),qB=Y();function IB(e){return e===void 0&&(e=jB),CB.operate(function(t,r){var n=!1;t.subscribe(qB.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Lf.throwIfEmpty=IB;function jB(){return new kB.EmptyError}});var TE=b(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.elementAt=void 0;var AE=fv(),FB=Li(),LB=Lu(),NB=ju(),DB=Fu();function zB(e,t){if(e<0)throw new AE.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(FB.filter(function(i,o){return o===e}),DB.take(1),r?NB.defaultIfEmpty(t):LB.throwIfEmpty(function(){return new AE.ArgumentOutOfRangeError}))}}Nf.elementAt=zB});var PE=b(Hn=>{"use strict";var BB=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},UB=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.endWith=void 0;var WB=qu(),HB=gl();function VB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return WB.concat(r,HB.of.apply(void 0,UB([],BB(e))))}}Hn.endWith=VB});var RE=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.every=void 0;var GB=G(),$B=Y();function KB(e,t){return GB.operate(function(r,n){var i=0;r.subscribe($B.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}Df.every=KB});var jv=b(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.exhaustMap=void 0;var YB=In(),ME=ie(),ZB=G(),kE=Y();function CE(e,t){return t?function(r){return r.pipe(CE(function(n,i){return ME.innerFrom(e(n,i)).pipe(YB.map(function(o,a){return t(n,o,i,a)}))}))}:ZB.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(kE.createOperatorSubscriber(n,function(u){o||(o=kE.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),ME.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}zf.exhaustMap=CE});var Fv=b(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.exhaustAll=void 0;var JB=jv(),XB=at();function QB(){return JB.exhaustMap(XB.identity)}Bf.exhaustAll=QB});var qE=b(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.exhaust=void 0;var eU=Fv();Uf.exhaust=eU.exhaustAll});var IE=b(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.expand=void 0;var tU=G(),rU=Nl();function nU(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,tU.operate(function(n,i){return rU.mergeInternals(n,i,e,t,void 0,!0,r)})}Wf.expand=nU});var jE=b(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.finalize=void 0;var iU=G();function oU(e){return iU.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}Hf.finalize=oU});var Lv=b(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.createFind=ta.find=void 0;var aU=G(),uU=Y();function sU(e,t){return aU.operate(FE(e,t,"value"))}ta.find=sU;function FE(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(uU.createOperatorSubscriber(o,function(u){var c=a++;e.call(t,u,c,i)&&(o.next(n?c:u),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}ta.createFind=FE});var LE=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.findIndex=void 0;var cU=G(),lU=Lv();function fU(e,t){return cU.operate(lU.createFind(e,t,"index"))}Vf.findIndex=fU});var NE=b(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.first=void 0;var dU=qn(),pU=Li(),hU=Fu(),mU=ju(),vU=Lu(),bU=at();function gU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?pU.filter(function(i,o){return e(i,o,n)}):bU.identity,hU.take(1),r?mU.defaultIfEmpty(t):vU.throwIfEmpty(function(){return new dU.EmptyError}))}}Gf.first=gU});var zE=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.groupBy=void 0;var _U=xe(),yU=ie(),wU=ut(),xU=G(),DE=Y();function SU(e,t,r,n){return xU.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,c=function(h){u.forEach(h),h(o)},s=function(h){return c(function(m){return m.error(h)})},l=0,d=!1,f=new DE.OperatorSubscriber(o,function(h){try{var m=e(h),g=u.get(m);if(!g){u.set(m,g=n?n():new wU.Subject);var _=p(m,g);if(o.next(_),r){var w=DE.createOperatorSubscriber(g,function(){g.complete(),w?.unsubscribe()},void 0,void 0,function(){return u.delete(m)});f.add(yU.innerFrom(r(_)).subscribe(w))}}g.next(a?a(h):h)}catch(y){s(y)}},function(){return c(function(h){return h.complete()})},s,function(){return u.clear()},function(){return d=!0,l===0});i.subscribe(f);function p(h,m){var g=new _U.Observable(function(_){l++;var w=m.subscribe(_);return function(){w.unsubscribe(),--l===0&&d&&f.unsubscribe()}});return g.key=h,g}})}$f.groupBy=SU});var BE=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.isEmpty=void 0;var OU=G(),EU=Y();function AU(){return OU.operate(function(e,t){e.subscribe(EU.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}Kf.isEmpty=AU});var Nv=b(ra=>{"use strict";var TU=ra&&ra.__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(ra,"__esModule",{value:!0});ra.takeLast=void 0;var PU=_r(),RU=G(),MU=Y();function kU(e){return e<=0?function(){return PU.EMPTY}:RU.operate(function(t,r){var n=[];t.subscribe(MU.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=TU(n),u=a.next();!u.done;u=a.next()){var c=u.value;r.next(c)}}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}))})}ra.takeLast=kU});var UE=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.last=void 0;var CU=qn(),qU=Li(),IU=Nv(),jU=Lu(),FU=ju(),LU=at();function NU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?qU.filter(function(i,o){return e(i,o,n)}):LU.identity,IU.takeLast(1),r?FU.defaultIfEmpty(t):jU.throwIfEmpty(function(){return new CU.EmptyError}))}}Yf.last=NU});var WE=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.materialize=void 0;var Dv=yl(),DU=G(),zU=Y();function BU(){return DU.operate(function(e,t){e.subscribe(zU.createOperatorSubscriber(t,function(r){t.next(Dv.Notification.createNext(r))},function(){t.next(Dv.Notification.createComplete()),t.complete()},function(r){t.next(Dv.Notification.createError(r)),t.complete()}))})}Zf.materialize=BU});var HE=b(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.max=void 0;var UU=ea(),WU=ye();function HU(e){return UU.reduce(WU.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}Jf.max=HU});var VE=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.flatMap=void 0;var VU=un();Xf.flatMap=VU.mergeMap});var $E=b(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.mergeMapTo=void 0;var GE=un(),GU=ye();function $U(e,t,r){return r===void 0&&(r=1/0),GU.isFunction(t)?GE.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),GE.mergeMap(function(){return e},r))}Qf.mergeMapTo=$U});var KE=b(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.mergeScan=void 0;var KU=G(),YU=Nl();function ZU(e,t,r){return r===void 0&&(r=1/0),KU.operate(function(n,i){var o=t;return YU.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}ed.mergeScan=ZU});var ZE=b(Vn=>{"use strict";var JU=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},XU=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.merge=void 0;var QU=G(),eW=Fi(),tW=Cu(),YE=It(),rW=on();function nW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=YE.popScheduler(e),n=YE.popNumber(e,1/0);return e=eW.argsOrArgArray(e),QU.operate(function(i,o){tW.mergeAll(n)(rW.from(XU([i],JU(e)),r)).subscribe(o)})}Vn.merge=nW});var JE=b(Gn=>{"use strict";var iW=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},oW=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.mergeWith=void 0;var aW=ZE();function uW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return aW.merge.apply(void 0,oW([],iW(e)))}Gn.mergeWith=uW});var XE=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.min=void 0;var sW=ea(),cW=ye();function lW(e){return sW.reduce(cW.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}td.min=lW});var nd=b(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.multicast=void 0;var fW=Au(),QE=ye(),dW=Sf();function pW(e,t){var r=QE.isFunction(e)?e:function(){return e};return QE.isFunction(t)?dW.connect(t,{connector:r}):function(n){return new fW.ConnectableObservable(n,r)}}rd.multicast=pW});var tA=b(Ur=>{"use strict";var hW=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},mW=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 vW=Fi(),bW=wv();function eA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=vW.argsOrArgArray(e);return function(n){return bW.onErrorResumeNext.apply(void 0,mW([n],hW(r)))}}Ur.onErrorResumeNextWith=eA;Ur.onErrorResumeNext=eA});var rA=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.pairwise=void 0;var gW=G(),_W=Y();function yW(){return gW.operate(function(e,t){var r,n=!1;e.subscribe(_W.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}id.pairwise=yW});var nA=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.pluck=void 0;var wW=In();function xW(){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 wW.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})}od.pluck=xW});var iA=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.publish=void 0;var SW=ut(),OW=nd(),EW=Sf();function AW(e){return e?function(t){return EW.connect(e)(t)}:function(t){return OW.multicast(new SW.Subject)(t)}}ad.publish=AW});var oA=b(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.publishBehavior=void 0;var TW=Km(),PW=Au();function RW(e){return function(t){var r=new TW.BehaviorSubject(e);return new PW.ConnectableObservable(t,function(){return r})}}ud.publishBehavior=RW});var aA=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.publishLast=void 0;var MW=Kc(),kW=Au();function CW(){return function(e){var t=new MW.AsyncSubject;return new kW.ConnectableObservable(e,function(){return t})}}sd.publishLast=CW});var sA=b(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.publishReplay=void 0;var qW=$c(),IW=nd(),uA=ye();function jW(e,t,r,n){r&&!uA.isFunction(r)&&(n=r);var i=uA.isFunction(r)?r:void 0;return function(o){return IW.multicast(new qW.ReplaySubject(e,t,n),i)(o)}}cd.publishReplay=jW});var cA=b($n=>{"use strict";var FW=$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},LW=$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.raceWith=void 0;var NW=xv(),DW=G(),zW=at();function BW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?DW.operate(function(r,n){NW.raceInit(LW([r],FW(e)))(n)}):zW.identity}$n.raceWith=BW});var fA=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.repeat=void 0;var UW=_r(),WW=G(),lA=Y(),HW=ie(),VW=Nn();function GW(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 UW.EMPTY}:WW.operate(function(i,o){var a=0,u,c=function(){if(u?.unsubscribe(),u=null,n!=null){var l=typeof n=="number"?VW.timer(n):HW.innerFrom(n(a)),d=lA.createOperatorSubscriber(o,function(){d.unsubscribe(),s()});l.subscribe(d)}else s()},s=function(){var l=!1;u=i.subscribe(lA.createOperatorSubscriber(o,void 0,function(){++a<r?u?c():l=!0:o.complete()})),l&&c()};s()})}ld.repeat=GW});var pA=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.repeatWhen=void 0;var $W=ie(),KW=ut(),YW=G(),dA=Y();function ZW(e){return YW.operate(function(t,r){var n,i=!1,o,a=!1,u=!1,c=function(){return u&&a&&(r.complete(),!0)},s=function(){return o||(o=new KW.Subject,$W.innerFrom(e(o)).subscribe(dA.createOperatorSubscriber(r,function(){n?l():i=!0},function(){a=!0,c()}))),o},l=function(){u=!1,n=t.subscribe(dA.createOperatorSubscriber(r,void 0,function(){u=!0,!c()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,l())};l()})}fd.repeatWhen=ZW});var mA=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.retry=void 0;var JW=G(),hA=Y(),XW=at(),QW=Nn(),e4=ie();function t4(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?XW.identity:JW.operate(function(u,c){var s=0,l,d=function(){var f=!1;l=u.subscribe(hA.createOperatorSubscriber(c,function(p){a&&(s=0),c.next(p)},void 0,function(p){if(s++<n){var h=function(){l?(l.unsubscribe(),l=null,d()):f=!0};if(i!=null){var m=typeof i=="number"?QW.timer(i):e4.innerFrom(i(p,s)),g=hA.createOperatorSubscriber(c,function(){g.unsubscribe(),h()},function(){c.complete()});m.subscribe(g)}else h()}else c.error(p)})),f&&(l.unsubscribe(),l=null,d())};d()})}dd.retry=t4});var bA=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.retryWhen=void 0;var r4=ie(),n4=ut(),i4=G(),vA=Y();function o4(e){return i4.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(vA.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new n4.Subject,r4.innerFrom(e(o)).subscribe(vA.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}pd.retryWhen=o4});var zv=b(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.sample=void 0;var a4=ie(),u4=G(),s4=ot(),gA=Y();function c4(e){return u4.operate(function(t,r){var n=!1,i=null;t.subscribe(gA.createOperatorSubscriber(r,function(o){n=!0,i=o})),a4.innerFrom(e).subscribe(gA.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},s4.noop))})}hd.sample=c4});var _A=b(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.sampleTime=void 0;var l4=qt(),f4=zv(),d4=_v();function p4(e,t){return t===void 0&&(t=l4.asyncScheduler),f4.sample(d4.interval(e,t))}md.sampleTime=p4});var yA=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.scan=void 0;var h4=G(),m4=Av();function v4(e,t){return h4.operate(m4.scanInternals(e,t,arguments.length>=2,!0))}vd.scan=v4});var xA=b(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.sequenceEqual=void 0;var b4=G(),g4=Y(),_4=ie();function y4(e,t){return t===void 0&&(t=function(r,n){return r===n}),b4.operate(function(r,n){var i=wA(),o=wA(),a=function(c){n.next(c),n.complete()},u=function(c,s){var l=g4.createOperatorSubscriber(n,function(d){var f=s.buffer,p=s.complete;f.length===0?p?a(!1):c.buffer.push(d):!t(d,f.shift())&&a(!1)},function(){c.complete=!0;var d=s.complete,f=s.buffer;d&&a(f.length===0),l?.unsubscribe()});return l};r.subscribe(u(i,o)),_4.innerFrom(e).subscribe(u(o,i))})}bd.sequenceEqual=y4;function wA(){return{buffer:[],complete:!1}}});var Uv=b(Kn=>{"use strict";var w4=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},x4=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.share=void 0;var SA=ie(),S4=ut(),OA=Eo(),O4=G();function E4(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new S4.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,u=e.resetOnRefCountZero,c=u===void 0?!0:u;return function(s){var l,d,f,p=0,h=!1,m=!1,g=function(){d?.unsubscribe(),d=void 0},_=function(){g(),l=f=void 0,h=m=!1},w=function(){var y=l;_(),y?.unsubscribe()};return O4.operate(function(y,E){p++,!m&&!h&&g();var S=f=f??r();E.add(function(){p--,p===0&&!m&&!h&&(d=Bv(w,c))}),S.subscribe(E),!l&&p>0&&(l=new OA.SafeSubscriber({next:function(A){return S.next(A)},error:function(A){m=!0,g(),d=Bv(_,i,A),S.error(A)},complete:function(){h=!0,g(),d=Bv(_,a),S.complete()}}),SA.innerFrom(y).subscribe(l))})(s)}}Kn.share=E4;function Bv(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 OA.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return SA.innerFrom(t.apply(void 0,x4([],w4(r)))).subscribe(i)}}});var EA=b(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.shareReplay=void 0;var A4=$c(),T4=Uv();function P4(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,T4.share({connector:function(){return new A4.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}gd.shareReplay=P4});var AA=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.single=void 0;var R4=qn(),M4=pv(),k4=dv(),C4=G(),q4=Y();function I4(e){return C4.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(q4.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new M4.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new k4.NotFoundError("No matching values"):new R4.EmptyError)}))})}_d.single=I4});var TA=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.skip=void 0;var j4=Li();function F4(e){return j4.filter(function(t,r){return e<=r})}yd.skip=F4});var PA=b(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.skipLast=void 0;var L4=at(),N4=G(),D4=Y();function z4(e){return e<=0?L4.identity:N4.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(D4.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var u=a%e,c=n[u];n[u]=o,r.next(c)}})),function(){n=null}})}wd.skipLast=z4});var MA=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.skipUntil=void 0;var B4=G(),RA=Y(),U4=ie(),W4=ot();function H4(e){return B4.operate(function(t,r){var n=!1,i=RA.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},W4.noop);U4.innerFrom(e).subscribe(i),t.subscribe(RA.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}xd.skipUntil=H4});var kA=b(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.skipWhile=void 0;var V4=G(),G4=Y();function $4(e){return V4.operate(function(t,r){var n=!1,i=0;t.subscribe(G4.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}Sd.skipWhile=$4});var qA=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.startWith=void 0;var CA=qu(),K4=It(),Y4=G();function Z4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=K4.popScheduler(e);return Y4.operate(function(n,i){(r?CA.concat(e,n,r):CA.concat(e,n)).subscribe(i)})}Od.startWith=Z4});var Nu=b(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.switchMap=void 0;var J4=ie(),X4=G(),IA=Y();function Q4(e,t){return X4.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(IA.createOperatorSubscriber(n,function(c){i?.unsubscribe();var s=0,l=o++;J4.innerFrom(e(c,l)).subscribe(i=IA.createOperatorSubscriber(n,function(d){return n.next(t?t(c,d,l,s++):d)},function(){i=null,u()}))},function(){a=!0,u()}))})}Ed.switchMap=Q4});var jA=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.switchAll=void 0;var e7=Nu(),t7=at();function r7(){return e7.switchMap(t7.identity)}Ad.switchAll=r7});var LA=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.switchMapTo=void 0;var FA=Nu(),n7=ye();function i7(e,t){return n7.isFunction(t)?FA.switchMap(function(){return e},t):FA.switchMap(function(){return e})}Td.switchMapTo=i7});var NA=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.switchScan=void 0;var o7=Nu(),a7=G();function u7(e,t){return a7.operate(function(r,n){var i=t;return o7.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}Pd.switchScan=u7});var DA=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.takeUntil=void 0;var s7=G(),c7=Y(),l7=ie(),f7=ot();function d7(e){return s7.operate(function(t,r){l7.innerFrom(e).subscribe(c7.createOperatorSubscriber(r,function(){return r.complete()},f7.noop)),!r.closed&&t.subscribe(r)})}Rd.takeUntil=d7});var zA=b(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.takeWhile=void 0;var p7=G(),h7=Y();function m7(e,t){return t===void 0&&(t=!1),p7.operate(function(r,n){var i=0;r.subscribe(h7.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Md.takeWhile=m7});var BA=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.tap=void 0;var v7=ye(),b7=G(),g7=Y(),_7=at();function y7(e,t,r){var n=v7.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?b7.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(g7.createOperatorSubscriber(o,function(c){var s;(s=n.next)===null||s===void 0||s.call(n,c),o.next(c)},function(){var c;u=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},function(c){var s;u=!1,(s=n.error)===null||s===void 0||s.call(n,c),o.error(c)},function(){var c,s;u&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(s=n.finalize)===null||s===void 0||s.call(n)}))}):_7.identity}kd.tap=y7});var Wv=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.throttle=void 0;var w7=G(),UA=Y(),x7=ie();function S7(e,t){return w7.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,u=i.trailing,c=u===void 0?!1:u,s=!1,l=null,d=null,f=!1,p=function(){d?.unsubscribe(),d=null,c&&(g(),f&&n.complete())},h=function(){d=null,f&&n.complete()},m=function(_){return d=x7.innerFrom(e(_)).subscribe(UA.createOperatorSubscriber(n,p,h))},g=function(){if(s){s=!1;var _=l;l=null,n.next(_),!f&&m(_)}};r.subscribe(UA.createOperatorSubscriber(n,function(_){s=!0,l=_,!(d&&!d.closed)&&(a?g():m(_))},function(){f=!0,!(c&&s&&d&&!d.closed)&&n.complete()}))})}Cd.throttle=S7});var WA=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.throttleTime=void 0;var O7=qt(),E7=Wv(),A7=Nn();function T7(e,t,r){t===void 0&&(t=O7.asyncScheduler);var n=A7.timer(e,t);return E7.throttle(function(){return n},r)}qd.throttleTime=T7});var VA=b(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.TimeInterval=na.timeInterval=void 0;var P7=qt(),R7=G(),M7=Y();function k7(e){return e===void 0&&(e=P7.asyncScheduler),R7.operate(function(t,r){var n=e.now();t.subscribe(M7.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new HA(i,a))}))})}na.timeInterval=k7;var HA=function(){function e(t,r){this.value=t,this.interval=r}return e}();na.TimeInterval=HA});var GA=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.timeoutWith=void 0;var C7=qt(),q7=Rl(),I7=Ml();function j7(e,t,r){var n,i,o;if(r=r??C7.async,q7.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 I7.timeout({first:n,each:i,scheduler:r,with:o})}Id.timeoutWith=j7});var $A=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.timestamp=void 0;var F7=Gc(),L7=In();function N7(e){return e===void 0&&(e=F7.dateTimestampProvider),L7.map(function(t){return{value:t,timestamp:e.now()}})}jd.timestamp=N7});var ZA=b(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.window=void 0;var KA=ut(),D7=G(),YA=Y(),z7=ot(),B7=ie();function U7(e){return D7.operate(function(t,r){var n=new KA.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(YA.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),B7.innerFrom(e).subscribe(YA.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new KA.Subject)},z7.noop,i)),function(){n?.unsubscribe(),n=null}})}Fd.window=U7});var XA=b(ia=>{"use strict";var W7=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.windowCount=void 0;var JA=ut(),H7=G(),V7=Y();function G7(e,t){t===void 0&&(t=0);var r=t>0?t:e;return H7.operate(function(n,i){var o=[new JA.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(V7.createOperatorSubscriber(i,function(c){var s,l;try{for(var d=W7(o),f=d.next();!f.done;f=d.next()){var p=f.value;p.next(c)}}catch(g){s={error:g}}finally{try{f&&!f.done&&(l=d.return)&&l.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 JA.Subject;o.push(m),i.next(m.asObservable())}},function(){for(;o.length>0;)o.shift().complete();i.complete()},function(c){for(;o.length>0;)o.shift().error(c);i.error(c)},function(){a=null,o=null}))})}ia.windowCount=G7});var eT=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.windowTime=void 0;var $7=ut(),K7=qt(),Y7=Dt(),Z7=G(),J7=Y(),X7=rn(),Q7=It(),QA=nn();function eH(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=Q7.popScheduler(n))!==null&&t!==void 0?t:K7.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return Z7.operate(function(c,s){var l=[],d=!1,f=function(g){var _=g.window,w=g.subs;_.complete(),w.unsubscribe(),X7.arrRemove(l,g),d&&p()},p=function(){if(l){var g=new Y7.Subscription;s.add(g);var _=new $7.Subject,w={window:_,subs:g,seen:0};l.push(w),s.next(_.asObservable()),QA.executeSchedule(g,o,function(){return f(w)},e)}};a!==null&&a>=0?QA.executeSchedule(s,o,p,a,!0):d=!0,p();var h=function(g){return l.slice().forEach(g)},m=function(g){h(function(_){var w=_.window;return g(w)}),g(s),s.unsubscribe()};return c.subscribe(J7.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(){l=null}})}Ld.windowTime=eH});var nT=b(oa=>{"use strict";var tH=oa&&oa.__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(oa,"__esModule",{value:!0});oa.windowToggle=void 0;var rH=ut(),nH=Dt(),iH=G(),tT=ie(),Hv=Y(),rT=ot(),oH=rn();function aH(e,t){return iH.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};tT.innerFrom(e).subscribe(Hv.createOperatorSubscriber(n,function(a){var u=new rH.Subject;i.push(u);var c=new nH.Subscription,s=function(){oH.arrRemove(i,u),u.complete(),c.unsubscribe()},l;try{l=tT.innerFrom(t(a))}catch(d){o(d);return}n.next(u.asObservable()),c.add(l.subscribe(Hv.createOperatorSubscriber(n,s,rT.noop,o)))},rT.noop)),r.subscribe(Hv.createOperatorSubscriber(n,function(a){var u,c,s=i.slice();try{for(var l=tH(s),d=l.next();!d.done;d=l.next()){var f=d.value;f.next(a)}}catch(p){u={error:p}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}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()}))})}oa.windowToggle=aH});var oT=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.windowWhen=void 0;var uH=ut(),sH=G(),iT=Y(),cH=ie();function lH(e){return sH.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new uH.Subject,r.next(n.asObservable());var u;try{u=cH.innerFrom(e())}catch(c){o(c);return}u.subscribe(i=iT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(iT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}Nd.windowWhen=lH});var cT=b(Yn=>{"use strict";var aT=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},uT=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.withLatestFrom=void 0;var fH=G(),sT=Y(),dH=ie(),pH=at(),hH=ot(),mH=It();function vH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=mH.popResultSelector(e);return fH.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),c=!1,s=function(d){dH.innerFrom(e[d]).subscribe(sT.createOperatorSubscriber(i,function(f){a[d]=f,!c&&!u[d]&&(u[d]=!0,(c=u.every(pH.identity))&&(u=null))},hH.noop))},l=0;l<o;l++)s(l);n.subscribe(sT.createOperatorSubscriber(i,function(d){if(c){var f=uT([d],aT(a));i.next(r?r.apply(void 0,uT([],aT(f))):f)}}))})}Yn.withLatestFrom=vH});var lT=b(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.zipAll=void 0;var bH=uf(),gH=Pv();function _H(e){return gH.joinAllInternals(bH.zip,e)}Dd.zipAll=_H});var fT=b(Zn=>{"use strict";var yH=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},wH=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 xH=uf(),SH=G();function OH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return SH.operate(function(r,n){xH.zip.apply(void 0,wH([r],yH(e))).subscribe(n)})}Zn.zip=OH});var dT=b(Jn=>{"use strict";var EH=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},AH=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.zipWith=void 0;var TH=fT();function PH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return TH.zip.apply(void 0,AH([],EH(e)))}Jn.zipWith=PH});var _T=b(v=>{"use strict";var RH=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]}),MH=v&&v.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&RH(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 kH=xe();Object.defineProperty(v,"Observable",{enumerable:!0,get:function(){return kH.Observable}});var CH=Au();Object.defineProperty(v,"ConnectableObservable",{enumerable:!0,get:function(){return CH.ConnectableObservable}});var qH=Ou();Object.defineProperty(v,"observable",{enumerable:!0,get:function(){return qH.observable}});var IH=bS();Object.defineProperty(v,"animationFrames",{enumerable:!0,get:function(){return IH.animationFrames}});var jH=ut();Object.defineProperty(v,"Subject",{enumerable:!0,get:function(){return jH.Subject}});var FH=Km();Object.defineProperty(v,"BehaviorSubject",{enumerable:!0,get:function(){return FH.BehaviorSubject}});var LH=$c();Object.defineProperty(v,"ReplaySubject",{enumerable:!0,get:function(){return LH.ReplaySubject}});var NH=Kc();Object.defineProperty(v,"AsyncSubject",{enumerable:!0,get:function(){return NH.AsyncSubject}});var pT=IS();Object.defineProperty(v,"asap",{enumerable:!0,get:function(){return pT.asap}});Object.defineProperty(v,"asapScheduler",{enumerable:!0,get:function(){return pT.asapScheduler}});var hT=qt();Object.defineProperty(v,"async",{enumerable:!0,get:function(){return hT.async}});Object.defineProperty(v,"asyncScheduler",{enumerable:!0,get:function(){return hT.asyncScheduler}});var mT=LS();Object.defineProperty(v,"queue",{enumerable:!0,get:function(){return mT.queue}});Object.defineProperty(v,"queueScheduler",{enumerable:!0,get:function(){return mT.queueScheduler}});var vT=BS();Object.defineProperty(v,"animationFrame",{enumerable:!0,get:function(){return vT.animationFrame}});Object.defineProperty(v,"animationFrameScheduler",{enumerable:!0,get:function(){return vT.animationFrameScheduler}});var bT=HS();Object.defineProperty(v,"VirtualTimeScheduler",{enumerable:!0,get:function(){return bT.VirtualTimeScheduler}});Object.defineProperty(v,"VirtualAction",{enumerable:!0,get:function(){return bT.VirtualAction}});var DH=Zm();Object.defineProperty(v,"Scheduler",{enumerable:!0,get:function(){return DH.Scheduler}});var zH=Dt();Object.defineProperty(v,"Subscription",{enumerable:!0,get:function(){return zH.Subscription}});var BH=Eo();Object.defineProperty(v,"Subscriber",{enumerable:!0,get:function(){return BH.Subscriber}});var gT=yl();Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return gT.Notification}});Object.defineProperty(v,"NotificationKind",{enumerable:!0,get:function(){return gT.NotificationKind}});var UH=Eu();Object.defineProperty(v,"pipe",{enumerable:!0,get:function(){return UH.pipe}});var WH=ot();Object.defineProperty(v,"noop",{enumerable:!0,get:function(){return WH.noop}});var HH=at();Object.defineProperty(v,"identity",{enumerable:!0,get:function(){return HH.identity}});var VH=uO();Object.defineProperty(v,"isObservable",{enumerable:!0,get:function(){return VH.isObservable}});var GH=sO();Object.defineProperty(v,"lastValueFrom",{enumerable:!0,get:function(){return GH.lastValueFrom}});var $H=cO();Object.defineProperty(v,"firstValueFrom",{enumerable:!0,get:function(){return $H.firstValueFrom}});var KH=fv();Object.defineProperty(v,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return KH.ArgumentOutOfRangeError}});var YH=qn();Object.defineProperty(v,"EmptyError",{enumerable:!0,get:function(){return YH.EmptyError}});var ZH=dv();Object.defineProperty(v,"NotFoundError",{enumerable:!0,get:function(){return ZH.NotFoundError}});var JH=Hm();Object.defineProperty(v,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return JH.ObjectUnsubscribedError}});var XH=pv();Object.defineProperty(v,"SequenceError",{enumerable:!0,get:function(){return XH.SequenceError}});var QH=Ml();Object.defineProperty(v,"TimeoutError",{enumerable:!0,get:function(){return QH.TimeoutError}});var eV=km();Object.defineProperty(v,"UnsubscriptionError",{enumerable:!0,get:function(){return eV.UnsubscriptionError}});var tV=fO();Object.defineProperty(v,"bindCallback",{enumerable:!0,get:function(){return tV.bindCallback}});var rV=dO();Object.defineProperty(v,"bindNodeCallback",{enumerable:!0,get:function(){return rV.bindNodeCallback}});var nV=Fl();Object.defineProperty(v,"combineLatest",{enumerable:!0,get:function(){return nV.combineLatest}});var iV=qu();Object.defineProperty(v,"concat",{enumerable:!0,get:function(){return iV.concat}});var oV=yO();Object.defineProperty(v,"connectable",{enumerable:!0,get:function(){return oV.connectable}});var aV=Iu();Object.defineProperty(v,"defer",{enumerable:!0,get:function(){return aV.defer}});var uV=_r();Object.defineProperty(v,"empty",{enumerable:!0,get:function(){return uV.empty}});var sV=wO();Object.defineProperty(v,"forkJoin",{enumerable:!0,get:function(){return sV.forkJoin}});var cV=on();Object.defineProperty(v,"from",{enumerable:!0,get:function(){return cV.from}});var lV=SO();Object.defineProperty(v,"fromEvent",{enumerable:!0,get:function(){return lV.fromEvent}});var fV=EO();Object.defineProperty(v,"fromEventPattern",{enumerable:!0,get:function(){return fV.fromEventPattern}});var dV=TO();Object.defineProperty(v,"generate",{enumerable:!0,get:function(){return dV.generate}});var pV=PO();Object.defineProperty(v,"iif",{enumerable:!0,get:function(){return pV.iif}});var hV=_v();Object.defineProperty(v,"interval",{enumerable:!0,get:function(){return hV.interval}});var mV=MO();Object.defineProperty(v,"merge",{enumerable:!0,get:function(){return mV.merge}});var vV=yv();Object.defineProperty(v,"never",{enumerable:!0,get:function(){return vV.never}});var bV=gl();Object.defineProperty(v,"of",{enumerable:!0,get:function(){return bV.of}});var gV=wv();Object.defineProperty(v,"onErrorResumeNext",{enumerable:!0,get:function(){return gV.onErrorResumeNext}});var _V=CO();Object.defineProperty(v,"pairs",{enumerable:!0,get:function(){return _V.pairs}});var yV=FO();Object.defineProperty(v,"partition",{enumerable:!0,get:function(){return yV.partition}});var wV=xv();Object.defineProperty(v,"race",{enumerable:!0,get:function(){return wV.race}});var xV=DO();Object.defineProperty(v,"range",{enumerable:!0,get:function(){return xV.range}});var SV=lv();Object.defineProperty(v,"throwError",{enumerable:!0,get:function(){return SV.throwError}});var OV=Nn();Object.defineProperty(v,"timer",{enumerable:!0,get:function(){return OV.timer}});var EV=zO();Object.defineProperty(v,"using",{enumerable:!0,get:function(){return EV.using}});var AV=uf();Object.defineProperty(v,"zip",{enumerable:!0,get:function(){return AV.zip}});var TV=cv();Object.defineProperty(v,"scheduled",{enumerable:!0,get:function(){return TV.scheduled}});var PV=_r();Object.defineProperty(v,"EMPTY",{enumerable:!0,get:function(){return PV.EMPTY}});var RV=yv();Object.defineProperty(v,"NEVER",{enumerable:!0,get:function(){return RV.NEVER}});MH(UO(),v);var MV=So();Object.defineProperty(v,"config",{enumerable:!0,get:function(){return MV.config}});var kV=Sv();Object.defineProperty(v,"audit",{enumerable:!0,get:function(){return kV.audit}});var CV=HO();Object.defineProperty(v,"auditTime",{enumerable:!0,get:function(){return CV.auditTime}});var qV=GO();Object.defineProperty(v,"buffer",{enumerable:!0,get:function(){return qV.buffer}});var IV=$O();Object.defineProperty(v,"bufferCount",{enumerable:!0,get:function(){return IV.bufferCount}});var jV=YO();Object.defineProperty(v,"bufferTime",{enumerable:!0,get:function(){return jV.bufferTime}});var FV=XO();Object.defineProperty(v,"bufferToggle",{enumerable:!0,get:function(){return FV.bufferToggle}});var LV=eE();Object.defineProperty(v,"bufferWhen",{enumerable:!0,get:function(){return LV.bufferWhen}});var NV=rE();Object.defineProperty(v,"catchError",{enumerable:!0,get:function(){return NV.catchError}});var DV=nE();Object.defineProperty(v,"combineAll",{enumerable:!0,get:function(){return DV.combineAll}});var zV=Rv();Object.defineProperty(v,"combineLatestAll",{enumerable:!0,get:function(){return zV.combineLatestAll}});var BV=sE();Object.defineProperty(v,"combineLatestWith",{enumerable:!0,get:function(){return BV.combineLatestWith}});var UV=Ul();Object.defineProperty(v,"concatAll",{enumerable:!0,get:function(){return UV.concatAll}});var WV=Mv();Object.defineProperty(v,"concatMap",{enumerable:!0,get:function(){return WV.concatMap}});var HV=fE();Object.defineProperty(v,"concatMapTo",{enumerable:!0,get:function(){return HV.concatMapTo}});var VV=pE();Object.defineProperty(v,"concatWith",{enumerable:!0,get:function(){return VV.concatWith}});var GV=Sf();Object.defineProperty(v,"connect",{enumerable:!0,get:function(){return GV.connect}});var $V=mE();Object.defineProperty(v,"count",{enumerable:!0,get:function(){return $V.count}});var KV=bE();Object.defineProperty(v,"debounce",{enumerable:!0,get:function(){return KV.debounce}});var YV=gE();Object.defineProperty(v,"debounceTime",{enumerable:!0,get:function(){return YV.debounceTime}});var ZV=ju();Object.defineProperty(v,"defaultIfEmpty",{enumerable:!0,get:function(){return ZV.defaultIfEmpty}});var JV=wE();Object.defineProperty(v,"delay",{enumerable:!0,get:function(){return JV.delay}});var XV=qv();Object.defineProperty(v,"delayWhen",{enumerable:!0,get:function(){return XV.delayWhen}});var QV=xE();Object.defineProperty(v,"dematerialize",{enumerable:!0,get:function(){return QV.dematerialize}});var eG=OE();Object.defineProperty(v,"distinct",{enumerable:!0,get:function(){return eG.distinct}});var tG=Iv();Object.defineProperty(v,"distinctUntilChanged",{enumerable:!0,get:function(){return tG.distinctUntilChanged}});var rG=EE();Object.defineProperty(v,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return rG.distinctUntilKeyChanged}});var nG=TE();Object.defineProperty(v,"elementAt",{enumerable:!0,get:function(){return nG.elementAt}});var iG=PE();Object.defineProperty(v,"endWith",{enumerable:!0,get:function(){return iG.endWith}});var oG=RE();Object.defineProperty(v,"every",{enumerable:!0,get:function(){return oG.every}});var aG=qE();Object.defineProperty(v,"exhaust",{enumerable:!0,get:function(){return aG.exhaust}});var uG=Fv();Object.defineProperty(v,"exhaustAll",{enumerable:!0,get:function(){return uG.exhaustAll}});var sG=jv();Object.defineProperty(v,"exhaustMap",{enumerable:!0,get:function(){return sG.exhaustMap}});var cG=IE();Object.defineProperty(v,"expand",{enumerable:!0,get:function(){return cG.expand}});var lG=Li();Object.defineProperty(v,"filter",{enumerable:!0,get:function(){return lG.filter}});var fG=jE();Object.defineProperty(v,"finalize",{enumerable:!0,get:function(){return fG.finalize}});var dG=Lv();Object.defineProperty(v,"find",{enumerable:!0,get:function(){return dG.find}});var pG=LE();Object.defineProperty(v,"findIndex",{enumerable:!0,get:function(){return pG.findIndex}});var hG=NE();Object.defineProperty(v,"first",{enumerable:!0,get:function(){return hG.first}});var mG=zE();Object.defineProperty(v,"groupBy",{enumerable:!0,get:function(){return mG.groupBy}});var vG=kv();Object.defineProperty(v,"ignoreElements",{enumerable:!0,get:function(){return vG.ignoreElements}});var bG=BE();Object.defineProperty(v,"isEmpty",{enumerable:!0,get:function(){return bG.isEmpty}});var gG=UE();Object.defineProperty(v,"last",{enumerable:!0,get:function(){return gG.last}});var _G=In();Object.defineProperty(v,"map",{enumerable:!0,get:function(){return _G.map}});var yG=Cv();Object.defineProperty(v,"mapTo",{enumerable:!0,get:function(){return yG.mapTo}});var wG=WE();Object.defineProperty(v,"materialize",{enumerable:!0,get:function(){return wG.materialize}});var xG=HE();Object.defineProperty(v,"max",{enumerable:!0,get:function(){return xG.max}});var SG=Cu();Object.defineProperty(v,"mergeAll",{enumerable:!0,get:function(){return SG.mergeAll}});var OG=VE();Object.defineProperty(v,"flatMap",{enumerable:!0,get:function(){return OG.flatMap}});var EG=un();Object.defineProperty(v,"mergeMap",{enumerable:!0,get:function(){return EG.mergeMap}});var AG=$E();Object.defineProperty(v,"mergeMapTo",{enumerable:!0,get:function(){return AG.mergeMapTo}});var TG=KE();Object.defineProperty(v,"mergeScan",{enumerable:!0,get:function(){return TG.mergeScan}});var PG=JE();Object.defineProperty(v,"mergeWith",{enumerable:!0,get:function(){return PG.mergeWith}});var RG=XE();Object.defineProperty(v,"min",{enumerable:!0,get:function(){return RG.min}});var MG=nd();Object.defineProperty(v,"multicast",{enumerable:!0,get:function(){return MG.multicast}});var kG=Mu();Object.defineProperty(v,"observeOn",{enumerable:!0,get:function(){return kG.observeOn}});var CG=tA();Object.defineProperty(v,"onErrorResumeNextWith",{enumerable:!0,get:function(){return CG.onErrorResumeNextWith}});var qG=rA();Object.defineProperty(v,"pairwise",{enumerable:!0,get:function(){return qG.pairwise}});var IG=nA();Object.defineProperty(v,"pluck",{enumerable:!0,get:function(){return IG.pluck}});var jG=iA();Object.defineProperty(v,"publish",{enumerable:!0,get:function(){return jG.publish}});var FG=oA();Object.defineProperty(v,"publishBehavior",{enumerable:!0,get:function(){return FG.publishBehavior}});var LG=aA();Object.defineProperty(v,"publishLast",{enumerable:!0,get:function(){return LG.publishLast}});var NG=sA();Object.defineProperty(v,"publishReplay",{enumerable:!0,get:function(){return NG.publishReplay}});var DG=cA();Object.defineProperty(v,"raceWith",{enumerable:!0,get:function(){return DG.raceWith}});var zG=ea();Object.defineProperty(v,"reduce",{enumerable:!0,get:function(){return zG.reduce}});var BG=fA();Object.defineProperty(v,"repeat",{enumerable:!0,get:function(){return BG.repeat}});var UG=pA();Object.defineProperty(v,"repeatWhen",{enumerable:!0,get:function(){return UG.repeatWhen}});var WG=mA();Object.defineProperty(v,"retry",{enumerable:!0,get:function(){return WG.retry}});var HG=bA();Object.defineProperty(v,"retryWhen",{enumerable:!0,get:function(){return HG.retryWhen}});var VG=Um();Object.defineProperty(v,"refCount",{enumerable:!0,get:function(){return VG.refCount}});var GG=zv();Object.defineProperty(v,"sample",{enumerable:!0,get:function(){return GG.sample}});var $G=_A();Object.defineProperty(v,"sampleTime",{enumerable:!0,get:function(){return $G.sampleTime}});var KG=yA();Object.defineProperty(v,"scan",{enumerable:!0,get:function(){return KG.scan}});var YG=xA();Object.defineProperty(v,"sequenceEqual",{enumerable:!0,get:function(){return YG.sequenceEqual}});var ZG=Uv();Object.defineProperty(v,"share",{enumerable:!0,get:function(){return ZG.share}});var JG=EA();Object.defineProperty(v,"shareReplay",{enumerable:!0,get:function(){return JG.shareReplay}});var XG=AA();Object.defineProperty(v,"single",{enumerable:!0,get:function(){return XG.single}});var QG=TA();Object.defineProperty(v,"skip",{enumerable:!0,get:function(){return QG.skip}});var e9=PA();Object.defineProperty(v,"skipLast",{enumerable:!0,get:function(){return e9.skipLast}});var t9=MA();Object.defineProperty(v,"skipUntil",{enumerable:!0,get:function(){return t9.skipUntil}});var r9=kA();Object.defineProperty(v,"skipWhile",{enumerable:!0,get:function(){return r9.skipWhile}});var n9=qA();Object.defineProperty(v,"startWith",{enumerable:!0,get:function(){return n9.startWith}});var i9=ku();Object.defineProperty(v,"subscribeOn",{enumerable:!0,get:function(){return i9.subscribeOn}});var o9=jA();Object.defineProperty(v,"switchAll",{enumerable:!0,get:function(){return o9.switchAll}});var a9=Nu();Object.defineProperty(v,"switchMap",{enumerable:!0,get:function(){return a9.switchMap}});var u9=LA();Object.defineProperty(v,"switchMapTo",{enumerable:!0,get:function(){return u9.switchMapTo}});var s9=NA();Object.defineProperty(v,"switchScan",{enumerable:!0,get:function(){return s9.switchScan}});var c9=Fu();Object.defineProperty(v,"take",{enumerable:!0,get:function(){return c9.take}});var l9=Nv();Object.defineProperty(v,"takeLast",{enumerable:!0,get:function(){return l9.takeLast}});var f9=DA();Object.defineProperty(v,"takeUntil",{enumerable:!0,get:function(){return f9.takeUntil}});var d9=zA();Object.defineProperty(v,"takeWhile",{enumerable:!0,get:function(){return d9.takeWhile}});var p9=BA();Object.defineProperty(v,"tap",{enumerable:!0,get:function(){return p9.tap}});var h9=Wv();Object.defineProperty(v,"throttle",{enumerable:!0,get:function(){return h9.throttle}});var m9=WA();Object.defineProperty(v,"throttleTime",{enumerable:!0,get:function(){return m9.throttleTime}});var v9=Lu();Object.defineProperty(v,"throwIfEmpty",{enumerable:!0,get:function(){return v9.throwIfEmpty}});var b9=VA();Object.defineProperty(v,"timeInterval",{enumerable:!0,get:function(){return b9.timeInterval}});var g9=Ml();Object.defineProperty(v,"timeout",{enumerable:!0,get:function(){return g9.timeout}});var _9=GA();Object.defineProperty(v,"timeoutWith",{enumerable:!0,get:function(){return _9.timeoutWith}});var y9=$A();Object.defineProperty(v,"timestamp",{enumerable:!0,get:function(){return y9.timestamp}});var w9=Tv();Object.defineProperty(v,"toArray",{enumerable:!0,get:function(){return w9.toArray}});var x9=ZA();Object.defineProperty(v,"window",{enumerable:!0,get:function(){return x9.window}});var S9=XA();Object.defineProperty(v,"windowCount",{enumerable:!0,get:function(){return S9.windowCount}});var O9=eT();Object.defineProperty(v,"windowTime",{enumerable:!0,get:function(){return O9.windowTime}});var E9=nT();Object.defineProperty(v,"windowToggle",{enumerable:!0,get:function(){return E9.windowToggle}});var A9=oT();Object.defineProperty(v,"windowWhen",{enumerable:!0,get:function(){return A9.windowWhen}});var T9=cT();Object.defineProperty(v,"withLatestFrom",{enumerable:!0,get:function(){return T9.withLatestFrom}});var P9=lT();Object.defineProperty(v,"zipAll",{enumerable:!0,get:function(){return P9.zipAll}});var R9=dT();Object.defineProperty(v,"zipWith",{enumerable:!0,get:function(){return R9.zipWith}})});var Gv=b(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.checkAbortSignal=wT;Ni.abortBreakPoint=k9;Ni.makeAbortError=xT;Ni.observeAbortSignal=C9;Ni.isAbortException=q9;var yT=_T(),Vv=class extends Error{};function wT(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw xT()}}function M9(e){return new Promise(t=>setTimeout(t,e))}async function k9(e){await M9(1),wT(e)}function xT(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Vv("aborted");return e.code="ERR_ABORTED",e}function C9(e){return e?(0,yT.fromEvent)(e,"abort"):new yT.Observable}function q9(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var ST=b(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});Kv.makeAbortableReaction=F9;var I9=xc(),Du=vt(),j9=Gv(),$v=Qh();function F9(e,t,r,n,i,o,a){let u;function c(s){(0,j9.isAbortException)(s)||(console.error(s),(0,Du.isAlive)(e)&&a(s))}(0,Du.addDisposer)(e,(0,I9.reaction)(()=>{try{return t(e)}catch(s){c(s);return}},async(s,l)=>{if(u&&(0,$v.stopStopToken)(u),!!(0,Du.isAlive)(e)){u=(0,$v.createStopToken)(),i(u);try{let d=await r(s,u,e,l);(0,Du.isAlive)(e)&&o(d)}catch(d){c(d)}}},n)),(0,Du.addDisposer)(e,()=>{u&&(0,$v.stopStopToken)(u)})}});var yo=b(N=>{"use strict";var L9=N&&N.__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]}),zi=N&&N.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&L9(t,e,r)},OT=N&&N.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(N,"__esModule",{value:!0});N.makeAbortableReaction=N.blobToDataURL=N.isFeature=N.SimpleFeature=N.defaultCodonTable=N.defaultStops=N.defaultStarts=N.rIC=N.complementTable=N.isElectron=void 0;N.useDebounce=W9;N.useWidthSetter=H9;N.useDebouncedCallback=V9;N.findParentThat=ET;N.springAnimate=G9;N.findParentThatIs=Bu;N.getSession=$9;N.getContainingView=AT;N.getContainingTrack=K9;N.getContainingDisplay=Y9;N.assembleLocString=Z9;N.assembleLocStringFast=TT;N.parseLocStringOneBased=PT;N.parseLocString=Yv;N.compareLocs=RT;N.compareLocStrings=J9;N.clamp=X9;N.bpToPx=Zv;N.radToDeg=r$;N.degToRad=n$;N.polarToCartesian=i$;N.cartesianToPolar=o$;N.featureSpanPx=a$;N.bpSpanPx=MT;N.iterMap=u$;N.findLastIndex=s$;N.findLast=c$;N.renameRegionIfNeeded=kT;N.renameRegionsIfNeeded=l$;N.minmax=f$;N.shorten=CT;N.stringify=d$;N.revcom=p$;N.reverse=h$;N.complement=m$;N.measureText=qT;N.getFrame=b$;N.generateCodonTable=g$;N.updateStatus=Jv;N.updateStatus2=_$;N.hashCode=IT;N.objectHash=y$;N.bytesForRegions=w$;N.isSupportedIndexingAdapter=x$;N.getBpDisplayStr=S$;N.toLocale=aa;N.getTickDisplayStr=O$;N.getViewParams=E$;N.getLayoutId=A$;N.useLocalStorage=T$;N.getUriLink=jT;N.getStr=FT;N.coarseStripHTML=LT;N.linkify=P$;N.measureGridWidth=R$;N.getEnv=M$;N.localStorageGetItem=Qv;N.localStorageSetItem=k$;N.max=NT;N.min=C$;N.sum=DT;N.avg=q$;N.groupBy=I$;N.notEmpty=j$;N.mergeIntervals=zT;N.gatherOverlaps=F$;N.stripAlpha=L$;N.getStrokeProps=N$;N.getFillProps=D$;N.renderToStaticMarkup=z$;N.isGzip=BT;N.fetchAndMaybeUnzip=UT;N.fetchAndMaybeUnzipText=B$;N.isObject=WT;N.localStorageGetNumber=U$;N.localStorageGetBoolean=W$;N.testAdapter=H$;var Di=Ye(),N9=Gp(),D9=OT(c1()),yr=vt(),z9=Zs(),B9=f1(),Xv=M1(),U9=Qh(),zu=wc();zi(wc(),N);zi(Mx(),N);zi(kx(),N);zi(Cx(),N);zi(Am(),N);zi(Hx(),N);function W9(e,t){let[r,n]=(0,Di.useState)(e);return(0,Di.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function H9(e,t){let[r,{width:n}]=(0,D9.default)();return(0,Di.useEffect)(()=>{n&&(0,yr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function V9(e,t=400){let r=(0,Di.useRef)(null),n=(0,Di.useRef)(null);return(0,Di.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 ET(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 G9(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function l(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 S=0;S<g;++S){let A=-o*(p-t),T=-a*m,M=(A+T)/1;m+=M*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(()=>{l({lastPosition:p,lastTime:f,lastVelocity:m})}))}return[()=>{l({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Bu(e,t){return ET(e,t)}function $9(e){try{return Bu(e,zu.isSessionModel)}catch{throw new Error("no session model found!")}}function AT(e){try{return Bu(e,zu.isViewModel)}catch{throw new Error("no containing view found")}}function K9(e){try{return Bu(e,zu.isTrackModel)}catch{throw new Error("no containing track found")}}function Y9(e){try{return Bu(e,zu.isDisplayModel)}catch{throw new Error("no containing display found")}}function Z9(e){return TT(e,aa)}function TT(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,u=r?`{${r}}`:"",c;i!==void 0?c=`:${t(i+1)}`:o!==void 0?c=":1":c="";let s;o!==void 0?s=i!==void 0&&i+1===o?"":`..${t(o)}`:s=i!==void 0?"..":"";let l="";return a&&(l="[rev]"),`${u}${n}${c}${s}${l}`}function PT(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 c=u.lastIndexOf(":");if(c===-1){if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`Unknown reference sequence "${u}"`)}let s=u.slice(0,c),l=u.slice(c+1);if(t(s,a)&&t(u,a))throw new Error(`ambiguous location string: "${e}"`);if(t(s,a))if(l){let d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(l),f=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(l);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 "${l}" 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 Yv(e,t){let r=PT(e,t);return typeof r.start=="number"&&(r.start-=1),r}function RT(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 J9(e,t,r){let n=Yv(e,r),i=Yv(t,r);return RT(n,i)}function X9(e,t,r){return e<t?t:e>r?r:e}function Q9(e){return Math.round(e*10)/10}function Zv(e,{reversed:t,end:r=0,start:n=0},i){return Q9((t?r-e:e-n)/i)}var e$=180/Math.PI,t$=Math.PI/180;function r$(e){return e*e$%360}function n$(e){return e*t$%(2*Math.PI)}function i$(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function o$(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function a$(e,t,r){return MT(e.get("start"),e.get("end"),t,r)}function MT(e,t,r,n){let i=Zv(e,r,n),o=Zv(t,r,n);return r.reversed?[o,i]:[i,o]}function u$(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 s$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function c$(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function kT(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 l$(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)=>kT(o[i[u]],a))}}function f$(e,t){return[Math.min(e,t),Math.max(e,t)]}function CT(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function d$({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${CT(e)}:${aa(t)}${n?" (out of bounds)":""}`:""].join("")}N.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");N.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 p$(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=N.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function h$(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function m$(e){var t;let r="";for(let n=0;n<e.length;n++)r+=(t=N.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}N.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var v$=[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 qT(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=v$[u])!==null&&r!==void 0?r:n}return o*t}function b$(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}N.defaultStarts=["ATG"];N.defaultStops=["TAA","TAG","TGA"];N.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 g$(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 c=i[1][u];for(let s=0;s<2;s++){let l=i[2][s],d=a+c+l;t[d]=n}}}}),t}async function Jv(e,t,r){t(e);let n=await r();return t(""),n}async function _$(e,t,r,n){t(e);let i=await n();return(0,U9.checkStopToken)(r),t(""),i}function IT(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 y$(e){return`${IT(JSON.stringify(e))}`}async function w$(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 x$(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function S$(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`:`${aa(Math.floor(e))}bp`}function aa(e){return e.toLocaleString("en-US")}function O$(e,t){return Math.floor(t/1e3)>0?`${aa(Number.parseFloat((e/1e6).toFixed(2)))}M`:aa(Math.floor(e))}function E$(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=AT(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 A$({sessionId:e,layoutId:t}){return`${e}-${t}`}function T$(e,t){let[r,n]=(0,Di.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 jT(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function FT(e){return WT(e)?(0,zu.isUriLocation)(e)?jT(e):JSON.stringify(e):String(e)}function LT(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function P$(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 R$(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return NT(e.map(u=>FT(u)).map(u=>a?LT(u):u).map(u=>qT(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function M$(e){return(0,yr.getEnv)(e)}function Qv(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function k$(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function NT(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function C$(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function DT(e){let t=0;for(let r of e)t+=r;return t}function q$(e){return DT(e)/e.length}function I$(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function j$(e){return e!=null}function zT(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 F$(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=>zT(n.sort((i,o)=>i.start-o.start),t))}function L$(e){return(0,Xv.colord)(e).alpha(1).toHex()}function N$(e){let t=(0,Xv.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}function D$(e){let t=(0,Xv.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}function z$(e){let t=document.createElement("div");return(0,z9.flushSync)(()=>{(0,B9.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function BT(e){return e[0]===31&&e[1]===139&&e[2]===8}async function UT(e,t){let{statusCallback:r=()=>{}}=t||{},n=await Jv("Downloading file",r,()=>e.readFile(t));return BT(n)?await Jv("Unzipping",r,()=>(0,N9.unzip)(n)):n}async function B$(e,t){let r=await UT(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function WT(e){return typeof e=="object"&&e!==null}function U$(e,t){var r;return+((r=Qv(e))!==null&&r!==void 0?r:t)}function W$(e,t){return!!JSON.parse(Qv(e)||JSON.stringify(t))}function H$(e,t,r,n){return t.test(e)&&!r||r===n}var HT=Gx();Object.defineProperty(N,"SimpleFeature",{enumerable:!0,get:function(){return OT(HT).default}});Object.defineProperty(N,"isFeature",{enumerable:!0,get:function(){return HT.isFeature}});var V$=Pm();Object.defineProperty(N,"blobToDataURL",{enumerable:!0,get:function(){return V$.blobToDataURL}});var G$=ST();Object.defineProperty(N,"makeAbortableReaction",{enumerable:!0,get:function(){return G$.makeAbortableReaction}});zi(Gv(),N)});var KT=b(Uu=>{"use strict";var $T=Uu&&Uu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Uu,"__esModule",{value:!0});Uu.default=Q$;var $$=Da(),VT=$T(a1()),K$=$T(s1()),Y$=yo(),Z$=["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"],GT=!1,J$=new RegExp(Z$.map(e=>`<${e}\\b[^>]*>`).join("|"),"i");function X$(e){return J$.test(e)}function Q$({html:e,className:t}){let r=(0,Y$.linkify)(`${e}`),n=X$(r)?r:(0,K$.default)(r);return GT||(GT=!0,VT.default.addHook("afterSanitizeAttributes",i=>{i.tagName==="A"&&(i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target","_blank"))})),(0,$$.jsx)("span",{className:t,dangerouslySetInnerHTML:{__html:VT.default.sanitize(n)}})}});var Xn=b((ine,YT)=>{YT.exports=JBrowseExports["mobx-react"]});var ZT,eK,eb,JT=pt(()=>{"use strict";ZT=V(Ye()),eK=e=>{let{color:t="rgb(255,255,255,0.8)"}=e;return ZT.default.createElement("rect",{...e,fill:t})},eb=eK});var Bi,XT,tK,QT,eP=pt(()=>{"use strict";Bi=V(Ye()),XT=V(Xn()),tK=(0,XT.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return Bi.default.createElement(Bi.default.Fragment,null,r?[...r.links()].map(i=>{let{source:o,target:a}=i,u=o.x,c=a.x,s=n?a.len:a.y,l=n?o.len:o.y;return Bi.default.createElement(Bi.default.Fragment,{key:[u,c,s,l].join("-")},Bi.default.createElement("line",{stroke:"black",x1:l,y1:u,x2:l,y2:c}),Bi.default.createElement("line",{stroke:"black",x1:l,y1:c,x2:s,y2:c}))}):null)}),QT=tK});var Qn,tP,rK,rP,nP=pt(()=>{"use strict";Qn=V(Ye()),tP=V(Xn());JT();eP();rK=(0,tP.observer)(function({model:e,labelWidth:t,svgFontSize:r}){let{totalHeight:n,treeWidth:i,samples:o,rowHeight:a}=e,u=a>=8,c=Math.min(20,a);return Qn.default.createElement(Qn.default.Fragment,null,Qn.default.createElement(eb,{y:0,x:0,width:t+5+i,height:n}),Qn.default.createElement(QT,{model:e}),Qn.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,l)=>Qn.default.createElement(eb,{key:`${s.id}-${l}`,y:l*a,x:0,width:t+5,height:c,color:s.color})),u?o.map((s,l)=>Qn.default.createElement("text",{key:`${s.id}-${l}`,y:l*a+a/2,dominantBaseline:"middle",x:2,fontSize:r},s.label)):null))}),rP=rK});var zd,iP,oP,nK,aP,uP=pt(()=>{"use strict";zd=V(Ye()),iP=V(ir()),oP=V(Xn()),nK=(0,oP.observer)(function({children:e,model:t,exportSVG:r}){if(r)return zd.default.createElement(zd.default.Fragment,null,e);{let{rowHeight:n,samples:i}=t;return zd.default.createElement("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:i.length*n,width:(0,iP.getContainingView)(t).width}},e)}}),aP=nK});function sP(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}var cP=pt(()=>{"use strict"});var tb,lP,fP,iK,Bd,rb=pt(()=>{"use strict";tb=V(Ye()),lP=V(ir()),fP=V(Xn());nP();uP();cP();iK=(0,fP.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=sP(n.map(c=>(0,lP.measureText)(c.label,i)).map(c=>o?c:a));return tb.default.createElement(aP,{...e},tb.default.createElement(rP,{model:t,labelWidth:u,svgFontSize:i}))}),Bd=iK});var _P=b((_ne,gP)=>{gP.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var Hu=b((rie,qP)=>{qP.exports=JBrowseExports["@jbrowse/core/ui"]});var DP={};Xd(DP,{renderSvg:()=>SK});async function SK(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,NP.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(Bd,{model:e,orientation:"left",exportSVG:!0}))))}var Wr,NP,zP=pt(()=>{"use strict";Wr=V(Ye()),NP=V(ir());rb()});var iR=b(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});pb.default=PK;var nR=yo();function PK(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,nR.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return(0,nR.hashCode)(t)}});var oR=b($u=>{"use strict";var RK=$u&&$u.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($u,"__esModule",{value:!0});$u.adapterConfigCacheKey=kK;var MK=RK(iR());function kK(e={}){return`${(0,MK.default)(e)}`}});var uR=b(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.getAdapter=aR;Ku.freeAdapterResources=qK;Ku.clearAdapterCache=IK;var CK=oR(),Ui={};async function aR(e,t,r){let n=(0,CK.adapterConfigCacheKey)(r);if(!Ui[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}),c=aR.bind(null,e,t),s=await a.getAdapterClass(),l=new s(u,c,e);Ui[n]={dataAdapter:l,sessionIds:new Set([t])}}let i=Ui[n];return i.sessionIds.add(t),i}function qK(e){let t=0,r=Object.keys(e);if(r.length===1&&r[0]==="sessionId"){let{sessionId:n}=e;Object.entries(Ui).forEach(([i,o])=>{o.sessionIds.delete(n),o.sessionIds.size===0&&(t+=1,delete Ui[i])})}else Object.values(Ui).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 IK(){Ui={}}});var sR=b(mb=>{"use strict";Object.defineProperty(mb,"__esModule",{value:!0});var hb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};mb.default=hb});var lR=b(bb=>{"use strict";Object.defineProperty(bb,"__esModule",{value:!0});bb.default=vb;var cR=e=>typeof e=="object"&&e!==null,jK=e=>cR(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function vb(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{i.forEach(o=>{t(o),cR(o)&&vb(o,t,r)})};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),jK(i)&&(Array.isArray(i)?n(i):vb(i,t,r))}});var dR=b(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.UNSUPPORTED=Le.UNKNOWN=void 0;Le.getTrackAssemblyNames=FK;Le.getConfAssemblyNames=fR;Le.getRpcSessionId=LK;Le.getParentRenderProps=NK;Le.getBlob=DK;Le.getBlobMap=zK;Le.setBlobMap=BK;Le.storeBlobLocation=WK;Le.makeIndex=HK;Le.makeIndexType=VK;Le.getFileName=GK;Le.guessAdapter=$K;Le.guessTrackType=KK;Le.generateUnsupportedTrackConf=YK;Le.generateUnknownTrackConf=ZK;Le.getTrackName=JK;var fa=vt(),Yu=yo(),la=hm();function FK(e){return fR(e.configuration)}function fR(e){let t=(0,la.readConfObject)(e,"assemblyNames");if(!t){let r=(0,fa.getParent)(e);if("sequence"in r)return[(0,la.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function LK(e){let t;for(let r=e;!(0,fa.isRoot)(r);r=(0,fa.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 NK(e){for(let t=(0,fa.getParent)(e);!(0,fa.isRoot)(t);t=(0,fa.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}Le.UNKNOWN="UNKNOWN";Le.UNSUPPORTED="UNSUPPORTED";var Gd={};function DK(e){return Gd[e]}function zK(){return Gd}function BK(e){Gd=e}var UK=0;function WK(e){if("blob"in e){let t=`b${+Date.now()}-${UK++}`;return Gd[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function HK(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function VK(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function GK(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 $K(e,t,r,n){if(n){let{pluginManager:i}=(0,Yu.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,c,s)=>{})(e,t,r);if(a)return a}return{type:Le.UNKNOWN}}function KK(e,t){if(t){let r=(0,Yu.getSession)(t),i=(0,Yu.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function YK(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,Yu.objectHash)(n),n}function ZK(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,Yu.objectHash)(n),n}function JK(e,t){let r=(0,la.readConfObject)(e,"name");if(!r&&(0,la.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,la.readConfObject)(n,"displayName")||(0,la.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var mR=b(Zu=>{"use strict";var hR=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zu,"__esModule",{value:!0});var XK=hR(sR()),QK=hR(lR()),pR=dR(),$d=wc(),gb=class extends XK.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,pR.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,$d.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,pR.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,$d.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 $d.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,QK.default)(t,i=>{(0,$d.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};Zu.default=gb});var vR=b(yb=>{"use strict";Object.defineProperty(yb,"__esModule",{value:!0});var eY=sm(),_b=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,eY.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)}};yb.default=_b});var gR=b(Ju=>{"use strict";var bR=Ju&&Ju.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ju,"__esModule",{value:!0});var tY=bR(mR()),rY=yo(),nY=bR(vR()),wb=class extends tY.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new nY.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 c=await(0,rY.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(c,r)}};Ju.default=wb});var oY={};Xd(oY,{default:()=>Yd});var MR=V(Wb());var Hb="1.1.3";var py=V(Vr());var ay=V(Gp()),uy=V(Ss()),sy=V(ir()),Ts=V(Os()),cy=V(Es());var Wt=null;try{Wt=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 Ae(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}Ae.prototype.__isLong__;Object.defineProperty(Ae.prototype,"__isLong__",{value:!0});function ct(e){return(e&&e.__isLong__)===!0}function K_(e){var t=Math.clz32(e&-e);return e?31-t:t}Ae.isLong=ct;var Y_={},Z_={};function li(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=Z_[e],n)?n:(r=me(e,0,!0),i&&(Z_[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=Y_[e],n)?n:(r=me(e,e<0?-1:0,!1),i&&(Y_[e]=r),r))}Ae.fromInt=li;function Ht(e,t){if(isNaN(e))return t?Zr:or;if(t){if(e<0)return Zr;if(e>=ey)return ny}else{if(e<=-X_)return At;if(e+1>=X_)return ry}return e<0?Ht(-e,t).neg():me(e%no|0,e/no|0,t)}Ae.fromNumber=Ht;function me(e,t,r){return new Ae(e,t,r)}Ae.fromBits=me;var As=Math.pow;function Kp(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?Zr:or;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 Kp(e.substring(1),t,r).neg();for(var i=Ht(As(r,8)),o=or,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+u),r);if(u<8){var s=Ht(As(r,u));o=o.mul(s).add(Ht(c))}else o=o.mul(i),o=o.add(Ht(c))}return o.unsigned=t,o}Ae.fromString=Kp;function ar(e,t){return typeof e=="number"?Ht(e,t):typeof e=="string"?Kp(e,t):me(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ae.fromValue=ar;var J_=65536,iC=1<<24,no=J_*J_,ey=no*no,X_=ey/2,Q_=li(iC),or=li(0);Ae.ZERO=or;var Zr=li(0,!0);Ae.UZERO=Zr;var ro=li(1);Ae.ONE=ro;var ty=li(1,!0);Ae.UONE=ty;var $p=li(-1);Ae.NEG_ONE=$p;var ry=me(-1,2147483647,!1);Ae.MAX_VALUE=ry;var ny=me(-1,-1,!0);Ae.MAX_UNSIGNED_VALUE=ny;var At=me(0,-2147483648,!1);Ae.MIN_VALUE=At;var U=Ae.prototype;U.toInt=function(){return this.unsigned?this.low>>>0:this.low};U.toNumber=function(){return this.unsigned?(this.high>>>0)*no+(this.low>>>0):this.high*no+(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=Ht(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=Ht(As(t,6),this.unsigned),a=this,u="";;){var c=a.div(o),s=a.sub(c.mul(o)).toInt()>>>0,l=s.toString(t);if(a=c,a.isZero())return l+u;for(;l.length<6;)l="0"+l;u=""+l+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);r--);return this.high!=0?r+33:r+1};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=ar(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=ar(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(ro)};U.neg=U.negate;U.add=function(t){ct(t)||(t=ar(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,c=t.low>>>16,s=t.low&65535,l=0,d=0,f=0,p=0;return p+=o+s,f+=p>>>16,p&=65535,f+=i+c,d+=f>>>16,f&=65535,d+=n+u,l+=d>>>16,d&=65535,l+=r+a,l&=65535,me(f<<16|p,l<<16|d,this.unsigned)};U.subtract=function(t){return ct(t)||(t=ar(t)),this.add(t.neg())};U.sub=U.subtract;U.multiply=function(t){if(this.isZero())return this;if(ct(t)||(t=ar(t)),Wt){var r=Wt.mul(this.low,this.high,t.low,t.high);return me(r,Wt.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Zr:or;if(this.eq(At))return t.isOdd()?At:or;if(t.eq(At))return this.isOdd()?At:or;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(Q_)&&t.lt(Q_))return Ht(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,c=t.high&65535,s=t.low>>>16,l=t.low&65535,d=0,f=0,p=0,h=0;return h+=a*l,p+=h>>>16,h&=65535,p+=o*l,f+=p>>>16,p&=65535,p+=a*s,f+=p>>>16,p&=65535,f+=i*l,d+=f>>>16,f&=65535,f+=o*s,d+=f>>>16,f&=65535,f+=a*c,d+=f>>>16,f&=65535,d+=n*l+i*s+o*c+a*u,d&=65535,me(p<<16|h,d<<16|f,this.unsigned)};U.mul=U.multiply;U.divide=function(t){if(ct(t)||(t=ar(t)),t.isZero())throw Error("division by zero");if(Wt){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Wt.div_u:Wt.div_s)(this.low,this.high,t.low,t.high);return me(r,Wt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Zr:or;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Zr;if(t.gt(this.shru(1)))return ty;o=Zr}else{if(this.eq(At)){if(t.eq(ro)||t.eq($p))return At;if(t.eq(At))return ro;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(or)?t.isNegative()?ro:$p:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(At))return this.unsigned?Zr:or;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=or}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),c=u<=48?1:As(2,u-48),s=Ht(n),l=s.mul(t);l.isNegative()||l.gt(i);)n-=c,s=Ht(n,this.unsigned),l=s.mul(t);s.isZero()&&(s=ro),o=o.add(s),i=i.sub(l)}return o};U.div=U.divide;U.modulo=function(t){if(ct(t)||(t=ar(t)),Wt){var r=(this.unsigned?Wt.rem_u:Wt.rem_s)(this.low,this.high,t.low,t.high);return me(r,Wt.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};U.mod=U.modulo;U.rem=U.modulo;U.not=function(){return me(~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?K_(this.low):K_(this.high)+32};U.ctz=U.countTrailingZeros;U.and=function(t){return ct(t)||(t=ar(t)),me(this.low&t.low,this.high&t.high,this.unsigned)};U.or=function(t){return ct(t)||(t=ar(t)),me(this.low|t.low,this.high|t.high,this.unsigned)};U.xor=function(t){return ct(t)||(t=ar(t)),me(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?me(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):me(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?me(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):me(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?me(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?me(this.high,0,this.unsigned):me(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?me(this.high,this.low,this.unsigned):t<32?(r=32-t,me(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,me(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?me(this.high,this.low,this.unsigned):t<32?(r=32-t,me(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,me(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};U.rotr=U.rotateRight;U.toSigned=function(){return this.unsigned?me(this.low,this.high,!1):this};U.toUnsigned=function(){return this.unsigned?this:me(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]};Ae.fromBytes=function(t,r,n){return n?Ae.fromBytesLE(t,r):Ae.fromBytesBE(t,r)};Ae.fromBytesLE=function(t,r){return new Ae(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Ae.fromBytesBE=function(t,r){return new Ae(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};var iy=Ae;var qa=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 fi(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 oC(e){return typeof e[0]=="string"}function bn(e){return oC(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function oy(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}var Ia=class extends uy.BaseFeatureDataAdapter{setupP;async getRefNames(){let t=await this.setup();return Object.keys(t)}setup(){return this.setupP||(this.setupP=this.readTaiFile().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async readTaiFile(){let r=(await(0,Ts.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[c,s,l]=u.split(" "),d=a+ +l,f=c==="*"?i:c.split(".").at(-1),p=iy.fromNumber(d),h=p.shiftRightUnsigned(16),m=p.and(65535),g=new qa(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){return(0,cy.ObservableCreate)(async r=>{try{let n=await this.getLines(t),i={},o=n.length,a=[],u;for(let c=0;c<o;c++){let s=n[c];if(s){let[l,d]=s.split(" ; ");if(d){for(let p of oy(d))if(p.type==="i"){a.splice(p.row,0,p),i[p.asm]||(i[p.asm]={start:p.start,strand:p.strand,srcSize:p.length,chr:p.ref,data:""});let h=i[p.asm];h.data+=" ".repeat(Math.max(0,c-h.data.length))}else if(p.type==="s"){i[p.asm]||(i[p.asm]={start:p.start,strand:p.strand,srcSize:p.length,chr:p.ref,data:""});let h=i[p.asm];h.data+=" ".repeat(Math.max(0,c-h.data.length)),a[p.row]=p}else p.type==="d"&&a.splice(p.row,1);u||(u=a[0])}let f=l.length;for(let p=0;p<f;p++){let h=l[p],m=a[p];i[m.asm].data+=h}}}if(u){let c=i[u.asm];r.next(new sy.SimpleFeature({uniqueId:`${c.start}-${c.data.length}`,refName:t.refName,start:c.start,end:c.start+c.data.length,strand:c.strand,alignments:i,seq:c.data}))}r.complete()}catch(n){r.error(n)}})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Ts.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?fi(n):void 0}}async getLines(t){let r=await this.setup(),n=(0,Ts.openLocation)(this.getConf("tafGzLocation")),i=new TextDecoder("utf8"),o=r[t.refName];if(o){let a=o[0],u;for(let c=0;c<o.length;c++)if(o[c].chrStart>=t.start){a=o[Math.max(c-1,0)];break}for(let c=0;c<o.length;c++)if(t.end<=o[c].chrStart){u=o[c+1];break}if(u=u??o.at(-1),a&&u){let c=await n.read(u.virtualOffset.blockPosition-a.virtualOffset.blockPosition,a.virtualOffset.blockPosition),s=await(0,ay.unzip)(c);return i.decode(s.slice(a.virtualOffset.dataPosition)).split(`
|
|
7
|
+
`)}}return[]}freeResources(){}};var fy=V(gn());var aC=(0,fy.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}),dy=aC;function Yp(e){return e.addAdapterType(()=>new py.AdapterType({name:"BgzipTaffyAdapter",AdapterClass:Ia,configSchema:dy}))}var qy=V(Vr());var Ay=V(Ss()),Ty=V(ir()),Py=V(Os()),Ry=V(Es()),My=V(vt());var Zp=function(e,t){return Zp=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])},Zp(e,t)};function ja(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zp(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Jp(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 io(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 oo(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 Ps(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 Rs=Ps(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
8
8
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
9
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function Xp(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var
|
|
10
|
-
`)}))):null)}),mP=oK;var vP=V(bn());function nb(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,vP.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var Hd=V(bn()),ua=V(ir()),zP=V(gP());function Ud(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wd(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 aK(e,t){return e.parent===t.parent?1:2}function uK(e){return e.reduce(sK,0)/e.length}function sK(e,t){return e+t.x}function cK(e){return 1+e.reduce(lK,0)}function lK(e,t){return Math.max(e,t.y)}function fK(e){for(var t;t=e.children;)e=t[0];return e}function dK(e){for(var t;t=e.children;)e=t[t.length-1];return e}function ib(){var e=aK,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(f){var p=f.children;p?(f.x=uK(p),f.y=cK(p)):(f.x=a?u+=e(f,a):0,f.y=0,a=f)});var c=fK(o),s=dK(o),l=c.x-e(c,s)/2,d=s.x+e(s,c)/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-l)/(d-l)*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 pK(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 _P(){return this.eachAfter(pK)}function yP(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function wP(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 xP(e,t){for(var r=this,n=[r],i=[],o,a,u,c=-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,++c,this);return this}function SP(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function OP(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 EP(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function AP(e){for(var t=this,r=hK(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 hK(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 TP(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function PP(){return Array.from(this)}function RP(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function MP(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*kP(){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 aa(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=bK)):t===void 0&&(t=vK);for(var r=new Wu(e),n,i=[r],o,a,u,c;n=i.pop();)if((a=t(n.data))&&(c=(a=Array.from(a)).length))for(n.children=a,u=c-1;u>=0;--u)i.push(o=a[u]=new Wu(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(_K)}function mK(){return aa(this).eachBefore(gK)}function vK(e){return e.children}function bK(e){return Array.isArray(e)?e[1]:null}function gK(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function _K(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Wu(e){this.data=e,this.depth=this.height=0,this.parent=null}Wu.prototype=aa.prototype={constructor:Wu,count:_P,each:yP,eachAfter:xP,eachBefore:wP,find:SP,sum:OP,sort:EP,path:AP,ancestors:TP,descendants:PP,leaves:RP,links:MP,copy:mK,[Symbol.iterator]:kP};var BP=V(wc()),Qn=V(vt());var Jt=V(Ye()),qP=V(Hu()),Xt=V(dc()),IP=V(Jn()),jP=V(Ya()),yK=(0,jP.makeStyles)()({root:{width:500}}),wK=(0,IP.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=yK(),[i,o]=(0,Jt.useState)(`${t.rowHeight}`),[a,u]=(0,Jt.useState)(`${t.rowProportion}`);return Jt.default.createElement(qP.Dialog,{open:!0,onClose:r,title:"Set row height"},Jt.default.createElement(Xt.DialogContent,{className:n.root},Jt.default.createElement(Xt.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Jt.default.createElement(Xt.TextField,{value:i,helperText:"Enter row height",onChange:c=>{o(c.target.value)}}),Jt.default.createElement(Xt.TextField,{value:a,helperText:"Enter row proportion",onChange:c=>{u(c.target.value)}}),Jt.default.createElement(Xt.DialogActions,null,Jt.default.createElement(Xt.Button,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,onClick:()=>{t.setRowProportion(+a),t.setRowHeight(+i),r()}},"Submit"),Jt.default.createElement(Xt.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel"))))}),FP=wK;function ob(e){return(e.data.length||0)+(e.children&&Wd(e.children,ob)||0)}function ab(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{ab(n,t,r)})}function ub(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return Qn.types.compose("LinearMafDisplay",n,Qn.types.model({type:Qn.types.literal("LinearMafDisplay"),configuration:(0,Hd.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80})).volatile(()=>({prefersOffset:!0,volatileSamples:[],tree: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}){i.volatileSamples=o,i.tree=a}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,Hd.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,ua.getEnv)(i))}})).views(i=>({get root(){return i.tree?aa(i.tree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>Ud(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 ib().size([this.totalHeight,a]).separation(()=>1)(o),ab(o,o.data.length=0,a/ob(o)),o}else return},get samples(){return this.rowNames?ro(this.rowNames):i.volatileSamples},get totalHeight(){return this.samples.length*i.rowHeight},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:c,samples:s,rowHeight:l,rowProportion:d,mismatchRendering:f}=i;return{...a(),config:c,samples:s,rowHeight:l,rowProportion:d,showAllLetters:u,mismatchRendering:f}},trackMenuItems(){return[...o(),{label:"Set row height",onClick:()=>{(0,ua.getSession)(i).queueDialog(u=>[FP,{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,Qn.addDisposer)(i,(0,BP.autorun)(async()=>{try{let{rpcManager:o}=(0,ua.getSession)(i),a=(0,zP.getRpcSessionId)(i),u=await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:c=>{(0,Qn.isAlive)(i)&&i.setMessage(c)}});i.setSamples(u)}catch(o){console.error(o),(0,ua.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(DP(),NP));return u(i,a,o)}}})}function sb(e){e.addDisplayType(()=>{let t=nb(e),r=ub(t,e);return new UP.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:mP,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var HP=V(Vr()),VP=V(Hu()),Vu=V(ir());function WP(e){return Object.fromEntries(Object.entries(cb(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function cb(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function SK({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:c,rowProportion:s,features:l}=t,d=r[0],f=i*s,p=(0,VP.createJBrowseTheme)(a),h=cb(p),m=WP(p),g=new Map(c.map((A,T)=>[A.id,T])),_=1/n,y=.4,w=i/2,E=f/2,S=(i-f)/2;e.font="bold 10px Courier New,monospace";for(let A of l.values()){let[T]=(0,Vu.featureSpanPx)(A,d,n),M=A.get("alignments"),C=A.get("seq").toLowerCase();for(let[R,k]of Object.entries(M)){let D=k.data,P=D.toLowerCase(),I=g.get(R);if(I===void 0)continue;let B=i*I;e.beginPath(),e.fillStyle="black";for(let q=0,L=0;q<P.length;q++)if(C[q]!=="-"){if(P[q]==="-"){let j=T+_*L;e.moveTo(j,B+w),e.lineTo(j+_+y,B+w)}L++}if(e.stroke(),!o){e.beginPath(),e.fillStyle="lightgrey";for(let q=0,L=0;q<P.length;q++)if(C[q]!=="-"){let j=P[q],z=T+_*L;C[q]===j&&j!=="-"&&e.rect(z,S+B,_+y,f),L++}e.fill()}for(let q=0,L=0;q<P.length;q++){let j=P[q];if(C[q]!=="-"){if(j!=="-"){let z=T+_*L;C[q]!==j&&j!==" "?(e.fillStyle=u?h[j]??"black":"orange",e.fillRect(z,S+B,_+y,f)):o&&(e.fillStyle=u?h[j]??"black":"lightblue",e.fillRect(z,S+B,_+y,f))}L++}}let F=10;if(_>=F){for(let q=0,L=0;q<P.length;q++)if(C[q]!=="-"){let j=T+_*L,z=(_-F)/2+1,H=P[q];(o||C[q]!==H)&&H!=="-"&&(e.fillStyle=u?m[H]??"white":"black",e.fillText(D[q]||"",j+z,E+B+3)),L++}}}}for(let A of l.values()){let[T]=(0,Vu.featureSpanPx)(A,d,n),M=A.get("alignments"),C=A.get("seq").toLowerCase();for(let[R,k]of Object.entries(M)){let P=k.data.toLowerCase(),I=g.get(R);if(I===void 0)continue;let B=i*I;e.beginPath(),e.fillStyle="purple";for(let F=0,q=0;F<P.length;F++){let L="";for(;C[F]==="-";)P[F]!=="-"&&P[F]!==" "&&(L+=P[F]),F++;if(L.length>0){let j=T+_*q-1;e.rect(j,S+B+1,1,f-1),e.rect(j-2,S+B,5,1),e.rect(j-2,S+B+f-1,5,1)}q++}e.fill()}}}var Gu=class extends HP.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{regions:r,bpPerPx:n,samples:i,rowHeight:o}=t,a=r[0],u=i.length*(o+1)+100,c=(a.end-a.start)/n,s=await this.getFeatures(t),l=await(0,Vu.renderToAbstractCanvas)(c,u,t,f=>{SK({ctx:f,renderArgs:{...t,features:s}})});return{...await super.render({...t,...l,width:c,height:u}),...l,width:c,height:u}}};var GP=V(Ye()),$P=V(Hu()),KP=V(Jn()),OK=(0,KP.observer)(function(e){return GP.default.createElement($P.PrerenderedCanvas,{...e})}),YP=OK;var ZP=V(bn());var EK=(0,ZP.ConfigurationSchema)("LinearMafRenderer",{},{explicitlyTyped:!0}),JP=EK;function lb(e){e.addRendererType(()=>new Gu({name:"LinearMafRenderer",ReactComponent:YP,configSchema:JP,pluginManager:e}))}var eR=V(Vr()),tR=V(vt());var ce=V(Ye()),sn=V(Hu()),sa=V(ir()),Fe=V(dc()),XP=V(vt()),QP=V(Ya()),AK=(0,QP.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function fb({model:e}){let{classes:t}=AK(),[r,n]=(0,ce.useState)(""),[i,o]=(0,ce.useState)(),[a,u]=(0,ce.useState)(),[c,s]=(0,ce.useState)(),[l,d]=(0,ce.useState)(),[f,p]=(0,ce.useState)("MAF track"),[h,m]=(0,ce.useState)("BigMafAdapter"),[g,_]=(0,ce.useState)("TBI"),y=(0,XP.getRoot)(e);return ce.default.createElement(Fe.Paper,{className:t.paper},ce.default.createElement(Fe.Paper,null,l?ce.default.createElement(sn.ErrorMessage,{error:l}):null,ce.default.createElement(Fe.FormControl,null,ce.default.createElement(Fe.FormLabel,null,"File type"),ce.default.createElement(Fe.RadioGroup,{value:h,onChange:w=>{m(w.target.value)}},["BigMafAdapter","MafTabixAdapter","BgzipTaffyAdapter"].map(w=>ce.default.createElement(Fe.FormControlLabel,{value:w,control:ce.default.createElement(Fe.Radio,null),checked:h===w,label:w})))),h==="BigMafAdapter"?ce.default.createElement(sn.FileSelector,{location:i,name:"Path to bigMaf",rootModel:y,setLocation:w=>{o(w)}}):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:w=>{_(w.target.value)}},["TBI","CSI"].map(w=>ce.default.createElement(Fe.FormControlLabel,{value:w,control:ce.default.createElement(Fe.Radio,null),checked:h===w,label:w})))),ce.default.createElement(sn.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:y,setLocation:w=>{o(w)}}),ce.default.createElement(sn.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:y,setLocation:w=>{u(w)}})):ce.default.createElement(ce.default.Fragment,null,ce.default.createElement(sn.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:y,setLocation:w=>{o(w)}}),ce.default.createElement(sn.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:y,setLocation:w=>{u(w)}}))),ce.default.createElement("div",null,ce.default.createElement(sn.FileSelector,{location:c,name:"Path to newick tree (.nh)",rootModel:y,setLocation:w=>{s(w)}}),ce.default.createElement(Fe.TextField,{multiline:!0,rows:10,value:r,onChange:w=>{n(w.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:w=>{p(w.target.value)}}),ce.default.createElement(Fe.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let w=(0,sa.getSession)(e),E=[];try{E=JSON.parse(r)}catch{E=r.split(/\n|\r\n|\r/)}let S=[`${f.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,w.adminMode?"":"-sessionTrack"].join("");(0,sa.isSessionWithAddTracks)(w)&&(w.addTrackConf({trackId:S,type:"MafTrack",name:f,assemblyNames:[e.assembly],adapter:h==="BigMafAdapter"?{type:h,bigBedLocation:i,samples:E,nhLocation:c}:h==="MafTabixAdapter"?{type:h,bedGzLocation:i,nhLocation:c,index:{indexType:g,location:a},samples:E}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:c,samples:E}}),e.view?.showTrack(S)),e.clearData(),(0,sa.isSessionModelWithWidgets)(w)&&w.hideWidget(e)}catch(w){d(w)}}},"Submit"))}function db(e){e.addAddTrackWorkflowType(()=>new eR.AddTrackWorkflowType({name:"MAF track",ReactComponent:fb,stateModel:tR.types.model({})}))}var gR=V(aR()),_R=V(bR()),xb=class extends _R.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:c}=await(0,gR.getAdapter)(n,u,a);return c.getSamples(o,i)}};function Sb(e){e.addRpcMethod(()=>new xb(e))}var AR=V(Vr());var yR=V(Ss()),wR=V(ir()),xR=V(Gp()),SR=V(Os()),OR=V(vt());var Xu=class extends yR.BaseFeatureDataAdapter{setupP;async setup(){let t=this.config;if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,OR.getSnapshot)(t),type:"BedTabixAdapter"})).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){return(0,SR.ObservableCreate)(async r=>{let{adapter:n}=await this.setup(),i=await Fa(n.getFeatures(t).pipe(La()));for(let o of i){let a=o.get("field5").split(","),u={},c=a.map(s=>s.split(":")[5]);for(let[s,l]of a.entries()){let d=l.split(":"),f=d[0].lastIndexOf("."),p=d[0].slice(0,f),h=d[0].slice(f+1);p&&(u[p]={chr:h,start:+d[1],srcSize:+d[2],strand:d[3]==="-"?-1:1,unknown:+d[4],data:c[s]})}r.next(new wR.SimpleFeature({id:o.id(),data:{start:o.get("start"),end:o.get("end"),refName:o.get("refName"),name:o.get("name"),score:o.get("score"),alignments:u,seq:c[0]}}))}r.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,xR.openLocation)(r).readFile("utf8");return{samples:ro(this.getConf("samples")),tree:n?qa(n):void 0}}freeResources(){}};var Ob=V(bn());var nY=(0,Ob.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"}},index:(0,Ob.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}),ER=nY;function Eb(e){return e.addAdapterType(()=>new AR.AdapterType({name:"MafTabixAdapter",AdapterClass:Xu,configSchema:ER}))}var $d=V(Vr());var TR=V(bn()),PR=V(Vr());function Ab(e){return(0,TR.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,PR.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function Tb(e){return e.addTrackType(()=>{let t=Ab(e);return new $d.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,$d.createBaseTrackModel)(e,"MafTrack",t)})})}var Kd=class extends RR.default{name="MafViewerPlugin";version=Hb;install(t){ah(t),Tb(t),sb(t),lb(t),Eb(t),Yp(t),db(t),Sb(t)}configure(t){}};return Bb(iY);})();
|
|
9
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function Xp(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ms=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=Jp(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(Mr(l))try{l()}catch(m){o=m instanceof Rs?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Jp(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{my(h)}catch(m){o=o??[],m instanceof Rs?o=oo(oo([],io(o)),io(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 Rs(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)my(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)&&Xp(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Xp(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var bZ=Ms.EMPTY;function vy(e){return e instanceof Ms||e&&"closed"in e&&Mr(e.remove)&&Mr(e.add)&&Mr(e.unsubscribe)}function my(e){Mr(e)?e():e.unsubscribe()}var _n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var ao={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=ao.delegate;return i?.setTimeout?i.setTimeout.apply(i,oo([e,t],io(r))):setTimeout.apply(void 0,oo([e,t],io(r)))},clearTimeout:function(e){var t=ao.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function by(e){ao.setTimeout(function(){var t=_n.onUnhandledError;if(t)t(e);else throw e})}function Qp(){}var gy=function(){return eh("C",void 0,void 0)}();function _y(e){return eh("E",void 0,e)}function yy(e){return eh("N",e,void 0)}function eh(e,t,r){return{kind:e,value:t,error:r}}var th=null;function wy(e){_n.useDeprecatedSynchronousErrorHandling&&th&&(th.errorThrown=!0,th.error=e)}var ih=function(e){ja(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,vy(r)&&r.add(n)):n.destination=lC,n}return t.create=function(r,n,i){return new oh(r,n,i)},t.prototype.next=function(r){this.isStopped?nh(yy(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?nh(_y(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?nh(gy,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}(Ms);var uC=Function.prototype.bind;function rh(e,t){return uC.call(e,t)}var sC=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}(),oh=function(e){ja(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&&_n.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&rh(r.next,u),error:r.error&&rh(r.error,u),complete:r.complete&&rh(r.complete,u)}):a=r}return o.destination=new sC(a),o}return t}(ih);function ks(e){_n.useDeprecatedSynchronousErrorHandling?wy(e):by(e)}function cC(e){throw e}function nh(e,t){var r=_n.onStoppedNotification;r&&ao.setTimeout(function(){return r(e,t)})}var lC={closed:!0,next:Qp,error:cC,complete:Qp};function fC(e){return Mr(e?.lift)}function Cs(e){return function(t){if(fC(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 xy(e,t,r,n,i){return new dC(e,t,r,n,i)}var dC=function(e){ja(t,e);function t(r,n,i,o,a,u){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=n?function(s){try{n(s)}catch(l){r.error(l)}}:e.prototype._next,c._error=o?function(s){try{o(s)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,c}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}(ih);var Sy=Ps(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Fa(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new oh({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new Sy)}});e.subscribe(o)})}function Oy(e,t,r,n,i){return function(o,a){var u=r,c=t,s=0;o.subscribe(xy(a,function(l){var d=s++;c=u?e(c,l,d):(u=!0,l),n&&a.next(c)},i&&function(){u&&a.next(c),a.complete()}))}}function Ey(e,t){return Cs(Oy(e,t,arguments.length>=2,!1,!0))}var pC=function(e,t){return e.push(t),e};function La(){return Cs(function(e,t){Ey(pC,[])(e).subscribe(t)})}var Na=class extends Ay.BaseFeatureDataAdapter{setupP;async setup(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,My.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){return(0,Ry.ObservableCreate)(async r=>{let{adapter:n}=await this.setup(),i=await Fa(n.getFeatures(t).pipe(La()));for(let o of i){let u=o.get("mafBlock").split(";"),c,s=[],l={},d=[];for(let f of u)f.startsWith("s")&&(c?(s.push(f.split(/ +/)[6]),d.push(f)):(c=f.split(/ +/)[6],s.push(c),d.push(f)));for(let f=0;f<d.length;f++){let h=d[f].split(/ +/),m=h[1].split("."),g=m[0],_=m[1];l[g]={chr:_,start:+h[1],srcSize:+h[2],strand:h[3]==="+"?1:-1,unknown:+h[4],data:s[f]}}r.next(new Ty.SimpleFeature({id:o.id(),data:{start:o.get("start"),end:o.get("end"),refName:o.get("refName"),seq:s[0],alignments:l}}))}r.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Py.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?fi(n):void 0}}freeResources(){}};var ky=V(gn());var hC=(0,ky.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}),Cy=hC;function ah(e){return e.addAdapterType(()=>new qy.AdapterType({name:"BigMafAdapter",AdapterClass:Na,configSchema:Cy}))}var WP=V(Vr());var xt=V(Ye()),dP=V(Hw()),pP=V(KT()),Ud=V(ir()),hP=V(Xn()),mP=V(Ya());rb();var oK=(0,mP.makeStyles)()({cursor:{pointerEvents:"none"}}),aK=(0,hP.observer)(function(e){let{model:t}=e,{classes:r}=oK(),{pluginManager:n}=(0,Ud.getEnv)(t),{rowHeight:i,height:o,scrollTop:a,samples:u}=t,c=(0,xt.useRef)(null),s=n.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:l}=s.exports,[d,f]=(0,xt.useState)(),[p,h]=(0,xt.useState)(),{width:m}=(0,Ud.getContainingView)(t);return xt.default.createElement("div",{ref:c,onMouseMove:g=>{let _=c.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(l,{...e}),xt.default.createElement(Bd,{model:t}),d?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(dP.default,null,xt.default.createElement(pP.default,{html:Object.entries(u[Math.floor(d/i)]||{}).filter(([g])=>g!=="color"&&g!=="id").map(([g,_])=>`${g}:${_}`).join(`
|
|
10
|
+
`)}))):null)}),vP=aK;var bP=V(gn());function nb(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,bP.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var Vd=V(gn()),sa=V(ir()),BP=V(_P());function Wd(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Hd(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 uK(e,t){return e.parent===t.parent?1:2}function sK(e){return e.reduce(cK,0)/e.length}function cK(e,t){return e+t.x}function lK(e){return 1+e.reduce(fK,0)}function fK(e,t){return Math.max(e,t.y)}function dK(e){for(var t;t=e.children;)e=t[0];return e}function pK(e){for(var t;t=e.children;)e=t[t.length-1];return e}function ib(){var e=uK,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(f){var p=f.children;p?(f.x=sK(p),f.y=lK(p)):(f.x=a?u+=e(f,a):0,f.y=0,a=f)});var c=dK(o),s=pK(o),l=c.x-e(c,s)/2,d=s.x+e(s,c)/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-l)/(d-l)*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 hK(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 yP(){return this.eachAfter(hK)}function wP(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function xP(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 SP(e,t){for(var r=this,n=[r],i=[],o,a,u,c=-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,++c,this);return this}function OP(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function EP(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 AP(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function TP(e){for(var t=this,r=mK(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 mK(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 PP(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function RP(){return Array.from(this)}function MP(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function kP(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*CP(){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 ua(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=gK)):t===void 0&&(t=bK);for(var r=new Wu(e),n,i=[r],o,a,u,c;n=i.pop();)if((a=t(n.data))&&(c=(a=Array.from(a)).length))for(n.children=a,u=c-1;u>=0;--u)i.push(o=a[u]=new Wu(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(yK)}function vK(){return ua(this).eachBefore(_K)}function bK(e){return e.children}function gK(e){return Array.isArray(e)?e[1]:null}function _K(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function yK(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Wu(e){this.data=e,this.depth=this.height=0,this.parent=null}Wu.prototype=ua.prototype={constructor:Wu,count:yP,each:wP,eachAfter:SP,eachBefore:xP,find:OP,sum:EP,sort:AP,path:TP,ancestors:PP,descendants:RP,leaves:MP,links:kP,copy:vK,[Symbol.iterator]:CP};var UP=V(xc()),ei=V(vt());var Jt=V(Ye()),IP=V(Hu()),Xt=V(pc()),jP=V(Xn()),FP=V(Ya()),wK=(0,FP.makeStyles)()({root:{width:500}}),xK=(0,jP.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=wK(),[i,o]=(0,Jt.useState)(`${t.rowHeight}`),[a,u]=(0,Jt.useState)(`${t.rowProportion}`);return Jt.default.createElement(IP.Dialog,{open:!0,onClose:r,title:"Set row height"},Jt.default.createElement(Xt.DialogContent,{className:n.root},Jt.default.createElement(Xt.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Jt.default.createElement(Xt.TextField,{value:i,helperText:"Enter row height",onChange:c=>{o(c.target.value)}}),Jt.default.createElement(Xt.TextField,{value:a,helperText:"Enter row proportion",onChange:c=>{u(c.target.value)}}),Jt.default.createElement(Xt.DialogActions,null,Jt.default.createElement(Xt.Button,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,onClick:()=>{t.setRowProportion(+a),t.setRowHeight(+i),r()}},"Submit"),Jt.default.createElement(Xt.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel"))))}),LP=xK;function ob(e){return(e.data.length||0)+(e.children&&Hd(e.children,ob)||0)}function ab(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{ab(n,t,r)})}function ub(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return ei.types.compose("LinearMafDisplay",n,ei.types.model({type:ei.types.literal("LinearMafDisplay"),configuration:(0,Vd.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80})).volatile(()=>({prefersOffset:!0,volatileSamples:[],tree: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}){i.volatileSamples=o,i.tree=a}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,Vd.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,sa.getEnv)(i))}})).views(i=>({get root(){return i.tree?ua(i.tree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>Wd(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 ib().size([this.totalHeight,a]).separation(()=>1)(o),ab(o,o.data.length=0,a/ob(o)),o}else return},get samples(){return this.rowNames?bn(this.rowNames):i.volatileSamples},get totalHeight(){return this.samples.length*i.rowHeight},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:c,samples:s,rowHeight:l,rowProportion:d,mismatchRendering:f}=i;return{...a(),config:c,samples:s,rowHeight:l,rowProportion:d,showAllLetters:u,mismatchRendering:f}},trackMenuItems(){return[...o(),{label:"Set row height",onClick:()=>{(0,sa.getSession)(i).queueDialog(u=>[LP,{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,ei.addDisposer)(i,(0,UP.autorun)(async()=>{try{let{rpcManager:o}=(0,sa.getSession)(i),a=(0,BP.getRpcSessionId)(i),u=await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:c=>{(0,ei.isAlive)(i)&&i.setMessage(c)}});i.setSamples(u)}catch(o){console.error(o),(0,sa.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(zP(),DP));return u(i,a,o)}}})}function sb(e){e.addDisplayType(()=>{let t=nb(e),r=ub(t,e);return new WP.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:vP,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var VP=V(Vr()),GP=V(Hu()),Vu=V(ir());function HP(e){return Object.fromEntries(Object.entries(cb(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function cb(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function OK({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:c,rowProportion:s,features:l}=t,d=r[0],f=i*s,p=(0,GP.createJBrowseTheme)(a),h=cb(p),m=HP(p),g=new Map(c.map((A,T)=>[A.id,T])),_=1/n,w=.4,y=i/2,E=f/2,S=(i-f)/2;e.font="bold 10px Courier New,monospace";for(let A of l.values()){let[T]=(0,Vu.featureSpanPx)(A,d,n),M=A.get("alignments"),C=A.get("seq").toLowerCase();for(let[R,k]of Object.entries(M)){let D=k.data,P=D.toLowerCase(),I=g.get(R);if(I===void 0)continue;let B=i*I;e.beginPath(),e.fillStyle="black";for(let q=0,L=0;q<P.length;q++)if(C[q]!=="-"){if(P[q]==="-"){let j=T+_*L;e.moveTo(j,B+y),e.lineTo(j+_+w,B+y)}L++}if(e.stroke(),!o){e.beginPath(),e.fillStyle="lightgrey";for(let q=0,L=0;q<P.length;q++)if(C[q]!=="-"){let j=P[q],z=T+_*L;C[q]===j&&j!=="-"&&e.rect(z,S+B,_+w,f),L++}e.fill()}for(let q=0,L=0;q<P.length;q++){let j=P[q];if(C[q]!=="-"){if(j!=="-"){let z=T+_*L;C[q]!==j&&j!==" "?(e.fillStyle=u?h[j]??"black":"orange",e.fillRect(z,S+B,_+w,f)):o&&(e.fillStyle=u?h[j]??"black":"lightblue",e.fillRect(z,S+B,_+w,f))}L++}}let F=10;if(_>=F){for(let q=0,L=0;q<P.length;q++)if(C[q]!=="-"){let j=T+_*L,z=(_-F)/2+1,H=P[q];(o||C[q]!==H)&&H!=="-"&&(e.fillStyle=u?m[H]??"white":"black",e.fillText(D[q]||"",j+z,E+B+3)),L++}}}}for(let A of l.values()){let[T]=(0,Vu.featureSpanPx)(A,d,n),M=A.get("alignments"),C=A.get("seq").toLowerCase();for(let[R,k]of Object.entries(M)){let P=k.data.toLowerCase(),I=g.get(R);if(I===void 0)continue;let B=i*I;e.beginPath(),e.fillStyle="purple";for(let F=0,q=0;F<P.length;F++){let L="";for(;C[F]==="-";)P[F]!=="-"&&P[F]!==" "&&(L+=P[F]),F++;if(L.length>0){let j=T+_*q-1;e.rect(j,S+B+1,1,f-1),e.rect(j-2,S+B,5,1),e.rect(j-2,S+B+f-1,5,1)}q++}e.fill()}}}var Gu=class extends VP.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{regions:r,bpPerPx:n,samples:i,rowHeight:o}=t,a=r[0],u=i.length*(o+1)+100,c=(a.end-a.start)/n,s=await this.getFeatures(t),l=await(0,Vu.renderToAbstractCanvas)(c,u,t,f=>{OK({ctx:f,renderArgs:{...t,features:s}})});return{...await super.render({...t,...l,width:c,height:u}),...l,width:c,height:u}}};var $P=V(Ye()),KP=V(Hu()),YP=V(Xn()),EK=(0,YP.observer)(function(e){return $P.default.createElement(KP.PrerenderedCanvas,{...e})}),ZP=EK;var JP=V(gn());var AK=(0,JP.ConfigurationSchema)("LinearMafRenderer",{},{explicitlyTyped:!0}),XP=AK;function lb(e){e.addRendererType(()=>new Gu({name:"LinearMafRenderer",ReactComponent:ZP,configSchema:XP,pluginManager:e}))}var tR=V(Vr()),rR=V(vt());var ce=V(Ye()),sn=V(Hu()),ca=V(ir()),Fe=V(pc()),QP=V(vt()),eR=V(Ya()),TK=(0,eR.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function fb({model:e}){let{classes:t}=TK(),[r,n]=(0,ce.useState)(""),[i,o]=(0,ce.useState)(),[a,u]=(0,ce.useState)(),[c,s]=(0,ce.useState)(),[l,d]=(0,ce.useState)(),[f,p]=(0,ce.useState)("MAF track"),[h,m]=(0,ce.useState)("BigMafAdapter"),[g,_]=(0,ce.useState)("TBI"),w=(0,QP.getRoot)(e);return ce.default.createElement(Fe.Paper,{className:t.paper},ce.default.createElement(Fe.Paper,null,l?ce.default.createElement(sn.ErrorMessage,{error:l}):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(sn.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(sn.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(sn.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(sn.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(sn.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(sn.FileSelector,{location:c,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,ca.getSession)(e),E=[];try{E=JSON.parse(r)}catch{E=r.split(/\n|\r\n|\r/)}let S=[`${f.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,y.adminMode?"":"-sessionTrack"].join("");(0,ca.isSessionWithAddTracks)(y)&&(y.addTrackConf({trackId:S,type:"MafTrack",name:f,assemblyNames:[e.assembly],adapter:h==="BigMafAdapter"?{type:h,bigBedLocation:i,samples:E,nhLocation:c}:h==="MafTabixAdapter"?{type:h,bedGzLocation:i,nhLocation:c,index:{indexType:g,location:a},samples:E}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:c,samples:E}}),e.view?.showTrack(S)),e.clearData(),(0,ca.isSessionModelWithWidgets)(y)&&y.hideWidget(e)}catch(y){d(y)}}},"Submit"))}function db(e){e.addAddTrackWorkflowType(()=>new tR.AddTrackWorkflowType({name:"MAF track",ReactComponent:fb,stateModel:rR.types.model({})}))}var _R=V(uR()),yR=V(gR()),xb=class extends yR.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:c}=await(0,_R.getAdapter)(n,u,a);return c.getSamples(o,i)}};function Sb(e){e.addRpcMethod(()=>new xb(e))}var TR=V(Vr());var wR=V(Ss()),xR=V(ir()),SR=V(Os()),OR=V(Es()),ER=V(vt());var Xu=class extends wR.BaseFeatureDataAdapter{setupP;async setup(){let t=this.config;if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,ER.getSnapshot)(t),type:"BedTabixAdapter"})).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){return(0,OR.ObservableCreate)(async r=>{let{adapter:n}=await this.setup(),i=await Fa(n.getFeatures(t).pipe(La()));for(let o of i){let a=o.get("field5").split(","),u={},c=a.map(s=>s.split(":")[5]);for(let[s,l]of a.entries()){let d=l.split(":"),f=d[0].lastIndexOf("."),p=d[0].slice(0,f),h=d[0].slice(f+1);p&&(u[p]={chr:h,start:+d[1],srcSize:+d[2],strand:d[3]==="-"?-1:1,unknown:+d[4],data:c[s]})}r.next(new xR.SimpleFeature({id:o.id(),data:{start:o.get("start"),end:o.get("end"),refName:o.get("refName"),name:o.get("name"),score:o.get("score"),alignments:u,seq:c[0]}}))}r.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,SR.openLocation)(r).readFile("utf8");return{samples:bn(this.getConf("samples")),tree:n?fi(n):void 0}}freeResources(){}};var Ob=V(gn());var iY=(0,Ob.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"}},index:(0,Ob.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}),AR=iY;function Eb(e){return e.addAdapterType(()=>new TR.AdapterType({name:"MafTabixAdapter",AdapterClass:Xu,configSchema:AR}))}var Kd=V(Vr());var PR=V(gn()),RR=V(Vr());function Ab(e){return(0,PR.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,RR.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function Tb(e){return e.addTrackType(()=>{let t=Ab(e);return new Kd.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,Kd.createBaseTrackModel)(e,"MafTrack",t)})})}var Yd=class extends MR.default{name="MafViewerPlugin";version=Hb;install(t){ah(t),Tb(t),sb(t),lb(t),Eb(t),Yp(t),db(t),Sb(t)}configure(t){}};return Bb(oY);})();
|
|
11
11
|
/*! Bundled license information:
|
|
12
12
|
|
|
13
13
|
tabbable/dist/index.esm.js:
|