@medemagroup/bgc-viewer-components 0.3.0
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.
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
(function(Xe,Jt){typeof exports=="object"&&typeof module<"u"?Jt(exports,require("d3")):typeof define=="function"&&define.amd?define(["exports","d3"],Jt):(Xe=typeof globalThis<"u"?globalThis:Xe||self,Jt(Xe.BGCViewerComponents={},Xe.d3))})(this,function(Xe,Jt){"use strict";function ll(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const be=ll(Jt);/**
|
|
2
|
+
* @vue/shared v3.5.18
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**//*! #__NO_SIDE_EFFECTS__ */function _s(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const pe={},Mt=[],tt=()=>{},al=()=>!1,Rn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ws=e=>e.startsWith("onUpdate:"),xe=Object.assign,vs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},cl=Object.prototype.hasOwnProperty,le=(e,t)=>cl.call(e,t),z=Array.isArray,It=e=>Xt(e)==="[object Map]",Dt=e=>Xt(e)==="[object Set]",Tr=e=>Xt(e)==="[object Date]",X=e=>typeof e=="function",_e=e=>typeof e=="string",nt=e=>typeof e=="symbol",ge=e=>e!==null&&typeof e=="object",Er=e=>(ge(e)||X(e))&&X(e.then)&&X(e.catch),Ar=Object.prototype.toString,Xt=e=>Ar.call(e),ul=e=>Xt(e).slice(8,-1),On=e=>Xt(e)==="[object Object]",xs=e=>_e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Yt=_s(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},fl=/-(\w)/g,Fe=Pn(e=>e.replace(fl,(t,n)=>n?n.toUpperCase():"")),dl=/\B([A-Z])/g,Ke=Pn(e=>e.replace(dl,"-$1").toLowerCase()),Ln=Pn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ss=Pn(e=>e?`on${Ln(e)}`:""),yt=(e,t)=>!Object.is(e,t),Fn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Cs=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},kr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Rr=e=>{const t=_e(e)?Number(e):NaN;return isNaN(t)?e:t};let Or;const Mn=()=>Or||(Or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function In(e){if(z(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=_e(s)?ml(s):In(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(_e(e)||ge(e))return e}const hl=/;(?![^(]*\))/g,pl=/:([^]+)/,gl=/\/\*[^]*?\*\//g;function ml(e){const t={};return e.replace(gl,"").split(hl).forEach(n=>{if(n){const s=n.split(pl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ct(e){let t="";if(_e(e))t=e;else if(z(e))for(let n=0;n<e.length;n++){const s=Ct(e[n]);s&&(t+=s+" ")}else if(ge(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const yl=_s("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Pr(e){return!!e||e===""}function bl(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Qt(e[s],t[s]);return n}function Qt(e,t){if(e===t)return!0;let n=Tr(e),s=Tr(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=nt(e),s=nt(t),n||s)return e===t;if(n=z(e),s=z(t),n||s)return n&&s?bl(e,t):!1;if(n=ge(e),s=ge(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const l=e.hasOwnProperty(o),a=t.hasOwnProperty(o);if(l&&!a||!l&&a||!Qt(e[o],t[o]))return!1}}return String(e)===String(t)}function Ts(e,t){return e.findIndex(n=>Qt(n,t))}const Lr=e=>!!(e&&e.__v_isRef===!0),te=e=>_e(e)?e:e==null?"":z(e)||ge(e)&&(e.toString===Ar||!X(e.toString))?Lr(e)?te(e.value):JSON.stringify(e,Fr,2):String(e),Fr=(e,t)=>Lr(t)?Fr(e,t.value):It(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Es(s,i)+" =>"]=r,n),{})}:Dt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Es(n))}:nt(t)?Es(t):ge(t)&&!z(t)&&!On(t)?String(t):t,Es=(e,t="")=>{var n;return nt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.18
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let Ne;class _l{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ne,!t&&Ne&&(this.index=(Ne.scopes||(Ne.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ne;try{return Ne=this,t()}finally{Ne=n}}}on(){++this._on===1&&(this.prevScope=Ne,Ne=this)}off(){this._on>0&&--this._on===0&&(Ne=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function wl(){return Ne}let me;const As=new WeakSet;class Mr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ne&&Ne.active&&Ne.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,As.has(this)&&(As.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Dr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hr(this),Nr(this);const t=me,n=Ye;me=this,Ye=!0;try{return this.fn()}finally{jr(this),me=t,Ye=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ps(t);this.deps=this.depsTail=void 0,Hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?As.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Os(this)&&this.run()}get dirty(){return Os(this)}}let Ir=0,Zt,en;function Dr(e,t=!1){if(e.flags|=8,t){e.next=en,en=e;return}e.next=Zt,Zt=e}function ks(){Ir++}function Rs(){if(--Ir>0)return;if(en){let t=en;for(en=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Zt;){let t=Zt;for(Zt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Nr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function jr(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Ps(s),vl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Os(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Br(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Br(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===tn)||(e.globalVersion=tn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Os(e))))return;e.flags|=2;const t=e.dep,n=me,s=Ye;me=e,Ye=!0;try{Nr(e);const r=e.fn(e._value);(t.version===0||yt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{me=n,Ye=s,jr(e),e.flags&=-3}}function Ps(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ps(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function vl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ye=!0;const $r=[];function st(){$r.push(Ye),Ye=!1}function rt(){const e=$r.pop();Ye=e===void 0?!0:e}function Hr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=me;me=void 0;try{t()}finally{me=n}}}let tn=0;class xl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ls{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!me||!Ye||me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==me)n=this.activeLink=new xl(me,this),me.deps?(n.prevDep=me.depsTail,me.depsTail.nextDep=n,me.depsTail=n):me.deps=me.depsTail=n,Ur(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=me.depsTail,n.nextDep=void 0,me.depsTail.nextDep=n,me.depsTail=n,me.deps===n&&(me.deps=s)}return n}trigger(t){this.version++,tn++,this.notify(t)}notify(t){ks();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Rs()}}}function Ur(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ur(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Fs=new WeakMap,Tt=Symbol(""),Ms=Symbol(""),nn=Symbol("");function Re(e,t,n){if(Ye&&me){let s=Fs.get(e);s||Fs.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Ls),r.map=s,r.key=n),r.track()}}function dt(e,t,n,s,r,i){const o=Fs.get(e);if(!o){tn++;return}const l=a=>{a&&a.trigger()};if(ks(),t==="clear")o.forEach(l);else{const a=z(e),u=a&&xs(n);if(a&&n==="length"){const c=Number(s);o.forEach((f,h)=>{(h==="length"||h===nn||!nt(h)&&h>=c)&&l(f)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),u&&l(o.get(nn)),t){case"add":a?u&&l(o.get("length")):(l(o.get(Tt)),It(e)&&l(o.get(Ms)));break;case"delete":a||(l(o.get(Tt)),It(e)&&l(o.get(Ms)));break;case"set":It(e)&&l(o.get(Tt));break}}Rs()}function Nt(e){const t=re(e);return t===e?t:(Re(t,"iterate",nn),Ge(e)?t:t.map(Ce))}function Dn(e){return Re(e=re(e),"iterate",nn),e}const Sl={__proto__:null,[Symbol.iterator](){return Is(this,Symbol.iterator,Ce)},concat(...e){return Nt(this).concat(...e.map(t=>z(t)?Nt(t):t))},entries(){return Is(this,"entries",e=>(e[1]=Ce(e[1]),e))},every(e,t){return ht(this,"every",e,t,void 0,arguments)},filter(e,t){return ht(this,"filter",e,t,n=>n.map(Ce),arguments)},find(e,t){return ht(this,"find",e,t,Ce,arguments)},findIndex(e,t){return ht(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ht(this,"findLast",e,t,Ce,arguments)},findLastIndex(e,t){return ht(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ht(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ds(this,"includes",e)},indexOf(...e){return Ds(this,"indexOf",e)},join(e){return Nt(this).join(e)},lastIndexOf(...e){return Ds(this,"lastIndexOf",e)},map(e,t){return ht(this,"map",e,t,void 0,arguments)},pop(){return sn(this,"pop")},push(...e){return sn(this,"push",e)},reduce(e,...t){return qr(this,"reduce",e,t)},reduceRight(e,...t){return qr(this,"reduceRight",e,t)},shift(){return sn(this,"shift")},some(e,t){return ht(this,"some",e,t,void 0,arguments)},splice(...e){return sn(this,"splice",e)},toReversed(){return Nt(this).toReversed()},toSorted(e){return Nt(this).toSorted(e)},toSpliced(...e){return Nt(this).toSpliced(...e)},unshift(...e){return sn(this,"unshift",e)},values(){return Is(this,"values",Ce)}};function Is(e,t,n){const s=Dn(e),r=s[t]();return s!==e&&!Ge(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const Cl=Array.prototype;function ht(e,t,n,s,r,i){const o=Dn(e),l=o!==e&&!Ge(e),a=o[t];if(a!==Cl[t]){const f=a.apply(e,i);return l?Ce(f):f}let u=n;o!==e&&(l?u=function(f,h){return n.call(this,Ce(f),h,e)}:n.length>2&&(u=function(f,h){return n.call(this,f,h,e)}));const c=a.call(o,u,s);return l&&r?r(c):c}function qr(e,t,n,s){const r=Dn(e);let i=n;return r!==e&&(Ge(e)?n.length>3&&(i=function(o,l,a){return n.call(this,o,l,a,e)}):i=function(o,l,a){return n.call(this,o,Ce(l),a,e)}),r[t](i,...s)}function Ds(e,t,n){const s=re(e);Re(s,"iterate",nn);const r=s[t](...n);return(r===-1||r===!1)&&Bs(n[0])?(n[0]=re(n[0]),s[t](...n)):r}function sn(e,t,n=[]){st(),ks();const s=re(e)[t].apply(e,n);return Rs(),rt(),s}const Tl=_s("__proto__,__v_isRef,__isVue"),Vr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function El(e){nt(e)||(e=String(e));const t=re(this);return Re(t,"has",e),t.hasOwnProperty(e)}class zr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Yr:Xr:i?Jr:Gr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=z(t);if(!r){let a;if(o&&(a=Sl[n]))return a;if(n==="hasOwnProperty")return El}const l=Reflect.get(t,n,Te(t)?t:s);return(nt(n)?Vr.has(n):Tl(n))||(r||Re(t,"get",n),i)?l:Te(l)?o&&xs(n)?l:l.value:ge(l)?r?Qr(l):js(l):l}}class Wr extends zr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const a=bt(i);if(!Ge(s)&&!bt(s)&&(i=re(i),s=re(s)),!z(t)&&Te(i)&&!Te(s))return a?!1:(i.value=s,!0)}const o=z(t)&&xs(n)?Number(n)<t.length:le(t,n),l=Reflect.set(t,n,s,Te(t)?t:r);return t===re(r)&&(o?yt(s,i)&&dt(t,"set",n,s):dt(t,"add",n,s)),l}deleteProperty(t,n){const s=le(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&dt(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!nt(n)||!Vr.has(n))&&Re(t,"has",n),s}ownKeys(t){return Re(t,"iterate",z(t)?"length":Tt),Reflect.ownKeys(t)}}class Kr extends zr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Al=new Wr,kl=new Kr,Rl=new Wr(!0),Ol=new Kr(!0),Ns=e=>e,Nn=e=>Reflect.getPrototypeOf(e);function Pl(e,t,n){return function(...s){const r=this.__v_raw,i=re(r),o=It(i),l=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,u=r[e](...s),c=n?Ns:t?Hn:Ce;return!t&&Re(i,"iterate",a?Ms:Tt),{next(){const{value:f,done:h}=u.next();return h?{value:f,done:h}:{value:l?[c(f[0]),c(f[1])]:c(f),done:h}},[Symbol.iterator](){return this}}}}function jn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ll(e,t){const n={get(r){const i=this.__v_raw,o=re(i),l=re(r);e||(yt(r,l)&&Re(o,"get",r),Re(o,"get",l));const{has:a}=Nn(o),u=t?Ns:e?Hn:Ce;if(a.call(o,r))return u(i.get(r));if(a.call(o,l))return u(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Re(re(r),"iterate",Tt),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=re(i),l=re(r);return e||(yt(r,l)&&Re(o,"has",r),Re(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,a=re(l),u=t?Ns:e?Hn:Ce;return!e&&Re(a,"iterate",Tt),l.forEach((c,f)=>r.call(i,u(c),u(f),o))}};return xe(n,e?{add:jn("add"),set:jn("set"),delete:jn("delete"),clear:jn("clear")}:{add(r){!t&&!Ge(r)&&!bt(r)&&(r=re(r));const i=re(this);return Nn(i).has.call(i,r)||(i.add(r),dt(i,"add",r,r)),this},set(r,i){!t&&!Ge(i)&&!bt(i)&&(i=re(i));const o=re(this),{has:l,get:a}=Nn(o);let u=l.call(o,r);u||(r=re(r),u=l.call(o,r));const c=a.call(o,r);return o.set(r,i),u?yt(i,c)&&dt(o,"set",r,i):dt(o,"add",r,i),this},delete(r){const i=re(this),{has:o,get:l}=Nn(i);let a=o.call(i,r);a||(r=re(r),a=o.call(i,r)),l&&l.call(i,r);const u=i.delete(r);return a&&dt(i,"delete",r,void 0),u},clear(){const r=re(this),i=r.size!==0,o=r.clear();return i&&dt(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Pl(r,e,t)}),n}function Bn(e,t){const n=Ll(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(le(n,r)&&r in s?n:s,r,i)}const Fl={get:Bn(!1,!1)},Ml={get:Bn(!1,!0)},Il={get:Bn(!0,!1)},Dl={get:Bn(!0,!0)},Gr=new WeakMap,Jr=new WeakMap,Xr=new WeakMap,Yr=new WeakMap;function Nl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function jl(e){return e.__v_skip||!Object.isExtensible(e)?0:Nl(ul(e))}function js(e){return bt(e)?e:$n(e,!1,Al,Fl,Gr)}function Bl(e){return $n(e,!1,Rl,Ml,Jr)}function Qr(e){return $n(e,!0,kl,Il,Xr)}function Zd(e){return $n(e,!0,Ol,Dl,Yr)}function $n(e,t,n,s,r){if(!ge(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=jl(e);if(i===0)return e;const o=r.get(e);if(o)return o;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function jt(e){return bt(e)?jt(e.__v_raw):!!(e&&e.__v_isReactive)}function bt(e){return!!(e&&e.__v_isReadonly)}function Ge(e){return!!(e&&e.__v_isShallow)}function Bs(e){return e?!!e.__v_raw:!1}function re(e){const t=e&&e.__v_raw;return t?re(t):e}function $l(e){return!le(e,"__v_skip")&&Object.isExtensible(e)&&Cs(e,"__v_skip",!0),e}const Ce=e=>ge(e)?js(e):e,Hn=e=>ge(e)?Qr(e):e;function Te(e){return e?e.__v_isRef===!0:!1}function de(e){return Hl(e,!1)}function Hl(e,t){return Te(e)?e:new Ul(e,t)}class Ul{constructor(t,n){this.dep=new Ls,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:re(t),this._value=n?t:Ce(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ge(t)||bt(t);t=s?t:re(t),yt(t,n)&&(this._rawValue=t,this._value=s?t:Ce(t),this.dep.trigger())}}function Zr(e){return Te(e)?e.value:e}const ql={get:(e,t,n)=>t==="__v_raw"?e:Zr(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Te(r)&&!Te(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function ei(e){return jt(e)?e:new Proxy(e,ql)}class Vl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ls(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=tn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&me!==this)return Dr(this,!0),!0}get value(){const t=this.dep.track();return Br(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zl(e,t,n=!1){let s,r;return X(e)?s=e:(s=e.get,r=e.set),new Vl(s,r,n)}const Un={},qn=new WeakMap;let Et;function Wl(e,t=!1,n=Et){if(n){let s=qn.get(n);s||qn.set(n,s=[]),s.push(e)}}function Kl(e,t,n=pe){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:a}=n,u=j=>r?j:Ge(j)||r===!1||r===0?pt(j,1):pt(j);let c,f,h,g,b=!1,v=!1;if(Te(e)?(f=()=>e.value,b=Ge(e)):jt(e)?(f=()=>u(e),b=!0):z(e)?(v=!0,b=e.some(j=>jt(j)||Ge(j)),f=()=>e.map(j=>{if(Te(j))return j.value;if(jt(j))return u(j);if(X(j))return a?a(j,2):j()})):X(e)?t?f=a?()=>a(e,2):e:f=()=>{if(h){st();try{h()}finally{rt()}}const j=Et;Et=c;try{return a?a(e,3,[g]):e(g)}finally{Et=j}}:f=tt,t&&r){const j=f,K=r===!0?1/0:r;f=()=>pt(j(),K)}const A=wl(),$=()=>{c.stop(),A&&A.active&&vs(A.effects,c)};if(i&&t){const j=t;t=(...K)=>{j(...K),$()}}let H=v?new Array(e.length).fill(Un):Un;const W=j=>{if(!(!(c.flags&1)||!c.dirty&&!j))if(t){const K=c.run();if(r||b||(v?K.some((ae,he)=>yt(ae,H[he])):yt(K,H))){h&&h();const ae=Et;Et=c;try{const he=[K,H===Un?void 0:v&&H[0]===Un?[]:H,g];H=K,a?a(t,3,he):t(...he)}finally{Et=ae}}}else c.run()};return l&&l(W),c=new Mr(f),c.scheduler=o?()=>o(W,!1):W,g=j=>Wl(j,!1,c),h=c.onStop=()=>{const j=qn.get(c);if(j){if(a)a(j,4);else for(const K of j)K();qn.delete(c)}},t?s?W(!0):H=c.run():o?o(W.bind(null,!0),!0):c.run(),$.pause=c.pause.bind(c),$.resume=c.resume.bind(c),$.stop=$,$}function pt(e,t=1/0,n){if(t<=0||!ge(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Te(e))pt(e.value,t,n);else if(z(e))for(let s=0;s<e.length;s++)pt(e[s],t,n);else if(Dt(e)||It(e))e.forEach(s=>{pt(s,t,n)});else if(On(e)){for(const s in e)pt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&pt(e[s],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.18
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/const rn=[];let $s=!1;function eh(e,...t){if($s)return;$s=!0,st();const n=rn.length?rn[rn.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Gl();if(s)Bt(s,n,11,[e+t.map(i=>{var o,l;return(l=(o=i.toString)==null?void 0:o.call(i))!=null?l:JSON.stringify(i)}).join(""),n&&n.proxy,r.map(({vnode:i})=>`at <${Ji(n,i.type)}>`).join(`
|
|
14
|
+
`),r]);else{const i=[`[Vue warn]: ${e}`,...t];r.length&&i.push(`
|
|
15
|
+
`,...Jl(r)),console.warn(...i)}rt(),$s=!1}function Gl(){let e=rn[rn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Jl(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
|
|
16
|
+
`],...Xl(n))}),t}function Xl({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Ji(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...Yl(e.props),i]:[r+i]}function Yl(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...ti(s,e[s]))}),n.length>3&&t.push(" ..."),t}function ti(e,t,n){return _e(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Te(t)?(t=ti(e,re(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):X(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=re(t),n?t:[`${e}=`,t])}function Bt(e,t,n,s){try{return s?e(...s):e()}catch(r){Vn(r,t,n)}}function it(e,t,n,s){if(X(e)){const r=Bt(e,t,n,s);return r&&Er(r)&&r.catch(i=>{Vn(i,t,n)}),r}if(z(e)){const r=[];for(let i=0;i<e.length;i++)r.push(it(e[i],t,n,s));return r}}function Vn(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||pe;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,a,u)===!1)return}l=l.parent}if(i){st(),Bt(i,null,10,[e,a,u]),rt();return}}Ql(e,n,r,s,o)}function Ql(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const Me=[];let ot=-1;const $t=[];let _t=null,Ht=0;const ni=Promise.resolve();let zn=null;function Wn(e){const t=zn||ni;return e?t.then(this?e.bind(this):e):t}function Zl(e){let t=ot+1,n=Me.length;for(;t<n;){const s=t+n>>>1,r=Me[s],i=on(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function Hs(e){if(!(e.flags&1)){const t=on(e),n=Me[Me.length-1];!n||!(e.flags&2)&&t>=on(n)?Me.push(e):Me.splice(Zl(t),0,e),e.flags|=1,si()}}function si(){zn||(zn=ni.then(oi))}function ea(e){z(e)?$t.push(...e):_t&&e.id===-1?_t.splice(Ht+1,0,e):e.flags&1||($t.push(e),e.flags|=1),si()}function ri(e,t,n=ot+1){for(;n<Me.length;n++){const s=Me[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Me.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function ii(e){if($t.length){const t=[...new Set($t)].sort((n,s)=>on(n)-on(s));if($t.length=0,_t){_t.push(...t);return}for(_t=t,Ht=0;Ht<_t.length;Ht++){const n=_t[Ht];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}_t=null,Ht=0}}const on=e=>e.id==null?e.flags&2?-1:1/0:e.id;function oi(e){try{for(ot=0;ot<Me.length;ot++){const t=Me[ot];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Bt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ot<Me.length;ot++){const t=Me[ot];t&&(t.flags&=-2)}ot=-1,Me.length=0,ii(),zn=null,(Me.length||$t.length)&&oi()}}let He=null,li=null;function Kn(e){const t=He;return He=e,li=e&&e.type.__scopeId||null,t}function ta(e,t=He,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Hi(-1);const i=Kn(t);let o;try{o=e(...r)}finally{Kn(i),s._d&&Hi(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Us(e,t){if(He===null)return e;const n=ns(He),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,l,a=pe]=t[r];i&&(X(i)&&(i={mounted:i,updated:i}),i.deep&&pt(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:l,modifiers:a}))}return e}function At(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const l=r[o];i&&(l.oldValue=i[o].value);let a=l.dir[s];a&&(st(),it(a,n,8,[e.el,l,e,t]),rt())}}const na=Symbol("_vte"),sa=e=>e.__isTeleport;function qs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,qs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function ra(e,t){return X(e)?xe({name:e.name},t,{setup:e}):e}function ai(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ln(e,t,n,s,r=!1){if(z(e)){e.forEach((b,v)=>ln(b,t&&(z(t)?t[v]:t),n,s,r));return}if(an(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ln(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?ns(s.component):s.el,o=r?null:i,{i:l,r:a}=e,u=t&&t.r,c=l.refs===pe?l.refs={}:l.refs,f=l.setupState,h=re(f),g=f===pe?()=>!1:b=>le(h,b);if(u!=null&&u!==a&&(_e(u)?(c[u]=null,g(u)&&(f[u]=null)):Te(u)&&(u.value=null)),X(a))Bt(a,l,12,[o,c]);else{const b=_e(a),v=Te(a);if(b||v){const A=()=>{if(e.f){const $=b?g(a)?f[a]:c[a]:a.value;r?z($)&&vs($,i):z($)?$.includes(i)||$.push(i):b?(c[a]=[i],g(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else b?(c[a]=o,g(a)&&(f[a]=o)):v&&(a.value=o,e.k&&(c[e.k]=o))};o?(A.id=-1,Ue(A,n)):A()}}}Mn().requestIdleCallback,Mn().cancelIdleCallback;const an=e=>!!e.type.__asyncLoader,ci=e=>e.type.__isKeepAlive;function ia(e,t){ui(e,"a",t)}function oa(e,t){ui(e,"da",t)}function ui(e,t,n=Oe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Gn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)ci(r.parent.vnode)&&la(s,t,n,r),r=r.parent}}function la(e,t,n,s){const r=Gn(t,e,s,!0);zs(()=>{vs(s[t],r)},n)}function Gn(e,t,n=Oe,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{st();const l=gn(n),a=it(t,n,e,o);return l(),rt(),a});return s?r.unshift(i):r.push(i),i}}const gt=e=>(t,n=Oe)=>{(!mn||e==="sp")&&Gn(e,(...s)=>t(...s),n)},aa=gt("bm"),Vs=gt("m"),ca=gt("bu"),ua=gt("u"),fa=gt("bum"),zs=gt("um"),da=gt("sp"),ha=gt("rtg"),pa=gt("rtc");function ga(e,t=Oe){Gn("ec",e,t)}const fi="components";function cn(e,t){return pi(fi,e,!0,t)||e}const di=Symbol.for("v-ndc");function hi(e){return _e(e)?pi(fi,e,!1)||e:e||di}function pi(e,t,n=!0,s=!1){const r=He||Oe;if(r){const i=r.type;{const l=Gi(i,!1);if(l&&(l===t||l===Fe(t)||l===Ln(Fe(t))))return i}const o=gi(r[e]||i[e],t)||gi(r.appContext[e],t);return!o&&s?i:o}}function gi(e,t){return e&&(e[t]||e[Fe(t)]||e[Ln(Fe(t))])}function Qe(e,t,n,s){let r;const i=n,o=z(e);if(o||_e(e)){const l=o&&jt(e);let a=!1,u=!1;l&&(a=!Ge(e),u=bt(e),e=Dn(e)),r=new Array(e.length);for(let c=0,f=e.length;c<f;c++)r[c]=t(a?u?Hn(Ce(e[c])):Ce(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,i)}else if(ge(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];r[a]=t(e[c],c,a,i)}}else r=[];return r}const Ws=e=>e?zi(e)?ns(e):Ws(e.parent):null,un=xe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ws(e.parent),$root:e=>Ws(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>_i(e),$forceUpdate:e=>e.f||(e.f=()=>{Hs(e.update)}),$nextTick:e=>e.n||(e.n=Wn.bind(e.proxy)),$watch:e=>Na.bind(e)}),Ks=(e,t)=>e!==pe&&!e.__isScriptSetup&&le(e,t),ma={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const g=o[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Ks(s,t))return o[t]=1,s[t];if(r!==pe&&le(r,t))return o[t]=2,r[t];if((u=e.propsOptions[0])&&le(u,t))return o[t]=3,i[t];if(n!==pe&&le(n,t))return o[t]=4,n[t];Gs&&(o[t]=0)}}const c=un[t];let f,h;if(c)return t==="$attrs"&&Re(e.attrs,"get",""),c(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==pe&&le(n,t))return o[t]=4,n[t];if(h=a.config.globalProperties,le(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Ks(r,t)?(r[t]=n,!0):s!==pe&&le(s,t)?(s[t]=n,!0):le(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==pe&&le(e,o)||Ks(t,o)||(l=i[0])&&le(l,o)||le(s,o)||le(un,o)||le(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:le(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function mi(e){return z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Gs=!0;function ya(e){const t=_i(e),n=e.proxy,s=e.ctx;Gs=!1,t.beforeCreate&&yi(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:a,inject:u,created:c,beforeMount:f,mounted:h,beforeUpdate:g,updated:b,activated:v,deactivated:A,beforeDestroy:$,beforeUnmount:H,destroyed:W,unmounted:j,render:K,renderTracked:ae,renderTriggered:he,errorCaptured:Se,serverPrefetch:R,expose:C,inheritAttrs:L,components:J,directives:se,filters:ce}=t;if(u&&ba(u,s,null),o)for(const Q in o){const Z=o[Q];X(Z)&&(s[Q]=Z.bind(n))}if(r){const Q=r.call(n,n);ge(Q)&&(e.data=js(Q))}if(Gs=!0,i)for(const Q in i){const Z=i[Q],m=X(Z)?Z.bind(n,n):X(Z.get)?Z.get.bind(n,n):tt,w=!X(Z)&&X(Z.set)?Z.set.bind(n):tt,D=je({get:m,set:w});Object.defineProperty(s,Q,{enumerable:!0,configurable:!0,get:()=>D.value,set:M=>D.value=M})}if(l)for(const Q in l)bi(l[Q],s,n,Q);if(a){const Q=X(a)?a.call(n):a;Reflect.ownKeys(Q).forEach(Z=>{Ca(Z,Q[Z])})}c&&yi(c,e,"c");function ee(Q,Z){z(Z)?Z.forEach(m=>Q(m.bind(n))):Z&&Q(Z.bind(n))}if(ee(aa,f),ee(Vs,h),ee(ca,g),ee(ua,b),ee(ia,v),ee(oa,A),ee(ga,Se),ee(pa,ae),ee(ha,he),ee(fa,H),ee(zs,j),ee(da,R),z(C))if(C.length){const Q=e.exposed||(e.exposed={});C.forEach(Z=>{Object.defineProperty(Q,Z,{get:()=>n[Z],set:m=>n[Z]=m,enumerable:!0})})}else e.exposed||(e.exposed={});K&&e.render===tt&&(e.render=K),L!=null&&(e.inheritAttrs=L),J&&(e.components=J),se&&(e.directives=se),R&&ai(e)}function ba(e,t,n=tt){z(e)&&(e=Js(e));for(const s in e){const r=e[s];let i;ge(r)?"default"in r?i=Xn(r.from||s,r.default,!0):i=Xn(r.from||s):i=Xn(r),Te(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function yi(e,t,n){it(z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function bi(e,t,n,s){let r=s.includes(".")?Di(n,s):()=>n[s];if(_e(e)){const i=t[e];X(i)&&Je(r,i)}else if(X(e))Je(r,e.bind(n));else if(ge(e))if(z(e))e.forEach(i=>bi(i,t,n,s));else{const i=X(e.handler)?e.handler.bind(n):t[e.handler];X(i)&&Je(r,i,e)}}function _i(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let a;return l?a=l:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(u=>Jn(a,u,o,!0)),Jn(a,t,o)),ge(t)&&i.set(t,a),a}function Jn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Jn(e,i,n,!0),r&&r.forEach(o=>Jn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=_a[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const _a={data:wi,props:vi,emits:vi,methods:fn,computed:fn,beforeCreate:Ie,created:Ie,beforeMount:Ie,mounted:Ie,beforeUpdate:Ie,updated:Ie,beforeDestroy:Ie,beforeUnmount:Ie,destroyed:Ie,unmounted:Ie,activated:Ie,deactivated:Ie,errorCaptured:Ie,serverPrefetch:Ie,components:fn,directives:fn,watch:va,provide:wi,inject:wa};function wi(e,t){return t?e?function(){return xe(X(e)?e.call(this,this):e,X(t)?t.call(this,this):t)}:t:e}function wa(e,t){return fn(Js(e),Js(t))}function Js(e){if(z(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ie(e,t){return e?[...new Set([].concat(e,t))]:t}function fn(e,t){return e?xe(Object.create(null),e,t):t}function vi(e,t){return e?z(e)&&z(t)?[...new Set([...e,...t])]:xe(Object.create(null),mi(e),mi(t??{})):t}function va(e,t){if(!e)return t;if(!t)return e;const n=xe(Object.create(null),e);for(const s in t)n[s]=Ie(e[s],t[s]);return n}function xi(){return{app:null,config:{isNativeTag:al,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let xa=0;function Sa(e,t){return function(s,r=null){X(s)||(s=xe({},s)),r!=null&&!ge(r)&&(r=null);const i=xi(),o=new WeakSet,l=[];let a=!1;const u=i.app={_uid:xa++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:oc,get config(){return i.config},set config(c){},use(c,...f){return o.has(c)||(c&&X(c.install)?(o.add(c),c.install(u,...f)):X(c)&&(o.add(c),c(u,...f))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,f){return f?(i.components[c]=f,u):i.components[c]},directive(c,f){return f?(i.directives[c]=f,u):i.directives[c]},mount(c,f,h){if(!a){const g=u._ceVNode||Ee(s,r);return g.appContext=i,h===!0?h="svg":h===!1&&(h=void 0),e(g,c,h),a=!0,u._container=c,c.__vue_app__=u,ns(g.component)}},onUnmount(c){l.push(c)},unmount(){a&&(it(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,f){return i.provides[c]=f,u},runWithContext(c){const f=Ut;Ut=u;try{return c()}finally{Ut=f}}};return u}}let Ut=null;function Ca(e,t){if(Oe){let n=Oe.provides;const s=Oe.parent&&Oe.parent.provides;s===n&&(n=Oe.provides=Object.create(s)),n[e]=t}}function Xn(e,t,n=!1){const s=Qa();if(s||Ut){let r=Ut?Ut._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&X(t)?t.call(s&&s.proxy):t}}const Si={},Ci=()=>Object.create(Si),Ti=e=>Object.getPrototypeOf(e)===Si;function Ta(e,t,n,s=!1){const r={},i=Ci();e.propsDefaults=Object.create(null),Ei(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Bl(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Ea(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=re(r),[a]=e.propsOptions;let u=!1;if((s||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let h=c[f];if(Yn(e.emitsOptions,h))continue;const g=t[h];if(a)if(le(i,h))g!==i[h]&&(i[h]=g,u=!0);else{const b=Fe(h);r[b]=Xs(a,l,b,g,e,!1)}else g!==i[h]&&(i[h]=g,u=!0)}}}else{Ei(e,t,r,i)&&(u=!0);let c;for(const f in l)(!t||!le(t,f)&&((c=Ke(f))===f||!le(t,c)))&&(a?n&&(n[f]!==void 0||n[c]!==void 0)&&(r[f]=Xs(a,l,f,void 0,e,!0)):delete r[f]);if(i!==l)for(const f in i)(!t||!le(t,f))&&(delete i[f],u=!0)}u&&dt(e.attrs,"set","")}function Ei(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,l;if(t)for(let a in t){if(Yt(a))continue;const u=t[a];let c;r&&le(r,c=Fe(a))?!i||!i.includes(c)?n[c]=u:(l||(l={}))[c]=u:Yn(e.emitsOptions,a)||(!(a in s)||u!==s[a])&&(s[a]=u,o=!0)}if(i){const a=re(n),u=l||pe;for(let c=0;c<i.length;c++){const f=i[c];n[f]=Xs(r,a,f,u[f],e,!le(u,f))}}return o}function Xs(e,t,n,s,r,i){const o=e[n];if(o!=null){const l=le(o,"default");if(l&&s===void 0){const a=o.default;if(o.type!==Function&&!o.skipFactory&&X(a)){const{propsDefaults:u}=r;if(n in u)s=u[n];else{const c=gn(r);s=u[n]=a.call(null,t),c()}}else s=a;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!l?s=!1:o[1]&&(s===""||s===Ke(n))&&(s=!0))}return s}const Aa=new WeakMap;function Ai(e,t,n=!1){const s=n?Aa:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},l=[];let a=!1;if(!X(e)){const c=f=>{a=!0;const[h,g]=Ai(f,t,!0);xe(o,h),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!a)return ge(e)&&s.set(e,Mt),Mt;if(z(i))for(let c=0;c<i.length;c++){const f=Fe(i[c]);ki(f)&&(o[f]=pe)}else if(i)for(const c in i){const f=Fe(c);if(ki(f)){const h=i[c],g=o[f]=z(h)||X(h)?{type:h}:xe({},h),b=g.type;let v=!1,A=!0;if(z(b))for(let $=0;$<b.length;++$){const H=b[$],W=X(H)&&H.name;if(W==="Boolean"){v=!0;break}else W==="String"&&(A=!1)}else v=X(b)&&b.name==="Boolean";g[0]=v,g[1]=A,(v||le(g,"default"))&&l.push(f)}}const u=[o,l];return ge(e)&&s.set(e,u),u}function ki(e){return e[0]!=="$"&&!Yt(e)}const Ys=e=>e==="_"||e==="__"||e==="_ctx"||e==="$stable",Qs=e=>z(e)?e.map(lt):[lt(e)],ka=(e,t,n)=>{if(t._n)return t;const s=ta((...r)=>Qs(t(...r)),n);return s._c=!1,s},Ri=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Ys(r))continue;const i=e[r];if(X(i))t[r]=ka(r,i,s);else if(i!=null){const o=Qs(i);t[r]=()=>o}}},Oi=(e,t)=>{const n=Qs(t);e.slots.default=()=>n},Pi=(e,t,n)=>{for(const s in t)(n||!Ys(s))&&(e[s]=t[s])},Ra=(e,t,n)=>{const s=e.slots=Ci();if(e.vnode.shapeFlag&32){const r=t.__;r&&Cs(s,"__",r,!0);const i=t._;i?(Pi(s,t,n),n&&Cs(s,"_",i,!0)):Ri(t,s)}else t&&Oi(e,t)},Oa=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=pe;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:Pi(r,t,n):(i=!t.$stable,Ri(t,r)),o=t}else t&&(Oi(e,t),o={default:1});if(i)for(const l in r)!Ys(l)&&o[l]==null&&delete r[l]},Ue=Va;function Pa(e){return La(e)}function La(e,t){const n=Mn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:a,setText:u,setElementText:c,parentNode:f,nextSibling:h,setScopeId:g=tt,insertStaticContent:b}=e,v=(d,p,_,T=null,x=null,S=null,F=void 0,O=null,k=!!p.dynamicChildren)=>{if(d===p)return;d&&!pn(d,p)&&(T=ut(d),M(d,x,S,!0),d=null),p.patchFlag===-2&&(k=!1,p.dynamicChildren=null);const{type:E,ref:V,shapeFlag:I}=p;switch(E){case Qn:A(d,p,_,T);break;case wt:$(d,p,_,T);break;case er:d==null&&H(p,_,T,F);break;case we:J(d,p,_,T,x,S,F,O,k);break;default:I&1?K(d,p,_,T,x,S,F,O,k):I&6?se(d,p,_,T,x,S,F,O,k):(I&64||I&128)&&E.process(d,p,_,T,x,S,F,O,k,St)}V!=null&&x?ln(V,d&&d.ref,S,p||d,!p):V==null&&d&&d.ref!=null&&ln(d.ref,null,S,d,!0)},A=(d,p,_,T)=>{if(d==null)s(p.el=l(p.children),_,T);else{const x=p.el=d.el;p.children!==d.children&&u(x,p.children)}},$=(d,p,_,T)=>{d==null?s(p.el=a(p.children||""),_,T):p.el=d.el},H=(d,p,_,T)=>{[d.el,d.anchor]=b(d.children,p,_,T,d.el,d.anchor)},W=({el:d,anchor:p},_,T)=>{let x;for(;d&&d!==p;)x=h(d),s(d,_,T),d=x;s(p,_,T)},j=({el:d,anchor:p})=>{let _;for(;d&&d!==p;)_=h(d),r(d),d=_;r(p)},K=(d,p,_,T,x,S,F,O,k)=>{p.type==="svg"?F="svg":p.type==="math"&&(F="mathml"),d==null?ae(p,_,T,x,S,F,O,k):R(d,p,x,S,F,O,k)},ae=(d,p,_,T,x,S,F,O)=>{let k,E;const{props:V,shapeFlag:I,transition:q,dirs:G}=d;if(k=d.el=o(d.type,S,V&&V.is,V),I&8?c(k,d.children):I&16&&Se(d.children,k,null,T,x,Zs(d,S),F,O),G&&At(d,null,T,"created"),he(k,d,d.scopeId,F,T),V){for(const fe in V)fe!=="value"&&!Yt(fe)&&i(k,fe,null,V[fe],S,T);"value"in V&&i(k,"value",null,V.value,S),(E=V.onVnodeBeforeMount)&&at(E,T,d)}G&&At(d,null,T,"beforeMount");const ne=Fa(x,q);ne&&q.beforeEnter(k),s(k,p,_),((E=V&&V.onVnodeMounted)||ne||G)&&Ue(()=>{E&&at(E,T,d),ne&&q.enter(k),G&&At(d,null,T,"mounted")},x)},he=(d,p,_,T,x)=>{if(_&&g(d,_),T)for(let S=0;S<T.length;S++)g(d,T[S]);if(x){let S=x.subTree;if(p===S||$i(S.type)&&(S.ssContent===p||S.ssFallback===p)){const F=x.vnode;he(d,F,F.scopeId,F.slotScopeIds,x.parent)}}},Se=(d,p,_,T,x,S,F,O,k=0)=>{for(let E=k;E<d.length;E++){const V=d[E]=O?xt(d[E]):lt(d[E]);v(null,V,p,_,T,x,S,F,O)}},R=(d,p,_,T,x,S,F)=>{const O=p.el=d.el;let{patchFlag:k,dynamicChildren:E,dirs:V}=p;k|=d.patchFlag&16;const I=d.props||pe,q=p.props||pe;let G;if(_&&kt(_,!1),(G=q.onVnodeBeforeUpdate)&&at(G,_,p,d),V&&At(p,d,_,"beforeUpdate"),_&&kt(_,!0),(I.innerHTML&&q.innerHTML==null||I.textContent&&q.textContent==null)&&c(O,""),E?C(d.dynamicChildren,E,O,_,T,Zs(p,x),S):F||Z(d,p,O,null,_,T,Zs(p,x),S,!1),k>0){if(k&16)L(O,I,q,_,x);else if(k&2&&I.class!==q.class&&i(O,"class",null,q.class,x),k&4&&i(O,"style",I.style,q.style,x),k&8){const ne=p.dynamicProps;for(let fe=0;fe<ne.length;fe++){const oe=ne[fe],Ae=I[oe],ke=q[oe];(ke!==Ae||oe==="value")&&i(O,oe,Ae,ke,x,_)}}k&1&&d.children!==p.children&&c(O,p.children)}else!F&&E==null&&L(O,I,q,_,x);((G=q.onVnodeUpdated)||V)&&Ue(()=>{G&&at(G,_,p,d),V&&At(p,d,_,"updated")},T)},C=(d,p,_,T,x,S,F)=>{for(let O=0;O<p.length;O++){const k=d[O],E=p[O],V=k.el&&(k.type===we||!pn(k,E)||k.shapeFlag&198)?f(k.el):_;v(k,E,V,null,T,x,S,F,!0)}},L=(d,p,_,T,x)=>{if(p!==_){if(p!==pe)for(const S in p)!Yt(S)&&!(S in _)&&i(d,S,p[S],null,x,T);for(const S in _){if(Yt(S))continue;const F=_[S],O=p[S];F!==O&&S!=="value"&&i(d,S,O,F,x,T)}"value"in _&&i(d,"value",p.value,_.value,x)}},J=(d,p,_,T,x,S,F,O,k)=>{const E=p.el=d?d.el:l(""),V=p.anchor=d?d.anchor:l("");let{patchFlag:I,dynamicChildren:q,slotScopeIds:G}=p;G&&(O=O?O.concat(G):G),d==null?(s(E,_,T),s(V,_,T),Se(p.children||[],_,V,x,S,F,O,k)):I>0&&I&64&&q&&d.dynamicChildren?(C(d.dynamicChildren,q,_,x,S,F,O),(p.key!=null||x&&p===x.subTree)&&Li(d,p,!0)):Z(d,p,_,V,x,S,F,O,k)},se=(d,p,_,T,x,S,F,O,k)=>{p.slotScopeIds=O,d==null?p.shapeFlag&512?x.ctx.activate(p,_,T,F,k):ce(p,_,T,x,S,F,k):ie(d,p,k)},ce=(d,p,_,T,x,S,F)=>{const O=d.component=Ya(d,T,x);if(ci(d)&&(O.ctx.renderer=St),Za(O,!1,F),O.asyncDep){if(x&&x.registerDep(O,ee,F),!d.el){const k=O.subTree=Ee(wt);$(null,k,p,_),d.placeholder=k.el}}else ee(O,d,p,_,x,S,F)},ie=(d,p,_)=>{const T=p.component=d.component;if(Ua(d,p,_))if(T.asyncDep&&!T.asyncResolved){Q(T,p,_);return}else T.next=p,T.update();else p.el=d.el,T.vnode=p},ee=(d,p,_,T,x,S,F)=>{const O=()=>{if(d.isMounted){let{next:I,bu:q,u:G,parent:ne,vnode:fe}=d;{const We=Fi(d);if(We){I&&(I.el=fe.el,Q(d,I,F)),We.asyncDep.then(()=>{d.isUnmounted||O()});return}}let oe=I,Ae;kt(d,!1),I?(I.el=fe.el,Q(d,I,F)):I=fe,q&&Fn(q),(Ae=I.props&&I.props.onVnodeBeforeUpdate)&&at(Ae,ne,I,fe),kt(d,!0);const ke=ji(d),ze=d.subTree;d.subTree=ke,v(ze,ke,f(ze.el),ut(ze),d,x,S),I.el=ke.el,oe===null&&qa(d,ke.el),G&&Ue(G,x),(Ae=I.props&&I.props.onVnodeUpdated)&&Ue(()=>at(Ae,ne,I,fe),x)}else{let I;const{el:q,props:G}=p,{bm:ne,m:fe,parent:oe,root:Ae,type:ke}=d,ze=an(p);kt(d,!1),ne&&Fn(ne),!ze&&(I=G&&G.onVnodeBeforeMount)&&at(I,oe,p),kt(d,!0);{Ae.ce&&Ae.ce._def.shadowRoot!==!1&&Ae.ce._injectChildStyle(ke);const We=d.subTree=ji(d);v(null,We,_,T,d,x,S),p.el=We.el}if(fe&&Ue(fe,x),!ze&&(I=G&&G.onVnodeMounted)){const We=p;Ue(()=>at(I,oe,We),x)}(p.shapeFlag&256||oe&&an(oe.vnode)&&oe.vnode.shapeFlag&256)&&d.a&&Ue(d.a,x),d.isMounted=!0,p=_=T=null}};d.scope.on();const k=d.effect=new Mr(O);d.scope.off();const E=d.update=k.run.bind(k),V=d.job=k.runIfDirty.bind(k);V.i=d,V.id=d.uid,k.scheduler=()=>Hs(V),kt(d,!0),E()},Q=(d,p,_)=>{p.component=d;const T=d.vnode.props;d.vnode=p,d.next=null,Ea(d,p.props,T,_),Oa(d,p.children,_),st(),ri(d),rt()},Z=(d,p,_,T,x,S,F,O,k=!1)=>{const E=d&&d.children,V=d?d.shapeFlag:0,I=p.children,{patchFlag:q,shapeFlag:G}=p;if(q>0){if(q&128){w(E,I,_,T,x,S,F,O,k);return}else if(q&256){m(E,I,_,T,x,S,F,O,k);return}}G&8?(V&16&&et(E,x,S),I!==E&&c(_,I)):V&16?G&16?w(E,I,_,T,x,S,F,O,k):et(E,x,S,!0):(V&8&&c(_,""),G&16&&Se(I,_,T,x,S,F,O,k))},m=(d,p,_,T,x,S,F,O,k)=>{d=d||Mt,p=p||Mt;const E=d.length,V=p.length,I=Math.min(E,V);let q;for(q=0;q<I;q++){const G=p[q]=k?xt(p[q]):lt(p[q]);v(d[q],G,_,null,x,S,F,O,k)}E>V?et(d,x,S,!0,!1,I):Se(p,_,T,x,S,F,O,k,I)},w=(d,p,_,T,x,S,F,O,k)=>{let E=0;const V=p.length;let I=d.length-1,q=V-1;for(;E<=I&&E<=q;){const G=d[E],ne=p[E]=k?xt(p[E]):lt(p[E]);if(pn(G,ne))v(G,ne,_,null,x,S,F,O,k);else break;E++}for(;E<=I&&E<=q;){const G=d[I],ne=p[q]=k?xt(p[q]):lt(p[q]);if(pn(G,ne))v(G,ne,_,null,x,S,F,O,k);else break;I--,q--}if(E>I){if(E<=q){const G=q+1,ne=G<V?p[G].el:T;for(;E<=q;)v(null,p[E]=k?xt(p[E]):lt(p[E]),_,ne,x,S,F,O,k),E++}}else if(E>q)for(;E<=I;)M(d[E],x,S,!0),E++;else{const G=E,ne=E,fe=new Map;for(E=ne;E<=q;E++){const Le=p[E]=k?xt(p[E]):lt(p[E]);Le.key!=null&&fe.set(Le.key,E)}let oe,Ae=0;const ke=q-ne+1;let ze=!1,We=0;const ft=new Array(ke);for(E=0;E<ke;E++)ft[E]=0;for(E=G;E<=I;E++){const Le=d[E];if(Ae>=ke){M(Le,x,S,!0);continue}let De;if(Le.key!=null)De=fe.get(Le.key);else for(oe=ne;oe<=q;oe++)if(ft[oe-ne]===0&&pn(Le,p[oe])){De=oe;break}De===void 0?M(Le,x,S,!0):(ft[De-ne]=E+1,De>=We?We=De:ze=!0,v(Le,p[De],_,null,x,S,F,O,k),Ae++)}const An=ze?Ma(ft):Mt;for(oe=An.length-1,E=ke-1;E>=0;E--){const Le=ne+E,De=p[Le],xr=p[Le+1],kn=Le+1<V?xr.el||xr.placeholder:T;ft[E]===0?v(null,De,_,kn,x,S,F,O,k):ze&&(oe<0||E!==An[oe]?D(De,_,kn,2):oe--)}}},D=(d,p,_,T,x=null)=>{const{el:S,type:F,transition:O,children:k,shapeFlag:E}=d;if(E&6){D(d.component.subTree,p,_,T);return}if(E&128){d.suspense.move(p,_,T);return}if(E&64){F.move(d,p,_,St);return}if(F===we){s(S,p,_);for(let I=0;I<k.length;I++)D(k[I],p,_,T);s(d.anchor,p,_);return}if(F===er){W(d,p,_);return}if(T!==2&&E&1&&O)if(T===0)O.beforeEnter(S),s(S,p,_),Ue(()=>O.enter(S),x);else{const{leave:I,delayLeave:q,afterLeave:G}=O,ne=()=>{d.ctx.isUnmounted?r(S):s(S,p,_)},fe=()=>{I(S,()=>{ne(),G&&G()})};q?q(S,ne,fe):fe()}else s(S,p,_)},M=(d,p,_,T=!1,x=!1)=>{const{type:S,props:F,ref:O,children:k,dynamicChildren:E,shapeFlag:V,patchFlag:I,dirs:q,cacheIndex:G}=d;if(I===-2&&(x=!1),O!=null&&(st(),ln(O,null,_,d,!0),rt()),G!=null&&(p.renderCache[G]=void 0),V&256){p.ctx.deactivate(d);return}const ne=V&1&&q,fe=!an(d);let oe;if(fe&&(oe=F&&F.onVnodeBeforeUnmount)&&at(oe,p,d),V&6)Ve(d.component,_,T);else{if(V&128){d.suspense.unmount(_,T);return}ne&&At(d,null,p,"beforeUnmount"),V&64?d.type.remove(d,p,_,St,T):E&&!E.hasOnce&&(S!==we||I>0&&I&64)?et(E,p,_,!1,!0):(S===we&&I&384||!x&&V&16)&&et(k,p,_),T&&U(d)}(fe&&(oe=F&&F.onVnodeUnmounted)||ne)&&Ue(()=>{oe&&at(oe,p,d),ne&&At(d,null,p,"unmounted")},_)},U=d=>{const{type:p,el:_,anchor:T,transition:x}=d;if(p===we){ue(_,T);return}if(p===er){j(d);return}const S=()=>{r(_),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(d.shapeFlag&1&&x&&!x.persisted){const{leave:F,delayLeave:O}=x,k=()=>F(_,S);O?O(d.el,S,k):k()}else S()},ue=(d,p)=>{let _;for(;d!==p;)_=h(d),r(d),d=_;r(p)},Ve=(d,p,_)=>{const{bum:T,scope:x,job:S,subTree:F,um:O,m:k,a:E,parent:V,slots:{__:I}}=d;Mi(k),Mi(E),T&&Fn(T),V&&z(I)&&I.forEach(q=>{V.renderCache[q]=void 0}),x.stop(),S&&(S.flags|=8,M(F,d,p,_)),O&&Ue(O,p),Ue(()=>{d.isUnmounted=!0},p),p&&p.pendingBranch&&!p.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===p.pendingId&&(p.deps--,p.deps===0&&p.resolve())},et=(d,p,_,T=!1,x=!1,S=0)=>{for(let F=S;F<d.length;F++)M(d[F],p,_,T,x)},ut=d=>{if(d.shapeFlag&6)return ut(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const p=h(d.anchor||d.el),_=p&&p[na];return _?h(_):p};let Gt=!1;const En=(d,p,_)=>{d==null?p._vnode&&M(p._vnode,null,null,!0):v(p._vnode||null,d,p,null,null,null,_),p._vnode=d,Gt||(Gt=!0,ri(),ii(),Gt=!1)},St={p:v,um:M,m:D,r:U,mt:ce,mc:Se,pc:Z,pbc:C,n:ut,o:e};return{render:En,hydrate:void 0,createApp:Sa(En)}}function Zs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function kt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Li(e,t,n=!1){const s=e.children,r=t.children;if(z(s)&&z(r))for(let i=0;i<s.length;i++){const o=s[i];let l=r[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[i]=xt(r[i]),l.el=o.el),!n&&l.patchFlag!==-2&&Li(o,l)),l.type===Qn&&(l.el=o.el),l.type===wt&&!l.el&&(l.el=o.el)}}function Ma(e){const t=e.slice(),n=[0];let s,r,i,o,l;const a=e.length;for(s=0;s<a;s++){const u=e[s];if(u!==0){if(r=n[n.length-1],e[r]<u){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)l=i+o>>1,e[n[l]]<u?i=l+1:o=l;u<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Fi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fi(t)}function Mi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Ia=Symbol.for("v-scx"),Da=()=>Xn(Ia);function Je(e,t,n){return Ii(e,t,n)}function Ii(e,t,n=pe){const{immediate:s,deep:r,flush:i,once:o}=n,l=xe({},n),a=t&&s||!t&&i!=="post";let u;if(mn){if(i==="sync"){const g=Da();u=g.__watcherHandles||(g.__watcherHandles=[])}else if(!a){const g=()=>{};return g.stop=tt,g.resume=tt,g.pause=tt,g}}const c=Oe;l.call=(g,b,v)=>it(g,c,b,v);let f=!1;i==="post"?l.scheduler=g=>{Ue(g,c&&c.suspense)}:i!=="sync"&&(f=!0,l.scheduler=(g,b)=>{b?g():Hs(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,c&&(g.id=c.uid,g.i=c))};const h=Kl(e,t,l);return mn&&(u?u.push(h):a&&h()),h}function Na(e,t,n){const s=this.proxy,r=_e(e)?e.includes(".")?Di(s,e):()=>s[e]:e.bind(s,s);let i;X(t)?i=t:(i=t.handler,n=t);const o=gn(this),l=Ii(r,i.bind(s),n);return o(),l}function Di(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const ja=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fe(t)}Modifiers`]||e[`${Ke(t)}Modifiers`];function Ba(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||pe;let r=n;const i=t.startsWith("update:"),o=i&&ja(s,t.slice(7));o&&(o.trim&&(r=n.map(c=>_e(c)?c.trim():c)),o.number&&(r=n.map(kr)));let l,a=s[l=Ss(t)]||s[l=Ss(Fe(t))];!a&&i&&(a=s[l=Ss(Ke(t))]),a&&it(a,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,it(u,e,6,r)}}function Ni(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!X(e)){const a=u=>{const c=Ni(u,t,!0);c&&(l=!0,xe(o,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(ge(e)&&s.set(e,null),null):(z(i)?i.forEach(a=>o[a]=null):xe(o,i),ge(e)&&s.set(e,o),o)}function Yn(e,t){return!e||!Rn(t)?!1:(t=t.slice(2).replace(/Once$/,""),le(e,t[0].toLowerCase()+t.slice(1))||le(e,Ke(t))||le(e,t))}function th(){}function ji(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:a,render:u,renderCache:c,props:f,data:h,setupState:g,ctx:b,inheritAttrs:v}=e,A=Kn(e);let $,H;try{if(n.shapeFlag&4){const j=r||s,K=j;$=lt(u.call(K,j,c,f,g,h,b)),H=l}else{const j=t;$=lt(j.length>1?j(f,{attrs:l,slots:o,emit:a}):j(f,null)),H=t.props?l:$a(l)}}catch(j){dn.length=0,Vn(j,e,1),$=Ee(wt)}let W=$;if(H&&v!==!1){const j=Object.keys(H),{shapeFlag:K}=W;j.length&&K&7&&(i&&j.some(ws)&&(H=Ha(H,i)),W=Vt(W,H,!1,!0))}return n.dirs&&(W=Vt(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(n.dirs):n.dirs),n.transition&&qs(W,n.transition),$=W,Kn(A),$}const $a=e=>{let t;for(const n in e)(n==="class"||n==="style"||Rn(n))&&((t||(t={}))[n]=e[n]);return t},Ha=(e,t)=>{const n={};for(const s in e)(!ws(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ua(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Bi(s,o,u):!!o;if(a&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const h=c[f];if(o[h]!==s[h]&&!Yn(u,h))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===o?!1:s?o?Bi(s,o,u):!0:!!o;return!1}function Bi(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(t[i]!==e[i]&&!Yn(n,i))return!0}return!1}function qa({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const $i=e=>e.__isSuspense;function Va(e,t){t&&t.pendingBranch?z(e)?t.effects.push(...e):t.effects.push(e):ea(e)}const we=Symbol.for("v-fgt"),Qn=Symbol.for("v-txt"),wt=Symbol.for("v-cmt"),er=Symbol.for("v-stc"),dn=[];let qe=null;function N(e=!1){dn.push(qe=e?null:[])}function za(){dn.pop(),qe=dn[dn.length-1]||null}let hn=1;function Hi(e,t=!1){hn+=e,e<0&&qe&&t&&(qe.hasOnce=!0)}function Ui(e){return e.dynamicChildren=hn>0?qe||Mt:null,za(),hn>0&&qe&&qe.push(e),e}function B(e,t,n,s,r,i){return Ui(P(e,t,n,s,r,i,!0))}function qt(e,t,n,s,r){return Ui(Ee(e,t,n,s,r,!0))}function Zn(e){return e?e.__v_isVNode===!0:!1}function pn(e,t){return e.type===t.type&&e.key===t.key}const qi=({key:e})=>e??null,es=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?_e(e)||Te(e)||X(e)?{i:He,r:e,k:t,f:!!n}:e:null);function P(e,t=null,n=null,s=0,r=null,i=e===we?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qi(t),ref:t&&es(t),scopeId:li,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:He};return l?(tr(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=_e(n)?8:16),hn>0&&!o&&qe&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&qe.push(a),a}const Ee=Wa;function Wa(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===di)&&(e=wt),Zn(e)){const l=Vt(e,t,!0);return n&&tr(l,n),hn>0&&!i&&qe&&(l.shapeFlag&6?qe[qe.indexOf(e)]=l:qe.push(l)),l.patchFlag=-2,l}if(ic(e)&&(e=e.__vccOpts),t){t=Ka(t);let{class:l,style:a}=t;l&&!_e(l)&&(t.class=Ct(l)),ge(a)&&(Bs(a)&&!z(a)&&(a=xe({},a)),t.style=In(a))}const o=_e(e)?1:$i(e)?128:sa(e)?64:ge(e)?4:X(e)?2:0;return P(e,t,n,s,r,o,i,!0)}function Ka(e){return e?Bs(e)||Ti(e)?xe({},e):e:null}function Vt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:a}=e,u=t?Ga(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&qi(u),ref:t&&t.ref?n&&i?z(i)?i.concat(es(t)):[i,es(t)]:es(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==we?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vt(e.ssContent),ssFallback:e.ssFallback&&Vt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&qs(c,a.clone(c)),c}function vt(e=" ",t=0){return Ee(Qn,null,e,t)}function ye(e="",t=!1){return t?(N(),qt(wt,null,e)):Ee(wt,null,e)}function lt(e){return e==null||typeof e=="boolean"?Ee(wt):z(e)?Ee(we,null,e.slice()):Zn(e)?xt(e):Ee(Qn,null,String(e))}function xt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vt(e)}function tr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(z(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),tr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Ti(t)?t._ctx=He:r===3&&He&&(He.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else X(t)?(t={default:t,_ctx:He},n=32):(t=String(t),s&64?(n=16,t=[vt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ga(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=Ct([t.class,s.class]));else if(r==="style")t.style=In([t.style,s.style]);else if(Rn(r)){const i=t[r],o=s[r];o&&i!==o&&!(z(i)&&i.includes(o))&&(t[r]=i?[].concat(i,o):o)}else r!==""&&(t[r]=s[r])}return t}function at(e,t,n,s=null){it(e,t,7,[n,s])}const Ja=xi();let Xa=0;function Ya(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Ja,i={uid:Xa++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _l(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ai(s,r),emitsOptions:Ni(s,r),emit:null,emitted:null,propsDefaults:pe,inheritAttrs:s.inheritAttrs,ctx:pe,data:pe,props:pe,attrs:pe,slots:pe,refs:pe,setupState:pe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Ba.bind(null,i),e.ce&&e.ce(i),i}let Oe=null;const Qa=()=>Oe||He;let ts,nr;{const e=Mn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};ts=t("__VUE_INSTANCE_SETTERS__",n=>Oe=n),nr=t("__VUE_SSR_SETTERS__",n=>mn=n)}const gn=e=>{const t=Oe;return ts(e),e.scope.on(),()=>{e.scope.off(),ts(t)}},Vi=()=>{Oe&&Oe.scope.off(),ts(null)};function zi(e){return e.vnode.shapeFlag&4}let mn=!1;function Za(e,t=!1,n=!1){t&&nr(t);const{props:s,children:r}=e.vnode,i=zi(e);Ta(e,s,i,t),Ra(e,r,n||t);const o=i?ec(e,t):void 0;return t&&nr(!1),o}function ec(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ma);const{setup:s}=n;if(s){st();const r=e.setupContext=s.length>1?nc(e):null,i=gn(e),o=Bt(s,e,0,[e.props,r]),l=Er(o);if(rt(),i(),(l||e.sp)&&!an(e)&&ai(e),l){if(o.then(Vi,Vi),t)return o.then(a=>{Wi(e,a)}).catch(a=>{Vn(a,e,0)});e.asyncDep=o}else Wi(e,o)}else Ki(e)}function Wi(e,t,n){X(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=ei(t)),Ki(e)}function Ki(e,t,n){const s=e.type;e.render||(e.render=s.render||tt);{const r=gn(e);st();try{ya(e)}finally{rt(),r()}}}const tc={get(e,t){return Re(e,"get",""),e[t]}};function nc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,tc),slots:e.slots,emit:e.emit,expose:t}}function ns(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ei($l(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in un)return un[n](e)},has(t,n){return n in t||n in un}})):e.proxy}const sc=/(?:^|[-_])(\w)/g,rc=e=>e.replace(sc,t=>t.toUpperCase()).replace(/[-_]/g,"");function Gi(e,t=!0){return X(e)?e.displayName||e.name:e.name||t&&e.__name}function Ji(e,t,n=!1){let s=Gi(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=i=>{for(const o in i)if(i[o]===t)return o};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?rc(s):n?"App":"Anonymous"}function ic(e){return X(e)&&"__vccOpts"in e}const je=(e,t)=>zl(e,t,mn);function yn(e,t,n){const s=arguments.length;return s===2?ge(t)&&!z(t)?Zn(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Zn(n)&&(n=[n]),Ee(e,t,n))}const oc="3.5.18";/**
|
|
17
|
+
* @vue/runtime-dom v3.5.18
|
|
18
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
19
|
+
* @license MIT
|
|
20
|
+
**/let sr;const Xi=typeof window<"u"&&window.trustedTypes;if(Xi)try{sr=Xi.createPolicy("vue",{createHTML:e=>e})}catch{}const Yi=sr?e=>sr.createHTML(e):e=>e,lc="http://www.w3.org/2000/svg",ac="http://www.w3.org/1998/Math/MathML",mt=typeof document<"u"?document:null,Qi=mt&&mt.createElement("template"),cc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?mt.createElementNS(lc,e):t==="mathml"?mt.createElementNS(ac,e):n?mt.createElement(e,{is:n}):mt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>mt.createTextNode(e),createComment:e=>mt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Qi.innerHTML=Yi(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Qi.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},uc=Symbol("_vtc");function fc(e,t,n){const s=e[uc];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ss=Symbol("_vod"),Zi=Symbol("_vsh"),dc={beforeMount(e,{value:t},{transition:n}){e[ss]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):bn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),bn(e,!0),s.enter(e)):s.leave(e,()=>{bn(e,!1)}):bn(e,t))},beforeUnmount(e,{value:t}){bn(e,t)}};function bn(e,t){e.style.display=t?e[ss]:"none",e[Zi]=!t}const hc=Symbol(""),pc=/(^|;)\s*display\s*:/;function gc(e,t,n){const s=e.style,r=_e(n);let i=!1;if(n&&!r){if(t)if(_e(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&rs(s,l,"")}else for(const o in t)n[o]==null&&rs(s,o,"");for(const o in n)o==="display"&&(i=!0),rs(s,o,n[o])}else if(r){if(t!==n){const o=s[hc];o&&(n+=";"+o),s.cssText=n,i=pc.test(n)}}else t&&e.removeAttribute("style");ss in e&&(e[ss]=i?s.display:"",e[Zi]&&(s.display="none"))}const eo=/\s*!important$/;function rs(e,t,n){if(z(n))n.forEach(s=>rs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=mc(e,t);eo.test(n)?e.setProperty(Ke(s),n.replace(eo,""),"important"):e[s]=n}}const to=["Webkit","Moz","ms"],rr={};function mc(e,t){const n=rr[t];if(n)return n;let s=Fe(t);if(s!=="filter"&&s in e)return rr[t]=s;s=Ln(s);for(let r=0;r<to.length;r++){const i=to[r]+s;if(i in e)return rr[t]=i}return t}const no="http://www.w3.org/1999/xlink";function so(e,t,n,s,r,i=yl(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(no,t.slice(6,t.length)):e.setAttributeNS(no,t,n):n==null||i&&!Pr(n)?e.removeAttribute(t):e.setAttribute(t,i?"":nt(n)?String(n):n)}function ro(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Yi(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Pr(n):n==null&&l==="string"?(n="",o=!0):l==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function ir(e,t,n,s){e.addEventListener(t,n,s)}function yc(e,t,n,s){e.removeEventListener(t,n,s)}const io=Symbol("_vei");function bc(e,t,n,s,r=null){const i=e[io]||(e[io]={}),o=i[t];if(s&&o)o.value=s;else{const[l,a]=_c(t);if(s){const u=i[t]=xc(s,r);ir(e,l,u,a)}else o&&(yc(e,l,o,a),i[t]=void 0)}}const oo=/(?:Once|Passive|Capture)$/;function _c(e){let t;if(oo.test(e)){t={};let s;for(;s=e.match(oo);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ke(e.slice(2)),t]}let or=0;const wc=Promise.resolve(),vc=()=>or||(wc.then(()=>or=0),or=Date.now());function xc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;it(Sc(s,n.value),t,5,[s])};return n.value=e,n.attached=vc(),n}function Sc(e,t){if(z(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const lo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Cc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?fc(e,s,o):t==="style"?gc(e,n,s):Rn(t)?ws(t)||bc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Tc(e,t,s,o))?(ro(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&so(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!_e(s))?ro(e,Fe(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),so(e,t,s,o))};function Tc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&lo(t)&&X(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return lo(t)&&_e(n)?!1:t in e}const ao={};/*! #__NO_SIDE_EFFECTS__ */function co(e,t,n){const s=ra(e,t);On(s)&&xe(s,t);class r extends lr{constructor(o){super(s,o,n)}}return r.def=s,r}const Ec=typeof HTMLElement<"u"?HTMLElement:class{};class lr extends Ec{constructor(t,n={},s=yo){super(),this._def=t,this._props=n,this._createApp=s,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&s!==yo?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof lr){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Wn(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);this._ob=new MutationObserver(s=>{for(const r of s)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(s,r=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=s;let l;if(i&&!z(i))for(const a in i){const u=i[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=Rr(this._props[a])),(l||(l=Object.create(null)))[Fe(a)]=!0)}this._numberProps=l,this._resolveProps(s),this.shadowRoot&&this._applyStyles(o),this._mount(s)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(s=>{s.configureApp=this._def.configureApp,t(this._def=s,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const s in n)le(this,s)||Object.defineProperty(this,s,{get:()=>Zr(n[s])})}_resolveProps(t){const{props:n}=t,s=z(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&s.includes(r)&&this._setProp(r,this[r]);for(const r of s.map(Fe))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(i){this._setProp(r,i,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let s=n?this.getAttribute(t):ao;const r=Fe(t);n&&this._numberProps&&this._numberProps[r]&&(s=Rr(s)),this._setProp(r,s,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,s=!0,r=!1){if(n!==this._props[t]&&(n===ao?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),r&&this._instance&&this._update(),s)){const i=this._ob;i&&i.disconnect(),n===!0?this.setAttribute(Ke(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Ke(t),n+""):n||this.removeAttribute(Ke(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Lc(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Ee(this._def,xe(t,this._props));return this._instance||(n.ce=s=>{this._instance=s,s.ce=this,s.isCE=!0;const r=(i,o)=>{this.dispatchEvent(new CustomEvent(i,On(o[0])?xe({detail:o},o[0]):{detail:o}))};s.emit=(i,...o)=>{r(i,o),Ke(i)!==i&&r(Ke(i),o)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce;for(let r=t.length-1;r>=0;r--){const i=document.createElement("style");s&&i.setAttribute("nonce",s),i.textContent=t[r],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const s=n.nodeType===1&&n.getAttribute("slot")||"default";(t[s]||(t[s]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let s=0;s<t.length;s++){const r=t[s],i=r.getAttribute("name")||"default",o=this._slots[i],l=r.parentNode;if(o)for(const a of o){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let f;for(;f=c.nextNode();)f.setAttribute(u,"")}l.insertBefore(a,r)}else for(;r.firstChild;)l.insertBefore(r.firstChild,r);l.removeChild(r)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}const is=e=>{const t=e.props["onUpdate:modelValue"]||!1;return z(t)?n=>Fn(t,n):t},zt=Symbol("_assign"),Ac={deep:!0,created(e,t,n){e[zt]=is(n),ir(e,"change",()=>{const s=e._modelValue,r=_n(e),i=e.checked,o=e[zt];if(z(s)){const l=Ts(s,r),a=l!==-1;if(i&&!a)o(s.concat(r));else if(!i&&a){const u=[...s];u.splice(l,1),o(u)}}else if(Dt(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(ho(e,i))})},mounted:uo,beforeUpdate(e,t,n){e[zt]=is(n),uo(e,t,n)}};function uo(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(z(t))r=Ts(t,s.props.value)>-1;else if(Dt(t))r=t.has(s.props.value);else{if(t===n)return;r=Qt(t,ho(e,!0))}e.checked!==r&&(e.checked=r)}const kc={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=Dt(t);ir(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?kr(_n(o)):_n(o));e[zt](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,Wn(()=>{e._assigning=!1})}),e[zt]=is(s)},mounted(e,{value:t}){fo(e,t)},beforeUpdate(e,t,n){e[zt]=is(n)},updated(e,{value:t}){e._assigning||fo(e,t)}};function fo(e,t){const n=e.multiple,s=z(t);if(!(n&&!s&&!Dt(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],l=_n(o);if(n)if(s){const a=typeof l;a==="string"||a==="number"?o.selected=t.some(u=>String(u)===String(l)):o.selected=Ts(t,l)>-1}else o.selected=t.has(l);else if(Qt(_n(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function _n(e){return"_value"in e?e._value:e.value}function ho(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Rc=["ctrl","shift","alt","meta"],Oc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Rc.some(n=>e[`${n}Key`]&&!t.includes(n))},po=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o<t.length;o++){const l=Oc[t[o]];if(l&&l(r,t))return}return e(r,...i)})},Pc=xe({patchProp:Cc},cc);let go;function mo(){return go||(go=Pa(Pc))}const Lc=(...e)=>{mo().render(...e)},yo=(...e)=>{const t=mo().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Mc(s);if(!r)return;const i=t._component;!X(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,Fc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function Fc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Mc(e){return _e(e)?document.querySelector(e):e}function Ic(e){const t=document.body||document.documentElement;let n=null;const s=c=>{n=c};document.addEventListener("mousemove",s),window.getComputedStyle(e.containerElement).position==="static"&&be.select(e.containerElement).style("position","relative");const i=be.select(e.containerElement).append("div").attr("class","track-viewer-menu-button").attr("aria-label","Track viewer options menu").attr("role","button").attr("tabindex","0").style("position","absolute").style("top","8px").style("right","8px").style("width","32px").style("height","32px").style("background","white").style("border","1px solid #ccc").style("border-radius","4px").style("cursor","pointer").style("display","flex").style("align-items","center").style("justify-content","center").style("z-index","100").style("box-shadow","0 2px 4px rgba(0,0,0,0.1)").style("opacity","0").style("transition","opacity 0.2s").style("pointer-events","none").html("⋮").style("font-size","20px").style("line-height","1").style("user-select","none"),o=be.select(t).append("div").attr("class","track-viewer-context-menu").style("position","absolute").style("background","white").style("border","1px solid #ccc").style("border-radius","4px").style("box-shadow","0 2px 8px rgba(0,0,0,0.15)").style("padding","4px 0").style("min-width","200px").style("display","none").style("z-index","1001"),l=[{label:"Save as SVG",action:e.onSaveSVG},{label:"Save as PNG",action:e.onSavePNG},{type:"separator"},{label:"Show track labels",action:e.onToggleTrackLabels,checkbox:!0,checked:e.getShowTrackLabels},{label:"Show all annotation labels",action:e.onToggleAllAnnotationLabels,checkbox:!0,checked:e.getShowAllAnnotationLabels}];l.forEach(c=>{if(c.type==="separator")o.append("div").style("height","1px").style("background","#e0e0e0").style("margin","4px 0");else{const f=o.append("div").attr("class","track-viewer-menu-item").style("padding","8px 16px").style("cursor","pointer").style("user-select","none").style("display","flex").style("align-items","center").style("gap","8px").on("mouseenter",function(){be.select(this).style("background","#f5f5f5")}).on("mouseleave",function(){be.select(this).style("background","transparent")}).on("click",()=>{typeof c.action=="function"&&c.action(),u()});if(c.checkbox){const h=f.append("span").attr("class","menu-checkbox").style("width","16px").style("height","16px").style("border","1px solid #999").style("border-radius","3px").style("display","inline-flex").style("align-items","center").style("justify-content","center").style("flex-shrink","0");c.checkboxElement=h,c.checked&&c.checked()&&h.html("✓").style("background","#2196F3").style("color","white").style("border-color","#2196F3")}f.append("span").text(c.label)}}),be.select(e.containerElement).on("mouseenter",()=>{i.style("opacity","1").style("pointer-events","all")}).on("mouseleave",()=>{o.style("display")==="none"&&i.style("opacity","0").style("pointer-events","none")});function a(){const c=i.node().getBoundingClientRect(),f=window.pageYOffset||document.documentElement.scrollTop,h=window.pageXOffset||document.documentElement.scrollLeft;o.style("display","block").style("top",`${c.bottom+f+4}px`).style("left",`${c.right+h-200}px`)}function u(){o.style("display","none");const c=e.containerElement.getBoundingClientRect();if(n){const f=n.clientX,h=n.clientY;f>=c.left&&f<=c.right&&h>=c.top&&h<=c.bottom||i.style("opacity","0").style("pointer-events","none")}}return i.on("click",c=>{c.stopPropagation(),o.style("display")==="none"?a():u()}),be.select(t).on("click.trackviewer-context",()=>{u()}),{destroy(){document.removeEventListener("mousemove",s),be.select(e.containerElement).on("mouseenter",null).on("mouseleave",null),be.select(t).on("click.trackviewer-context",null),o.remove(),i.remove()},updateCheckbox(c,f){const h=l.find(g=>g.label===c);h&&h.checkboxElement&&(f?h.checkboxElement.html("✓").style("background","#2196F3").style("color","white").style("border-color","#2196F3"):h.checkboxElement.html("").style("background","white").style("border-color","#999"))},toggle(){o.style("display")==="none"?a():u()}}}const Ft=class Ft{constructor(t){this.data={tracks:[],annotations:[],primitives:[]},this.showAllAnnotationLabels=!1,this.isDragging=!1,this.isResponsiveWidth=t.width===void 0;const n=typeof t.container=="string"?document.querySelector(t.container):t.container;if(!n)throw new Error("Container element not found");this.containerElement=n;const s=this.isResponsiveWidth?this.calculateResponsiveWidth():t.width||800,r=t.showTrackLabels!==!1?60:10,i=t.margin||{top:20,right:10,bottom:20,left:r};this.config={container:t.container,width:s,height:t.height||300,margin:i,trackHeight:t.trackHeight||30,domain:t.domain||[0,100],zoomExtent:t.zoomExtent||[.5,20],showTrackLabels:t.showTrackLabels!==void 0?t.showTrackLabels:!0,onAnnotationClick:t.onAnnotationClick||(()=>{}),onAnnotationHover:t.onAnnotationHover||(()=>{}),onBackgroundClick:t.onBackgroundClick||(()=>{})},this.originalLeftMargin=this.config.margin.left,this.showTrackLabels=this.config.showTrackLabels,this.showTrackLabels||(this.config.margin.left=this.originalLeftMargin),this.currentTransform=be.zoomIdentity,this.initialize(),this.isResponsiveWidth&&this.setupAutoResize()}calculateResponsiveWidth(){const t=this.containerElement.clientWidth||800;return Math.max(600,t-40)}setupAutoResize(){let t;this.resizeObserver=new ResizeObserver(n=>{clearTimeout(t),t=setTimeout(()=>{this.resize()},100)}),this.resizeObserver.observe(this.containerElement)}initialize(){const t=typeof this.config.container=="string"?document.querySelector(this.config.container):this.config.container;if(!t)throw new Error("Container element not found");const n=document.body||document.documentElement;this.tooltip=be.select(n).append("div").attr("class","track-viewer-tooltip").style("position","absolute").style("background","white").style("border","1px solid #ccc").style("padding","4px 8px").style("pointer-events","none").style("display","none").style("z-index","1000"),this.svg=be.select(t).append("svg").attr("width",this.config.width).attr("height",this.config.height),this.chart=this.svg.append("g").attr("transform",`translate(${this.config.margin.left},${this.config.margin.top})`);const s=this.config.width-this.config.margin.left-this.config.margin.right;this.clipId=`clip-${Math.random().toString(36).substring(2,11)}`,this.svg.append("defs").append("clipPath").attr("id",this.clipId).append("rect").attr("x",0).attr("y",-Ft.LABEL_PADDING).attr("width",s).attr("height","100%"),this.xAxisGroup=this.chart.append("g").attr("class","x-axis"),this.clippedChart=this.chart.append("g").attr("clip-path",`url(#${this.clipId})`),this.x=be.scaleLinear().domain(this.config.domain).range([0,this.config.width-this.config.margin.left-this.config.margin.right]),this.initializeZoom(),this.createContextMenu()}initializeZoom(){const t=this.config.width-this.config.margin.left-this.config.margin.right,n=this.config.height-this.config.margin.top-this.config.margin.bottom;this.zoom=be.zoom().scaleExtent(this.config.zoomExtent).translateExtent([[0,0],[t,n]]).extent([[0,0],[t,n]]).filter(s=>(s.type==="mousedown"&&s.button===0&&(this.isDragging=!0),s.type==="mouseup"&&(this.isDragging=!1),!s.ctrlKey&&!s.button)).on("zoom",s=>{this.currentTransform=s.transform,this.drawTracks()}).on("start",s=>{s.sourceEvent&&s.sourceEvent.type==="mousedown"&&(this.clippedChart.select(".chart-background").style("cursor","grabbing"),this.svg.style("cursor","grabbing"))}).on("end",()=>{this.isDragging=!1,this.clippedChart.select(".chart-background").style("cursor","grab"),this.svg.style("cursor","")}),this.svg.call(this.zoom),this.clippedChart.insert("rect",":first-child").attr("class","chart-background").attr("width",t).attr("height",n).attr("y",-Ft.LABEL_PADDING).style("fill","transparent").style("pointer-events","all").style("cursor","grab").on("click",()=>{this.config.onBackgroundClick()})}createContextMenu(){this.contextMenuController=Ic({containerElement:this.containerElement,onSaveSVG:()=>this.saveAsSVG(),onSavePNG:()=>this.saveAsPNG(),getShowTrackLabels:()=>this.showTrackLabels,getShowAllAnnotationLabels:()=>this.showAllAnnotationLabels,onToggleTrackLabels:()=>this.toggleTrackLabels(),onToggleAllAnnotationLabels:()=>this.toggleAllAnnotationLabels()})}saveAsSVG(){const t=this.svg.node();if(!t)return;const n=t.cloneNode(!0),s=this.getInlineStyles(n),r=document.createElementNS("http://www.w3.org/2000/svg","style");r.textContent=s,n.insertBefore(r,n.firstChild),be.select(n).selectAll("[data-styled]").attr("data-styled",null);const o=new XMLSerializer().serializeToString(n),l=new Blob([o],{type:"image/svg+xml"}),a=URL.createObjectURL(l),u=document.createElement("a");u.href=a,u.download="track-viewer.svg",u.click(),URL.revokeObjectURL(a)}saveAsPNG(){const t=this.svg.node();if(!t)return;const n=t.cloneNode(!0),s=this.getInlineStyles(n),r=document.createElementNS("http://www.w3.org/2000/svg","style");r.textContent=s,n.insertBefore(r,n.firstChild),be.select(n).selectAll("[data-styled]").attr("data-styled",null);const o=new XMLSerializer().serializeToString(n),l=20,a=document.createElement("canvas"),u=a.getContext("2d");if(!u)return;const c=2;a.width=(this.config.width+l*2)*c,a.height=(this.config.height+l*2)*c,u.scale(c,c);const f=new Image,h=new Blob([o],{type:"image/svg+xml"}),g=URL.createObjectURL(h);f.onload=()=>{u.fillStyle="white",u.fillRect(0,0,this.config.width+l*2,this.config.height+l*2),u.drawImage(f,l,l),URL.revokeObjectURL(g),a.toBlob(b=>{if(b){const v=URL.createObjectURL(b),A=document.createElement("a");A.href=v,A.download="track-viewer.png",A.click(),URL.revokeObjectURL(v)}})},f.src=g}getInlineStyles(t=this.svg.node()){const n=Array.from(document.styleSheets),s=[];n.forEach(i=>{try{const o=i.cssRules||i.rules;o&&Array.from(o).forEach(l=>{if(l.selectorText){const a=l.selectorText;(a.includes(".track")||a.includes(".annotation")||a.includes(".axis")||a.includes(".primitive")||a.includes("svg")||a.includes("text")||a.includes("rect")||a.includes("path")||a.includes("circle")||a.includes("line")||a.includes("polygon"))&&s.push(l.cssText)}})}catch{}});const r=be.select(t);return r.selectAll(".track-label").each(function(){const i=this,o=window.getComputedStyle(i);i.hasAttribute("data-styled")||(i.setAttribute("data-styled","true"),i.setAttribute("style",`font-family: ${o.fontFamily}; font-size: ${o.fontSize}; fill: ${o.fill||"currentColor"};`))}),r.selectAll(".annotation, .primitive").each(function(){const i=this,o=window.getComputedStyle(i),l=i.getAttribute("data-label");if(l&&!i.querySelector("title")){const u=document.createElementNS("http://www.w3.org/2000/svg","title");u.textContent=l,i.insertBefore(u,i.firstChild),i.removeAttribute("data-label")}i.querySelectorAll("path, rect, circle, line, polygon, ellipse").forEach(u=>{const c=u,f=window.getComputedStyle(c);if(!c.hasAttribute("data-styled")){c.setAttribute("data-styled","true");const h=[],g=f.fill,b=o.fill;if(g&&g!=="none"&&g!=="rgb(0, 0, 0)"?h.push(`fill: ${g}`):b&&b!=="none"&&b!=="rgb(0, 0, 0)"&&h.push(`fill: ${b}`),f.stroke&&f.stroke!=="none"&&h.push(`stroke: ${f.stroke}`),f.strokeWidth&&h.push(`stroke-width: ${f.strokeWidth}`),f.opacity&&f.opacity!=="1"&&h.push(`opacity: ${f.opacity}`),h.length>0){const v=c.getAttribute("style")||"";c.setAttribute("style",v+" "+h.join("; ")+";")}}})}),s.join(`
|
|
21
|
+
`)}toggleTrackLabels(){var n;if(this.showTrackLabels=!this.showTrackLabels,this.chart.select(".track-labels-container").style("display",this.showTrackLabels?"":"none"),this.showTrackLabels)this.updateMarginAndLayout();else{this.config.margin.left=this.originalLeftMargin,this.chart.attr("transform",`translate(${this.config.margin.left},${this.config.margin.top})`),this.x.range([0,this.config.width-this.config.margin.left-this.config.margin.right]);const s=this.config.width-this.config.margin.left-this.config.margin.right;this.svg.select("clipPath rect").attr("width",s),this.clippedChart.select(".chart-background").attr("width",s),this.drawTracks()}(n=this.contextMenuController)==null||n.updateCheckbox("Show track labels",this.showTrackLabels)}toggleAllAnnotationLabels(){var n;this.showAllAnnotationLabels=!this.showAllAnnotationLabels;const t=this.showAllAnnotationLabels;this.clippedChart.selectAll(".annotation-labels-layer .annotation-label-group").each(function(){const s=be.select(this),i=s.select(".annotation-label").attr("data-show-label");i==="never"?s.style("display","none"):i==="always"?s.style("display",""):s.style("display",t?"":"none")}),(n=this.contextMenuController)==null||n.updateCheckbox("Show all annotation labels",this.showAllAnnotationLabels)}getTrackHeight(t){return t.height||this.config.trackHeight}getTotalTracksHeight(){return this.data.tracks.reduce((t,n)=>t+this.getTrackHeight(n),0)}getTrackYPosition(t){let n=0;for(let s=0;s<t;s++)n+=this.getTrackHeight(this.data.tracks[s]);return n}updateHeight(){const t=this.getTotalTracksHeight()+this.config.margin.top+this.config.margin.bottom;this.config.height=t,this.svg.attr("height",t);const n=this.getTotalTracksHeight();this.xAxisGroup.attr("transform",`translate(0, ${n})`),this.svg.select("clipPath rect").attr("height",n+Ft.LABEL_PADDING),this.clippedChart.select(".chart-background").attr("height",n+Ft.LABEL_PADDING)}createTrackGroups(){this.trackGroups=this.clippedChart.selectAll(".track").data(this.data.tracks,n=>n.id).join("g").attr("id",n=>n.id).attr("class","track").attr("transform",(n,s)=>`translate(0, ${this.getTrackYPosition(s)})`);let t=this.chart.select(".track-labels-container");t.empty()&&(t=this.chart.append("g").attr("class","track-labels-container")),t.style("display",this.showTrackLabels?"":"none"),this.labelGroups=t.selectAll(".track-label-group").data(this.data.tracks,n=>n.id).join("g").attr("id",n=>`${n.id}-label`).attr("class","track-label-group").attr("transform",(n,s)=>`translate(0, ${this.getTrackYPosition(s)})`),this.labelGroups.selectAll(".track-label").data(n=>[n]).join("text").attr("class","track-label").attr("x",-10).attr("y",n=>this.getTrackHeight(n)/2).attr("dy","0.35em").attr("text-anchor","end").text(n=>n.label)}drawTracks(){const t=this.currentTransform.rescaleX(this.x);if(this.xAxisGroup.call(be.axisBottom(t)),this.xAxisGroup.selectAll("text").attr("class","axis-label"),!this.trackGroups)return;const n=[];this.trackGroups.each((s,r,i)=>{const o=be.select(i[r]),l=this.getTrackYPosition(r),a=this.data.annotations.filter(g=>g.trackId===s.id),c=[...(this.data.primitives||[]).filter(g=>g.trackId===s.id).map(g=>({type:"primitive",data:g})),...a.map(g=>({type:"annotation",data:g}))],f=o.selectAll("g.element").data(c,g=>g.data.id).join(g=>g.append("g"),g=>g,g=>g.remove()).attr("id",g=>g.data.id).attr("class",g=>g.type==="primitive"?`element ${g.type} ${g.data.type} ${g.data.class}`:`element ${g.type} ${g.data.type} ${g.data.classes.join(" ")}`),h=this;f.each(function(g){const b=be.select(this);b.selectAll("*").remove(),g.type==="primitive"?h.renderPrimitive(b,g.data,t,s):h.renderAnnotation(b,g.data,t,s,n,l)})}),this.renderAllLabels(n,t)}renderAnnotation(t,n,s,r,i,o=0){const l=s(n.start),a=Math.max(1,s(n.end)-s(n.start)),u=this.getTrackHeight(r),c=n.heightFraction!==void 0?u*n.heightFraction:u/2,f=u-(n.fy!==void 0?n.fy*u:u/2);let h;switch(n.type){case"arrow":h=this.renderArrow(t,l,f,a,c,n.direction);break;case"circle":h=this.renderCircle(t,l,f,c);break;case"triangle":h=this.renderTriangle(t,l,f,c);break;case"pin":h=this.renderPin(t,l,f,c);break;case"box":default:h=this.renderBox(t,l,f,a,c,n.corner_radius||0);break}t.attr("data-label",n.label),h.attr("data-annotation-id",n.id).style("cursor","pointer").style("pointer-events","all"),n.fill&&h.style("fill",n.fill),n.stroke&&h.style("stroke",n.stroke),n.opacity!==void 0&&h.style("opacity",n.opacity),h.on("mouseover",g=>{this.isDragging||(h.classed("hovered",!0),this.clippedChart.selectAll(`.annotation-label-group[data-annotation-id="${n.id}"]`).style("display","block").select(".annotation-label-background").style("display",""),n.tooltip!==void 0&&this.showTooltip(g,n,r),this.config.onAnnotationHover(n,r,g))}).on("mouseout",()=>{h.classed("hovered",!1);const g=this.showAllAnnotationLabels;this.clippedChart.selectAll(`.annotation-label-group[data-annotation-id="${n.id}"]`).each(function(){const b=be.select(this),A=b.select(".annotation-label").attr("data-show-label");A==="hover"&&g?b.style("display",""):A==="hover"?b.style("display","none"):b.style("display",""),b.select(".annotation-label-background").style("display","none")}),this.hideTooltip()}).on("click",()=>{this.config.onAnnotationClick(n,r)}),i&&n.label&&n.showLabel!=="never"&&i.push({annotation:n,trackData:r,x:l,y:f,width:a,height:c,trackY:o})}renderPrimitive(t,n,s,r){const i=this.getTrackHeight(r);let o;switch(n.type){case"horizontal-line":o=this.renderHorizontalLine(t,n,s,i);break;case"background":o=this.renderBackground(t,n,s,i);break;default:return}o.attr("class",`primitive ${n.class}`),n.stroke?o.style("stroke",n.stroke):n.type==="horizontal-line"&&o.style("stroke","currentColor"),n.fill?o.style("fill",n.fill):n.type==="background"&&o.style("fill","none"),n.opacity!==void 0&&o.style("opacity",n.opacity)}renderHorizontalLine(t,n,s,r){const i=s.range();let o,l;n.start!==void 0&&n.end!==void 0?(o=s(n.start),l=s(n.end)):n.start!==void 0&&n.end===void 0?(o=s(n.start),l=i[1]):n.start===void 0&&n.end!==void 0?(o=i[0],l=s(n.end)):(o=i[0],l=i[1]);const a=r-(n.fy!==void 0?n.fy*r:r/2),u=Math.round(a)+.5;return t.append("line").attr("x1",o).attr("x2",l).attr("y1",u).attr("y2",u).style("stroke-width",1).style("shape-rendering","crispEdges")}renderBackground(t,n,s,r){const i=s.range();let o,l;return n.start!==void 0&&n.end!==void 0?(o=s(n.start),l=s(n.end)):n.start!==void 0&&n.end===void 0?(o=s(n.start),l=i[1]):n.start===void 0&&n.end!==void 0?(o=i[0],l=s(n.end)):(o=i[0],l=i[1]),t.append("rect").attr("x",o).attr("y",0).attr("width",l-o).attr("height",r)}renderBox(t,n,s,r,i,o=0){return t.append("rect").attr("x",n).attr("y",s-i/2).attr("width",r).attr("height",i).attr("rx",o).attr("ry",o)}renderArrow(t,n,s,r,i,o){const l=Math.min(r*.2,i*.5,8),a=r-l;let u;const c=s-i/2,f=s+i/2;if(o==="right")u=`
|
|
22
|
+
M ${n} ${c}
|
|
23
|
+
L ${n+a} ${c}
|
|
24
|
+
L ${n+r} ${s}
|
|
25
|
+
L ${n+a} ${f}
|
|
26
|
+
L ${n} ${f}
|
|
27
|
+
Z
|
|
28
|
+
`;else if(o==="left")u=`
|
|
29
|
+
M ${n} ${s}
|
|
30
|
+
L ${n+l} ${c}
|
|
31
|
+
L ${n+r} ${c}
|
|
32
|
+
L ${n+r} ${f}
|
|
33
|
+
L ${n+l} ${f}
|
|
34
|
+
Z
|
|
35
|
+
`;else{const h=Math.min(r*.1,i*.3,4);u=`
|
|
36
|
+
M ${n+h} ${c}
|
|
37
|
+
L ${n+r-h} ${c}
|
|
38
|
+
L ${n+r} ${s}
|
|
39
|
+
L ${n+r-h} ${f}
|
|
40
|
+
L ${n+h} ${f}
|
|
41
|
+
L ${n} ${s}
|
|
42
|
+
Z
|
|
43
|
+
`}return t.append("path").attr("d",u)}renderCircle(t,n,s,r){return t.append("circle").attr("cx",n).attr("cy",s).attr("r",r/2).attr("class","annotation-marker")}renderTriangle(t,n,s,r=.5){const i=r*.8,o=[[n-i/2,s+r],[n,s],[n+i/2,s+r]].map(l=>l.join(",")).join(" ");return t.append("polygon").attr("points",o).attr("class","annotation-triangle")}renderPin(t,n,s,r){const i=t.append("g").attr("class","annotation-pin");return i.append("line").attr("x1",n).attr("y1",s).attr("x2",n).attr("y2",s-r).attr("stroke","black").attr("class","annotation-pin-line"),i.append("circle").attr("cx",n).attr("cy",s-r).attr("r",3).attr("class","annotation-pin-head"),i}renderAnnotationLabel(t,n,s,r,i,o){const l=n.showLabel||"hover";if(!n.label)return;const a=n.labelPosition||"above";let u,c,f="middle";n.type==="circle"||n.type==="triangle"||n.type==="pin"?(u=s,a==="above"?n.type==="pin"?c=r-o-8:c=r-o/2-2:c=r):(u=s+i/2,a==="above"?c=r-o/2-8:c=r);const h=t.append("text").attr("x",u).attr("y",c).attr("dy","0.35em").attr("text-anchor",f).attr("class","annotation-label").attr("data-annotation-id",n.id).attr("data-show-label",l).style("fill","currentColor").text(n.label);if(l==="hover"){const g=h.node();if(g&&typeof g.getBBox=="function")try{const b=g.getBBox(),v=0;t.insert("rect","text").attr("x",b.x-v).attr("y",b.y-v).attr("width",b.width+v*2).attr("height",b.height+v*2).attr("rx",2).attr("ry",2).attr("class","annotation-label-background").style("fill","white").style("opacity","0.8").style("display","none")}catch{}}l==="always"?t.style("display",""):l==="never"?t.style("display","none"):t.style("display",this.showAllAnnotationLabels?"":"none")}renderAllLabels(t,n){let s=this.clippedChart.select(".annotation-labels-layer");s.empty()&&(s=this.clippedChart.append("g").attr("class","annotation-labels-layer"));const r=s.selectAll(".annotation-label-group").data(t,o=>o.annotation.id).join(o=>o.append("g"),o=>o,o=>o.remove()).attr("class",o=>`annotation-label-group ${o.annotation.classes.join(" ")}`).attr("data-annotation-id",o=>o.annotation.id).attr("transform",o=>`translate(0, ${o.trackY})`).style("pointer-events","none"),i=this;r.each(function(o){const l=be.select(this);l.selectAll("*").remove(),i.renderAnnotationLabel(l,o.annotation,o.x,o.y,o.width,o.height)})}showTooltip(t,n,s){const r=n.tooltip!==void 0?n.tooltip:`<strong>${n.label}</strong><br/>Start: ${n.start}<br/>End: ${n.end}<br/>Track: ${s.label}`;this.tooltip.style("display","block").style("left",`${t.pageX+10}px`).style("top",`${t.pageY-10}px`).html(r)}hideTooltip(){this.tooltip.style("display","none")}calculateRequiredLeftMargin(){if(!this.showTrackLabels)return this.originalLeftMargin;if(this.data.tracks.length===0)return this.originalLeftMargin;const t=this.svg.append("text").attr("class","track-label").style("visibility","hidden");let n=0;return this.data.tracks.forEach(r=>{t.text(r.label);const i=t.node();if(i&&typeof i.getBBox=="function")try{const o=i.getBBox();n=Math.max(n,o.width)}catch{n=Math.max(n,r.label.length*8)}else n=Math.max(n,r.label.length*8)}),t.remove(),Math.max(this.originalLeftMargin,n+20)}updateMarginAndLayout(){const t=this.calculateRequiredLeftMargin();if(Math.abs(this.config.margin.left-t)>5){this.config.margin.left=t,this.chart.attr("transform",`translate(${this.config.margin.left},${this.config.margin.top})`),this.x.range([0,this.config.width-this.config.margin.left-this.config.margin.right]);const n=this.config.width-this.config.margin.left-this.config.margin.right;this.svg.select("clipPath rect").attr("width",n),this.clippedChart.select(".chart-background").attr("width",n)}}setData(t){this.data={tracks:t.tracks,annotations:t.annotations,primitives:t.primitives||[]},this.updateMarginAndLayout(),this.updateHeight(),this.createTrackGroups(),this.drawTracks()}addTrack(t,n,s){this.data.tracks.push(t),n&&this.data.annotations.push(...n),s&&(this.data.primitives||(this.data.primitives=[]),this.data.primitives.push(...s)),this.updateMarginAndLayout(),this.updateHeight(),this.createTrackGroups(),this.drawTracks()}removeTrack(t){this.data.tracks=this.data.tracks.filter(n=>n.id!==t),this.data.annotations=this.data.annotations.filter(n=>n.trackId!==t),this.data.primitives=(this.data.primitives||[]).filter(n=>n.trackId!==t),this.updateMarginAndLayout(),this.updateHeight(),this.createTrackGroups(),this.drawTracks()}addAnnotation(t){this.data.annotations.push(t),this.drawTracks()}removeAnnotation(t){this.data.annotations=this.data.annotations.filter(n=>n.id!==t),this.drawTracks()}addPrimitive(t){this.data.primitives||(this.data.primitives=[]),this.data.primitives.push(t),this.drawTracks()}removePrimitive(t){this.data.primitives&&(this.data.primitives=this.data.primitives.filter(n=>n.id!==t),this.drawTracks())}updateDomain(t){this.config.domain=t,this.x.domain(t),this.drawTracks()}zoomTo(t,n){const r=(this.config.width-this.config.margin.left-this.config.margin.right)/(this.x(n)-this.x(t)),i=-this.x(t)*r,o=be.zoomIdentity.translate(i,0).scale(r);this.svg.transition().duration(750).call(this.zoom.transform,o)}resetZoom(){this.svg.transition().duration(750).call(this.zoom.transform,be.zoomIdentity)}destroy(){var t;this.resizeObserver&&this.resizeObserver.disconnect(),(t=this.contextMenuController)==null||t.destroy(),this.tooltip.remove(),this.svg.remove()}getConfig(){return{...this.config}}getData(){return{tracks:[...this.data.tracks],annotations:[...this.data.annotations],primitives:this.data.primitives?[...this.data.primitives]:[]}}resize(){if(!this.isResponsiveWidth)return;const t=this.calculateResponsiveWidth();if(Math.abs(this.config.width-t)>10){this.config.width=t,this.svg.attr("width",t),this.x.range([0,t-this.config.margin.left-this.config.margin.right]);const n=t-this.config.margin.left-this.config.margin.right;this.svg.select("clipPath rect").attr("width",n),this.clippedChart.select(".chart-background").attr("width",n);const s=this.config.height-this.config.margin.top-this.config.margin.bottom;this.zoom.translateExtent([[0,0],[n,s]]).extent([[0,0],[n,s]]),this.drawTracks()}}};Ft.LABEL_PADDING=24;let os=Ft;const Rt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Dc={name:"SimpleTable",props:{rows:{type:Array,required:!0,validator:e=>e.every(t=>Array.isArray(t))}},setup(e){const t=de(null),n=de("asc"),s=je(()=>e.rows[0]||[]),r=je(()=>e.rows.slice(1)),i=l=>{t.value===l?n.value==="asc"?n.value="desc":(t.value=null,n.value="asc"):(t.value=l,n.value="asc")},o=je(()=>t.value===null?r.value:[...r.value].sort((l,a)=>{const u=l[t.value],c=a[t.value];if(u===""||u===null||u===void 0)return 1;if(c===""||c===null||c===void 0)return-1;const f=parseFloat(String(u).replace(/[%,]/g,"")),h=parseFloat(String(c).replace(/[%,]/g,""));let g=0;return!isNaN(f)&&!isNaN(h)?g=f-h:g=String(u).localeCompare(String(c)),n.value==="asc"?g:-g}));return{headers:s,sortColumn:t,sortDirection:n,sortedDataRows:o,toggleSort:i}}},Nc={class:"simple-table"},jc=["onClick"],Bc={key:0,class:"sort-indicator"};function $c(e,t,n,s,r,i){return N(),B("table",Nc,[P("thead",null,[P("tr",null,[(N(!0),B(we,null,Qe(s.headers,(o,l)=>(N(),B("th",{key:l,onClick:a=>s.toggleSort(l),class:Ct({sortable:!0,sorted:s.sortColumn===l,"sort-asc":s.sortColumn===l&&s.sortDirection==="asc","sort-desc":s.sortColumn===l&&s.sortDirection==="desc"})},[vt(te(o)+" ",1),s.sortColumn===l?(N(),B("span",Bc,te(s.sortDirection==="asc"?"▲":"▼"),1)):ye("",!0)],10,jc))),128))])]),P("tbody",null,[(N(!0),B(we,null,Qe(s.sortedDataRows,(o,l)=>(N(),B("tr",{key:l},[(N(!0),B(we,null,Qe(o,(a,u)=>(N(),B("td",{key:u},te(a),1))),128))]))),128))])])}const ar=Rt(Dc,[["render",$c],["__scopeId","data-v-3dcf836d"]]),Hc={name:"SortableTable",props:{headers:{type:Array,required:!0},rows:{type:Array,required:!0},initialSortColumn:{type:Number,default:null},initialSortDirection:{type:String,default:"asc",validator:e=>["asc","desc"].includes(e)}},setup(e){const t=de(e.initialSortColumn),n=de(e.initialSortDirection),s=i=>{t.value===i?n.value==="asc"?n.value="desc":(t.value=null,n.value="asc"):(t.value=i,n.value="asc")},r=je(()=>t.value===null?e.rows:[...e.rows].sort((i,o)=>{var b,v;const l=i[t.value],a=o[t.value],u=typeof l=="object"&&l!==null?l.children||((b=l.props)==null?void 0:b.children)||"":l,c=typeof a=="object"&&a!==null?a.children||((v=a.props)==null?void 0:v.children)||"":a;if(u===""||u===null||u===void 0)return 1;if(c===""||c===null||c===void 0)return-1;const f=parseFloat(String(u).replace(/[%,]/g,"")),h=parseFloat(String(c).replace(/[%,]/g,""));let g=0;return!isNaN(f)&&!isNaN(h)?g=f-h:g=String(u).localeCompare(String(c)),n.value==="asc"?g:-g}));return{sortColumn:t,sortDirection:n,sortedRows:r,toggleSort:s}}},Uc={class:"sortable-table"},qc=["onClick"],Vc={key:0,class:"sort-indicator"};function zc(e,t,n,s,r,i){return N(),B("table",Uc,[P("thead",null,[P("tr",null,[(N(!0),B(we,null,Qe(n.headers,(o,l)=>(N(),B("th",{key:l,onClick:a=>s.toggleSort(l),class:Ct({sortable:!0,sorted:s.sortColumn===l,"sort-asc":s.sortColumn===l&&s.sortDirection==="asc","sort-desc":s.sortColumn===l&&s.sortDirection==="desc"})},[vt(te(o.label)+" ",1),s.sortColumn===l?(N(),B("span",Vc,te(s.sortDirection==="asc"?"▲":"▼"),1)):ye("",!0)],10,qc))),128))])]),P("tbody",null,[(N(!0),B(we,null,Qe(s.sortedRows,(o,l)=>(N(),B("tr",{key:l},[(N(!0),B(we,null,Qe(o,(a,u)=>{var c;return N(),B("td",{key:u,class:Ct((c=n.headers[u])==null?void 0:c.cellClass)},[typeof a=="object"&&a!==null?(N(),qt(hi(a),{key:0})):(N(),B(we,{key:1},[vt(te(a),1)],64))],2)}),128))]))),128))])])}const Wc={name:"FeatureDetails",components:{SimpleTable:ar,SortableTable:Rt(Hc,[["render",zc],["__scopeId","data-v-b8895c87"]])},props:{feature:{type:Object,default:null},allFeatures:{type:Array,default:()=>[]},dataProvider:{type:Object,default:null},recordInfo:{type:Object,default:null},regionNumber:{type:String,default:"1"}},emits:["close"],setup(e){const t=de([]),n=de(!1),s=de(null),r=async()=>{var C,L,J;if(t.value=[],n.value=!1,s.value=null,!e.feature||e.feature.type!=="CDS"||!e.dataProvider||!e.recordInfo)return;const R=(L=(C=e.feature.qualifiers)==null?void 0:C.locus_tag)==null?void 0:L[0];if(R){n.value=!0;try{const se=await e.dataProvider.getMiBIGEntries(e.recordInfo.recordId,R,e.regionNumber);t.value=se.entries||[]}catch(se){((J=se.response)==null?void 0:J.status)===404?t.value=[]:(console.error("Error fetching MiBIG entries:",se),s.value="Failed to load MiBIG entries")}finally{n.value=!1}}};Je(()=>e.feature,()=>{r()},{immediate:!0});const i=je(()=>{var C,L,J,se;if(!e.feature||e.feature.type!=="CDS")return[];if(!e.allFeatures||e.allFeatures.length===0)return[];const R=((L=(C=e.feature.qualifiers)==null?void 0:C.locus_tag)==null?void 0:L[0])||((se=(J=e.feature.qualifiers)==null?void 0:J.gene)==null?void 0:se[0]);return R?e.allFeatures.filter(ce=>{var ie,ee,Q,Z;return ce.type==="PFAM_domain"&&(((ee=(ie=ce.qualifiers)==null?void 0:ie.locus_tag)==null?void 0:ee[0])===R||((Z=(Q=ce.qualifiers)==null?void 0:Q.gene)==null?void 0:Z[0])===R)}).map(ce=>{var ie,ee,Q,Z,m,w,D,M,U,ue,Ve,et,ut;return{id:((Q=(ee=(ie=ce.qualifiers)==null?void 0:ie.db_xref)==null?void 0:ee[0])==null?void 0:Q.replace("PFAM:",""))||((D=(w=(m=(Z=ce.qualifiers)==null?void 0:Z.inference)==null?void 0:m[0])==null?void 0:w.match(/PFAM:([^,\s]+)/))==null?void 0:D[1])||"Unknown",description:((U=(M=ce.qualifiers)==null?void 0:M.description)==null?void 0:U[0])||"",location:l(ce.qualifiers),score:((Ve=(ue=ce.qualifiers)==null?void 0:ue.score)==null?void 0:Ve[0])||"",evalue:((ut=(et=ce.qualifiers)==null?void 0:et.evalue)==null?void 0:ut[0])||""}}):[]}),o=je(()=>{if(!e.feature)return[];const R=[],C=e.feature.qualifiers||{};return C.go_function&&R.push(...C.go_function),C.go_process&&R.push(...C.go_process),C.go_component&&R.push(...C.go_component),R}),l=R=>{var J,se;if(!R)return"";const C=(J=R.protein_start)==null?void 0:J[0],L=(se=R.protein_end)==null?void 0:se[0];return C&&L?`[${C}:${L}]`:""},a=R=>{if(!R)return"";const C=R.match(/\[<?(\d+):>?(\d+)\](?:\(([+-])\))?/);if(!C)return R;const L=parseInt(C[1]),J=parseInt(C[2]),se=C[3]||"",ce=J-L;return`${L.toLocaleString()} - ${J.toLocaleString()}${se?", "+se:""} (total: ${ce.toLocaleString()} nt)`},u=()=>{var ce,ie,ee,Q,Z,m;if(!e.feature)return"";const R=e.feature.qualifiers||{},C=((ce=R.locus_tag)==null?void 0:ce[0])||"",L=((ie=R.product)==null?void 0:ie[0])||"",J=((ee=R.gene)==null?void 0:ee[0])||"",se=((Q=R.description)==null?void 0:Q[0])||"";if(e.feature.type==="CDS"){if(C&&L)return`${C} - ${L}`;if(C)return C;if(J)return J;if(L)return L}if(e.feature.type==="PFAM_domain"){const w=((m=(Z=R.db_xref)==null?void 0:Z[0])==null?void 0:m.replace("PFAM:",""))||"PFAM domain";return se?`${w} - ${se}`:w}return se||L||e.feature.type||"Feature Details"},c=R=>R.split("_").map((L,J)=>J===0?L.charAt(0).toUpperCase()+L.slice(1):L).join(" "),f=R=>Array.isArray(R)?R.join(", "):R,h=()=>{if(!e.feature||!e.feature.qualifiers)return!1;const R=["locus_tag","protein_id","gene","product","gene_kind","translation","nucleotide","go_function","go_process","go_component"];return Object.keys(e.feature.qualifiers).filter(L=>!R.includes(L)).length>0},g=()=>{if(!e.feature||!e.feature.qualifiers)return{};const R=["locus_tag","protein_id","gene","product","gene_kind","translation","nucleotide","go_function","go_process","go_component"],C={};return Object.keys(e.feature.qualifiers).forEach(L=>{R.includes(L)||(C[L]=e.feature.qualifiers[L])}),C},b=R=>{if(!R)return"";const C=[];for(let L=0;L<R.length;L+=60)C.push(R.slice(L,L+60));return C.join(`
|
|
44
|
+
`)},v=async(R,C)=>{try{await navigator.clipboard.writeText(R),alert(`${C} sequence copied to clipboard!`)}catch(L){console.error("Failed to copy to clipboard:",L),alert("Failed to copy to clipboard")}},A=(R,C)=>({NRPS_PKS:$,sec_met_domain:H}[R]||W)(C),$=R=>{const C=R.map(ie=>{const ee=ie.split(/\.\s+/);if(ee.length===0)return{domain:ie};const Z={domain:ee[0].replace(/^Domain:\s*/,"").trim()};return ee.slice(1).forEach(m=>{const w=m.indexOf(":");if(w>-1){const D=m.substring(0,w).trim(),M=m.substring(w+1).trim();Z[D]=M}}),Z}),L=C[0]||{},J=Object.keys(L).filter(ie=>ie!=="domain"),ce=[["",...J],...C.map(ie=>{const ee=[ie.domain||""];return J.forEach(Q=>{ee.push(ie[Q]||"")}),ee})];return yn(ar,{rows:ce})},H=R=>{const C=R.map(ie=>{const ee=ie.match(/^([^(]+)\s*\(([^)]+)\)/);if(!ee)return{name:ie};const Q=ee[1].trim(),Z=ee[2],m={name:Q};return Z.split(/,\s*/).forEach(D=>{const M=D.indexOf(":");if(M>-1){const U=D.substring(0,M).trim(),ue=D.substring(M+1).trim();m[U]=ue}}),m}),L=C[0]||{},J=Object.keys(L).filter(ie=>ie!=="name"),ce=[["",...J],...C.map(ie=>{const ee=[ie.name||""];return J.forEach(Q=>{ee.push(ie[Q]||"")}),ee})];return yn(ar,{rows:ce})},W=R=>{const C=R.map((L,J)=>yn("li",{key:J},L));return yn("ul",{class:"qualifier-list"},C)},j=R=>typeof R=="number"?R.toExponential(2):R,K=[{label:"Domain",cellClass:"pfam-id"},{label:"Description",cellClass:"pfam-description"},{label:"Location",cellClass:"pfam-location"},{label:"Score",cellClass:"pfam-score"},{label:"E-value",cellClass:"pfam-evalue"}],ae=je(()=>i.value.map(R=>[R.id,R.description,R.location,R.score,R.evalue])),he=[{label:"MIBiG Protein",cellClass:"mibig-protein"},{label:"Description",cellClass:"mibig-description"},{label:"MIBiG Cluster",cellClass:"mibig-cluster"},{label:"Product",cellClass:"mibig-product"},{label:"% ID",cellClass:"mibig-percent"},{label:"BLAST Score",cellClass:"mibig-score"},{label:"% Coverage",cellClass:"mibig-percent"},{label:"E-value",cellClass:"mibig-evalue"}],Se=je(()=>t.value.map(R=>[R.mibig_protein,R.description,yn("a",{href:`https://mibig.secondarymetabolites.org/go/${R.mibig_cluster}`,target:"_blank",rel:"noopener noreferrer"},R.mibig_cluster),R.mibig_product,`${parseFloat(R.percent_identity).toFixed(1)}%`,parseFloat(R.blast_score).toFixed(1),`${parseFloat(R.percent_coverage).toFixed(1)}%`,j(R.evalue)]));return{pfamDomains:i,goTerms:o,mibigEntries:t,mibigLoading:n,mibigError:s,formatLocation:a,getFeatureTitle:u,formatQualifierKey:c,formatQualifierValue:f,hasAdditionalQualifiers:h,getAdditionalQualifiers:g,formatSequence:b,copyToClipboard:v,renderQualifierValue:A,formatEvalue:j,pfamTableHeaders:K,pfamTableRows:ae,mibigTableHeaders:he,mibigTableRows:Se}}},Kc={key:0,class:"feature-details"},Gc={class:"feature-content"},Jc={class:"feature-header"},Xc={class:"info-section"},Yc={key:0,class:"info-row"},Qc={class:"info-value"},Zc={key:1,class:"info-row"},eu={class:"info-value"},tu={key:2,class:"info-row"},nu={class:"info-value"},su={key:3,class:"info-row"},ru={class:"info-value"},iu={key:4,class:"info-row"},ou={class:"info-value"},lu={key:5,class:"info-row"},au={class:"info-value"},cu={class:"info-label"},uu={class:"info-value"},fu={key:0,class:"expandable-list"},du={class:"expanded-content"},hu={key:6,class:"info-row"},pu={class:"info-value"},gu={class:"expandable-list"},mu={class:"expanded-content"},yu={key:7,class:"info-row"},bu={class:"info-value"},_u={class:"expandable-list"},wu={class:"expanded-content"},vu={key:8,class:"info-row"},xu={class:"info-value"},Su={class:"expandable-list"},Cu={class:"expanded-content"},Tu={class:"go-term-list"},Eu={key:0,class:"info-section sequences"},Au={key:0,class:"info-row"},ku={class:"info-value"},Ru={class:"expandable-list"},Ou={class:"expanded-content"},Pu={class:"sequence-text"},Lu={key:1,class:"sequence-block"},Fu={class:"sequence-header"},Mu={class:"sequence-text"},Iu={key:1,class:"no-selection"};function Du(e,t,n,s,r,i){var l,a,u,c,f,h,g,b,v,A,$,H,W,j;const o=cn("SortableTable");return n.feature?(N(),B("div",Kc,[P("div",Gc,[P("div",Jc,[P("h3",null,te(n.feature.type),1)]),P("div",Xc,[(a=(l=n.feature.qualifiers)==null?void 0:l.locus_tag)!=null&&a[0]?(N(),B("div",Yc,[t[2]||(t[2]=P("span",{class:"info-label"},"Locus tag",-1)),P("span",Qc,te(n.feature.qualifiers.locus_tag[0]),1)])):ye("",!0),(c=(u=n.feature.qualifiers)==null?void 0:u.protein_id)!=null&&c[0]?(N(),B("div",Zc,[t[3]||(t[3]=P("span",{class:"info-label"},"Protein ID",-1)),P("span",eu,te(n.feature.qualifiers.protein_id[0]),1)])):ye("",!0),(h=(f=n.feature.qualifiers)==null?void 0:f.gene)!=null&&h[0]?(N(),B("div",tu,[t[4]||(t[4]=P("span",{class:"info-label"},"Gene",-1)),P("span",nu,te(n.feature.qualifiers.gene[0]),1)])):ye("",!0),(b=(g=n.feature.qualifiers)==null?void 0:g.product)!=null&&b[0]?(N(),B("div",su,[t[5]||(t[5]=P("span",{class:"info-label"},"Product",-1)),P("span",ru,te(n.feature.qualifiers.product[0]),1)])):ye("",!0),n.feature.location?(N(),B("div",iu,[t[6]||(t[6]=P("span",{class:"info-label"},"Location",-1)),P("span",ou,te(s.formatLocation(n.feature.location)),1)])):ye("",!0),(A=(v=n.feature.qualifiers)==null?void 0:v.gene_kind)!=null&&A[0]?(N(),B("div",lu,[t[7]||(t[7]=P("span",{class:"info-label"},"Gene kind",-1)),P("span",au,te(n.feature.qualifiers.gene_kind[0]),1)])):ye("",!0),(N(!0),B(we,null,Qe(s.getAdditionalQualifiers(),(K,ae)=>(N(),B("div",{key:ae,class:"info-row"},[P("span",cu,te(s.formatQualifierKey(ae)),1),P("span",uu,[Array.isArray(K)&&K.length>1?(N(),B("details",fu,[P("summary",null,te(K.length)+" items",1),P("div",du,[(N(),qt(hi(s.renderQualifierValue(ae,K))))])])):(N(),B(we,{key:1},[vt(te(s.formatQualifierValue(K)),1)],64))])]))),128)),s.pfamDomains.length>0?(N(),B("div",hu,[t[8]||(t[8]=P("span",{class:"info-label"},"Pfam hits",-1)),P("span",pu,[P("details",gu,[P("summary",null,te(s.pfamDomains.length)+" items",1),P("div",mu,[Ee(o,{headers:s.pfamTableHeaders,rows:s.pfamTableRows},null,8,["headers","rows"])])])])])):ye("",!0),n.feature.type==="CDS"&&s.mibigEntries.length>0?(N(),B("div",yu,[t[9]||(t[9]=P("span",{class:"info-label"},"MiBIG hits",-1)),P("span",bu,[P("details",_u,[P("summary",null,te(s.mibigEntries.length)+" items",1),P("div",wu,[Ee(o,{headers:s.mibigTableHeaders,rows:s.mibigTableRows},null,8,["headers","rows"])])])])])):ye("",!0),s.goTerms.length>0?(N(),B("div",vu,[t[10]||(t[10]=P("span",{class:"info-label"},"GO terms",-1)),P("span",xu,[P("details",Su,[P("summary",null,te(s.goTerms.length)+" items",1),P("div",Cu,[P("ul",Tu,[(N(!0),B(we,null,Qe(s.goTerms,(K,ae)=>(N(),B("li",{key:ae,class:"go-term"},te(K),1))),128))])])])])])):ye("",!0)]),n.feature.type==="CDS"?(N(),B("div",Eu,[(H=($=n.feature.qualifiers)==null?void 0:$.translation)!=null&&H[0]?(N(),B("div",Au,[t[12]||(t[12]=P("span",{class:"info-label"},"AA sequence",-1)),P("span",ku,[P("details",Ru,[P("summary",null,[t[11]||(t[11]=vt(" Show sequence ",-1)),P("button",{onClick:t[0]||(t[0]=po(K=>s.copyToClipboard(n.feature.qualifiers.translation[0],"amino acid"),["stop"])),class:"copy-button copy-button-inline"}," Copy to clipboard ")]),P("div",Ou,[P("pre",Pu,te(s.formatSequence(n.feature.qualifiers.translation[0])),1)])])])])):ye("",!0),(j=(W=n.feature.qualifiers)==null?void 0:W.nucleotide)!=null&&j[0]?(N(),B("div",Lu,[P("div",Fu,[t[13]||(t[13]=P("span",{class:"sequence-label"},"Nucleotide sequence",-1)),P("button",{onClick:t[1]||(t[1]=K=>s.copyToClipboard(n.feature.qualifiers.nucleotide[0],"nucleotide")),class:"copy-button"}," Copy to clipboard ")]),P("pre",Mu,te(s.formatSequence(n.feature.qualifiers.nucleotide[0])),1)])):ye("",!0)])):ye("",!0)])])):(N(),B("div",Iu,t[14]||(t[14]=[P("p",null,"Click on a feature to view details",-1)])))}const Nu=Rt(Wc,[["render",Du],["__scopeId","data-v-76c471aa"]]),ju={name:"SimpleDetails",props:{data:{type:Object,default:null},elementType:{type:String,default:""}},setup(e){const t=je(()=>{if(!e.data)return{};const i={},o=["_elementType"];return Object.keys(e.data).forEach(l=>{o.includes(l)||(i[l]=e.data[l])}),i}),n=je(()=>{if(!e.data)return[];const i=["_elementType"];return Object.keys(e.data).filter(o=>!i.includes(o))});return{displayData:t,displayKeys:n,formatLabel:i=>{const o=i.replace(/_/g," ").replace(/([A-Z])/g," $1").split(" ").filter(l=>l.length>0);return o.length===0?"":o[0].charAt(0).toUpperCase()+o[0].slice(1).toLowerCase()+(o.length>1?" "+o.slice(1).map(l=>l.toLowerCase()).join(" "):"")},formatValue:(i,o)=>o==null?"N/A":typeof o=="number"?i.toLowerCase().includes("evalue")&&o<.01?o.toExponential(2):i.toLowerCase().includes("score")||i.toLowerCase().includes("bitscore")?o.toFixed(1):i.toLowerCase().includes("percent")||i.toLowerCase().includes("identity")||i.toLowerCase().includes("coverage")?`${o.toFixed(1)}%`:o.toLocaleString():Array.isArray(o)?o.length===0?"None":o.length===1?String(o[0]):o.join(", "):typeof o=="boolean"?o?"Yes":"No":typeof o=="object"?JSON.stringify(o,null,2):String(o)}}},Bu={key:0,class:"simple-details"},$u={key:0,class:"details-header"},Hu={class:"details-content"},Uu={class:"info-section"},qu={class:"info-label"},Vu={class:"info-value"},zu={key:1,class:"no-selection"};function Wu(e,t,n,s,r,i){return n.data?(N(),B("div",Bu,[n.elementType?(N(),B("div",$u,[P("h3",null,te(n.elementType),1)])):ye("",!0),P("div",Hu,[P("div",Uu,[(N(!0),B(we,null,Qe(s.displayKeys,o=>(N(),B("div",{key:o,class:"info-row"},[P("span",qu,te(s.formatLabel(o)),1),P("span",Vu,te(s.formatValue(o,s.displayData[o])),1)]))),128))])])])):(N(),B("div",zu,t[0]||(t[0]=[P("p",null,"Click on an element to view details",-1)])))}const Ku={name:"RegionViewerComponent",components:{FeatureDetails:Nu,SimpleDetails:Rt(ju,[["render",Wu],["__scopeId","data-v-6d8f9976"]])},props:{recordInfo:{type:Object,default:null},regions:{type:Array,default:()=>[]},features:{type:Array,default:()=>[]},regionBoundaries:{type:Object,default:null},pfamColorMap:{type:Object,default:()=>({})},selectedRegionId:{type:String,default:""},dataProvider:{type:Object,default:null},tfbsHits:{type:Array,default:()=>[]},ttaCodons:{type:Array,default:()=>[]},resistanceFeatures:{type:Array,default:()=>[]}},emits:["region-changed","annotation-clicked","annotation-hovered","error"],setup(e,{emit:t,expose:n}){const s=de(null),r=de(""),i=de(!1),o=de(""),l=de([]),a=de([]),u=de(!1),c=je(()=>{if(!r.value||!e.regions.length)return"1";const m=e.regions.find(w=>w.id===r.value);return m?String(m.region_number):"1"});let f=null,h={};const g=de(null),b=je(()=>{var m;return((m=g.value)==null?void 0:m.data)||null});Je(()=>e.features,()=>{e.features&&e.features.length>0&&v()}),Je(()=>e.tfbsHits,()=>{e.features&&e.features.length>0&&v()}),Je(()=>e.ttaCodons,()=>{e.features&&e.features.length>0&&v()}),Je(()=>e.resistanceFeatures,()=>{e.features&&e.features.length>0&&v()}),Je(()=>e.selectedRegionId,m=>{r.value=m},{immediate:!0}),Vs(()=>{document.addEventListener("click",se),e.features&&e.features.length>0&&v()}),zs(()=>{document.removeEventListener("click",se),f&&(f.destroy(),f=null)});const v=async()=>{try{if(o.value="",!e.features||e.features.length===0){console.warn("No features provided");return}console.log("Building viewer with",e.features.length,"features"),g.value=null,ae(),console.log("Built tracks:",Object.keys(h));const m=Object.values(h).map(w=>({id:w.id,label:w.label,annotationCount:w.annotations.length}));C(m),l.value=m,e.regionBoundaries?a.value=m.filter(w=>["CDS"].includes(w.id)||w.id.includes("protocluster")||w.id.includes("PFAM_domain")||w.id.includes("cand_cluster")).map(w=>w.id):a.value=m.map(w=>w.id),console.log("Available tracks:",l.value),console.log("Selected tracks:",a.value),await Wn(),console.log("Initializing viewer..."),$(),he(),console.log("Viewer initialized and updated")}catch(m){console.error("Error in rebuildViewer:",m),o.value=`Failed to build viewer: ${m.message}`,t("error",m)}},A=()=>{t("region-changed",r.value)},$=()=>{if(f&&f.destroy(),!s.value)return;let m,w,D;if(e.regionBoundaries)m=e.regionBoundaries.start,w=e.regionBoundaries.end,D=(w-m)*.02,console.log("Using region boundaries:",m,"-",w);else{console.log("Calculating boundaries from",e.features.length,"features");const M=e.features.filter(U=>U.location).map(U=>{const ue=U.location.match(/\[<?(\d+):>?(\d+)\]/);return ue?[parseInt(ue[1]),parseInt(ue[2])]:null}).filter(Boolean).flat();console.log("Extracted positions:",M.slice(0,10),M.length>10?`... (${M.length} total)`:""),M.length===0?(console.warn("No valid positions found, using default domain"),m=0,w=1e3):(m=Math.min(...M),w=Math.max(...M)),D=(w-m)*.02,console.log("Calculated domain:",m-D,"to",w+D)}console.log("Creating TrackViewer..."),f=new os({container:s.value,height:400,domain:[m-D,w+D],trackHeight:40,showTrackLabels:!1,onAnnotationClick:(M,U)=>{console.log("Clicked annotation:",M,"on track:",U),ce(M),t("annotation-clicked",{annotation:M,track:U})},onAnnotationHover:(M,U,ue)=>{t("annotation-hovered",{annotation:M,track:U,event:ue})},onBackgroundClick:()=>{g.value=null,Q(),he()}}),console.log("TrackViewer created successfully")},H=(m,w,D)=>{h[m]||(h[m]={id:m,label:w,height:D,annotations:[],primitives:[]},m==="CDS"&&h[m].primitives.push({id:"cds-baseline",trackId:m,type:"horizontal-line",class:"cds-baseline",fy:.5,stroke:"black",opacity:1}))},W=m=>{if(!m)return null;const w=m.match(/\[<?(\d+):>?(\d+)\](?:\(([+-])\))?/);if(!w)return null;const D=w[3]||null;return{start:parseInt(w[1]),end:parseInt(w[2]),strand:D,direction:D==="+"?"right":D==="-"?"left":"none"}},j=m=>m.toLowerCase().replace("_"," "),K=m=>m.toLowerCase().replace(/[^a-z0-9]+/g,"-"),ae=()=>{if(h={},e.features.forEach(m=>{var ue,Ve,et,ut,Gt,En,St,vr,d,p,_,T,x,S,F,O,k,E,V,I,q,G,ne,fe,oe,Ae,ke,ze,We;if(!m.location)return;const w=W(m.location);if(!w){console.warn("Failed to parse location for feature:",m.type,m.location);return}const D=[];D.push(Se(m.type));let M,U;switch(m.type){case"cand_cluster":if((((Ve=(ue=m.qualifiers)==null?void 0:ue.protoclusters)==null?void 0:Ve.length)||1)<2)break;const ft=((ut=(et=m.qualifiers)==null?void 0:et.candidate_cluster_number)==null?void 0:ut[0])||"unknown",An=((En=(Gt=m.qualifiers)==null?void 0:Gt.kind)==null?void 0:En[0])||"unknown";M=`cand_cluster-${ft}`,U=`Candidate Cluster ${ft}`,D.push(`candidate-${K(An)}`),H(M,U),h[M].annotations.push({id:`${m.type}-${ft}`,trackId:M,type:"box",heightFraction:.4,classes:D,label:`CC ${ft}: ${j(An)}`,labelPosition:"center",showLabel:"always",start:w.start,end:w.end,data:m});break;case"PFAM_domain":M=m.type,U=m.type,H(M,U);const Le=((d=(vr=(St=m.qualifiers)==null?void 0:St.db_xref)==null?void 0:vr[0])==null?void 0:d.replace("PFAM:",""))||((x=(T=(_=(p=m.qualifiers)==null?void 0:p.inference)==null?void 0:_[0])==null?void 0:T.match(/PFAM:([^,\s]+)/))==null?void 0:x[1])||((k=(O=(F=(S=m.qualifiers)==null?void 0:S.note)==null?void 0:F[0])==null?void 0:O.match(/PF\d+/))==null?void 0:k[0]),[De,xr]=Le?Le.split("."):["",""],kn=De&&e.pfamColorMap[De]?e.pfamColorMap[De]:null,Kd=((V=(E=m.qualifiers)==null?void 0:E.description)==null?void 0:V[0])||"",Gd=`${De} ${Kd}`.trim(),Jd={id:`${m.type}-${w.start}-${w.end}`,trackId:M,type:"box",classes:D,label:Gd||"unknown",start:w.start,end:w.end,fill:kn,stroke:kn,data:m};h[M].annotations.push(Jd);break;case"CDS":M=m.type,U=m.type,D.push(`gene-type-${((q=(I=m.qualifiers)==null?void 0:I.gene_kind)==null?void 0:q[0])||"other"}`),H(M,U),h[M].annotations.push({id:`${m.type}-${w.start}-${w.end}`,trackId:M,type:"arrow",classes:D,label:R(m),start:w.start,end:w.end,direction:w.direction,stroke:"black",data:m});break;case"protocluster":const bs=((ne=(G=m.qualifiers)==null?void 0:G.protocluster_number)==null?void 0:ne[0])||"unknown",Xd=((oe=(fe=m.qualifiers)==null?void 0:fe.category)==null?void 0:oe[0])||"unknown",Yd=((ke=(Ae=m.qualifiers)==null?void 0:Ae.product)==null?void 0:ke[0])||"unknown";D.push(Xd),D.push(Yd);const Sr=W(((We=(ze=m.qualifiers)==null?void 0:ze.core_location)==null?void 0:We[0])||null);M=`protocluster-track-${bs}`,U=`Protocluster track ${bs}`;for(let Cr of Object.keys(h)){if(!Cr.startsWith("protocluster-track-"))continue;if(!h[Cr].annotations.some(il=>!(w.end<il.start||w.start>il.end))){M=Cr;break}}H(M,U),h[M].annotations.push({id:`${m.type}-${bs}`,trackId:M,type:"box",heightFraction:.3,classes:D,start:w.start,end:w.end,stroke:"none",opacity:.5,data:m}),Sr&&h[M].annotations.push({id:`${m.type}-${bs}-core`,trackId:M,type:"box",heightFraction:.35,classes:[...D,"proto-core"],label:R(m),showLabel:"always",start:Sr.start,end:Sr.end,stroke:"black",data:m});break;default:M=m.type,U=m.type,H(M,U),h[M].annotations.push({id:`${m.type}-${w.start}-${w.end}`,trackId:M,type:"box",classes:D,label:R(m),start:w.start,end:w.end,data:m});break}}),e.tfbsHits&&e.tfbsHits.length>0){const m="CDS";H(m,m),e.tfbsHits.forEach((w,D)=>{w.confidence!=="strong"&&w.confidence!=="medium"||h[m].annotations.push({id:`tfbs-${D}-${w.start}`,trackId:m,type:"pin",classes:["tfbs-hit",`tfbs-${w.confidence}`],label:w.name,labelPosition:"above",showLabel:"hover",start:w.start,end:w.start,fy:.5,heightFraction:.5,opacity:.8,data:{...w,_elementType:"Binding Site"}})})}if(e.ttaCodons&&e.ttaCodons.length>0){const m="CDS";H(m,m),e.ttaCodons.forEach((w,D)=>{h[m].annotations.push({id:`tta-${D}-${w.start}`,trackId:m,type:"triangle",classes:["tta-codon"],showLabel:"none",start:w.start,end:w.start,fy:.2,heightFraction:.4,opacity:.9,data:{...w,_elementType:"TTA Codon"}})})}if(e.resistanceFeatures&&e.resistanceFeatures.length>0){const m="CDS";H(m,m);const w={};e.features.forEach(D=>{var M,U;if(D.type==="CDS"&&((U=(M=D.qualifiers)==null?void 0:M.locus_tag)!=null&&U[0])){const ue=D.qualifiers.locus_tag[0],Ve=W(D.location);Ve&&(w[ue]=Ve)}}),e.resistanceFeatures.forEach((D,M)=>{const U=D.locus_tag,ue=w[U];console.log("Mapping resistance feature",D.reference_id,"to locus tag",U,"with location",ue),ue&&h[m].annotations.push({id:`resistance-${M}-${U}`,trackId:m,type:"box",classes:["resistance"],showLabel:"never",start:ue.start,end:ue.end,fy:.1,heightFraction:.2,fill:"#BBB",data:{...D,_elementType:"Resistance"}})})}},he=()=>{if(!f||!Object.keys(h).length)return;const m=[];l.value.forEach(U=>{a.value.includes(U.id)&&h[U.id]&&m.push(h[U.id])});const w=m.map(U=>({id:U.id,label:U.label,height:U.height||void 0})),D=m.flatMap(U=>U.annotations),M=m.flatMap(U=>U.primitives);f.setData({tracks:w,annotations:D,primitives:M})},Se=m=>`feature-${m.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`,R=m=>{var D,M,U,ue,Ve;const w=m.qualifiers||{};return(D=w.locus_tag)!=null&&D[0]?w.locus_tag[0]:(M=w.gene)!=null&&M[0]?w.gene[0]:(U=w.product)!=null&&U[0]?w.product[0]:(ue=w.description)!=null&&ue[0]?w.description[0]:(Ve=w.db_xref)!=null&&Ve[0]?w.db_xref[0]:m.type||"Feature"},C=m=>{const w=D=>D.startsWith("cand_cluster")?1:D.startsWith("protocluster")?2:D.startsWith("CDS")?3:D.startsWith("PFAM_domain")?4:5;return m.sort((D,M)=>{const U=w(D.id),ue=w(M.id);return U!==ue?U-ue:D.id.localeCompare(M.id)})},L=()=>{u.value=!u.value},J=m=>{m.target.checked?a.value=[...l.value.map(w=>w.id)]:a.value=[],he()},se=m=>{m.target.closest(".multi-select-dropdown")||(u.value=!1)},ce=(m,w)=>{if(g.value=m,m.id.endsWith("-core")){const D=h[m.trackId],M=m.id.replace("-core","");if(D){const U=D.annotations.find(ue=>ue.id===M);U&&(g.value=U)}}Q(),he()},ie=()=>{g.value=null},ee=m=>{if(!g.value)return!0;if(m.id.endsWith("-core")){const w=h[m.trackId],D=m.id.replace("-core","");if(w){const M=w.annotations.find(U=>U.id===D);if(M)return M.start>=g.value.start&&M.end<=g.value.end}return!1}return m.start>=g.value.start&&m.end<=g.value.end},Q=()=>{Object.values(h).forEach(m=>{m.id!=="CDS"&&m.id!=="PFAM_domain"||(m.annotations.forEach(w=>{const D=ee(w);w._originalOpacity===void 0&&(w._originalOpacity=w.opacity!==void 0?w.opacity:1),D?w.opacity=w._originalOpacity:w.opacity=w._originalOpacity*.5}),m.id==="CDS"&&m.primitives&&m.primitives.forEach(w=>{w.id==="cds-baseline"&&(w._originalOpacity===void 0&&(w._originalOpacity=w.opacity!==void 0?w.opacity:1),g.value?w.opacity=w._originalOpacity*.1:w.opacity=w._originalOpacity)}))})};return n({clearViewer:()=>{r.value="",g.value=null,h={},l.value=[],a.value=[],o.value="",s.value&&(s.value.innerHTML=""),f=null},rebuildViewer:v}),{viewerContainer:s,selectedRegion:r,loading:i,error:o,availableTracks:l,selectedTracks:a,dropdownOpen:u,selectedElement:b,currentRegionNumber:c,onRegionChange:A,updateViewer:he,toggleDropdown:L,toggleSelectAll:J,clearSelectedElement:ie}}},Gu={class:"region-viewer-wrapper"},Ju={key:0,class:"controls"},Xu=["value"],Yu={key:1,class:"no-regions-message"},Qu={key:2,class:"feature-controls"},Zu={class:"multi-select-container"},ef={class:"selected-display"},tf={key:0},nf={key:1},sf={key:2},rf={class:"select-all-option"},of=["checked","indeterminate"],lf=["value"],af={key:1,class:"current-record-info"},cf={class:"file-metadata"},uf={ref:"viewerContainer",class:"viewer-container"},ff={key:2,class:"loading"},df={key:3,class:"error"},hf={key:4,class:"feature-details-container"};function pf(e,t,n,s,r,i){var a,u,c,f;const o=cn("FeatureDetails"),l=cn("SimpleDetails");return N(),B("div",Gu,[n.recordInfo?(N(),B("div",Ju,[n.regions.length>0?Us((N(),B("select",{key:0,"onUpdate:modelValue":t[0]||(t[0]=h=>s.selectedRegion=h),onChange:t[1]||(t[1]=(...h)=>s.onRegionChange&&s.onRegionChange(...h)),class:"region-select"},[t[7]||(t[7]=P("option",{value:""},"Show all features",-1)),(N(!0),B(we,null,Qe(n.regions,h=>(N(),B("option",{key:h.id,value:h.id}," Region "+te(h.region_number)+" - "+te(h.product.join(", ")),9,Xu))),128))],544)),[[kc,s.selectedRegion]]):ye("",!0),n.regions.length===0&&!s.loading?(N(),B("div",Yu," No regions found - showing all features for this record ")):ye("",!0),s.availableTracks.length>0?(N(),B("div",Qu,[P("div",Zu,[P("div",{class:Ct(["multi-select-dropdown",{open:s.dropdownOpen}]),onClick:t[6]||(t[6]=(...h)=>s.toggleDropdown&&s.toggleDropdown(...h))},[P("div",ef,[s.selectedTracks.length===s.availableTracks.length?(N(),B("span",tf," All tracks ("+te(s.selectedTracks.length)+") ",1)):s.selectedTracks.length===0?(N(),B("span",nf," No tracks selected ")):(N(),B("span",sf,te(s.selectedTracks.length)+" tracks selected ",1)),t[8]||(t[8]=P("span",{class:"dropdown-arrow"},"▼",-1))]),s.dropdownOpen?(N(),B("div",{key:0,class:"dropdown-options",onClick:t[5]||(t[5]=po(()=>{},["stop"]))},[P("div",rf,[P("label",null,[P("input",{type:"checkbox",checked:s.selectedTracks.length===s.availableTracks.length,indeterminate:s.selectedTracks.length>0&&s.selectedTracks.length<s.availableTracks.length,onChange:t[2]||(t[2]=(...h)=>s.toggleSelectAll&&s.toggleSelectAll(...h))},null,40,of),t[9]||(t[9]=vt(" Select All ",-1))])]),t[10]||(t[10]=P("div",{class:"option-separator"},null,-1)),(N(!0),B(we,null,Qe(s.availableTracks,h=>(N(),B("div",{key:h.id,class:"dropdown-option"},[P("label",null,[Us(P("input",{type:"checkbox",value:h.id,"onUpdate:modelValue":t[3]||(t[3]=g=>s.selectedTracks=g),onChange:t[4]||(t[4]=(...g)=>s.updateViewer&&s.updateViewer(...g))},null,40,lf),[[Ac,s.selectedTracks]]),vt(" "+te(h.label)+" ("+te(h.annotationCount)+") ",1)])]))),128))])):ye("",!0)],2)])])):ye("",!0)])):ye("",!0),n.recordInfo?(N(),B("div",af,[P("span",null,"Current Record: "+te(n.recordInfo.recordId)+" - "+te((u=(a=n.recordInfo)==null?void 0:a.recordInfo)==null?void 0:u.description),1),P("div",cf,"File: "+te(n.recordInfo.filename)+", version "+te(((c=n.recordInfo.fileMetadata)==null?void 0:c.version)||"unknown")+", input "+te(((f=n.recordInfo.fileMetadata)==null?void 0:f.input_file)||"unknown"),1)])):ye("",!0),Us(P("div",uf,null,512),[[dc,n.recordInfo]]),s.loading?(N(),B("div",ff," Loading region data... ")):ye("",!0),s.error?(N(),B("div",df,te(s.error),1)):ye("",!0),n.recordInfo?(N(),B("div",hf,[s.selectedElement&&s.selectedElement.type&&s.selectedElement.qualifiers?(N(),qt(o,{key:0,feature:s.selectedElement,"all-features":n.features,"data-provider":n.dataProvider,"record-info":n.recordInfo,"region-number":s.currentRegionNumber,onClose:s.clearSelectedElement},null,8,["feature","all-features","data-provider","record-info","region-number","onClose"])):s.selectedElement?(N(),qt(l,{key:1,data:s.selectedElement,"element-type":s.selectedElement._elementType},null,8,["data","element-type"])):ye("",!0)])):ye("",!0)])}const bo=Rt(Ku,[["render",pf],["__scopeId","data-v-8fefd372"]]),gf={name:"LoadingSpinner",props:{color:{type:String,default:"#1976d2"}},setup(e){return{customStyle:je(()=>({borderColor:e.color,borderTopColor:"transparent"}))}}};function mf(e,t,n,s,r,i){return N(),B("div",{class:"loading-spinner",style:In(s.customStyle)},null,4)}const yf={name:"RegionViewerContainer",components:{RegionViewer:bo,LoadingSpinner:Rt(gf,[["render",mf],["__scopeId","data-v-04186386"]])},props:{dataProvider:{type:Object,default:null},recordId:{type:String,default:""},recordData:{type:Object,default:null},initialRegionId:{type:String,default:""}},emits:["region-changed","annotation-clicked","error"],setup(e,{emit:t}){const n=de(null),s=de(null),r=de([]),i=de([]),o=de(null),l=de({}),a=de([]),u=de([]),c=de([]),f=de(""),h=de(!1),g=de(""),b=de(0),v=()=>{s.value=null,r.value=[],i.value=[],o.value=null,a.value=[],u.value=[],c.value=[],f.value=""},A=async()=>{if(n.value)try{l.value=await n.value.getPfamColorMap(),console.log("Loaded PFAM colors for",Object.keys(l.value).length,"domains")}catch(C){console.warn("Failed to load PFAM color mapping:",C.message)}},$=async(C,L)=>{if(n.value)try{const J=L.replace("region_",""),se=await n.value.getTFBSHits(C,J);a.value=se.hits||[],console.log("Loaded",a.value.length,"TFBS binding sites for region",J)}catch(J){console.warn("Failed to load TFBS hits:",J.message),a.value=[]}},H=async C=>{if(n.value)try{const L=await n.value.getTTACodons(C);u.value=L.codons||[],console.log("Loaded",u.value.length,"TTA codons for record",C)}catch(L){console.warn("Failed to load TTA codons:",L.message),u.value=[]}},W=async C=>{if(n.value)try{const L=await n.value.getResistanceFeatures(C);c.value=L.features||[],console.log("Loaded",c.value.length,"resistance features for record",C)}catch(L){console.warn("Failed to load resistance features:",L.message),c.value=[]}},j=async C=>{var J;const L=++b.value;v(),h.value=!0,g.value="";try{if(!n.value)throw new Error("No data provider available");const se=((J=e.recordData)==null?void 0:J.entryId)||C,ce=await n.value.loadEntry(se);if(L!==b.value){console.log("Ignoring stale load request for",C);return}s.value={recordId:ce.recordId,filename:ce.filename,fileMetadata:ce.fileMetadata,recordInfo:ce.recordInfo};const ie=await n.value.getRegions(s.value.recordId);if(L!==b.value){console.log("Ignoring stale load request for",C);return}if(r.value=ie.regions||[],o.value=ie.boundaries||null,await H(s.value.recordId),L!==b.value){console.log("Ignoring stale load request for",C);return}if(await W(s.value.recordId),L!==b.value){console.log("Ignoring stale load request for",C);return}if(r.value&&r.value.length>0?(f.value=r.value[0].id,await K(s.value.recordId,f.value)):await ae(s.value.recordId),L!==b.value){console.log("Ignoring stale load request for",C);return}h.value=!1}catch(se){L===b.value&&(console.error("Error loading record:",se),g.value=`Failed to load record: ${se.message}`,t("error",g.value),h.value=!1)}},K=async(C,L)=>{try{const J=await n.value.getRegionFeatures(C,L);i.value=J.features||[],o.value=J.region_boundaries||null,await $(C,L)}catch(J){console.error("Error loading region features:",J),g.value=`Failed to load region features: ${J.message}`,t("error",g.value)}},ae=async C=>{try{const L=await n.value.getRecordFeatures(C);i.value=L.features||[],o.value=null,a.value=[]}catch(L){console.error("Error loading features:",L),g.value=`Failed to load features: ${L.message}`,t("error",g.value)}},he=async C=>{f.value=C,C?await K(s.value.recordId,C):await ae(s.value.recordId),t("region-changed",C)},Se=C=>{t("annotation-clicked",C)},R=C=>{t("error",C)};return Vs(async()=>{if(!e.dataProvider){g.value="No data provider specified. Please set the dataProvider property.",t("error",g.value);return}n.value=e.dataProvider,await A()}),Je(()=>e.recordId,async(C,L)=>{C&&n.value?await j(C):!C&&L!==void 0&&v()},{immediate:!0}),Je(()=>e.dataProvider,C=>{C&&(n.value=C,A())}),Je(()=>e.initialRegionId,C=>{C&&r.value.length>0&&(f.value=C,s.value&&K(s.value.recordId,C))}),{recordInfo:s,regions:r,features:i,regionBoundaries:o,pfamColorMap:l,tfbsHits:a,ttaCodons:u,resistanceFeatures:c,selectedRegionId:f,loading:h,error:g,handleRegionChanged:he,handleAnnotationClicked:Se,handleError:R}}},bf={class:"region-viewer-container"},_f={key:0,class:"loading-container"};function wf(e,t,n,s,r,i){const o=cn("LoadingSpinner"),l=cn("RegionViewer");return N(),B("div",bf,[s.loading?(N(),B("div",_f,[Ee(o,{color:"#1976d2",style:{width:"48px",height:"48px","border-width":"4px"}}),t[0]||(t[0]=P("p",{class:"loading-text"},"Loading record data...",-1))])):s.recordInfo?(N(),qt(l,{key:1,"record-info":s.recordInfo,regions:s.regions,features:s.features,"region-boundaries":s.regionBoundaries,"pfam-color-map":s.pfamColorMap,"selected-region-id":s.selectedRegionId,"data-provider":n.dataProvider,"tfbs-hits":s.tfbsHits,"tta-codons":s.ttaCodons,"resistance-features":s.resistanceFeatures,onRegionChanged:s.handleRegionChanged,onAnnotationClicked:s.handleAnnotationClicked,onError:s.handleError},null,8,["record-info","regions","features","region-boundaries","pfam-color-map","selected-region-id","data-provider","tfbs-hits","tta-codons","resistance-features","onRegionChanged","onAnnotationClicked","onError"])):ye("",!0)])}const vf=Rt(yf,[["render",wf],["__scopeId","data-v-def37caf"]]);function _o(e,t){return function(){return e.apply(t,arguments)}}const{toString:xf}=Object.prototype,{getPrototypeOf:cr}=Object,{iterator:ls,toStringTag:wo}=Symbol,as=(e=>t=>{const n=xf.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=e=>(e=e.toLowerCase(),t=>as(t)===e),cs=e=>t=>typeof t===e,{isArray:Wt}=Array,wn=cs("undefined");function vn(e){return e!==null&&!wn(e)&&e.constructor!==null&&!wn(e.constructor)&&Be(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vo=Ze("ArrayBuffer");function Sf(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vo(e.buffer),t}const Cf=cs("string"),Be=cs("function"),xo=cs("number"),xn=e=>e!==null&&typeof e=="object",Tf=e=>e===!0||e===!1,us=e=>{if(as(e)!=="object")return!1;const t=cr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wo in e)&&!(ls in e)},Ef=e=>{if(!xn(e)||vn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Af=Ze("Date"),kf=Ze("File"),Rf=Ze("Blob"),Of=Ze("FileList"),Pf=e=>xn(e)&&Be(e.pipe),Lf=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Be(e.append)&&((t=as(e))==="formdata"||t==="object"&&Be(e.toString)&&e.toString()==="[object FormData]"))},Ff=Ze("URLSearchParams"),[Mf,If,Df,Nf]=["ReadableStream","Request","Response","Headers"].map(Ze),jf=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),Wt(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{if(vn(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(s=0;s<o;s++)l=i[s],t.call(null,e[l],l,e)}}function So(e,t){if(vn(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,r;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Ot=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Co=e=>!wn(e)&&e!==Ot;function ur(){const{caseless:e}=Co(this)&&this||{},t={},n=(s,r)=>{const i=e&&So(t,r)||r;us(t[i])&&us(s)?t[i]=ur(t[i],s):us(s)?t[i]=ur({},s):Wt(s)?t[i]=s.slice():t[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&Sn(arguments[s],n);return t}const Bf=(e,t,n,{allOwnKeys:s}={})=>(Sn(t,(r,i)=>{n&&Be(r)?e[i]=_o(r,n):e[i]=r},{allOwnKeys:s}),e),$f=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Hf=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Uf=(e,t,n,s)=>{let r,i,o;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!s||s(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&cr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qf=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},Vf=e=>{if(!e)return null;if(Wt(e))return e;let t=e.length;if(!xo(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},zf=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&cr(Uint8Array)),Wf=(e,t)=>{const s=(e&&e[ls]).call(e);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},Kf=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Gf=Ze("HTMLFormElement"),Jf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),To=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Xf=Ze("RegExp"),Eo=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Sn(n,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(s[i]=o||r)}),Object.defineProperties(e,s)},Yf=e=>{Eo(e,(t,n)=>{if(Be(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(Be(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Qf=(e,t)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return Wt(e)?s(e):s(String(e).split(t)),n},Zf=()=>{},ed=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function td(e){return!!(e&&Be(e.append)&&e[wo]==="FormData"&&e[ls])}const nd=e=>{const t=new Array(10),n=(s,r)=>{if(xn(s)){if(t.indexOf(s)>=0)return;if(vn(s))return s;if(!("toJSON"in s)){t[r]=s;const i=Wt(s)?[]:{};return Sn(s,(o,l)=>{const a=n(o,r+1);!wn(a)&&(i[l]=a)}),t[r]=void 0,i}}return s};return n(e,0)},sd=Ze("AsyncFunction"),rd=e=>e&&(xn(e)||Be(e))&&Be(e.then)&&Be(e.catch),Ao=((e,t)=>e?setImmediate:t?((n,s)=>(Ot.addEventListener("message",({source:r,data:i})=>{r===Ot&&i===n&&s.length&&s.shift()()},!1),r=>{s.push(r),Ot.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Be(Ot.postMessage)),id=typeof queueMicrotask<"u"?queueMicrotask.bind(Ot):typeof process<"u"&&process.nextTick||Ao,y={isArray:Wt,isArrayBuffer:vo,isBuffer:vn,isFormData:Lf,isArrayBufferView:Sf,isString:Cf,isNumber:xo,isBoolean:Tf,isObject:xn,isPlainObject:us,isEmptyObject:Ef,isReadableStream:Mf,isRequest:If,isResponse:Df,isHeaders:Nf,isUndefined:wn,isDate:Af,isFile:kf,isBlob:Rf,isRegExp:Xf,isFunction:Be,isStream:Pf,isURLSearchParams:Ff,isTypedArray:zf,isFileList:Of,forEach:Sn,merge:ur,extend:Bf,trim:jf,stripBOM:$f,inherits:Hf,toFlatObject:Uf,kindOf:as,kindOfTest:Ze,endsWith:qf,toArray:Vf,forEachEntry:Wf,matchAll:Kf,isHTMLForm:Gf,hasOwnProperty:To,hasOwnProp:To,reduceDescriptors:Eo,freezeMethods:Yf,toObjectSet:Qf,toCamelCase:Jf,noop:Zf,toFiniteNumber:ed,findKey:So,global:Ot,isContextDefined:Co,isSpecCompliantForm:td,toJSONObject:nd,isAsyncFn:sd,isThenable:rd,setImmediate:Ao,asap:id,isIterable:e=>e!=null&&Be(e[ls])};function Y(e,t,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r,this.status=r.status?r.status:null)}y.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.status}}});const ko=Y.prototype,Ro={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ro[e]={value:e}}),Object.defineProperties(Y,Ro),Object.defineProperty(ko,"isAxiosError",{value:!0}),Y.from=(e,t,n,s,r,i)=>{const o=Object.create(ko);return y.toFlatObject(e,o,function(a){return a!==Error.prototype},l=>l!=="isAxiosError"),Y.call(o,e.message,t,n,s,r),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const od=null;function fr(e){return y.isPlainObject(e)||y.isArray(e)}function Oo(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function Po(e,t,n){return e?e.concat(t).map(function(r,i){return r=Oo(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function ld(e){return y.isArray(e)&&!e.some(fr)}const ad=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function fs(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,A){return!y.isUndefined(A[v])});const s=n.metaTokens,r=n.visitor||c,i=n.dots,o=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&y.isSpecCompliantForm(t);if(!y.isFunction(r))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(y.isDate(b))return b.toISOString();if(y.isBoolean(b))return b.toString();if(!a&&y.isBlob(b))throw new Y("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(b)||y.isTypedArray(b)?a&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function c(b,v,A){let $=b;if(b&&!A&&typeof b=="object"){if(y.endsWith(v,"{}"))v=s?v:v.slice(0,-2),b=JSON.stringify(b);else if(y.isArray(b)&&ld(b)||(y.isFileList(b)||y.endsWith(v,"[]"))&&($=y.toArray(b)))return v=Oo(v),$.forEach(function(W,j){!(y.isUndefined(W)||W===null)&&t.append(o===!0?Po([v],j,i):o===null?v:v+"[]",u(W))}),!1}return fr(b)?!0:(t.append(Po(A,v,i),u(b)),!1)}const f=[],h=Object.assign(ad,{defaultVisitor:c,convertValue:u,isVisitable:fr});function g(b,v){if(!y.isUndefined(b)){if(f.indexOf(b)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(b),y.forEach(b,function($,H){(!(y.isUndefined($)||$===null)&&r.call(t,$,y.isString(H)?H.trim():H,v,h))===!0&&g($,v?v.concat(H):[H])}),f.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Lo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function dr(e,t){this._pairs=[],e&&fs(e,this,t)}const Fo=dr.prototype;Fo.append=function(t,n){this._pairs.push([t,n])},Fo.toString=function(t){const n=t?function(s){return t.call(this,s,Lo)}:Lo;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function cd(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mo(e,t,n){if(!t)return e;const s=n&&n.encode||cd;y.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let i;if(r?i=r(t,n):i=y.isURLSearchParams(t)?t.toString():new dr(t,n).toString(s),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Io{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(s){s!==null&&t(s)})}}const Do={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ud={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:dr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},hr=typeof window<"u"&&typeof document<"u",pr=typeof navigator=="object"&&navigator||void 0,fd=hr&&(!pr||["ReactNative","NativeScript","NS"].indexOf(pr.product)<0),dd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hd=hr&&window.location.href||"http://localhost",Pe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hr,hasStandardBrowserEnv:fd,hasStandardBrowserWebWorkerEnv:dd,navigator:pr,origin:hd},Symbol.toStringTag,{value:"Module"})),...ud};function pd(e,t){return fs(e,new Pe.classes.URLSearchParams,{visitor:function(n,s,r,i){return Pe.isNode&&y.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function gd(e){return y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function md(e){const t={},n=Object.keys(e);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],t[i]=e[i];return t}function No(e){function t(n,s,r,i){let o=n[i++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),a=i>=n.length;return o=!o&&y.isArray(r)?r.length:o,a?(y.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!l):((!r[o]||!y.isObject(r[o]))&&(r[o]=[]),t(n,s,r[o],i)&&y.isArray(r[o])&&(r[o]=md(r[o])),!l)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(s,r)=>{t(gd(s),r,n,0)}),n}return null}function yd(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Cn={transitional:Do,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=y.isObject(t);if(i&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return r?JSON.stringify(No(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return pd(t,this.formSerializer).toString();if((l=y.isFileList(t))||s.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return fs(l?{"files[]":t}:t,a&&new a,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),yd(t)):t}],transformResponse:[function(t){const n=this.transitional||Cn.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?Y.from(l,Y.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pe.classes.FormData,Blob:Pe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],e=>{Cn.headers[e]={}});const bd=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_d=e=>{const t={};let n,s,r;return e&&e.split(`
|
|
45
|
+
`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||t[n]&&bd[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},jo=Symbol("internals");function Tn(e){return e&&String(e).trim().toLowerCase()}function ds(e){return e===!1||e==null?e:y.isArray(e)?e.map(ds):String(e)}function wd(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const vd=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gr(e,t,n,s,r){if(y.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!y.isString(t)){if(y.isString(s))return t.indexOf(s)!==-1;if(y.isRegExp(s))return s.test(t)}}function xd(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Sd(e,t){const n=y.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,i,o){return this[s].call(this,t,r,i,o)},configurable:!0})})}let $e=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function i(l,a,u){const c=Tn(a);if(!c)throw new Error("header name must be a non-empty string");const f=y.findKey(r,c);(!f||r[f]===void 0||u===!0||u===void 0&&r[f]!==!1)&&(r[f||a]=ds(l))}const o=(l,a)=>y.forEach(l,(u,c)=>i(u,c,a));if(y.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(y.isString(t)&&(t=t.trim())&&!vd(t))o(_d(t),n);else if(y.isObject(t)&&y.isIterable(t)){let l={},a,u;for(const c of t){if(!y.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[u=c[0]]=(a=l[u])?y.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}o(l,n)}else t!=null&&i(n,t,s);return this}get(t,n){if(t=Tn(t),t){const s=y.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return wd(r);if(y.isFunction(n))return n.call(this,r,s);if(y.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Tn(t),t){const s=y.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||gr(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function i(o){if(o=Tn(o),o){const l=y.findKey(s,o);l&&(!n||gr(s,s[l],l,n))&&(delete s[l],r=!0)}}return y.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!t||gr(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,s={};return y.forEach(this,(r,i)=>{const o=y.findKey(s,i);if(o){n[o]=ds(r),delete n[i];return}const l=t?xd(i):String(i).trim();l!==i&&delete n[i],n[l]=ds(r),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return y.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&y.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
46
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[jo]=this[jo]={accessors:{}}).accessors,r=this.prototype;function i(o){const l=Tn(o);s[l]||(Sd(r,o),s[l]=!0)}return y.isArray(t)?t.forEach(i):i(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors($e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),y.freezeMethods($e);function mr(e,t){const n=this||Cn,s=t||n,r=$e.from(s.headers);let i=s.data;return y.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function Bo(e){return!!(e&&e.__CANCEL__)}function Kt(e,t,n){Y.call(this,e??"canceled",Y.ERR_CANCELED,t,n),this.name="CanceledError"}y.inherits(Kt,Y,{__CANCEL__:!0});function $o(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Cd(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Td(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),c=s[i];o||(o=u),n[r]=a,s[r]=u;let f=i,h=0;for(;f!==r;)h+=n[f++],f=f%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),u-o<t)return;const g=c&&u-c;return g?Math.round(h*1e3/g):void 0}}function Ed(e,t){let n=0,s=1e3/t,r,i;const o=(u,c=Date.now())=>{n=c,r=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=s?o(u,c):(r=u,i||(i=setTimeout(()=>{i=null,o(r)},s-f)))},()=>r&&o(r)]}const hs=(e,t,n=3)=>{let s=0;const r=Td(50,250);return Ed(i=>{const o=i.loaded,l=i.lengthComputable?i.total:void 0,a=o-s,u=r(a),c=o<=l;s=o;const f={loaded:o,total:l,progress:l?o/l:void 0,bytes:a,rate:u||void 0,estimated:u&&l&&c?(l-o)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Ho=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Uo=e=>(...t)=>y.asap(()=>e(...t)),Ad=Pe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Pe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Pe.origin),Pe.navigator&&/(msie|trident)/i.test(Pe.navigator.userAgent)):()=>!0,kd=Pe.hasStandardBrowserEnv?{write(e,t,n,s,r,i){const o=[e+"="+encodeURIComponent(t)];y.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),y.isString(s)&&o.push("path="+s),y.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Rd(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Od(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qo(e,t,n){let s=!Rd(t);return e&&(s||n==!1)?Od(e,t):t}const Vo=e=>e instanceof $e?{...e}:e;function Pt(e,t){t=t||{};const n={};function s(u,c,f,h){return y.isPlainObject(u)&&y.isPlainObject(c)?y.merge.call({caseless:h},u,c):y.isPlainObject(c)?y.merge({},c):y.isArray(c)?c.slice():c}function r(u,c,f,h){if(y.isUndefined(c)){if(!y.isUndefined(u))return s(void 0,u,f,h)}else return s(u,c,f,h)}function i(u,c){if(!y.isUndefined(c))return s(void 0,c)}function o(u,c){if(y.isUndefined(c)){if(!y.isUndefined(u))return s(void 0,u)}else return s(void 0,c)}function l(u,c,f){if(f in t)return s(u,c);if(f in e)return s(void 0,u)}const a={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(u,c,f)=>r(Vo(u),Vo(c),f,!0)};return y.forEach(Object.keys({...e,...t}),function(c){const f=a[c]||r,h=f(e[c],t[c],c);y.isUndefined(h)&&f!==l||(n[c]=h)}),n}const zo=e=>{const t=Pt({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:l}=t;t.headers=o=$e.from(o),t.url=Mo(qo(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let a;if(y.isFormData(n)){if(Pe.hasStandardBrowserEnv||Pe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((a=o.getContentType())!==!1){const[u,...c]=a?a.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Pe.hasStandardBrowserEnv&&(s&&y.isFunction(s)&&(s=s(t)),s||s!==!1&&Ad(t.url))){const u=r&&i&&kd.read(i);u&&o.set(r,u)}return t},Pd=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){const r=zo(e);let i=r.data;const o=$e.from(r.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:u}=r,c,f,h,g,b;function v(){g&&g(),b&&b(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let A=new XMLHttpRequest;A.open(r.method.toUpperCase(),r.url,!0),A.timeout=r.timeout;function $(){if(!A)return;const W=$e.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),K={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:W,config:e,request:A};$o(function(he){n(he),v()},function(he){s(he),v()},K),A=null}"onloadend"in A?A.onloadend=$:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout($)},A.onabort=function(){A&&(s(new Y("Request aborted",Y.ECONNABORTED,e,A)),A=null)},A.onerror=function(){s(new Y("Network Error",Y.ERR_NETWORK,e,A)),A=null},A.ontimeout=function(){let j=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const K=r.transitional||Do;r.timeoutErrorMessage&&(j=r.timeoutErrorMessage),s(new Y(j,K.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,A)),A=null},i===void 0&&o.setContentType(null),"setRequestHeader"in A&&y.forEach(o.toJSON(),function(j,K){A.setRequestHeader(K,j)}),y.isUndefined(r.withCredentials)||(A.withCredentials=!!r.withCredentials),l&&l!=="json"&&(A.responseType=r.responseType),u&&([h,b]=hs(u,!0),A.addEventListener("progress",h)),a&&A.upload&&([f,g]=hs(a),A.upload.addEventListener("progress",f),A.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(c=W=>{A&&(s(!W||W.type?new Kt(null,e,A):W),A.abort(),A=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const H=Cd(r.url);if(H&&Pe.protocols.indexOf(H)===-1){s(new Y("Unsupported protocol "+H+":",Y.ERR_BAD_REQUEST,e));return}A.send(i||null)})},Ld=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const i=function(u){if(!r){r=!0,l();const c=u instanceof Error?u:this.reason;s.abort(c instanceof Y?c:new Kt(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:a}=s;return a.unsubscribe=()=>y.asap(l),a}},Fd=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,r;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},Md=async function*(e,t){for await(const n of Id(e))yield*Fd(n,t)},Id=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},Wo=(e,t,n,s)=>{const r=Md(e,t);let i=0,o,l=a=>{o||(o=!0,s&&s(a))};return new ReadableStream({async pull(a){try{const{done:u,value:c}=await r.next();if(u){l(),a.close();return}let f=c.byteLength;if(n){let h=i+=f;n(h)}a.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel(a){return l(a),r.return()}},{highWaterMark:2})},ps=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ko=ps&&typeof ReadableStream=="function",Dd=ps&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Go=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Nd=Ko&&Go(()=>{let e=!1;const t=new Request(Pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Jo=64*1024,yr=Ko&&Go(()=>y.isReadableStream(new Response("").body)),gs={stream:yr&&(e=>e.body)};ps&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!gs[t]&&(gs[t]=y.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new Y(`Response type '${t}' is not supported`,Y.ERR_NOT_SUPPORT,s)})})})(new Response);const jd=async e=>{if(e==null)return 0;if(y.isBlob(e))return e.size;if(y.isSpecCompliantForm(e))return(await new Request(Pe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(y.isArrayBufferView(e)||y.isArrayBuffer(e))return e.byteLength;if(y.isURLSearchParams(e)&&(e=e+""),y.isString(e))return(await Dd(e)).byteLength},Bd=async(e,t)=>{const n=y.toFiniteNumber(e.getContentLength());return n??jd(t)},br={http:od,xhr:Pd,fetch:ps&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:l,onUploadProgress:a,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=zo(e);u=u?(u+"").toLowerCase():"text";let g=Ld([r,i&&i.toAbortSignal()],o),b;const v=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let A;try{if(a&&Nd&&n!=="get"&&n!=="head"&&(A=await Bd(c,s))!==0){let K=new Request(t,{method:"POST",body:s,duplex:"half"}),ae;if(y.isFormData(s)&&(ae=K.headers.get("content-type"))&&c.setContentType(ae),K.body){const[he,Se]=Ho(A,hs(Uo(a)));s=Wo(K.body,Jo,he,Se)}}y.isString(f)||(f=f?"include":"omit");const $="credentials"in Request.prototype;b=new Request(t,{...h,signal:g,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:s,duplex:"half",credentials:$?f:void 0});let H=await fetch(b,h);const W=yr&&(u==="stream"||u==="response");if(yr&&(l||W&&v)){const K={};["status","statusText","headers"].forEach(R=>{K[R]=H[R]});const ae=y.toFiniteNumber(H.headers.get("content-length")),[he,Se]=l&&Ho(ae,hs(Uo(l),!0))||[];H=new Response(Wo(H.body,Jo,he,()=>{Se&&Se(),v&&v()}),K)}u=u||"text";let j=await gs[y.findKey(gs,u)||"text"](H,e);return!W&&v&&v(),await new Promise((K,ae)=>{$o(K,ae,{data:j,headers:$e.from(H.headers),status:H.status,statusText:H.statusText,config:e,request:b})})}catch($){throw v&&v(),$&&$.name==="TypeError"&&/Load failed|fetch/i.test($.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,b),{cause:$.cause||$}):Y.from($,$&&$.code,e,b)}})};y.forEach(br,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xo=e=>`- ${e}`,$d=e=>y.isFunction(e)||e===null||e===!1,Yo={getAdapter:e=>{e=y.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let i=0;i<t;i++){n=e[i];let o;if(s=n,!$d(n)&&(s=br[(o=String(n)).toLowerCase()],s===void 0))throw new Y(`Unknown adapter '${o}'`);if(s)break;r[o||"#"+i]=s}if(!s){const i=Object.entries(r).map(([l,a])=>`adapter ${l} `+(a===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
47
|
+
`+i.map(Xo).join(`
|
|
48
|
+
`):" "+Xo(i[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:br};function _r(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kt(null,e)}function Qo(e){return _r(e),e.headers=$e.from(e.headers),e.data=mr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Yo.getAdapter(e.adapter||Cn.adapter)(e).then(function(s){return _r(e),s.data=mr.call(e,e.transformResponse,s),s.headers=$e.from(s.headers),s},function(s){return Bo(s)||(_r(e),s&&s.response&&(s.response.data=mr.call(e,e.transformResponse,s.response),s.response.headers=$e.from(s.response.headers))),Promise.reject(s)})}const Zo="1.11.0",ms={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ms[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const el={};ms.transitional=function(t,n,s){function r(i,o){return"[Axios v"+Zo+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(t===!1)throw new Y(r(o," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!el[o]&&(el[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,l):!0}},ms.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Hd(e,t,n){if(typeof e!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const l=e[i],a=l===void 0||o(l,i,e);if(a!==!0)throw new Y("option "+i+" must be "+a,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}}const ys={assertOptions:Hd,validators:ms},ct=ys.validators;let Lt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Io,response:new Io}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
49
|
+
`+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Pt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&ys.assertOptions(s,{silentJSONParsing:ct.transitional(ct.boolean),forcedJSONParsing:ct.transitional(ct.boolean),clarifyTimeoutError:ct.transitional(ct.boolean)},!1),r!=null&&(y.isFunction(r)?n.paramsSerializer={serialize:r}:ys.assertOptions(r,{encode:ct.function,serialize:ct.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ys.assertOptions(n,{baseUrl:ct.spelling("baseURL"),withXsrfToken:ct.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&y.merge(i.common,i[n.method]);i&&y.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),n.headers=$e.concat(o,i);const l=[];let a=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(a=a&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!a){const b=[Qo.bind(this),void 0];for(b.unshift(...l),b.push(...u),h=b.length,c=Promise.resolve(n);f<h;)c=c.then(b[f++],b[f++]);return c}h=l.length;let g=n;for(f=0;f<h;){const b=l[f++],v=l[f++];try{g=b(g)}catch(A){v.call(this,A);break}}try{c=Qo.call(this,g)}catch(b){return Promise.reject(b)}for(f=0,h=u.length;f<h;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=Pt(this.defaults,t);const n=qo(t.baseURL,t.url,t.allowAbsoluteUrls);return Mo(n,t.params,t.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(t){Lt.prototype[t]=function(n,s){return this.request(Pt(s||{},{method:t,url:n,data:(s||{}).data}))}}),y.forEach(["post","put","patch"],function(t){function n(s){return function(i,o,l){return this.request(Pt(l||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Lt.prototype[t]=n(),Lt.prototype[t+"Form"]=n(!0)});let Ud=class ol{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,l){s.reason||(s.reason=new Kt(i,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ol(function(r){t=r}),cancel:t}}};function qd(e){return function(n){return e.apply(null,n)}}function Vd(e){return y.isObject(e)&&e.isAxiosError===!0}const wr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wr).forEach(([e,t])=>{wr[t]=e});function tl(e){const t=new Lt(e),n=_o(Lt.prototype.request,t);return y.extend(n,Lt.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return tl(Pt(e,r))},n}const ve=tl(Cn);ve.Axios=Lt,ve.CanceledError=Kt,ve.CancelToken=Ud,ve.isCancel=Bo,ve.VERSION=Zo,ve.toFormData=fs,ve.AxiosError=Y,ve.Cancel=ve.CanceledError,ve.all=function(t){return Promise.all(t)},ve.spread=qd,ve.isAxiosError=Vd,ve.mergeConfig=Pt,ve.AxiosHeaders=$e,ve.formToJSON=e=>No(y.isHTMLForm(e)?new FormData(e):e),ve.getAdapter=Yo.getAdapter,ve.HttpStatusCode=wr,ve.default=ve;const{Axios:dh,AxiosError:hh,CanceledError:ph,isCancel:gh,CancelToken:mh,VERSION:yh,all:bh,Cancel:_h,isAxiosError:wh,spread:vh,toFormData:xh,AxiosHeaders:Sh,HttpStatusCode:Ch,formToJSON:Th,getAdapter:Eh,mergeConfig:Ah}=ve;class nl{}class zd extends nl{constructor(t={}){super();const n=t.baseURL||"";this.axiosInstance=ve.create({baseURL:n})}async loadEntry(t){const n=await this.axiosInstance.post("/api/load-entry",{id:t});return{recordId:n.data.record_id,filename:n.data.filename,fileMetadata:n.data.file_metadata,recordInfo:{description:n.data.record_info.description}}}async getRecords(){throw new Error("getRecords() is not yet implemented in the API")}async getRegions(t){return(await this.axiosInstance.get(`/api/records/${t}/regions`)).data}async getRecordFeatures(t){return(await this.axiosInstance.get(`/api/records/${t}/features`)).data}async getRegionFeatures(t,n){return(await this.axiosInstance.get(`/api/records/${t}/regions/${n}/features`)).data}async getPfamColorMap(){const s=(await this.axiosInstance.get("/domain-colors.csv")).data.split(`
|
|
50
|
+
`),r={};for(let i=1;i<s.length;i++){const o=s[i].trim();if(o){const[l,a]=o.split(",");l&&a&&(r[l]=a)}}return r}async getMiBIGEntries(t,n,s="1"){return(await this.axiosInstance.get(`/api/records/${t}/mibig-entries/${n}`,{params:{region:s}})).data}async getTFBSHits(t,n="1"){return(await this.axiosInstance.get(`/api/records/${t}/tfbs-hits`,{params:{region:n}})).data}async getTTACodons(t){return(await this.axiosInstance.get(`/api/records/${t}/tta-codons`)).data}async getResistanceFeatures(t){return(await this.axiosInstance.get(`/api/records/${t}/resistance`)).data}}class Wd extends nl{constructor(t={}){super(),this.records=t.records||[],this.pfamColorMap=t.pfamColorMap||{},this.fileMetadata={}}async loadFromFile(t){let n;if(t instanceof File){const s=await t.text();n=JSON.parse(s)}else if(typeof t=="string")n=await(await fetch(t)).json();else throw new Error("Invalid file parameter");this.parseAntiSMASHData(n)}parseAntiSMASHData(t){t.records?this.records=t.records:this.records=[t],this.fileMetadata={},t.version&&(this.fileMetadata.version=t.version),t.input_file&&(this.fileMetadata.input_file=t.input_file)}async loadEntry(t){const n=t.includes(":")?t.split(":",2)[1]:t,s=this.records.find(r=>r.id===n);if(!s)throw new Error(`Record ${n} not found`);return{recordId:s.id,filename:t.includes(":")?t.split(":",2)[0]:"unknown",fileMetadata:this.fileMetadata,recordInfo:{description:s.description||""}}}async getRecords(){return this.records.map((t,n)=>({recordId:t.id||`record-${n}`,filename:t.filename||`record-${n}.json`,recordInfo:{description:t.description||t.definition||""}}))}async getRegions(t){const n=this.findRecord(t);if(!n)throw new Error(`Record not found: ${t}`);const s=[];return(n.features||[]).forEach((i,o)=>{var l,a,u;if(i.type==="region"){const c=this.parseLocation(i.location);s.push({id:`region-${o}`,region_number:((a=(l=i.qualifiers)==null?void 0:l.region_number)==null?void 0:a[0])||o+1,product:((u=i.qualifiers)==null?void 0:u.product)||[],start:c==null?void 0:c.start,end:c==null?void 0:c.end})}}),{regions:s}}async getRecordFeatures(t){const n=this.findRecord(t);if(!n)throw new Error(`Record not found: ${t}`);return{features:n.features||[]}}async getRegionFeatures(t,n){const s=this.findRecord(t);if(!s)throw new Error(`Record not found: ${t}`);const r=s.features||[],i=parseInt(n.replace("region-","")),o=r[i];if(!o||o.type!=="region")throw new Error(`Region not found: ${n}`);const l=this.parseLocation(o.location);if(!l)throw new Error(`Invalid region location: ${o.location}`);return{features:r.filter(u=>{const c=this.parseLocation(u.location);return c?!(c.end<l.start||c.start>l.end):!1}),region_boundaries:{start:l.start,end:l.end}}}async getPfamColorMap(){return this.pfamColorMap}setPfamColorMap(t){this.pfamColorMap=t}findRecord(t){return this.records.find((n,s)=>(n.id||`record-${s}`)===t)}async getMiBIGEntries(t,n,s="1"){const r=this.findRecord(t);if(!r)throw new Error(`Record not found: ${t}`);const a=(((r.modules||{})["antismash.modules.clusterblast"]||{}).knowncluster||{}).mibig_entries||{};if(!a[s])throw new Error(`No MiBIG entries available for region ${s}`);const u=a[s][n]||[];if(u.length===0)throw new Error(`No MiBIG entries found for locus_tag '${n}' in region ${s}`);const c=u.map(f=>({mibig_protein:f[0],description:f[1],mibig_cluster:f[2],rank:f[3],mibig_product:f[4],percent_identity:f[5],blast_score:f[6],percent_coverage:f[7],evalue:f[8]}));return{record_id:t,locus_tag:n,region:s,count:c.length,entries:c}}async getTFBSHits(t,n="1"){const s=this.findRecord(t);if(!s)throw new Error(`Record not found: ${t}`);const o=((s.modules||{})["antismash.modules.tfbs_finder"]||{}).hits_by_region||{};if(!o[n])return{record_id:t,region:n,count:0,hits:[]};const l=o[n]||[];return{record_id:t,region:n,count:l.length,hits:l}}async getTTACodons(t){const n=this.findRecord(t);if(!n)throw new Error(`Record not found: ${t}`);const i=((n.modules||{})["antismash.modules.tta"]||{})["TTA codons"]||[];return{record_id:t,count:i.length,codons:i}}async getResistanceFeatures(t){const n=this.findRecord(t);if(!n)throw new Error(`Record not found: ${t}`);const l=((((n.modules||{})["antismash.detection.genefunctions"]||{}).tools||{}).resist||{}).best_hits||{},a=[];for(const[u,c]of Object.entries(l))a.push({locus_tag:u,...c});return{record_id:t,count:a.length,features:a}}parseLocation(t){if(!t)return null;const n=t.match(/\[<?(\d+):>?(\d+)\](?:\(([+-])\))?/);return n?{start:parseInt(n[1]),end:parseInt(n[2]),strand:n[3]||null}:null}}const sl=co(vf),rl=co(bo);customElements.define("bgc-region-viewer-container",sl),customElements.define("bgc-region-viewer",rl),Xe.BGCViewerAPIProvider=zd,Xe.JSONFileProvider=Wd,Xe.RegionViewer=rl,Xe.RegionViewerContainer=sl,Xe.TrackViewer=os,Object.defineProperty(Xe,Symbol.toStringTag,{value:"Module"})});
|