@galaxyproject/locuszoom 0.0.0 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/dist/index.js +39 -39
package/static/dist/index.js
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* @vue/shared v3.4.38
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Mg(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Tt={},Oa=[],sr=()=>{},tS=()=>!1,
|
|
5
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Mg(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Tt={},Oa=[],sr=()=>{},tS=()=>!1,ad=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Tg=e=>e.startsWith("onUpdate:"),nn=Object.assign,Eg=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},nS=Object.prototype.hasOwnProperty,_t=(e,t)=>nS.call(e,t),tt=Array.isArray,Na=e=>sd(e)==="[object Map]",Px=e=>sd(e)==="[object Set]",it=e=>typeof e=="function",Gt=e=>typeof e=="string",io=e=>typeof e=="symbol",Rt=e=>e!==null&&typeof e=="object",Rx=e=>(Rt(e)||it(e))&&it(e.then)&&it(e.catch),zx=Object.prototype.toString,sd=e=>zx.call(e),rS=e=>sd(e).slice(8,-1),Fx=e=>sd(e)==="[object Object]",Ag=e=>Gt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ul=Mg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ld=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},iS=/-(\w)/g,Gi=ld(e=>e.replace(iS,(t,n)=>n?n.toUpperCase():"")),oS=/\B([A-Z])/g,oo=ld(e=>e.replace(oS,"-$1").toLowerCase()),Ix=ld(e=>e.charAt(0).toUpperCase()+e.slice(1)),bh=ld(e=>e?`on${Ix(e)}`:""),Hn=(e,t)=>!Object.is(e,t),mh=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Bx=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},aS=e=>{const t=parseFloat(e);return isNaN(t)?e:t},sS=e=>{const t=Gt(e)?Number(e):NaN;return isNaN(t)?e:t};let nm;const Ox=()=>nm||(nm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pg(e){if(tt(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=Gt(r)?fS(r):Pg(r);if(i)for(const o in i)t[o]=i[o]}return t}else if(Gt(e)||Rt(e))return e}const lS=/;(?![^(]*\))/g,uS=/:([^]+)/,cS=/\/\*[^]*?\*\//g;function fS(e){const t={};return e.replace(cS,"").split(lS).forEach(n=>{if(n){const r=n.split(uS);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function pu(e){let t="";if(Gt(e))t=e;else if(tt(e))for(let n=0;n<e.length;n++){const r=pu(e[n]);r&&(t+=r+" ")}else if(Rt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const dS="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",hS=Mg(dS);function Nx(e){return!!e||e===""}const Lx=e=>!!(e&&e.__v_isRef===!0),di=e=>Gt(e)?e:e==null?"":tt(e)||Rt(e)&&(e.toString===zx||!it(e.toString))?Lx(e)?di(e.value):JSON.stringify(e,Dx,2):String(e),Dx=(e,t)=>Lx(t)?Dx(e,t.value):Na(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i],o)=>(n[yh(r,o)+" =>"]=i,n),{})}:Px(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>yh(n))}:io(t)?yh(t):Rt(t)&&!tt(t)&&!Fx(t)?String(t):t,yh=(e,t="")=>{var n;return io(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
6
|
* @vue/reactivity v3.4.38
|
|
7
7
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
8
|
* @license MIT
|
|
9
|
-
**/let vr;class pS{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=vr,!t&&vr&&(this.index=(vr.scopes||(vr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=vr;try{return vr=this,t()}finally{vr=n}}}on(){vr=this}off(){vr=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function gS(e,t=vr){t&&t.active&&t.effects.push(e)}function vS(){return vr}let Io;class Rg{constructor(t,n,r,i){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,gS(this,i)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,ao();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(bS(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),so()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Li,n=Io;try{return Li=!0,Io=this,this._runnings++,rm(this),this.fn()}finally{im(this),this._runnings--,Io=n,Li=t}}stop(){this.active&&(rm(this),im(this),this.onStop&&this.onStop(),this.active=!1)}}function bS(e){return e.value}function rm(e){e._trackId++,e._depsLength=0}function im(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Hx(e.deps[t],e);e.deps.length=e._depsLength}}function Hx(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Li=!0,Gp=0;const Ux=[];function ao(){Ux.push(Li),Li=!1}function so(){const e=Ux.pop();Li=e===void 0?!0:e}function zg(){Gp++}function Fg(){for(Gp--;!Gp&&Yp.length;)Yp.shift()()}function jx(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&Hx(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Yp=[];function Wx(e,t,n){zg();for(const r of e.keys()){let i;r._dirtyLevel<t&&(i??(i=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(i??(i=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Yp.push(r.scheduler)))}Fg()}const Vx=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Vc=new WeakMap,Bo=Symbol(""),Xp=Symbol("");function Wn(e,t,n){if(Li&&Io){let r=Vc.get(e);r||Vc.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=Vx(()=>r.delete(n))),jx(Io,i)}}function ci(e,t,n,r,i,o){const a=Vc.get(e);if(!a)return;let s=[];if(t==="clear")s=[...a.values()];else if(n==="length"&&tt(e)){const l=Number(r);a.forEach((u,c)=>{(c==="length"||!io(c)&&c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),t){case"add":tt(e)?Ag(n)&&s.push(a.get("length")):(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Xp)));break;case"delete":tt(e)||(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Xp)));break;case"set":Na(e)&&s.push(a.get(Bo));break}zg();for(const l of s)l&&Wx(l,4);Fg()}function mS(e,t){const n=Vc.get(e);return n&&n.get(t)}const yS=Mg("__proto__,__v_isRef,__isVue"),qx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(io)),om=_S();function _S(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=xt(this);for(let o=0,a=this.length;o<a;o++)Wn(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(xt)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ao(),zg();const r=xt(this)[t].apply(this,n);return Fg(),so(),r}}),e}function xS(e){io(e)||(e=String(e));const t=xt(this);return Wn(t,"has",e),t.hasOwnProperty(e)}class Gx{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(i?o?FS:Zx:o?Kx:Xx).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=tt(t);if(!i){if(a&&_t(om,n))return Reflect.get(om,n,r);if(n==="hasOwnProperty")return xS}const s=Reflect.get(t,n,r);return(io(n)?qx.has(n):yS(n))||(i||Wn(t,"get",n),o)?s:wn(s)?a&&Ag(n)?s:s.value:Rt(s)?i?El(s):Og(s):s}}class Yx extends Gx{constructor(t=!1){super(!1,t)}set(t,n,r,i){let o=t[n];if(!this._isShallow){const l=jo(o);if(!Ka(r)&&!jo(r)&&(o=xt(o),r=xt(r)),!tt(t)&&wn(o)&&!wn(r))return l?!1:(o.value=r,!0)}const a=tt(t)&&Ag(n)?Number(n)<t.length:_t(t,n),s=Reflect.set(t,n,r,i);return t===xt(i)&&(a?Hn(r,o)&&ci(t,"set",n,r):ci(t,"add",n,r)),s}deleteProperty(t,n){const r=_t(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&r&&ci(t,"delete",n,void 0),i}has(t,n){const r=Reflect.has(t,n);return(!io(n)||!qx.has(n))&&Wn(t,"has",n),r}ownKeys(t){return Wn(t,"iterate",tt(t)?"length":Bo),Reflect.ownKeys(t)}}class wS extends Gx{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const CS=new Yx,SS=new wS,$S=new Yx(!0);const Ig=e=>e,uf=e=>Reflect.getPrototypeOf(e);function Ou(e,t,n=!1,r=!1){e=e.__v_raw;const i=xt(e),o=xt(t);n||(Hn(t,o)&&Wn(i,"get",t),Wn(i,"get",o));const{has:a}=uf(i),s=r?Ig:n?Lg:Al;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Nu(e,t=!1){const n=this.__v_raw,r=xt(n),i=xt(e);return t||(Hn(e,i)&&Wn(r,"has",e),Wn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Lu(e,t=!1){return e=e.__v_raw,!t&&Wn(xt(e),"iterate",Bo),Reflect.get(e,"size",e)}function am(e,t=!1){!t&&!Ka(e)&&!jo(e)&&(e=xt(e));const n=xt(this);return uf(n).has.call(n,e)||(n.add(e),ci(n,"add",e,e)),this}function sm(e,t,n=!1){!n&&!Ka(t)&&!jo(t)&&(t=xt(t));const r=xt(this),{has:i,get:o}=uf(r);let a=i.call(r,e);a||(e=xt(e),a=i.call(r,e));const s=o.call(r,e);return r.set(e,t),a?Hn(t,s)&&ci(r,"set",e,t):ci(r,"add",e,t),this}function lm(e){const t=xt(this),{has:n,get:r}=uf(t);let i=n.call(t,e);i||(e=xt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&ci(t,"delete",e,void 0),o}function um(){const e=xt(this),t=e.size!==0,n=e.clear();return t&&ci(e,"clear",void 0,void 0),n}function Du(e,t){return function(r,i){const o=this,a=o.__v_raw,s=xt(a),l=t?Ig:e?Lg:Al;return!e&&Wn(s,"iterate",Bo),a.forEach((u,c)=>r.call(i,l(u),l(c),o))}}function Hu(e,t,n){return function(...r){const i=this.__v_raw,o=xt(i),a=Na(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...r),c=n?Ig:t?Lg:Al;return!t&&Wn(o,"iterate",l?Xp:Bo),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:s?[c(f[0]),c(f[1])]:c(f),done:d}},[Symbol.iterator](){return this}}}}function Ci(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function kS(){const e={get(o){return Ou(this,o)},get size(){return Lu(this)},has:Nu,add:am,set:sm,delete:lm,clear:um,forEach:Du(!1,!1)},t={get(o){return Ou(this,o,!1,!0)},get size(){return Lu(this)},has:Nu,add(o){return am.call(this,o,!0)},set(o,a){return sm.call(this,o,a,!0)},delete:lm,clear:um,forEach:Du(!1,!0)},n={get(o){return Ou(this,o,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Ci("add"),set:Ci("set"),delete:Ci("delete"),clear:Ci("clear"),forEach:Du(!0,!1)},r={get(o){return Ou(this,o,!0,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Ci("add"),set:Ci("set"),delete:Ci("delete"),clear:Ci("clear"),forEach:Du(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Hu(o,!1,!1),n[o]=Hu(o,!0,!1),t[o]=Hu(o,!1,!0),r[o]=Hu(o,!0,!0)}),[e,n,t,r]}const[MS,TS,ES,AS]=kS();function Bg(e,t){const n=t?e?AS:ES:e?TS:MS;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_t(n,i)&&i in r?n:r,i,o)}const PS={get:Bg(!1,!1)},RS={get:Bg(!1,!0)},zS={get:Bg(!0,!1)};const Xx=new WeakMap,Kx=new WeakMap,Zx=new WeakMap,FS=new WeakMap;function IS(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function BS(e){return e.__v_skip||!Object.isExtensible(e)?0:IS(rS(e))}function Og(e){return jo(e)?e:Ng(e,!1,CS,PS,Xx)}function OS(e){return Ng(e,!1,$S,RS,Kx)}function El(e){return Ng(e,!0,SS,zS,Zx)}function Ng(e,t,n,r,i){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const a=BS(e);if(a===0)return e;const s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function cl(e){return jo(e)?cl(e.__v_raw):!!(e&&e.__v_isReactive)}function jo(e){return!!(e&&e.__v_isReadonly)}function Ka(e){return!!(e&&e.__v_isShallow)}function Jx(e){return e?!!e.__v_raw:!1}function xt(e){const t=e&&e.__v_raw;return t?xt(t):e}function NS(e){return Object.isExtensible(e)&&Bx(e,"__v_skip",!0),e}const Al=e=>Rt(e)?Og(e):e,Lg=e=>Rt(e)?El(e):e;class Qx{constructor(t,n,r,i){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Rg(()=>t(this._value),()=>dl(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=xt(this);return(!t._cacheable||t.effect.dirty)&&Hn(t._value,t._value=t.effect.run())&&dl(t,4),Dg(t),t.effect._dirtyLevel>=2&&dl(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function LS(e,t,n=!1){let r,i;const o=it(e);return o?(r=e,i=sr):(r=e.get,i=e.set),new Qx(r,i,o||!i,n)}function Dg(e){var t;Li&&Io&&(e=xt(e),jx(Io,(t=e.dep)!=null?t:e.dep=Vx(()=>e.dep=void 0,e instanceof Qx?e:void 0)))}function dl(e,t=4,n,r){e=xt(e);const i=e.dep;i&&Wx(i,t)}function wn(e){return!!(e&&e.__v_isRef===!0)}function ne(e){return ew(e,!1)}function DS(e){return ew(e,!0)}function ew(e,t){return wn(e)?e:new HS(e,t)}class HS{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:xt(t),this._value=n?t:Al(t)}get value(){return Dg(this),this._value}set value(t){const n=this.__v_isShallow||Ka(t)||jo(t);t=n?t:xt(t),Hn(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Al(t),dl(this,4))}}function qe(e){return wn(e)?e.value:e}const US={get:(e,t,n)=>qe(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return wn(i)&&!wn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tw(e){return cl(e)?e:new Proxy(e,US)}class jS{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Dg(this),()=>dl(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function WS(e){return new jS(e)}class VS{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return mS(xt(this._object),this._key)}}class qS{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function et(e,t,n){return wn(e)?e:it(e)?new qS(e):Rt(e)&&arguments.length>1?GS(e,t,n):ne(e)}function GS(e,t,n){const r=e[t];return wn(r)?r:new VS(e,t,n)}/**
|
|
9
|
+
**/let vr;class pS{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=vr,!t&&vr&&(this.index=(vr.scopes||(vr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=vr;try{return vr=this,t()}finally{vr=n}}}on(){vr=this}off(){vr=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function gS(e,t=vr){t&&t.active&&t.effects.push(e)}function vS(){return vr}let Io;class Rg{constructor(t,n,r,i){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,gS(this,i)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,ao();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(bS(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),so()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Li,n=Io;try{return Li=!0,Io=this,this._runnings++,rm(this),this.fn()}finally{im(this),this._runnings--,Io=n,Li=t}}stop(){this.active&&(rm(this),im(this),this.onStop&&this.onStop(),this.active=!1)}}function bS(e){return e.value}function rm(e){e._trackId++,e._depsLength=0}function im(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Hx(e.deps[t],e);e.deps.length=e._depsLength}}function Hx(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Li=!0,Gp=0;const Ux=[];function ao(){Ux.push(Li),Li=!1}function so(){const e=Ux.pop();Li=e===void 0?!0:e}function zg(){Gp++}function Fg(){for(Gp--;!Gp&&Yp.length;)Yp.shift()()}function jx(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&Hx(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Yp=[];function Wx(e,t,n){zg();for(const r of e.keys()){let i;r._dirtyLevel<t&&(i??(i=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(i??(i=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Yp.push(r.scheduler)))}Fg()}const Vx=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Vc=new WeakMap,Bo=Symbol(""),Xp=Symbol("");function Wn(e,t,n){if(Li&&Io){let r=Vc.get(e);r||Vc.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=Vx(()=>r.delete(n))),jx(Io,i)}}function ci(e,t,n,r,i,o){const a=Vc.get(e);if(!a)return;let s=[];if(t==="clear")s=[...a.values()];else if(n==="length"&&tt(e)){const l=Number(r);a.forEach((u,c)=>{(c==="length"||!io(c)&&c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),t){case"add":tt(e)?Ag(n)&&s.push(a.get("length")):(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Xp)));break;case"delete":tt(e)||(s.push(a.get(Bo)),Na(e)&&s.push(a.get(Xp)));break;case"set":Na(e)&&s.push(a.get(Bo));break}zg();for(const l of s)l&&Wx(l,4);Fg()}function mS(e,t){const n=Vc.get(e);return n&&n.get(t)}const yS=Mg("__proto__,__v_isRef,__isVue"),qx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(io)),om=_S();function _S(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=xt(this);for(let o=0,a=this.length;o<a;o++)Wn(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(xt)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ao(),zg();const r=xt(this)[t].apply(this,n);return Fg(),so(),r}}),e}function xS(e){io(e)||(e=String(e));const t=xt(this);return Wn(t,"has",e),t.hasOwnProperty(e)}class Gx{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(i?o?FS:Zx:o?Kx:Xx).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=tt(t);if(!i){if(a&&_t(om,n))return Reflect.get(om,n,r);if(n==="hasOwnProperty")return xS}const s=Reflect.get(t,n,r);return(io(n)?qx.has(n):yS(n))||(i||Wn(t,"get",n),o)?s:wn(s)?a&&Ag(n)?s:s.value:Rt(s)?i?El(s):Og(s):s}}class Yx extends Gx{constructor(t=!1){super(!1,t)}set(t,n,r,i){let o=t[n];if(!this._isShallow){const l=jo(o);if(!Ka(r)&&!jo(r)&&(o=xt(o),r=xt(r)),!tt(t)&&wn(o)&&!wn(r))return l?!1:(o.value=r,!0)}const a=tt(t)&&Ag(n)?Number(n)<t.length:_t(t,n),s=Reflect.set(t,n,r,i);return t===xt(i)&&(a?Hn(r,o)&&ci(t,"set",n,r):ci(t,"add",n,r)),s}deleteProperty(t,n){const r=_t(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&r&&ci(t,"delete",n,void 0),i}has(t,n){const r=Reflect.has(t,n);return(!io(n)||!qx.has(n))&&Wn(t,"has",n),r}ownKeys(t){return Wn(t,"iterate",tt(t)?"length":Bo),Reflect.ownKeys(t)}}class wS extends Gx{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const CS=new Yx,SS=new wS,$S=new Yx(!0);const Ig=e=>e,ud=e=>Reflect.getPrototypeOf(e);function Ou(e,t,n=!1,r=!1){e=e.__v_raw;const i=xt(e),o=xt(t);n||(Hn(t,o)&&Wn(i,"get",t),Wn(i,"get",o));const{has:a}=ud(i),s=r?Ig:n?Lg:Al;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Nu(e,t=!1){const n=this.__v_raw,r=xt(n),i=xt(e);return t||(Hn(e,i)&&Wn(r,"has",e),Wn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Lu(e,t=!1){return e=e.__v_raw,!t&&Wn(xt(e),"iterate",Bo),Reflect.get(e,"size",e)}function am(e,t=!1){!t&&!Ka(e)&&!jo(e)&&(e=xt(e));const n=xt(this);return ud(n).has.call(n,e)||(n.add(e),ci(n,"add",e,e)),this}function sm(e,t,n=!1){!n&&!Ka(t)&&!jo(t)&&(t=xt(t));const r=xt(this),{has:i,get:o}=ud(r);let a=i.call(r,e);a||(e=xt(e),a=i.call(r,e));const s=o.call(r,e);return r.set(e,t),a?Hn(t,s)&&ci(r,"set",e,t):ci(r,"add",e,t),this}function lm(e){const t=xt(this),{has:n,get:r}=ud(t);let i=n.call(t,e);i||(e=xt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&ci(t,"delete",e,void 0),o}function um(){const e=xt(this),t=e.size!==0,n=e.clear();return t&&ci(e,"clear",void 0,void 0),n}function Du(e,t){return function(r,i){const o=this,a=o.__v_raw,s=xt(a),l=t?Ig:e?Lg:Al;return!e&&Wn(s,"iterate",Bo),a.forEach((u,c)=>r.call(i,l(u),l(c),o))}}function Hu(e,t,n){return function(...r){const i=this.__v_raw,o=xt(i),a=Na(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...r),c=n?Ig:t?Lg:Al;return!t&&Wn(o,"iterate",l?Xp:Bo),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:s?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Ci(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function kS(){const e={get(o){return Ou(this,o)},get size(){return Lu(this)},has:Nu,add:am,set:sm,delete:lm,clear:um,forEach:Du(!1,!1)},t={get(o){return Ou(this,o,!1,!0)},get size(){return Lu(this)},has:Nu,add(o){return am.call(this,o,!0)},set(o,a){return sm.call(this,o,a,!0)},delete:lm,clear:um,forEach:Du(!1,!0)},n={get(o){return Ou(this,o,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Ci("add"),set:Ci("set"),delete:Ci("delete"),clear:Ci("clear"),forEach:Du(!0,!1)},r={get(o){return Ou(this,o,!0,!0)},get size(){return Lu(this,!0)},has(o){return Nu.call(this,o,!0)},add:Ci("add"),set:Ci("set"),delete:Ci("delete"),clear:Ci("clear"),forEach:Du(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Hu(o,!1,!1),n[o]=Hu(o,!0,!1),t[o]=Hu(o,!1,!0),r[o]=Hu(o,!0,!0)}),[e,n,t,r]}const[MS,TS,ES,AS]=kS();function Bg(e,t){const n=t?e?AS:ES:e?TS:MS;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_t(n,i)&&i in r?n:r,i,o)}const PS={get:Bg(!1,!1)},RS={get:Bg(!1,!0)},zS={get:Bg(!0,!1)};const Xx=new WeakMap,Kx=new WeakMap,Zx=new WeakMap,FS=new WeakMap;function IS(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function BS(e){return e.__v_skip||!Object.isExtensible(e)?0:IS(rS(e))}function Og(e){return jo(e)?e:Ng(e,!1,CS,PS,Xx)}function OS(e){return Ng(e,!1,$S,RS,Kx)}function El(e){return Ng(e,!0,SS,zS,Zx)}function Ng(e,t,n,r,i){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const a=BS(e);if(a===0)return e;const s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function cl(e){return jo(e)?cl(e.__v_raw):!!(e&&e.__v_isReactive)}function jo(e){return!!(e&&e.__v_isReadonly)}function Ka(e){return!!(e&&e.__v_isShallow)}function Jx(e){return e?!!e.__v_raw:!1}function xt(e){const t=e&&e.__v_raw;return t?xt(t):e}function NS(e){return Object.isExtensible(e)&&Bx(e,"__v_skip",!0),e}const Al=e=>Rt(e)?Og(e):e,Lg=e=>Rt(e)?El(e):e;class Qx{constructor(t,n,r,i){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Rg(()=>t(this._value),()=>fl(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=xt(this);return(!t._cacheable||t.effect.dirty)&&Hn(t._value,t._value=t.effect.run())&&fl(t,4),Dg(t),t.effect._dirtyLevel>=2&&fl(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function LS(e,t,n=!1){let r,i;const o=it(e);return o?(r=e,i=sr):(r=e.get,i=e.set),new Qx(r,i,o||!i,n)}function Dg(e){var t;Li&&Io&&(e=xt(e),jx(Io,(t=e.dep)!=null?t:e.dep=Vx(()=>e.dep=void 0,e instanceof Qx?e:void 0)))}function fl(e,t=4,n,r){e=xt(e);const i=e.dep;i&&Wx(i,t)}function wn(e){return!!(e&&e.__v_isRef===!0)}function ne(e){return ew(e,!1)}function DS(e){return ew(e,!0)}function ew(e,t){return wn(e)?e:new HS(e,t)}class HS{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:xt(t),this._value=n?t:Al(t)}get value(){return Dg(this),this._value}set value(t){const n=this.__v_isShallow||Ka(t)||jo(t);t=n?t:xt(t),Hn(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Al(t),fl(this,4))}}function qe(e){return wn(e)?e.value:e}const US={get:(e,t,n)=>qe(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return wn(i)&&!wn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tw(e){return cl(e)?e:new Proxy(e,US)}class jS{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Dg(this),()=>fl(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function WS(e){return new jS(e)}class VS{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return mS(xt(this._object),this._key)}}class qS{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function et(e,t,n){return wn(e)?e:it(e)?new qS(e):Rt(e)&&arguments.length>1?GS(e,t,n):ne(e)}function GS(e,t,n){const r=e[t];return wn(r)?r:new VS(e,t,n)}/**
|
|
10
10
|
* @vue/runtime-core v3.4.38
|
|
11
11
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
12
|
* @license MIT
|
|
13
|
-
**/function Di(e,t,n,r){try{return r?e(...r):e()}catch(i){cf(i,t,n)}}function dr(e,t,n,r){if(it(e)){const i=Di(e,t,n,r);return i&&Rx(i)&&i.catch(o=>{cf(o,t,n)}),i}if(tt(e)){const i=[];for(let o=0;o<e.length;o++)i.push(dr(e[o],t,n,r));return i}}function cf(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const a=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const u=o.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,a,s)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){ao(),Di(l,null,10,[e,a,s]),so();return}}YS(e,n,i,r)}function YS(e,t,n,r=!0){console.error(e)}let Pl=!1,Kp=!1;const yn=[];let Fr=0;const La=[];let Ti=null,Eo=0;const nw=Promise.resolve();let Hg=null;function dn(e){const t=Hg||nw;return e?t.then(this?e.bind(this):e):t}function XS(e){let t=Fr+1,n=yn.length;for(;t<n;){const r=t+n>>>1,i=yn[r],o=Rl(i);o<e||o===e&&i.pre?t=r+1:n=r}return t}function Ug(e){(!yn.length||!yn.includes(e,Pl&&e.allowRecurse?Fr+1:Fr))&&(e.id==null?yn.push(e):yn.splice(XS(e.id),0,e),rw())}function rw(){!Pl&&!Kp&&(Kp=!0,Hg=nw.then(ow))}function KS(e){const t=yn.indexOf(e);t>Fr&&yn.splice(t,1)}function ZS(e){tt(e)?La.push(...e):(!Ti||!Ti.includes(e,e.allowRecurse?Eo+1:Eo))&&La.push(e),rw()}function cm(e,t,n=Pl?Fr+1:0){for(;n<yn.length;n++){const r=yn[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;yn.splice(n,1),n--,r()}}}function iw(e){if(La.length){const t=[...new Set(La)].sort((n,r)=>Rl(n)-Rl(r));if(La.length=0,Ti){Ti.push(...t);return}for(Ti=t,Eo=0;Eo<Ti.length;Eo++){const n=Ti[Eo];n.active!==!1&&n()}Ti=null,Eo=0}}const Rl=e=>e.id==null?1/0:e.id,JS=(e,t)=>{const n=Rl(e)-Rl(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ow(e){Kp=!1,Pl=!0,yn.sort(JS);try{for(Fr=0;Fr<yn.length;Fr++){const t=yn[Fr];t&&t.active!==!1&&Di(t,t.i,t.i?15:14)}}finally{Fr=0,yn.length=0,iw(),Pl=!1,Hg=null,(yn.length||La.length)&&ow()}}let ln=null,aw=null;function qc(e){const t=ln;return ln=e,aw=e&&e.type.__scopeId||null,t}function mt(e,t=ln,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&xm(-1);const o=qc(t);let a;try{a=e(...i)}finally{qc(o),r._d&&xm(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function lo(e,t){if(ln===null)return e;const n=bf(ln),r=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,s,l=Tt]=t[i];o&&(it(o)&&(o={mounted:o,updated:o}),o.deep&&Ii(a),r.push({dir:o,instance:n,value:a,oldValue:void 0,arg:s,modifiers:l}))}return e}function mo(e,t,n,r){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[r];l&&(ao(),dr(l,n,8,[e.el,s,e,t]),so())}}const Ei=Symbol("_leaveCb"),Uu=Symbol("_enterCb");function sw(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return fn(()=>{e.isMounted=!0}),Bn(()=>{e.isUnmounting=!0}),e}const Qn=[Function,Array],lw={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qn,onEnter:Qn,onAfterEnter:Qn,onEnterCancelled:Qn,onBeforeLeave:Qn,onLeave:Qn,onAfterLeave:Qn,onLeaveCancelled:Qn,onBeforeAppear:Qn,onAppear:Qn,onAfterAppear:Qn,onAppearCancelled:Qn},uw=e=>{const t=e.subTree;return t.component?uw(t.component):t},QS={name:"BaseTransition",props:lw,setup(e,{slots:t}){const n=ps(),r=sw();return()=>{const i=t.default&&jg(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const d of i)if(d.type!==sn){o=d;break}}const a=xt(e),{mode:s}=a;if(r.isLeaving)return _h(o);const l=dm(o);if(!l)return _h(o);let u=zl(l,a,r,n,d=>u=d);Za(l,u);const c=n.subTree,f=c&&dm(c);if(f&&f.type!==sn&&!Ao(l,f)&&uw(n).type!==sn){const d=zl(f,a,r,n);if(Za(f,d),s==="out-in"&&l.type!==sn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},_h(o);s==="in-out"&&l.type!==sn&&(d.delayLeave=(h,p,g)=>{const b=cw(r,f);b[String(f.key)]=f,h[Ei]=()=>{p(),h[Ei]=void 0,delete u.delayedLeave},u.delayedLeave=g})}return o}}},e$=QS;function cw(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function zl(e,t,n,r,i){const{appear:o,mode:a,persisted:s=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:b,onAppear:v,onAfterAppear:x,onAppearCancelled:y}=t,_=String(e.key),S=cw(n,e),$=(M,P)=>{M&&dr(M,r,9,P)},w=(M,P)=>{const R=P[1];$(M,P),tt(M)?M.every(C=>C.length<=1)&&R():M.length<=1&&R()},T={mode:a,persisted:s,beforeEnter(M){let P=l;if(!n.isMounted)if(o)P=b||l;else return;M[Ei]&&M[Ei](!0);const R=S[_];R&&Ao(e,R)&&R.el[Ei]&&R.el[Ei](),$(P,[M])},enter(M){let P=u,R=c,C=f;if(!n.isMounted)if(o)P=v||u,R=x||c,C=y||f;else return;let E=!1;const F=M[Uu]=z=>{E||(E=!0,z?$(C,[M]):$(R,[M]),T.delayedLeave&&T.delayedLeave(),M[Uu]=void 0)};P?w(P,[M,F]):F()},leave(M,P){const R=String(e.key);if(M[Uu]&&M[Uu](!0),n.isUnmounting)return P();$(d,[M]);let C=!1;const E=M[Ei]=F=>{C||(C=!0,P(),F?$(g,[M]):$(p,[M]),M[Ei]=void 0,S[R]===e&&delete S[R])};S[R]=e,h?w(h,[M,E]):E()},clone(M){const P=zl(M,t,n,r,i);return i&&i(P),P}};return T}function _h(e){if(df(e))return e=Vr(e),e.children=null,e}function dm(e){if(!df(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&it(n.default))return n.default()}}function Za(e,t){e.shapeFlag&6&&e.component?Za(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function jg(e,t=!1,n){let r=[],i=0;for(let o=0;o<e.length;o++){let a=e[o];const s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===kt?(a.patchFlag&128&&i++,r=r.concat(jg(a.children,t,s))):(t||a.type!==sn)&&r.push(s!=null?Vr(a,{key:s}):a)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Fe(e,t){return it(e)?nn({name:e.name},t,{setup:e}):e}const fl=e=>!!e.type.__asyncLoader,df=e=>e.type.__isKeepAlive;function Wg(e,t){dw(e,"a",t)}function Vg(e,t){dw(e,"da",t)}function dw(e,t,n=_n){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(ff(t,r,n),n){let i=n.parent;for(;i&&i.parent;)df(i.parent.vnode)&&t$(r,t,n,i),i=i.parent}}function t$(e,t,n,r){const i=ff(t,e,r,!0);pw(()=>{Eg(r[t],i)},n)}function ff(e,t,n=_n,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{ao();const s=vu(n),l=dr(t,n,e,a);return s(),so(),l});return r?i.unshift(o):i.push(o),o}}const mi=e=>(t,n=_n)=>{(!vf||e==="sp")&&ff(e,(...r)=>t(...r),n)},hf=mi("bm"),fn=mi("m"),fw=mi("bu"),hw=mi("u"),Bn=mi("bum"),pw=mi("um"),n$=mi("sp"),r$=mi("rtg"),i$=mi("rtc");function o$(e,t=_n){ff("ec",e,t)}const a$=Symbol.for("v-ndc");function gw(e,t,n,r){let i;const o=n;if(tt(e)||Gt(e)){i=new Array(e.length);for(let a=0,s=e.length;a<s;a++)i[a]=t(e[a],a,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=t(a+1,a,void 0,o)}else if(Rt(e))if(e[Symbol.iterator])i=Array.from(e,(a,s)=>t(a,s,void 0,o));else{const a=Object.keys(e);i=new Array(a.length);for(let s=0,l=a.length;s<l;s++){const u=a[s];i[s]=t(e[u],u,s,o)}}else i=[];return i}function qg(e,t,n={},r,i){if(ln.isCE||ln.parent&&fl(ln.parent)&&ln.parent.isCE)return Ge("slot",n,r);let o=e[t];o&&o._c&&(o._d=!1),We();const a=o&&vw(o(n)),s=It(kt,{key:(n.key||a&&a.key||`_${t}`)+""},a||[],a&&e._===1?64:-2);return s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function vw(e){return e.some(t=>Il(t)?!(t.type===sn||t.type===kt&&!vw(t.children)):!0)?e:null}const Zp=e=>e?Nw(e)?bf(e):Zp(e.parent):null,hl=nn(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=>Zp(e.parent),$root:e=>Zp(e.root),$emit:e=>e.emit,$options:e=>mw(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Ug(e.update)}),$nextTick:e=>e.n||(e.n=dn.bind(e.proxy)),$watch:e=>R$.bind(e)}),xh=(e,t)=>e!==Tt&&!e.__isScriptSetup&&_t(e,t),s$={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const h=a[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(xh(r,t))return a[t]=1,r[t];if(i!==Tt&&_t(i,t))return a[t]=2,i[t];if((u=e.propsOptions[0])&&_t(u,t))return a[t]=3,o[t];if(n!==Tt&&_t(n,t))return a[t]=4,n[t];Jp&&(a[t]=0)}}const c=hl[t];let f,d;if(c)return t==="$attrs"&&Wn(e.attrs,"get",""),c(e);if((f=s.__cssModules)&&(f=f[t]))return f;if(n!==Tt&&_t(n,t))return a[t]=4,n[t];if(d=l.config.globalProperties,_t(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return xh(i,t)?(i[t]=n,!0):r!==Tt&&_t(r,t)?(r[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||e!==Tt&&_t(e,a)||xh(t,a)||(s=o[0])&&_t(s,a)||_t(r,a)||_t(hl,a)||_t(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Gc(e){return tt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Yc(e,t){return!e||!t?e||t:tt(e)&&tt(t)?e.concat(t):nn({},Gc(e),Gc(t))}let Jp=!0;function l$(e){const t=mw(e),n=e.proxy,r=e.ctx;Jp=!1,t.beforeCreate&&fm(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:g,deactivated:b,beforeDestroy:v,beforeUnmount:x,destroyed:y,unmounted:_,render:S,renderTracked:$,renderTriggered:w,errorCaptured:T,serverPrefetch:M,expose:P,inheritAttrs:R,components:C,directives:E,filters:F}=t;if(u&&u$(u,r,null),a)for(const Z in a){const J=a[Z];it(J)&&(r[Z]=J.bind(n))}if(i){const Z=i.call(n,n);Rt(Z)&&(e.data=Og(Z))}if(Jp=!0,o)for(const Z in o){const J=o[Z],ie=it(J)?J.bind(n,n):it(J.get)?J.get.bind(n,n):sr,he=!it(J)&&it(J.set)?J.set.bind(n):sr,_e=pe({get:ie,set:he});Object.defineProperty(r,Z,{enumerable:!0,configurable:!0,get:()=>_e.value,set:oe=>_e.value=oe})}if(s)for(const Z in s)bw(s[Z],r,n,Z);if(l){const Z=it(l)?l.call(n):l;Reflect.ownKeys(Z).forEach(J=>{jn(J,Z[J])})}c&&fm(c,e,"c");function j(Z,J){tt(J)?J.forEach(ie=>Z(ie.bind(n))):J&&Z(J.bind(n))}if(j(hf,f),j(fn,d),j(fw,h),j(hw,p),j(Wg,g),j(Vg,b),j(o$,T),j(i$,$),j(r$,w),j(Bn,x),j(pw,_),j(n$,M),tt(P))if(P.length){const Z=e.exposed||(e.exposed={});P.forEach(J=>{Object.defineProperty(Z,J,{get:()=>n[J],set:ie=>n[J]=ie})})}else e.exposed||(e.exposed={});S&&e.render===sr&&(e.render=S),R!=null&&(e.inheritAttrs=R),C&&(e.components=C),E&&(e.directives=E)}function u$(e,t,n=sr){tt(e)&&(e=Qp(e));for(const r in e){const i=e[r];let o;Rt(i)?"default"in i?o=$t(i.from||r,i.default,!0):o=$t(i.from||r):o=$t(i),wn(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[r]=o}}function fm(e,t,n){dr(tt(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function bw(e,t,n,r){const i=r.includes(".")?zw(n,r):()=>n[r];if(Gt(e)){const o=t[e];it(o)&&vt(i,o)}else if(it(e))vt(i,e.bind(n));else if(Rt(e))if(tt(e))e.forEach(o=>bw(o,t,n,r));else{const o=it(e.handler)?e.handler.bind(n):t[e.handler];it(o)&&vt(i,o,e)}}function mw(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(t);let l;return s?l=s:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(u=>Xc(l,u,a,!0)),Xc(l,t,a)),Rt(t)&&o.set(t,l),l}function Xc(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&Xc(e,o,n,!0),i&&i.forEach(a=>Xc(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const s=c$[a]||n&&n[a];e[a]=s?s(e[a],t[a]):t[a]}return e}const c$={data:hm,props:pm,emits:pm,methods:Vs,computed:Vs,beforeCreate:$n,created:$n,beforeMount:$n,mounted:$n,beforeUpdate:$n,updated:$n,beforeDestroy:$n,beforeUnmount:$n,destroyed:$n,unmounted:$n,activated:$n,deactivated:$n,errorCaptured:$n,serverPrefetch:$n,components:Vs,directives:Vs,watch:f$,provide:hm,inject:d$};function hm(e,t){return t?e?function(){return nn(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function d$(e,t){return Vs(Qp(e),Qp(t))}function Qp(e){if(tt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function $n(e,t){return e?[...new Set([].concat(e,t))]:t}function Vs(e,t){return e?nn(Object.create(null),e,t):t}function pm(e,t){return e?tt(e)&&tt(t)?[...new Set([...e,...t])]:nn(Object.create(null),Gc(e),Gc(t??{})):t}function f$(e,t){if(!e)return t;if(!t)return e;const n=nn(Object.create(null),e);for(const r in t)n[r]=$n(e[r],t[r]);return n}function yw(){return{app:null,config:{isNativeTag:tS,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 h$=0;function p$(e,t){return function(r,i=null){it(r)||(r=nn({},r)),i!=null&&!Rt(i)&&(i=null);const o=yw(),a=new WeakSet;let s=!1;const l=o.app={_uid:h$++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:Z$,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&it(u.install)?(a.add(u),u.install(l,...c)):it(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,f){if(!s){const d=Ge(r,i);return d.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),e(d,u,f),s=!0,l._container=u,u.__vue_app__=l,bf(d.component)}},unmount(){s&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l},runWithContext(u){const c=Da;Da=l;try{return u()}finally{Da=c}}};return l}}let Da=null;function jn(e,t){if(_n){let n=_n.provides;const r=_n.parent&&_n.parent.provides;r===n&&(n=_n.provides=Object.create(r)),n[e]=t}}function $t(e,t,n=!1){const r=_n||ln;if(r||Da){const i=Da?Da._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&it(t)?t.call(r&&r.proxy):t}}const _w={},xw=()=>Object.create(_w),ww=e=>Object.getPrototypeOf(e)===_w;function g$(e,t,n,r=!1){const i={},o=xw();e.propsDefaults=Object.create(null),Cw(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:OS(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function v$(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,s=xt(i),[l]=e.propsOptions;let u=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let d=c[f];if(gf(e.emitsOptions,d))continue;const h=t[d];if(l)if(_t(o,d))h!==o[d]&&(o[d]=h,u=!0);else{const p=Gi(d);i[p]=e0(l,s,p,h,e,!1)}else h!==o[d]&&(o[d]=h,u=!0)}}}else{Cw(e,t,i,o)&&(u=!0);let c;for(const f in s)(!t||!_t(t,f)&&((c=oo(f))===f||!_t(t,c)))&&(l?n&&(n[f]!==void 0||n[c]!==void 0)&&(i[f]=e0(l,s,f,void 0,e,!0)):delete i[f]);if(o!==s)for(const f in o)(!t||!_t(t,f))&&(delete o[f],u=!0)}u&&ci(e.attrs,"set","")}function Cw(e,t,n,r){const[i,o]=e.propsOptions;let a=!1,s;if(t)for(let l in t){if(ul(l))continue;const u=t[l];let c;i&&_t(i,c=Gi(l))?!o||!o.includes(c)?n[c]=u:(s||(s={}))[c]=u:gf(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,a=!0)}if(o){const l=xt(n),u=s||Tt;for(let c=0;c<o.length;c++){const f=o[c];n[f]=e0(i,l,f,u[f],e,!_t(u,f))}}return a}function e0(e,t,n,r,i,o){const a=e[n];if(a!=null){const s=_t(a,"default");if(s&&r===void 0){const l=a.default;if(a.type!==Function&&!a.skipFactory&&it(l)){const{propsDefaults:u}=i;if(n in u)r=u[n];else{const c=vu(i);r=u[n]=l.call(null,t),c()}}else r=l}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===oo(n))&&(r=!0))}return r}const b$=new WeakMap;function Sw(e,t,n=!1){const r=n?b$:t.propsCache,i=r.get(e);if(i)return i;const o=e.props,a={},s=[];let l=!1;if(!it(e)){const c=f=>{l=!0;const[d,h]=Sw(f,t,!0);nn(a,d),h&&s.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!l)return Rt(e)&&r.set(e,Oa),Oa;if(tt(o))for(let c=0;c<o.length;c++){const f=Gi(o[c]);gm(f)&&(a[f]=Tt)}else if(o)for(const c in o){const f=Gi(c);if(gm(f)){const d=o[c],h=a[f]=tt(d)||it(d)?{type:d}:nn({},d),p=h.type;let g=!1,b=!0;if(tt(p))for(let v=0;v<p.length;++v){const x=p[v],y=it(x)&&x.name;if(y==="Boolean"){g=!0;break}else y==="String"&&(b=!1)}else g=it(p)&&p.name==="Boolean";h[0]=g,h[1]=b,(g||_t(h,"default"))&&s.push(f)}}const u=[a,s];return Rt(e)&&r.set(e,u),u}function gm(e){return e[0]!=="$"&&!ul(e)}const $w=e=>e[0]==="_"||e==="$stable",Gg=e=>tt(e)?e.map(zr):[zr(e)],m$=(e,t,n)=>{if(t._n)return t;const r=mt((...i)=>Gg(t(...i)),n);return r._c=!1,r},kw=(e,t,n)=>{const r=e._ctx;for(const i in e){if($w(i))continue;const o=e[i];if(it(o))t[i]=m$(i,o,r);else if(o!=null){const a=Gg(o);t[i]=()=>a}}},Mw=(e,t)=>{const n=Gg(t);e.slots.default=()=>n},Tw=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},y$=(e,t,n)=>{const r=e.slots=xw();if(e.vnode.shapeFlag&32){const i=t._;i?(Tw(r,t,n),n&&Bx(r,"_",i,!0)):kw(t,r)}else t&&Mw(e,t)},_$=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,a=Tt;if(r.shapeFlag&32){const s=t._;s?n&&s===1?o=!1:Tw(i,t,n):(o=!t.$stable,kw(t,i)),a=t}else t&&(Mw(e,t),a={default:1});if(o)for(const s in i)!$w(s)&&a[s]==null&&delete i[s]};function t0(e,t,n,r,i=!1){if(tt(e)){e.forEach((d,h)=>t0(d,t&&(tt(t)?t[h]:t),n,r,i));return}if(fl(r)&&!i)return;const o=r.shapeFlag&4?bf(r.component):r.el,a=i?null:o,{i:s,r:l}=e,u=t&&t.r,c=s.refs===Tt?s.refs={}:s.refs,f=s.setupState;if(u!=null&&u!==l&&(Gt(u)?(c[u]=null,_t(f,u)&&(f[u]=null)):wn(u)&&(u.value=null)),it(l))Di(l,s,12,[a,c]);else{const d=Gt(l),h=wn(l);if(d||h){const p=()=>{if(e.f){const g=d?_t(f,l)?f[l]:c[l]:l.value;i?tt(g)&&Eg(g,o):tt(g)?g.includes(o)||g.push(o):d?(c[l]=[o],_t(f,l)&&(f[l]=c[l])):(l.value=[o],e.k&&(c[e.k]=l.value))}else d?(c[l]=a,_t(f,l)&&(f[l]=a)):h&&(l.value=a,e.k&&(c[e.k]=a))};a?(p.id=-1,Ln(p,n)):p()}}}const Ew=Symbol("_vte"),x$=e=>e.__isTeleport,pl=e=>e&&(e.disabled||e.disabled===""),vm=e=>typeof SVGElement<"u"&&e instanceof SVGElement,bm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,n0=(e,t)=>{const n=e&&e.to;return Gt(n)?t?t(n):null:n},w$={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,o,a,s,l,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:g,createComment:b}}=u,v=pl(t.props);let{shapeFlag:x,children:y,dynamicChildren:_}=t;if(e==null){const S=t.el=g(""),$=t.anchor=g("");h(S,n,r),h($,n,r);const w=t.target=n0(t.props,p),T=Pw(w,t,g,h);w&&(a==="svg"||vm(w)?a="svg":(a==="mathml"||bm(w))&&(a="mathml"));const M=(P,R)=>{x&16&&c(y,P,R,i,o,a,s,l)};v?M(n,$):w&&M(w,T)}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,$=t.target=e.target,w=t.targetAnchor=e.targetAnchor,T=pl(e.props),M=T?n:$,P=T?S:w;if(a==="svg"||vm($)?a="svg":(a==="mathml"||bm($))&&(a="mathml"),_?(d(e.dynamicChildren,_,M,i,o,a,s),Yg(e,t,!0)):l||f(e,t,M,P,i,o,a,s,!1),v)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ju(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=n0(t.props,p);R&&ju(t,R,null,u,0)}else T&&ju(t,$,w,u,1)}Aw(t)},remove(e,t,n,{um:r,o:{remove:i}},o){const{shapeFlag:a,children:s,anchor:l,targetStart:u,targetAnchor:c,target:f,props:d}=e;if(f&&(i(u),i(c)),o&&i(l),a&16){const h=o||!pl(d);for(let p=0;p<s.length;p++){const g=s[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:ju,hydrate:C$};function ju(e,t,n,{o:{insert:r},m:i},o=2){o===0&&r(e.targetAnchor,t,n);const{el:a,anchor:s,shapeFlag:l,children:u,props:c}=e,f=o===2;if(f&&r(a,t,n),(!f||pl(c))&&l&16)for(let d=0;d<u.length;d++)i(u[d],t,n,2);f&&r(s,t,n)}function C$(e,t,n,r,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l,insert:u,createText:c}},f){const d=t.target=n0(t.props,l);if(d){const h=d._lpa||d.firstChild;if(t.shapeFlag&16)if(pl(t.props))t.anchor=f(a(e),t,s(e),n,r,i,o),t.targetStart=h,t.targetAnchor=h&&a(h);else{t.anchor=a(e);let p=h;for(;p;){if(p&&p.nodeType===8){if(p.data==="teleport start anchor")t.targetStart=p;else if(p.data==="teleport anchor"){t.targetAnchor=p,d._lpa=t.targetAnchor&&a(t.targetAnchor);break}}p=a(p)}t.targetAnchor||Pw(d,t,c,u),f(h&&a(h),t,d,n,r,i,o)}Aw(t)}return t.anchor&&a(t.anchor)}const S$=w$;function Aw(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Pw(e,t,n,r){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[Ew]=o,e&&(r(i,e),r(o,e)),o}const Ln=L$;function $$(e){return k$(e)}function k$(e,t){const n=Ox();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=sr,insertStaticContent:p}=e,g=(A,H,Y,fe=null,le=null,q=null,N=void 0,re=null,L=!!H.dynamicChildren)=>{if(A===H)return;A&&!Ao(A,H)&&(fe=Xe(A),oe(A,le,q,!0),A=null),H.patchFlag===-2&&(L=!1,H.dynamicChildren=null);const{type:O,ref:ee,shapeFlag:U}=H;switch(O){case gu:b(A,H,Y,fe);break;case sn:v(A,H,Y,fe);break;case Ch:A==null&&x(H,Y,fe,N);break;case kt:C(A,H,Y,fe,le,q,N,re,L);break;default:U&1?S(A,H,Y,fe,le,q,N,re,L):U&6?E(A,H,Y,fe,le,q,N,re,L):(U&64||U&128)&&O.process(A,H,Y,fe,le,q,N,re,L,Ee)}ee!=null&&le&&t0(ee,A&&A.ref,q,H||A,!H)},b=(A,H,Y,fe)=>{if(A==null)r(H.el=s(H.children),Y,fe);else{const le=H.el=A.el;H.children!==A.children&&u(le,H.children)}},v=(A,H,Y,fe)=>{A==null?r(H.el=l(H.children||""),Y,fe):H.el=A.el},x=(A,H,Y,fe)=>{[A.el,A.anchor]=p(A.children,H,Y,fe,A.el,A.anchor)},y=({el:A,anchor:H},Y,fe)=>{let le;for(;A&&A!==H;)le=d(A),r(A,Y,fe),A=le;r(H,Y,fe)},_=({el:A,anchor:H})=>{let Y;for(;A&&A!==H;)Y=d(A),i(A),A=Y;i(H)},S=(A,H,Y,fe,le,q,N,re,L)=>{H.type==="svg"?N="svg":H.type==="math"&&(N="mathml"),A==null?$(H,Y,fe,le,q,N,re,L):M(A,H,le,q,N,re,L)},$=(A,H,Y,fe,le,q,N,re)=>{let L,O;const{props:ee,shapeFlag:U,transition:B,dirs:V}=A;if(L=A.el=a(A.type,q,ee&&ee.is,ee),U&8?c(L,A.children):U&16&&T(A.children,L,null,fe,le,wh(A,q),N,re),V&&mo(A,null,fe,"created"),w(L,A,A.scopeId,N,fe),ee){for(const Ae in ee)Ae!=="value"&&!ul(Ae)&&o(L,Ae,null,ee[Ae],q,fe);"value"in ee&&o(L,"value",null,ee.value,q),(O=ee.onVnodeBeforeMount)&&Er(O,fe,A)}V&&mo(A,null,fe,"beforeMount");const me=M$(le,B);me&&B.beforeEnter(L),r(L,H,Y),((O=ee&&ee.onVnodeMounted)||me||V)&&Ln(()=>{O&&Er(O,fe,A),me&&B.enter(L),V&&mo(A,null,fe,"mounted")},le)},w=(A,H,Y,fe,le)=>{if(Y&&h(A,Y),fe)for(let q=0;q<fe.length;q++)h(A,fe[q]);if(le){let q=le.subTree;if(H===q){const N=le.vnode;w(A,N,N.scopeId,N.slotScopeIds,le.parent)}}},T=(A,H,Y,fe,le,q,N,re,L=0)=>{for(let O=L;O<A.length;O++){const ee=A[O]=re?Ai(A[O]):zr(A[O]);g(null,ee,H,Y,fe,le,q,N,re)}},M=(A,H,Y,fe,le,q,N)=>{const re=H.el=A.el;let{patchFlag:L,dynamicChildren:O,dirs:ee}=H;L|=A.patchFlag&16;const U=A.props||Tt,B=H.props||Tt;let V;if(Y&&yo(Y,!1),(V=B.onVnodeBeforeUpdate)&&Er(V,Y,H,A),ee&&mo(H,A,Y,"beforeUpdate"),Y&&yo(Y,!0),(U.innerHTML&&B.innerHTML==null||U.textContent&&B.textContent==null)&&c(re,""),O?P(A.dynamicChildren,O,re,Y,fe,wh(H,le),q):N||J(A,H,re,null,Y,fe,wh(H,le),q,!1),L>0){if(L&16)R(re,U,B,Y,le);else if(L&2&&U.class!==B.class&&o(re,"class",null,B.class,le),L&4&&o(re,"style",U.style,B.style,le),L&8){const me=H.dynamicProps;for(let Ae=0;Ae<me.length;Ae++){const Re=me[Ae],rt=U[Re],lt=B[Re];(lt!==rt||Re==="value")&&o(re,Re,rt,lt,le,Y)}}L&1&&A.children!==H.children&&c(re,H.children)}else!N&&O==null&&R(re,U,B,Y,le);((V=B.onVnodeUpdated)||ee)&&Ln(()=>{V&&Er(V,Y,H,A),ee&&mo(H,A,Y,"updated")},fe)},P=(A,H,Y,fe,le,q,N)=>{for(let re=0;re<H.length;re++){const L=A[re],O=H[re],ee=L.el&&(L.type===kt||!Ao(L,O)||L.shapeFlag&70)?f(L.el):Y;g(L,O,ee,null,fe,le,q,N,!0)}},R=(A,H,Y,fe,le)=>{if(H!==Y){if(H!==Tt)for(const q in H)!ul(q)&&!(q in Y)&&o(A,q,H[q],null,le,fe);for(const q in Y){if(ul(q))continue;const N=Y[q],re=H[q];N!==re&&q!=="value"&&o(A,q,re,N,le,fe)}"value"in Y&&o(A,"value",H.value,Y.value,le)}},C=(A,H,Y,fe,le,q,N,re,L)=>{const O=H.el=A?A.el:s(""),ee=H.anchor=A?A.anchor:s("");let{patchFlag:U,dynamicChildren:B,slotScopeIds:V}=H;V&&(re=re?re.concat(V):V),A==null?(r(O,Y,fe),r(ee,Y,fe),T(H.children||[],Y,ee,le,q,N,re,L)):U>0&&U&64&&B&&A.dynamicChildren?(P(A.dynamicChildren,B,Y,le,q,N,re),(H.key!=null||le&&H===le.subTree)&&Yg(A,H,!0)):J(A,H,Y,ee,le,q,N,re,L)},E=(A,H,Y,fe,le,q,N,re,L)=>{H.slotScopeIds=re,A==null?H.shapeFlag&512?le.ctx.activate(H,Y,fe,N,L):F(H,Y,fe,le,q,N,L):z(A,H,L)},F=(A,H,Y,fe,le,q,N)=>{const re=A.component=V$(A,fe,le);if(df(A)&&(re.ctx.renderer=Ee),q$(re,!1,N),re.asyncDep){if(le&&le.registerDep(re,j,N),!A.el){const L=re.subTree=Ge(sn);v(null,L,H,Y)}}else j(re,A,H,Y,le,q,N)},z=(A,H,Y)=>{const fe=H.component=A.component;if(B$(A,H,Y))if(fe.asyncDep&&!fe.asyncResolved){Z(fe,H,Y);return}else fe.next=H,KS(fe.update),fe.effect.dirty=!0,fe.update();else H.el=A.el,fe.vnode=H},j=(A,H,Y,fe,le,q,N)=>{const re=()=>{if(A.isMounted){let{next:ee,bu:U,u:B,parent:V,vnode:me}=A;{const dt=Rw(A);if(dt){ee&&(ee.el=me.el,Z(A,ee,N)),dt.asyncDep.then(()=>{A.isUnmounted||re()});return}}let Ae=ee,Re;yo(A,!1),ee?(ee.el=me.el,Z(A,ee,N)):ee=me,U&&mh(U),(Re=ee.props&&ee.props.onVnodeBeforeUpdate)&&Er(Re,V,ee,me),yo(A,!0);const rt=ym(A),lt=A.subTree;A.subTree=rt,g(lt,rt,f(lt.el),Xe(lt),A,le,q),ee.el=rt.el,Ae===null&&O$(A,rt.el),B&&Ln(B,le),(Re=ee.props&&ee.props.onVnodeUpdated)&&Ln(()=>Er(Re,V,ee,me),le)}else{let ee;const{el:U,props:B}=H,{bm:V,m:me,parent:Ae}=A,Re=fl(H);yo(A,!1),V&&mh(V),!Re&&(ee=B&&B.onVnodeBeforeMount)&&Er(ee,Ae,H),yo(A,!0);{const rt=A.subTree=ym(A);g(null,rt,Y,fe,A,le,q),H.el=rt.el}if(me&&Ln(me,le),!Re&&(ee=B&&B.onVnodeMounted)){const rt=H;Ln(()=>Er(ee,Ae,rt),le)}(H.shapeFlag&256||Ae&&fl(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&A.a&&Ln(A.a,le),A.isMounted=!0,H=Y=fe=null}},L=A.effect=new Rg(re,sr,()=>Ug(O),A.scope),O=A.update=()=>{L.dirty&&L.run()};O.i=A,O.id=A.uid,yo(A,!0),O()},Z=(A,H,Y)=>{H.component=A;const fe=A.vnode.props;A.vnode=H,A.next=null,v$(A,H.props,fe,Y),_$(A,H.children,Y),ao(),cm(A),so()},J=(A,H,Y,fe,le,q,N,re,L=!1)=>{const O=A&&A.children,ee=A?A.shapeFlag:0,U=H.children,{patchFlag:B,shapeFlag:V}=H;if(B>0){if(B&128){he(O,U,Y,fe,le,q,N,re,L);return}else if(B&256){ie(O,U,Y,fe,le,q,N,re,L);return}}V&8?(ee&16&&xe(O,le,q),U!==O&&c(Y,U)):ee&16?V&16?he(O,U,Y,fe,le,q,N,re,L):xe(O,le,q,!0):(ee&8&&c(Y,""),V&16&&T(U,Y,fe,le,q,N,re,L))},ie=(A,H,Y,fe,le,q,N,re,L)=>{A=A||Oa,H=H||Oa;const O=A.length,ee=H.length,U=Math.min(O,ee);let B;for(B=0;B<U;B++){const V=H[B]=L?Ai(H[B]):zr(H[B]);g(A[B],V,Y,null,le,q,N,re,L)}O>ee?xe(A,le,q,!0,!1,U):T(H,Y,fe,le,q,N,re,L,U)},he=(A,H,Y,fe,le,q,N,re,L)=>{let O=0;const ee=H.length;let U=A.length-1,B=ee-1;for(;O<=U&&O<=B;){const V=A[O],me=H[O]=L?Ai(H[O]):zr(H[O]);if(Ao(V,me))g(V,me,Y,null,le,q,N,re,L);else break;O++}for(;O<=U&&O<=B;){const V=A[U],me=H[B]=L?Ai(H[B]):zr(H[B]);if(Ao(V,me))g(V,me,Y,null,le,q,N,re,L);else break;U--,B--}if(O>U){if(O<=B){const V=B+1,me=V<ee?H[V].el:fe;for(;O<=B;)g(null,H[O]=L?Ai(H[O]):zr(H[O]),Y,me,le,q,N,re,L),O++}}else if(O>B)for(;O<=U;)oe(A[O],le,q,!0),O++;else{const V=O,me=O,Ae=new Map;for(O=me;O<=B;O++){const ye=H[O]=L?Ai(H[O]):zr(H[O]);ye.key!=null&&Ae.set(ye.key,O)}let Re,rt=0;const lt=B-me+1;let dt=!1,zt=0;const yt=new Array(lt);for(O=0;O<lt;O++)yt[O]=0;for(O=V;O<=U;O++){const ye=A[O];if(rt>=lt){oe(ye,le,q,!0);continue}let G;if(ye.key!=null)G=Ae.get(ye.key);else for(Re=me;Re<=B;Re++)if(yt[Re-me]===0&&Ao(ye,H[Re])){G=Re;break}G===void 0?oe(ye,le,q,!0):(yt[G-me]=O+1,G>=zt?zt=G:dt=!0,g(ye,H[G],Y,null,le,q,N,re,L),rt++)}const Lt=dt?T$(yt):Oa;for(Re=Lt.length-1,O=lt-1;O>=0;O--){const ye=me+O,G=H[ye],m=ye+1<ee?H[ye+1].el:fe;yt[O]===0?g(null,G,Y,m,le,q,N,re,L):dt&&(Re<0||O!==Lt[Re]?_e(G,Y,m,2):Re--)}}},_e=(A,H,Y,fe,le=null)=>{const{el:q,type:N,transition:re,children:L,shapeFlag:O}=A;if(O&6){_e(A.component.subTree,H,Y,fe);return}if(O&128){A.suspense.move(H,Y,fe);return}if(O&64){N.move(A,H,Y,Ee);return}if(N===kt){r(q,H,Y);for(let U=0;U<L.length;U++)_e(L[U],H,Y,fe);r(A.anchor,H,Y);return}if(N===Ch){y(A,H,Y);return}if(fe!==2&&O&1&&re)if(fe===0)re.beforeEnter(q),r(q,H,Y),Ln(()=>re.enter(q),le);else{const{leave:U,delayLeave:B,afterLeave:V}=re,me=()=>r(q,H,Y),Ae=()=>{U(q,()=>{me(),V&&V()})};B?B(q,me,Ae):Ae()}else r(q,H,Y)},oe=(A,H,Y,fe=!1,le=!1)=>{const{type:q,props:N,ref:re,children:L,dynamicChildren:O,shapeFlag:ee,patchFlag:U,dirs:B,cacheIndex:V}=A;if(U===-2&&(le=!1),re!=null&&t0(re,null,Y,A,!0),V!=null&&(H.renderCache[V]=void 0),ee&256){H.ctx.deactivate(A);return}const me=ee&1&&B,Ae=!fl(A);let Re;if(Ae&&(Re=N&&N.onVnodeBeforeUnmount)&&Er(Re,H,A),ee&6)Oe(A.component,Y,fe);else{if(ee&128){A.suspense.unmount(Y,fe);return}me&&mo(A,null,H,"beforeUnmount"),ee&64?A.type.remove(A,H,Y,Ee,fe):O&&!O.hasOnce&&(q!==kt||U>0&&U&64)?xe(O,H,Y,!1,!0):(q===kt&&U&384||!le&&ee&16)&&xe(L,H,Y),fe&&ve(A)}(Ae&&(Re=N&&N.onVnodeUnmounted)||me)&&Ln(()=>{Re&&Er(Re,H,A),me&&mo(A,null,H,"unmounted")},Y)},ve=A=>{const{type:H,el:Y,anchor:fe,transition:le}=A;if(H===kt){we(Y,fe);return}if(H===Ch){_(A);return}const q=()=>{i(Y),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(A.shapeFlag&1&&le&&!le.persisted){const{leave:N,delayLeave:re}=le,L=()=>N(Y,q);re?re(A.el,q,L):L()}else q()},we=(A,H)=>{let Y;for(;A!==H;)Y=d(A),i(A),A=Y;i(H)},Oe=(A,H,Y)=>{const{bum:fe,scope:le,update:q,subTree:N,um:re,m:L,a:O}=A;mm(L),mm(O),fe&&mh(fe),le.stop(),q&&(q.active=!1,oe(N,A,H,Y)),re&&Ln(re,H),Ln(()=>{A.isUnmounted=!0},H),H&&H.pendingBranch&&!H.isUnmounted&&A.asyncDep&&!A.asyncResolved&&A.suspenseId===H.pendingId&&(H.deps--,H.deps===0&&H.resolve())},xe=(A,H,Y,fe=!1,le=!1,q=0)=>{for(let N=q;N<A.length;N++)oe(A[N],H,Y,fe,le)},Xe=A=>{if(A.shapeFlag&6)return Xe(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const H=d(A.anchor||A.el),Y=H&&H[Ew];return Y?d(Y):H};let Ve=!1;const de=(A,H,Y)=>{A==null?H._vnode&&oe(H._vnode,null,null,!0):g(H._vnode||null,A,H,null,null,null,Y),H._vnode=A,Ve||(Ve=!0,cm(),iw(),Ve=!1)},Ee={p:g,um:oe,m:_e,r:ve,mt:F,mc:T,pc:J,pbc:P,n:Xe,o:e};return{render:de,hydrate:void 0,createApp:p$(de)}}function wh({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 yo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function M$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yg(e,t,n=!1){const r=e.children,i=t.children;if(tt(r)&&tt(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Ai(i[o]),s.el=a.el),!n&&s.patchFlag!==-2&&Yg(a,s)),s.type===gu&&(s.el=a.el)}}function T$(e){const t=e.slice(),n=[0];let r,i,o,a,s;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(i=n[n.length-1],e[i]<u){t[r]=i,n.push(r);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,e[n[s]]<u?o=s+1:a=s;u<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function Rw(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rw(t)}function mm(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const E$=Symbol.for("v-scx"),A$=()=>$t(E$);function xr(e,t){return pf(e,null,t)}function P$(e,t){return pf(e,null,{flush:"sync"})}const Wu={};function vt(e,t,n){return pf(e,t,n)}function pf(e,t,{immediate:n,deep:r,flush:i,once:o,onTrack:a,onTrigger:s}=Tt){if(t&&o){const $=t;t=(...w)=>{$(...w),S()}}const l=_n,u=$=>r===!0?$:Ii($,r===!1?1:void 0);let c,f=!1,d=!1;if(wn(e)?(c=()=>e.value,f=Ka(e)):cl(e)?(c=()=>u(e),f=!0):tt(e)?(d=!0,f=e.some($=>cl($)||Ka($)),c=()=>e.map($=>{if(wn($))return $.value;if(cl($))return u($);if(it($))return Di($,l,2)})):it(e)?t?c=()=>Di(e,l,2):c=()=>(h&&h(),dr(e,l,3,[p])):c=sr,t&&r){const $=c;c=()=>Ii($())}let h,p=$=>{h=y.onStop=()=>{Di($,l,4),h=y.onStop=void 0}},g;if(vf)if(p=sr,t?n&&dr(t,l,3,[c(),d?[]:void 0,p]):c(),i==="sync"){const $=A$();g=$.__watcherHandles||($.__watcherHandles=[])}else return sr;let b=d?new Array(e.length).fill(Wu):Wu;const v=()=>{if(!(!y.active||!y.dirty))if(t){const $=y.run();(r||f||(d?$.some((w,T)=>Hn(w,b[T])):Hn($,b)))&&(h&&h(),dr(t,l,3,[$,b===Wu?void 0:d&&b[0]===Wu?[]:b,p]),b=$)}else y.run()};v.allowRecurse=!!t;let x;i==="sync"?x=v:i==="post"?x=()=>Ln(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),x=()=>Ug(v));const y=new Rg(c,sr,x),_=vS(),S=()=>{y.stop(),_&&Eg(_.effects,y)};return t?n?v():b=y.run():i==="post"?Ln(y.run.bind(y),l&&l.suspense):y.run(),g&&g.push(S),S}function R$(e,t,n){const r=this.proxy,i=Gt(e)?e.includes(".")?zw(r,e):()=>r[e]:e.bind(r,r);let o;it(t)?o=t:(o=t.handler,n=t);const a=vu(this),s=pf(i,o.bind(r),n);return a(),s}function zw(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Ii(e,t=1/0,n){if(t<=0||!Rt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,wn(e))Ii(e.value,t,n);else if(tt(e))for(let r=0;r<e.length;r++)Ii(e[r],t,n);else if(Px(e)||Na(e))e.forEach(r=>{Ii(r,t,n)});else if(Fx(e)){for(const r in e)Ii(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ii(e[r],t,n)}return e}function Xg(e,t,n=Tt){const r=ps(),i=Gi(t),o=oo(t),a=Fw(e,t),s=WS((l,u)=>{let c,f=Tt,d;return P$(()=>{const h=e[t];Hn(c,h)&&(c=h,u())}),{get(){return l(),n.get?n.get(c):c},set(h){const p=n.set?n.set(h):h;if(!Hn(p,c)&&!(f!==Tt&&Hn(h,f)))return;const g=r.vnode.props;g&&(t in g||i in g||o in g)&&(`onUpdate:${t}`in g||`onUpdate:${i}`in g||`onUpdate:${o}`in g)||(c=h,u()),r.emit(`update:${t}`,p),Hn(h,p)&&Hn(h,f)&&!Hn(p,d)&&u(),f=h,d=p}}});return s[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?a||Tt:s,done:!1}:{done:!0}}}},s}const Fw=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Gi(t)}Modifiers`]||e[`${oo(t)}Modifiers`];function z$(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Tt;let i=n;const o=t.startsWith("update:"),a=o&&Fw(r,t.slice(7));a&&(a.trim&&(i=n.map(c=>Gt(c)?c.trim():c)),a.number&&(i=n.map(aS)));let s,l=r[s=bh(t)]||r[s=bh(Gi(t))];!l&&o&&(l=r[s=bh(oo(t))]),l&&dr(l,e,6,i);const u=r[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,dr(u,e,6,i)}}function Iw(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let a={},s=!1;if(!it(e)){const l=u=>{const c=Iw(u,t,!0);c&&(s=!0,nn(a,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!s?(Rt(e)&&r.set(e,null),null):(tt(o)?o.forEach(l=>a[l]=null):nn(a,o),Rt(e)&&r.set(e,a),a)}function gf(e,t){return!e||!af(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,oo(t))||_t(e,t))}function ym(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[o],slots:a,attrs:s,emit:l,render:u,renderCache:c,props:f,data:d,setupState:h,ctx:p,inheritAttrs:g}=e,b=qc(e);let v,x;try{if(n.shapeFlag&4){const _=i||r,S=_;v=zr(u.call(S,_,c,f,h,d,p)),x=s}else{const _=t;v=zr(_.length>1?_(f,{attrs:s,slots:a,emit:l}):_(f,null)),x=t.props?s:F$(s)}}catch(_){gl.length=0,cf(_,e,1),v=Ge(sn)}let y=v;if(x&&g!==!1){const _=Object.keys(x),{shapeFlag:S}=y;_.length&&S&7&&(o&&_.some(Tg)&&(x=I$(x,o)),y=Vr(y,x,!1,!0))}return n.dirs&&(y=Vr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),v=y,qc(b),v}const F$=e=>{let t;for(const n in e)(n==="class"||n==="style"||af(n))&&((t||(t={}))[n]=e[n]);return t},I$=(e,t)=>{const n={};for(const r in e)(!Tg(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function B$(e,t,n){const{props:r,children:i,component:o}=e,{props:a,children:s,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?_m(r,a,u):!!a;if(l&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const d=c[f];if(a[d]!==r[d]&&!gf(u,d))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?_m(r,a,u):!0:!!a;return!1}function _m(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(t[o]!==e[o]&&!gf(n,o))return!0}return!1}function O$({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const N$=e=>e.__isSuspense;function L$(e,t){t&&t.pendingBranch?tt(e)?t.effects.push(...e):t.effects.push(e):ZS(e)}const kt=Symbol.for("v-fgt"),gu=Symbol.for("v-txt"),sn=Symbol.for("v-cmt"),Ch=Symbol.for("v-stc"),gl=[];let Yn=null;function We(e=!1){gl.push(Yn=e?null:[])}function D$(){gl.pop(),Yn=gl[gl.length-1]||null}let Fl=1;function xm(e){Fl+=e,e<0&&Yn&&(Yn.hasOnce=!0)}function Bw(e){return e.dynamicChildren=Fl>0?Yn||Oa:null,D$(),Fl>0&&Yn&&Yn.push(e),e}function wt(e,t,n,r,i,o){return Bw(ot(e,t,n,r,i,o,!0))}function It(e,t,n,r,i){return Bw(Ge(e,t,n,r,i,!0))}function Il(e){return e?e.__v_isVNode===!0:!1}function Ao(e,t){return e.type===t.type&&e.key===t.key}const Ow=({key:e})=>e??null,Mc=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Gt(e)||wn(e)||it(e)?{i:ln,r:e,k:t,f:!!n}:e:null);function ot(e,t=null,n=null,r=0,i=null,o=e===kt?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ow(t),ref:t&&Mc(t),scopeId:aw,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:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ln};return s?(Kg(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Gt(n)?8:16),Fl>0&&!a&&Yn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Yn.push(l),l}const Ge=H$;function H$(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===a$)&&(e=sn),Il(e)){const s=Vr(e,t,!0);return n&&Kg(s,n),Fl>0&&!o&&Yn&&(s.shapeFlag&6?Yn[Yn.indexOf(e)]=s:Yn.push(s)),s.patchFlag=-2,s}if(K$(e)&&(e=e.__vccOpts),t){t=U$(t);let{class:s,style:l}=t;s&&!Gt(s)&&(t.class=pu(s)),Rt(l)&&(Jx(l)&&!tt(l)&&(l=nn({},l)),t.style=Pg(l))}const a=Gt(e)?1:N$(e)?128:x$(e)?64:Rt(e)?4:it(e)?2:0;return ot(e,t,n,r,i,a,o,!0)}function U$(e){return e?Jx(e)||ww(e)?nn({},e):e:null}function Vr(e,t,n=!1,r=!1){const{props:i,ref:o,patchFlag:a,children:s,transition:l}=e,u=t?ia(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Ow(u),ref:t&&t.ref?n&&o?tt(o)?o.concat(Mc(t)):[o,Mc(t)]:Mc(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==kt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vr(e.ssContent),ssFallback:e.ssFallback&&Vr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Za(c,l.clone(c)),c}function Wo(e=" ",t=0){return Ge(gu,null,e,t)}function Xn(e="",t=!1){return t?(We(),It(sn,null,e)):Ge(sn,null,e)}function zr(e){return e==null||typeof e=="boolean"?Ge(sn):tt(e)?Ge(kt,null,e.slice()):typeof e=="object"?Ai(e):Ge(gu,null,String(e))}function Ai(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vr(e)}function Kg(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(tt(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Kg(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!ww(t)?t._ctx=ln:i===3&&ln&&(ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:ln},n=32):(t=String(t),r&64?(n=16,t=[Wo(t)]):n=8);e.children=t,e.shapeFlag|=n}function ia(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=pu([t.class,r.class]));else if(i==="style")t.style=Pg([t.style,r.style]);else if(af(i)){const o=t[i],a=r[i];a&&o!==a&&!(tt(o)&&o.includes(a))&&(t[i]=o?[].concat(o,a):a)}else i!==""&&(t[i]=r[i])}return t}function Er(e,t,n,r=null){dr(e,t,7,[n,r])}const j$=yw();let W$=0;function V$(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||j$,o={uid:W$++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new pS(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Sw(r,i),emitsOptions:Iw(r,i),emit:null,emitted:null,propsDefaults:Tt,inheritAttrs:r.inheritAttrs,ctx:Tt,data:Tt,props:Tt,attrs:Tt,slots:Tt,refs:Tt,setupState:Tt,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=z$.bind(null,o),e.ce&&e.ce(o),o}let _n=null;const ps=()=>_n||ln;let Kc,r0;{const e=Ox(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};Kc=t("__VUE_INSTANCE_SETTERS__",n=>_n=n),r0=t("__VUE_SSR_SETTERS__",n=>vf=n)}const vu=e=>{const t=_n;return Kc(e),e.scope.on(),()=>{e.scope.off(),Kc(t)}},wm=()=>{_n&&_n.scope.off(),Kc(null)};function Nw(e){return e.vnode.shapeFlag&4}let vf=!1;function q$(e,t=!1,n=!1){t&&r0(t);const{props:r,children:i}=e.vnode,o=Nw(e);g$(e,r,o,t),y$(e,i,n);const a=o?G$(e,t):void 0;return t&&r0(!1),a}function G$(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,s$);const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?X$(e):null,o=vu(e);ao();const a=Di(r,e,0,[e.props,i]);if(so(),o(),Rx(a)){if(a.then(wm,wm),t)return a.then(s=>{Cm(e,s)}).catch(s=>{cf(s,e,0)});e.asyncDep=a}else Cm(e,a)}else Lw(e)}function Cm(e,t,n){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=tw(t)),Lw(e)}function Lw(e,t,n){const r=e.type;e.render||(e.render=r.render||sr);{const i=vu(e);ao();try{l$(e)}finally{so(),i()}}}const Y$={get(e,t){return Wn(e,"get",""),e[t]}};function X$(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Y$),slots:e.slots,emit:e.emit,expose:t}}function bf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tw(NS(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hl)return hl[n](e)},has(t,n){return n in t||n in hl}})):e.proxy}function K$(e){return it(e)&&"__vccOpts"in e}const pe=(e,t)=>LS(e,t,vf);function k(e,t,n){const r=arguments.length;return r===2?Rt(t)&&!tt(t)?Il(t)?Ge(e,null,[t]):Ge(e,t):Ge(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Il(n)&&(n=[n]),Ge(e,t,n))}const Z$="3.4.38";/**
|
|
13
|
+
**/function Di(e,t,n,r){try{return r?e(...r):e()}catch(i){cd(i,t,n)}}function fr(e,t,n,r){if(it(e)){const i=Di(e,t,n,r);return i&&Rx(i)&&i.catch(o=>{cd(o,t,n)}),i}if(tt(e)){const i=[];for(let o=0;o<e.length;o++)i.push(fr(e[o],t,n,r));return i}}function cd(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const a=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const u=o.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,a,s)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){ao(),Di(l,null,10,[e,a,s]),so();return}}YS(e,n,i,r)}function YS(e,t,n,r=!0){console.error(e)}let Pl=!1,Kp=!1;const yn=[];let Fr=0;const La=[];let Ti=null,Eo=0;const nw=Promise.resolve();let Hg=null;function fn(e){const t=Hg||nw;return e?t.then(this?e.bind(this):e):t}function XS(e){let t=Fr+1,n=yn.length;for(;t<n;){const r=t+n>>>1,i=yn[r],o=Rl(i);o<e||o===e&&i.pre?t=r+1:n=r}return t}function Ug(e){(!yn.length||!yn.includes(e,Pl&&e.allowRecurse?Fr+1:Fr))&&(e.id==null?yn.push(e):yn.splice(XS(e.id),0,e),rw())}function rw(){!Pl&&!Kp&&(Kp=!0,Hg=nw.then(ow))}function KS(e){const t=yn.indexOf(e);t>Fr&&yn.splice(t,1)}function ZS(e){tt(e)?La.push(...e):(!Ti||!Ti.includes(e,e.allowRecurse?Eo+1:Eo))&&La.push(e),rw()}function cm(e,t,n=Pl?Fr+1:0){for(;n<yn.length;n++){const r=yn[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;yn.splice(n,1),n--,r()}}}function iw(e){if(La.length){const t=[...new Set(La)].sort((n,r)=>Rl(n)-Rl(r));if(La.length=0,Ti){Ti.push(...t);return}for(Ti=t,Eo=0;Eo<Ti.length;Eo++){const n=Ti[Eo];n.active!==!1&&n()}Ti=null,Eo=0}}const Rl=e=>e.id==null?1/0:e.id,JS=(e,t)=>{const n=Rl(e)-Rl(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ow(e){Kp=!1,Pl=!0,yn.sort(JS);try{for(Fr=0;Fr<yn.length;Fr++){const t=yn[Fr];t&&t.active!==!1&&Di(t,t.i,t.i?15:14)}}finally{Fr=0,yn.length=0,iw(),Pl=!1,Hg=null,(yn.length||La.length)&&ow()}}let ln=null,aw=null;function qc(e){const t=ln;return ln=e,aw=e&&e.type.__scopeId||null,t}function mt(e,t=ln,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&xm(-1);const o=qc(t);let a;try{a=e(...i)}finally{qc(o),r._d&&xm(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function lo(e,t){if(ln===null)return e;const n=bd(ln),r=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,s,l=Tt]=t[i];o&&(it(o)&&(o={mounted:o,updated:o}),o.deep&&Ii(a),r.push({dir:o,instance:n,value:a,oldValue:void 0,arg:s,modifiers:l}))}return e}function mo(e,t,n,r){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[r];l&&(ao(),fr(l,n,8,[e.el,s,e,t]),so())}}const Ei=Symbol("_leaveCb"),Uu=Symbol("_enterCb");function sw(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return dn(()=>{e.isMounted=!0}),Bn(()=>{e.isUnmounting=!0}),e}const Qn=[Function,Array],lw={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qn,onEnter:Qn,onAfterEnter:Qn,onEnterCancelled:Qn,onBeforeLeave:Qn,onLeave:Qn,onAfterLeave:Qn,onLeaveCancelled:Qn,onBeforeAppear:Qn,onAppear:Qn,onAfterAppear:Qn,onAppearCancelled:Qn},uw=e=>{const t=e.subTree;return t.component?uw(t.component):t},QS={name:"BaseTransition",props:lw,setup(e,{slots:t}){const n=ps(),r=sw();return()=>{const i=t.default&&jg(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const f of i)if(f.type!==sn){o=f;break}}const a=xt(e),{mode:s}=a;if(r.isLeaving)return _h(o);const l=fm(o);if(!l)return _h(o);let u=zl(l,a,r,n,f=>u=f);Za(l,u);const c=n.subTree,d=c&&fm(c);if(d&&d.type!==sn&&!Ao(l,d)&&uw(n).type!==sn){const f=zl(d,a,r,n);if(Za(d,f),s==="out-in"&&l.type!==sn)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},_h(o);s==="in-out"&&l.type!==sn&&(f.delayLeave=(h,p,g)=>{const b=cw(r,d);b[String(d.key)]=d,h[Ei]=()=>{p(),h[Ei]=void 0,delete u.delayedLeave},u.delayedLeave=g})}return o}}},e$=QS;function cw(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function zl(e,t,n,r,i){const{appear:o,mode:a,persisted:s=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:b,onAppear:v,onAfterAppear:x,onAppearCancelled:y}=t,_=String(e.key),S=cw(n,e),$=(M,P)=>{M&&fr(M,r,9,P)},w=(M,P)=>{const R=P[1];$(M,P),tt(M)?M.every(C=>C.length<=1)&&R():M.length<=1&&R()},T={mode:a,persisted:s,beforeEnter(M){let P=l;if(!n.isMounted)if(o)P=b||l;else return;M[Ei]&&M[Ei](!0);const R=S[_];R&&Ao(e,R)&&R.el[Ei]&&R.el[Ei](),$(P,[M])},enter(M){let P=u,R=c,C=d;if(!n.isMounted)if(o)P=v||u,R=x||c,C=y||d;else return;let E=!1;const F=M[Uu]=z=>{E||(E=!0,z?$(C,[M]):$(R,[M]),T.delayedLeave&&T.delayedLeave(),M[Uu]=void 0)};P?w(P,[M,F]):F()},leave(M,P){const R=String(e.key);if(M[Uu]&&M[Uu](!0),n.isUnmounting)return P();$(f,[M]);let C=!1;const E=M[Ei]=F=>{C||(C=!0,P(),F?$(g,[M]):$(p,[M]),M[Ei]=void 0,S[R]===e&&delete S[R])};S[R]=e,h?w(h,[M,E]):E()},clone(M){const P=zl(M,t,n,r,i);return i&&i(P),P}};return T}function _h(e){if(fd(e))return e=Vr(e),e.children=null,e}function fm(e){if(!fd(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&it(n.default))return n.default()}}function Za(e,t){e.shapeFlag&6&&e.component?Za(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function jg(e,t=!1,n){let r=[],i=0;for(let o=0;o<e.length;o++){let a=e[o];const s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===kt?(a.patchFlag&128&&i++,r=r.concat(jg(a.children,t,s))):(t||a.type!==sn)&&r.push(s!=null?Vr(a,{key:s}):a)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Fe(e,t){return it(e)?nn({name:e.name},t,{setup:e}):e}const dl=e=>!!e.type.__asyncLoader,fd=e=>e.type.__isKeepAlive;function Wg(e,t){fw(e,"a",t)}function Vg(e,t){fw(e,"da",t)}function fw(e,t,n=_n){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(dd(t,r,n),n){let i=n.parent;for(;i&&i.parent;)fd(i.parent.vnode)&&t$(r,t,n,i),i=i.parent}}function t$(e,t,n,r){const i=dd(t,e,r,!0);pw(()=>{Eg(r[t],i)},n)}function dd(e,t,n=_n,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{ao();const s=vu(n),l=fr(t,n,e,a);return s(),so(),l});return r?i.unshift(o):i.push(o),o}}const mi=e=>(t,n=_n)=>{(!vd||e==="sp")&&dd(e,(...r)=>t(...r),n)},hd=mi("bm"),dn=mi("m"),dw=mi("bu"),hw=mi("u"),Bn=mi("bum"),pw=mi("um"),n$=mi("sp"),r$=mi("rtg"),i$=mi("rtc");function o$(e,t=_n){dd("ec",e,t)}const a$=Symbol.for("v-ndc");function gw(e,t,n,r){let i;const o=n;if(tt(e)||Gt(e)){i=new Array(e.length);for(let a=0,s=e.length;a<s;a++)i[a]=t(e[a],a,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=t(a+1,a,void 0,o)}else if(Rt(e))if(e[Symbol.iterator])i=Array.from(e,(a,s)=>t(a,s,void 0,o));else{const a=Object.keys(e);i=new Array(a.length);for(let s=0,l=a.length;s<l;s++){const u=a[s];i[s]=t(e[u],u,s,o)}}else i=[];return i}function qg(e,t,n={},r,i){if(ln.isCE||ln.parent&&dl(ln.parent)&&ln.parent.isCE)return Ge("slot",n,r);let o=e[t];o&&o._c&&(o._d=!1),We();const a=o&&vw(o(n)),s=It(kt,{key:(n.key||a&&a.key||`_${t}`)+""},a||[],a&&e._===1?64:-2);return s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function vw(e){return e.some(t=>Il(t)?!(t.type===sn||t.type===kt&&!vw(t.children)):!0)?e:null}const Zp=e=>e?Nw(e)?bd(e):Zp(e.parent):null,hl=nn(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=>Zp(e.parent),$root:e=>Zp(e.root),$emit:e=>e.emit,$options:e=>mw(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Ug(e.update)}),$nextTick:e=>e.n||(e.n=fn.bind(e.proxy)),$watch:e=>R$.bind(e)}),xh=(e,t)=>e!==Tt&&!e.__isScriptSetup&&_t(e,t),s$={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const h=a[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(xh(r,t))return a[t]=1,r[t];if(i!==Tt&&_t(i,t))return a[t]=2,i[t];if((u=e.propsOptions[0])&&_t(u,t))return a[t]=3,o[t];if(n!==Tt&&_t(n,t))return a[t]=4,n[t];Jp&&(a[t]=0)}}const c=hl[t];let d,f;if(c)return t==="$attrs"&&Wn(e.attrs,"get",""),c(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==Tt&&_t(n,t))return a[t]=4,n[t];if(f=l.config.globalProperties,_t(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return xh(i,t)?(i[t]=n,!0):r!==Tt&&_t(r,t)?(r[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||e!==Tt&&_t(e,a)||xh(t,a)||(s=o[0])&&_t(s,a)||_t(r,a)||_t(hl,a)||_t(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Gc(e){return tt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Yc(e,t){return!e||!t?e||t:tt(e)&&tt(t)?e.concat(t):nn({},Gc(e),Gc(t))}let Jp=!0;function l$(e){const t=mw(e),n=e.proxy,r=e.ctx;Jp=!1,t.beforeCreate&&dm(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:g,deactivated:b,beforeDestroy:v,beforeUnmount:x,destroyed:y,unmounted:_,render:S,renderTracked:$,renderTriggered:w,errorCaptured:T,serverPrefetch:M,expose:P,inheritAttrs:R,components:C,directives:E,filters:F}=t;if(u&&u$(u,r,null),a)for(const Z in a){const J=a[Z];it(J)&&(r[Z]=J.bind(n))}if(i){const Z=i.call(n,n);Rt(Z)&&(e.data=Og(Z))}if(Jp=!0,o)for(const Z in o){const J=o[Z],ie=it(J)?J.bind(n,n):it(J.get)?J.get.bind(n,n):sr,he=!it(J)&&it(J.set)?J.set.bind(n):sr,_e=pe({get:ie,set:he});Object.defineProperty(r,Z,{enumerable:!0,configurable:!0,get:()=>_e.value,set:oe=>_e.value=oe})}if(s)for(const Z in s)bw(s[Z],r,n,Z);if(l){const Z=it(l)?l.call(n):l;Reflect.ownKeys(Z).forEach(J=>{jn(J,Z[J])})}c&&dm(c,e,"c");function j(Z,J){tt(J)?J.forEach(ie=>Z(ie.bind(n))):J&&Z(J.bind(n))}if(j(hd,d),j(dn,f),j(dw,h),j(hw,p),j(Wg,g),j(Vg,b),j(o$,T),j(i$,$),j(r$,w),j(Bn,x),j(pw,_),j(n$,M),tt(P))if(P.length){const Z=e.exposed||(e.exposed={});P.forEach(J=>{Object.defineProperty(Z,J,{get:()=>n[J],set:ie=>n[J]=ie})})}else e.exposed||(e.exposed={});S&&e.render===sr&&(e.render=S),R!=null&&(e.inheritAttrs=R),C&&(e.components=C),E&&(e.directives=E)}function u$(e,t,n=sr){tt(e)&&(e=Qp(e));for(const r in e){const i=e[r];let o;Rt(i)?"default"in i?o=$t(i.from||r,i.default,!0):o=$t(i.from||r):o=$t(i),wn(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[r]=o}}function dm(e,t,n){fr(tt(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function bw(e,t,n,r){const i=r.includes(".")?zw(n,r):()=>n[r];if(Gt(e)){const o=t[e];it(o)&&vt(i,o)}else if(it(e))vt(i,e.bind(n));else if(Rt(e))if(tt(e))e.forEach(o=>bw(o,t,n,r));else{const o=it(e.handler)?e.handler.bind(n):t[e.handler];it(o)&&vt(i,o,e)}}function mw(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(t);let l;return s?l=s:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(u=>Xc(l,u,a,!0)),Xc(l,t,a)),Rt(t)&&o.set(t,l),l}function Xc(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&Xc(e,o,n,!0),i&&i.forEach(a=>Xc(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const s=c$[a]||n&&n[a];e[a]=s?s(e[a],t[a]):t[a]}return e}const c$={data:hm,props:pm,emits:pm,methods:Vs,computed:Vs,beforeCreate:$n,created:$n,beforeMount:$n,mounted:$n,beforeUpdate:$n,updated:$n,beforeDestroy:$n,beforeUnmount:$n,destroyed:$n,unmounted:$n,activated:$n,deactivated:$n,errorCaptured:$n,serverPrefetch:$n,components:Vs,directives:Vs,watch:d$,provide:hm,inject:f$};function hm(e,t){return t?e?function(){return nn(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function f$(e,t){return Vs(Qp(e),Qp(t))}function Qp(e){if(tt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function $n(e,t){return e?[...new Set([].concat(e,t))]:t}function Vs(e,t){return e?nn(Object.create(null),e,t):t}function pm(e,t){return e?tt(e)&&tt(t)?[...new Set([...e,...t])]:nn(Object.create(null),Gc(e),Gc(t??{})):t}function d$(e,t){if(!e)return t;if(!t)return e;const n=nn(Object.create(null),e);for(const r in t)n[r]=$n(e[r],t[r]);return n}function yw(){return{app:null,config:{isNativeTag:tS,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 h$=0;function p$(e,t){return function(r,i=null){it(r)||(r=nn({},r)),i!=null&&!Rt(i)&&(i=null);const o=yw(),a=new WeakSet;let s=!1;const l=o.app={_uid:h$++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:Z$,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&it(u.install)?(a.add(u),u.install(l,...c)):it(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,d){if(!s){const f=Ge(r,i);return f.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),e(f,u,d),s=!0,l._container=u,u.__vue_app__=l,bd(f.component)}},unmount(){s&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l},runWithContext(u){const c=Da;Da=l;try{return u()}finally{Da=c}}};return l}}let Da=null;function jn(e,t){if(_n){let n=_n.provides;const r=_n.parent&&_n.parent.provides;r===n&&(n=_n.provides=Object.create(r)),n[e]=t}}function $t(e,t,n=!1){const r=_n||ln;if(r||Da){const i=Da?Da._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&it(t)?t.call(r&&r.proxy):t}}const _w={},xw=()=>Object.create(_w),ww=e=>Object.getPrototypeOf(e)===_w;function g$(e,t,n,r=!1){const i={},o=xw();e.propsDefaults=Object.create(null),Cw(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:OS(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function v$(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,s=xt(i),[l]=e.propsOptions;let u=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(gd(e.emitsOptions,f))continue;const h=t[f];if(l)if(_t(o,f))h!==o[f]&&(o[f]=h,u=!0);else{const p=Gi(f);i[p]=e0(l,s,p,h,e,!1)}else h!==o[f]&&(o[f]=h,u=!0)}}}else{Cw(e,t,i,o)&&(u=!0);let c;for(const d in s)(!t||!_t(t,d)&&((c=oo(d))===d||!_t(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=e0(l,s,d,void 0,e,!0)):delete i[d]);if(o!==s)for(const d in o)(!t||!_t(t,d))&&(delete o[d],u=!0)}u&&ci(e.attrs,"set","")}function Cw(e,t,n,r){const[i,o]=e.propsOptions;let a=!1,s;if(t)for(let l in t){if(ul(l))continue;const u=t[l];let c;i&&_t(i,c=Gi(l))?!o||!o.includes(c)?n[c]=u:(s||(s={}))[c]=u:gd(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,a=!0)}if(o){const l=xt(n),u=s||Tt;for(let c=0;c<o.length;c++){const d=o[c];n[d]=e0(i,l,d,u[d],e,!_t(u,d))}}return a}function e0(e,t,n,r,i,o){const a=e[n];if(a!=null){const s=_t(a,"default");if(s&&r===void 0){const l=a.default;if(a.type!==Function&&!a.skipFactory&&it(l)){const{propsDefaults:u}=i;if(n in u)r=u[n];else{const c=vu(i);r=u[n]=l.call(null,t),c()}}else r=l}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===oo(n))&&(r=!0))}return r}const b$=new WeakMap;function Sw(e,t,n=!1){const r=n?b$:t.propsCache,i=r.get(e);if(i)return i;const o=e.props,a={},s=[];let l=!1;if(!it(e)){const c=d=>{l=!0;const[f,h]=Sw(d,t,!0);nn(a,f),h&&s.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!l)return Rt(e)&&r.set(e,Oa),Oa;if(tt(o))for(let c=0;c<o.length;c++){const d=Gi(o[c]);gm(d)&&(a[d]=Tt)}else if(o)for(const c in o){const d=Gi(c);if(gm(d)){const f=o[c],h=a[d]=tt(f)||it(f)?{type:f}:nn({},f),p=h.type;let g=!1,b=!0;if(tt(p))for(let v=0;v<p.length;++v){const x=p[v],y=it(x)&&x.name;if(y==="Boolean"){g=!0;break}else y==="String"&&(b=!1)}else g=it(p)&&p.name==="Boolean";h[0]=g,h[1]=b,(g||_t(h,"default"))&&s.push(d)}}const u=[a,s];return Rt(e)&&r.set(e,u),u}function gm(e){return e[0]!=="$"&&!ul(e)}const $w=e=>e[0]==="_"||e==="$stable",Gg=e=>tt(e)?e.map(zr):[zr(e)],m$=(e,t,n)=>{if(t._n)return t;const r=mt((...i)=>Gg(t(...i)),n);return r._c=!1,r},kw=(e,t,n)=>{const r=e._ctx;for(const i in e){if($w(i))continue;const o=e[i];if(it(o))t[i]=m$(i,o,r);else if(o!=null){const a=Gg(o);t[i]=()=>a}}},Mw=(e,t)=>{const n=Gg(t);e.slots.default=()=>n},Tw=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},y$=(e,t,n)=>{const r=e.slots=xw();if(e.vnode.shapeFlag&32){const i=t._;i?(Tw(r,t,n),n&&Bx(r,"_",i,!0)):kw(t,r)}else t&&Mw(e,t)},_$=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,a=Tt;if(r.shapeFlag&32){const s=t._;s?n&&s===1?o=!1:Tw(i,t,n):(o=!t.$stable,kw(t,i)),a=t}else t&&(Mw(e,t),a={default:1});if(o)for(const s in i)!$w(s)&&a[s]==null&&delete i[s]};function t0(e,t,n,r,i=!1){if(tt(e)){e.forEach((f,h)=>t0(f,t&&(tt(t)?t[h]:t),n,r,i));return}if(dl(r)&&!i)return;const o=r.shapeFlag&4?bd(r.component):r.el,a=i?null:o,{i:s,r:l}=e,u=t&&t.r,c=s.refs===Tt?s.refs={}:s.refs,d=s.setupState;if(u!=null&&u!==l&&(Gt(u)?(c[u]=null,_t(d,u)&&(d[u]=null)):wn(u)&&(u.value=null)),it(l))Di(l,s,12,[a,c]);else{const f=Gt(l),h=wn(l);if(f||h){const p=()=>{if(e.f){const g=f?_t(d,l)?d[l]:c[l]:l.value;i?tt(g)&&Eg(g,o):tt(g)?g.includes(o)||g.push(o):f?(c[l]=[o],_t(d,l)&&(d[l]=c[l])):(l.value=[o],e.k&&(c[e.k]=l.value))}else f?(c[l]=a,_t(d,l)&&(d[l]=a)):h&&(l.value=a,e.k&&(c[e.k]=a))};a?(p.id=-1,Ln(p,n)):p()}}}const Ew=Symbol("_vte"),x$=e=>e.__isTeleport,pl=e=>e&&(e.disabled||e.disabled===""),vm=e=>typeof SVGElement<"u"&&e instanceof SVGElement,bm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,n0=(e,t)=>{const n=e&&e.to;return Gt(n)?t?t(n):null:n},w$={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,o,a,s,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:g,createComment:b}}=u,v=pl(t.props);let{shapeFlag:x,children:y,dynamicChildren:_}=t;if(e==null){const S=t.el=g(""),$=t.anchor=g("");h(S,n,r),h($,n,r);const w=t.target=n0(t.props,p),T=Pw(w,t,g,h);w&&(a==="svg"||vm(w)?a="svg":(a==="mathml"||bm(w))&&(a="mathml"));const M=(P,R)=>{x&16&&c(y,P,R,i,o,a,s,l)};v?M(n,$):w&&M(w,T)}else{t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,$=t.target=e.target,w=t.targetAnchor=e.targetAnchor,T=pl(e.props),M=T?n:$,P=T?S:w;if(a==="svg"||vm($)?a="svg":(a==="mathml"||bm($))&&(a="mathml"),_?(f(e.dynamicChildren,_,M,i,o,a,s),Yg(e,t,!0)):l||d(e,t,M,P,i,o,a,s,!1),v)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ju(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=n0(t.props,p);R&&ju(t,R,null,u,0)}else T&&ju(t,$,w,u,1)}Aw(t)},remove(e,t,n,{um:r,o:{remove:i}},o){const{shapeFlag:a,children:s,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(i(u),i(c)),o&&i(l),a&16){const h=o||!pl(f);for(let p=0;p<s.length;p++){const g=s[p];r(g,t,n,h,!!g.dynamicChildren)}}},move:ju,hydrate:C$};function ju(e,t,n,{o:{insert:r},m:i},o=2){o===0&&r(e.targetAnchor,t,n);const{el:a,anchor:s,shapeFlag:l,children:u,props:c}=e,d=o===2;if(d&&r(a,t,n),(!d||pl(c))&&l&16)for(let f=0;f<u.length;f++)i(u[f],t,n,2);d&&r(s,t,n)}function C$(e,t,n,r,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l,insert:u,createText:c}},d){const f=t.target=n0(t.props,l);if(f){const h=f._lpa||f.firstChild;if(t.shapeFlag&16)if(pl(t.props))t.anchor=d(a(e),t,s(e),n,r,i,o),t.targetStart=h,t.targetAnchor=h&&a(h);else{t.anchor=a(e);let p=h;for(;p;){if(p&&p.nodeType===8){if(p.data==="teleport start anchor")t.targetStart=p;else if(p.data==="teleport anchor"){t.targetAnchor=p,f._lpa=t.targetAnchor&&a(t.targetAnchor);break}}p=a(p)}t.targetAnchor||Pw(f,t,c,u),d(h&&a(h),t,f,n,r,i,o)}Aw(t)}return t.anchor&&a(t.anchor)}const S$=w$;function Aw(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Pw(e,t,n,r){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[Ew]=o,e&&(r(i,e),r(o,e)),o}const Ln=L$;function $$(e){return k$(e)}function k$(e,t){const n=Ox();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=sr,insertStaticContent:p}=e,g=(A,H,Y,de=null,le=null,q=null,N=void 0,re=null,L=!!H.dynamicChildren)=>{if(A===H)return;A&&!Ao(A,H)&&(de=Xe(A),oe(A,le,q,!0),A=null),H.patchFlag===-2&&(L=!1,H.dynamicChildren=null);const{type:O,ref:ee,shapeFlag:U}=H;switch(O){case gu:b(A,H,Y,de);break;case sn:v(A,H,Y,de);break;case Ch:A==null&&x(H,Y,de,N);break;case kt:C(A,H,Y,de,le,q,N,re,L);break;default:U&1?S(A,H,Y,de,le,q,N,re,L):U&6?E(A,H,Y,de,le,q,N,re,L):(U&64||U&128)&&O.process(A,H,Y,de,le,q,N,re,L,Ee)}ee!=null&&le&&t0(ee,A&&A.ref,q,H||A,!H)},b=(A,H,Y,de)=>{if(A==null)r(H.el=s(H.children),Y,de);else{const le=H.el=A.el;H.children!==A.children&&u(le,H.children)}},v=(A,H,Y,de)=>{A==null?r(H.el=l(H.children||""),Y,de):H.el=A.el},x=(A,H,Y,de)=>{[A.el,A.anchor]=p(A.children,H,Y,de,A.el,A.anchor)},y=({el:A,anchor:H},Y,de)=>{let le;for(;A&&A!==H;)le=f(A),r(A,Y,de),A=le;r(H,Y,de)},_=({el:A,anchor:H})=>{let Y;for(;A&&A!==H;)Y=f(A),i(A),A=Y;i(H)},S=(A,H,Y,de,le,q,N,re,L)=>{H.type==="svg"?N="svg":H.type==="math"&&(N="mathml"),A==null?$(H,Y,de,le,q,N,re,L):M(A,H,le,q,N,re,L)},$=(A,H,Y,de,le,q,N,re)=>{let L,O;const{props:ee,shapeFlag:U,transition:B,dirs:V}=A;if(L=A.el=a(A.type,q,ee&&ee.is,ee),U&8?c(L,A.children):U&16&&T(A.children,L,null,de,le,wh(A,q),N,re),V&&mo(A,null,de,"created"),w(L,A,A.scopeId,N,de),ee){for(const Ae in ee)Ae!=="value"&&!ul(Ae)&&o(L,Ae,null,ee[Ae],q,de);"value"in ee&&o(L,"value",null,ee.value,q),(O=ee.onVnodeBeforeMount)&&Er(O,de,A)}V&&mo(A,null,de,"beforeMount");const me=M$(le,B);me&&B.beforeEnter(L),r(L,H,Y),((O=ee&&ee.onVnodeMounted)||me||V)&&Ln(()=>{O&&Er(O,de,A),me&&B.enter(L),V&&mo(A,null,de,"mounted")},le)},w=(A,H,Y,de,le)=>{if(Y&&h(A,Y),de)for(let q=0;q<de.length;q++)h(A,de[q]);if(le){let q=le.subTree;if(H===q){const N=le.vnode;w(A,N,N.scopeId,N.slotScopeIds,le.parent)}}},T=(A,H,Y,de,le,q,N,re,L=0)=>{for(let O=L;O<A.length;O++){const ee=A[O]=re?Ai(A[O]):zr(A[O]);g(null,ee,H,Y,de,le,q,N,re)}},M=(A,H,Y,de,le,q,N)=>{const re=H.el=A.el;let{patchFlag:L,dynamicChildren:O,dirs:ee}=H;L|=A.patchFlag&16;const U=A.props||Tt,B=H.props||Tt;let V;if(Y&&yo(Y,!1),(V=B.onVnodeBeforeUpdate)&&Er(V,Y,H,A),ee&&mo(H,A,Y,"beforeUpdate"),Y&&yo(Y,!0),(U.innerHTML&&B.innerHTML==null||U.textContent&&B.textContent==null)&&c(re,""),O?P(A.dynamicChildren,O,re,Y,de,wh(H,le),q):N||J(A,H,re,null,Y,de,wh(H,le),q,!1),L>0){if(L&16)R(re,U,B,Y,le);else if(L&2&&U.class!==B.class&&o(re,"class",null,B.class,le),L&4&&o(re,"style",U.style,B.style,le),L&8){const me=H.dynamicProps;for(let Ae=0;Ae<me.length;Ae++){const Re=me[Ae],rt=U[Re],lt=B[Re];(lt!==rt||Re==="value")&&o(re,Re,rt,lt,le,Y)}}L&1&&A.children!==H.children&&c(re,H.children)}else!N&&O==null&&R(re,U,B,Y,le);((V=B.onVnodeUpdated)||ee)&&Ln(()=>{V&&Er(V,Y,H,A),ee&&mo(H,A,Y,"updated")},de)},P=(A,H,Y,de,le,q,N)=>{for(let re=0;re<H.length;re++){const L=A[re],O=H[re],ee=L.el&&(L.type===kt||!Ao(L,O)||L.shapeFlag&70)?d(L.el):Y;g(L,O,ee,null,de,le,q,N,!0)}},R=(A,H,Y,de,le)=>{if(H!==Y){if(H!==Tt)for(const q in H)!ul(q)&&!(q in Y)&&o(A,q,H[q],null,le,de);for(const q in Y){if(ul(q))continue;const N=Y[q],re=H[q];N!==re&&q!=="value"&&o(A,q,re,N,le,de)}"value"in Y&&o(A,"value",H.value,Y.value,le)}},C=(A,H,Y,de,le,q,N,re,L)=>{const O=H.el=A?A.el:s(""),ee=H.anchor=A?A.anchor:s("");let{patchFlag:U,dynamicChildren:B,slotScopeIds:V}=H;V&&(re=re?re.concat(V):V),A==null?(r(O,Y,de),r(ee,Y,de),T(H.children||[],Y,ee,le,q,N,re,L)):U>0&&U&64&&B&&A.dynamicChildren?(P(A.dynamicChildren,B,Y,le,q,N,re),(H.key!=null||le&&H===le.subTree)&&Yg(A,H,!0)):J(A,H,Y,ee,le,q,N,re,L)},E=(A,H,Y,de,le,q,N,re,L)=>{H.slotScopeIds=re,A==null?H.shapeFlag&512?le.ctx.activate(H,Y,de,N,L):F(H,Y,de,le,q,N,L):z(A,H,L)},F=(A,H,Y,de,le,q,N)=>{const re=A.component=V$(A,de,le);if(fd(A)&&(re.ctx.renderer=Ee),q$(re,!1,N),re.asyncDep){if(le&&le.registerDep(re,j,N),!A.el){const L=re.subTree=Ge(sn);v(null,L,H,Y)}}else j(re,A,H,Y,le,q,N)},z=(A,H,Y)=>{const de=H.component=A.component;if(B$(A,H,Y))if(de.asyncDep&&!de.asyncResolved){Z(de,H,Y);return}else de.next=H,KS(de.update),de.effect.dirty=!0,de.update();else H.el=A.el,de.vnode=H},j=(A,H,Y,de,le,q,N)=>{const re=()=>{if(A.isMounted){let{next:ee,bu:U,u:B,parent:V,vnode:me}=A;{const ft=Rw(A);if(ft){ee&&(ee.el=me.el,Z(A,ee,N)),ft.asyncDep.then(()=>{A.isUnmounted||re()});return}}let Ae=ee,Re;yo(A,!1),ee?(ee.el=me.el,Z(A,ee,N)):ee=me,U&&mh(U),(Re=ee.props&&ee.props.onVnodeBeforeUpdate)&&Er(Re,V,ee,me),yo(A,!0);const rt=ym(A),lt=A.subTree;A.subTree=rt,g(lt,rt,d(lt.el),Xe(lt),A,le,q),ee.el=rt.el,Ae===null&&O$(A,rt.el),B&&Ln(B,le),(Re=ee.props&&ee.props.onVnodeUpdated)&&Ln(()=>Er(Re,V,ee,me),le)}else{let ee;const{el:U,props:B}=H,{bm:V,m:me,parent:Ae}=A,Re=dl(H);yo(A,!1),V&&mh(V),!Re&&(ee=B&&B.onVnodeBeforeMount)&&Er(ee,Ae,H),yo(A,!0);{const rt=A.subTree=ym(A);g(null,rt,Y,de,A,le,q),H.el=rt.el}if(me&&Ln(me,le),!Re&&(ee=B&&B.onVnodeMounted)){const rt=H;Ln(()=>Er(ee,Ae,rt),le)}(H.shapeFlag&256||Ae&&dl(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&A.a&&Ln(A.a,le),A.isMounted=!0,H=Y=de=null}},L=A.effect=new Rg(re,sr,()=>Ug(O),A.scope),O=A.update=()=>{L.dirty&&L.run()};O.i=A,O.id=A.uid,yo(A,!0),O()},Z=(A,H,Y)=>{H.component=A;const de=A.vnode.props;A.vnode=H,A.next=null,v$(A,H.props,de,Y),_$(A,H.children,Y),ao(),cm(A),so()},J=(A,H,Y,de,le,q,N,re,L=!1)=>{const O=A&&A.children,ee=A?A.shapeFlag:0,U=H.children,{patchFlag:B,shapeFlag:V}=H;if(B>0){if(B&128){he(O,U,Y,de,le,q,N,re,L);return}else if(B&256){ie(O,U,Y,de,le,q,N,re,L);return}}V&8?(ee&16&&xe(O,le,q),U!==O&&c(Y,U)):ee&16?V&16?he(O,U,Y,de,le,q,N,re,L):xe(O,le,q,!0):(ee&8&&c(Y,""),V&16&&T(U,Y,de,le,q,N,re,L))},ie=(A,H,Y,de,le,q,N,re,L)=>{A=A||Oa,H=H||Oa;const O=A.length,ee=H.length,U=Math.min(O,ee);let B;for(B=0;B<U;B++){const V=H[B]=L?Ai(H[B]):zr(H[B]);g(A[B],V,Y,null,le,q,N,re,L)}O>ee?xe(A,le,q,!0,!1,U):T(H,Y,de,le,q,N,re,L,U)},he=(A,H,Y,de,le,q,N,re,L)=>{let O=0;const ee=H.length;let U=A.length-1,B=ee-1;for(;O<=U&&O<=B;){const V=A[O],me=H[O]=L?Ai(H[O]):zr(H[O]);if(Ao(V,me))g(V,me,Y,null,le,q,N,re,L);else break;O++}for(;O<=U&&O<=B;){const V=A[U],me=H[B]=L?Ai(H[B]):zr(H[B]);if(Ao(V,me))g(V,me,Y,null,le,q,N,re,L);else break;U--,B--}if(O>U){if(O<=B){const V=B+1,me=V<ee?H[V].el:de;for(;O<=B;)g(null,H[O]=L?Ai(H[O]):zr(H[O]),Y,me,le,q,N,re,L),O++}}else if(O>B)for(;O<=U;)oe(A[O],le,q,!0),O++;else{const V=O,me=O,Ae=new Map;for(O=me;O<=B;O++){const ye=H[O]=L?Ai(H[O]):zr(H[O]);ye.key!=null&&Ae.set(ye.key,O)}let Re,rt=0;const lt=B-me+1;let ft=!1,zt=0;const yt=new Array(lt);for(O=0;O<lt;O++)yt[O]=0;for(O=V;O<=U;O++){const ye=A[O];if(rt>=lt){oe(ye,le,q,!0);continue}let G;if(ye.key!=null)G=Ae.get(ye.key);else for(Re=me;Re<=B;Re++)if(yt[Re-me]===0&&Ao(ye,H[Re])){G=Re;break}G===void 0?oe(ye,le,q,!0):(yt[G-me]=O+1,G>=zt?zt=G:ft=!0,g(ye,H[G],Y,null,le,q,N,re,L),rt++)}const Lt=ft?T$(yt):Oa;for(Re=Lt.length-1,O=lt-1;O>=0;O--){const ye=me+O,G=H[ye],m=ye+1<ee?H[ye+1].el:de;yt[O]===0?g(null,G,Y,m,le,q,N,re,L):ft&&(Re<0||O!==Lt[Re]?_e(G,Y,m,2):Re--)}}},_e=(A,H,Y,de,le=null)=>{const{el:q,type:N,transition:re,children:L,shapeFlag:O}=A;if(O&6){_e(A.component.subTree,H,Y,de);return}if(O&128){A.suspense.move(H,Y,de);return}if(O&64){N.move(A,H,Y,Ee);return}if(N===kt){r(q,H,Y);for(let U=0;U<L.length;U++)_e(L[U],H,Y,de);r(A.anchor,H,Y);return}if(N===Ch){y(A,H,Y);return}if(de!==2&&O&1&&re)if(de===0)re.beforeEnter(q),r(q,H,Y),Ln(()=>re.enter(q),le);else{const{leave:U,delayLeave:B,afterLeave:V}=re,me=()=>r(q,H,Y),Ae=()=>{U(q,()=>{me(),V&&V()})};B?B(q,me,Ae):Ae()}else r(q,H,Y)},oe=(A,H,Y,de=!1,le=!1)=>{const{type:q,props:N,ref:re,children:L,dynamicChildren:O,shapeFlag:ee,patchFlag:U,dirs:B,cacheIndex:V}=A;if(U===-2&&(le=!1),re!=null&&t0(re,null,Y,A,!0),V!=null&&(H.renderCache[V]=void 0),ee&256){H.ctx.deactivate(A);return}const me=ee&1&&B,Ae=!dl(A);let Re;if(Ae&&(Re=N&&N.onVnodeBeforeUnmount)&&Er(Re,H,A),ee&6)Oe(A.component,Y,de);else{if(ee&128){A.suspense.unmount(Y,de);return}me&&mo(A,null,H,"beforeUnmount"),ee&64?A.type.remove(A,H,Y,Ee,de):O&&!O.hasOnce&&(q!==kt||U>0&&U&64)?xe(O,H,Y,!1,!0):(q===kt&&U&384||!le&&ee&16)&&xe(L,H,Y),de&&ve(A)}(Ae&&(Re=N&&N.onVnodeUnmounted)||me)&&Ln(()=>{Re&&Er(Re,H,A),me&&mo(A,null,H,"unmounted")},Y)},ve=A=>{const{type:H,el:Y,anchor:de,transition:le}=A;if(H===kt){we(Y,de);return}if(H===Ch){_(A);return}const q=()=>{i(Y),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(A.shapeFlag&1&&le&&!le.persisted){const{leave:N,delayLeave:re}=le,L=()=>N(Y,q);re?re(A.el,q,L):L()}else q()},we=(A,H)=>{let Y;for(;A!==H;)Y=f(A),i(A),A=Y;i(H)},Oe=(A,H,Y)=>{const{bum:de,scope:le,update:q,subTree:N,um:re,m:L,a:O}=A;mm(L),mm(O),de&&mh(de),le.stop(),q&&(q.active=!1,oe(N,A,H,Y)),re&&Ln(re,H),Ln(()=>{A.isUnmounted=!0},H),H&&H.pendingBranch&&!H.isUnmounted&&A.asyncDep&&!A.asyncResolved&&A.suspenseId===H.pendingId&&(H.deps--,H.deps===0&&H.resolve())},xe=(A,H,Y,de=!1,le=!1,q=0)=>{for(let N=q;N<A.length;N++)oe(A[N],H,Y,de,le)},Xe=A=>{if(A.shapeFlag&6)return Xe(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const H=f(A.anchor||A.el),Y=H&&H[Ew];return Y?f(Y):H};let Ve=!1;const fe=(A,H,Y)=>{A==null?H._vnode&&oe(H._vnode,null,null,!0):g(H._vnode||null,A,H,null,null,null,Y),H._vnode=A,Ve||(Ve=!0,cm(),iw(),Ve=!1)},Ee={p:g,um:oe,m:_e,r:ve,mt:F,mc:T,pc:J,pbc:P,n:Xe,o:e};return{render:fe,hydrate:void 0,createApp:p$(fe)}}function wh({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 yo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function M$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yg(e,t,n=!1){const r=e.children,i=t.children;if(tt(r)&&tt(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Ai(i[o]),s.el=a.el),!n&&s.patchFlag!==-2&&Yg(a,s)),s.type===gu&&(s.el=a.el)}}function T$(e){const t=e.slice(),n=[0];let r,i,o,a,s;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(i=n[n.length-1],e[i]<u){t[r]=i,n.push(r);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,e[n[s]]<u?o=s+1:a=s;u<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function Rw(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rw(t)}function mm(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const E$=Symbol.for("v-scx"),A$=()=>$t(E$);function xr(e,t){return pd(e,null,t)}function P$(e,t){return pd(e,null,{flush:"sync"})}const Wu={};function vt(e,t,n){return pd(e,t,n)}function pd(e,t,{immediate:n,deep:r,flush:i,once:o,onTrack:a,onTrigger:s}=Tt){if(t&&o){const $=t;t=(...w)=>{$(...w),S()}}const l=_n,u=$=>r===!0?$:Ii($,r===!1?1:void 0);let c,d=!1,f=!1;if(wn(e)?(c=()=>e.value,d=Ka(e)):cl(e)?(c=()=>u(e),d=!0):tt(e)?(f=!0,d=e.some($=>cl($)||Ka($)),c=()=>e.map($=>{if(wn($))return $.value;if(cl($))return u($);if(it($))return Di($,l,2)})):it(e)?t?c=()=>Di(e,l,2):c=()=>(h&&h(),fr(e,l,3,[p])):c=sr,t&&r){const $=c;c=()=>Ii($())}let h,p=$=>{h=y.onStop=()=>{Di($,l,4),h=y.onStop=void 0}},g;if(vd)if(p=sr,t?n&&fr(t,l,3,[c(),f?[]:void 0,p]):c(),i==="sync"){const $=A$();g=$.__watcherHandles||($.__watcherHandles=[])}else return sr;let b=f?new Array(e.length).fill(Wu):Wu;const v=()=>{if(!(!y.active||!y.dirty))if(t){const $=y.run();(r||d||(f?$.some((w,T)=>Hn(w,b[T])):Hn($,b)))&&(h&&h(),fr(t,l,3,[$,b===Wu?void 0:f&&b[0]===Wu?[]:b,p]),b=$)}else y.run()};v.allowRecurse=!!t;let x;i==="sync"?x=v:i==="post"?x=()=>Ln(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),x=()=>Ug(v));const y=new Rg(c,sr,x),_=vS(),S=()=>{y.stop(),_&&Eg(_.effects,y)};return t?n?v():b=y.run():i==="post"?Ln(y.run.bind(y),l&&l.suspense):y.run(),g&&g.push(S),S}function R$(e,t,n){const r=this.proxy,i=Gt(e)?e.includes(".")?zw(r,e):()=>r[e]:e.bind(r,r);let o;it(t)?o=t:(o=t.handler,n=t);const a=vu(this),s=pd(i,o.bind(r),n);return a(),s}function zw(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Ii(e,t=1/0,n){if(t<=0||!Rt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,wn(e))Ii(e.value,t,n);else if(tt(e))for(let r=0;r<e.length;r++)Ii(e[r],t,n);else if(Px(e)||Na(e))e.forEach(r=>{Ii(r,t,n)});else if(Fx(e)){for(const r in e)Ii(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ii(e[r],t,n)}return e}function Xg(e,t,n=Tt){const r=ps(),i=Gi(t),o=oo(t),a=Fw(e,t),s=WS((l,u)=>{let c,d=Tt,f;return P$(()=>{const h=e[t];Hn(c,h)&&(c=h,u())}),{get(){return l(),n.get?n.get(c):c},set(h){const p=n.set?n.set(h):h;if(!Hn(p,c)&&!(d!==Tt&&Hn(h,d)))return;const g=r.vnode.props;g&&(t in g||i in g||o in g)&&(`onUpdate:${t}`in g||`onUpdate:${i}`in g||`onUpdate:${o}`in g)||(c=h,u()),r.emit(`update:${t}`,p),Hn(h,p)&&Hn(h,d)&&!Hn(p,f)&&u(),d=h,f=p}}});return s[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?a||Tt:s,done:!1}:{done:!0}}}},s}const Fw=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Gi(t)}Modifiers`]||e[`${oo(t)}Modifiers`];function z$(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Tt;let i=n;const o=t.startsWith("update:"),a=o&&Fw(r,t.slice(7));a&&(a.trim&&(i=n.map(c=>Gt(c)?c.trim():c)),a.number&&(i=n.map(aS)));let s,l=r[s=bh(t)]||r[s=bh(Gi(t))];!l&&o&&(l=r[s=bh(oo(t))]),l&&fr(l,e,6,i);const u=r[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,fr(u,e,6,i)}}function Iw(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let a={},s=!1;if(!it(e)){const l=u=>{const c=Iw(u,t,!0);c&&(s=!0,nn(a,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!s?(Rt(e)&&r.set(e,null),null):(tt(o)?o.forEach(l=>a[l]=null):nn(a,o),Rt(e)&&r.set(e,a),a)}function gd(e,t){return!e||!ad(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,oo(t))||_t(e,t))}function ym(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[o],slots:a,attrs:s,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:p,inheritAttrs:g}=e,b=qc(e);let v,x;try{if(n.shapeFlag&4){const _=i||r,S=_;v=zr(u.call(S,_,c,d,h,f,p)),x=s}else{const _=t;v=zr(_.length>1?_(d,{attrs:s,slots:a,emit:l}):_(d,null)),x=t.props?s:F$(s)}}catch(_){gl.length=0,cd(_,e,1),v=Ge(sn)}let y=v;if(x&&g!==!1){const _=Object.keys(x),{shapeFlag:S}=y;_.length&&S&7&&(o&&_.some(Tg)&&(x=I$(x,o)),y=Vr(y,x,!1,!0))}return n.dirs&&(y=Vr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),v=y,qc(b),v}const F$=e=>{let t;for(const n in e)(n==="class"||n==="style"||ad(n))&&((t||(t={}))[n]=e[n]);return t},I$=(e,t)=>{const n={};for(const r in e)(!Tg(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function B$(e,t,n){const{props:r,children:i,component:o}=e,{props:a,children:s,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?_m(r,a,u):!!a;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(a[f]!==r[f]&&!gd(u,f))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?_m(r,a,u):!0:!!a;return!1}function _m(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(t[o]!==e[o]&&!gd(n,o))return!0}return!1}function O$({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const N$=e=>e.__isSuspense;function L$(e,t){t&&t.pendingBranch?tt(e)?t.effects.push(...e):t.effects.push(e):ZS(e)}const kt=Symbol.for("v-fgt"),gu=Symbol.for("v-txt"),sn=Symbol.for("v-cmt"),Ch=Symbol.for("v-stc"),gl=[];let Yn=null;function We(e=!1){gl.push(Yn=e?null:[])}function D$(){gl.pop(),Yn=gl[gl.length-1]||null}let Fl=1;function xm(e){Fl+=e,e<0&&Yn&&(Yn.hasOnce=!0)}function Bw(e){return e.dynamicChildren=Fl>0?Yn||Oa:null,D$(),Fl>0&&Yn&&Yn.push(e),e}function wt(e,t,n,r,i,o){return Bw(ot(e,t,n,r,i,o,!0))}function It(e,t,n,r,i){return Bw(Ge(e,t,n,r,i,!0))}function Il(e){return e?e.__v_isVNode===!0:!1}function Ao(e,t){return e.type===t.type&&e.key===t.key}const Ow=({key:e})=>e??null,Mc=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Gt(e)||wn(e)||it(e)?{i:ln,r:e,k:t,f:!!n}:e:null);function ot(e,t=null,n=null,r=0,i=null,o=e===kt?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ow(t),ref:t&&Mc(t),scopeId:aw,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:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ln};return s?(Kg(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Gt(n)?8:16),Fl>0&&!a&&Yn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Yn.push(l),l}const Ge=H$;function H$(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===a$)&&(e=sn),Il(e)){const s=Vr(e,t,!0);return n&&Kg(s,n),Fl>0&&!o&&Yn&&(s.shapeFlag&6?Yn[Yn.indexOf(e)]=s:Yn.push(s)),s.patchFlag=-2,s}if(K$(e)&&(e=e.__vccOpts),t){t=U$(t);let{class:s,style:l}=t;s&&!Gt(s)&&(t.class=pu(s)),Rt(l)&&(Jx(l)&&!tt(l)&&(l=nn({},l)),t.style=Pg(l))}const a=Gt(e)?1:N$(e)?128:x$(e)?64:Rt(e)?4:it(e)?2:0;return ot(e,t,n,r,i,a,o,!0)}function U$(e){return e?Jx(e)||ww(e)?nn({},e):e:null}function Vr(e,t,n=!1,r=!1){const{props:i,ref:o,patchFlag:a,children:s,transition:l}=e,u=t?ia(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Ow(u),ref:t&&t.ref?n&&o?tt(o)?o.concat(Mc(t)):[o,Mc(t)]:Mc(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==kt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vr(e.ssContent),ssFallback:e.ssFallback&&Vr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Za(c,l.clone(c)),c}function Wo(e=" ",t=0){return Ge(gu,null,e,t)}function Xn(e="",t=!1){return t?(We(),It(sn,null,e)):Ge(sn,null,e)}function zr(e){return e==null||typeof e=="boolean"?Ge(sn):tt(e)?Ge(kt,null,e.slice()):typeof e=="object"?Ai(e):Ge(gu,null,String(e))}function Ai(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vr(e)}function Kg(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(tt(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Kg(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!ww(t)?t._ctx=ln:i===3&&ln&&(ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:ln},n=32):(t=String(t),r&64?(n=16,t=[Wo(t)]):n=8);e.children=t,e.shapeFlag|=n}function ia(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=pu([t.class,r.class]));else if(i==="style")t.style=Pg([t.style,r.style]);else if(ad(i)){const o=t[i],a=r[i];a&&o!==a&&!(tt(o)&&o.includes(a))&&(t[i]=o?[].concat(o,a):a)}else i!==""&&(t[i]=r[i])}return t}function Er(e,t,n,r=null){fr(e,t,7,[n,r])}const j$=yw();let W$=0;function V$(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||j$,o={uid:W$++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new pS(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Sw(r,i),emitsOptions:Iw(r,i),emit:null,emitted:null,propsDefaults:Tt,inheritAttrs:r.inheritAttrs,ctx:Tt,data:Tt,props:Tt,attrs:Tt,slots:Tt,refs:Tt,setupState:Tt,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=z$.bind(null,o),e.ce&&e.ce(o),o}let _n=null;const ps=()=>_n||ln;let Kc,r0;{const e=Ox(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};Kc=t("__VUE_INSTANCE_SETTERS__",n=>_n=n),r0=t("__VUE_SSR_SETTERS__",n=>vd=n)}const vu=e=>{const t=_n;return Kc(e),e.scope.on(),()=>{e.scope.off(),Kc(t)}},wm=()=>{_n&&_n.scope.off(),Kc(null)};function Nw(e){return e.vnode.shapeFlag&4}let vd=!1;function q$(e,t=!1,n=!1){t&&r0(t);const{props:r,children:i}=e.vnode,o=Nw(e);g$(e,r,o,t),y$(e,i,n);const a=o?G$(e,t):void 0;return t&&r0(!1),a}function G$(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,s$);const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?X$(e):null,o=vu(e);ao();const a=Di(r,e,0,[e.props,i]);if(so(),o(),Rx(a)){if(a.then(wm,wm),t)return a.then(s=>{Cm(e,s)}).catch(s=>{cd(s,e,0)});e.asyncDep=a}else Cm(e,a)}else Lw(e)}function Cm(e,t,n){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=tw(t)),Lw(e)}function Lw(e,t,n){const r=e.type;e.render||(e.render=r.render||sr);{const i=vu(e);ao();try{l$(e)}finally{so(),i()}}}const Y$={get(e,t){return Wn(e,"get",""),e[t]}};function X$(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Y$),slots:e.slots,emit:e.emit,expose:t}}function bd(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tw(NS(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hl)return hl[n](e)},has(t,n){return n in t||n in hl}})):e.proxy}function K$(e){return it(e)&&"__vccOpts"in e}const pe=(e,t)=>LS(e,t,vd);function k(e,t,n){const r=arguments.length;return r===2?Rt(t)&&!tt(t)?Il(t)?Ge(e,null,[t]):Ge(e,t):Ge(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Il(n)&&(n=[n]),Ge(e,t,n))}const Z$="3.4.38";/**
|
|
14
14
|
* @vue/runtime-dom v3.4.38
|
|
15
15
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
16
|
* @license MIT
|
|
17
|
-
**/const J$="http://www.w3.org/2000/svg",Q$="http://www.w3.org/1998/Math/MathML",oi=typeof document<"u"?document:null,Sm=oi&&oi.createElement("template"),e7={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?oi.createElementNS(J$,e):t==="mathml"?oi.createElementNS(Q$,e):n?oi.createElement(e,{is:n}):oi.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>oi.createTextNode(e),createComment:e=>oi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>oi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const a=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Sm.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const s=Sm.content;if(r==="svg"||r==="mathml"){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Si="transition",$s="animation",Ja=Symbol("_vtc"),wr=(e,{slots:t})=>k(e$,Hw(e),t);wr.displayName="Transition";const Dw={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},t7=wr.props=nn({},lw,Dw),_o=(e,t=[])=>{tt(e)?e.forEach(n=>n(...t)):e&&e(...t)},$m=e=>e?tt(e)?e.some(t=>t.length>1):e.length>1:!1;function Hw(e){const t={};for(const C in e)C in Dw||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=n7(i),g=p&&p[0],b=p&&p[1],{onBeforeEnter:v,onEnter:x,onEnterCancelled:y,onLeave:_,onLeaveCancelled:S,onBeforeAppear:$=v,onAppear:w=x,onAppearCancelled:T=y}=t,M=(C,E,F)=>{Mi(C,E?c:s),Mi(C,E?u:a),F&&F()},P=(C,E)=>{C._isLeaving=!1,Mi(C,f),Mi(C,h),Mi(C,d),E&&E()},R=C=>(E,F)=>{const z=C?w:x,j=()=>M(E,C,F);_o(z,[E,j]),km(()=>{Mi(E,C?l:o),ii(E,C?c:s),$m(z)||Mm(E,r,g,j)})};return nn(t,{onBeforeEnter(C){_o(v,[C]),ii(C,o),ii(C,a)},onBeforeAppear(C){_o($,[C]),ii(C,l),ii(C,u)},onEnter:R(!1),onAppear:R(!0),onLeave(C,E){C._isLeaving=!0;const F=()=>P(C,E);ii(C,f),ii(C,d),jw(),km(()=>{C._isLeaving&&(Mi(C,f),ii(C,h),$m(_)||Mm(C,r,b,F))}),_o(_,[C,F])},onEnterCancelled(C){M(C,!1),_o(y,[C])},onAppearCancelled(C){M(C,!0),_o(T,[C])},onLeaveCancelled(C){P(C),_o(S,[C])}})}function n7(e){if(e==null)return null;if(Rt(e))return[Sh(e.enter),Sh(e.leave)];{const t=Sh(e);return[t,t]}}function Sh(e){return sS(e)}function ii(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ja]||(e[Ja]=new Set)).add(t)}function Mi(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ja];n&&(n.delete(t),n.size||(e[Ja]=void 0))}function km(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let r7=0;function Mm(e,t,n,r){const i=e._endId=++r7,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:s,propCount:l}=Uw(e,t);if(!a)return r();const u=a+"end";let c=0;const f=()=>{e.removeEventListener(u,d),o()},d=h=>{h.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},s+1),e.addEventListener(u,d)}function Uw(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),i=r(`${Si}Delay`),o=r(`${Si}Duration`),a=Tm(i,o),s=r(`${$s}Delay`),l=r(`${$s}Duration`),u=Tm(s,l);let c=null,f=0,d=0;t===Si?a>0&&(c=Si,f=a,d=o.length):t===$s?u>0&&(c=$s,f=u,d=l.length):(f=Math.max(a,u),c=f>0?a>u?Si:$s:null,d=c?c===Si?o.length:l.length:0);const h=c===Si&&/\b(transform|all)(,|$)/.test(r(`${Si}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function Tm(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Em(n)+Em(e[r])))}function Em(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function jw(){return document.body.offsetHeight}function i7(e,t,n){const r=e[Ja];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Zc=Symbol("_vod"),Ww=Symbol("_vsh"),mf={beforeMount(e,{value:t},{transition:n}){e[Zc]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ks(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ks(e,!0),r.enter(e)):r.leave(e,()=>{ks(e,!1)}):ks(e,t))},beforeUnmount(e,{value:t}){ks(e,t)}};function ks(e,t){e.style.display=t?e[Zc]:"none",e[Ww]=!t}const o7=Symbol(""),a7=/(^|;)\s*display\s*:/;function s7(e,t,n){const r=e.style,i=Gt(n);let o=!1;if(n&&!i){if(t)if(Gt(t))for(const a of t.split(";")){const s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&Tc(r,s,"")}else for(const a in t)n[a]==null&&Tc(r,a,"");for(const a in n)a==="display"&&(o=!0),Tc(r,a,n[a])}else if(i){if(t!==n){const a=r[o7];a&&(n+=";"+a),r.cssText=n,o=a7.test(n)}}else t&&e.removeAttribute("style");Zc in e&&(e[Zc]=o?r.display:"",e[Ww]&&(r.display="none"))}const Am=/\s*!important$/;function Tc(e,t,n){if(tt(n))n.forEach(r=>Tc(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=l7(e,t);Am.test(n)?e.setProperty(oo(r),n.replace(Am,""),"important"):e[r]=n}}const Pm=["Webkit","Moz","ms"],$h={};function l7(e,t){const n=$h[t];if(n)return n;let r=Gi(t);if(r!=="filter"&&r in e)return $h[t]=r;r=Ix(r);for(let i=0;i<Pm.length;i++){const o=Pm[i]+r;if(o in e)return $h[t]=o}return t}const Rm="http://www.w3.org/1999/xlink";function zm(e,t,n,r,i,o=hS(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Rm,t.slice(6,t.length)):e.setAttributeNS(Rm,t,n):n==null||o&&!Nx(n)?e.removeAttribute(t):e.setAttribute(t,o?"":io(n)?String(n):n)}function u7(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=n;return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,s=n==null?"":String(n);(a!==s||!("_value"in e))&&(e.value=s),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Nx(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(t)}function c7(e,t,n,r){e.addEventListener(t,n,r)}function d7(e,t,n,r){e.removeEventListener(t,n,r)}const Fm=Symbol("_vei");function f7(e,t,n,r,i=null){const o=e[Fm]||(e[Fm]={}),a=o[t];if(r&&a)a.value=r;else{const[s,l]=h7(t);if(r){const u=o[t]=v7(r,i);c7(e,s,u,l)}else a&&(d7(e,s,a,l),o[t]=void 0)}}const Im=/(?:Once|Passive|Capture)$/;function h7(e){let t;if(Im.test(e)){t={};let r;for(;r=e.match(Im);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):oo(e.slice(2)),t]}let kh=0;const p7=Promise.resolve(),g7=()=>kh||(p7.then(()=>kh=0),kh=Date.now());function v7(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;dr(b7(r,n.value),t,5,[r])};return n.value=e,n.attached=g7(),n}function b7(e,t){if(tt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Bm=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,m7=(e,t,n,r,i,o)=>{const a=i==="svg";t==="class"?i7(e,r,a):t==="style"?s7(e,n,r):af(t)?Tg(t)||f7(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):y7(e,t,r,a))?(u7(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zm(e,t,r,a,o,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),zm(e,t,r,a))};function y7(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bm(t)&&it(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Bm(t)&&Gt(n)?!1:t in e}const Vw=new WeakMap,qw=new WeakMap,Jc=Symbol("_moveCb"),Om=Symbol("_enterCb"),Gw={name:"TransitionGroup",props:nn({},t7,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ps(),r=sw();let i,o;return hw(()=>{if(!i.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!S7(i[0].el,n.vnode.el,a))return;i.forEach(x7),i.forEach(w7);const s=i.filter(C7);jw(),s.forEach(l=>{const u=l.el,c=u.style;ii(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const f=u[Jc]=d=>{d&&d.target!==u||(!d||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",f),u[Jc]=null,Mi(u,a))};u.addEventListener("transitionend",f)})}),()=>{const a=xt(e),s=Hw(a);let l=a.tag||kt;if(i=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&(i.push(c),Za(c,zl(c,s,r,n)),Vw.set(c,c.el.getBoundingClientRect()))}o=t.default?jg(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&Za(c,zl(c,s,r,n))}return Ge(l,null,o)}}},_7=e=>delete e.mode;Gw.props;const Yw=Gw;function x7(e){const t=e.el;t[Jc]&&t[Jc](),t[Om]&&t[Om]()}function w7(e){qw.set(e,e.el.getBoundingClientRect())}function C7(e){const t=Vw.get(e),n=qw.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",e}}function S7(e,t,n){const r=e.cloneNode(),i=e[Ja];i&&i.forEach(s=>{s.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(s=>s&&r.classList.add(s)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:a}=Uw(r);return o.removeChild(r),a}const $7=nn({patchProp:m7},e7);let Nm;function k7(){return Nm||(Nm=$$($7))}const M7=(...e)=>{const t=k7().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=E7(r);if(!i)return;const o=t._component;!it(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,T7(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function T7(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function E7(e){return Gt(e)?document.querySelector(e):e}function Xw(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function Bl(e){throw Error(Xw(e))}const Lm=ne("/"),Dm=ne("include");function Kw(){function e(){return Dm.value}function t(i){Dm.value=i}function n(){return Lm.value}function r(i){Lm.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}let Hm=Promise.resolve();async function Mh(e,t){const n=Kw(),r=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});if(i.ok)return{data:await i.json(),response:i};Bl(i)}catch(i){Bl(i)}}function Th(e){const t=Hm.then(()=>e());return Hm=t.then(()=>{},()=>{}),t}function bu(){function e(r){return Th(()=>Mh(r,{method:"GET"}))}function t(r,i){return Th(()=>Mh(r,{body:JSON.stringify(i),method:"POST"}))}function n(r,i){return Th(()=>Mh(r,{body:JSON.stringify(i),method:"PUT"}))}return{GET:e,POST:t,PUT:n}}function A7(e,t){return`${e}api/datasets/${t}/display`}ne({});function P7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function R7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function z7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function F7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function I7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function B7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Zw(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function Jw(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function O7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function N7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function L7(e){let t=".",n="__",r="--",i;if(e){let c=e.blockPrefix;c&&(t=c),c=e.elementPrefix,c&&(n=c),c=e.modifierPrefix,c&&(r=c)}const o={install(c){i=c.c;const f=c.context;f.bem={},f.bem.b=null,f.bem.els=null}};function a(c){let f,d;return{before(h){f=h.bem.b,d=h.bem.els,h.bem.els=null},after(h){h.bem.b=f,h.bem.els=d},$({context:h,props:p}){return c=typeof c=="string"?c:c({context:h,props:p}),h.bem.b=c,`${(p==null?void 0:p.bPrefix)||t}${h.bem.b}`}}}function s(c){let f;return{before(d){f=d.bem.els},after(d){d.bem.els=f},$({context:d,props:h}){return c=typeof c=="string"?c:c({context:d,props:h}),d.bem.els=c.split(",").map(p=>p.trim()),d.bem.els.map(p=>`${(h==null?void 0:h.bPrefix)||t}${d.bem.b}${n}${p}`).join(", ")}}}function l(c){return{$({context:f,props:d}){c=typeof c=="string"?c:c({context:f,props:d});const h=c.split(",").map(b=>b.trim());function p(b){return h.map(v=>`&${(d==null?void 0:d.bPrefix)||t}${f.bem.b}${b!==void 0?`${n}${b}`:""}${r}${v}`).join(", ")}const g=f.bem.els;return g!==null?p(g[0]):p()}}}function u(c){return{$({context:f,props:d}){c=typeof c=="string"?c:c({context:f,props:d});const h=f.bem.els;return`&:not(${(d==null?void 0:d.bPrefix)||t}${f.bem.b}${h!==null&&h.length>0?`${n}${h[0]}`:""}${r}${c})`}}}return Object.assign(o,{cB:(...c)=>i(a(c[0]),c[1],c[2]),cE:(...c)=>i(s(c[0]),c[1],c[2]),cM:(...c)=>i(l(c[0]),c[1],c[2]),cNotM:(...c)=>i(u(c[0]),c[1],c[2])}),o}function D7(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Qw=/\s*,(?![^(]*\))\s*/g,H7=/\s+/g;function U7(e,t){const n=[];return t.split(Qw).forEach(r=>{let i=D7(r);if(i){if(i===1){e.forEach(a=>{n.push(r.replace("&",a))});return}}else{e.forEach(a=>{n.push((a&&a+" ")+r)});return}let o=[r];for(;i--;){const a=[];o.forEach(s=>{e.forEach(l=>{a.push(s.replace("&",l))})}),o=a}o.forEach(a=>n.push(a))}),n}function j7(e,t){const n=[];return t.split(Qw).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function W7(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=U7(t,n):t=j7(t,n))}),t.join(", ").replace(H7," ")}function Um(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function yf(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function V7(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Vu(e){return e?/^\s*@(s|m)/.test(e):!1}const q7=/[A-Z]/g;function e2(e){return e.replace(q7,t=>"-"+t.toLowerCase())}function G7(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
17
|
+
**/const J$="http://www.w3.org/2000/svg",Q$="http://www.w3.org/1998/Math/MathML",oi=typeof document<"u"?document:null,Sm=oi&&oi.createElement("template"),e7={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?oi.createElementNS(J$,e):t==="mathml"?oi.createElementNS(Q$,e):n?oi.createElement(e,{is:n}):oi.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>oi.createTextNode(e),createComment:e=>oi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>oi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const a=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Sm.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const s=Sm.content;if(r==="svg"||r==="mathml"){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Si="transition",$s="animation",Ja=Symbol("_vtc"),wr=(e,{slots:t})=>k(e$,Hw(e),t);wr.displayName="Transition";const Dw={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},t7=wr.props=nn({},lw,Dw),_o=(e,t=[])=>{tt(e)?e.forEach(n=>n(...t)):e&&e(...t)},$m=e=>e?tt(e)?e.some(t=>t.length>1):e.length>1:!1;function Hw(e){const t={};for(const C in e)C in Dw||(t[C]=e[C]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=n7(i),g=p&&p[0],b=p&&p[1],{onBeforeEnter:v,onEnter:x,onEnterCancelled:y,onLeave:_,onLeaveCancelled:S,onBeforeAppear:$=v,onAppear:w=x,onAppearCancelled:T=y}=t,M=(C,E,F)=>{Mi(C,E?c:s),Mi(C,E?u:a),F&&F()},P=(C,E)=>{C._isLeaving=!1,Mi(C,d),Mi(C,h),Mi(C,f),E&&E()},R=C=>(E,F)=>{const z=C?w:x,j=()=>M(E,C,F);_o(z,[E,j]),km(()=>{Mi(E,C?l:o),ii(E,C?c:s),$m(z)||Mm(E,r,g,j)})};return nn(t,{onBeforeEnter(C){_o(v,[C]),ii(C,o),ii(C,a)},onBeforeAppear(C){_o($,[C]),ii(C,l),ii(C,u)},onEnter:R(!1),onAppear:R(!0),onLeave(C,E){C._isLeaving=!0;const F=()=>P(C,E);ii(C,d),ii(C,f),jw(),km(()=>{C._isLeaving&&(Mi(C,d),ii(C,h),$m(_)||Mm(C,r,b,F))}),_o(_,[C,F])},onEnterCancelled(C){M(C,!1),_o(y,[C])},onAppearCancelled(C){M(C,!0),_o(T,[C])},onLeaveCancelled(C){P(C),_o(S,[C])}})}function n7(e){if(e==null)return null;if(Rt(e))return[Sh(e.enter),Sh(e.leave)];{const t=Sh(e);return[t,t]}}function Sh(e){return sS(e)}function ii(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ja]||(e[Ja]=new Set)).add(t)}function Mi(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ja];n&&(n.delete(t),n.size||(e[Ja]=void 0))}function km(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let r7=0;function Mm(e,t,n,r){const i=e._endId=++r7,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:s,propCount:l}=Uw(e,t);if(!a)return r();const u=a+"end";let c=0;const d=()=>{e.removeEventListener(u,f),o()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},s+1),e.addEventListener(u,f)}function Uw(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),i=r(`${Si}Delay`),o=r(`${Si}Duration`),a=Tm(i,o),s=r(`${$s}Delay`),l=r(`${$s}Duration`),u=Tm(s,l);let c=null,d=0,f=0;t===Si?a>0&&(c=Si,d=a,f=o.length):t===$s?u>0&&(c=$s,d=u,f=l.length):(d=Math.max(a,u),c=d>0?a>u?Si:$s:null,f=c?c===Si?o.length:l.length:0);const h=c===Si&&/\b(transform|all)(,|$)/.test(r(`${Si}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Tm(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Em(n)+Em(e[r])))}function Em(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function jw(){return document.body.offsetHeight}function i7(e,t,n){const r=e[Ja];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Zc=Symbol("_vod"),Ww=Symbol("_vsh"),md={beforeMount(e,{value:t},{transition:n}){e[Zc]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ks(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ks(e,!0),r.enter(e)):r.leave(e,()=>{ks(e,!1)}):ks(e,t))},beforeUnmount(e,{value:t}){ks(e,t)}};function ks(e,t){e.style.display=t?e[Zc]:"none",e[Ww]=!t}const o7=Symbol(""),a7=/(^|;)\s*display\s*:/;function s7(e,t,n){const r=e.style,i=Gt(n);let o=!1;if(n&&!i){if(t)if(Gt(t))for(const a of t.split(";")){const s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&Tc(r,s,"")}else for(const a in t)n[a]==null&&Tc(r,a,"");for(const a in n)a==="display"&&(o=!0),Tc(r,a,n[a])}else if(i){if(t!==n){const a=r[o7];a&&(n+=";"+a),r.cssText=n,o=a7.test(n)}}else t&&e.removeAttribute("style");Zc in e&&(e[Zc]=o?r.display:"",e[Ww]&&(r.display="none"))}const Am=/\s*!important$/;function Tc(e,t,n){if(tt(n))n.forEach(r=>Tc(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=l7(e,t);Am.test(n)?e.setProperty(oo(r),n.replace(Am,""),"important"):e[r]=n}}const Pm=["Webkit","Moz","ms"],$h={};function l7(e,t){const n=$h[t];if(n)return n;let r=Gi(t);if(r!=="filter"&&r in e)return $h[t]=r;r=Ix(r);for(let i=0;i<Pm.length;i++){const o=Pm[i]+r;if(o in e)return $h[t]=o}return t}const Rm="http://www.w3.org/1999/xlink";function zm(e,t,n,r,i,o=hS(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Rm,t.slice(6,t.length)):e.setAttributeNS(Rm,t,n):n==null||o&&!Nx(n)?e.removeAttribute(t):e.setAttribute(t,o?"":io(n)?String(n):n)}function u7(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=n;return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,s=n==null?"":String(n);(a!==s||!("_value"in e))&&(e.value=s),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Nx(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(t)}function c7(e,t,n,r){e.addEventListener(t,n,r)}function f7(e,t,n,r){e.removeEventListener(t,n,r)}const Fm=Symbol("_vei");function d7(e,t,n,r,i=null){const o=e[Fm]||(e[Fm]={}),a=o[t];if(r&&a)a.value=r;else{const[s,l]=h7(t);if(r){const u=o[t]=v7(r,i);c7(e,s,u,l)}else a&&(f7(e,s,a,l),o[t]=void 0)}}const Im=/(?:Once|Passive|Capture)$/;function h7(e){let t;if(Im.test(e)){t={};let r;for(;r=e.match(Im);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):oo(e.slice(2)),t]}let kh=0;const p7=Promise.resolve(),g7=()=>kh||(p7.then(()=>kh=0),kh=Date.now());function v7(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;fr(b7(r,n.value),t,5,[r])};return n.value=e,n.attached=g7(),n}function b7(e,t){if(tt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Bm=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,m7=(e,t,n,r,i,o)=>{const a=i==="svg";t==="class"?i7(e,r,a):t==="style"?s7(e,n,r):ad(t)?Tg(t)||d7(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):y7(e,t,r,a))?(u7(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zm(e,t,r,a,o,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),zm(e,t,r,a))};function y7(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bm(t)&&it(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Bm(t)&&Gt(n)?!1:t in e}const Vw=new WeakMap,qw=new WeakMap,Jc=Symbol("_moveCb"),Om=Symbol("_enterCb"),Gw={name:"TransitionGroup",props:nn({},t7,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ps(),r=sw();let i,o;return hw(()=>{if(!i.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!S7(i[0].el,n.vnode.el,a))return;i.forEach(x7),i.forEach(w7);const s=i.filter(C7);jw(),s.forEach(l=>{const u=l.el,c=u.style;ii(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Jc]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Jc]=null,Mi(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=xt(e),s=Hw(a);let l=a.tag||kt;if(i=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&(i.push(c),Za(c,zl(c,s,r,n)),Vw.set(c,c.el.getBoundingClientRect()))}o=t.default?jg(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&Za(c,zl(c,s,r,n))}return Ge(l,null,o)}}},_7=e=>delete e.mode;Gw.props;const Yw=Gw;function x7(e){const t=e.el;t[Jc]&&t[Jc](),t[Om]&&t[Om]()}function w7(e){qw.set(e,e.el.getBoundingClientRect())}function C7(e){const t=Vw.get(e),n=qw.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",e}}function S7(e,t,n){const r=e.cloneNode(),i=e[Ja];i&&i.forEach(s=>{s.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(s=>s&&r.classList.add(s)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:a}=Uw(r);return o.removeChild(r),a}const $7=nn({patchProp:m7},e7);let Nm;function k7(){return Nm||(Nm=$$($7))}const M7=(...e)=>{const t=k7().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=E7(r);if(!i)return;const o=t._component;!it(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,T7(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function T7(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function E7(e){return Gt(e)?document.querySelector(e):e}function Xw(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function Bl(e){throw Error(Xw(e))}const Lm=ne("/"),Dm=ne("include");function Kw(){function e(){return Dm.value}function t(i){Dm.value=i}function n(){return Lm.value}function r(i){Lm.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}let Hm=Promise.resolve();async function Mh(e,t){const n=Kw(),r=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});if(i.ok)return{data:await i.json(),response:i};Bl(i)}catch(i){Bl(i)}}function Th(e){const t=Hm.then(()=>e());return Hm=t.then(()=>{},()=>{}),t}function bu(){function e(r){return Th(()=>Mh(r,{method:"GET"}))}function t(r,i){return Th(()=>Mh(r,{body:JSON.stringify(i),method:"POST"}))}function n(r,i){return Th(()=>Mh(r,{body:JSON.stringify(i),method:"PUT"}))}return{GET:e,POST:t,PUT:n}}function A7(e,t){return`${e}api/datasets/${t}/display`}ne({});function P7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function R7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function z7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function F7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function I7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function B7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Zw(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function Jw(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function O7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function N7(e,t){return We(),wt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[ot("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function L7(e){let t=".",n="__",r="--",i;if(e){let c=e.blockPrefix;c&&(t=c),c=e.elementPrefix,c&&(n=c),c=e.modifierPrefix,c&&(r=c)}const o={install(c){i=c.c;const d=c.context;d.bem={},d.bem.b=null,d.bem.els=null}};function a(c){let d,f;return{before(h){d=h.bem.b,f=h.bem.els,h.bem.els=null},after(h){h.bem.b=d,h.bem.els=f},$({context:h,props:p}){return c=typeof c=="string"?c:c({context:h,props:p}),h.bem.b=c,`${(p==null?void 0:p.bPrefix)||t}${h.bem.b}`}}}function s(c){let d;return{before(f){d=f.bem.els},after(f){f.bem.els=d},$({context:f,props:h}){return c=typeof c=="string"?c:c({context:f,props:h}),f.bem.els=c.split(",").map(p=>p.trim()),f.bem.els.map(p=>`${(h==null?void 0:h.bPrefix)||t}${f.bem.b}${n}${p}`).join(", ")}}}function l(c){return{$({context:d,props:f}){c=typeof c=="string"?c:c({context:d,props:f});const h=c.split(",").map(b=>b.trim());function p(b){return h.map(v=>`&${(f==null?void 0:f.bPrefix)||t}${d.bem.b}${b!==void 0?`${n}${b}`:""}${r}${v}`).join(", ")}const g=d.bem.els;return g!==null?p(g[0]):p()}}}function u(c){return{$({context:d,props:f}){c=typeof c=="string"?c:c({context:d,props:f});const h=d.bem.els;return`&:not(${(f==null?void 0:f.bPrefix)||t}${d.bem.b}${h!==null&&h.length>0?`${n}${h[0]}`:""}${r}${c})`}}}return Object.assign(o,{cB:(...c)=>i(a(c[0]),c[1],c[2]),cE:(...c)=>i(s(c[0]),c[1],c[2]),cM:(...c)=>i(l(c[0]),c[1],c[2]),cNotM:(...c)=>i(u(c[0]),c[1],c[2])}),o}function D7(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Qw=/\s*,(?![^(]*\))\s*/g,H7=/\s+/g;function U7(e,t){const n=[];return t.split(Qw).forEach(r=>{let i=D7(r);if(i){if(i===1){e.forEach(a=>{n.push(r.replace("&",a))});return}}else{e.forEach(a=>{n.push((a&&a+" ")+r)});return}let o=[r];for(;i--;){const a=[];o.forEach(s=>{e.forEach(l=>{a.push(s.replace("&",l))})}),o=a}o.forEach(a=>n.push(a))}),n}function j7(e,t){const n=[];return t.split(Qw).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function W7(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=U7(t,n):t=j7(t,n))}),t.join(", ").replace(H7," ")}function Um(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function yd(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function V7(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Vu(e){return e?/^\s*@(s|m)/.test(e):!1}const q7=/[A-Z]/g;function e2(e){return e.replace(q7,t=>"-"+t.toLowerCase())}function G7(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
18
18
|
`+Object.entries(e).map(n=>t+` ${e2(n[0])}: ${n[1]};`).join(`
|
|
19
19
|
`)+`
|
|
20
20
|
`+t+"}":`: ${e};`}function Y7(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function jm(e,t,n,r){if(!t)return"";const i=Y7(t,n,r);if(!i)return"";if(typeof i=="string")return`${e} {
|
|
@@ -25,9 +25,9 @@ ${i}
|
|
|
25
25
|
`);return}s=e2(s),l!=null&&a.push(` ${s}${G7(l)}`)}),e&&a.push("}"),a.join(`
|
|
26
26
|
`)}function i0(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))i0(r,t,n);else if(typeof r=="function"){const i=r(t);Array.isArray(i)?i0(i,t,n):i&&n(i)}else r&&n(r)})}function t2(e,t,n,r,i){const o=e.$;let a="";if(!o||typeof o=="string")Vu(o)?a=o:t.push(o);else if(typeof o=="function"){const u=o({context:r.context,props:i});Vu(u)?a=u:t.push(u)}else if(o.before&&o.before(r.context),!o.$||typeof o.$=="string")Vu(o.$)?a=o.$:t.push(o.$);else if(o.$){const u=o.$({context:r.context,props:i});Vu(u)?a=u:t.push(u)}const s=W7(t),l=jm(s,e.props,r,i);a?n.push(`${a} {`):l.length&&n.push(l),e.children&&i0(e.children,{context:r.context,props:i},u=>{if(typeof u=="string"){const c=jm(s,{raw:u},r,i);n.push(c)}else t2(u,t,n,r,i)}),t.pop(),a&&n.push("}"),o&&o.after&&o.after(r.context)}function X7(e,t,n){const r=[];return t2(e,[],r,t,n),r.join(`
|
|
27
27
|
|
|
28
|
-
`)}function o0(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function K7(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(Um),t.els=[];else{const o=yf(n,r);o&&i.includes(o)&&(Um(o),t.els=i.filter(a=>a!==o))}}function Wm(e,t){e.push(t)}function Z7(e,t,n,r,i,o,a,s,l){let u;if(n===void 0&&(u=t.render(r),n=o0(u)),l){l.adapter(n,u??t.render(r));return}s===void 0&&(s=document.head);const c=yf(n,s);if(c!==null&&!o)return c;const f=c??V7(n);if(u===void 0&&(u=t.render(r)),f.textContent=u,c!==null)return c;if(a){const d=s.querySelector(`meta[name="${a}"]`);if(d)return s.insertBefore(f,d),Wm(t.els,f),f}return i?s.insertBefore(f,s.querySelector("style, link")):s.appendChild(f),Wm(t.els,f),f}function J7(e){return X7(this,this.instance,e)}function Q7(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:o=!1,anchorMetaName:a,parent:s}=e;return Z7(this.instance,this,t,r,i,o,a,s,n)}function ek(e={}){const{id:t,parent:n}=e;K7(this.instance,this,t,n)}const qu=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:J7,mount:Q7,unmount:ek}},tk=function(e,t,n,r){return Array.isArray(t)?qu(e,{$:null},null,t):Array.isArray(n)?qu(e,t,null,n):Array.isArray(r)?qu(e,t,n,r):qu(e,t,n,null)};function n2(e={}){const t={c:(...n)=>tk(t,...n),use:(n,...r)=>n.install(t,...r),find:yf,context:{},config:e};return t}function nk(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return yf(e)!==null}const rk="n",Qc=`.${rk}-`,ik="__",ok="--",r2=n2(),i2=L7({blockPrefix:Qc,elementPrefix:ik,modifierPrefix:ok});r2.use(i2);const{c:ce,find:MZ}=r2,{cB:W,cE:Q,cM:ge,cNotM:Vt}=i2;function ak(e){return ce(({props:{bPrefix:t}})=>`${t||Qc}modal, ${t||Qc}drawer`,[e])}function sk(e){return ce(({props:{bPrefix:t}})=>`${t||Qc}popover`,[e])}const lk=(...e)=>ce(">",[W(...e)]);function Se(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let ed=[];const o2=new WeakMap;function uk(){ed.forEach(e=>e(...o2.get(e))),ed=[]}function a2(e,...t){o2.set(e,t),!ed.includes(e)&&ed.push(e)===1&&requestAnimationFrame(uk)}function vl(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function Qa(e){return e.composedPath()[0]||null}function kn(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Bi(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function Kn(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const Vm={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function s2(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function Ec(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function si(e,t,n){t/=100,n/=100;let r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function a0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(o<0?o+6:o),r&&i/r*100,r*100]}function s0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=1-Math.abs(r+r-i-1),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),o?i/o*100:0,(r+r-i)*50]}function td(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const Kr="^\\s*",Zr="\\s*$",Yi="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",Zn="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",Ro="([0-9A-Fa-f])",zo="([0-9A-Fa-f]{2})",l2=new RegExp(`${Kr}hsl\\s*\\(${Zn},${Yi},${Yi}\\)${Zr}`),u2=new RegExp(`${Kr}hsv\\s*\\(${Zn},${Yi},${Yi}\\)${Zr}`),c2=new RegExp(`${Kr}hsla\\s*\\(${Zn},${Yi},${Yi},${Zn}\\)${Zr}`),d2=new RegExp(`${Kr}hsva\\s*\\(${Zn},${Yi},${Yi},${Zn}\\)${Zr}`),ck=new RegExp(`${Kr}rgb\\s*\\(${Zn},${Zn},${Zn}\\)${Zr}`),dk=new RegExp(`${Kr}rgba\\s*\\(${Zn},${Zn},${Zn},${Zn}\\)${Zr}`),Zg=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Zr}`),Jg=new RegExp(`${Kr}#${zo}${zo}${zo}${Zr}`),Qg=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Ro}${Zr}`),ev=new RegExp(`${Kr}#${zo}${zo}${zo}${zo}${Zr}`);function Nn(e){return parseInt(e,16)}function Oo(e){try{let t;if(t=c2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),di(t[13])];if(t=l2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function Hi(e){try{let t;if(t=d2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),di(t[13])];if(t=u2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function en(e){try{let t;if(t=Jg.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),1];if(t=ck.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),1];if(t=dk.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),di(t[13])];if(t=Zg.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),1];if(t=ev.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),di(Nn(t[4])/255)];if(t=Qg.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),di(Nn(t[4]+t[4])/255)];if(e in Vm)return en(Vm[e]);if(l2.test(e)||c2.test(e)){const[n,r,i,o]=Oo(e);return[...td(n,r,i),o]}else if(u2.test(e)||d2.test(e)){const[n,r,i,o]=Hi(e);return[...si(n,r,i),o]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function fk(e){return e>1?1:e<0?0:e}function hk(e,t,n){return`rgb(${Ut(e)}, ${Ut(t)}, ${Ut(n)})`}function l0(e,t,n,r){return`rgba(${Ut(e)}, ${Ut(t)}, ${Ut(n)}, ${fk(r)})`}function Eh(e,t,n,r,i){return Ut((e*t*(1-r)+n*r)/i)}function ir(e,t){Array.isArray(e)||(e=en(e)),Array.isArray(t)||(t=en(t));const n=e[3],r=t[3],i=di(n+r-n*r);return l0(Eh(e[0],n,t[0],r,i),Eh(e[1],n,t[1],r,i),Eh(e[2],n,t[2],r,i),i)}function nt(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e);return typeof t.alpha=="number"?l0(n,r,i,t.alpha):l0(n,r,i,o)}function Gu(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e),{lightness:a=1,alpha:s=1}=t;return Hr([n*a,r*a,i*a,o*s])}function di(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function qr(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Ut(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Xt(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function u0(e){const[t,n,r]=Array.isArray(e)?e:en(e);return hk(t,n,r)}function Hr(e){const[t,n,r]=e;return 3 in e?`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, ${di(e[3])})`:`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, 1)`}function c0(e){return`hsv(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function No(e){const[t,n,r]=e;return 3 in e?`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${di(e[3])})`:`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function d0(e){return`hsl(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function Ui(e){const[t,n,r]=e;return 3 in e?`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${di(e[3])})`:`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function ji(e){if(typeof e=="string"){let r;if(r=Jg.exec(e))return`${r[0]}FF`;if(r=ev.exec(e))return r[0];if(r=Zg.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=Qg.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>Ut(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":Ut(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function bl(e){if(typeof e=="string"){let t;if(t=Jg.exec(e))return t[0];if(t=ev.exec(e))return t[0].slice(0,7);if(t=Zg.exec(e)||Qg.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>Ut(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function pk(e=8){return Math.random().toString(16).slice(2,2+e)}function Ac(e){return e.composedPath()[0]}const gk={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function vk(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(Ac(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=a=>{r=!t.contains(Ac(a))},o=a=>{r&&(t.contains(Ac(a))||n(a))};return{mousedown:i,mouseup:o,touchstart:i,touchend:o}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function f2(e,t,n){const r=gk[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let o=i.get(n);return o===void 0&&i.set(n,o=vk(e,t,n)),o}function bk(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=f2(e,t,n);return Object.keys(i).forEach(o=>{Mt(o,document,i[o],r)}),!0}return!1}function mk(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=f2(e,t,n);return Object.keys(i).forEach(o=>{St(o,document,i[o],r)}),!0}return!1}function yk(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(w,T,M){const P=w[T];return w[T]=function(){return M.apply(w,arguments),P.apply(w,arguments)},w}function o(w,T){w[T]=Event.prototype[T]}const a=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function l(){var w;return(w=a.get(this))!==null&&w!==void 0?w:null}function u(w,T){s!==void 0&&Object.defineProperty(w,"currentTarget",{configurable:!0,enumerable:!0,get:T??s.get})}const c={bubble:{},capture:{}},f={};function d(){const w=function(T){const{type:M,eventPhase:P,bubbles:R}=T,C=Ac(T);if(P===2)return;const E=P===1?"capture":"bubble";let F=C;const z=[];for(;F===null&&(F=window),z.push(F),F!==window;)F=F.parentNode||null;const j=c.capture[M],Z=c.bubble[M];if(i(T,"stopPropagation",n),i(T,"stopImmediatePropagation",r),u(T,l),E==="capture"){if(j===void 0)return;for(let J=z.length-1;J>=0&&!e.has(T);--J){const ie=z[J],he=j.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}if(J===0&&!R&&Z!==void 0){const _e=Z.get(ie);if(_e!==void 0)for(const oe of _e){if(t.has(T))break;oe(T)}}}}else if(E==="bubble"){if(Z===void 0)return;for(let J=0;J<z.length&&!e.has(T);++J){const ie=z[J],he=Z.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}}}o(T,"stopPropagation"),o(T,"stopImmediatePropagation"),u(T)};return w.displayName="evtdUnifiedHandler",w}function h(){const w=function(T){const{type:M,eventPhase:P}=T;if(P!==2)return;const R=f[M];R!==void 0&&R.forEach(C=>C(T))};return w.displayName="evtdUnifiedWindowEventHandler",w}const p=d(),g=h();function b(w,T){const M=c[w];return M[T]===void 0&&(M[T]=new Map,window.addEventListener(T,p,w==="capture")),M[T]}function v(w){return f[w]===void 0&&(f[w]=new Set,window.addEventListener(w,g)),f[w]}function x(w,T){let M=w.get(T);return M===void 0&&w.set(T,M=new Set),M}function y(w,T,M,P){const R=c[T][M];if(R!==void 0){const C=R.get(w);if(C!==void 0&&C.has(P))return!0}return!1}function _(w,T){const M=f[w];return!!(M!==void 0&&M.has(T))}function S(w,T,M,P){let R;if(typeof P=="object"&&P.once===!0?R=z=>{$(w,T,R,P),M(z)}:R=M,bk(w,T,R,P))return;const C=P===!0||typeof P=="object"&&P.capture===!0?"capture":"bubble",E=b(C,w),F=x(E,T);if(F.has(R)||F.add(R),T===window){const z=v(w);z.has(R)||z.add(R)}}function $(w,T,M,P){if(mk(w,T,M,P))return;const R=P===!0||typeof P=="object"&&P.capture===!0,C=R?"capture":"bubble",E=b(C,w),F=x(E,T);if(T===window&&!y(T,R?"bubble":"capture",w,M)&&_(w,M)){const z=f[w];z.delete(M),z.size===0&&(window.removeEventListener(w,g),f[w]=void 0)}F.has(M)&&F.delete(M),F.size===0&&E.delete(T),E.size===0&&(window.removeEventListener(w,p,C==="capture"),c[C][w]=void 0)}return{on:S,off:$}}const{on:Mt,off:St}=yk();function _k(e){const t=ne(!!e.value);if(t.value)return El(t);const n=vt(e,r=>{r&&(t.value=!0,n())});return El(t)}function Ht(e){const t=pe(e),n=ne(t.value);return vt(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const xk=typeof window<"u";let ml,yl;const wk=()=>{var e,t;ml=xk?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,yl=!1,ml!==void 0?ml.then(()=>{yl=!0}):yl=!0};wk();function h2(e){if(yl)return;let t=!1;fn(()=>{yl||ml==null||ml.then(()=>{t||e()})}),Bn(()=>{t=!0})}function Gr(e,t){return vt(e,n=>{n!==void 0&&(t.value=n)}),pe(()=>e.value===void 0?t.value:e.value)}function gs(){const e=ne(!1);return fn(()=>{e.value=!0}),El(e)}function nd(e,t){return pe(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const Ck=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Sk(){return Ck}const tv="n-internal-select-menu",p2="n-internal-select-menu-body",g2="n-drawer-body",v2="n-modal-body",b2="n-popover-body",m2="__disabled__";function Pn(e){const t=$t(v2,null),n=$t(g2,null),r=$t(b2,null),i=$t(p2,null),o=ne();if(typeof document<"u"){o.value=document.fullscreenElement;const a=()=>{o.value=document.fullscreenElement};fn(()=>{Mt("fullscreenchange",document,a)}),Bn(()=>{St("fullscreenchange",document,a)})}return Ht(()=>{var a;const{to:s}=e;return s!==void 0?s===!1?m2:s===!0?o.value||"body":s:t!=null&&t.value?(a=t.value.$el)!==null&&a!==void 0?a:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(o.value||"body")})}Pn.tdkey=m2;Pn.propTo={type:[String,Object,Boolean],default:void 0};const _f=typeof document<"u"&&typeof window<"u";function $k(e){const t={isDeactivated:!1};let n=!1;return Wg(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),Vg(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function f0(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function h0(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){h0(r,t,n);return}if(r.type===kt){if(r.children===null)return;Array.isArray(r.children)&&h0(r.children,t,n)}else r.type!==sn&&n.push(r)}}),n}function qm(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=h0(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let $i=null;function y2(){if($i===null&&($i=document.getElementById("v-binder-view-measurer"),$i===null)){$i=document.createElement("div"),$i.id="v-binder-view-measurer";const{style:e}=$i;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild($i)}return $i.getBoundingClientRect()}function kk(e,t){const n=y2();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Ah(e){const t=e.getBoundingClientRect(),n=y2();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function Mk(e){return e.nodeType===9?null:e.parentNode}function _2(e){if(e===null)return null;const t=Mk(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return _2(t)}const xf=Fe({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;jn("VBinder",(t=ps())===null||t===void 0?void 0:t.proxy);const n=$t("VBinder",null),r=ne(null),i=v=>{r.value=v,n&&e.syncTargetWithParent&&n.setTargetRef(v)};let o=[];const a=()=>{let v=r.value;for(;v=_2(v),v!==null;)o.push(v);for(const x of o)Mt("scroll",x,f,!0)},s=()=>{for(const v of o)St("scroll",v,f,!0);o=[]},l=new Set,u=v=>{l.size===0&&a(),l.has(v)||l.add(v)},c=v=>{l.has(v)&&l.delete(v),l.size===0&&s()},f=()=>{a2(d)},d=()=>{l.forEach(v=>v())},h=new Set,p=v=>{h.size===0&&Mt("resize",window,b),h.has(v)||h.add(v)},g=v=>{h.has(v)&&h.delete(v),h.size===0&&St("resize",window,b)},b=()=>{h.forEach(v=>v())};return Bn(()=>{St("resize",window,b),s()}),{targetRef:r,setTargetRef:i,addScrollListener:u,removeScrollListener:c,addResizeListener:p,removeResizeListener:g}},render(){return f0("binder",this.$slots)}}),wf=Fe({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=$t("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?lo(qm("follower",this.$slots),[[t]]):qm("follower",this.$slots)}}),Ca="@@mmoContext",Tk={mounted(e,{value:t}){e[Ca]={handler:void 0},typeof t=="function"&&(e[Ca].handler=t,Mt("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Ca];typeof t=="function"?n.handler?n.handler!==t&&(St("mousemoveoutside",e,n.handler),n.handler=t,Mt("mousemoveoutside",e,t)):(e[Ca].handler=t,Mt("mousemoveoutside",e,t)):n.handler&&(St("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Ca];t&&St("mousemoveoutside",e,t),e[Ca].handler=void 0}},Sa="@@coContext",Ol={mounted(e,{value:t,modifiers:n}){e[Sa]={handler:void 0},typeof t=="function"&&(e[Sa].handler=t,Mt("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Sa];typeof t=="function"?r.handler?r.handler!==t&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,Mt("clickoutside",e,t,{capture:n.capture})):(e[Sa].handler=t,Mt("clickoutside",e,t,{capture:n.capture})):r.handler&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Sa];n&&St("clickoutside",e,n,{capture:t.capture}),e[Sa].handler=void 0}};function Ek(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Ak{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&Ek("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const Ph=new Ak,$a="@@ziContext",x2={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[$a]={enabled:!!i,initialized:!1},i&&(Ph.ensureZIndex(e,r),e[$a].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,o=e[$a].enabled;i&&!o&&(Ph.ensureZIndex(e,r),e[$a].initialized=!0),e[$a].enabled=!!i},unmounted(e,t){if(!e[$a].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Ph.unregister(e,r)}},Pk="@css-render/vue3-ssr";function Rk(e,t){return`<style cssr-id="${e}">
|
|
28
|
+
`)}function o0(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function K7(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(Um),t.els=[];else{const o=yd(n,r);o&&i.includes(o)&&(Um(o),t.els=i.filter(a=>a!==o))}}function Wm(e,t){e.push(t)}function Z7(e,t,n,r,i,o,a,s,l){let u;if(n===void 0&&(u=t.render(r),n=o0(u)),l){l.adapter(n,u??t.render(r));return}s===void 0&&(s=document.head);const c=yd(n,s);if(c!==null&&!o)return c;const d=c??V7(n);if(u===void 0&&(u=t.render(r)),d.textContent=u,c!==null)return c;if(a){const f=s.querySelector(`meta[name="${a}"]`);if(f)return s.insertBefore(d,f),Wm(t.els,d),d}return i?s.insertBefore(d,s.querySelector("style, link")):s.appendChild(d),Wm(t.els,d),d}function J7(e){return X7(this,this.instance,e)}function Q7(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:o=!1,anchorMetaName:a,parent:s}=e;return Z7(this.instance,this,t,r,i,o,a,s,n)}function ek(e={}){const{id:t,parent:n}=e;K7(this.instance,this,t,n)}const qu=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:J7,mount:Q7,unmount:ek}},tk=function(e,t,n,r){return Array.isArray(t)?qu(e,{$:null},null,t):Array.isArray(n)?qu(e,t,null,n):Array.isArray(r)?qu(e,t,n,r):qu(e,t,n,null)};function n2(e={}){const t={c:(...n)=>tk(t,...n),use:(n,...r)=>n.install(t,...r),find:yd,context:{},config:e};return t}function nk(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return yd(e)!==null}const rk="n",Qc=`.${rk}-`,ik="__",ok="--",r2=n2(),i2=L7({blockPrefix:Qc,elementPrefix:ik,modifierPrefix:ok});r2.use(i2);const{c:ce,find:MZ}=r2,{cB:W,cE:Q,cM:ge,cNotM:Vt}=i2;function ak(e){return ce(({props:{bPrefix:t}})=>`${t||Qc}modal, ${t||Qc}drawer`,[e])}function sk(e){return ce(({props:{bPrefix:t}})=>`${t||Qc}popover`,[e])}const lk=(...e)=>ce(">",[W(...e)]);function Se(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let ef=[];const o2=new WeakMap;function uk(){ef.forEach(e=>e(...o2.get(e))),ef=[]}function a2(e,...t){o2.set(e,t),!ef.includes(e)&&ef.push(e)===1&&requestAnimationFrame(uk)}function vl(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function Qa(e){return e.composedPath()[0]||null}function kn(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Bi(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function Kn(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const Vm={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function s2(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function Ec(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function si(e,t,n){t/=100,n/=100;let r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function a0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(o<0?o+6:o),r&&i/r*100,r*100]}function s0(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),o=1-Math.abs(r+r-i-1),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),o?i/o*100:0,(r+r-i)*50]}function tf(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const Kr="^\\s*",Zr="\\s*$",Yi="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",Zn="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",Ro="([0-9A-Fa-f])",zo="([0-9A-Fa-f]{2})",l2=new RegExp(`${Kr}hsl\\s*\\(${Zn},${Yi},${Yi}\\)${Zr}`),u2=new RegExp(`${Kr}hsv\\s*\\(${Zn},${Yi},${Yi}\\)${Zr}`),c2=new RegExp(`${Kr}hsla\\s*\\(${Zn},${Yi},${Yi},${Zn}\\)${Zr}`),f2=new RegExp(`${Kr}hsva\\s*\\(${Zn},${Yi},${Yi},${Zn}\\)${Zr}`),ck=new RegExp(`${Kr}rgb\\s*\\(${Zn},${Zn},${Zn}\\)${Zr}`),fk=new RegExp(`${Kr}rgba\\s*\\(${Zn},${Zn},${Zn},${Zn}\\)${Zr}`),Zg=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Zr}`),Jg=new RegExp(`${Kr}#${zo}${zo}${zo}${Zr}`),Qg=new RegExp(`${Kr}#${Ro}${Ro}${Ro}${Ro}${Zr}`),ev=new RegExp(`${Kr}#${zo}${zo}${zo}${zo}${Zr}`);function Nn(e){return parseInt(e,16)}function Oo(e){try{let t;if(t=c2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),fi(t[13])];if(t=l2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function Hi(e){try{let t;if(t=f2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),fi(t[13])];if(t=u2.exec(e))return[qr(t[1]),Xt(t[5]),Xt(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function en(e){try{let t;if(t=Jg.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),1];if(t=ck.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),1];if(t=fk.exec(e))return[Ut(t[1]),Ut(t[5]),Ut(t[9]),fi(t[13])];if(t=Zg.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),1];if(t=ev.exec(e))return[Nn(t[1]),Nn(t[2]),Nn(t[3]),fi(Nn(t[4])/255)];if(t=Qg.exec(e))return[Nn(t[1]+t[1]),Nn(t[2]+t[2]),Nn(t[3]+t[3]),fi(Nn(t[4]+t[4])/255)];if(e in Vm)return en(Vm[e]);if(l2.test(e)||c2.test(e)){const[n,r,i,o]=Oo(e);return[...tf(n,r,i),o]}else if(u2.test(e)||f2.test(e)){const[n,r,i,o]=Hi(e);return[...si(n,r,i),o]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function dk(e){return e>1?1:e<0?0:e}function hk(e,t,n){return`rgb(${Ut(e)}, ${Ut(t)}, ${Ut(n)})`}function l0(e,t,n,r){return`rgba(${Ut(e)}, ${Ut(t)}, ${Ut(n)}, ${dk(r)})`}function Eh(e,t,n,r,i){return Ut((e*t*(1-r)+n*r)/i)}function ir(e,t){Array.isArray(e)||(e=en(e)),Array.isArray(t)||(t=en(t));const n=e[3],r=t[3],i=fi(n+r-n*r);return l0(Eh(e[0],n,t[0],r,i),Eh(e[1],n,t[1],r,i),Eh(e[2],n,t[2],r,i),i)}function nt(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e);return typeof t.alpha=="number"?l0(n,r,i,t.alpha):l0(n,r,i,o)}function Gu(e,t){const[n,r,i,o=1]=Array.isArray(e)?e:en(e),{lightness:a=1,alpha:s=1}=t;return Hr([n*a,r*a,i*a,o*s])}function fi(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function qr(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Ut(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Xt(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function u0(e){const[t,n,r]=Array.isArray(e)?e:en(e);return hk(t,n,r)}function Hr(e){const[t,n,r]=e;return 3 in e?`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, ${fi(e[3])})`:`rgba(${Ut(t)}, ${Ut(n)}, ${Ut(r)}, 1)`}function c0(e){return`hsv(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function No(e){const[t,n,r]=e;return 3 in e?`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${fi(e[3])})`:`hsva(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function f0(e){return`hsl(${qr(e[0])}, ${Xt(e[1])}%, ${Xt(e[2])}%)`}function Ui(e){const[t,n,r]=e;return 3 in e?`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, ${fi(e[3])})`:`hsla(${qr(t)}, ${Xt(n)}%, ${Xt(r)}%, 1)`}function ji(e){if(typeof e=="string"){let r;if(r=Jg.exec(e))return`${r[0]}FF`;if(r=ev.exec(e))return r[0];if(r=Zg.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=Qg.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>Ut(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":Ut(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function bl(e){if(typeof e=="string"){let t;if(t=Jg.exec(e))return t[0];if(t=ev.exec(e))return t[0].slice(0,7);if(t=Zg.exec(e)||Qg.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>Ut(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function pk(e=8){return Math.random().toString(16).slice(2,2+e)}function Ac(e){return e.composedPath()[0]}const gk={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function vk(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(Ac(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=a=>{r=!t.contains(Ac(a))},o=a=>{r&&(t.contains(Ac(a))||n(a))};return{mousedown:i,mouseup:o,touchstart:i,touchend:o}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function d2(e,t,n){const r=gk[e];let i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let o=i.get(n);return o===void 0&&i.set(n,o=vk(e,t,n)),o}function bk(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=d2(e,t,n);return Object.keys(i).forEach(o=>{Mt(o,document,i[o],r)}),!0}return!1}function mk(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=d2(e,t,n);return Object.keys(i).forEach(o=>{St(o,document,i[o],r)}),!0}return!1}function yk(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(w,T,M){const P=w[T];return w[T]=function(){return M.apply(w,arguments),P.apply(w,arguments)},w}function o(w,T){w[T]=Event.prototype[T]}const a=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function l(){var w;return(w=a.get(this))!==null&&w!==void 0?w:null}function u(w,T){s!==void 0&&Object.defineProperty(w,"currentTarget",{configurable:!0,enumerable:!0,get:T??s.get})}const c={bubble:{},capture:{}},d={};function f(){const w=function(T){const{type:M,eventPhase:P,bubbles:R}=T,C=Ac(T);if(P===2)return;const E=P===1?"capture":"bubble";let F=C;const z=[];for(;F===null&&(F=window),z.push(F),F!==window;)F=F.parentNode||null;const j=c.capture[M],Z=c.bubble[M];if(i(T,"stopPropagation",n),i(T,"stopImmediatePropagation",r),u(T,l),E==="capture"){if(j===void 0)return;for(let J=z.length-1;J>=0&&!e.has(T);--J){const ie=z[J],he=j.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}if(J===0&&!R&&Z!==void 0){const _e=Z.get(ie);if(_e!==void 0)for(const oe of _e){if(t.has(T))break;oe(T)}}}}else if(E==="bubble"){if(Z===void 0)return;for(let J=0;J<z.length&&!e.has(T);++J){const ie=z[J],he=Z.get(ie);if(he!==void 0){a.set(T,ie);for(const _e of he){if(t.has(T))break;_e(T)}}}}o(T,"stopPropagation"),o(T,"stopImmediatePropagation"),u(T)};return w.displayName="evtdUnifiedHandler",w}function h(){const w=function(T){const{type:M,eventPhase:P}=T;if(P!==2)return;const R=d[M];R!==void 0&&R.forEach(C=>C(T))};return w.displayName="evtdUnifiedWindowEventHandler",w}const p=f(),g=h();function b(w,T){const M=c[w];return M[T]===void 0&&(M[T]=new Map,window.addEventListener(T,p,w==="capture")),M[T]}function v(w){return d[w]===void 0&&(d[w]=new Set,window.addEventListener(w,g)),d[w]}function x(w,T){let M=w.get(T);return M===void 0&&w.set(T,M=new Set),M}function y(w,T,M,P){const R=c[T][M];if(R!==void 0){const C=R.get(w);if(C!==void 0&&C.has(P))return!0}return!1}function _(w,T){const M=d[w];return!!(M!==void 0&&M.has(T))}function S(w,T,M,P){let R;if(typeof P=="object"&&P.once===!0?R=z=>{$(w,T,R,P),M(z)}:R=M,bk(w,T,R,P))return;const C=P===!0||typeof P=="object"&&P.capture===!0?"capture":"bubble",E=b(C,w),F=x(E,T);if(F.has(R)||F.add(R),T===window){const z=v(w);z.has(R)||z.add(R)}}function $(w,T,M,P){if(mk(w,T,M,P))return;const R=P===!0||typeof P=="object"&&P.capture===!0,C=R?"capture":"bubble",E=b(C,w),F=x(E,T);if(T===window&&!y(T,R?"bubble":"capture",w,M)&&_(w,M)){const z=d[w];z.delete(M),z.size===0&&(window.removeEventListener(w,g),d[w]=void 0)}F.has(M)&&F.delete(M),F.size===0&&E.delete(T),E.size===0&&(window.removeEventListener(w,p,C==="capture"),c[C][w]=void 0)}return{on:S,off:$}}const{on:Mt,off:St}=yk();function _k(e){const t=ne(!!e.value);if(t.value)return El(t);const n=vt(e,r=>{r&&(t.value=!0,n())});return El(t)}function Ht(e){const t=pe(e),n=ne(t.value);return vt(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const xk=typeof window<"u";let ml,yl;const wk=()=>{var e,t;ml=xk?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,yl=!1,ml!==void 0?ml.then(()=>{yl=!0}):yl=!0};wk();function h2(e){if(yl)return;let t=!1;dn(()=>{yl||ml==null||ml.then(()=>{t||e()})}),Bn(()=>{t=!0})}function Gr(e,t){return vt(e,n=>{n!==void 0&&(t.value=n)}),pe(()=>e.value===void 0?t.value:e.value)}function gs(){const e=ne(!1);return dn(()=>{e.value=!0}),El(e)}function nf(e,t){return pe(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const Ck=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Sk(){return Ck}const tv="n-internal-select-menu",p2="n-internal-select-menu-body",g2="n-drawer-body",v2="n-modal-body",b2="n-popover-body",m2="__disabled__";function Pn(e){const t=$t(v2,null),n=$t(g2,null),r=$t(b2,null),i=$t(p2,null),o=ne();if(typeof document<"u"){o.value=document.fullscreenElement;const a=()=>{o.value=document.fullscreenElement};dn(()=>{Mt("fullscreenchange",document,a)}),Bn(()=>{St("fullscreenchange",document,a)})}return Ht(()=>{var a;const{to:s}=e;return s!==void 0?s===!1?m2:s===!0?o.value||"body":s:t!=null&&t.value?(a=t.value.$el)!==null&&a!==void 0?a:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(o.value||"body")})}Pn.tdkey=m2;Pn.propTo={type:[String,Object,Boolean],default:void 0};const _d=typeof document<"u"&&typeof window<"u";function $k(e){const t={isDeactivated:!1};let n=!1;return Wg(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),Vg(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function d0(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function h0(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){h0(r,t,n);return}if(r.type===kt){if(r.children===null)return;Array.isArray(r.children)&&h0(r.children,t,n)}else r.type!==sn&&n.push(r)}}),n}function qm(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=h0(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let $i=null;function y2(){if($i===null&&($i=document.getElementById("v-binder-view-measurer"),$i===null)){$i=document.createElement("div"),$i.id="v-binder-view-measurer";const{style:e}=$i;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild($i)}return $i.getBoundingClientRect()}function kk(e,t){const n=y2();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Ah(e){const t=e.getBoundingClientRect(),n=y2();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function Mk(e){return e.nodeType===9?null:e.parentNode}function _2(e){if(e===null)return null;const t=Mk(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return _2(t)}const xd=Fe({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;jn("VBinder",(t=ps())===null||t===void 0?void 0:t.proxy);const n=$t("VBinder",null),r=ne(null),i=v=>{r.value=v,n&&e.syncTargetWithParent&&n.setTargetRef(v)};let o=[];const a=()=>{let v=r.value;for(;v=_2(v),v!==null;)o.push(v);for(const x of o)Mt("scroll",x,d,!0)},s=()=>{for(const v of o)St("scroll",v,d,!0);o=[]},l=new Set,u=v=>{l.size===0&&a(),l.has(v)||l.add(v)},c=v=>{l.has(v)&&l.delete(v),l.size===0&&s()},d=()=>{a2(f)},f=()=>{l.forEach(v=>v())},h=new Set,p=v=>{h.size===0&&Mt("resize",window,b),h.has(v)||h.add(v)},g=v=>{h.has(v)&&h.delete(v),h.size===0&&St("resize",window,b)},b=()=>{h.forEach(v=>v())};return Bn(()=>{St("resize",window,b),s()}),{targetRef:r,setTargetRef:i,addScrollListener:u,removeScrollListener:c,addResizeListener:p,removeResizeListener:g}},render(){return d0("binder",this.$slots)}}),wd=Fe({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=$t("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?lo(qm("follower",this.$slots),[[t]]):qm("follower",this.$slots)}}),Ca="@@mmoContext",Tk={mounted(e,{value:t}){e[Ca]={handler:void 0},typeof t=="function"&&(e[Ca].handler=t,Mt("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Ca];typeof t=="function"?n.handler?n.handler!==t&&(St("mousemoveoutside",e,n.handler),n.handler=t,Mt("mousemoveoutside",e,t)):(e[Ca].handler=t,Mt("mousemoveoutside",e,t)):n.handler&&(St("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Ca];t&&St("mousemoveoutside",e,t),e[Ca].handler=void 0}},Sa="@@coContext",Ol={mounted(e,{value:t,modifiers:n}){e[Sa]={handler:void 0},typeof t=="function"&&(e[Sa].handler=t,Mt("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Sa];typeof t=="function"?r.handler?r.handler!==t&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,Mt("clickoutside",e,t,{capture:n.capture})):(e[Sa].handler=t,Mt("clickoutside",e,t,{capture:n.capture})):r.handler&&(St("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Sa];n&&St("clickoutside",e,n,{capture:t.capture}),e[Sa].handler=void 0}};function Ek(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Ak{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&Ek("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const Ph=new Ak,$a="@@ziContext",x2={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[$a]={enabled:!!i,initialized:!1},i&&(Ph.ensureZIndex(e,r),e[$a].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,o=e[$a].enabled;i&&!o&&(Ph.ensureZIndex(e,r),e[$a].initialized=!0),e[$a].enabled=!!i},unmounted(e,t){if(!e[$a].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Ph.unregister(e,r)}},Pk="@css-render/vue3-ssr";function Rk(e,t){return`<style cssr-id="${e}">
|
|
29
29
|
${t}
|
|
30
|
-
</style>`}function zk(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(Rk(e,t)))}const Fk=typeof document<"u";function uo(){if(Fk)return;const e=$t(Pk,null);if(e!==null)return{adapter:(t,n)=>zk(t,n,e),context:e}}function Gm(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:Nr}=n2(),Cf="vueuc-style";function Ym(e){return e&-e}class w2{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=Ym(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let o=t*r;for(;t>0;)o+=n[t],t-=Ym(t);return o}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),o=this.sum(i);if(o>t){r=i;continue}else if(o<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function Xm(e){return typeof e=="string"?document.querySelector(e):e()}const Ik=Fe({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:_k(et(e,"show")),mergedTo:pe(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?f0("lazy-teleport",this.$slots):k(S$,{disabled:this.disabled,to:this.mergedTo},f0("lazy-teleport",this.$slots)):null}}),Yu={top:"bottom",bottom:"top",left:"right",right:"left"},Km={start:"end",center:"center",end:"start"},Rh={top:"height",bottom:"height",left:"width",right:"width"},Bk={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Ok={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},Nk={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Zm={top:!0,bottom:!1,left:!0,right:!1},Jm={top:"end",bottom:"start",left:"end",right:"start"};function Lk(e,t,n,r,i,o){if(!i||o)return{placement:e,top:0,left:0};const[a,s]=e.split("-");let l=s??"center",u={top:0,left:0};const c=(h,p,g)=>{let b=0,v=0;const x=n[h]-t[p]-t[h];return x>0&&r&&(g?v=Zm[p]?x:-x:b=Zm[p]?x:-x),{left:b,top:v}},f=a==="left"||a==="right";if(l!=="center"){const h=Nk[e],p=Yu[h],g=Rh[h];if(n[g]>t[g]){if(t[h]+t[g]<n[g]){const b=(n[g]-t[g])/2;t[h]<b||t[p]<b?t[h]<t[p]?(l=Km[s],u=c(g,p,f)):u=c(g,h,f):l="center"}}else n[g]<t[g]&&t[p]<0&&t[h]>t[p]&&(l=Km[s])}else{const h=a==="bottom"||a==="top"?"left":"top",p=Yu[h],g=Rh[h],b=(n[g]-t[g])/2;(t[h]<b||t[p]<b)&&(t[h]>t[p]?(l=Jm[h],u=c(g,h,f)):(l=Jm[p],u=c(g,p,f)))}let d=a;return t[a]<n[Rh[a]]&&t[a]<t[Yu[a]]&&(d=Yu[a]),{placement:l!=="center"?`${d}-${l}`:d,left:u.left,top:u.top}}function Dk(e,t){return t?Ok[e]:Bk[e]}function Hk(e,t,n,r,i,o){if(o)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const Uk=Nr([Nr(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Nr(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Nr("> *",{pointerEvents:"all"})])]),Sf=Fe({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=$t("VBinder"),n=Ht(()=>e.enabled!==void 0?e.enabled:e.show),r=ne(null),i=ne(null),o=()=>{const{syncTrigger:d}=e;d.includes("scroll")&&t.addScrollListener(l),d.includes("resize")&&t.addResizeListener(l)},a=()=>{t.removeScrollListener(l),t.removeResizeListener(l)};fn(()=>{n.value&&(l(),o())});const s=uo();Uk.mount({id:"vueuc/binder",head:!0,anchorMetaName:Cf,ssr:s}),Bn(()=>{a()}),h2(()=>{n.value&&l()});const l=()=>{if(!n.value)return;const d=r.value;if(d===null)return;const h=t.targetRef,{x:p,y:g,overlap:b}=e,v=p!==void 0&&g!==void 0?kk(p,g):Ah(h);d.style.setProperty("--v-target-width",`${Math.round(v.width)}px`),d.style.setProperty("--v-target-height",`${Math.round(v.height)}px`);const{width:x,minWidth:y,placement:_,internalShift:S,flip:$}=e;d.setAttribute("v-placement",_),b?d.setAttribute("v-overlap",""):d.removeAttribute("v-overlap");const{style:w}=d;x==="target"?w.width=`${v.width}px`:x!==void 0?w.width=x:w.width="",y==="target"?w.minWidth=`${v.width}px`:y!==void 0?w.minWidth=y:w.minWidth="";const T=Ah(d),M=Ah(i.value),{left:P,top:R,placement:C}=Lk(_,v,T,S,$,b),E=Dk(C,b),{left:F,top:z,transform:j}=Hk(C,M,v,R,P,b);d.setAttribute("v-placement",C),d.style.setProperty("--v-offset-left",`${Math.round(P)}px`),d.style.setProperty("--v-offset-top",`${Math.round(R)}px`),d.style.transform=`translateX(${F}) translateY(${z}) ${j}`,d.style.setProperty("--v-transform-origin",E),d.style.transformOrigin=E};vt(n,d=>{d?(o(),u()):a()});const u=()=>{dn().then(l).catch(d=>console.error(d))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(d=>{vt(et(e,d),l)}),["teleportDisabled"].forEach(d=>{vt(et(e,d),u)}),vt(et(e,"syncTrigger"),d=>{d.includes("resize")?t.addResizeListener(l):t.removeResizeListener(l),d.includes("scroll")?t.addScrollListener(l):t.removeScrollListener(l)});const c=gs(),f=Ht(()=>{const{to:d}=e;if(d!==void 0)return d;c.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:f,syncPosition:l}},render(){return k(Ik,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=k("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[k("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?lo(n,[[x2,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var Lo=[],jk=function(){return Lo.some(function(e){return e.activeTargets.length>0})},Wk=function(){return Lo.some(function(e){return e.skippedTargets.length>0})},Qm="ResizeObserver loop completed with undelivered notifications.",Vk=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Qm}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Qm),window.dispatchEvent(e)},Nl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Nl||(Nl={}));var Do=function(e){return Object.freeze(e)},qk=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Do(this)}return e}(),C2=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Do(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),nv=function(e){return e instanceof SVGElement&&"getBBox"in e},S2=function(e){if(nv(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},e1=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Gk=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},_l=typeof window<"u"?window:{},Xu=new WeakMap,t1=/auto|scroll/,Yk=/^tb|vertical/,Xk=/msie|trident/i.test(_l.navigator&&_l.navigator.userAgent),Ar=function(e){return parseFloat(e||"0")},Ha=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new qk((n?t:e)||0,(n?e:t)||0)},n1=Do({devicePixelContentBoxSize:Ha(),borderBoxSize:Ha(),contentBoxSize:Ha(),contentRect:new C2(0,0,0,0)}),$2=function(e,t){if(t===void 0&&(t=!1),Xu.has(e)&&!t)return Xu.get(e);if(S2(e))return Xu.set(e,n1),n1;var n=getComputedStyle(e),r=nv(e)&&e.ownerSVGElement&&e.getBBox(),i=!Xk&&n.boxSizing==="border-box",o=Yk.test(n.writingMode||""),a=!r&&t1.test(n.overflowY||""),s=!r&&t1.test(n.overflowX||""),l=r?0:Ar(n.paddingTop),u=r?0:Ar(n.paddingRight),c=r?0:Ar(n.paddingBottom),f=r?0:Ar(n.paddingLeft),d=r?0:Ar(n.borderTopWidth),h=r?0:Ar(n.borderRightWidth),p=r?0:Ar(n.borderBottomWidth),g=r?0:Ar(n.borderLeftWidth),b=f+u,v=l+c,x=g+h,y=d+p,_=s?e.offsetHeight-y-e.clientHeight:0,S=a?e.offsetWidth-x-e.clientWidth:0,$=i?b+x:0,w=i?v+y:0,T=r?r.width:Ar(n.width)-$-S,M=r?r.height:Ar(n.height)-w-_,P=T+b+S+x,R=M+v+_+y,C=Do({devicePixelContentBoxSize:Ha(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Ha(P,R,o),contentBoxSize:Ha(T,M,o),contentRect:new C2(f,l,T,M)});return Xu.set(e,C),C},k2=function(e,t,n){var r=$2(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Nl.DEVICE_PIXEL_CONTENT_BOX:return a;case Nl.BORDER_BOX:return i;default:return o}},Kk=function(){function e(t){var n=$2(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Do([n.borderBoxSize]),this.contentBoxSize=Do([n.contentBoxSize]),this.devicePixelContentBoxSize=Do([n.devicePixelContentBoxSize])}return e}(),M2=function(e){if(S2(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Zk=function(){var e=1/0,t=[];Lo.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(s){var l=new Kk(s.target),u=M2(s.target);a.push(l),s.lastReportedSize=k2(s.target,s.observedBox),u<e&&(e=u)}),t.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},r1=function(e){Lo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(M2(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Jk=function(){var e=0;for(r1(e);jk();)e=Zk(),r1(e);return Wk()&&Vk(),e>0},zh,T2=[],Qk=function(){return T2.splice(0).forEach(function(e){return e()})},e9=function(e){if(!zh){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Qk()}).observe(n,r),zh=function(){n.textContent="".concat(t?t--:t++)}}T2.push(e),zh()},t9=function(e){e9(function(){requestAnimationFrame(e)})},Pc=0,n9=function(){return!!Pc},r9=250,i9={attributes:!0,characterData:!0,childList:!0,subtree:!0},i1=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],o1=function(e){return e===void 0&&(e=0),Date.now()+e},Fh=!1,o9=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=r9),!Fh){Fh=!0;var r=o1(t);t9(function(){var i=!1;try{i=Jk()}finally{if(Fh=!1,t=r-o1(),!n9())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,i9)};document.body?n():_l.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),i1.forEach(function(n){return _l.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),i1.forEach(function(n){return _l.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),p0=new o9,a1=function(e){!Pc&&e>0&&p0.start(),Pc+=e,!Pc&&p0.stop()},a9=function(e){return!nv(e)&&!Gk(e)&&getComputedStyle(e).display==="inline"},s9=function(){function e(t,n){this.target=t,this.observedBox=n||Nl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=k2(this.target,this.observedBox,!0);return a9(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),l9=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Ku=new WeakMap,s1=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Zu=function(){function e(){}return e.connect=function(t,n){var r=new l9(t,n);Ku.set(t,r)},e.observe=function(t,n,r){var i=Ku.get(t),o=i.observationTargets.length===0;s1(i.observationTargets,n)<0&&(o&&Lo.push(i),i.observationTargets.push(new s9(n,r&&r.box)),a1(1),p0.schedule())},e.unobserve=function(t,n){var r=Ku.get(t),i=s1(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Lo.splice(Lo.indexOf(r),1),r.observationTargets.splice(i,1),a1(-1))},e.disconnect=function(t){var n=this,r=Ku.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),u9=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Zu.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!e1(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!e1(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.unobserve(this,t)},e.prototype.disconnect=function(){Zu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class c9{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||u9)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const rd=new c9,Wi=Fe({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=ps().proxy;function r(i){const{onResize:o}=e;o!==void 0&&o(i)}fn(()=>{const i=n.$el;if(i===void 0){Gm("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){Gm("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(rd.registerHandler(i.nextElementSibling,r),t=!0)}),Bn(()=>{t&&rd.unregisterHandler(n.$el.nextElementSibling)})},render(){return qg(this.$slots,"default")}});let Ju;function d9(){return typeof document>"u"?!1:(Ju===void 0&&("matchMedia"in window?Ju=window.matchMedia("(pointer:coarse)").matches:Ju=!1),Ju)}let Ih;function l1(){return typeof document>"u"?1:(Ih===void 0&&(Ih="chrome"in window?window.devicePixelRatio:1),Ih)}const E2="VVirtualListXScroll";function f9({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const r=ne(0),i=ne(0),o=pe(()=>{const u=e.value;if(u.length===0)return null;const c=new w2(u.length,0);return u.forEach((f,d)=>{c.add(d,f.width)}),c}),a=Ht(()=>{const u=o.value;return u!==null?Math.max(u.getBound(i.value)-1,0):0}),s=u=>{const c=o.value;return c!==null?c.sum(u):0},l=Ht(()=>{const u=o.value;return u!==null?Math.min(u.getBound(i.value+r.value)+1,e.value.length-1):0});return jn(E2,{startIndexRef:a,endIndexRef:l,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:s}),{listWidthRef:r,scrollLeftRef:i}}const u1=Fe({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:o}=$t(E2);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:o,getLeft:r}},render(){const{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:o,item:a}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:a,getLeft:o});if(r!=null){const s=[];for(let l=e;l<=t;++l){const u=n[l];s.push(r({column:u,left:o(l),item:a}))}return s}return null}}),h9=Nr(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Nr("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),p9=Fe({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=uo();h9.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Cf,ssr:t}),fn(()=>{const{defaultScrollIndex:E,defaultScrollKey:F}=e;E!=null?b({index:E}):F!=null&&b({key:F})});let n=!1,r=!1;Wg(()=>{if(n=!1,!r){r=!0;return}b({top:h.value,left:a.value})}),Vg(()=>{n=!0,r||(r=!0)});const i=Ht(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let E=0;return e.columns.forEach(F=>{E+=F.width}),E}),o=pe(()=>{const E=new Map,{keyField:F}=e;return e.items.forEach((z,j)=>{E.set(z[F],j)}),E}),{scrollLeftRef:a,listWidthRef:s}=f9({columnsRef:et(e,"columns"),renderColRef:et(e,"renderCol"),renderItemWithColsRef:et(e,"renderItemWithCols")}),l=ne(null),u=ne(void 0),c=new Map,f=pe(()=>{const{items:E,itemSize:F,keyField:z}=e,j=new w2(E.length,F);return E.forEach((Z,J)=>{const ie=Z[z],he=c.get(ie);he!==void 0&&j.add(J,he)}),j}),d=ne(0),h=ne(0),p=Ht(()=>Math.max(f.value.getBound(h.value-kn(e.paddingTop))-1,0)),g=pe(()=>{const{value:E}=u;if(E===void 0)return[];const{items:F,itemSize:z}=e,j=p.value,Z=Math.min(j+Math.ceil(E/z+1),F.length-1),J=[];for(let ie=j;ie<=Z;++ie)J.push(F[ie]);return J}),b=(E,F)=>{if(typeof E=="number"){_(E,F,"auto");return}const{left:z,top:j,index:Z,key:J,position:ie,behavior:he,debounce:_e=!0}=E;if(z!==void 0||j!==void 0)_(z,j,he);else if(Z!==void 0)y(Z,he,_e);else if(J!==void 0){const oe=o.value.get(J);oe!==void 0&&y(oe,he,_e)}else ie==="bottom"?_(0,Number.MAX_SAFE_INTEGER,he):ie==="top"&&_(0,0,he)};let v,x=null;function y(E,F,z){const{value:j}=f,Z=j.sum(E)+kn(e.paddingTop);if(!z)l.value.scrollTo({left:0,top:Z,behavior:F});else{v=E,x!==null&&window.clearTimeout(x),x=window.setTimeout(()=>{v=void 0,x=null},16);const{scrollTop:J,offsetHeight:ie}=l.value;if(Z>J){const he=j.get(E);Z+he<=J+ie||l.value.scrollTo({left:0,top:Z+he-ie,behavior:F})}else l.value.scrollTo({left:0,top:Z,behavior:F})}}function _(E,F,z){l.value.scrollTo({left:E,top:F,behavior:z})}function S(E,F){var z,j,Z;if(n||e.ignoreItemResize||C(F.target))return;const{value:J}=f,ie=o.value.get(E),he=J.get(ie),_e=(Z=(j=(z=F.borderBoxSize)===null||z===void 0?void 0:z[0])===null||j===void 0?void 0:j.blockSize)!==null&&Z!==void 0?Z:F.contentRect.height;if(_e===he)return;_e-e.itemSize===0?c.delete(E):c.set(E,_e-e.itemSize);const oe=_e-he;if(oe===0)return;J.add(ie,oe);const ve=l.value;if(ve!=null){if(v===void 0){const we=J.sum(ie);ve.scrollTop>we&&ve.scrollBy(0,oe)}else if(ie<v)ve.scrollBy(0,oe);else if(ie===v){const we=J.sum(ie);_e+we>ve.scrollTop+ve.offsetHeight&&ve.scrollBy(0,oe)}R()}d.value++}const $=!d9();let w=!1;function T(E){var F;(F=e.onScroll)===null||F===void 0||F.call(e,E),(!$||!w)&&R()}function M(E){var F;if((F=e.onWheel)===null||F===void 0||F.call(e,E),$){const z=l.value;if(z!=null){if(E.deltaX===0&&(z.scrollTop===0&&E.deltaY<=0||z.scrollTop+z.offsetHeight>=z.scrollHeight&&E.deltaY>=0))return;E.preventDefault(),z.scrollTop+=E.deltaY/l1(),z.scrollLeft+=E.deltaX/l1(),R(),w=!0,a2(()=>{w=!1})}}}function P(E){if(n||C(E.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(E.contentRect.height===u.value)return}else if(E.contentRect.height===u.value&&E.contentRect.width===s.value)return;u.value=E.contentRect.height,s.value=E.contentRect.width;const{onResize:F}=e;F!==void 0&&F(E)}function R(){const{value:E}=l;E!=null&&(h.value=E.scrollTop,a.value=E.scrollLeft)}function C(E){let F=E;for(;F!==null;){if(F.style.display==="none")return!0;F=F.parentElement}return!1}return{listHeight:u,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:pe(()=>{const{itemResizable:E}=e,F=Bi(f.value.sum());return d.value,[e.itemsStyle,{boxSizing:"content-box",width:Bi(i.value),height:E?"":F,minHeight:E?F:"",paddingTop:Bi(e.paddingTop),paddingBottom:Bi(e.paddingBottom)}]}),visibleItemsStyle:pe(()=>(d.value,{transform:`translateY(${Bi(f.value.sum(p.value))})`})),viewportItems:g,listElRef:l,itemsElRef:ne(null),scrollTo:b,handleListResize:P,handleListScroll:T,handleListWheel:M,handleItemResize:S}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return k(Wi,{onResize:this.handleListResize},{default:()=>{var i,o;return k("div",ia(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?k("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[k(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:a,renderItemWithCols:s}=this;return this.viewportItems.map(l=>{const u=l[t],c=n.get(u),f=a!=null?k(u1,{index:c,item:l}):void 0,d=s!=null?k(u1,{index:c,item:l}):void 0,h=this.$slots.default({item:l,renderedCols:f,renderedItemWithCols:d,index:c})[0];return e?k(Wi,{key:u,onResize:p=>this.handleItemResize(u,p)},{default:()=>h}):(h.key=u,h)})}})]):(o=(i=this.$slots).empty)===null||o===void 0?void 0:o.call(i)])}})}}),g9=Nr(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar",{width:0,height:0})]),v9=Fe({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=ne(null);function t(r){!(r.currentTarget.offsetWidth<r.currentTarget.scrollWidth)||r.deltaY===0||(r.currentTarget.scrollLeft+=r.deltaY+r.deltaX,r.preventDefault())}const n=uo();return g9.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Cf,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...r){var i;(i=e.value)===null||i===void 0||i.scrollTo(...r)}})},render(){return k("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),Qr="v-hidden",b9=Nr("[v-hidden]",{display:"none!important"}),c1=Fe({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=ne(null),r=ne(null);function i(a){const{value:s}=n,{getCounter:l,getTail:u}=e;let c;if(l!==void 0?c=l():c=r.value,!s||!c)return;c.hasAttribute(Qr)&&c.removeAttribute(Qr);const{children:f}=s;if(a.showAllItemsBeforeCalculate)for(const y of f)y.hasAttribute(Qr)&&y.removeAttribute(Qr);const d=s.offsetWidth,h=[],p=t.tail?u==null?void 0:u():null;let g=p?p.offsetWidth:0,b=!1;const v=s.children.length-(t.tail?1:0);for(let y=0;y<v-1;++y){if(y<0)continue;const _=f[y];if(b){_.hasAttribute(Qr)||_.setAttribute(Qr,"");continue}else _.hasAttribute(Qr)&&_.removeAttribute(Qr);const S=_.offsetWidth;if(g+=S,h[y]=S,g>d){const{updateCounter:$}=e;for(let w=y;w>=0;--w){const T=v-1-w;$!==void 0?$(T):c.textContent=`${T}`;const M=c.offsetWidth;if(g-=h[w],g+M<=d||w===0){b=!0,y=w-1,p&&(y===-1?(p.style.maxWidth=`${d-M}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:P}=e;P&&P(T);break}}}}const{onUpdateOverflow:x}=e;b?x!==void 0&&x(!0):(x!==void 0&&x(!1),c.setAttribute(Qr,""))}const o=uo();return b9.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Cf,ssr:o}),fn(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return dn(()=>this.sync({showAllItemsBeforeCalculate:!1})),k("div",{class:"v-overflow",ref:"selfRef"},[qg(e,"default"),e.counter?e.counter():k("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function A2(e){return e instanceof HTMLElement}function P2(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(A2(n)&&(z2(n)||P2(n)))return!0}return!1}function R2(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(A2(n)&&(z2(n)||R2(n)))return!0}return!1}function z2(e){if(!m9(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function m9(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Ms=[];const y9=Fe({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=pk(),n=ne(null),r=ne(null);let i=!1,o=!1;const a=typeof document>"u"?null:document.activeElement;function s(){return Ms[Ms.length-1]===t}function l(b){var v;b.code==="Escape"&&s()&&((v=e.onEsc)===null||v===void 0||v.call(e,b))}fn(()=>{vt(()=>e.active,b=>{b?(f(),Mt("keydown",document,l)):(St("keydown",document,l),i&&d())},{immediate:!0})}),Bn(()=>{St("keydown",document,l),i&&d()});function u(b){if(!o&&s()){const v=c();if(v===null||v.contains(Qa(b)))return;h("first")}}function c(){const b=n.value;if(b===null)return null;let v=b;for(;v=v.nextSibling,!(v===null||v instanceof Element&&v.tagName==="DIV"););return v}function f(){var b;if(!e.disabled){if(Ms.push(t),e.autoFocus){const{initialFocusTo:v}=e;v===void 0?h("first"):(b=Xm(v))===null||b===void 0||b.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",u,!0)}}function d(){var b;if(e.disabled||(document.removeEventListener("focus",u,!0),Ms=Ms.filter(x=>x!==t),s()))return;const{finalFocusTo:v}=e;v!==void 0?(b=Xm(v))===null||b===void 0||b.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&a instanceof HTMLElement&&(o=!0,a.focus({preventScroll:!0}),o=!1)}function h(b){if(s()&&e.active){const v=n.value,x=r.value;if(v!==null&&x!==null){const y=c();if(y==null||y===x){o=!0,v.focus({preventScroll:!0}),o=!1;return}o=!0;const _=b==="first"?P2(y):R2(y);o=!1,_||(o=!0,v.focus({preventScroll:!0}),o=!1)}}}function p(b){if(o)return;const v=c();v!==null&&(b.relatedTarget!==null&&v.contains(b.relatedTarget)?h("last"):h("first"))}function g(b){o||(b.relatedTarget!==null&&b.relatedTarget===n.value?h("last"):h("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:p,handleEndFocus:g}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return k(kt,null,[k("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),k("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function F2(e,t){t&&(fn(()=>{const{value:n}=e;n&&rd.registerHandler(n,t)}),Bn(()=>{const{value:n}=e;n&&rd.unregisterHandler(n)}))}function id(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const _9=/^(\d|\.)+$/,d1=/(\d|\.)+/;function Rc(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(_9.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=d1.exec(e);return i?e.replace(d1,String((Number(i[0])+n)*t)):e}return e}function f1(e){const{left:t,right:n,top:r,bottom:i}=Kn(e);return`${r} ${n} ${i} ${t}`}let Bh;function x9(){return Bh===void 0&&(Bh=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Bh}const w9=new WeakSet;function C9(e){w9.add(e)}function h1(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function od(e,t){console.error(`[naive/${e}]: ${t}`)}function I2(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Ye(e,...t){if(Array.isArray(e))e.forEach(n=>Ye(n,...t));else return e(...t)}function Ua(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){Ua(r,t,n);return}if(r.type===kt){if(r.children===null)return;Array.isArray(r.children)&&Ua(r.children,t,n)}else{if(r.type===sn&&t)return;n.push(r)}}}),n}function p1(e,t="default",n=void 0){const r=e[t];if(!r)return od("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Ua(r(n));return i.length===1?i[0]:(od("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function S9(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function Oh(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}function $9(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(i=>{t.includes(i)||(r[i]=e[i])}),Object.assign(r,n)}function Fo(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?Wo(e):typeof e=="number"?Wo(String(e)):null}function mu(e){return e.some(t=>Il(t)?!(t.type===sn||t.type===kt&&!mu(t.children)):!0)?e:null}function Ur(e,t){return e&&mu(e())||t()}function k9(e,t,n){return e&&mu(e(t))||n(t)}function Bt(e,t){const n=e&&mu(e());return t(n||null)}function ja(e){return!(e&&mu(e()))}const g0=Fe({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),oa="n-config-provider",M9="n";function rn(e={},t={defaultBordered:!0}){const n=$t(oa,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:pe(()=>{var r,i;const{bordered:o}=e;return o!==void 0?o:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:DS(M9),namespaceRef:pe(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function Cn(e,t,n,r){n||I2("useThemeClass","cssVarsRef is not passed");const i=$t(oa,null),o=i==null?void 0:i.mergedThemeHashRef,a=i==null?void 0:i.styleMountTarget,s=ne(""),l=uo();let u;const c=`__${e}`,f=()=>{let d=c;const h=t?t.value:void 0,p=o==null?void 0:o.value;p&&(d+=`-${p}`),h&&(d+=`-${h}`);const{themeOverrides:g,builtinThemeOverrides:b}=r;g&&(d+=`-${o0(JSON.stringify(g))}`),b&&(d+=`-${o0(JSON.stringify(b))}`),s.value=d,u=()=>{const v=n.value;let x="";for(const y in v)x+=`${y}: ${v[y]};`;ce(`.${d}`,x).mount({id:d,ssr:l,parent:a}),u=void 0}};return xr(()=>{f()}),{themeClass:s,onRender:()=>{u==null||u()}}}const g1="n-form-item";function aa(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=$t(g1,null);jn(g1,null);const o=pe(n?()=>n(i):()=>{const{size:l}=e;if(l)return l;if(i){const{mergedSize:u}=i;if(u.value!==void 0)return u.value}return t}),a=pe(r?()=>r(i):()=>{const{disabled:l}=e;return l!==void 0?l:i?i.disabled.value:!1}),s=pe(()=>{const{status:l}=e;return l||(i==null?void 0:i.mergedValidationStatus.value)});return Bn(()=>{i&&i.restoreValidation()}),{mergedSizeRef:o,mergedDisabledRef:a,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}const T9={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Nh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Ts(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}function Es(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?A9(s,f=>f.test(a)):E9(s,f=>f.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(a.length);return{value:u,rest:c}}}function E9(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function A9(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function P9(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const R9={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z9=(e,t,n)=>{let r;const i=R9[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},F9={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},I9=(e,t,n,r)=>F9[e],B9={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},O9={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},N9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},L9={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},D9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},H9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},U9=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},j9={ordinalNumber:U9,era:Ts({values:B9,defaultWidth:"wide"}),quarter:Ts({values:O9,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ts({values:N9,defaultWidth:"wide"}),day:Ts({values:L9,defaultWidth:"wide"}),dayPeriod:Ts({values:D9,defaultWidth:"wide",formattingValues:H9,defaultFormattingWidth:"wide"})},W9=/^(\d+)(th|st|nd|rd)?/i,V9=/\d+/i,q9={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},G9={any:[/^b/i,/^(a|c)/i]},Y9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},X9={any:[/1/i,/2/i,/3/i,/4/i]},K9={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Z9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J9={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Q9={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eM={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tM={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nM={ordinalNumber:P9({matchPattern:W9,parsePattern:V9,valueCallback:e=>parseInt(e,10)}),era:Es({matchPatterns:q9,defaultMatchWidth:"wide",parsePatterns:G9,defaultParseWidth:"any"}),quarter:Es({matchPatterns:Y9,defaultMatchWidth:"wide",parsePatterns:X9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Es({matchPatterns:K9,defaultMatchWidth:"wide",parsePatterns:Z9,defaultParseWidth:"any"}),day:Es({matchPatterns:J9,defaultMatchWidth:"wide",parsePatterns:Q9,defaultParseWidth:"any"}),dayPeriod:Es({matchPatterns:eM,defaultMatchWidth:"any",parsePatterns:tM,defaultParseWidth:"any"})},rM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},oM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aM={date:Nh({formats:rM,defaultWidth:"full"}),time:Nh({formats:iM,defaultWidth:"full"}),dateTime:Nh({formats:oM,defaultWidth:"full"})},sM={code:"en-US",formatDistance:z9,formatLong:aM,formatRelative:I9,localize:j9,match:nM,options:{weekStartsOn:0,firstWeekContainsDate:1}},lM={name:"en-US",locale:sM};var B2=typeof global=="object"&&global&&global.Object===Object&&global,uM=typeof self=="object"&&self&&self.Object===Object&&self,kr=B2||uM||Function("return this")(),Xi=kr.Symbol,O2=Object.prototype,cM=O2.hasOwnProperty,dM=O2.toString,As=Xi?Xi.toStringTag:void 0;function fM(e){var t=cM.call(e,As),n=e[As];try{e[As]=void 0;var r=!0}catch{}var i=dM.call(e);return r&&(t?e[As]=n:delete e[As]),i}var hM=Object.prototype,pM=hM.toString;function gM(e){return pM.call(e)}var vM="[object Null]",bM="[object Undefined]",v1=Xi?Xi.toStringTag:void 0;function sa(e){return e==null?e===void 0?bM:vM:v1&&v1 in Object(e)?fM(e):gM(e)}function Ki(e){return e!=null&&typeof e=="object"}var mM="[object Symbol]";function $f(e){return typeof e=="symbol"||Ki(e)&&sa(e)==mM}function N2(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var fr=Array.isArray,b1=Xi?Xi.prototype:void 0,m1=b1?b1.toString:void 0;function L2(e){if(typeof e=="string")return e;if(fr(e))return N2(e,L2)+"";if($f(e))return m1?m1.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var yM=/\s/;function _M(e){for(var t=e.length;t--&&yM.test(e.charAt(t)););return t}var xM=/^\s+/;function wM(e){return e&&e.slice(0,_M(e)+1).replace(xM,"")}function hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var y1=NaN,CM=/^[-+]0x[0-9a-f]+$/i,SM=/^0b[01]+$/i,$M=/^0o[0-7]+$/i,kM=parseInt;function _1(e){if(typeof e=="number")return e;if($f(e))return y1;if(hr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wM(e);var n=SM.test(e);return n||$M.test(e)?kM(e.slice(2),n?2:8):CM.test(e)?y1:+e}function rv(e){return e}var MM="[object AsyncFunction]",TM="[object Function]",EM="[object GeneratorFunction]",AM="[object Proxy]";function iv(e){if(!hr(e))return!1;var t=sa(e);return t==TM||t==EM||t==MM||t==AM}var Lh=kr["__core-js_shared__"],x1=function(){var e=/[^.]+$/.exec(Lh&&Lh.keys&&Lh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function PM(e){return!!x1&&x1 in e}var RM=Function.prototype,zM=RM.toString;function la(e){if(e!=null){try{return zM.call(e)}catch{}try{return e+""}catch{}}return""}var FM=/[\\^$.*+?()[\]{}|]/g,IM=/^\[object .+?Constructor\]$/,BM=Function.prototype,OM=Object.prototype,NM=BM.toString,LM=OM.hasOwnProperty,DM=RegExp("^"+NM.call(LM).replace(FM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HM(e){if(!hr(e)||PM(e))return!1;var t=iv(e)?DM:IM;return t.test(la(e))}function UM(e,t){return e==null?void 0:e[t]}function ua(e,t){var n=UM(e,t);return HM(n)?n:void 0}var v0=ua(kr,"WeakMap"),w1=Object.create,jM=function(){function e(){}return function(t){if(!hr(t))return{};if(w1)return w1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function WM(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function VM(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var qM=800,GM=16,YM=Date.now;function XM(e){var t=0,n=0;return function(){var r=YM(),i=GM-(r-n);if(n=r,i>0){if(++t>=qM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function KM(e){return function(){return e}}var ad=function(){try{var e=ua(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ZM=ad?function(e,t){return ad(e,"toString",{configurable:!0,enumerable:!1,value:KM(t),writable:!0})}:rv,JM=XM(ZM),QM=9007199254740991,eT=/^(?:0|[1-9]\d*)$/;function ov(e,t){var n=typeof e;return t=t??QM,!!t&&(n=="number"||n!="symbol"&&eT.test(e))&&e>-1&&e%1==0&&e<t}function av(e,t,n){t=="__proto__"&&ad?ad(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yu(e,t){return e===t||e!==e&&t!==t}var tT=Object.prototype,nT=tT.hasOwnProperty;function rT(e,t,n){var r=e[t];(!(nT.call(e,t)&&yu(r,n))||n===void 0&&!(t in e))&&av(e,t,n)}function iT(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;l===void 0&&(l=e[s]),i?av(n,s,l):rT(n,s,l)}return n}var C1=Math.max;function oT(e,t,n){return t=C1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=C1(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),WM(e,this,s)}}function aT(e,t){return JM(oT(e,t,rv),e+"")}var sT=9007199254740991;function sv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sT}function vs(e){return e!=null&&sv(e.length)&&!iv(e)}function lT(e,t,n){if(!hr(n))return!1;var r=typeof t;return(r=="number"?vs(n)&&ov(t,n.length):r=="string"&&t in n)?yu(n[t],e):!1}function uT(e){return aT(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&lT(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var cT=Object.prototype;function lv(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cT;return e===n}function dT(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var fT="[object Arguments]";function S1(e){return Ki(e)&&sa(e)==fT}var D2=Object.prototype,hT=D2.hasOwnProperty,pT=D2.propertyIsEnumerable,sd=S1(function(){return arguments}())?S1:function(e){return Ki(e)&&hT.call(e,"callee")&&!pT.call(e,"callee")};function gT(){return!1}var H2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$1=H2&&typeof module=="object"&&module&&!module.nodeType&&module,vT=$1&&$1.exports===H2,k1=vT?kr.Buffer:void 0,bT=k1?k1.isBuffer:void 0,ld=bT||gT,mT="[object Arguments]",yT="[object Array]",_T="[object Boolean]",xT="[object Date]",wT="[object Error]",CT="[object Function]",ST="[object Map]",$T="[object Number]",kT="[object Object]",MT="[object RegExp]",TT="[object Set]",ET="[object String]",AT="[object WeakMap]",PT="[object ArrayBuffer]",RT="[object DataView]",zT="[object Float32Array]",FT="[object Float64Array]",IT="[object Int8Array]",BT="[object Int16Array]",OT="[object Int32Array]",NT="[object Uint8Array]",LT="[object Uint8ClampedArray]",DT="[object Uint16Array]",HT="[object Uint32Array]",Ft={};Ft[zT]=Ft[FT]=Ft[IT]=Ft[BT]=Ft[OT]=Ft[NT]=Ft[LT]=Ft[DT]=Ft[HT]=!0;Ft[mT]=Ft[yT]=Ft[PT]=Ft[_T]=Ft[RT]=Ft[xT]=Ft[wT]=Ft[CT]=Ft[ST]=Ft[$T]=Ft[kT]=Ft[MT]=Ft[TT]=Ft[ET]=Ft[AT]=!1;function UT(e){return Ki(e)&&sv(e.length)&&!!Ft[sa(e)]}function jT(e){return function(t){return e(t)}}var U2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xl=U2&&typeof module=="object"&&module&&!module.nodeType&&module,WT=xl&&xl.exports===U2,Dh=WT&&B2.process,M1=function(){try{var e=xl&&xl.require&&xl.require("util").types;return e||Dh&&Dh.binding&&Dh.binding("util")}catch{}}(),T1=M1&&M1.isTypedArray,uv=T1?jT(T1):UT,VT=Object.prototype,qT=VT.hasOwnProperty;function j2(e,t){var n=fr(e),r=!n&&sd(e),i=!n&&!r&&ld(e),o=!n&&!r&&!i&&uv(e),a=n||r||i||o,s=a?dT(e.length,String):[],l=s.length;for(var u in e)(t||qT.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ov(u,l)))&&s.push(u);return s}function W2(e,t){return function(n){return e(t(n))}}var GT=W2(Object.keys,Object),YT=Object.prototype,XT=YT.hasOwnProperty;function KT(e){if(!lv(e))return GT(e);var t=[];for(var n in Object(e))XT.call(e,n)&&n!="constructor"&&t.push(n);return t}function cv(e){return vs(e)?j2(e):KT(e)}function ZT(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var JT=Object.prototype,QT=JT.hasOwnProperty;function eE(e){if(!hr(e))return ZT(e);var t=lv(e),n=[];for(var r in e)r=="constructor"&&(t||!QT.call(e,r))||n.push(r);return n}function V2(e){return vs(e)?j2(e,!0):eE(e)}var tE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nE=/^\w*$/;function dv(e,t){if(fr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||$f(e)?!0:nE.test(e)||!tE.test(e)||t!=null&&e in Object(t)}var Ll=ua(Object,"create");function rE(){this.__data__=Ll?Ll(null):{},this.size=0}function iE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oE="__lodash_hash_undefined__",aE=Object.prototype,sE=aE.hasOwnProperty;function lE(e){var t=this.__data__;if(Ll){var n=t[e];return n===oE?void 0:n}return sE.call(t,e)?t[e]:void 0}var uE=Object.prototype,cE=uE.hasOwnProperty;function dE(e){var t=this.__data__;return Ll?t[e]!==void 0:cE.call(t,e)}var fE="__lodash_hash_undefined__";function hE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ll&&t===void 0?fE:t,this}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vo.prototype.clear=rE;Vo.prototype.delete=iE;Vo.prototype.get=lE;Vo.prototype.has=dE;Vo.prototype.set=hE;function pE(){this.__data__=[],this.size=0}function kf(e,t){for(var n=e.length;n--;)if(yu(e[n][0],t))return n;return-1}var gE=Array.prototype,vE=gE.splice;function bE(e){var t=this.__data__,n=kf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():vE.call(t,n,1),--this.size,!0}function mE(e){var t=this.__data__,n=kf(t,e);return n<0?void 0:t[n][1]}function yE(e){return kf(this.__data__,e)>-1}function _E(e,t){var n=this.__data__,r=kf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yi.prototype.clear=pE;yi.prototype.delete=bE;yi.prototype.get=mE;yi.prototype.has=yE;yi.prototype.set=_E;var Dl=ua(kr,"Map");function xE(){this.size=0,this.__data__={hash:new Vo,map:new(Dl||yi),string:new Vo}}function wE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Mf(e,t){var n=e.__data__;return wE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function CE(e){var t=Mf(this,e).delete(e);return this.size-=t?1:0,t}function SE(e){return Mf(this,e).get(e)}function $E(e){return Mf(this,e).has(e)}function kE(e,t){var n=Mf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function _i(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_i.prototype.clear=xE;_i.prototype.delete=CE;_i.prototype.get=SE;_i.prototype.has=$E;_i.prototype.set=kE;var ME="Expected a function";function fv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ME);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(fv.Cache||_i),n}fv.Cache=_i;var TE=500;function EE(e){var t=fv(e,function(r){return n.size===TE&&n.clear(),r}),n=t.cache;return t}var AE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PE=/\\(\\)?/g,RE=EE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AE,function(n,r,i,o){t.push(i?o.replace(PE,"$1"):r||n)}),t});function q2(e){return e==null?"":L2(e)}function G2(e,t){return fr(e)?e:dv(e,t)?[e]:RE(q2(e))}function Tf(e){if(typeof e=="string"||$f(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Y2(e,t){t=G2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Tf(t[n++])];return n&&n==r?e:void 0}function zE(e,t,n){var r=e==null?void 0:Y2(e,t);return r===void 0?n:r}function FE(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var X2=W2(Object.getPrototypeOf,Object),IE="[object Object]",BE=Function.prototype,OE=Object.prototype,K2=BE.toString,NE=OE.hasOwnProperty,LE=K2.call(Object);function DE(e){if(!Ki(e)||sa(e)!=IE)return!1;var t=X2(e);if(t===null)return!0;var n=NE.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&K2.call(n)==LE}function HE(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function UE(e,t,n){var r=e.length;return n=n===void 0?r:n,HE(e,t,n)}var jE="\\ud800-\\udfff",WE="\\u0300-\\u036f",VE="\\ufe20-\\ufe2f",qE="\\u20d0-\\u20ff",GE=WE+VE+qE,YE="\\ufe0e\\ufe0f",XE="\\u200d",KE=RegExp("["+XE+jE+GE+YE+"]");function Z2(e){return KE.test(e)}function ZE(e){return e.split("")}var J2="\\ud800-\\udfff",JE="\\u0300-\\u036f",QE="\\ufe20-\\ufe2f",eA="\\u20d0-\\u20ff",tA=JE+QE+eA,nA="\\ufe0e\\ufe0f",rA="["+J2+"]",b0="["+tA+"]",m0="\\ud83c[\\udffb-\\udfff]",iA="(?:"+b0+"|"+m0+")",Q2="[^"+J2+"]",e5="(?:\\ud83c[\\udde6-\\uddff]){2}",t5="[\\ud800-\\udbff][\\udc00-\\udfff]",oA="\\u200d",n5=iA+"?",r5="["+nA+"]?",aA="(?:"+oA+"(?:"+[Q2,e5,t5].join("|")+")"+r5+n5+")*",sA=r5+n5+aA,lA="(?:"+[Q2+b0+"?",b0,e5,t5,rA].join("|")+")",uA=RegExp(m0+"(?="+m0+")|"+lA+sA,"g");function cA(e){return e.match(uA)||[]}function dA(e){return Z2(e)?cA(e):ZE(e)}function fA(e){return function(t){t=q2(t);var n=Z2(t)?dA(t):void 0,r=n?n[0]:t.charAt(0),i=n?UE(n,1).join(""):t.slice(1);return r[e]()+i}}var hA=fA("toUpperCase");function pA(){this.__data__=new yi,this.size=0}function gA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vA(e){return this.__data__.get(e)}function bA(e){return this.__data__.has(e)}var mA=200;function yA(e,t){var n=this.__data__;if(n instanceof yi){var r=n.__data__;if(!Dl||r.length<mA-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _i(r)}return n.set(e,t),this.size=n.size,this}function jr(e){var t=this.__data__=new yi(e);this.size=t.size}jr.prototype.clear=pA;jr.prototype.delete=gA;jr.prototype.get=vA;jr.prototype.has=bA;jr.prototype.set=yA;var i5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,E1=i5&&typeof module=="object"&&module&&!module.nodeType&&module,_A=E1&&E1.exports===i5,A1=_A?kr.Buffer:void 0;A1&&A1.allocUnsafe;function xA(e,t){return e.slice()}function wA(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function CA(){return[]}var SA=Object.prototype,$A=SA.propertyIsEnumerable,P1=Object.getOwnPropertySymbols,kA=P1?function(e){return e==null?[]:(e=Object(e),wA(P1(e),function(t){return $A.call(e,t)}))}:CA;function MA(e,t,n){var r=t(e);return fr(e)?r:FE(r,n(e))}function R1(e){return MA(e,cv,kA)}var y0=ua(kr,"DataView"),_0=ua(kr,"Promise"),x0=ua(kr,"Set"),z1="[object Map]",TA="[object Object]",F1="[object Promise]",I1="[object Set]",B1="[object WeakMap]",O1="[object DataView]",EA=la(y0),AA=la(Dl),PA=la(_0),RA=la(x0),zA=la(v0),Pi=sa;(y0&&Pi(new y0(new ArrayBuffer(1)))!=O1||Dl&&Pi(new Dl)!=z1||_0&&Pi(_0.resolve())!=F1||x0&&Pi(new x0)!=I1||v0&&Pi(new v0)!=B1)&&(Pi=function(e){var t=sa(e),n=t==TA?e.constructor:void 0,r=n?la(n):"";if(r)switch(r){case EA:return O1;case AA:return z1;case PA:return F1;case RA:return I1;case zA:return B1}return t});var ud=kr.Uint8Array;function FA(e){var t=new e.constructor(e.byteLength);return new ud(t).set(new ud(e)),t}function IA(e,t){var n=FA(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function BA(e){return typeof e.constructor=="function"&&!lv(e)?jM(X2(e)):{}}var OA="__lodash_hash_undefined__";function NA(e){return this.__data__.set(e,OA),this}function LA(e){return this.__data__.has(e)}function cd(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _i;++t<n;)this.add(e[t])}cd.prototype.add=cd.prototype.push=NA;cd.prototype.has=LA;function DA(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function HA(e,t){return e.has(t)}var UA=1,jA=2;function o5(e,t,n,r,i,o){var a=n&UA,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=n&jA?new cd:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var p=e[f],g=t[f];if(r)var b=a?r(g,p,f,t,e,o):r(p,g,f,e,t,o);if(b!==void 0){if(b)continue;d=!1;break}if(h){if(!DA(t,function(v,x){if(!HA(h,x)&&(p===v||i(p,v,n,r,o)))return h.push(x)})){d=!1;break}}else if(!(p===g||i(p,g,n,r,o))){d=!1;break}}return o.delete(e),o.delete(t),d}function WA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function VA(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var qA=1,GA=2,YA="[object Boolean]",XA="[object Date]",KA="[object Error]",ZA="[object Map]",JA="[object Number]",QA="[object RegExp]",eP="[object Set]",tP="[object String]",nP="[object Symbol]",rP="[object ArrayBuffer]",iP="[object DataView]",N1=Xi?Xi.prototype:void 0,Hh=N1?N1.valueOf:void 0;function oP(e,t,n,r,i,o,a){switch(n){case iP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rP:return!(e.byteLength!=t.byteLength||!o(new ud(e),new ud(t)));case YA:case XA:case JA:return yu(+e,+t);case KA:return e.name==t.name&&e.message==t.message;case QA:case tP:return e==t+"";case ZA:var s=WA;case eP:var l=r&qA;if(s||(s=VA),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=GA,a.set(e,t);var c=o5(s(e),s(t),r,i,o,a);return a.delete(e),c;case nP:if(Hh)return Hh.call(e)==Hh.call(t)}return!1}var aP=1,sP=Object.prototype,lP=sP.hasOwnProperty;function uP(e,t,n,r,i,o){var a=n&aP,s=R1(e),l=s.length,u=R1(t),c=u.length;if(l!=c&&!a)return!1;for(var f=l;f--;){var d=s[f];if(!(a?d in t:lP.call(t,d)))return!1}var h=o.get(e),p=o.get(t);if(h&&p)return h==t&&p==e;var g=!0;o.set(e,t),o.set(t,e);for(var b=a;++f<l;){d=s[f];var v=e[d],x=t[d];if(r)var y=a?r(x,v,d,t,e,o):r(v,x,d,e,t,o);if(!(y===void 0?v===x||i(v,x,n,r,o):y)){g=!1;break}b||(b=d=="constructor")}if(g&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(e),o.delete(t),g}var cP=1,L1="[object Arguments]",D1="[object Array]",Qu="[object Object]",dP=Object.prototype,H1=dP.hasOwnProperty;function fP(e,t,n,r,i,o){var a=fr(e),s=fr(t),l=a?D1:Pi(e),u=s?D1:Pi(t);l=l==L1?Qu:l,u=u==L1?Qu:u;var c=l==Qu,f=u==Qu,d=l==u;if(d&&ld(e)){if(!ld(t))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new jr),a||uv(e)?o5(e,t,n,r,i,o):oP(e,t,l,n,r,i,o);if(!(n&cP)){var h=c&&H1.call(e,"__wrapped__"),p=f&&H1.call(t,"__wrapped__");if(h||p){var g=h?e.value():e,b=p?t.value():t;return o||(o=new jr),i(g,b,n,r,o)}}return d?(o||(o=new jr),uP(e,t,n,r,i,o)):!1}function hv(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ki(e)&&!Ki(t)?e!==e&&t!==t:fP(e,t,n,r,hv,i)}var hP=1,pP=2;function gP(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var s=a[0],l=e[s],u=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var c=new jr,f;if(!(f===void 0?hv(u,l,hP|pP,r,c):f))return!1}}return!0}function a5(e){return e===e&&!hr(e)}function vP(e){for(var t=cv(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,a5(i)]}return t}function s5(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function bP(e){var t=vP(e);return t.length==1&&t[0][2]?s5(t[0][0],t[0][1]):function(n){return n===e||gP(n,e,t)}}function mP(e,t){return e!=null&&t in Object(e)}function yP(e,t,n){t=G2(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=Tf(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&sv(i)&&ov(a,i)&&(fr(e)||sd(e)))}function _P(e,t){return e!=null&&yP(e,t,mP)}var xP=1,wP=2;function CP(e,t){return dv(e)&&a5(t)?s5(Tf(e),t):function(n){var r=zE(n,e);return r===void 0&&r===t?_P(n,e):hv(t,r,xP|wP)}}function SP(e){return function(t){return t==null?void 0:t[e]}}function $P(e){return function(t){return Y2(t,e)}}function kP(e){return dv(e)?SP(Tf(e)):$P(e)}function MP(e){return typeof e=="function"?e:e==null?rv:typeof e=="object"?fr(e)?CP(e[0],e[1]):bP(e):kP(e)}function TP(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[++i];if(n(o[l],l,o)===!1)break}return t}}var l5=TP();function EP(e,t){return e&&l5(e,t,cv)}function AP(e,t){return function(n,r){if(n==null)return n;if(!vs(n))return e(n,r);for(var i=n.length,o=-1,a=Object(n);++o<i&&r(a[o],o,a)!==!1;);return n}}var PP=AP(EP),Uh=function(){return kr.Date.now()},RP="Expected a function",zP=Math.max,FP=Math.min;function IP(e,t,n){var r,i,o,a,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(RP);t=_1(t)||0,hr(n)&&(c=!!n.leading,f="maxWait"in n,o=f?zP(_1(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function h($){var w=r,T=i;return r=i=void 0,u=$,a=e.apply(T,w),a}function p($){return u=$,s=setTimeout(v,t),c?h($):a}function g($){var w=$-l,T=$-u,M=t-w;return f?FP(M,o-T):M}function b($){var w=$-l,T=$-u;return l===void 0||w>=t||w<0||f&&T>=o}function v(){var $=Uh();if(b($))return x($);s=setTimeout(v,g($))}function x($){return s=void 0,d&&r?h($):(r=i=void 0,a)}function y(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function _(){return s===void 0?a:x(Uh())}function S(){var $=Uh(),w=b($);if(r=arguments,i=this,l=$,w){if(s===void 0)return p(l);if(f)return clearTimeout(s),s=setTimeout(v,t),h(l)}return s===void 0&&(s=setTimeout(v,t)),a}return S.cancel=y,S.flush=_,S}function w0(e,t,n){(n!==void 0&&!yu(e[t],n)||n===void 0&&!(t in e))&&av(e,t,n)}function BP(e){return Ki(e)&&vs(e)}function C0(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function OP(e){return iT(e,V2(e))}function NP(e,t,n,r,i,o,a){var s=C0(e,n),l=C0(t,n),u=a.get(l);if(u){w0(e,n,u);return}var c=o?o(s,l,n+"",e,t,a):void 0,f=c===void 0;if(f){var d=fr(l),h=!d&&ld(l),p=!d&&!h&&uv(l);c=l,d||h||p?fr(s)?c=s:BP(s)?c=VM(s):h?(f=!1,c=xA(l)):p?(f=!1,c=IA(l)):c=[]:DE(l)||sd(l)?(c=s,sd(s)?c=OP(s):(!hr(s)||iv(s))&&(c=BA(l))):f=!1}f&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),w0(e,n,c)}function u5(e,t,n,r,i){e!==t&&l5(t,function(o,a){if(i||(i=new jr),hr(o))NP(e,t,a,n,u5,r,i);else{var s=r?r(C0(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),w0(e,a,s)}},V2)}function LP(e,t){var n=-1,r=vs(e)?Array(e.length):[];return PP(e,function(i,o,a){r[++n]=t(i,o,a)}),r}function DP(e,t){var n=fr(e)?N2:LP;return n(e,MP(t))}var ec=uT(function(e,t,n){u5(e,t,n)}),HP="Expected a function";function jh(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(HP);return hr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),IP(e,t,{leading:r,maxWait:t,trailing:i})}function _u(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=$t(oa,null)||{},r=pe(()=>{var i,o;return(o=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&o!==void 0?o:T9[e]});return{dateLocaleRef:pe(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:lM}),localeRef:r}}const Hl="naive-ui-style";function co(e,t,n){if(!t)return;const r=uo(),i=pe(()=>{const{value:s}=t;if(!s)return;const l=s[e];if(l)return l}),o=$t(oa,null),a=()=>{xr(()=>{const{value:s}=n,l=`${s}${e}Rtl`;if(nk(l,r))return;const{value:u}=i;u&&u.style.mount({id:l,head:!0,anchorMetaName:Hl,props:{bPrefix:s?`.${s}-`:void 0},ssr:r,parent:o==null?void 0:o.styleMountTarget})})};return r?a():hf(a),i}const ca={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:UP,fontFamily:jP,lineHeight:WP}=ca,c5=ce("body",`
|
|
30
|
+
</style>`}function zk(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(Rk(e,t)))}const Fk=typeof document<"u";function uo(){if(Fk)return;const e=$t(Pk,null);if(e!==null)return{adapter:(t,n)=>zk(t,n,e),context:e}}function Gm(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:Nr}=n2(),Cd="vueuc-style";function Ym(e){return e&-e}class w2{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=Ym(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let o=t*r;for(;t>0;)o+=n[t],t-=Ym(t);return o}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),o=this.sum(i);if(o>t){r=i;continue}else if(o<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function Xm(e){return typeof e=="string"?document.querySelector(e):e()}const Ik=Fe({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:_k(et(e,"show")),mergedTo:pe(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?d0("lazy-teleport",this.$slots):k(S$,{disabled:this.disabled,to:this.mergedTo},d0("lazy-teleport",this.$slots)):null}}),Yu={top:"bottom",bottom:"top",left:"right",right:"left"},Km={start:"end",center:"center",end:"start"},Rh={top:"height",bottom:"height",left:"width",right:"width"},Bk={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Ok={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},Nk={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Zm={top:!0,bottom:!1,left:!0,right:!1},Jm={top:"end",bottom:"start",left:"end",right:"start"};function Lk(e,t,n,r,i,o){if(!i||o)return{placement:e,top:0,left:0};const[a,s]=e.split("-");let l=s??"center",u={top:0,left:0};const c=(h,p,g)=>{let b=0,v=0;const x=n[h]-t[p]-t[h];return x>0&&r&&(g?v=Zm[p]?x:-x:b=Zm[p]?x:-x),{left:b,top:v}},d=a==="left"||a==="right";if(l!=="center"){const h=Nk[e],p=Yu[h],g=Rh[h];if(n[g]>t[g]){if(t[h]+t[g]<n[g]){const b=(n[g]-t[g])/2;t[h]<b||t[p]<b?t[h]<t[p]?(l=Km[s],u=c(g,p,d)):u=c(g,h,d):l="center"}}else n[g]<t[g]&&t[p]<0&&t[h]>t[p]&&(l=Km[s])}else{const h=a==="bottom"||a==="top"?"left":"top",p=Yu[h],g=Rh[h],b=(n[g]-t[g])/2;(t[h]<b||t[p]<b)&&(t[h]>t[p]?(l=Jm[h],u=c(g,h,d)):(l=Jm[p],u=c(g,p,d)))}let f=a;return t[a]<n[Rh[a]]&&t[a]<t[Yu[a]]&&(f=Yu[a]),{placement:l!=="center"?`${f}-${l}`:f,left:u.left,top:u.top}}function Dk(e,t){return t?Ok[e]:Bk[e]}function Hk(e,t,n,r,i,o){if(o)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const Uk=Nr([Nr(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),Nr(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[Nr("> *",{pointerEvents:"all"})])]),Sd=Fe({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=$t("VBinder"),n=Ht(()=>e.enabled!==void 0?e.enabled:e.show),r=ne(null),i=ne(null),o=()=>{const{syncTrigger:f}=e;f.includes("scroll")&&t.addScrollListener(l),f.includes("resize")&&t.addResizeListener(l)},a=()=>{t.removeScrollListener(l),t.removeResizeListener(l)};dn(()=>{n.value&&(l(),o())});const s=uo();Uk.mount({id:"vueuc/binder",head:!0,anchorMetaName:Cd,ssr:s}),Bn(()=>{a()}),h2(()=>{n.value&&l()});const l=()=>{if(!n.value)return;const f=r.value;if(f===null)return;const h=t.targetRef,{x:p,y:g,overlap:b}=e,v=p!==void 0&&g!==void 0?kk(p,g):Ah(h);f.style.setProperty("--v-target-width",`${Math.round(v.width)}px`),f.style.setProperty("--v-target-height",`${Math.round(v.height)}px`);const{width:x,minWidth:y,placement:_,internalShift:S,flip:$}=e;f.setAttribute("v-placement",_),b?f.setAttribute("v-overlap",""):f.removeAttribute("v-overlap");const{style:w}=f;x==="target"?w.width=`${v.width}px`:x!==void 0?w.width=x:w.width="",y==="target"?w.minWidth=`${v.width}px`:y!==void 0?w.minWidth=y:w.minWidth="";const T=Ah(f),M=Ah(i.value),{left:P,top:R,placement:C}=Lk(_,v,T,S,$,b),E=Dk(C,b),{left:F,top:z,transform:j}=Hk(C,M,v,R,P,b);f.setAttribute("v-placement",C),f.style.setProperty("--v-offset-left",`${Math.round(P)}px`),f.style.setProperty("--v-offset-top",`${Math.round(R)}px`),f.style.transform=`translateX(${F}) translateY(${z}) ${j}`,f.style.setProperty("--v-transform-origin",E),f.style.transformOrigin=E};vt(n,f=>{f?(o(),u()):a()});const u=()=>{fn().then(l).catch(f=>console.error(f))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(f=>{vt(et(e,f),l)}),["teleportDisabled"].forEach(f=>{vt(et(e,f),u)}),vt(et(e,"syncTrigger"),f=>{f.includes("resize")?t.addResizeListener(l):t.removeResizeListener(l),f.includes("scroll")?t.addScrollListener(l):t.removeScrollListener(l)});const c=gs(),d=Ht(()=>{const{to:f}=e;if(f!==void 0)return f;c.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:d,syncPosition:l}},render(){return k(Ik,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=k("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[k("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?lo(n,[[x2,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var Lo=[],jk=function(){return Lo.some(function(e){return e.activeTargets.length>0})},Wk=function(){return Lo.some(function(e){return e.skippedTargets.length>0})},Qm="ResizeObserver loop completed with undelivered notifications.",Vk=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Qm}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Qm),window.dispatchEvent(e)},Nl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Nl||(Nl={}));var Do=function(e){return Object.freeze(e)},qk=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Do(this)}return e}(),C2=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Do(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),nv=function(e){return e instanceof SVGElement&&"getBBox"in e},S2=function(e){if(nv(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},e1=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Gk=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},_l=typeof window<"u"?window:{},Xu=new WeakMap,t1=/auto|scroll/,Yk=/^tb|vertical/,Xk=/msie|trident/i.test(_l.navigator&&_l.navigator.userAgent),Ar=function(e){return parseFloat(e||"0")},Ha=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new qk((n?t:e)||0,(n?e:t)||0)},n1=Do({devicePixelContentBoxSize:Ha(),borderBoxSize:Ha(),contentBoxSize:Ha(),contentRect:new C2(0,0,0,0)}),$2=function(e,t){if(t===void 0&&(t=!1),Xu.has(e)&&!t)return Xu.get(e);if(S2(e))return Xu.set(e,n1),n1;var n=getComputedStyle(e),r=nv(e)&&e.ownerSVGElement&&e.getBBox(),i=!Xk&&n.boxSizing==="border-box",o=Yk.test(n.writingMode||""),a=!r&&t1.test(n.overflowY||""),s=!r&&t1.test(n.overflowX||""),l=r?0:Ar(n.paddingTop),u=r?0:Ar(n.paddingRight),c=r?0:Ar(n.paddingBottom),d=r?0:Ar(n.paddingLeft),f=r?0:Ar(n.borderTopWidth),h=r?0:Ar(n.borderRightWidth),p=r?0:Ar(n.borderBottomWidth),g=r?0:Ar(n.borderLeftWidth),b=d+u,v=l+c,x=g+h,y=f+p,_=s?e.offsetHeight-y-e.clientHeight:0,S=a?e.offsetWidth-x-e.clientWidth:0,$=i?b+x:0,w=i?v+y:0,T=r?r.width:Ar(n.width)-$-S,M=r?r.height:Ar(n.height)-w-_,P=T+b+S+x,R=M+v+_+y,C=Do({devicePixelContentBoxSize:Ha(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Ha(P,R,o),contentBoxSize:Ha(T,M,o),contentRect:new C2(d,l,T,M)});return Xu.set(e,C),C},k2=function(e,t,n){var r=$2(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Nl.DEVICE_PIXEL_CONTENT_BOX:return a;case Nl.BORDER_BOX:return i;default:return o}},Kk=function(){function e(t){var n=$2(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Do([n.borderBoxSize]),this.contentBoxSize=Do([n.contentBoxSize]),this.devicePixelContentBoxSize=Do([n.devicePixelContentBoxSize])}return e}(),M2=function(e){if(S2(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Zk=function(){var e=1/0,t=[];Lo.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(s){var l=new Kk(s.target),u=M2(s.target);a.push(l),s.lastReportedSize=k2(s.target,s.observedBox),u<e&&(e=u)}),t.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},r1=function(e){Lo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(M2(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Jk=function(){var e=0;for(r1(e);jk();)e=Zk(),r1(e);return Wk()&&Vk(),e>0},zh,T2=[],Qk=function(){return T2.splice(0).forEach(function(e){return e()})},e9=function(e){if(!zh){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Qk()}).observe(n,r),zh=function(){n.textContent="".concat(t?t--:t++)}}T2.push(e),zh()},t9=function(e){e9(function(){requestAnimationFrame(e)})},Pc=0,n9=function(){return!!Pc},r9=250,i9={attributes:!0,characterData:!0,childList:!0,subtree:!0},i1=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],o1=function(e){return e===void 0&&(e=0),Date.now()+e},Fh=!1,o9=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=r9),!Fh){Fh=!0;var r=o1(t);t9(function(){var i=!1;try{i=Jk()}finally{if(Fh=!1,t=r-o1(),!n9())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,i9)};document.body?n():_l.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),i1.forEach(function(n){return _l.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),i1.forEach(function(n){return _l.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),p0=new o9,a1=function(e){!Pc&&e>0&&p0.start(),Pc+=e,!Pc&&p0.stop()},a9=function(e){return!nv(e)&&!Gk(e)&&getComputedStyle(e).display==="inline"},s9=function(){function e(t,n){this.target=t,this.observedBox=n||Nl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=k2(this.target,this.observedBox,!0);return a9(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),l9=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Ku=new WeakMap,s1=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Zu=function(){function e(){}return e.connect=function(t,n){var r=new l9(t,n);Ku.set(t,r)},e.observe=function(t,n,r){var i=Ku.get(t),o=i.observationTargets.length===0;s1(i.observationTargets,n)<0&&(o&&Lo.push(i),i.observationTargets.push(new s9(n,r&&r.box)),a1(1),p0.schedule())},e.unobserve=function(t,n){var r=Ku.get(t),i=s1(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Lo.splice(Lo.indexOf(r),1),r.observationTargets.splice(i,1),a1(-1))},e.disconnect=function(t){var n=this,r=Ku.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),u9=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Zu.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!e1(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!e1(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Zu.unobserve(this,t)},e.prototype.disconnect=function(){Zu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class c9{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||u9)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const rf=new c9,Wi=Fe({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=ps().proxy;function r(i){const{onResize:o}=e;o!==void 0&&o(i)}dn(()=>{const i=n.$el;if(i===void 0){Gm("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){Gm("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(rf.registerHandler(i.nextElementSibling,r),t=!0)}),Bn(()=>{t&&rf.unregisterHandler(n.$el.nextElementSibling)})},render(){return qg(this.$slots,"default")}});let Ju;function f9(){return typeof document>"u"?!1:(Ju===void 0&&("matchMedia"in window?Ju=window.matchMedia("(pointer:coarse)").matches:Ju=!1),Ju)}let Ih;function l1(){return typeof document>"u"?1:(Ih===void 0&&(Ih="chrome"in window?window.devicePixelRatio:1),Ih)}const E2="VVirtualListXScroll";function d9({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const r=ne(0),i=ne(0),o=pe(()=>{const u=e.value;if(u.length===0)return null;const c=new w2(u.length,0);return u.forEach((d,f)=>{c.add(f,d.width)}),c}),a=Ht(()=>{const u=o.value;return u!==null?Math.max(u.getBound(i.value)-1,0):0}),s=u=>{const c=o.value;return c!==null?c.sum(u):0},l=Ht(()=>{const u=o.value;return u!==null?Math.min(u.getBound(i.value+r.value)+1,e.value.length-1):0});return jn(E2,{startIndexRef:a,endIndexRef:l,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:s}),{listWidthRef:r,scrollLeftRef:i}}const u1=Fe({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:o}=$t(E2);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:o,getLeft:r}},render(){const{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:o,item:a}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:a,getLeft:o});if(r!=null){const s=[];for(let l=e;l<=t;++l){const u=n[l];s.push(r({column:u,left:o(l),item:a}))}return s}return null}}),h9=Nr(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Nr("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),p9=Fe({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=uo();h9.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Cd,ssr:t}),dn(()=>{const{defaultScrollIndex:E,defaultScrollKey:F}=e;E!=null?b({index:E}):F!=null&&b({key:F})});let n=!1,r=!1;Wg(()=>{if(n=!1,!r){r=!0;return}b({top:h.value,left:a.value})}),Vg(()=>{n=!0,r||(r=!0)});const i=Ht(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let E=0;return e.columns.forEach(F=>{E+=F.width}),E}),o=pe(()=>{const E=new Map,{keyField:F}=e;return e.items.forEach((z,j)=>{E.set(z[F],j)}),E}),{scrollLeftRef:a,listWidthRef:s}=d9({columnsRef:et(e,"columns"),renderColRef:et(e,"renderCol"),renderItemWithColsRef:et(e,"renderItemWithCols")}),l=ne(null),u=ne(void 0),c=new Map,d=pe(()=>{const{items:E,itemSize:F,keyField:z}=e,j=new w2(E.length,F);return E.forEach((Z,J)=>{const ie=Z[z],he=c.get(ie);he!==void 0&&j.add(J,he)}),j}),f=ne(0),h=ne(0),p=Ht(()=>Math.max(d.value.getBound(h.value-kn(e.paddingTop))-1,0)),g=pe(()=>{const{value:E}=u;if(E===void 0)return[];const{items:F,itemSize:z}=e,j=p.value,Z=Math.min(j+Math.ceil(E/z+1),F.length-1),J=[];for(let ie=j;ie<=Z;++ie)J.push(F[ie]);return J}),b=(E,F)=>{if(typeof E=="number"){_(E,F,"auto");return}const{left:z,top:j,index:Z,key:J,position:ie,behavior:he,debounce:_e=!0}=E;if(z!==void 0||j!==void 0)_(z,j,he);else if(Z!==void 0)y(Z,he,_e);else if(J!==void 0){const oe=o.value.get(J);oe!==void 0&&y(oe,he,_e)}else ie==="bottom"?_(0,Number.MAX_SAFE_INTEGER,he):ie==="top"&&_(0,0,he)};let v,x=null;function y(E,F,z){const{value:j}=d,Z=j.sum(E)+kn(e.paddingTop);if(!z)l.value.scrollTo({left:0,top:Z,behavior:F});else{v=E,x!==null&&window.clearTimeout(x),x=window.setTimeout(()=>{v=void 0,x=null},16);const{scrollTop:J,offsetHeight:ie}=l.value;if(Z>J){const he=j.get(E);Z+he<=J+ie||l.value.scrollTo({left:0,top:Z+he-ie,behavior:F})}else l.value.scrollTo({left:0,top:Z,behavior:F})}}function _(E,F,z){l.value.scrollTo({left:E,top:F,behavior:z})}function S(E,F){var z,j,Z;if(n||e.ignoreItemResize||C(F.target))return;const{value:J}=d,ie=o.value.get(E),he=J.get(ie),_e=(Z=(j=(z=F.borderBoxSize)===null||z===void 0?void 0:z[0])===null||j===void 0?void 0:j.blockSize)!==null&&Z!==void 0?Z:F.contentRect.height;if(_e===he)return;_e-e.itemSize===0?c.delete(E):c.set(E,_e-e.itemSize);const oe=_e-he;if(oe===0)return;J.add(ie,oe);const ve=l.value;if(ve!=null){if(v===void 0){const we=J.sum(ie);ve.scrollTop>we&&ve.scrollBy(0,oe)}else if(ie<v)ve.scrollBy(0,oe);else if(ie===v){const we=J.sum(ie);_e+we>ve.scrollTop+ve.offsetHeight&&ve.scrollBy(0,oe)}R()}f.value++}const $=!f9();let w=!1;function T(E){var F;(F=e.onScroll)===null||F===void 0||F.call(e,E),(!$||!w)&&R()}function M(E){var F;if((F=e.onWheel)===null||F===void 0||F.call(e,E),$){const z=l.value;if(z!=null){if(E.deltaX===0&&(z.scrollTop===0&&E.deltaY<=0||z.scrollTop+z.offsetHeight>=z.scrollHeight&&E.deltaY>=0))return;E.preventDefault(),z.scrollTop+=E.deltaY/l1(),z.scrollLeft+=E.deltaX/l1(),R(),w=!0,a2(()=>{w=!1})}}}function P(E){if(n||C(E.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(E.contentRect.height===u.value)return}else if(E.contentRect.height===u.value&&E.contentRect.width===s.value)return;u.value=E.contentRect.height,s.value=E.contentRect.width;const{onResize:F}=e;F!==void 0&&F(E)}function R(){const{value:E}=l;E!=null&&(h.value=E.scrollTop,a.value=E.scrollLeft)}function C(E){let F=E;for(;F!==null;){if(F.style.display==="none")return!0;F=F.parentElement}return!1}return{listHeight:u,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:pe(()=>{const{itemResizable:E}=e,F=Bi(d.value.sum());return f.value,[e.itemsStyle,{boxSizing:"content-box",width:Bi(i.value),height:E?"":F,minHeight:E?F:"",paddingTop:Bi(e.paddingTop),paddingBottom:Bi(e.paddingBottom)}]}),visibleItemsStyle:pe(()=>(f.value,{transform:`translateY(${Bi(d.value.sum(p.value))})`})),viewportItems:g,listElRef:l,itemsElRef:ne(null),scrollTo:b,handleListResize:P,handleListScroll:T,handleListWheel:M,handleItemResize:S}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return k(Wi,{onResize:this.handleListResize},{default:()=>{var i,o;return k("div",ia(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?k("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[k(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:a,renderItemWithCols:s}=this;return this.viewportItems.map(l=>{const u=l[t],c=n.get(u),d=a!=null?k(u1,{index:c,item:l}):void 0,f=s!=null?k(u1,{index:c,item:l}):void 0,h=this.$slots.default({item:l,renderedCols:d,renderedItemWithCols:f,index:c})[0];return e?k(Wi,{key:u,onResize:p=>this.handleItemResize(u,p)},{default:()=>h}):(h.key=u,h)})}})]):(o=(i=this.$slots).empty)===null||o===void 0?void 0:o.call(i)])}})}}),g9=Nr(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[Nr("&::-webkit-scrollbar",{width:0,height:0})]),v9=Fe({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=ne(null);function t(r){!(r.currentTarget.offsetWidth<r.currentTarget.scrollWidth)||r.deltaY===0||(r.currentTarget.scrollLeft+=r.deltaY+r.deltaX,r.preventDefault())}const n=uo();return g9.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Cd,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...r){var i;(i=e.value)===null||i===void 0||i.scrollTo(...r)}})},render(){return k("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),Qr="v-hidden",b9=Nr("[v-hidden]",{display:"none!important"}),c1=Fe({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=ne(null),r=ne(null);function i(a){const{value:s}=n,{getCounter:l,getTail:u}=e;let c;if(l!==void 0?c=l():c=r.value,!s||!c)return;c.hasAttribute(Qr)&&c.removeAttribute(Qr);const{children:d}=s;if(a.showAllItemsBeforeCalculate)for(const y of d)y.hasAttribute(Qr)&&y.removeAttribute(Qr);const f=s.offsetWidth,h=[],p=t.tail?u==null?void 0:u():null;let g=p?p.offsetWidth:0,b=!1;const v=s.children.length-(t.tail?1:0);for(let y=0;y<v-1;++y){if(y<0)continue;const _=d[y];if(b){_.hasAttribute(Qr)||_.setAttribute(Qr,"");continue}else _.hasAttribute(Qr)&&_.removeAttribute(Qr);const S=_.offsetWidth;if(g+=S,h[y]=S,g>f){const{updateCounter:$}=e;for(let w=y;w>=0;--w){const T=v-1-w;$!==void 0?$(T):c.textContent=`${T}`;const M=c.offsetWidth;if(g-=h[w],g+M<=f||w===0){b=!0,y=w-1,p&&(y===-1?(p.style.maxWidth=`${f-M}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:P}=e;P&&P(T);break}}}}const{onUpdateOverflow:x}=e;b?x!==void 0&&x(!0):(x!==void 0&&x(!1),c.setAttribute(Qr,""))}const o=uo();return b9.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Cd,ssr:o}),dn(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return fn(()=>this.sync({showAllItemsBeforeCalculate:!1})),k("div",{class:"v-overflow",ref:"selfRef"},[qg(e,"default"),e.counter?e.counter():k("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function A2(e){return e instanceof HTMLElement}function P2(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(A2(n)&&(z2(n)||P2(n)))return!0}return!1}function R2(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(A2(n)&&(z2(n)||R2(n)))return!0}return!1}function z2(e){if(!m9(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function m9(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Ms=[];const y9=Fe({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=pk(),n=ne(null),r=ne(null);let i=!1,o=!1;const a=typeof document>"u"?null:document.activeElement;function s(){return Ms[Ms.length-1]===t}function l(b){var v;b.code==="Escape"&&s()&&((v=e.onEsc)===null||v===void 0||v.call(e,b))}dn(()=>{vt(()=>e.active,b=>{b?(d(),Mt("keydown",document,l)):(St("keydown",document,l),i&&f())},{immediate:!0})}),Bn(()=>{St("keydown",document,l),i&&f()});function u(b){if(!o&&s()){const v=c();if(v===null||v.contains(Qa(b)))return;h("first")}}function c(){const b=n.value;if(b===null)return null;let v=b;for(;v=v.nextSibling,!(v===null||v instanceof Element&&v.tagName==="DIV"););return v}function d(){var b;if(!e.disabled){if(Ms.push(t),e.autoFocus){const{initialFocusTo:v}=e;v===void 0?h("first"):(b=Xm(v))===null||b===void 0||b.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",u,!0)}}function f(){var b;if(e.disabled||(document.removeEventListener("focus",u,!0),Ms=Ms.filter(x=>x!==t),s()))return;const{finalFocusTo:v}=e;v!==void 0?(b=Xm(v))===null||b===void 0||b.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&a instanceof HTMLElement&&(o=!0,a.focus({preventScroll:!0}),o=!1)}function h(b){if(s()&&e.active){const v=n.value,x=r.value;if(v!==null&&x!==null){const y=c();if(y==null||y===x){o=!0,v.focus({preventScroll:!0}),o=!1;return}o=!0;const _=b==="first"?P2(y):R2(y);o=!1,_||(o=!0,v.focus({preventScroll:!0}),o=!1)}}}function p(b){if(o)return;const v=c();v!==null&&(b.relatedTarget!==null&&v.contains(b.relatedTarget)?h("last"):h("first"))}function g(b){o||(b.relatedTarget!==null&&b.relatedTarget===n.value?h("last"):h("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:p,handleEndFocus:g}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return k(kt,null,[k("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),k("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function F2(e,t){t&&(dn(()=>{const{value:n}=e;n&&rf.registerHandler(n,t)}),Bn(()=>{const{value:n}=e;n&&rf.unregisterHandler(n)}))}function of(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const _9=/^(\d|\.)+$/,f1=/(\d|\.)+/;function Rc(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(_9.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=f1.exec(e);return i?e.replace(f1,String((Number(i[0])+n)*t)):e}return e}function d1(e){const{left:t,right:n,top:r,bottom:i}=Kn(e);return`${r} ${n} ${i} ${t}`}let Bh;function x9(){return Bh===void 0&&(Bh=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Bh}const w9=new WeakSet;function C9(e){w9.add(e)}function h1(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function af(e,t){console.error(`[naive/${e}]: ${t}`)}function I2(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Ye(e,...t){if(Array.isArray(e))e.forEach(n=>Ye(n,...t));else return e(...t)}function Ua(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(Wo(String(r)));return}if(Array.isArray(r)){Ua(r,t,n);return}if(r.type===kt){if(r.children===null)return;Array.isArray(r.children)&&Ua(r.children,t,n)}else{if(r.type===sn&&t)return;n.push(r)}}}),n}function p1(e,t="default",n=void 0){const r=e[t];if(!r)return af("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Ua(r(n));return i.length===1?i[0]:(af("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function S9(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function Oh(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}function $9(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(i=>{t.includes(i)||(r[i]=e[i])}),Object.assign(r,n)}function Fo(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?Wo(e):typeof e=="number"?Wo(String(e)):null}function mu(e){return e.some(t=>Il(t)?!(t.type===sn||t.type===kt&&!mu(t.children)):!0)?e:null}function Ur(e,t){return e&&mu(e())||t()}function k9(e,t,n){return e&&mu(e(t))||n(t)}function Bt(e,t){const n=e&&mu(e());return t(n||null)}function ja(e){return!(e&&mu(e()))}const g0=Fe({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),oa="n-config-provider",M9="n";function rn(e={},t={defaultBordered:!0}){const n=$t(oa,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:pe(()=>{var r,i;const{bordered:o}=e;return o!==void 0?o:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:DS(M9),namespaceRef:pe(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function Cn(e,t,n,r){n||I2("useThemeClass","cssVarsRef is not passed");const i=$t(oa,null),o=i==null?void 0:i.mergedThemeHashRef,a=i==null?void 0:i.styleMountTarget,s=ne(""),l=uo();let u;const c=`__${e}`,d=()=>{let f=c;const h=t?t.value:void 0,p=o==null?void 0:o.value;p&&(f+=`-${p}`),h&&(f+=`-${h}`);const{themeOverrides:g,builtinThemeOverrides:b}=r;g&&(f+=`-${o0(JSON.stringify(g))}`),b&&(f+=`-${o0(JSON.stringify(b))}`),s.value=f,u=()=>{const v=n.value;let x="";for(const y in v)x+=`${y}: ${v[y]};`;ce(`.${f}`,x).mount({id:f,ssr:l,parent:a}),u=void 0}};return xr(()=>{d()}),{themeClass:s,onRender:()=>{u==null||u()}}}const g1="n-form-item";function aa(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=$t(g1,null);jn(g1,null);const o=pe(n?()=>n(i):()=>{const{size:l}=e;if(l)return l;if(i){const{mergedSize:u}=i;if(u.value!==void 0)return u.value}return t}),a=pe(r?()=>r(i):()=>{const{disabled:l}=e;return l!==void 0?l:i?i.disabled.value:!1}),s=pe(()=>{const{status:l}=e;return l||(i==null?void 0:i.mergedValidationStatus.value)});return Bn(()=>{i&&i.restoreValidation()}),{mergedSizeRef:o,mergedDisabledRef:a,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}const T9={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Nh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Ts(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}function Es(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?A9(s,d=>d.test(a)):E9(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(a.length);return{value:u,rest:c}}}function E9(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function A9(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function P9(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const R9={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z9=(e,t,n)=>{let r;const i=R9[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},F9={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},I9=(e,t,n,r)=>F9[e],B9={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},O9={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},N9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},L9={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},D9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},H9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},U9=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},j9={ordinalNumber:U9,era:Ts({values:B9,defaultWidth:"wide"}),quarter:Ts({values:O9,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ts({values:N9,defaultWidth:"wide"}),day:Ts({values:L9,defaultWidth:"wide"}),dayPeriod:Ts({values:D9,defaultWidth:"wide",formattingValues:H9,defaultFormattingWidth:"wide"})},W9=/^(\d+)(th|st|nd|rd)?/i,V9=/\d+/i,q9={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},G9={any:[/^b/i,/^(a|c)/i]},Y9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},X9={any:[/1/i,/2/i,/3/i,/4/i]},K9={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Z9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J9={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Q9={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eM={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tM={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nM={ordinalNumber:P9({matchPattern:W9,parsePattern:V9,valueCallback:e=>parseInt(e,10)}),era:Es({matchPatterns:q9,defaultMatchWidth:"wide",parsePatterns:G9,defaultParseWidth:"any"}),quarter:Es({matchPatterns:Y9,defaultMatchWidth:"wide",parsePatterns:X9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Es({matchPatterns:K9,defaultMatchWidth:"wide",parsePatterns:Z9,defaultParseWidth:"any"}),day:Es({matchPatterns:J9,defaultMatchWidth:"wide",parsePatterns:Q9,defaultParseWidth:"any"}),dayPeriod:Es({matchPatterns:eM,defaultMatchWidth:"any",parsePatterns:tM,defaultParseWidth:"any"})},rM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},oM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aM={date:Nh({formats:rM,defaultWidth:"full"}),time:Nh({formats:iM,defaultWidth:"full"}),dateTime:Nh({formats:oM,defaultWidth:"full"})},sM={code:"en-US",formatDistance:z9,formatLong:aM,formatRelative:I9,localize:j9,match:nM,options:{weekStartsOn:0,firstWeekContainsDate:1}},lM={name:"en-US",locale:sM};var B2=typeof global=="object"&&global&&global.Object===Object&&global,uM=typeof self=="object"&&self&&self.Object===Object&&self,kr=B2||uM||Function("return this")(),Xi=kr.Symbol,O2=Object.prototype,cM=O2.hasOwnProperty,fM=O2.toString,As=Xi?Xi.toStringTag:void 0;function dM(e){var t=cM.call(e,As),n=e[As];try{e[As]=void 0;var r=!0}catch{}var i=fM.call(e);return r&&(t?e[As]=n:delete e[As]),i}var hM=Object.prototype,pM=hM.toString;function gM(e){return pM.call(e)}var vM="[object Null]",bM="[object Undefined]",v1=Xi?Xi.toStringTag:void 0;function sa(e){return e==null?e===void 0?bM:vM:v1&&v1 in Object(e)?dM(e):gM(e)}function Ki(e){return e!=null&&typeof e=="object"}var mM="[object Symbol]";function $d(e){return typeof e=="symbol"||Ki(e)&&sa(e)==mM}function N2(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var dr=Array.isArray,b1=Xi?Xi.prototype:void 0,m1=b1?b1.toString:void 0;function L2(e){if(typeof e=="string")return e;if(dr(e))return N2(e,L2)+"";if($d(e))return m1?m1.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var yM=/\s/;function _M(e){for(var t=e.length;t--&&yM.test(e.charAt(t)););return t}var xM=/^\s+/;function wM(e){return e&&e.slice(0,_M(e)+1).replace(xM,"")}function hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var y1=NaN,CM=/^[-+]0x[0-9a-f]+$/i,SM=/^0b[01]+$/i,$M=/^0o[0-7]+$/i,kM=parseInt;function _1(e){if(typeof e=="number")return e;if($d(e))return y1;if(hr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wM(e);var n=SM.test(e);return n||$M.test(e)?kM(e.slice(2),n?2:8):CM.test(e)?y1:+e}function rv(e){return e}var MM="[object AsyncFunction]",TM="[object Function]",EM="[object GeneratorFunction]",AM="[object Proxy]";function iv(e){if(!hr(e))return!1;var t=sa(e);return t==TM||t==EM||t==MM||t==AM}var Lh=kr["__core-js_shared__"],x1=function(){var e=/[^.]+$/.exec(Lh&&Lh.keys&&Lh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function PM(e){return!!x1&&x1 in e}var RM=Function.prototype,zM=RM.toString;function la(e){if(e!=null){try{return zM.call(e)}catch{}try{return e+""}catch{}}return""}var FM=/[\\^$.*+?()[\]{}|]/g,IM=/^\[object .+?Constructor\]$/,BM=Function.prototype,OM=Object.prototype,NM=BM.toString,LM=OM.hasOwnProperty,DM=RegExp("^"+NM.call(LM).replace(FM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HM(e){if(!hr(e)||PM(e))return!1;var t=iv(e)?DM:IM;return t.test(la(e))}function UM(e,t){return e==null?void 0:e[t]}function ua(e,t){var n=UM(e,t);return HM(n)?n:void 0}var v0=ua(kr,"WeakMap"),w1=Object.create,jM=function(){function e(){}return function(t){if(!hr(t))return{};if(w1)return w1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function WM(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function VM(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var qM=800,GM=16,YM=Date.now;function XM(e){var t=0,n=0;return function(){var r=YM(),i=GM-(r-n);if(n=r,i>0){if(++t>=qM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function KM(e){return function(){return e}}var sf=function(){try{var e=ua(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ZM=sf?function(e,t){return sf(e,"toString",{configurable:!0,enumerable:!1,value:KM(t),writable:!0})}:rv,JM=XM(ZM),QM=9007199254740991,eT=/^(?:0|[1-9]\d*)$/;function ov(e,t){var n=typeof e;return t=t??QM,!!t&&(n=="number"||n!="symbol"&&eT.test(e))&&e>-1&&e%1==0&&e<t}function av(e,t,n){t=="__proto__"&&sf?sf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yu(e,t){return e===t||e!==e&&t!==t}var tT=Object.prototype,nT=tT.hasOwnProperty;function rT(e,t,n){var r=e[t];(!(nT.call(e,t)&&yu(r,n))||n===void 0&&!(t in e))&&av(e,t,n)}function iT(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;l===void 0&&(l=e[s]),i?av(n,s,l):rT(n,s,l)}return n}var C1=Math.max;function oT(e,t,n){return t=C1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=C1(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),WM(e,this,s)}}function aT(e,t){return JM(oT(e,t,rv),e+"")}var sT=9007199254740991;function sv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sT}function vs(e){return e!=null&&sv(e.length)&&!iv(e)}function lT(e,t,n){if(!hr(n))return!1;var r=typeof t;return(r=="number"?vs(n)&&ov(t,n.length):r=="string"&&t in n)?yu(n[t],e):!1}function uT(e){return aT(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&lT(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var cT=Object.prototype;function lv(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cT;return e===n}function fT(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dT="[object Arguments]";function S1(e){return Ki(e)&&sa(e)==dT}var D2=Object.prototype,hT=D2.hasOwnProperty,pT=D2.propertyIsEnumerable,lf=S1(function(){return arguments}())?S1:function(e){return Ki(e)&&hT.call(e,"callee")&&!pT.call(e,"callee")};function gT(){return!1}var H2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$1=H2&&typeof module=="object"&&module&&!module.nodeType&&module,vT=$1&&$1.exports===H2,k1=vT?kr.Buffer:void 0,bT=k1?k1.isBuffer:void 0,uf=bT||gT,mT="[object Arguments]",yT="[object Array]",_T="[object Boolean]",xT="[object Date]",wT="[object Error]",CT="[object Function]",ST="[object Map]",$T="[object Number]",kT="[object Object]",MT="[object RegExp]",TT="[object Set]",ET="[object String]",AT="[object WeakMap]",PT="[object ArrayBuffer]",RT="[object DataView]",zT="[object Float32Array]",FT="[object Float64Array]",IT="[object Int8Array]",BT="[object Int16Array]",OT="[object Int32Array]",NT="[object Uint8Array]",LT="[object Uint8ClampedArray]",DT="[object Uint16Array]",HT="[object Uint32Array]",Ft={};Ft[zT]=Ft[FT]=Ft[IT]=Ft[BT]=Ft[OT]=Ft[NT]=Ft[LT]=Ft[DT]=Ft[HT]=!0;Ft[mT]=Ft[yT]=Ft[PT]=Ft[_T]=Ft[RT]=Ft[xT]=Ft[wT]=Ft[CT]=Ft[ST]=Ft[$T]=Ft[kT]=Ft[MT]=Ft[TT]=Ft[ET]=Ft[AT]=!1;function UT(e){return Ki(e)&&sv(e.length)&&!!Ft[sa(e)]}function jT(e){return function(t){return e(t)}}var U2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xl=U2&&typeof module=="object"&&module&&!module.nodeType&&module,WT=xl&&xl.exports===U2,Dh=WT&&B2.process,M1=function(){try{var e=xl&&xl.require&&xl.require("util").types;return e||Dh&&Dh.binding&&Dh.binding("util")}catch{}}(),T1=M1&&M1.isTypedArray,uv=T1?jT(T1):UT,VT=Object.prototype,qT=VT.hasOwnProperty;function j2(e,t){var n=dr(e),r=!n&&lf(e),i=!n&&!r&&uf(e),o=!n&&!r&&!i&&uv(e),a=n||r||i||o,s=a?fT(e.length,String):[],l=s.length;for(var u in e)(t||qT.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ov(u,l)))&&s.push(u);return s}function W2(e,t){return function(n){return e(t(n))}}var GT=W2(Object.keys,Object),YT=Object.prototype,XT=YT.hasOwnProperty;function KT(e){if(!lv(e))return GT(e);var t=[];for(var n in Object(e))XT.call(e,n)&&n!="constructor"&&t.push(n);return t}function cv(e){return vs(e)?j2(e):KT(e)}function ZT(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var JT=Object.prototype,QT=JT.hasOwnProperty;function eE(e){if(!hr(e))return ZT(e);var t=lv(e),n=[];for(var r in e)r=="constructor"&&(t||!QT.call(e,r))||n.push(r);return n}function V2(e){return vs(e)?j2(e,!0):eE(e)}var tE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nE=/^\w*$/;function fv(e,t){if(dr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||$d(e)?!0:nE.test(e)||!tE.test(e)||t!=null&&e in Object(t)}var Ll=ua(Object,"create");function rE(){this.__data__=Ll?Ll(null):{},this.size=0}function iE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oE="__lodash_hash_undefined__",aE=Object.prototype,sE=aE.hasOwnProperty;function lE(e){var t=this.__data__;if(Ll){var n=t[e];return n===oE?void 0:n}return sE.call(t,e)?t[e]:void 0}var uE=Object.prototype,cE=uE.hasOwnProperty;function fE(e){var t=this.__data__;return Ll?t[e]!==void 0:cE.call(t,e)}var dE="__lodash_hash_undefined__";function hE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ll&&t===void 0?dE:t,this}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vo.prototype.clear=rE;Vo.prototype.delete=iE;Vo.prototype.get=lE;Vo.prototype.has=fE;Vo.prototype.set=hE;function pE(){this.__data__=[],this.size=0}function kd(e,t){for(var n=e.length;n--;)if(yu(e[n][0],t))return n;return-1}var gE=Array.prototype,vE=gE.splice;function bE(e){var t=this.__data__,n=kd(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():vE.call(t,n,1),--this.size,!0}function mE(e){var t=this.__data__,n=kd(t,e);return n<0?void 0:t[n][1]}function yE(e){return kd(this.__data__,e)>-1}function _E(e,t){var n=this.__data__,r=kd(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yi.prototype.clear=pE;yi.prototype.delete=bE;yi.prototype.get=mE;yi.prototype.has=yE;yi.prototype.set=_E;var Dl=ua(kr,"Map");function xE(){this.size=0,this.__data__={hash:new Vo,map:new(Dl||yi),string:new Vo}}function wE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Md(e,t){var n=e.__data__;return wE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function CE(e){var t=Md(this,e).delete(e);return this.size-=t?1:0,t}function SE(e){return Md(this,e).get(e)}function $E(e){return Md(this,e).has(e)}function kE(e,t){var n=Md(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function _i(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_i.prototype.clear=xE;_i.prototype.delete=CE;_i.prototype.get=SE;_i.prototype.has=$E;_i.prototype.set=kE;var ME="Expected a function";function dv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ME);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(dv.Cache||_i),n}dv.Cache=_i;var TE=500;function EE(e){var t=dv(e,function(r){return n.size===TE&&n.clear(),r}),n=t.cache;return t}var AE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PE=/\\(\\)?/g,RE=EE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AE,function(n,r,i,o){t.push(i?o.replace(PE,"$1"):r||n)}),t});function q2(e){return e==null?"":L2(e)}function G2(e,t){return dr(e)?e:fv(e,t)?[e]:RE(q2(e))}function Td(e){if(typeof e=="string"||$d(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Y2(e,t){t=G2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Td(t[n++])];return n&&n==r?e:void 0}function zE(e,t,n){var r=e==null?void 0:Y2(e,t);return r===void 0?n:r}function FE(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var X2=W2(Object.getPrototypeOf,Object),IE="[object Object]",BE=Function.prototype,OE=Object.prototype,K2=BE.toString,NE=OE.hasOwnProperty,LE=K2.call(Object);function DE(e){if(!Ki(e)||sa(e)!=IE)return!1;var t=X2(e);if(t===null)return!0;var n=NE.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&K2.call(n)==LE}function HE(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function UE(e,t,n){var r=e.length;return n=n===void 0?r:n,HE(e,t,n)}var jE="\\ud800-\\udfff",WE="\\u0300-\\u036f",VE="\\ufe20-\\ufe2f",qE="\\u20d0-\\u20ff",GE=WE+VE+qE,YE="\\ufe0e\\ufe0f",XE="\\u200d",KE=RegExp("["+XE+jE+GE+YE+"]");function Z2(e){return KE.test(e)}function ZE(e){return e.split("")}var J2="\\ud800-\\udfff",JE="\\u0300-\\u036f",QE="\\ufe20-\\ufe2f",eA="\\u20d0-\\u20ff",tA=JE+QE+eA,nA="\\ufe0e\\ufe0f",rA="["+J2+"]",b0="["+tA+"]",m0="\\ud83c[\\udffb-\\udfff]",iA="(?:"+b0+"|"+m0+")",Q2="[^"+J2+"]",e5="(?:\\ud83c[\\udde6-\\uddff]){2}",t5="[\\ud800-\\udbff][\\udc00-\\udfff]",oA="\\u200d",n5=iA+"?",r5="["+nA+"]?",aA="(?:"+oA+"(?:"+[Q2,e5,t5].join("|")+")"+r5+n5+")*",sA=r5+n5+aA,lA="(?:"+[Q2+b0+"?",b0,e5,t5,rA].join("|")+")",uA=RegExp(m0+"(?="+m0+")|"+lA+sA,"g");function cA(e){return e.match(uA)||[]}function fA(e){return Z2(e)?cA(e):ZE(e)}function dA(e){return function(t){t=q2(t);var n=Z2(t)?fA(t):void 0,r=n?n[0]:t.charAt(0),i=n?UE(n,1).join(""):t.slice(1);return r[e]()+i}}var hA=dA("toUpperCase");function pA(){this.__data__=new yi,this.size=0}function gA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vA(e){return this.__data__.get(e)}function bA(e){return this.__data__.has(e)}var mA=200;function yA(e,t){var n=this.__data__;if(n instanceof yi){var r=n.__data__;if(!Dl||r.length<mA-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _i(r)}return n.set(e,t),this.size=n.size,this}function jr(e){var t=this.__data__=new yi(e);this.size=t.size}jr.prototype.clear=pA;jr.prototype.delete=gA;jr.prototype.get=vA;jr.prototype.has=bA;jr.prototype.set=yA;var i5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,E1=i5&&typeof module=="object"&&module&&!module.nodeType&&module,_A=E1&&E1.exports===i5,A1=_A?kr.Buffer:void 0;A1&&A1.allocUnsafe;function xA(e,t){return e.slice()}function wA(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function CA(){return[]}var SA=Object.prototype,$A=SA.propertyIsEnumerable,P1=Object.getOwnPropertySymbols,kA=P1?function(e){return e==null?[]:(e=Object(e),wA(P1(e),function(t){return $A.call(e,t)}))}:CA;function MA(e,t,n){var r=t(e);return dr(e)?r:FE(r,n(e))}function R1(e){return MA(e,cv,kA)}var y0=ua(kr,"DataView"),_0=ua(kr,"Promise"),x0=ua(kr,"Set"),z1="[object Map]",TA="[object Object]",F1="[object Promise]",I1="[object Set]",B1="[object WeakMap]",O1="[object DataView]",EA=la(y0),AA=la(Dl),PA=la(_0),RA=la(x0),zA=la(v0),Pi=sa;(y0&&Pi(new y0(new ArrayBuffer(1)))!=O1||Dl&&Pi(new Dl)!=z1||_0&&Pi(_0.resolve())!=F1||x0&&Pi(new x0)!=I1||v0&&Pi(new v0)!=B1)&&(Pi=function(e){var t=sa(e),n=t==TA?e.constructor:void 0,r=n?la(n):"";if(r)switch(r){case EA:return O1;case AA:return z1;case PA:return F1;case RA:return I1;case zA:return B1}return t});var cf=kr.Uint8Array;function FA(e){var t=new e.constructor(e.byteLength);return new cf(t).set(new cf(e)),t}function IA(e,t){var n=FA(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function BA(e){return typeof e.constructor=="function"&&!lv(e)?jM(X2(e)):{}}var OA="__lodash_hash_undefined__";function NA(e){return this.__data__.set(e,OA),this}function LA(e){return this.__data__.has(e)}function ff(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _i;++t<n;)this.add(e[t])}ff.prototype.add=ff.prototype.push=NA;ff.prototype.has=LA;function DA(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function HA(e,t){return e.has(t)}var UA=1,jA=2;function o5(e,t,n,r,i,o){var a=n&UA,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&jA?new ff:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],g=t[d];if(r)var b=a?r(g,p,d,t,e,o):r(p,g,d,e,t,o);if(b!==void 0){if(b)continue;f=!1;break}if(h){if(!DA(t,function(v,x){if(!HA(h,x)&&(p===v||i(p,v,n,r,o)))return h.push(x)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(e),o.delete(t),f}function WA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function VA(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var qA=1,GA=2,YA="[object Boolean]",XA="[object Date]",KA="[object Error]",ZA="[object Map]",JA="[object Number]",QA="[object RegExp]",eP="[object Set]",tP="[object String]",nP="[object Symbol]",rP="[object ArrayBuffer]",iP="[object DataView]",N1=Xi?Xi.prototype:void 0,Hh=N1?N1.valueOf:void 0;function oP(e,t,n,r,i,o,a){switch(n){case iP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rP:return!(e.byteLength!=t.byteLength||!o(new cf(e),new cf(t)));case YA:case XA:case JA:return yu(+e,+t);case KA:return e.name==t.name&&e.message==t.message;case QA:case tP:return e==t+"";case ZA:var s=WA;case eP:var l=r&qA;if(s||(s=VA),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=GA,a.set(e,t);var c=o5(s(e),s(t),r,i,o,a);return a.delete(e),c;case nP:if(Hh)return Hh.call(e)==Hh.call(t)}return!1}var aP=1,sP=Object.prototype,lP=sP.hasOwnProperty;function uP(e,t,n,r,i,o){var a=n&aP,s=R1(e),l=s.length,u=R1(t),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:lP.call(t,f)))return!1}var h=o.get(e),p=o.get(t);if(h&&p)return h==t&&p==e;var g=!0;o.set(e,t),o.set(t,e);for(var b=a;++d<l;){f=s[d];var v=e[f],x=t[f];if(r)var y=a?r(x,v,f,t,e,o):r(v,x,f,e,t,o);if(!(y===void 0?v===x||i(v,x,n,r,o):y)){g=!1;break}b||(b=f=="constructor")}if(g&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(e),o.delete(t),g}var cP=1,L1="[object Arguments]",D1="[object Array]",Qu="[object Object]",fP=Object.prototype,H1=fP.hasOwnProperty;function dP(e,t,n,r,i,o){var a=dr(e),s=dr(t),l=a?D1:Pi(e),u=s?D1:Pi(t);l=l==L1?Qu:l,u=u==L1?Qu:u;var c=l==Qu,d=u==Qu,f=l==u;if(f&&uf(e)){if(!uf(t))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new jr),a||uv(e)?o5(e,t,n,r,i,o):oP(e,t,l,n,r,i,o);if(!(n&cP)){var h=c&&H1.call(e,"__wrapped__"),p=d&&H1.call(t,"__wrapped__");if(h||p){var g=h?e.value():e,b=p?t.value():t;return o||(o=new jr),i(g,b,n,r,o)}}return f?(o||(o=new jr),uP(e,t,n,r,i,o)):!1}function hv(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ki(e)&&!Ki(t)?e!==e&&t!==t:dP(e,t,n,r,hv,i)}var hP=1,pP=2;function gP(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var s=a[0],l=e[s],u=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var c=new jr,d;if(!(d===void 0?hv(u,l,hP|pP,r,c):d))return!1}}return!0}function a5(e){return e===e&&!hr(e)}function vP(e){for(var t=cv(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,a5(i)]}return t}function s5(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function bP(e){var t=vP(e);return t.length==1&&t[0][2]?s5(t[0][0],t[0][1]):function(n){return n===e||gP(n,e,t)}}function mP(e,t){return e!=null&&t in Object(e)}function yP(e,t,n){t=G2(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=Td(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&sv(i)&&ov(a,i)&&(dr(e)||lf(e)))}function _P(e,t){return e!=null&&yP(e,t,mP)}var xP=1,wP=2;function CP(e,t){return fv(e)&&a5(t)?s5(Td(e),t):function(n){var r=zE(n,e);return r===void 0&&r===t?_P(n,e):hv(t,r,xP|wP)}}function SP(e){return function(t){return t==null?void 0:t[e]}}function $P(e){return function(t){return Y2(t,e)}}function kP(e){return fv(e)?SP(Td(e)):$P(e)}function MP(e){return typeof e=="function"?e:e==null?rv:typeof e=="object"?dr(e)?CP(e[0],e[1]):bP(e):kP(e)}function TP(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[++i];if(n(o[l],l,o)===!1)break}return t}}var l5=TP();function EP(e,t){return e&&l5(e,t,cv)}function AP(e,t){return function(n,r){if(n==null)return n;if(!vs(n))return e(n,r);for(var i=n.length,o=-1,a=Object(n);++o<i&&r(a[o],o,a)!==!1;);return n}}var PP=AP(EP),Uh=function(){return kr.Date.now()},RP="Expected a function",zP=Math.max,FP=Math.min;function IP(e,t,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(RP);t=_1(t)||0,hr(n)&&(c=!!n.leading,d="maxWait"in n,o=d?zP(_1(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f);function h($){var w=r,T=i;return r=i=void 0,u=$,a=e.apply(T,w),a}function p($){return u=$,s=setTimeout(v,t),c?h($):a}function g($){var w=$-l,T=$-u,M=t-w;return d?FP(M,o-T):M}function b($){var w=$-l,T=$-u;return l===void 0||w>=t||w<0||d&&T>=o}function v(){var $=Uh();if(b($))return x($);s=setTimeout(v,g($))}function x($){return s=void 0,f&&r?h($):(r=i=void 0,a)}function y(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function _(){return s===void 0?a:x(Uh())}function S(){var $=Uh(),w=b($);if(r=arguments,i=this,l=$,w){if(s===void 0)return p(l);if(d)return clearTimeout(s),s=setTimeout(v,t),h(l)}return s===void 0&&(s=setTimeout(v,t)),a}return S.cancel=y,S.flush=_,S}function w0(e,t,n){(n!==void 0&&!yu(e[t],n)||n===void 0&&!(t in e))&&av(e,t,n)}function BP(e){return Ki(e)&&vs(e)}function C0(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function OP(e){return iT(e,V2(e))}function NP(e,t,n,r,i,o,a){var s=C0(e,n),l=C0(t,n),u=a.get(l);if(u){w0(e,n,u);return}var c=o?o(s,l,n+"",e,t,a):void 0,d=c===void 0;if(d){var f=dr(l),h=!f&&uf(l),p=!f&&!h&&uv(l);c=l,f||h||p?dr(s)?c=s:BP(s)?c=VM(s):h?(d=!1,c=xA(l)):p?(d=!1,c=IA(l)):c=[]:DE(l)||lf(l)?(c=s,lf(s)?c=OP(s):(!hr(s)||iv(s))&&(c=BA(l))):d=!1}d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),w0(e,n,c)}function u5(e,t,n,r,i){e!==t&&l5(t,function(o,a){if(i||(i=new jr),hr(o))NP(e,t,a,n,u5,r,i);else{var s=r?r(C0(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),w0(e,a,s)}},V2)}function LP(e,t){var n=-1,r=vs(e)?Array(e.length):[];return PP(e,function(i,o,a){r[++n]=t(i,o,a)}),r}function DP(e,t){var n=dr(e)?N2:LP;return n(e,MP(t))}var ec=uT(function(e,t,n){u5(e,t,n)}),HP="Expected a function";function jh(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(HP);return hr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),IP(e,t,{leading:r,maxWait:t,trailing:i})}function _u(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=$t(oa,null)||{},r=pe(()=>{var i,o;return(o=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&o!==void 0?o:T9[e]});return{dateLocaleRef:pe(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:lM}),localeRef:r}}const Hl="naive-ui-style";function co(e,t,n){if(!t)return;const r=uo(),i=pe(()=>{const{value:s}=t;if(!s)return;const l=s[e];if(l)return l}),o=$t(oa,null),a=()=>{xr(()=>{const{value:s}=n,l=`${s}${e}Rtl`;if(nk(l,r))return;const{value:u}=i;u&&u.style.mount({id:l,head:!0,anchorMetaName:Hl,props:{bPrefix:s?`.${s}-`:void 0},ssr:r,parent:o==null?void 0:o.styleMountTarget})})};return r?a():hd(a),i}const ca={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:UP,fontFamily:jP,lineHeight:WP}=ca,c5=ce("body",`
|
|
31
31
|
margin: 0;
|
|
32
32
|
font-size: ${UP};
|
|
33
33
|
font-family: ${jP};
|
|
@@ -37,7 +37,7 @@ ${t}
|
|
|
37
37
|
`,[ce("input",`
|
|
38
38
|
font-family: inherit;
|
|
39
39
|
font-size: inherit;
|
|
40
|
-
`)]);function
|
|
40
|
+
`)]);function fa(e,t,n){if(!t)return;const r=uo(),i=$t(oa,null),o=()=>{const a=n.value;t.mount({id:a===void 0?e:a+e,head:!0,anchorMetaName:Hl,props:{bPrefix:a?`.${a}-`:void 0},ssr:r,parent:i==null?void 0:i.styleMountTarget}),i!=null&&i.preflightStyleDisabled||c5.mount({id:"n-global",head:!0,anchorMetaName:Hl,ssr:r,parent:i==null?void 0:i.styleMountTarget})};r?o():hd(o)}function pt(e,t,n,r,i,o){const a=uo(),s=$t(oa,null);if(n){const l=()=>{const u=o==null?void 0:o.value;n.mount({id:u===void 0?t:u+t,head:!0,props:{bPrefix:u?`.${u}-`:void 0},anchorMetaName:Hl,ssr:a,parent:s==null?void 0:s.styleMountTarget}),s!=null&&s.preflightStyleDisabled||c5.mount({id:"n-global",head:!0,anchorMetaName:Hl,ssr:a,parent:s==null?void 0:s.styleMountTarget})};a?l():hd(l)}return pe(()=>{var l;const{theme:{common:u,self:c,peers:d={}}={},themeOverrides:f={},builtinThemeOverrides:h={}}=i,{common:p,peers:g}=f,{common:b=void 0,[e]:{common:v=void 0,self:x=void 0,peers:y={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:_=void 0,[e]:S={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:$,peers:w={}}=S,T=ec({},u||v||b||r.common,_,$,p),M=ec((l=c||x||r.self)===null||l===void 0?void 0:l(T),h,S,f);return{common:T,self:M,peers:ec({},r.peers,y,d),peerOverrides:ec({},h.peers,w,g)}})}pt.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const VP=W("base-icon",`
|
|
41
41
|
height: 1em;
|
|
42
42
|
width: 1em;
|
|
43
43
|
line-height: 1em;
|
|
@@ -49,7 +49,7 @@ ${t}
|
|
|
49
49
|
`,[ce("svg",`
|
|
50
50
|
height: 1em;
|
|
51
51
|
width: 1em;
|
|
52
|
-
`)]),Cr=Fe({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){da("-base-icon",VP,et(e,"clsPrefix"))},render(){return k("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),Ef=Fe({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=gs();return()=>k(wr,{name:"icon-switch-transition",appear:n.value},t)}}),d5=Fe({name:"Add",render(){return k("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function bs(e,t){return Fe({name:hA(e),setup(){var n;const r=(n=$t(oa,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const o=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return o?o():t}}})}const qP=Fe({name:"Checkmark",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},k("g",{fill:"none"},k("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),GP=Fe({name:"ChevronDown",render(){return k("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),YP=bs("clear",k("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},k("g",{fill:"currentColor","fill-rule":"nonzero"},k("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),XP=bs("close",k("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},k("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},k("g",{fill:"currentColor","fill-rule":"nonzero"},k("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),KP=Fe({name:"Empty",render(){return k("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),k("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),ZP=bs("error",k("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},k("g",{"fill-rule":"nonzero"},k("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),JP=Fe({name:"Eye",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),k("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),QP=Fe({name:"EyeOff",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),k("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),k("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),k("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),k("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),eR=bs("info",k("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},k("g",{"fill-rule":"nonzero"},k("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),tR=Fe({name:"Remove",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
52
|
+
`)]),Cr=Fe({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){fa("-base-icon",VP,et(e,"clsPrefix"))},render(){return k("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),Ed=Fe({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=gs();return()=>k(wr,{name:"icon-switch-transition",appear:n.value},t)}}),f5=Fe({name:"Add",render(){return k("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function bs(e,t){return Fe({name:hA(e),setup(){var n;const r=(n=$t(oa,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const o=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return o?o():t}}})}const qP=Fe({name:"Checkmark",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},k("g",{fill:"none"},k("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),GP=Fe({name:"ChevronDown",render(){return k("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),YP=bs("clear",k("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},k("g",{fill:"currentColor","fill-rule":"nonzero"},k("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),XP=bs("close",k("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},k("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},k("g",{fill:"currentColor","fill-rule":"nonzero"},k("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),KP=Fe({name:"Empty",render(){return k("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),k("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),ZP=bs("error",k("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},k("g",{"fill-rule":"nonzero"},k("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),JP=Fe({name:"Eye",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),k("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),QP=Fe({name:"EyeOff",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),k("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),k("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),k("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),k("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),eR=bs("info",k("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},k("g",{"fill-rule":"nonzero"},k("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),tR=Fe({name:"Remove",render(){return k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
53
53
|
fill: none;
|
|
54
54
|
stroke: currentColor;
|
|
55
55
|
stroke-linecap: round;
|
|
@@ -79,7 +79,7 @@ ${t}
|
|
|
79
79
|
left: 50%;
|
|
80
80
|
top: 50%;
|
|
81
81
|
transform: translateX(-50%) translateY(-50%);
|
|
82
|
-
`,[es({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),S0=Fe({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return
|
|
82
|
+
`,[es({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),S0=Fe({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return fa("-base-clear",oR,et(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-base-clear`},k(Ed,null,{default:()=>{var t,n;return this.show?k("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},Ur(this.$slots.icon,()=>[k(Cr,{clsPrefix:e},{default:()=>k(YP,null)})])):k("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),aR=W("base-close",`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
justify-content: center;
|
|
@@ -123,7 +123,7 @@ ${t}
|
|
|
123
123
|
background-color: transparent;
|
|
124
124
|
`),ge("round",[ce("&::before",`
|
|
125
125
|
border-radius: 50%;
|
|
126
|
-
`)])]),pv=Fe({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return
|
|
126
|
+
`)])]),pv=Fe({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return fa("-base-close",aR,et(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:r,round:i,isButtonTag:o}=e;return k(o?"button":"div",{type:o?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:o?void 0:"button",disabled:n,class:[`${t}-base-close`,r&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,i&&`${t}-base-close--round`],onMousedown:a=>{e.focusable||a.preventDefault()},onClick:e.onClick},k(Cr,{clsPrefix:t},{default:()=>k(XP,null)}))}}}),d5=Fe({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function n(s){e.width?s.style.maxWidth=`${s.offsetWidth}px`:s.style.maxHeight=`${s.offsetHeight}px`,s.offsetWidth}function r(s){e.width?s.style.maxWidth="0":s.style.maxHeight="0",s.offsetWidth;const{onLeave:l}=e;l&&l()}function i(s){e.width?s.style.maxWidth="":s.style.maxHeight="";const{onAfterLeave:l}=e;l&&l()}function o(s){if(s.style.transition="none",e.width){const l=s.offsetWidth;s.style.maxWidth="0",s.offsetWidth,s.style.transition="",s.style.maxWidth=`${l}px`}else if(e.reverse)s.style.maxHeight=`${s.offsetHeight}px`,s.offsetHeight,s.style.transition="",s.style.maxHeight="0";else{const l=s.offsetHeight;s.style.maxHeight="0",s.offsetWidth,s.style.transition="",s.style.maxHeight=`${l}px`}s.offsetWidth}function a(s){var l;e.width?s.style.maxWidth="":e.reverse||(s.style.maxHeight=""),(l=e.onAfterEnter)===null||l===void 0||l.call(e)}return()=>{const{group:s,width:l,appear:u,mode:c}=e,d=s?Yw:wr,f={name:l?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:u,onEnter:o,onAfterEnter:a,onBeforeLeave:n,onLeave:r,onAfterLeave:i};return s||(f.mode=c),k(d,f,t)}}}),sR=Fe({props:{onFocus:Function,onBlur:Function},setup(e){return()=>k("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),lR=ce([ce("@keyframes rotator",`
|
|
127
127
|
0% {
|
|
128
128
|
-webkit-transform: rotate(0deg);
|
|
129
129
|
transform: rotate(0deg);
|
|
@@ -150,7 +150,7 @@ ${t}
|
|
|
150
150
|
`,[Q("icon",`
|
|
151
151
|
height: 1em;
|
|
152
152
|
width: 1em;
|
|
153
|
-
`)])])]),Wh="1.6s",uR={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},
|
|
153
|
+
`)])])]),Wh="1.6s",uR={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},Ad=Fe({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},uR),setup(e){fa("-base-loading",lR,et(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:r,scale:i}=this,o=t/i;return k("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},k(Ed,null,{default:()=>this.show?k("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},k("div",{class:`${e}-base-loading__container`},k("svg",{class:`${e}-base-loading__icon`,viewBox:`0 0 ${2*o} ${2*o}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},k("g",null,k("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};270 ${o} ${o}`,begin:"0s",dur:Wh,fill:"freeze",repeatCount:"indefinite"}),k("circle",{class:`${e}-base-loading__icon`,fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:o,cy:o,r:t-n/2,"stroke-dasharray":5.67*t,"stroke-dashoffset":18.48*t},k("animateTransform",{attributeName:"transform",type:"rotate",values:`0 ${o} ${o};135 ${o} ${o};450 ${o} ${o}`,begin:"0s",dur:Wh,fill:"freeze",repeatCount:"indefinite"}),k("animate",{attributeName:"stroke-dashoffset",values:`${5.67*t};${1.42*t};${5.67*t}`,begin:"0s",dur:Wh,fill:"freeze",repeatCount:"indefinite"})))))):k("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}}),{cubicBezierEaseInOut:U1}=ca;function cR({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:r=U1,leaveCubicBezier:i=U1}={}){return[ce(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),ce(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),ce(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),ce(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const Ke={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaAvatar:"0.2",alphaProgressRail:".08",alphaInput:"0",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},fR=en(Ke.neutralBase),h5=en(Ke.neutralInvertBase),dR=`rgba(${h5.slice(0,3).join(", ")}, `;function j1(e){return`${dR+String(e)})`}function gn(e){const t=Array.from(h5);return t[3]=Number(e),ir(fR,t)}const hn=Object.assign(Object.assign({name:"common"},ca),{baseColor:Ke.neutralBase,primaryColor:Ke.primaryDefault,primaryColorHover:Ke.primaryHover,primaryColorPressed:Ke.primaryActive,primaryColorSuppl:Ke.primarySuppl,infoColor:Ke.infoDefault,infoColorHover:Ke.infoHover,infoColorPressed:Ke.infoActive,infoColorSuppl:Ke.infoSuppl,successColor:Ke.successDefault,successColorHover:Ke.successHover,successColorPressed:Ke.successActive,successColorSuppl:Ke.successSuppl,warningColor:Ke.warningDefault,warningColorHover:Ke.warningHover,warningColorPressed:Ke.warningActive,warningColorSuppl:Ke.warningSuppl,errorColor:Ke.errorDefault,errorColorHover:Ke.errorHover,errorColorPressed:Ke.errorActive,errorColorSuppl:Ke.errorSuppl,textColorBase:Ke.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:gn(Ke.alpha4),placeholderColor:gn(Ke.alpha4),placeholderColorDisabled:gn(Ke.alpha5),iconColor:gn(Ke.alpha4),iconColorHover:Gu(gn(Ke.alpha4),{lightness:.75}),iconColorPressed:Gu(gn(Ke.alpha4),{lightness:.9}),iconColorDisabled:gn(Ke.alpha5),opacity1:Ke.alpha1,opacity2:Ke.alpha2,opacity3:Ke.alpha3,opacity4:Ke.alpha4,opacity5:Ke.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:gn(Number(Ke.alphaClose)),closeIconColorHover:gn(Number(Ke.alphaClose)),closeIconColorPressed:gn(Number(Ke.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:gn(Ke.alpha4),clearColorHover:Gu(gn(Ke.alpha4),{lightness:.75}),clearColorPressed:Gu(gn(Ke.alpha4),{lightness:.9}),scrollbarColor:j1(Ke.alphaScrollbar),scrollbarColorHover:j1(Ke.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:gn(Ke.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:Ke.neutralPopover,tableColor:Ke.neutralCard,cardColor:Ke.neutralCard,modalColor:Ke.neutralModal,bodyColor:Ke.neutralBody,tagColor:"#eee",avatarColor:gn(Ke.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:gn(Ke.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:Ke.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),hR={railInsetHorizontalBottom:"auto 2px 4px 2px",railInsetHorizontalTop:"4px 2px auto 2px",railInsetVerticalRight:"2px 4px 2px auto",railInsetVerticalLeft:"2px auto 2px 4px",railColor:"transparent"};function pR(e){const{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:o}=e;return Object.assign(Object.assign({},hR),{height:r,width:i,borderRadius:o,color:t,colorHover:n})}const p5={name:"Scrollbar",common:hn,self:pR},gR=W("scrollbar",`
|
|
154
154
|
overflow: hidden;
|
|
155
155
|
position: relative;
|
|
156
156
|
z-index: auto;
|
|
@@ -203,7 +203,7 @@ ${t}
|
|
|
203
203
|
pointer-events: all;
|
|
204
204
|
background-color: var(--n-scrollbar-color);
|
|
205
205
|
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
206
|
-
`,[cR(),ce("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),vR=Object.assign(Object.assign({},pt.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),gv=Fe({name:"Scrollbar",props:vR,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=rn(e),i=co("Scrollbar",r,t),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),f=ne(null),d=ne(null),h=ne(null),p=ne(null),g=ne(null),b=ne(0),v=ne(0),x=ne(!1),y=ne(!1);let _=!1,S=!1,$,w,T=0,M=0,P=0,R=0;const C=Sk(),E=pt("Scrollbar","-scrollbar",gR,p5,e,t),F=pe(()=>{const{value:ye}=d,{value:G}=c,{value:m}=p;return ye===null||G===null||m===null?0:Math.min(ye,m*ye/G+kn(E.value.self.width)*1.5)}),z=pe(()=>`${F.value}px`),j=pe(()=>{const{value:ye}=h,{value:G}=f,{value:m}=g;return ye===null||G===null||m===null?0:m*ye/G+kn(E.value.self.height)*1.5}),Z=pe(()=>`${j.value}px`),J=pe(()=>{const{value:ye}=d,{value:G}=b,{value:m}=c,{value:I}=p;if(ye===null||m===null||I===null)return 0;{const D=m-ye;return D?G/D*(I-F.value):0}}),ie=pe(()=>`${J.value}px`),he=pe(()=>{const{value:ye}=h,{value:G}=v,{value:m}=f,{value:I}=g;if(ye===null||m===null||I===null)return 0;{const D=m-ye;return D?G/D*(I-j.value):0}}),_e=pe(()=>`${he.value}px`),oe=pe(()=>{const{value:ye}=d,{value:G}=c;return ye!==null&&G!==null&&G>ye}),ve=pe(()=>{const{value:ye}=h,{value:G}=f;return ye!==null&&G!==null&&G>ye}),we=pe(()=>{const{trigger:ye}=e;return ye==="none"||x.value}),Oe=pe(()=>{const{trigger:ye}=e;return ye==="none"||y.value}),xe=pe(()=>{const{container:ye}=e;return ye?ye():a.value}),Xe=pe(()=>{const{content:ye}=e;return ye?ye():s.value}),Ve=(ye,G)=>{if(!e.scrollable)return;if(typeof ye=="number"){H(ye,G??0,0,!1,"auto");return}const{left:m,top:I,index:D,elSize:te,position:K,behavior:se,el:ue,debounce:ae=!0}=ye;(m!==void 0||I!==void 0)&&H(m??0,I??0,0,!1,se),ue!==void 0?H(0,ue.offsetTop,ue.offsetHeight,ae,se):D!==void 0&&te!==void 0?H(0,D*te,te,ae,se):K==="bottom"?H(0,Number.MAX_SAFE_INTEGER,0,!1,se):K==="top"&&H(0,0,0,!1,se)},de=$k(()=>{e.container||Ve({top:b.value,left:v.value})}),Ee=()=>{de.isDeactivated||V()},Pe=ye=>{if(de.isDeactivated)return;const{onResize:G}=e;G&&G(ye),V()},A=(ye,G)=>{if(!e.scrollable)return;const{value:m}=xe;m&&(typeof ye=="object"?m.scrollBy(ye):m.scrollBy(ye,G||0))};function H(ye,G,m,I,D){const{value:te}=xe;if(te){if(I){const{scrollTop:K,offsetHeight:se}=te;if(G>K){G+m<=K+se||te.scrollTo({left:ye,top:G+m-se,behavior:D});return}}te.scrollTo({left:ye,top:G,behavior:D})}}function Y(){re(),L(),V()}function fe(){le()}function le(){q(),N()}function q(){w!==void 0&&window.clearTimeout(w),w=window.setTimeout(()=>{y.value=!1},e.duration)}function N(){$!==void 0&&window.clearTimeout($),$=window.setTimeout(()=>{x.value=!1},e.duration)}function re(){$!==void 0&&window.clearTimeout($),x.value=!0}function L(){w!==void 0&&window.clearTimeout(w),y.value=!0}function O(ye){const{onScroll:G}=e;G&&G(ye),ee()}function ee(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1))}function U(){const{value:ye}=Xe;ye&&(c.value=ye.offsetHeight,f.value=ye.offsetWidth);const{value:G}=xe;G&&(d.value=G.offsetHeight,h.value=G.offsetWidth);const{value:m}=u,{value:I}=l;m&&(g.value=m.offsetWidth),I&&(p.value=I.offsetHeight)}function B(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1),d.value=ye.offsetHeight,h.value=ye.offsetWidth,c.value=ye.scrollHeight,f.value=ye.scrollWidth);const{value:G}=u,{value:m}=l;G&&(g.value=G.offsetWidth),m&&(p.value=m.offsetHeight)}function V(){e.scrollable&&(e.useUnifiedContainer?B():(U(),ee()))}function me(ye){var G;return!(!((G=o.value)===null||G===void 0)&&G.contains(Qa(ye)))}function Ae(ye){ye.preventDefault(),ye.stopPropagation(),S=!0,Mt("mousemove",window,Re,!0),Mt("mouseup",window,rt,!0),M=v.value,P=i!=null&&i.value?window.innerWidth-ye.clientX:ye.clientX}function Re(ye){if(!S)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:G}=h,{value:m}=f,{value:I}=j;if(G===null||m===null)return;const D=(i!=null&&i.value?window.innerWidth-ye.clientX-P:ye.clientX-P)*(m-G)/(G-I),te=m-G;let K=M+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;if(se){se.scrollLeft=K*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ue}=e;ue&&ue(K)}}function rt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,Re,!0),St("mouseup",window,rt,!0),S=!1,V(),me(ye)&&le()}function lt(ye){ye.preventDefault(),ye.stopPropagation(),_=!0,Mt("mousemove",window,dt,!0),Mt("mouseup",window,zt,!0),T=b.value,R=ye.clientY}function dt(ye){if(!_)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:G}=d,{value:m}=c,{value:I}=F;if(G===null||m===null)return;const D=(ye.clientY-R)*(m-G)/(G-I),te=m-G;let K=T+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;se&&(se.scrollTop=K)}function zt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,dt,!0),St("mouseup",window,zt,!0),_=!1,V(),me(ye)&&le()}xr(()=>{const{value:ye}=ve,{value:G}=oe,{value:m}=t,{value:I}=u,{value:D}=l;I&&(ye?I.classList.remove(`${m}-scrollbar-rail--disabled`):I.classList.add(`${m}-scrollbar-rail--disabled`)),D&&(G?D.classList.remove(`${m}-scrollbar-rail--disabled`):D.classList.add(`${m}-scrollbar-rail--disabled`))}),fn(()=>{e.container||V()}),Bn(()=>{$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w),St("mousemove",window,dt,!0),St("mouseup",window,zt,!0)});const yt=pe(()=>{const{common:{cubicBezierEaseInOut:ye},self:{color:G,colorHover:m,height:I,width:D,borderRadius:te,railInsetHorizontalTop:K,railInsetHorizontalBottom:se,railInsetVerticalRight:ue,railInsetVerticalLeft:ae,railColor:ke}}=E.value;return{"--n-scrollbar-bezier":ye,"--n-scrollbar-color":G,"--n-scrollbar-color-hover":m,"--n-scrollbar-border-radius":te,"--n-scrollbar-width":D,"--n-scrollbar-height":I,"--n-scrollbar-rail-inset-horizontal-top":K,"--n-scrollbar-rail-inset-horizontal-bottom":se,"--n-scrollbar-rail-inset-vertical-right":i!=null&&i.value?f1(ue):ue,"--n-scrollbar-rail-inset-vertical-left":i!=null&&i.value?f1(ae):ae,"--n-scrollbar-rail-color":ke}}),Lt=n?Cn("scrollbar",void 0,yt,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ve,scrollBy:A,sync:V,syncUnifiedContainer:B,handleMouseEnterWrapper:Y,handleMouseLeaveWrapper:fe}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:b,wrapperRef:o,containerRef:a,contentRef:s,yRailRef:l,xRailRef:u,needYBar:oe,needXBar:ve,yBarSizePx:z,xBarSizePx:Z,yBarTopPx:ie,xBarLeftPx:_e,isShowXBar:we,isShowYBar:Oe,isIos:C,handleScroll:O,handleContentResize:Ee,handleContainerResize:Pe,handleYScrollMouseDown:lt,handleXScrollMouseDown:Ae,cssVars:n?void 0:yt,themeClass:Lt==null?void 0:Lt.themeClass,onRender:Lt==null?void 0:Lt.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:o,yPlacement:a,xPlacement:s,xScrollable:l}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const u=this.trigger==="none",c=(h,p)=>k("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,`${n}-scrollbar-rail--vertical--${a}`,h],"data-scrollbar-rail":!0,style:[p||"",this.verticalRailStyle],"aria-hidden":!0},k(u?g0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?k("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),f=()=>{var h,p;return(h=this.onRender)===null||h===void 0||h.call(this),k("div",ia(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(p=t.default)===null||p===void 0?void 0:p.call(t):k("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},k(Wi,{onResize:this.handleContentResize},{default:()=>k("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),o?null:c(void 0,void 0),l&&k("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`,`${n}-scrollbar-rail--horizontal--${s}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},k(u?g0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?k("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},d=this.container?f():k(Wi,{onResize:this.handleContainerResize},{default:f});return o?k(kt,null,d,c(this.themeClass,this.cssVars)):d}}),bR=gv;function W1(e){return Array.isArray(e)?e:[e]}const $0={STOP:"STOP"};function g5(e,t){const n=t(e);e.children!==void 0&&n!==$0.STOP&&e.children.forEach(r=>g5(r,t))}function mR(e,t={}){const{preserveGroup:n=!1}=t,r=[],i=n?a=>{a.isLeaf||(r.push(a.key),o(a.children))}:a=>{a.isLeaf||(a.isGroup||r.push(a.key),o(a.children))};function o(a){a.forEach(i)}return o(e),r}function yR(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function _R(e){return e.children}function xR(e){return e.key}function wR(){return!1}function CR(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function SR(e){return e.disabled===!0}function $R(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function Vh(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function qh(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function kR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function MR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function TR(e){return(e==null?void 0:e.type)==="group"}function ER(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class AR extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function PR(e,t,n,r){return dd(t.concat(e),n,r,!1)}function RR(e,t){const n=new Set;return e.forEach(r=>{const i=t.treeNodeMap.get(r);if(i!==void 0){let o=i.parent;for(;o!==null&&!(o.disabled||n.has(o.key));)n.add(o.key),o=o.parent}}),n}function zR(e,t,n,r){const i=dd(t,n,r,!1),o=dd(e,n,r,!0),a=RR(e,n),s=[];return i.forEach(l=>{(o.has(l)||a.has(l))&&s.push(l)}),s.forEach(l=>i.delete(l)),i}function Gh(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:o,cascade:a,leafOnly:s,checkStrategy:l,allowNotLoaded:u}=e;if(!a)return r!==void 0?{checkedKeys:kR(n,r),indeterminateKeys:Array.from(o)}:i!==void 0?{checkedKeys:MR(n,i),indeterminateKeys:Array.from(o)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(o)};const{levelTreeNodeMap:c}=t;let f;i!==void 0?f=zR(i,n,t,u):r!==void 0?f=PR(r,n,t,u):f=dd(n,t,u,!1);const d=l==="parent",h=l==="child"||s,p=f,g=new Set,b=Math.max.apply(null,Array.from(c.keys()));for(let v=b;v>=0;v-=1){const x=v===0,y=c.get(v);for(const _ of y){if(_.isLeaf)continue;const{key:S,shallowLoaded:$}=_;if(h&&$&&_.children.forEach(P=>{!P.disabled&&!P.isLeaf&&P.shallowLoaded&&p.has(P.key)&&p.delete(P.key)}),_.disabled||!$)continue;let w=!0,T=!1,M=!0;for(const P of _.children){const R=P.key;if(!P.disabled){if(M&&(M=!1),p.has(R))T=!0;else if(g.has(R)){T=!0,w=!1;break}else if(w=!1,T)break}}w&&!M?(d&&_.children.forEach(P=>{!P.disabled&&p.has(P.key)&&p.delete(P.key)}),p.add(S)):T&&g.add(S),x&&h&&p.has(S)&&p.delete(S)}}return{checkedKeys:Array.from(p),indeterminateKeys:Array.from(g)}}function dd(e,t,n,r){const{treeNodeMap:i,getChildren:o}=t,a=new Set,s=new Set(e);return e.forEach(l=>{const u=i.get(l);u!==void 0&&g5(u,c=>{if(c.disabled)return $0.STOP;const{key:f}=c;if(!a.has(f)&&(a.add(f),s.add(f),$R(c.rawNode,o))){if(r)return $0.STOP;if(!n)throw new AR}})}),s}function FR(e,{includeGroup:t=!1,includeSelf:n=!0},r){var i;const o=r.treeNodeMap;let a=e==null?null:(i=o.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:a};if(a!=null&&a.ignored)return s.treeNode=null,s;for(;a;)!a.ignored&&(t||!a.isGroup)&&s.treeNodePath.push(a),a=a.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(l=>l.key),s}function IR(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function BR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function V1(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const i=t==="prev"?OR:BR,o={reverse:t==="prev"};let a=!1,s=null;function l(u){if(u!==null){if(u===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!u.disabled||r)&&!u.ignored&&!u.isGroup){s=u;return}if(u.isGroup){const c=vv(u,o);c!==null?s=c:l(i(u,n))}else{const c=i(u,!1);if(c!==null)l(c);else{const f=NR(u);f!=null&&f.isGroup?l(i(f,n)):n&&l(i(u,!0))}}}}return l(e),s}function OR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function NR(e){return e.parent}function vv(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:i}=r,o=n?i-1:0,a=n?-1:i,s=n?-1:1;for(let l=o;l!==a;l+=s){const u=r[l];if(!u.disabled&&!u.ignored)if(u.isGroup){const c=vv(u,t);if(c!==null)return c}else return u}}return null}const LR={getChild(){return this.ignored?null:vv(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return V1(this,"next",e)},getPrev(e={}){return V1(this,"prev",e)}};function DR(e,t){const n=t?new Set(t):void 0,r=[];function i(o){o.forEach(a=>{r.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||n===void 0||n.has(a.key))&&i(a.children)})}return i(e),r}function HR(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function v5(e,t,n,r,i,o=null,a=0){const s=[];return e.forEach((l,u)=>{var c;const f=Object.create(r);if(f.rawNode=l,f.siblings=s,f.level=a,f.index=u,f.isFirstChild=u===0,f.isLastChild=u+1===e.length,f.parent=o,!f.ignored){const d=i(l);Array.isArray(d)&&(f.children=v5(d,t,n,r,i,f,a+1))}s.push(f),t.set(f.key,f),n.has(a)||n.set(a,[]),(c=n.get(a))===null||c===void 0||c.push(f)}),s}function UR(e,t={}){var n;const r=new Map,i=new Map,{getDisabled:o=SR,getIgnored:a=wR,getIsGroup:s=TR,getKey:l=xR}=t,u=(n=t.getChildren)!==null&&n!==void 0?n:_R,c=t.ignoreEmptyChildren?_=>{const S=u(_);return Array.isArray(S)?S.length?S:null:S}:u,f=Object.assign({get key(){return l(this.rawNode)},get disabled(){return o(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return yR(this.rawNode,c)},get shallowLoaded(){return CR(this.rawNode,c)},get ignored(){return a(this.rawNode)},contains(_){return HR(this,_)}},LR),d=v5(e,r,i,f,c);function h(_){if(_==null)return null;const S=r.get(_);return S&&!S.isGroup&&!S.ignored?S:null}function p(_){if(_==null)return null;const S=r.get(_);return S&&!S.ignored?S:null}function g(_,S){const $=p(_);return $?$.getPrev(S):null}function b(_,S){const $=p(_);return $?$.getNext(S):null}function v(_){const S=p(_);return S?S.getParent():null}function x(_){const S=p(_);return S?S.getChild():null}const y={treeNodes:d,treeNodeMap:r,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:c,getFlattenedNodes(_){return DR(d,_)},getNode:h,getPrev:g,getNext:b,getParent:v,getChild:x,getFirstAvailableNode(){return IR(d)},getPath(_,S={}){return FR(_,S,y)},getCheckedKeys(_,S={}){const{cascade:$=!0,leafOnly:w=!1,checkStrategy:T="all",allowNotLoaded:M=!1}=S;return Gh({checkedKeys:Vh(_),indeterminateKeys:qh(_),cascade:$,leafOnly:w,checkStrategy:T,allowNotLoaded:M},y)},check(_,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:M="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:Vh(S),indeterminateKeys:qh(S),keysToCheck:_==null?[]:W1(_),cascade:w,leafOnly:T,checkStrategy:M,allowNotLoaded:P},y)},uncheck(_,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:M="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:Vh(S),indeterminateKeys:qh(S),keysToUncheck:_==null?[]:W1(_),cascade:w,leafOnly:T,checkStrategy:M,allowNotLoaded:P},y)},getNonLeafKeys(_={}){return mR(d,_)}};return y}const jR={iconSizeTiny:"28px",iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function WR(e){const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l}=e;return Object.assign(Object.assign({},jR),{fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l,textColor:t,iconColor:n,extraTextColor:r})}const b5={name:"Empty",common:hn,self:WR},VR=W("empty",`
|
|
206
|
+
`,[cR(),ce("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),vR=Object.assign(Object.assign({},pt.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),gv=Fe({name:"Scrollbar",props:vR,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=rn(e),i=co("Scrollbar",r,t),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(null),g=ne(null),b=ne(0),v=ne(0),x=ne(!1),y=ne(!1);let _=!1,S=!1,$,w,T=0,M=0,P=0,R=0;const C=Sk(),E=pt("Scrollbar","-scrollbar",gR,p5,e,t),F=pe(()=>{const{value:ye}=f,{value:G}=c,{value:m}=p;return ye===null||G===null||m===null?0:Math.min(ye,m*ye/G+kn(E.value.self.width)*1.5)}),z=pe(()=>`${F.value}px`),j=pe(()=>{const{value:ye}=h,{value:G}=d,{value:m}=g;return ye===null||G===null||m===null?0:m*ye/G+kn(E.value.self.height)*1.5}),Z=pe(()=>`${j.value}px`),J=pe(()=>{const{value:ye}=f,{value:G}=b,{value:m}=c,{value:I}=p;if(ye===null||m===null||I===null)return 0;{const D=m-ye;return D?G/D*(I-F.value):0}}),ie=pe(()=>`${J.value}px`),he=pe(()=>{const{value:ye}=h,{value:G}=v,{value:m}=d,{value:I}=g;if(ye===null||m===null||I===null)return 0;{const D=m-ye;return D?G/D*(I-j.value):0}}),_e=pe(()=>`${he.value}px`),oe=pe(()=>{const{value:ye}=f,{value:G}=c;return ye!==null&&G!==null&&G>ye}),ve=pe(()=>{const{value:ye}=h,{value:G}=d;return ye!==null&&G!==null&&G>ye}),we=pe(()=>{const{trigger:ye}=e;return ye==="none"||x.value}),Oe=pe(()=>{const{trigger:ye}=e;return ye==="none"||y.value}),xe=pe(()=>{const{container:ye}=e;return ye?ye():a.value}),Xe=pe(()=>{const{content:ye}=e;return ye?ye():s.value}),Ve=(ye,G)=>{if(!e.scrollable)return;if(typeof ye=="number"){H(ye,G??0,0,!1,"auto");return}const{left:m,top:I,index:D,elSize:te,position:K,behavior:se,el:ue,debounce:ae=!0}=ye;(m!==void 0||I!==void 0)&&H(m??0,I??0,0,!1,se),ue!==void 0?H(0,ue.offsetTop,ue.offsetHeight,ae,se):D!==void 0&&te!==void 0?H(0,D*te,te,ae,se):K==="bottom"?H(0,Number.MAX_SAFE_INTEGER,0,!1,se):K==="top"&&H(0,0,0,!1,se)},fe=$k(()=>{e.container||Ve({top:b.value,left:v.value})}),Ee=()=>{fe.isDeactivated||V()},Pe=ye=>{if(fe.isDeactivated)return;const{onResize:G}=e;G&&G(ye),V()},A=(ye,G)=>{if(!e.scrollable)return;const{value:m}=xe;m&&(typeof ye=="object"?m.scrollBy(ye):m.scrollBy(ye,G||0))};function H(ye,G,m,I,D){const{value:te}=xe;if(te){if(I){const{scrollTop:K,offsetHeight:se}=te;if(G>K){G+m<=K+se||te.scrollTo({left:ye,top:G+m-se,behavior:D});return}}te.scrollTo({left:ye,top:G,behavior:D})}}function Y(){re(),L(),V()}function de(){le()}function le(){q(),N()}function q(){w!==void 0&&window.clearTimeout(w),w=window.setTimeout(()=>{y.value=!1},e.duration)}function N(){$!==void 0&&window.clearTimeout($),$=window.setTimeout(()=>{x.value=!1},e.duration)}function re(){$!==void 0&&window.clearTimeout($),x.value=!0}function L(){w!==void 0&&window.clearTimeout(w),y.value=!0}function O(ye){const{onScroll:G}=e;G&&G(ye),ee()}function ee(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1))}function U(){const{value:ye}=Xe;ye&&(c.value=ye.offsetHeight,d.value=ye.offsetWidth);const{value:G}=xe;G&&(f.value=G.offsetHeight,h.value=G.offsetWidth);const{value:m}=u,{value:I}=l;m&&(g.value=m.offsetWidth),I&&(p.value=I.offsetHeight)}function B(){const{value:ye}=xe;ye&&(b.value=ye.scrollTop,v.value=ye.scrollLeft*(i!=null&&i.value?-1:1),f.value=ye.offsetHeight,h.value=ye.offsetWidth,c.value=ye.scrollHeight,d.value=ye.scrollWidth);const{value:G}=u,{value:m}=l;G&&(g.value=G.offsetWidth),m&&(p.value=m.offsetHeight)}function V(){e.scrollable&&(e.useUnifiedContainer?B():(U(),ee()))}function me(ye){var G;return!(!((G=o.value)===null||G===void 0)&&G.contains(Qa(ye)))}function Ae(ye){ye.preventDefault(),ye.stopPropagation(),S=!0,Mt("mousemove",window,Re,!0),Mt("mouseup",window,rt,!0),M=v.value,P=i!=null&&i.value?window.innerWidth-ye.clientX:ye.clientX}function Re(ye){if(!S)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:G}=h,{value:m}=d,{value:I}=j;if(G===null||m===null)return;const D=(i!=null&&i.value?window.innerWidth-ye.clientX-P:ye.clientX-P)*(m-G)/(G-I),te=m-G;let K=M+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;if(se){se.scrollLeft=K*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ue}=e;ue&&ue(K)}}function rt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,Re,!0),St("mouseup",window,rt,!0),S=!1,V(),me(ye)&&le()}function lt(ye){ye.preventDefault(),ye.stopPropagation(),_=!0,Mt("mousemove",window,ft,!0),Mt("mouseup",window,zt,!0),T=b.value,R=ye.clientY}function ft(ye){if(!_)return;$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w);const{value:G}=f,{value:m}=c,{value:I}=F;if(G===null||m===null)return;const D=(ye.clientY-R)*(m-G)/(G-I),te=m-G;let K=T+D;K=Math.min(te,K),K=Math.max(K,0);const{value:se}=xe;se&&(se.scrollTop=K)}function zt(ye){ye.preventDefault(),ye.stopPropagation(),St("mousemove",window,ft,!0),St("mouseup",window,zt,!0),_=!1,V(),me(ye)&&le()}xr(()=>{const{value:ye}=ve,{value:G}=oe,{value:m}=t,{value:I}=u,{value:D}=l;I&&(ye?I.classList.remove(`${m}-scrollbar-rail--disabled`):I.classList.add(`${m}-scrollbar-rail--disabled`)),D&&(G?D.classList.remove(`${m}-scrollbar-rail--disabled`):D.classList.add(`${m}-scrollbar-rail--disabled`))}),dn(()=>{e.container||V()}),Bn(()=>{$!==void 0&&window.clearTimeout($),w!==void 0&&window.clearTimeout(w),St("mousemove",window,ft,!0),St("mouseup",window,zt,!0)});const yt=pe(()=>{const{common:{cubicBezierEaseInOut:ye},self:{color:G,colorHover:m,height:I,width:D,borderRadius:te,railInsetHorizontalTop:K,railInsetHorizontalBottom:se,railInsetVerticalRight:ue,railInsetVerticalLeft:ae,railColor:ke}}=E.value;return{"--n-scrollbar-bezier":ye,"--n-scrollbar-color":G,"--n-scrollbar-color-hover":m,"--n-scrollbar-border-radius":te,"--n-scrollbar-width":D,"--n-scrollbar-height":I,"--n-scrollbar-rail-inset-horizontal-top":K,"--n-scrollbar-rail-inset-horizontal-bottom":se,"--n-scrollbar-rail-inset-vertical-right":i!=null&&i.value?d1(ue):ue,"--n-scrollbar-rail-inset-vertical-left":i!=null&&i.value?d1(ae):ae,"--n-scrollbar-rail-color":ke}}),Lt=n?Cn("scrollbar",void 0,yt,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ve,scrollBy:A,sync:V,syncUnifiedContainer:B,handleMouseEnterWrapper:Y,handleMouseLeaveWrapper:de}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:b,wrapperRef:o,containerRef:a,contentRef:s,yRailRef:l,xRailRef:u,needYBar:oe,needXBar:ve,yBarSizePx:z,xBarSizePx:Z,yBarTopPx:ie,xBarLeftPx:_e,isShowXBar:we,isShowYBar:Oe,isIos:C,handleScroll:O,handleContentResize:Ee,handleContainerResize:Pe,handleYScrollMouseDown:lt,handleXScrollMouseDown:Ae,cssVars:n?void 0:yt,themeClass:Lt==null?void 0:Lt.themeClass,onRender:Lt==null?void 0:Lt.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:o,yPlacement:a,xPlacement:s,xScrollable:l}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const u=this.trigger==="none",c=(h,p)=>k("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,`${n}-scrollbar-rail--vertical--${a}`,h],"data-scrollbar-rail":!0,style:[p||"",this.verticalRailStyle],"aria-hidden":!0},k(u?g0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?k("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var h,p;return(h=this.onRender)===null||h===void 0||h.call(this),k("div",ia(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(p=t.default)===null||p===void 0?void 0:p.call(t):k("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},k(Wi,{onResize:this.handleContentResize},{default:()=>k("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),o?null:c(void 0,void 0),l&&k("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`,`${n}-scrollbar-rail--horizontal--${s}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},k(u?g0:wr,u?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?k("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},f=this.container?d():k(Wi,{onResize:this.handleContainerResize},{default:d});return o?k(kt,null,f,c(this.themeClass,this.cssVars)):f}}),bR=gv;function W1(e){return Array.isArray(e)?e:[e]}const $0={STOP:"STOP"};function g5(e,t){const n=t(e);e.children!==void 0&&n!==$0.STOP&&e.children.forEach(r=>g5(r,t))}function mR(e,t={}){const{preserveGroup:n=!1}=t,r=[],i=n?a=>{a.isLeaf||(r.push(a.key),o(a.children))}:a=>{a.isLeaf||(a.isGroup||r.push(a.key),o(a.children))};function o(a){a.forEach(i)}return o(e),r}function yR(e,t){const{isLeaf:n}=e;return n!==void 0?n:!t(e)}function _R(e){return e.children}function xR(e){return e.key}function wR(){return!1}function CR(e,t){const{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function SR(e){return e.disabled===!0}function $R(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function Vh(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function qh(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function kR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)||n.add(r)}),Array.from(n)}function MR(e,t){const n=new Set(e);return t.forEach(r=>{n.has(r)&&n.delete(r)}),Array.from(n)}function TR(e){return(e==null?void 0:e.type)==="group"}function ER(e){const t=new Map;return e.forEach((n,r)=>{t.set(n.key,r)}),n=>{var r;return(r=t.get(n))!==null&&r!==void 0?r:null}}class AR extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}}function PR(e,t,n,r){return df(t.concat(e),n,r,!1)}function RR(e,t){const n=new Set;return e.forEach(r=>{const i=t.treeNodeMap.get(r);if(i!==void 0){let o=i.parent;for(;o!==null&&!(o.disabled||n.has(o.key));)n.add(o.key),o=o.parent}}),n}function zR(e,t,n,r){const i=df(t,n,r,!1),o=df(e,n,r,!0),a=RR(e,n),s=[];return i.forEach(l=>{(o.has(l)||a.has(l))&&s.push(l)}),s.forEach(l=>i.delete(l)),i}function Gh(e,t){const{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:o,cascade:a,leafOnly:s,checkStrategy:l,allowNotLoaded:u}=e;if(!a)return r!==void 0?{checkedKeys:kR(n,r),indeterminateKeys:Array.from(o)}:i!==void 0?{checkedKeys:MR(n,i),indeterminateKeys:Array.from(o)}:{checkedKeys:Array.from(n),indeterminateKeys:Array.from(o)};const{levelTreeNodeMap:c}=t;let d;i!==void 0?d=zR(i,n,t,u):r!==void 0?d=PR(r,n,t,u):d=df(n,t,u,!1);const f=l==="parent",h=l==="child"||s,p=d,g=new Set,b=Math.max.apply(null,Array.from(c.keys()));for(let v=b;v>=0;v-=1){const x=v===0,y=c.get(v);for(const _ of y){if(_.isLeaf)continue;const{key:S,shallowLoaded:$}=_;if(h&&$&&_.children.forEach(P=>{!P.disabled&&!P.isLeaf&&P.shallowLoaded&&p.has(P.key)&&p.delete(P.key)}),_.disabled||!$)continue;let w=!0,T=!1,M=!0;for(const P of _.children){const R=P.key;if(!P.disabled){if(M&&(M=!1),p.has(R))T=!0;else if(g.has(R)){T=!0,w=!1;break}else if(w=!1,T)break}}w&&!M?(f&&_.children.forEach(P=>{!P.disabled&&p.has(P.key)&&p.delete(P.key)}),p.add(S)):T&&g.add(S),x&&h&&p.has(S)&&p.delete(S)}}return{checkedKeys:Array.from(p),indeterminateKeys:Array.from(g)}}function df(e,t,n,r){const{treeNodeMap:i,getChildren:o}=t,a=new Set,s=new Set(e);return e.forEach(l=>{const u=i.get(l);u!==void 0&&g5(u,c=>{if(c.disabled)return $0.STOP;const{key:d}=c;if(!a.has(d)&&(a.add(d),s.add(d),$R(c.rawNode,o))){if(r)return $0.STOP;if(!n)throw new AR}})}),s}function FR(e,{includeGroup:t=!1,includeSelf:n=!0},r){var i;const o=r.treeNodeMap;let a=e==null?null:(i=o.get(e))!==null&&i!==void 0?i:null;const s={keyPath:[],treeNodePath:[],treeNode:a};if(a!=null&&a.ignored)return s.treeNode=null,s;for(;a;)!a.ignored&&(t||!a.isGroup)&&s.treeNodePath.push(a),a=a.parent;return s.treeNodePath.reverse(),n||s.treeNodePath.pop(),s.keyPath=s.treeNodePath.map(l=>l.key),s}function IR(e){if(e.length===0)return null;const t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function BR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function V1(e,t,{loop:n=!1,includeDisabled:r=!1}={}){const i=t==="prev"?OR:BR,o={reverse:t==="prev"};let a=!1,s=null;function l(u){if(u!==null){if(u===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!u.disabled||r)&&!u.ignored&&!u.isGroup){s=u;return}if(u.isGroup){const c=vv(u,o);c!==null?s=c:l(i(u,n))}else{const c=i(u,!1);if(c!==null)l(c);else{const d=NR(u);d!=null&&d.isGroup?l(i(d,n)):n&&l(i(u,!0))}}}}return l(e),s}function OR(e,t){const n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function NR(e){return e.parent}function vv(e,t={}){const{reverse:n=!1}=t,{children:r}=e;if(r){const{length:i}=r,o=n?i-1:0,a=n?-1:i,s=n?-1:1;for(let l=o;l!==a;l+=s){const u=r[l];if(!u.disabled&&!u.ignored)if(u.isGroup){const c=vv(u,t);if(c!==null)return c}else return u}}return null}const LR={getChild(){return this.ignored?null:vv(this)},getParent(){const{parent:e}=this;return e!=null&&e.isGroup?e.getParent():e},getNext(e={}){return V1(this,"next",e)},getPrev(e={}){return V1(this,"prev",e)}};function DR(e,t){const n=t?new Set(t):void 0,r=[];function i(o){o.forEach(a=>{r.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||n===void 0||n.has(a.key))&&i(a.children)})}return i(e),r}function HR(e,t){const n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function v5(e,t,n,r,i,o=null,a=0){const s=[];return e.forEach((l,u)=>{var c;const d=Object.create(r);if(d.rawNode=l,d.siblings=s,d.level=a,d.index=u,d.isFirstChild=u===0,d.isLastChild=u+1===e.length,d.parent=o,!d.ignored){const f=i(l);Array.isArray(f)&&(d.children=v5(f,t,n,r,i,d,a+1))}s.push(d),t.set(d.key,d),n.has(a)||n.set(a,[]),(c=n.get(a))===null||c===void 0||c.push(d)}),s}function UR(e,t={}){var n;const r=new Map,i=new Map,{getDisabled:o=SR,getIgnored:a=wR,getIsGroup:s=TR,getKey:l=xR}=t,u=(n=t.getChildren)!==null&&n!==void 0?n:_R,c=t.ignoreEmptyChildren?_=>{const S=u(_);return Array.isArray(S)?S.length?S:null:S}:u,d=Object.assign({get key(){return l(this.rawNode)},get disabled(){return o(this.rawNode)},get isGroup(){return s(this.rawNode)},get isLeaf(){return yR(this.rawNode,c)},get shallowLoaded(){return CR(this.rawNode,c)},get ignored(){return a(this.rawNode)},contains(_){return HR(this,_)}},LR),f=v5(e,r,i,d,c);function h(_){if(_==null)return null;const S=r.get(_);return S&&!S.isGroup&&!S.ignored?S:null}function p(_){if(_==null)return null;const S=r.get(_);return S&&!S.ignored?S:null}function g(_,S){const $=p(_);return $?$.getPrev(S):null}function b(_,S){const $=p(_);return $?$.getNext(S):null}function v(_){const S=p(_);return S?S.getParent():null}function x(_){const S=p(_);return S?S.getChild():null}const y={treeNodes:f,treeNodeMap:r,levelTreeNodeMap:i,maxLevel:Math.max(...i.keys()),getChildren:c,getFlattenedNodes(_){return DR(f,_)},getNode:h,getPrev:g,getNext:b,getParent:v,getChild:x,getFirstAvailableNode(){return IR(f)},getPath(_,S={}){return FR(_,S,y)},getCheckedKeys(_,S={}){const{cascade:$=!0,leafOnly:w=!1,checkStrategy:T="all",allowNotLoaded:M=!1}=S;return Gh({checkedKeys:Vh(_),indeterminateKeys:qh(_),cascade:$,leafOnly:w,checkStrategy:T,allowNotLoaded:M},y)},check(_,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:M="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:Vh(S),indeterminateKeys:qh(S),keysToCheck:_==null?[]:W1(_),cascade:w,leafOnly:T,checkStrategy:M,allowNotLoaded:P},y)},uncheck(_,S,$={}){const{cascade:w=!0,leafOnly:T=!1,checkStrategy:M="all",allowNotLoaded:P=!1}=$;return Gh({checkedKeys:Vh(S),indeterminateKeys:qh(S),keysToUncheck:_==null?[]:W1(_),cascade:w,leafOnly:T,checkStrategy:M,allowNotLoaded:P},y)},getNonLeafKeys(_={}){return mR(f,_)}};return y}const jR={iconSizeTiny:"28px",iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};function WR(e){const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l}=e;return Object.assign(Object.assign({},jR),{fontSizeTiny:i,fontSizeSmall:o,fontSizeMedium:a,fontSizeLarge:s,fontSizeHuge:l,textColor:t,iconColor:n,extraTextColor:r})}const b5={name:"Empty",common:hn,self:WR},VR=W("empty",`
|
|
207
207
|
display: flex;
|
|
208
208
|
flex-direction: column;
|
|
209
209
|
align-items: center;
|
|
@@ -226,7 +226,7 @@ ${t}
|
|
|
226
226
|
transition: color .3s var(--n-bezier);
|
|
227
227
|
margin-top: 12px;
|
|
228
228
|
color: var(--n-extra-text-color);
|
|
229
|
-
`)]),qR=Object.assign(Object.assign({},pt.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),GR=Fe({name:"Empty",props:qR,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:r}=rn(e),i=pt("Empty","-empty",VR,b5,e,t),{localeRef:o}=_u("Empty"),a=pe(()=>{var c,f
|
|
229
|
+
`)]),qR=Object.assign(Object.assign({},pt.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),GR=Fe({name:"Empty",props:qR,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:r}=rn(e),i=pt("Empty","-empty",VR,b5,e,t),{localeRef:o}=_u("Empty"),a=pe(()=>{var c,d,f;return(c=e.description)!==null&&c!==void 0?c:(f=(d=r==null?void 0:r.value)===null||d===void 0?void 0:d.Empty)===null||f===void 0?void 0:f.description}),s=pe(()=>{var c,d;return((d=(c=r==null?void 0:r.value)===null||c===void 0?void 0:c.Empty)===null||d===void 0?void 0:d.renderIcon)||(()=>k(KP,null))}),l=pe(()=>{const{size:c}=e,{common:{cubicBezierEaseInOut:d},self:{[Se("iconSize",c)]:f,[Se("fontSize",c)]:h,textColor:p,iconColor:g,extraTextColor:b}}=i.value;return{"--n-icon-size":f,"--n-font-size":h,"--n-bezier":d,"--n-text-color":p,"--n-icon-color":g,"--n-extra-text-color":b}}),u=n?Cn("empty",pe(()=>{let c="";const{size:d}=e;return c+=d[0],c}),l,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:pe(()=>a.value||o.value.description),cssVars:n?void 0:l,themeClass:u==null?void 0:u.themeClass,onRender:u==null?void 0:u.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),k("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?k("div",{class:`${t}-empty__icon`},e.icon?e.icon():k(Cr,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?k("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?k("div",{class:`${t}-empty__extra`},e.extra()):null)}}),YR={height:"calc(var(--n-option-height) * 7.6)",paddingTiny:"4px 0",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingTiny:"0 12px",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function XR(e){const{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:o,primaryColorPressed:a,textColorDisabled:s,primaryColor:l,opacityDisabled:u,hoverColor:c,fontSizeTiny:d,fontSizeSmall:f,fontSizeMedium:h,fontSizeLarge:p,fontSizeHuge:g,heightTiny:b,heightSmall:v,heightMedium:x,heightLarge:y,heightHuge:_}=e;return Object.assign(Object.assign({},YR),{optionFontSizeTiny:d,optionFontSizeSmall:f,optionFontSizeMedium:h,optionFontSizeLarge:p,optionFontSizeHuge:g,optionHeightTiny:b,optionHeightSmall:v,optionHeightMedium:x,optionHeightLarge:y,optionHeightHuge:_,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:o,optionTextColorPressed:a,optionTextColorDisabled:s,optionTextColorActive:l,optionOpacityDisabled:u,optionCheckColor:l,optionColorPending:c,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:c,actionTextColor:o,loadingColor:l})}const m5={name:"InternalSelectMenu",common:hn,peers:{Scrollbar:p5,Empty:b5},self:XR},q1=Fe({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=$t(tv);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,o=r==null?void 0:r(i),a=t?t(i,!1):Fo(i[this.labelField],i,!1),s=k("div",Object.assign({},o,{class:[`${e}-base-select-group-header`,o==null?void 0:o.class]}),a);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}});function KR(e,t){return k(wr,{name:"fade-in-scale-up-transition"},{default:()=>e?k(Cr,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>k(qP)}):null})}const G1=Fe({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:o,renderOptionRef:a,labelFieldRef:s,valueFieldRef:l,showCheckmarkRef:u,nodePropsRef:c,handleOptionClick:d,handleOptionMouseEnter:f}=$t(tv),h=Ht(()=>{const{value:v}=n;return v?e.tmNode.key===v.key:!1});function p(v){const{tmNode:x}=e;x.disabled||d(v,x)}function g(v){const{tmNode:x}=e;x.disabled||f(v,x)}function b(v){const{tmNode:x}=e,{value:y}=h;x.disabled||y||f(v,x)}return{multiple:r,isGrouped:Ht(()=>{const{tmNode:v}=e,{parent:x}=v;return x&&x.rawNode.type==="group"}),showCheckmark:u,nodeProps:c,isPending:h,isSelected:Ht(()=>{const{value:v}=t,{value:x}=r;if(v===null)return!1;const y=e.tmNode.rawNode[l.value];if(x){const{value:_}=i;return _.has(y)}else return v===y}),labelField:s,renderLabel:o,renderOption:a,handleMouseMove:b,handleMouseEnter:g,handleClick:p}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:o,nodeProps:a,renderOption:s,renderLabel:l,handleClick:u,handleMouseEnter:c,handleMouseMove:d}=this,f=KR(n,e),h=l?[l(t,n),o&&f]:[Fo(t[this.labelField],t,n),o&&f],p=a==null?void 0:a(t),g=k("div",Object.assign({},p,{class:[`${e}-base-select-option`,t.class,p==null?void 0:p.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:o}],style:[(p==null?void 0:p.style)||"",t.style||""],onClick:Oh([u,p==null?void 0:p.onClick]),onMouseenter:Oh([c,p==null?void 0:p.onMouseenter]),onMousemove:Oh([d,p==null?void 0:p.onMousemove])}),k("div",{class:`${e}-base-select-option__content`},h));return t.render?t.render({node:g,option:t,selected:n}):s?s({node:g,option:t,selected:n}):g}}),{cubicBezierEaseIn:Y1,cubicBezierEaseOut:X1}=ca;function Ul({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:i=""}={}){return[ce("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Y1}, transform ${t} ${Y1} ${i&&`,${i}`}`}),ce("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${X1}, transform ${t} ${X1} ${i&&`,${i}`}`}),ce("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),ce("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const ZR=W("base-select-menu",`
|
|
230
230
|
line-height: 1.5;
|
|
231
231
|
outline: none;
|
|
232
232
|
z-index: 0;
|
|
@@ -333,7 +333,7 @@ ${t}
|
|
|
333
333
|
top: calc(50% - 7px);
|
|
334
334
|
color: var(--n-option-check-color);
|
|
335
335
|
transition: color .3s var(--n-bezier);
|
|
336
|
-
`,[Ul({enterScale:"0.5"})])])]),JR=Fe({name:"InternalSelectMenu",props:Object.assign(Object.assign({},pt.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=rn(e),r=co("InternalSelectMenu",n,t),i=pt("InternalSelectMenu","-internal-select-menu",ZR,m5,e,et(e,"clsPrefix")),o=ne(null),a=ne(null),s=ne(null),l=pe(()=>e.treeMate.getFlattenedNodes()),u=pe(()=>ER(l.value)),c=ne(null);function
|
|
336
|
+
`,[Ul({enterScale:"0.5"})])])]),JR=Fe({name:"InternalSelectMenu",props:Object.assign(Object.assign({},pt.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=rn(e),r=co("InternalSelectMenu",n,t),i=pt("InternalSelectMenu","-internal-select-menu",ZR,m5,e,et(e,"clsPrefix")),o=ne(null),a=ne(null),s=ne(null),l=pe(()=>e.treeMate.getFlattenedNodes()),u=pe(()=>ER(l.value)),c=ne(null);function d(){const{treeMate:oe}=e;let ve=null;const{value:we}=e;we===null?ve=oe.getFirstAvailableNode():(e.multiple?ve=oe.getNode((we||[])[(we||[]).length-1]):ve=oe.getNode(we),(!ve||ve.disabled)&&(ve=oe.getFirstAvailableNode())),F(ve||null)}function f(){const{value:oe}=c;oe&&!e.treeMate.getNode(oe.key)&&(c.value=null)}let h;vt(()=>e.show,oe=>{oe?h=vt(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?d():f(),fn(z)):f()},{immediate:!0}):h==null||h()},{immediate:!0}),Bn(()=>{h==null||h()});const p=pe(()=>kn(i.value.self[Se("optionHeight",e.size)])),g=pe(()=>Kn(i.value.self[Se("padding",e.size)])),b=pe(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),v=pe(()=>{const oe=l.value;return oe&&oe.length===0});function x(oe){const{onToggle:ve}=e;ve&&ve(oe)}function y(oe){const{onScroll:ve}=e;ve&&ve(oe)}function _(oe){var ve;(ve=s.value)===null||ve===void 0||ve.sync(),y(oe)}function S(){var oe;(oe=s.value)===null||oe===void 0||oe.sync()}function $(){const{value:oe}=c;return oe||null}function w(oe,ve){ve.disabled||F(ve,!1)}function T(oe,ve){ve.disabled||x(ve)}function M(oe){var ve;vl(oe,"action")||(ve=e.onKeyup)===null||ve===void 0||ve.call(e,oe)}function P(oe){var ve;vl(oe,"action")||(ve=e.onKeydown)===null||ve===void 0||ve.call(e,oe)}function R(oe){var ve;(ve=e.onMousedown)===null||ve===void 0||ve.call(e,oe),!e.focusable&&oe.preventDefault()}function C(){const{value:oe}=c;oe&&F(oe.getNext({loop:!0}),!0)}function E(){const{value:oe}=c;oe&&F(oe.getPrev({loop:!0}),!0)}function F(oe,ve=!1){c.value=oe,ve&&z()}function z(){var oe,ve;const we=c.value;if(!we)return;const Oe=u.value(we.key);Oe!==null&&(e.virtualScroll?(oe=a.value)===null||oe===void 0||oe.scrollTo({index:Oe}):(ve=s.value)===null||ve===void 0||ve.scrollTo({index:Oe,elSize:p.value}))}function j(oe){var ve,we;!((ve=o.value)===null||ve===void 0)&&ve.contains(oe.target)&&((we=e.onFocus)===null||we===void 0||we.call(e,oe))}function Z(oe){var ve,we;!((ve=o.value)===null||ve===void 0)&&ve.contains(oe.relatedTarget)||(we=e.onBlur)===null||we===void 0||we.call(e,oe)}jn(tv,{handleOptionMouseEnter:w,handleOptionClick:T,valueSetRef:b,pendingTmNodeRef:c,nodePropsRef:et(e,"nodeProps"),showCheckmarkRef:et(e,"showCheckmark"),multipleRef:et(e,"multiple"),valueRef:et(e,"value"),renderLabelRef:et(e,"renderLabel"),renderOptionRef:et(e,"renderOption"),labelFieldRef:et(e,"labelField"),valueFieldRef:et(e,"valueField")}),jn(p2,o),dn(()=>{const{value:oe}=s;oe&&oe.sync()});const J=pe(()=>{const{size:oe}=e,{common:{cubicBezierEaseInOut:ve},self:{height:we,borderRadius:Oe,color:xe,groupHeaderTextColor:Xe,actionDividerColor:Ve,optionTextColorPressed:fe,optionTextColor:Ee,optionTextColorDisabled:Pe,optionTextColorActive:A,optionOpacityDisabled:H,optionCheckColor:Y,actionTextColor:de,optionColorPending:le,optionColorActive:q,loadingColor:N,loadingSize:re,optionColorActivePending:L,[Se("optionFontSize",oe)]:O,[Se("optionHeight",oe)]:ee,[Se("optionPadding",oe)]:U}}=i.value;return{"--n-height":we,"--n-action-divider-color":Ve,"--n-action-text-color":de,"--n-bezier":ve,"--n-border-radius":Oe,"--n-color":xe,"--n-option-font-size":O,"--n-group-header-text-color":Xe,"--n-option-check-color":Y,"--n-option-color-pending":le,"--n-option-color-active":q,"--n-option-color-active-pending":L,"--n-option-height":ee,"--n-option-opacity-disabled":H,"--n-option-text-color":Ee,"--n-option-text-color-active":A,"--n-option-text-color-disabled":Pe,"--n-option-text-color-pressed":fe,"--n-option-padding":U,"--n-option-padding-left":Kn(U,"left"),"--n-option-padding-right":Kn(U,"right"),"--n-loading-color":N,"--n-loading-size":re}}),{inlineThemeDisabled:ie}=e,he=ie?Cn("internal-select-menu",pe(()=>e.size[0]),J,e):void 0,_e={selfRef:o,next:C,prev:E,getPendingTmNode:$};return F2(o,e.onResize),Object.assign({mergedTheme:i,mergedClsPrefix:t,rtlEnabled:r,virtualListRef:a,scrollbarRef:s,itemSize:p,padding:g,flattenedNodes:l,empty:v,virtualListContainer(){const{value:oe}=a;return oe==null?void 0:oe.listElRef},virtualListContent(){const{value:oe}=a;return oe==null?void 0:oe.itemsElRef},doScroll:y,handleFocusin:j,handleFocusout:Z,handleKeyUp:M,handleKeyDown:P,handleMouseDown:R,handleVirtualListResize:S,handleVirtualListScroll:_,cssVars:ie?void 0:J,themeClass:he==null?void 0:he.themeClass,onRender:he==null?void 0:he.onRender},_e)},render(){const{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:i,onRender:o}=this;return o==null||o(),k("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},Bt(e.header,a=>a&&k("div",{class:`${n}-base-select-menu__header`,"data-header":!0,key:"header"},a)),this.loading?k("div",{class:`${n}-base-select-menu__loading`},k(Ad,{clsPrefix:n,strokeWidth:20})):this.empty?k("div",{class:`${n}-base-select-menu__empty`,"data-empty":!0},Ur(e.empty,()=>[k(GR,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty,size:this.size})])):k(gv,{ref:"scrollbarRef",theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?k(p9,{ref:"virtualListRef",class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:a})=>a.isGroup?k(q1,{key:a.key,clsPrefix:n,tmNode:a}):a.ignored?null:k(G1,{clsPrefix:n,key:a.key,tmNode:a})}):k("div",{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(a=>a.isGroup?k(q1,{key:a.key,clsPrefix:n,tmNode:a}):k(G1,{clsPrefix:n,key:a.key,tmNode:a})))}),Bt(e.action,a=>a&&[k("div",{class:`${n}-base-select-menu__action`,"data-action":!0,key:"action"},a),k(sR,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),QR={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function ez(e){const{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:i,fontSize:o,dividerColor:a}=e;return Object.assign(Object.assign({},QR),{fontSize:o,borderRadius:i,color:n,dividerColor:a,textColor:r,boxShadow:t})}const bv={name:"Popover",common:hn,self:ez},Yh={top:"bottom",bottom:"top",left:"right",right:"left"},Zt="var(--n-arrow-height) * 1.414",tz=ce([W("popover",`
|
|
337
337
|
transition:
|
|
338
338
|
box-shadow .3s var(--n-bezier),
|
|
339
339
|
background-color .3s var(--n-bezier),
|
|
@@ -449,7 +449,7 @@ ${t}
|
|
|
449
449
|
${n}: 100%;
|
|
450
450
|
${Yh[n]}: auto;
|
|
451
451
|
${r}
|
|
452
|
-
`,[W("popover-arrow",t)])])])}const y5=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function nz({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return k("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},k("div",{class:[`${i}-popover-arrow`,e],style:t}))}const rz=Fe({name:"PopoverBody",inheritAttrs:!1,props:y5,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o}=rn(e),a=pt("Popover","-popover",tz,bv,e,i),s=ne(null),l=$t("NPopover"),u=ne(null),c=ne(e.show),f=ne(!1);xr(()=>{const{show:w}=e;w&&!x9()&&!e.internalDeactivateImmediately&&(f.value=!0)});const d=pe(()=>{const{trigger:w,onClickoutside:T}=e,M=[],{positionManuallyRef:{value:P}}=l;return P||(w==="click"&&!T&&M.push([Ol,_,void 0,{capture:!0}]),w==="hover"&&M.push([Tk,y])),T&&M.push([Ol,_,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&f.value)&&M.push([mf,e.show]),M}),h=pe(()=>{const{common:{cubicBezierEaseInOut:w,cubicBezierEaseIn:T,cubicBezierEaseOut:M},self:{space:P,spaceArrow:R,padding:C,fontSize:E,textColor:F,dividerColor:z,color:j,boxShadow:Z,borderRadius:J,arrowHeight:ie,arrowOffset:he,arrowOffsetVertical:_e}}=a.value;return{"--n-box-shadow":Z,"--n-bezier":w,"--n-bezier-ease-in":T,"--n-bezier-ease-out":M,"--n-font-size":E,"--n-text-color":F,"--n-color":j,"--n-divider-color":z,"--n-border-radius":J,"--n-arrow-height":ie,"--n-arrow-offset":he,"--n-arrow-offset-vertical":_e,"--n-padding":C,"--n-space":P,"--n-space-arrow":R}}),p=pe(()=>{const w=e.width==="trigger"?void 0:Rc(e.width),T=[];w&&T.push({width:w});const{maxWidth:M,minWidth:P}=e;return M&&T.push({maxWidth:Rc(M)}),P&&T.push({maxWidth:Rc(P)}),o||T.push(h.value),T}),g=o?Cn("popover",void 0,h,e):void 0;l.setBodyInstance({syncPosition:b}),Bn(()=>{l.setBodyInstance(null)}),vt(et(e,"show"),w=>{e.animated||(w?c.value=!0:c.value=!1)});function b(){var w;(w=s.value)===null||w===void 0||w.syncPosition()}function v(w){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&l.handleMouseEnter(w)}function x(w){e.trigger==="hover"&&e.keepAliveOnHover&&l.handleMouseLeave(w)}function y(w){e.trigger==="hover"&&!S().contains(Qa(w))&&l.handleMouseMoveOutside(w)}function _(w){(e.trigger==="click"&&!S().contains(Qa(w))||e.onClickoutside)&&l.handleClickOutside(w)}function S(){return l.getTriggerElement()}jn(b2,u),jn(g2,null),jn(v2,null);function $(){if(g==null||g.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&f.value))return null;let w;const T=l.internalRenderBodyRef.value,{value:M}=i;if(T)w=T([`${M}-popover-shared`,g==null?void 0:g.themeClass.value,e.overlap&&`${M}-popover-shared--overlap`,e.showArrow&&`${M}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${M}-popover-shared--center-arrow`],u,p.value,v,x);else{const{value:P}=l.extraClassRef,{internalTrapFocus:R}=e,C=!ja(t.header)||!ja(t.footer),E=()=>{var F,z;const j=C?k(kt,null,Bt(t.header,ie=>ie?k("div",{class:[`${M}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Bt(t.default,ie=>ie?k("div",{class:[`${M}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Bt(t.footer,ie=>ie?k("div",{class:[`${M}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(F=t.default)===null||F===void 0?void 0:F.call(t):k("div",{class:[`${M}-popover__content`,e.contentClass],style:e.contentStyle},t),Z=e.scrollable?k(bR,{contentClass:C?void 0:`${M}-popover__content ${(z=e.contentClass)!==null&&z!==void 0?z:""}`,contentStyle:C?void 0:e.contentStyle},{default:()=>j}):j,J=e.showArrow?nz({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:M}):null;return[Z,J]};w=k("div",ia({class:[`${M}-popover`,`${M}-popover-shared`,g==null?void 0:g.themeClass.value,P.map(F=>`${M}-${F}`),{[`${M}-popover--scrollable`]:e.scrollable,[`${M}-popover--show-header-or-footer`]:C,[`${M}-popover--raw`]:e.raw,[`${M}-popover-shared--overlap`]:e.overlap,[`${M}-popover-shared--show-arrow`]:e.showArrow,[`${M}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:u,style:p.value,onKeydown:l.handleKeydown,onMouseenter:v,onMouseleave:x},n),R?k(y9,{active:e.show,autoFocus:!0},{default:E}):E())}return lo(w,d.value)}return{displayed:f,namespace:r,isMounted:l.isMountedRef,zIndex:l.zIndexRef,followerRef:s,adjustedTo:Pn(e),followerEnabled:c,renderContentNode:$}},render(){return k(Sf,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===Pn.tdkey},{default:()=>this.animated?k(wr,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),iz=Object.keys(y5),oz={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function az(e,t,n){oz[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],o=n[r];i?e.props[r]=(...a)=>{i(...a),o(...a)}:e.props[r]=o})}const _5={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:Pn.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},sz=Object.assign(Object.assign(Object.assign({},pt.props),_5),{internalOnAfterLeave:Function,internalRenderBody:Function}),x5=Fe({name:"Popover",inheritAttrs:!1,props:sz,__popover__:!0,setup(e){const t=gs(),n=ne(null),r=pe(()=>e.show),i=ne(e.defaultShow),o=Gr(r,i),a=Ht(()=>e.disabled?!1:o.value),s=()=>{if(e.disabled)return!0;const{getDisabled:F}=e;return!!(F!=null&&F())},l=()=>s()?!1:o.value,u=nd(e,["arrow","showArrow"]),c=pe(()=>e.overlap?!1:u.value);let f=null;const d=ne(null),h=ne(null),p=Ht(()=>e.x!==void 0&&e.y!==void 0);function g(F){const{"onUpdate:show":z,onUpdateShow:j,onShow:Z,onHide:J}=e;i.value=F,z&&Ye(z,F),j&&Ye(j,F),F&&Z&&Ye(Z,!0),F&&J&&Ye(J,!1)}function b(){f&&f.syncPosition()}function v(){const{value:F}=d;F&&(window.clearTimeout(F),d.value=null)}function x(){const{value:F}=h;F&&(window.clearTimeout(F),h.value=null)}function y(){const F=s();if(e.trigger==="focus"&&!F){if(l())return;g(!0)}}function _(){const F=s();if(e.trigger==="focus"&&!F){if(!l())return;g(!1)}}function S(){const F=s();if(e.trigger==="hover"&&!F){if(x(),d.value!==null||l())return;const z=()=>{g(!0),d.value=null},{delay:j}=e;j===0?z():d.value=window.setTimeout(z,j)}}function $(){const F=s();if(e.trigger==="hover"&&!F){if(v(),h.value!==null||!l())return;const z=()=>{g(!1),h.value=null},{duration:j}=e;j===0?z():h.value=window.setTimeout(z,j)}}function w(){$()}function T(F){var z;l()&&(e.trigger==="click"&&(v(),x(),g(!1)),(z=e.onClickoutside)===null||z===void 0||z.call(e,F))}function M(){if(e.trigger==="click"&&!s()){v(),x();const F=!l();g(F)}}function P(F){e.internalTrapFocus&&F.key==="Escape"&&(v(),x(),g(!1))}function R(F){i.value=F}function C(){var F;return(F=n.value)===null||F===void 0?void 0:F.targetRef}function E(F){f=F}return jn("NPopover",{getTriggerElement:C,handleKeydown:P,handleMouseEnter:S,handleMouseLeave:$,handleClickOutside:T,handleMouseMoveOutside:w,setBodyInstance:E,positionManuallyRef:p,isMountedRef:t,zIndexRef:et(e,"zIndex"),extraClassRef:et(e,"internalExtraClass"),internalRenderBodyRef:et(e,"internalRenderBody")}),xr(()=>{o.value&&s()&&g(!1)}),{binderInstRef:n,positionManually:p,mergedShowConsideringDisabledProp:a,uncontrolledShow:i,mergedShowArrow:c,getMergedShow:l,setShow:R,handleClick:M,handleMouseEnter:S,handleMouseLeave:$,handleFocus:y,handleBlur:_,syncPosition:b}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=p1(n,"activator"):r=p1(n,"trigger"),r)){r=Vr(r),r=r.type===gu?k("span",[r]):r;const o={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[o,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[o];else{const{internalInheritedEventHandlers:a}=this,s=[o,...a],l={onBlur:u=>{s.forEach(c=>{c.onBlur(u)})},onFocus:u=>{s.forEach(c=>{c.onFocus(u)})},onClick:u=>{s.forEach(c=>{c.onClick(u)})},onMouseenter:u=>{s.forEach(c=>{c.onMouseenter(u)})},onMouseleave:u=>{s.forEach(c=>{c.onMouseleave(u)})}};az(r,a?"nested":t?"manual":this.trigger,l)}}return k(xf,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const o=this.getMergedShow();return[this.internalTrapFocus&&o?lo(k("div",{style:{position:"fixed",inset:0}}),[[x2,{enabled:o,zIndex:this.zIndex}]]):null,t?null:k(wf,null,{default:()=>r}),k(rz,S9(this.$props,iz,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:o})),{default:()=>{var a,s;return(s=(a=this.$slots).default)===null||s===void 0?void 0:s.call(a)},header:()=>{var a,s;return(s=(a=this.$slots).header)===null||s===void 0?void 0:s.call(a)},footer:()=>{var a,s;return(s=(a=this.$slots).footer)===null||s===void 0?void 0:s.call(a)}})]}})}}),lz={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function uz(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:o,successColor:a,warningColor:s,errorColor:l,baseColor:u,borderColor:c,opacityDisabled:f,tagColor:d,closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,borderRadiusSmall:b,fontSizeMini:v,fontSizeTiny:x,fontSizeSmall:y,fontSizeMedium:_,heightMini:S,heightTiny:$,heightSmall:w,heightMedium:T,closeColorHover:M,closeColorPressed:P,buttonColor2Hover:R,buttonColor2Pressed:C,fontWeightStrong:E}=e;return Object.assign(Object.assign({},lz),{closeBorderRadius:b,heightTiny:S,heightSmall:$,heightMedium:w,heightLarge:T,borderRadius:b,opacityDisabled:f,fontSizeTiny:v,fontSizeSmall:x,fontSizeMedium:y,fontSizeLarge:_,fontWeightStrong:E,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:"#0000",colorHoverCheckable:R,colorPressedCheckable:C,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${c}`,textColor:t,color:d,colorBordered:"rgb(250, 250, 252)",closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,closeColorHover:M,closeColorPressed:P,borderPrimary:`1px solid ${nt(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:nt(i,{alpha:.12}),colorBorderedPrimary:nt(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:nt(i,{alpha:.12}),closeColorPressedPrimary:nt(i,{alpha:.18}),borderInfo:`1px solid ${nt(o,{alpha:.3})}`,textColorInfo:o,colorInfo:nt(o,{alpha:.12}),colorBorderedInfo:nt(o,{alpha:.1}),closeIconColorInfo:o,closeIconColorHoverInfo:o,closeIconColorPressedInfo:o,closeColorHoverInfo:nt(o,{alpha:.12}),closeColorPressedInfo:nt(o,{alpha:.18}),borderSuccess:`1px solid ${nt(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:nt(a,{alpha:.12}),colorBorderedSuccess:nt(a,{alpha:.1}),closeIconColorSuccess:a,closeIconColorHoverSuccess:a,closeIconColorPressedSuccess:a,closeColorHoverSuccess:nt(a,{alpha:.12}),closeColorPressedSuccess:nt(a,{alpha:.18}),borderWarning:`1px solid ${nt(s,{alpha:.35})}`,textColorWarning:s,colorWarning:nt(s,{alpha:.15}),colorBorderedWarning:nt(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:nt(s,{alpha:.12}),closeColorPressedWarning:nt(s,{alpha:.18}),borderError:`1px solid ${nt(l,{alpha:.23})}`,textColorError:l,colorError:nt(l,{alpha:.1}),colorBorderedError:nt(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:nt(l,{alpha:.12}),closeColorPressedError:nt(l,{alpha:.18})})}const cz={common:hn,self:uz},dz={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},fz=W("tag",`
|
|
452
|
+
`,[W("popover-arrow",t)])])])}const y5=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function nz({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return k("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},k("div",{class:[`${i}-popover-arrow`,e],style:t}))}const rz=Fe({name:"PopoverBody",inheritAttrs:!1,props:y5,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o}=rn(e),a=pt("Popover","-popover",tz,bv,e,i),s=ne(null),l=$t("NPopover"),u=ne(null),c=ne(e.show),d=ne(!1);xr(()=>{const{show:w}=e;w&&!x9()&&!e.internalDeactivateImmediately&&(d.value=!0)});const f=pe(()=>{const{trigger:w,onClickoutside:T}=e,M=[],{positionManuallyRef:{value:P}}=l;return P||(w==="click"&&!T&&M.push([Ol,_,void 0,{capture:!0}]),w==="hover"&&M.push([Tk,y])),T&&M.push([Ol,_,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&d.value)&&M.push([md,e.show]),M}),h=pe(()=>{const{common:{cubicBezierEaseInOut:w,cubicBezierEaseIn:T,cubicBezierEaseOut:M},self:{space:P,spaceArrow:R,padding:C,fontSize:E,textColor:F,dividerColor:z,color:j,boxShadow:Z,borderRadius:J,arrowHeight:ie,arrowOffset:he,arrowOffsetVertical:_e}}=a.value;return{"--n-box-shadow":Z,"--n-bezier":w,"--n-bezier-ease-in":T,"--n-bezier-ease-out":M,"--n-font-size":E,"--n-text-color":F,"--n-color":j,"--n-divider-color":z,"--n-border-radius":J,"--n-arrow-height":ie,"--n-arrow-offset":he,"--n-arrow-offset-vertical":_e,"--n-padding":C,"--n-space":P,"--n-space-arrow":R}}),p=pe(()=>{const w=e.width==="trigger"?void 0:Rc(e.width),T=[];w&&T.push({width:w});const{maxWidth:M,minWidth:P}=e;return M&&T.push({maxWidth:Rc(M)}),P&&T.push({maxWidth:Rc(P)}),o||T.push(h.value),T}),g=o?Cn("popover",void 0,h,e):void 0;l.setBodyInstance({syncPosition:b}),Bn(()=>{l.setBodyInstance(null)}),vt(et(e,"show"),w=>{e.animated||(w?c.value=!0:c.value=!1)});function b(){var w;(w=s.value)===null||w===void 0||w.syncPosition()}function v(w){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&l.handleMouseEnter(w)}function x(w){e.trigger==="hover"&&e.keepAliveOnHover&&l.handleMouseLeave(w)}function y(w){e.trigger==="hover"&&!S().contains(Qa(w))&&l.handleMouseMoveOutside(w)}function _(w){(e.trigger==="click"&&!S().contains(Qa(w))||e.onClickoutside)&&l.handleClickOutside(w)}function S(){return l.getTriggerElement()}jn(b2,u),jn(g2,null),jn(v2,null);function $(){if(g==null||g.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&d.value))return null;let w;const T=l.internalRenderBodyRef.value,{value:M}=i;if(T)w=T([`${M}-popover-shared`,g==null?void 0:g.themeClass.value,e.overlap&&`${M}-popover-shared--overlap`,e.showArrow&&`${M}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${M}-popover-shared--center-arrow`],u,p.value,v,x);else{const{value:P}=l.extraClassRef,{internalTrapFocus:R}=e,C=!ja(t.header)||!ja(t.footer),E=()=>{var F,z;const j=C?k(kt,null,Bt(t.header,ie=>ie?k("div",{class:[`${M}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Bt(t.default,ie=>ie?k("div",{class:[`${M}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Bt(t.footer,ie=>ie?k("div",{class:[`${M}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(F=t.default)===null||F===void 0?void 0:F.call(t):k("div",{class:[`${M}-popover__content`,e.contentClass],style:e.contentStyle},t),Z=e.scrollable?k(bR,{contentClass:C?void 0:`${M}-popover__content ${(z=e.contentClass)!==null&&z!==void 0?z:""}`,contentStyle:C?void 0:e.contentStyle},{default:()=>j}):j,J=e.showArrow?nz({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:M}):null;return[Z,J]};w=k("div",ia({class:[`${M}-popover`,`${M}-popover-shared`,g==null?void 0:g.themeClass.value,P.map(F=>`${M}-${F}`),{[`${M}-popover--scrollable`]:e.scrollable,[`${M}-popover--show-header-or-footer`]:C,[`${M}-popover--raw`]:e.raw,[`${M}-popover-shared--overlap`]:e.overlap,[`${M}-popover-shared--show-arrow`]:e.showArrow,[`${M}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:u,style:p.value,onKeydown:l.handleKeydown,onMouseenter:v,onMouseleave:x},n),R?k(y9,{active:e.show,autoFocus:!0},{default:E}):E())}return lo(w,f.value)}return{displayed:d,namespace:r,isMounted:l.isMountedRef,zIndex:l.zIndexRef,followerRef:s,adjustedTo:Pn(e),followerEnabled:c,renderContentNode:$}},render(){return k(Sd,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===Pn.tdkey},{default:()=>this.animated?k(wr,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),iz=Object.keys(y5),oz={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function az(e,t,n){oz[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],o=n[r];i?e.props[r]=(...a)=>{i(...a),o(...a)}:e.props[r]=o})}const _5={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:Pn.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},sz=Object.assign(Object.assign(Object.assign({},pt.props),_5),{internalOnAfterLeave:Function,internalRenderBody:Function}),x5=Fe({name:"Popover",inheritAttrs:!1,props:sz,__popover__:!0,setup(e){const t=gs(),n=ne(null),r=pe(()=>e.show),i=ne(e.defaultShow),o=Gr(r,i),a=Ht(()=>e.disabled?!1:o.value),s=()=>{if(e.disabled)return!0;const{getDisabled:F}=e;return!!(F!=null&&F())},l=()=>s()?!1:o.value,u=nf(e,["arrow","showArrow"]),c=pe(()=>e.overlap?!1:u.value);let d=null;const f=ne(null),h=ne(null),p=Ht(()=>e.x!==void 0&&e.y!==void 0);function g(F){const{"onUpdate:show":z,onUpdateShow:j,onShow:Z,onHide:J}=e;i.value=F,z&&Ye(z,F),j&&Ye(j,F),F&&Z&&Ye(Z,!0),F&&J&&Ye(J,!1)}function b(){d&&d.syncPosition()}function v(){const{value:F}=f;F&&(window.clearTimeout(F),f.value=null)}function x(){const{value:F}=h;F&&(window.clearTimeout(F),h.value=null)}function y(){const F=s();if(e.trigger==="focus"&&!F){if(l())return;g(!0)}}function _(){const F=s();if(e.trigger==="focus"&&!F){if(!l())return;g(!1)}}function S(){const F=s();if(e.trigger==="hover"&&!F){if(x(),f.value!==null||l())return;const z=()=>{g(!0),f.value=null},{delay:j}=e;j===0?z():f.value=window.setTimeout(z,j)}}function $(){const F=s();if(e.trigger==="hover"&&!F){if(v(),h.value!==null||!l())return;const z=()=>{g(!1),h.value=null},{duration:j}=e;j===0?z():h.value=window.setTimeout(z,j)}}function w(){$()}function T(F){var z;l()&&(e.trigger==="click"&&(v(),x(),g(!1)),(z=e.onClickoutside)===null||z===void 0||z.call(e,F))}function M(){if(e.trigger==="click"&&!s()){v(),x();const F=!l();g(F)}}function P(F){e.internalTrapFocus&&F.key==="Escape"&&(v(),x(),g(!1))}function R(F){i.value=F}function C(){var F;return(F=n.value)===null||F===void 0?void 0:F.targetRef}function E(F){d=F}return jn("NPopover",{getTriggerElement:C,handleKeydown:P,handleMouseEnter:S,handleMouseLeave:$,handleClickOutside:T,handleMouseMoveOutside:w,setBodyInstance:E,positionManuallyRef:p,isMountedRef:t,zIndexRef:et(e,"zIndex"),extraClassRef:et(e,"internalExtraClass"),internalRenderBodyRef:et(e,"internalRenderBody")}),xr(()=>{o.value&&s()&&g(!1)}),{binderInstRef:n,positionManually:p,mergedShowConsideringDisabledProp:a,uncontrolledShow:i,mergedShowArrow:c,getMergedShow:l,setShow:R,handleClick:M,handleMouseEnter:S,handleMouseLeave:$,handleFocus:y,handleBlur:_,syncPosition:b}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=p1(n,"activator"):r=p1(n,"trigger"),r)){r=Vr(r),r=r.type===gu?k("span",[r]):r;const o={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[o,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[o];else{const{internalInheritedEventHandlers:a}=this,s=[o,...a],l={onBlur:u=>{s.forEach(c=>{c.onBlur(u)})},onFocus:u=>{s.forEach(c=>{c.onFocus(u)})},onClick:u=>{s.forEach(c=>{c.onClick(u)})},onMouseenter:u=>{s.forEach(c=>{c.onMouseenter(u)})},onMouseleave:u=>{s.forEach(c=>{c.onMouseleave(u)})}};az(r,a?"nested":t?"manual":this.trigger,l)}}return k(xd,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const o=this.getMergedShow();return[this.internalTrapFocus&&o?lo(k("div",{style:{position:"fixed",inset:0}}),[[x2,{enabled:o,zIndex:this.zIndex}]]):null,t?null:k(wd,null,{default:()=>r}),k(rz,S9(this.$props,iz,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:o})),{default:()=>{var a,s;return(s=(a=this.$slots).default)===null||s===void 0?void 0:s.call(a)},header:()=>{var a,s;return(s=(a=this.$slots).header)===null||s===void 0?void 0:s.call(a)},footer:()=>{var a,s;return(s=(a=this.$slots).footer)===null||s===void 0?void 0:s.call(a)}})]}})}}),lz={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px"};function uz(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:o,successColor:a,warningColor:s,errorColor:l,baseColor:u,borderColor:c,opacityDisabled:d,tagColor:f,closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,borderRadiusSmall:b,fontSizeMini:v,fontSizeTiny:x,fontSizeSmall:y,fontSizeMedium:_,heightMini:S,heightTiny:$,heightSmall:w,heightMedium:T,closeColorHover:M,closeColorPressed:P,buttonColor2Hover:R,buttonColor2Pressed:C,fontWeightStrong:E}=e;return Object.assign(Object.assign({},lz),{closeBorderRadius:b,heightTiny:S,heightSmall:$,heightMedium:w,heightLarge:T,borderRadius:b,opacityDisabled:d,fontSizeTiny:v,fontSizeSmall:x,fontSizeMedium:y,fontSizeLarge:_,fontWeightStrong:E,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:"#0000",colorHoverCheckable:R,colorPressedCheckable:C,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${c}`,textColor:t,color:f,colorBordered:"rgb(250, 250, 252)",closeIconColor:h,closeIconColorHover:p,closeIconColorPressed:g,closeColorHover:M,closeColorPressed:P,borderPrimary:`1px solid ${nt(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:nt(i,{alpha:.12}),colorBorderedPrimary:nt(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:nt(i,{alpha:.12}),closeColorPressedPrimary:nt(i,{alpha:.18}),borderInfo:`1px solid ${nt(o,{alpha:.3})}`,textColorInfo:o,colorInfo:nt(o,{alpha:.12}),colorBorderedInfo:nt(o,{alpha:.1}),closeIconColorInfo:o,closeIconColorHoverInfo:o,closeIconColorPressedInfo:o,closeColorHoverInfo:nt(o,{alpha:.12}),closeColorPressedInfo:nt(o,{alpha:.18}),borderSuccess:`1px solid ${nt(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:nt(a,{alpha:.12}),colorBorderedSuccess:nt(a,{alpha:.1}),closeIconColorSuccess:a,closeIconColorHoverSuccess:a,closeIconColorPressedSuccess:a,closeColorHoverSuccess:nt(a,{alpha:.12}),closeColorPressedSuccess:nt(a,{alpha:.18}),borderWarning:`1px solid ${nt(s,{alpha:.35})}`,textColorWarning:s,colorWarning:nt(s,{alpha:.15}),colorBorderedWarning:nt(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:nt(s,{alpha:.12}),closeColorPressedWarning:nt(s,{alpha:.18}),borderError:`1px solid ${nt(l,{alpha:.23})}`,textColorError:l,colorError:nt(l,{alpha:.1}),colorBorderedError:nt(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:nt(l,{alpha:.12}),closeColorPressedError:nt(l,{alpha:.18})})}const cz={common:hn,self:uz},fz={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},dz=W("tag",`
|
|
453
453
|
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
454
454
|
white-space: nowrap;
|
|
455
455
|
position: relative;
|
|
@@ -519,7 +519,7 @@ ${t}
|
|
|
519
519
|
`,[Vt("disabled",[ce("&:hover","background-color: var(--n-color-hover-checkable);",[Vt("checked","color: var(--n-text-color-hover-checkable);")]),ce("&:active","background-color: var(--n-color-pressed-checkable);",[Vt("checked","color: var(--n-text-color-pressed-checkable);")])]),ge("checked",`
|
|
520
520
|
color: var(--n-text-color-checked);
|
|
521
521
|
background-color: var(--n-color-checked);
|
|
522
|
-
`,[Vt("disabled",[ce("&:hover","background-color: var(--n-color-checked-hover);"),ce("&:active","background-color: var(--n-color-checked-pressed);")])])])]),hz=Object.assign(Object.assign(Object.assign({},pt.props),
|
|
522
|
+
`,[Vt("disabled",[ce("&:hover","background-color: var(--n-color-checked-hover);"),ce("&:active","background-color: var(--n-color-checked-pressed);")])])])]),hz=Object.assign(Object.assign(Object.assign({},pt.props),fz),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),pz="n-tag",Xh=Fe({name:"Tag",props:hz,setup(e){const t=ne(null),{mergedBorderedRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:o}=rn(e),a=pt("Tag","-tag",dz,cz,e,r);jn(pz,{roundRef:et(e,"round")});function s(){if(!e.disabled&&e.checkable){const{checked:h,onCheckedChange:p,onUpdateChecked:g,"onUpdate:checked":b}=e;g&&g(!h),b&&b(!h),p&&p(!h)}}function l(h){if(e.triggerClickOnClose||h.stopPropagation(),!e.disabled){const{onClose:p}=e;p&&Ye(p,h)}}const u={setTextContent(h){const{value:p}=t;p&&(p.textContent=h)}},c=co("Tag",o,r),d=pe(()=>{const{type:h,size:p,color:{color:g,textColor:b}={}}=e,{common:{cubicBezierEaseInOut:v},self:{padding:x,closeMargin:y,borderRadius:_,opacityDisabled:S,textColorCheckable:$,textColorHoverCheckable:w,textColorPressedCheckable:T,textColorChecked:M,colorCheckable:P,colorHoverCheckable:R,colorPressedCheckable:C,colorChecked:E,colorCheckedHover:F,colorCheckedPressed:z,closeBorderRadius:j,fontWeightStrong:Z,[Se("colorBordered",h)]:J,[Se("closeSize",p)]:ie,[Se("closeIconSize",p)]:he,[Se("fontSize",p)]:_e,[Se("height",p)]:oe,[Se("color",h)]:ve,[Se("textColor",h)]:we,[Se("border",h)]:Oe,[Se("closeIconColor",h)]:xe,[Se("closeIconColorHover",h)]:Xe,[Se("closeIconColorPressed",h)]:Ve,[Se("closeColorHover",h)]:fe,[Se("closeColorPressed",h)]:Ee}}=a.value,Pe=Kn(y);return{"--n-font-weight-strong":Z,"--n-avatar-size-override":`calc(${oe} - 8px)`,"--n-bezier":v,"--n-border-radius":_,"--n-border":Oe,"--n-close-icon-size":he,"--n-close-color-pressed":Ee,"--n-close-color-hover":fe,"--n-close-border-radius":j,"--n-close-icon-color":xe,"--n-close-icon-color-hover":Xe,"--n-close-icon-color-pressed":Ve,"--n-close-icon-color-disabled":xe,"--n-close-margin-top":Pe.top,"--n-close-margin-right":Pe.right,"--n-close-margin-bottom":Pe.bottom,"--n-close-margin-left":Pe.left,"--n-close-size":ie,"--n-color":g||(n.value?J:ve),"--n-color-checkable":P,"--n-color-checked":E,"--n-color-checked-hover":F,"--n-color-checked-pressed":z,"--n-color-hover-checkable":R,"--n-color-pressed-checkable":C,"--n-font-size":_e,"--n-height":oe,"--n-opacity-disabled":S,"--n-padding":x,"--n-text-color":b||we,"--n-text-color-checkable":$,"--n-text-color-checked":M,"--n-text-color-hover-checkable":w,"--n-text-color-pressed-checkable":T}}),f=i?Cn("tag",pe(()=>{let h="";const{type:p,size:g,color:{color:b,textColor:v}={}}=e;return h+=p[0],h+=g[0],b&&(h+=`a${of(b)}`),v&&(h+=`b${of(v)}`),n.value&&(h+="c"),h}),d,e):void 0;return Object.assign(Object.assign({},u),{rtlEnabled:c,mergedClsPrefix:r,contentRef:t,mergedBordered:n,handleClick:s,handleCloseClick:l,cssVars:i?void 0:d,themeClass:f==null?void 0:f.themeClass,onRender:f==null?void 0:f.onRender})},render(){var e,t;const{mergedClsPrefix:n,rtlEnabled:r,closable:i,color:{borderColor:o}={},round:a,onRender:s,$slots:l}=this;s==null||s();const u=Bt(l.avatar,d=>d&&k("div",{class:`${n}-tag__avatar`},d)),c=Bt(l.icon,d=>d&&k("div",{class:`${n}-tag__icon`},d));return k("div",{class:[`${n}-tag`,this.themeClass,{[`${n}-tag--rtl`]:r,[`${n}-tag--strong`]:this.strong,[`${n}-tag--disabled`]:this.disabled,[`${n}-tag--checkable`]:this.checkable,[`${n}-tag--checked`]:this.checkable&&this.checked,[`${n}-tag--round`]:a,[`${n}-tag--avatar`]:u,[`${n}-tag--icon`]:c,[`${n}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},c||u,k("span",{class:`${n}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&i?k(pv,{clsPrefix:n,class:`${n}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:a,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?k("div",{class:`${n}-tag__border`,style:{borderColor:o}}):null)}}),w5=Fe({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:n}=e;return k(Ad,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?k(S0,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>k(Cr,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>Ur(t.default,()=>[k(GP,null)])})}):null})}}}),gz={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};function vz(e){const{borderRadius:t,textColor2:n,textColorDisabled:r,inputColor:i,inputColorDisabled:o,primaryColor:a,primaryColorHover:s,warningColor:l,warningColorHover:u,errorColor:c,errorColorHover:d,borderColor:f,iconColor:h,iconColorDisabled:p,clearColor:g,clearColorHover:b,clearColorPressed:v,placeholderColor:x,placeholderColorDisabled:y,fontSizeTiny:_,fontSizeSmall:S,fontSizeMedium:$,fontSizeLarge:w,heightTiny:T,heightSmall:M,heightMedium:P,heightLarge:R,fontWeight:C}=e;return Object.assign(Object.assign({},gz),{fontSizeTiny:_,fontSizeSmall:S,fontSizeMedium:$,fontSizeLarge:w,heightTiny:T,heightSmall:M,heightMedium:P,heightLarge:R,borderRadius:t,fontWeight:C,textColor:n,textColorDisabled:r,placeholderColor:x,placeholderColorDisabled:y,color:i,colorDisabled:o,colorActive:i,border:`1px solid ${f}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${s}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${nt(a,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${nt(a,{alpha:.2})}`,caretColor:a,arrowColor:h,arrowColorDisabled:p,loadingColor:a,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,borderActiveWarning:`1px solid ${l}`,borderFocusWarning:`1px solid ${u}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${nt(l,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${nt(l,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:l,borderError:`1px solid ${c}`,borderHoverError:`1px solid ${d}`,borderActiveError:`1px solid ${c}`,borderFocusError:`1px solid ${d}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${nt(c,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${nt(c,{alpha:.2})}`,colorActiveError:i,caretColorError:c,clearColor:g,clearColorHover:b,clearColorPressed:v})}const C5={name:"InternalSelection",common:hn,peers:{Popover:bv},self:vz},bz=ce([W("base-selection",`
|
|
523
523
|
--n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
|
|
524
524
|
--n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
|
|
525
525
|
position: relative;
|
|
@@ -719,7 +719,7 @@ ${t}
|
|
|
719
719
|
line-height: 1.25;
|
|
720
720
|
text-overflow: ellipsis;
|
|
721
721
|
overflow: hidden;
|
|
722
|
-
`)])])]),mz=Fe({name:"InternalSelection",props:Object.assign(Object.assign({},pt.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=rn(e),r=co("InternalSelection",n,t),i=ne(null),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),f=ne(null),d=ne(null),h=ne(null),p=ne(!1),g=ne(!1),b=ne(!1),v=pt("InternalSelection","-internal-selection",bz,C5,e,et(e,"clsPrefix")),x=pe(()=>e.clearable&&!e.disabled&&(b.value||e.active)),y=pe(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Fo(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),_=pe(()=>{const B=e.selectedOption;if(B)return B[e.labelField]}),S=pe(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function $(){var B;const{value:V}=i;if(V){const{value:me}=o;me&&(me.style.width=`${V.offsetWidth}px`,e.maxTagCount!=="responsive"&&((B=d.value)===null||B===void 0||B.sync({showAllItemsBeforeCalculate:!1})))}}function w(){const{value:B}=h;B&&(B.style.display="none")}function T(){const{value:B}=h;B&&(B.style.display="inline-block")}vt(et(e,"active"),B=>{B||w()}),vt(et(e,"pattern"),()=>{e.multiple&&dn($)});function M(B){const{onFocus:V}=e;V&&V(B)}function P(B){const{onBlur:V}=e;V&&V(B)}function R(B){const{onDeleteOption:V}=e;V&&V(B)}function C(B){const{onClear:V}=e;V&&V(B)}function E(B){const{onPatternInput:V}=e;V&&V(B)}function F(B){var V;(!B.relatedTarget||!(!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)))&&M(B)}function z(B){var V;!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)||P(B)}function j(B){C(B)}function Z(){b.value=!0}function J(){b.value=!1}function ie(B){!e.active||!e.filterable||B.target!==o.value&&B.preventDefault()}function he(B){R(B)}const _e=ne(!1);function oe(B){if(B.key==="Backspace"&&!_e.value&&!e.pattern.length){const{selectedOptions:V}=e;V!=null&&V.length&&he(V[V.length-1])}}let ve=null;function we(B){const{value:V}=i;if(V){const me=B.target.value;V.textContent=me,$()}e.ignoreComposition&&_e.value?ve=B:E(B)}function Oe(){_e.value=!0}function xe(){_e.value=!1,e.ignoreComposition&&E(ve),ve=null}function Xe(B){var V;g.value=!0,(V=e.onPatternFocus)===null||V===void 0||V.call(e,B)}function Ve(B){var V;g.value=!1,(V=e.onPatternBlur)===null||V===void 0||V.call(e,B)}function de(){var B,V;if(e.filterable)g.value=!1,(B=u.value)===null||B===void 0||B.blur(),(V=o.value)===null||V===void 0||V.blur();else if(e.multiple){const{value:me}=s;me==null||me.blur()}else{const{value:me}=l;me==null||me.blur()}}function Ee(){var B,V,me;e.filterable?(g.value=!1,(B=u.value)===null||B===void 0||B.focus()):e.multiple?(V=s.value)===null||V===void 0||V.focus():(me=l.value)===null||me===void 0||me.focus()}function Pe(){const{value:B}=o;B&&(T(),B.focus())}function A(){const{value:B}=o;B&&B.blur()}function H(B){const{value:V}=c;V&&V.setTextContent(`+${B}`)}function Y(){const{value:B}=f;return B}function fe(){return o.value}let le=null;function q(){le!==null&&window.clearTimeout(le)}function N(){e.active||(q(),le=window.setTimeout(()=>{S.value&&(p.value=!0)},100))}function re(){q()}function L(B){B||(q(),p.value=!1)}vt(S,B=>{B||(p.value=!1)}),fn(()=>{xr(()=>{const B=u.value;B&&(e.disabled?B.removeAttribute("tabindex"):B.tabIndex=g.value?-1:0)})}),F2(a,e.onResize);const{inlineThemeDisabled:O}=e,ee=pe(()=>{const{size:B}=e,{common:{cubicBezierEaseInOut:V},self:{fontWeight:me,borderRadius:Ae,color:Re,placeholderColor:rt,textColor:lt,paddingSingle:dt,paddingMultiple:zt,caretColor:yt,colorDisabled:Lt,textColorDisabled:ye,placeholderColorDisabled:G,colorActive:m,boxShadowFocus:I,boxShadowActive:D,boxShadowHover:te,border:K,borderFocus:se,borderHover:ue,borderActive:ae,arrowColor:ke,arrowColorDisabled:Me,loadingColor:$e,colorActiveWarning:ze,boxShadowFocusWarning:Je,boxShadowActiveWarning:Ne,boxShadowHoverWarning:ht,borderWarning:Le,borderFocusWarning:Be,borderHoverWarning:X,borderActiveWarning:be,colorActiveError:He,boxShadowFocusError:Te,boxShadowActiveError:gt,boxShadowHoverError:De,borderError:ut,borderFocusError:pn,borderHoverError:Wt,borderActiveError:vo,clearColor:bo,clearColorHover:Ss,clearColorPressed:fh,clearSize:hh,arrowSize:ph,[Se("height",B)]:gh,[Se("fontSize",B)]:vh}}=v.value,xa=Kn(dt),wa=Kn(zt);return{"--n-bezier":V,"--n-border":K,"--n-border-active":ae,"--n-border-focus":se,"--n-border-hover":ue,"--n-border-radius":Ae,"--n-box-shadow-active":D,"--n-box-shadow-focus":I,"--n-box-shadow-hover":te,"--n-caret-color":yt,"--n-color":Re,"--n-color-active":m,"--n-color-disabled":Lt,"--n-font-size":vh,"--n-height":gh,"--n-padding-single-top":xa.top,"--n-padding-multiple-top":wa.top,"--n-padding-single-right":xa.right,"--n-padding-multiple-right":wa.right,"--n-padding-single-left":xa.left,"--n-padding-multiple-left":wa.left,"--n-padding-single-bottom":xa.bottom,"--n-padding-multiple-bottom":wa.bottom,"--n-placeholder-color":rt,"--n-placeholder-color-disabled":G,"--n-text-color":lt,"--n-text-color-disabled":ye,"--n-arrow-color":ke,"--n-arrow-color-disabled":Me,"--n-loading-color":$e,"--n-color-active-warning":ze,"--n-box-shadow-focus-warning":Je,"--n-box-shadow-active-warning":Ne,"--n-box-shadow-hover-warning":ht,"--n-border-warning":Le,"--n-border-focus-warning":Be,"--n-border-hover-warning":X,"--n-border-active-warning":be,"--n-color-active-error":He,"--n-box-shadow-focus-error":Te,"--n-box-shadow-active-error":gt,"--n-box-shadow-hover-error":De,"--n-border-error":ut,"--n-border-focus-error":pn,"--n-border-hover-error":Wt,"--n-border-active-error":vo,"--n-clear-size":hh,"--n-clear-color":bo,"--n-clear-color-hover":Ss,"--n-clear-color-pressed":fh,"--n-arrow-size":ph,"--n-font-weight":me}}),U=O?Cn("internal-selection",pe(()=>e.size[0]),ee,e):void 0;return{mergedTheme:v,mergedClearable:x,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:g,filterablePlaceholder:y,label:_,selected:S,showTagsPanel:p,isComposing:_e,counterRef:c,counterWrapperRef:f,patternInputMirrorRef:i,patternInputRef:o,selfRef:a,multipleElRef:s,singleElRef:l,patternInputWrapperRef:u,overflowRef:d,inputTagElRef:h,handleMouseDown:ie,handleFocusin:F,handleClear:j,handleMouseEnter:Z,handleMouseLeave:J,handleDeleteOption:he,handlePatternKeyDown:oe,handlePatternInputInput:we,handlePatternInputBlur:Ve,handlePatternInputFocus:Xe,handleMouseEnterCounter:N,handleMouseLeaveCounter:re,handleFocusout:z,handleCompositionEnd:xe,handleCompositionStart:Oe,onPopoverUpdateShow:L,focus:Ee,focusInput:Pe,blur:de,blurInput:A,updateCounter:H,getCounter:Y,getTail:fe,renderLabel:e.renderLabel,cssVars:O?void 0:ee,themeClass:U==null?void 0:U.themeClass,onRender:U==null?void 0:U.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:o,bordered:a,clsPrefix:s,ellipsisTagPopoverProps:l,onRender:u,renderTag:c,renderLabel:f}=this;u==null||u();const d=o==="responsive",h=typeof o=="number",p=d||h,g=k(g0,null,{default:()=>k(w5,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var v,x;return(x=(v=this.$slots).arrow)===null||x===void 0?void 0:x.call(v)}})});let b;if(t){const{labelField:v}=this,x=C=>k("div",{class:`${s}-base-selection-tag-wrapper`,key:C.value},c?c({option:C,handleClose:()=>{this.handleDeleteOption(C)}}):k(Xh,{size:n,closable:!C.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(C)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>f?f(C,!0):Fo(C[v],C,!0)})),y=()=>(h?this.selectedOptions.slice(0,o):this.selectedOptions).map(x),_=i?k("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},k("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),k("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,S=d?()=>k("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},k(Xh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let $;if(h){const C=this.selectedOptions.length-o;C>0&&($=k("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},k(Xh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${C}`})))}const w=d?i?k(c1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S,tail:()=>_}):k(c1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S}):h&&$?y().concat($):y(),T=p?()=>k("div",{class:`${s}-base-selection-popover`},d?y():this.selectedOptions.map(x)):void 0,M=p?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},l):null,P=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},k("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,R=i?k("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},w,d?null:_,g):k("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},w,g);b=k(kt,null,p?k(x5,Object.assign({},M,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>R,default:T}):R,P)}else if(i){const v=this.pattern||this.isComposing,x=this.active?!v:!this.selected,y=this.active?!1:this.selected;b=k("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:h1(this.label)},k("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),y?k("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},k("div",{class:`${s}-base-selection-overlay__wrapper`},c?c({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):Fo(this.label,this.selectedOption,!0))):null,x?k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},k("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,g)}else b=k("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?k("div",{class:`${s}-base-selection-input`,title:h1(this.label),key:"input"},k("div",{class:`${s}-base-selection-input__content`},c?c({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):Fo(this.label,this.selectedOption,!0))):k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},k("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),g);return k("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},b,a?k("div",{class:`${s}-base-selection__border`}):null,a?k("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:ki}=ca;function yz({duration:e=".2s",delay:t=".1s"}={}){return[ce("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),ce("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
722
|
+
`)])])]),mz=Fe({name:"InternalSelection",props:Object.assign(Object.assign({},pt.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=rn(e),r=co("InternalSelection",n,t),i=ne(null),o=ne(null),a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(!1),g=ne(!1),b=ne(!1),v=pt("InternalSelection","-internal-selection",bz,C5,e,et(e,"clsPrefix")),x=pe(()=>e.clearable&&!e.disabled&&(b.value||e.active)),y=pe(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Fo(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),_=pe(()=>{const B=e.selectedOption;if(B)return B[e.labelField]}),S=pe(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function $(){var B;const{value:V}=i;if(V){const{value:me}=o;me&&(me.style.width=`${V.offsetWidth}px`,e.maxTagCount!=="responsive"&&((B=f.value)===null||B===void 0||B.sync({showAllItemsBeforeCalculate:!1})))}}function w(){const{value:B}=h;B&&(B.style.display="none")}function T(){const{value:B}=h;B&&(B.style.display="inline-block")}vt(et(e,"active"),B=>{B||w()}),vt(et(e,"pattern"),()=>{e.multiple&&fn($)});function M(B){const{onFocus:V}=e;V&&V(B)}function P(B){const{onBlur:V}=e;V&&V(B)}function R(B){const{onDeleteOption:V}=e;V&&V(B)}function C(B){const{onClear:V}=e;V&&V(B)}function E(B){const{onPatternInput:V}=e;V&&V(B)}function F(B){var V;(!B.relatedTarget||!(!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)))&&M(B)}function z(B){var V;!((V=a.value)===null||V===void 0)&&V.contains(B.relatedTarget)||P(B)}function j(B){C(B)}function Z(){b.value=!0}function J(){b.value=!1}function ie(B){!e.active||!e.filterable||B.target!==o.value&&B.preventDefault()}function he(B){R(B)}const _e=ne(!1);function oe(B){if(B.key==="Backspace"&&!_e.value&&!e.pattern.length){const{selectedOptions:V}=e;V!=null&&V.length&&he(V[V.length-1])}}let ve=null;function we(B){const{value:V}=i;if(V){const me=B.target.value;V.textContent=me,$()}e.ignoreComposition&&_e.value?ve=B:E(B)}function Oe(){_e.value=!0}function xe(){_e.value=!1,e.ignoreComposition&&E(ve),ve=null}function Xe(B){var V;g.value=!0,(V=e.onPatternFocus)===null||V===void 0||V.call(e,B)}function Ve(B){var V;g.value=!1,(V=e.onPatternBlur)===null||V===void 0||V.call(e,B)}function fe(){var B,V;if(e.filterable)g.value=!1,(B=u.value)===null||B===void 0||B.blur(),(V=o.value)===null||V===void 0||V.blur();else if(e.multiple){const{value:me}=s;me==null||me.blur()}else{const{value:me}=l;me==null||me.blur()}}function Ee(){var B,V,me;e.filterable?(g.value=!1,(B=u.value)===null||B===void 0||B.focus()):e.multiple?(V=s.value)===null||V===void 0||V.focus():(me=l.value)===null||me===void 0||me.focus()}function Pe(){const{value:B}=o;B&&(T(),B.focus())}function A(){const{value:B}=o;B&&B.blur()}function H(B){const{value:V}=c;V&&V.setTextContent(`+${B}`)}function Y(){const{value:B}=d;return B}function de(){return o.value}let le=null;function q(){le!==null&&window.clearTimeout(le)}function N(){e.active||(q(),le=window.setTimeout(()=>{S.value&&(p.value=!0)},100))}function re(){q()}function L(B){B||(q(),p.value=!1)}vt(S,B=>{B||(p.value=!1)}),dn(()=>{xr(()=>{const B=u.value;B&&(e.disabled?B.removeAttribute("tabindex"):B.tabIndex=g.value?-1:0)})}),F2(a,e.onResize);const{inlineThemeDisabled:O}=e,ee=pe(()=>{const{size:B}=e,{common:{cubicBezierEaseInOut:V},self:{fontWeight:me,borderRadius:Ae,color:Re,placeholderColor:rt,textColor:lt,paddingSingle:ft,paddingMultiple:zt,caretColor:yt,colorDisabled:Lt,textColorDisabled:ye,placeholderColorDisabled:G,colorActive:m,boxShadowFocus:I,boxShadowActive:D,boxShadowHover:te,border:K,borderFocus:se,borderHover:ue,borderActive:ae,arrowColor:ke,arrowColorDisabled:Me,loadingColor:$e,colorActiveWarning:ze,boxShadowFocusWarning:Je,boxShadowActiveWarning:Ne,boxShadowHoverWarning:ht,borderWarning:Le,borderFocusWarning:Be,borderHoverWarning:X,borderActiveWarning:be,colorActiveError:He,boxShadowFocusError:Te,boxShadowActiveError:gt,boxShadowHoverError:De,borderError:ut,borderFocusError:pn,borderHoverError:Wt,borderActiveError:vo,clearColor:bo,clearColorHover:Ss,clearColorPressed:dh,clearSize:hh,arrowSize:ph,[Se("height",B)]:gh,[Se("fontSize",B)]:vh}}=v.value,xa=Kn(ft),wa=Kn(zt);return{"--n-bezier":V,"--n-border":K,"--n-border-active":ae,"--n-border-focus":se,"--n-border-hover":ue,"--n-border-radius":Ae,"--n-box-shadow-active":D,"--n-box-shadow-focus":I,"--n-box-shadow-hover":te,"--n-caret-color":yt,"--n-color":Re,"--n-color-active":m,"--n-color-disabled":Lt,"--n-font-size":vh,"--n-height":gh,"--n-padding-single-top":xa.top,"--n-padding-multiple-top":wa.top,"--n-padding-single-right":xa.right,"--n-padding-multiple-right":wa.right,"--n-padding-single-left":xa.left,"--n-padding-multiple-left":wa.left,"--n-padding-single-bottom":xa.bottom,"--n-padding-multiple-bottom":wa.bottom,"--n-placeholder-color":rt,"--n-placeholder-color-disabled":G,"--n-text-color":lt,"--n-text-color-disabled":ye,"--n-arrow-color":ke,"--n-arrow-color-disabled":Me,"--n-loading-color":$e,"--n-color-active-warning":ze,"--n-box-shadow-focus-warning":Je,"--n-box-shadow-active-warning":Ne,"--n-box-shadow-hover-warning":ht,"--n-border-warning":Le,"--n-border-focus-warning":Be,"--n-border-hover-warning":X,"--n-border-active-warning":be,"--n-color-active-error":He,"--n-box-shadow-focus-error":Te,"--n-box-shadow-active-error":gt,"--n-box-shadow-hover-error":De,"--n-border-error":ut,"--n-border-focus-error":pn,"--n-border-hover-error":Wt,"--n-border-active-error":vo,"--n-clear-size":hh,"--n-clear-color":bo,"--n-clear-color-hover":Ss,"--n-clear-color-pressed":dh,"--n-arrow-size":ph,"--n-font-weight":me}}),U=O?Cn("internal-selection",pe(()=>e.size[0]),ee,e):void 0;return{mergedTheme:v,mergedClearable:x,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:g,filterablePlaceholder:y,label:_,selected:S,showTagsPanel:p,isComposing:_e,counterRef:c,counterWrapperRef:d,patternInputMirrorRef:i,patternInputRef:o,selfRef:a,multipleElRef:s,singleElRef:l,patternInputWrapperRef:u,overflowRef:f,inputTagElRef:h,handleMouseDown:ie,handleFocusin:F,handleClear:j,handleMouseEnter:Z,handleMouseLeave:J,handleDeleteOption:he,handlePatternKeyDown:oe,handlePatternInputInput:we,handlePatternInputBlur:Ve,handlePatternInputFocus:Xe,handleMouseEnterCounter:N,handleMouseLeaveCounter:re,handleFocusout:z,handleCompositionEnd:xe,handleCompositionStart:Oe,onPopoverUpdateShow:L,focus:Ee,focusInput:Pe,blur:fe,blurInput:A,updateCounter:H,getCounter:Y,getTail:de,renderLabel:e.renderLabel,cssVars:O?void 0:ee,themeClass:U==null?void 0:U.themeClass,onRender:U==null?void 0:U.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:o,bordered:a,clsPrefix:s,ellipsisTagPopoverProps:l,onRender:u,renderTag:c,renderLabel:d}=this;u==null||u();const f=o==="responsive",h=typeof o=="number",p=f||h,g=k(g0,null,{default:()=>k(w5,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var v,x;return(x=(v=this.$slots).arrow)===null||x===void 0?void 0:x.call(v)}})});let b;if(t){const{labelField:v}=this,x=C=>k("div",{class:`${s}-base-selection-tag-wrapper`,key:C.value},c?c({option:C,handleClose:()=>{this.handleDeleteOption(C)}}):k(Xh,{size:n,closable:!C.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(C)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>d?d(C,!0):Fo(C[v],C,!0)})),y=()=>(h?this.selectedOptions.slice(0,o):this.selectedOptions).map(x),_=i?k("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},k("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),k("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,S=f?()=>k("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},k(Xh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let $;if(h){const C=this.selectedOptions.length-o;C>0&&($=k("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},k(Xh,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${C}`})))}const w=f?i?k(c1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S,tail:()=>_}):k(c1,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:y,counter:S}):h&&$?y().concat($):y(),T=p?()=>k("div",{class:`${s}-base-selection-popover`},f?y():this.selectedOptions.map(x)):void 0,M=p?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},l):null,P=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},k("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,R=i?k("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},w,f?null:_,g):k("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},w,g);b=k(kt,null,p?k(x5,Object.assign({},M,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>R,default:T}):R,P)}else if(i){const v=this.pattern||this.isComposing,x=this.active?!v:!this.selected,y=this.active?!1:this.selected;b=k("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:h1(this.label)},k("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),y?k("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},k("div",{class:`${s}-base-selection-overlay__wrapper`},c?c({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Fo(this.label,this.selectedOption,!0))):null,x?k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},k("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,g)}else b=k("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?k("div",{class:`${s}-base-selection-input`,title:h1(this.label),key:"input"},k("div",{class:`${s}-base-selection-input__content`},c?c({option:this.selectedOption,handleClose:()=>{}}):d?d(this.selectedOption,!0):Fo(this.label,this.selectedOption,!0))):k("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},k("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),g);return k("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},b,a?k("div",{class:`${s}-base-selection__border`}):null,a?k("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:ki}=ca;function yz({duration:e=".2s",delay:t=".1s"}={}){return[ce("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),ce("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
723
723
|
opacity: 0!important;
|
|
724
724
|
margin-left: 0!important;
|
|
725
725
|
margin-right: 0!important;
|
|
@@ -744,7 +744,7 @@ ${t}
|
|
|
744
744
|
top: 0;
|
|
745
745
|
bottom: 0;
|
|
746
746
|
border-radius: inherit;
|
|
747
|
-
`),xz=Fe({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){
|
|
747
|
+
`),xz=Fe({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){fa("-base-wave",_z,et(e,"clsPrefix"));const t=ne(null),n=ne(!1);let r=null;return Bn(()=>{r!==null&&window.clearTimeout(r)}),{active:n,selfRef:t,play(){r!==null&&(window.clearTimeout(r),n.value=!1,r=null),fn(()=>{var i;(i=t.value)===null||i===void 0||i.offsetHeight,n.value=!0,r=window.setTimeout(()=>{n.value=!1,r=null},1e3)})}}},render(){const{clsPrefix:e}=this;return k("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),wz={iconMargin:"11px 8px 0 12px",iconMarginRtl:"11px 12px 0 8px",iconSize:"24px",closeIconSize:"16px",closeSize:"20px",closeMargin:"13px 14px 0 0",closeMarginRtl:"13px 0 0 14px",padding:"13px"};function Cz(e){const{lineHeight:t,borderRadius:n,fontWeightStrong:r,baseColor:i,dividerColor:o,actionColor:a,textColor1:s,textColor2:l,closeColorHover:u,closeColorPressed:c,closeIconColor:d,closeIconColorHover:f,closeIconColorPressed:h,infoColor:p,successColor:g,warningColor:b,errorColor:v,fontSize:x}=e;return Object.assign(Object.assign({},wz),{fontSize:x,lineHeight:t,titleFontWeight:r,borderRadius:n,border:`1px solid ${o}`,color:a,titleTextColor:s,iconColor:l,contentTextColor:l,closeBorderRadius:n,closeColorHover:u,closeColorPressed:c,closeIconColor:d,closeIconColorHover:f,closeIconColorPressed:h,borderInfo:`1px solid ${ir(i,nt(p,{alpha:.25}))}`,colorInfo:ir(i,nt(p,{alpha:.08})),titleTextColorInfo:s,iconColorInfo:p,contentTextColorInfo:l,closeColorHoverInfo:u,closeColorPressedInfo:c,closeIconColorInfo:d,closeIconColorHoverInfo:f,closeIconColorPressedInfo:h,borderSuccess:`1px solid ${ir(i,nt(g,{alpha:.25}))}`,colorSuccess:ir(i,nt(g,{alpha:.08})),titleTextColorSuccess:s,iconColorSuccess:g,contentTextColorSuccess:l,closeColorHoverSuccess:u,closeColorPressedSuccess:c,closeIconColorSuccess:d,closeIconColorHoverSuccess:f,closeIconColorPressedSuccess:h,borderWarning:`1px solid ${ir(i,nt(b,{alpha:.33}))}`,colorWarning:ir(i,nt(b,{alpha:.08})),titleTextColorWarning:s,iconColorWarning:b,contentTextColorWarning:l,closeColorHoverWarning:u,closeColorPressedWarning:c,closeIconColorWarning:d,closeIconColorHoverWarning:f,closeIconColorPressedWarning:h,borderError:`1px solid ${ir(i,nt(v,{alpha:.25}))}`,colorError:ir(i,nt(v,{alpha:.08})),titleTextColorError:s,iconColorError:v,contentTextColorError:l,closeColorHoverError:u,closeColorPressedError:c,closeIconColorError:d,closeIconColorHoverError:f,closeIconColorPressedError:h})}const Sz={common:hn,self:Cz},{cubicBezierEaseInOut:Pr,cubicBezierEaseOut:$z,cubicBezierEaseIn:kz}=ca;function Mz({overflow:e="hidden",duration:t=".3s",originalTransition:n="",leavingDelay:r="0s",foldPadding:i=!1,enterToProps:o=void 0,leaveToProps:a=void 0,reverse:s=!1}={}){const l=s?"leave":"enter",u=s?"enter":"leave";return[ce(`&.fade-in-height-expand-transition-${u}-from,
|
|
748
748
|
&.fade-in-height-expand-transition-${l}-to`,Object.assign(Object.assign({},o),{opacity:1})),ce(`&.fade-in-height-expand-transition-${u}-to,
|
|
749
749
|
&.fade-in-height-expand-transition-${l}-from`,Object.assign(Object.assign({},a),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),ce(`&.fade-in-height-expand-transition-${u}-active`,`
|
|
750
750
|
overflow: ${e};
|
|
@@ -813,7 +813,7 @@ ${t}
|
|
|
813
813
|
font-size: 16px;
|
|
814
814
|
line-height: 19px;
|
|
815
815
|
font-weight: var(--n-title-font-weight);
|
|
816
|
-
`,[ce("& +",[Q("content",{marginTop:"9px"})])]),Q("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),Q("icon",{transition:"color .3s var(--n-bezier)"})]),Ez=Object.assign(Object.assign({},pt.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),S5=Fe({name:"Alert",inheritAttrs:!1,props:Ez,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=rn(e),o=pt("Alert","-alert",Tz,Sz,e,t),a=co("Alert",i,t),s=pe(()=>{const{common:{cubicBezierEaseInOut:
|
|
816
|
+
`,[ce("& +",[Q("content",{marginTop:"9px"})])]),Q("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),Q("icon",{transition:"color .3s var(--n-bezier)"})]),Ez=Object.assign(Object.assign({},pt.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),S5=Fe({name:"Alert",inheritAttrs:!1,props:Ez,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=rn(e),o=pt("Alert","-alert",Tz,Sz,e,t),a=co("Alert",i,t),s=pe(()=>{const{common:{cubicBezierEaseInOut:d},self:f}=o.value,{fontSize:h,borderRadius:p,titleFontWeight:g,lineHeight:b,iconSize:v,iconMargin:x,iconMarginRtl:y,closeIconSize:_,closeBorderRadius:S,closeSize:$,closeMargin:w,closeMarginRtl:T,padding:M}=f,{type:P}=e,{left:R,right:C}=Kn(x);return{"--n-bezier":d,"--n-color":f[Se("color",P)],"--n-close-icon-size":_,"--n-close-border-radius":S,"--n-close-color-hover":f[Se("closeColorHover",P)],"--n-close-color-pressed":f[Se("closeColorPressed",P)],"--n-close-icon-color":f[Se("closeIconColor",P)],"--n-close-icon-color-hover":f[Se("closeIconColorHover",P)],"--n-close-icon-color-pressed":f[Se("closeIconColorPressed",P)],"--n-icon-color":f[Se("iconColor",P)],"--n-border":f[Se("border",P)],"--n-title-text-color":f[Se("titleTextColor",P)],"--n-content-text-color":f[Se("contentTextColor",P)],"--n-line-height":b,"--n-border-radius":p,"--n-font-size":h,"--n-title-font-weight":g,"--n-icon-size":v,"--n-icon-margin":x,"--n-icon-margin-rtl":y,"--n-close-size":$,"--n-close-margin":w,"--n-close-margin-rtl":T,"--n-padding":M,"--n-icon-margin-left":R,"--n-icon-margin-right":C}}),l=r?Cn("alert",pe(()=>e.type[0]),s,e):void 0,u=ne(!0),c=()=>{const{onAfterLeave:d,onAfterHide:f}=e;d&&d(),f&&f()};return{rtlEnabled:a,mergedClsPrefix:t,mergedBordered:n,visible:u,handleCloseClick:()=>{var d;Promise.resolve((d=e.onClose)===null||d===void 0?void 0:d.call(e)).then(f=>{f!==!1&&(u.value=!1)})},handleAfterLeave:()=>{c()},mergedTheme:o,cssVars:r?void 0:s,themeClass:l==null?void 0:l.themeClass,onRender:l==null?void 0:l.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),k(d5,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:t,$slots:n}=this,r={class:[`${t}-alert`,this.themeClass,this.closable&&`${t}-alert--closable`,this.showIcon&&`${t}-alert--show-icon`,!this.title&&this.closable&&`${t}-alert--right-adjust`,this.rtlEnabled&&`${t}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?k("div",Object.assign({},ia(this.$attrs,r)),this.closable&&k(pv,{clsPrefix:t,class:`${t}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&k("div",{class:`${t}-alert__border`}),this.showIcon&&k("div",{class:`${t}-alert__icon`,"aria-hidden":"true"},Ur(n.icon,()=>[k(Cr,{clsPrefix:t},{default:()=>{switch(this.type){case"success":return k(nR,null);case"info":return k(eR,null);case"warning":return k(rR,null);case"error":return k(ZP,null);default:return null}}})])),k("div",{class:[`${t}-alert-body`,this.mergedBordered&&`${t}-alert-body--bordered`]},Bt(n.header,i=>{const o=i||this.title;return o?k("div",{class:`${t}-alert-body__title`},o):null}),n.default&&k("div",{class:`${t}-alert-body__content`},n))):null}})}}),Az=_d&&"chrome"in window;_d&&navigator.userAgent.includes("Firefox");const $5=_d&&navigator.userAgent.includes("Safari")&&!Az,Pz={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};function Rz(e){const{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:o,inputColor:a,inputColorDisabled:s,borderColor:l,warningColor:u,warningColorHover:c,errorColor:d,errorColorHover:f,borderRadius:h,lineHeight:p,fontSizeTiny:g,fontSizeSmall:b,fontSizeMedium:v,fontSizeLarge:x,heightTiny:y,heightSmall:_,heightMedium:S,heightLarge:$,actionColor:w,clearColor:T,clearColorHover:M,clearColorPressed:P,placeholderColor:R,placeholderColorDisabled:C,iconColor:E,iconColorDisabled:F,iconColorHover:z,iconColorPressed:j,fontWeight:Z}=e;return Object.assign(Object.assign({},Pz),{fontWeight:Z,countTextColorDisabled:r,countTextColor:n,heightTiny:y,heightSmall:_,heightMedium:S,heightLarge:$,fontSizeTiny:g,fontSizeSmall:b,fontSizeMedium:v,fontSizeLarge:x,lineHeight:p,lineHeightTextarea:p,borderRadius:h,iconSize:"16px",groupLabelColor:w,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:R,placeholderColorDisabled:C,color:a,colorDisabled:s,colorFocus:a,groupLabelBorder:`1px solid ${l}`,border:`1px solid ${l}`,borderHover:`1px solid ${o}`,borderDisabled:`1px solid ${l}`,borderFocus:`1px solid ${o}`,boxShadowFocus:`0 0 0 2px ${nt(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:u,borderWarning:`1px solid ${u}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 0 2px ${nt(u,{alpha:.2})}`,caretColorWarning:u,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:a,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${nt(d,{alpha:.2})}`,caretColorError:d,clearColor:T,clearColorHover:M,clearColorPressed:P,iconColor:E,iconColorDisabled:F,iconColorHover:z,iconColorPressed:j,suffixTextColor:t})}const mv={name:"Input",common:hn,self:Rz},k5="n-input",zz=W("input",`
|
|
817
817
|
max-width: 100%;
|
|
818
818
|
cursor: text;
|
|
819
819
|
line-height: 1.5;
|
|
@@ -1046,8 +1046,8 @@ ${t}
|
|
|
1046
1046
|
border: var(--n-border-focus-${e});
|
|
1047
1047
|
`)])])]))]),Fz=W("input",[ge("disabled",[Q("input-el, textarea-el",`
|
|
1048
1048
|
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
1049
|
-
`)])]);function Iz(e){let t=0;for(const n of e)t++;return t}function tc(e){return e===""||e==null}function Bz(e){const t=ne(null);function n(){const{value:o}=e;if(!(o!=null&&o.focus)){i();return}const{selectionStart:a,selectionEnd:s,value:l}=o;if(a==null||s==null){i();return}t.value={start:a,end:s,beforeText:l.slice(0,a),afterText:l.slice(s)}}function r(){var o;const{value:a}=t,{value:s}=e;if(!a||!s)return;const{value:l}=s,{start:u,beforeText:c,afterText:
|
|
1050
|
-
`)}else{const{value:gt}=u;gt&&(X?gt.textContent=X:gt.innerHTML=" ")}}function ke(){_e()}const Me=ne({top:"0"});function $e(X){var be;const{scrollTop:He}=X.target;Me.value.top=`${-He}px`,(be=p.value)===null||be===void 0||be.syncUnifiedContainer()}let ze=null;xr(()=>{const{autosize:X,type:be}=e;X&&be==="textarea"?ze=vt(x,He=>{!Array.isArray(He)&&He!==R&&ae(He)}):ze==null||ze()});let Je=null;xr(()=>{e.type==="textarea"?Je=vt(x,X=>{var be;!Array.isArray(X)&&X!==R&&((be=p.value)===null||be===void 0||be.syncUnifiedContainer())}):Je==null||Je()}),jn(k5,{mergedValueRef:x,maxlengthRef:oe,mergedClsPrefixRef:t,countGraphemesRef:et(e,"countGraphemes")});const Ne={wrapperElRef:a,inputElRef:c,textareaElRef:s,isCompositing:M,clear:Re,focus:I,blur:D,select:te,deactivate:se,activate:K,scrollTo:ue},ht=co("Input",i,t),Le=pe(()=>{const{value:X}=_,{common:{cubicBezierEaseInOut:be},self:{color:He,borderRadius:Te,textColor:gt,caretColor:De,caretColorError:ut,caretColorWarning:pn,textDecorationColor:Wt,border:vo,borderDisabled:bo,borderHover:Ss,borderFocus:fh,placeholderColor:hh,placeholderColorDisabled:ph,lineHeightTextarea:gh,colorDisabled:vh,colorFocus:xa,textColorDisabled:wa,boxShadowFocus:C4,iconSize:S4,colorFocusWarning:$4,boxShadowFocusWarning:k4,borderWarning:M4,borderFocusWarning:T4,borderHoverWarning:E4,colorFocusError:A4,boxShadowFocusError:P4,borderError:R4,borderFocusError:z4,borderHoverError:F4,clearSize:I4,clearColor:B4,clearColorHover:O4,clearColorPressed:N4,iconColor:L4,iconColorDisabled:D4,suffixTextColor:H4,countTextColor:U4,countTextColorDisabled:j4,iconColorHover:W4,iconColorPressed:V4,loadingColor:q4,loadingColorError:G4,loadingColorWarning:Y4,fontWeight:X4,[Se("padding",X)]:K4,[Se("fontSize",X)]:Z4,[Se("height",X)]:J4}}=o.value,{left:Q4,right:eS}=Kn(K4);return{"--n-bezier":be,"--n-count-text-color":U4,"--n-count-text-color-disabled":j4,"--n-color":He,"--n-font-size":Z4,"--n-font-weight":X4,"--n-border-radius":Te,"--n-height":J4,"--n-padding-left":Q4,"--n-padding-right":eS,"--n-text-color":gt,"--n-caret-color":De,"--n-text-decoration-color":Wt,"--n-border":vo,"--n-border-disabled":bo,"--n-border-hover":Ss,"--n-border-focus":fh,"--n-placeholder-color":hh,"--n-placeholder-color-disabled":ph,"--n-icon-size":S4,"--n-line-height-textarea":gh,"--n-color-disabled":vh,"--n-color-focus":xa,"--n-text-color-disabled":wa,"--n-box-shadow-focus":C4,"--n-loading-color":q4,"--n-caret-color-warning":pn,"--n-color-focus-warning":$4,"--n-box-shadow-focus-warning":k4,"--n-border-warning":M4,"--n-border-focus-warning":T4,"--n-border-hover-warning":E4,"--n-loading-color-warning":Y4,"--n-caret-color-error":ut,"--n-color-focus-error":A4,"--n-box-shadow-focus-error":P4,"--n-border-error":R4,"--n-border-focus-error":z4,"--n-border-hover-error":F4,"--n-loading-color-error":G4,"--n-clear-color":B4,"--n-clear-size":I4,"--n-clear-color-hover":O4,"--n-clear-color-pressed":N4,"--n-icon-color":L4,"--n-icon-color-hover":W4,"--n-icon-color-pressed":V4,"--n-icon-color-disabled":D4,"--n-suffix-text-color":H4}}),Be=r?Cn("input",pe(()=>{const{value:X}=_;return X[0]}),Le,e):void 0;return Object.assign(Object.assign({},Ne),{wrapperElRef:a,inputElRef:c,inputMirrorElRef:u,inputEl2Ref:f,textareaElRef:s,textareaMirrorElRef:l,textareaScrollbarInstRef:p,rtlEnabled:ht,uncontrolledValue:b,mergedValue:x,passwordVisible:J,mergedPlaceholder:C,showPlaceholder1:E,showPlaceholder2:F,mergedFocus:z,isComposing:M,activated:P,showClearButton:j,mergedSize:_,mergedDisabled:S,textDecorationStyle:ie,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Z,placeholderStyle:Me,mergedStatus:$,textAreaScrollContainerWidth:he,handleTextAreaScroll:$e,handleCompositionStart:le,handleCompositionEnd:q,handleInput:N,handleInputBlur:L,handleInputFocus:O,handleWrapperBlur:ee,handleWrapperFocus:U,handleMouseEnter:lt,handleMouseLeave:dt,handleMouseDown:rt,handleChange:V,handleClick:me,handleClear:Ae,handlePasswordToggleClick:zt,handlePasswordToggleMousedown:yt,handleWrapperKeydown:ye,handleWrapperKeyup:Lt,handleTextAreaMirrorResize:ke,getTextareaScrollContainer:()=>s.value,mergedTheme:o,cssVars:r?void 0:Le,themeClass:Be==null?void 0:Be.themeClass,onRender:Be==null?void 0:Be.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:o,countGraphemes:a,onRender:s}=this,l=this.$slots;return s==null||s(),k("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:o==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&o!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},k("div",{class:`${n}-input-wrapper`},Bt(l.prefix,u=>u&&k("div",{class:`${n}-input__prefix`},u)),o==="textarea"?k(gv,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var u,c;const{textAreaScrollContainerWidth:f}=this,d={width:this.autosize&&f&&`${f}px`};return k(kt,null,k("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(u=this.inputProps)===null||u===void 0?void 0:u.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(c=this.inputProps)===null||c===void 0?void 0:c.style,d],onBlur:this.handleInputBlur,onFocus:h=>{this.handleInputFocus(h,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?k("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,d],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?k(Wi,{onResize:this.handleTextAreaMirrorResize},{default:()=>k("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):k("div",{class:`${n}-input__input`},k("input",Object.assign({type:o==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":o},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,0)},onInput:u=>{this.handleInput(u,0)},onChange:u=>{this.handleChange(u,0)}})),this.showPlaceholder1?k("div",{class:`${n}-input__placeholder`},k("span",null,this.mergedPlaceholder[0])):null,this.autosize?k("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Bt(l.suffix,u=>u||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?k("div",{class:`${n}-input__suffix`},[Bt(l["clear-icon-placeholder"],c=>(this.clearable||c)&&k(S0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>c,icon:()=>{var f,d;return(d=(f=this.$slots)["clear-icon"])===null||d===void 0?void 0:d.call(f)}})),this.internalLoadingBeforeSuffix?null:u,this.loading!==void 0?k(w5,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?u:null,this.showCount&&this.type!=="textarea"?k(K1,null,{default:c=>{var f;return(f=l.count)===null||f===void 0?void 0:f.call(l,c)}}):null,this.mergedShowPasswordOn&&this.type==="password"?k("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Ur(l["password-visible-icon"],()=>[k(Cr,{clsPrefix:n},{default:()=>k(JP,null)})]):Ur(l["password-invisible-icon"],()=>[k(Cr,{clsPrefix:n},{default:()=>k(QP,null)})])):null]):null)),this.pair?k("span",{class:`${n}-input__separator`},Ur(l.separator,()=>[this.separator])):null,this.pair?k("div",{class:`${n}-input-wrapper`},k("div",{class:`${n}-input__input`},k("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,1)},onInput:u=>{this.handleInput(u,1)},onChange:u=>{this.handleChange(u,1)}}),this.showPlaceholder2?k("div",{class:`${n}-input__placeholder`},k("span",null,this.mergedPlaceholder[1])):null),Bt(l.suffix,u=>(this.clearable||u)&&k("div",{class:`${n}-input__suffix`},[this.clearable&&k(S0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var c;return(c=l["clear-icon"])===null||c===void 0?void 0:c.call(l)},placeholder:()=>{var c;return(c=l["clear-icon-placeholder"])===null||c===void 0?void 0:c.call(l)}}),u]))):null,this.mergedBordered?k("div",{class:`${n}-input__border`}):null,this.mergedBordered?k("div",{class:`${n}-input__state-border`}):null,this.showCount&&o==="textarea"?k(K1,null,{default:u=>{var c;const{renderCount:f}=this;return f?f(u):(c=l.count)===null||c===void 0?void 0:c.call(l,u)}}):null)}}),Nz=W("input-group",`
|
|
1049
|
+
`)])]);function Iz(e){let t=0;for(const n of e)t++;return t}function tc(e){return e===""||e==null}function Bz(e){const t=ne(null);function n(){const{value:o}=e;if(!(o!=null&&o.focus)){i();return}const{selectionStart:a,selectionEnd:s,value:l}=o;if(a==null||s==null){i();return}t.value={start:a,end:s,beforeText:l.slice(0,a),afterText:l.slice(s)}}function r(){var o;const{value:a}=t,{value:s}=e;if(!a||!s)return;const{value:l}=s,{start:u,beforeText:c,afterText:d}=a;let f=l.length;if(l.endsWith(d))f=l.length-d.length;else if(l.startsWith(c))f=c.length;else{const h=c[u-1],p=l.indexOf(h,u-1);p!==-1&&(f=p+1)}(o=s.setSelectionRange)===null||o===void 0||o.call(s,f,f)}function i(){t.value=null}return vt(e,i),{recordCursor:n,restoreCursor:r}}const K1=Fe({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:r,mergedClsPrefixRef:i,countGraphemesRef:o}=$t(k5),a=pe(()=>{const{value:s}=n;return s===null||Array.isArray(s)?0:(o.value||Iz)(s)});return()=>{const{value:s}=r,{value:l}=n;return k("span",{class:`${i.value}-input-word-count`},k9(t.default,{value:l===null||Array.isArray(l)?"":l},()=>[s===void 0?a.value:`${a.value} / ${s}`]))}}}),Oz=Object.assign(Object.assign({},pt.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),ts=Fe({name:"Input",props:Oz,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=rn(e),o=pt("Input","-input",zz,mv,e,t);$5&&fa("-input-safari",Fz,t);const a=ne(null),s=ne(null),l=ne(null),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=Bz(f),p=ne(null),{localeRef:g}=_u("Input"),b=ne(e.defaultValue),v=et(e,"value"),x=Gr(v,b),y=aa(e),{mergedSizeRef:_,mergedDisabledRef:S,mergedStatusRef:$}=y,w=ne(!1),T=ne(!1),M=ne(!1),P=ne(!1);let R=null;const C=pe(()=>{const{placeholder:X,pair:be}=e;return be?Array.isArray(X)?X:X===void 0?["",""]:[X,X]:X===void 0?[g.value.placeholder]:[X]}),E=pe(()=>{const{value:X}=M,{value:be}=x,{value:He}=C;return!X&&(tc(be)||Array.isArray(be)&&tc(be[0]))&&He[0]}),F=pe(()=>{const{value:X}=M,{value:be}=x,{value:He}=C;return!X&&He[1]&&(tc(be)||Array.isArray(be)&&tc(be[1]))}),z=Ht(()=>e.internalForceFocus||w.value),j=Ht(()=>{if(S.value||e.readonly||!e.clearable||!z.value&&!T.value)return!1;const{value:X}=x,{value:be}=z;return e.pair?!!(Array.isArray(X)&&(X[0]||X[1]))&&(T.value||be):!!X&&(T.value||be)}),Z=pe(()=>{const{showPasswordOn:X}=e;if(X)return X;if(e.showPasswordToggle)return"click"}),J=ne(!1),ie=pe(()=>{const{textDecoration:X}=e;return X?Array.isArray(X)?X.map(be=>({textDecoration:be})):[{textDecoration:X}]:["",""]}),he=ne(void 0),_e=()=>{var X,be;if(e.type==="textarea"){const{autosize:He}=e;if(He&&(he.value=(be=(X=p.value)===null||X===void 0?void 0:X.$el)===null||be===void 0?void 0:be.offsetWidth),!s.value||typeof He=="boolean")return;const{paddingTop:Te,paddingBottom:gt,lineHeight:De}=window.getComputedStyle(s.value),ut=Number(Te.slice(0,-2)),pn=Number(gt.slice(0,-2)),Wt=Number(De.slice(0,-2)),{value:vo}=l;if(!vo)return;if(He.minRows){const bo=Math.max(He.minRows,1),Ss=`${ut+pn+Wt*bo}px`;vo.style.minHeight=Ss}if(He.maxRows){const bo=`${ut+pn+Wt*He.maxRows}px`;vo.style.maxHeight=bo}}},oe=pe(()=>{const{maxlength:X}=e;return X===void 0?void 0:Number(X)});dn(()=>{const{value:X}=x;Array.isArray(X)||ae(X)});const ve=ps().proxy;function we(X,be){const{onUpdateValue:He,"onUpdate:value":Te,onInput:gt}=e,{nTriggerFormInput:De}=y;He&&Ye(He,X,be),Te&&Ye(Te,X,be),gt&&Ye(gt,X,be),b.value=X,De()}function Oe(X,be){const{onChange:He}=e,{nTriggerFormChange:Te}=y;He&&Ye(He,X,be),b.value=X,Te()}function xe(X){const{onBlur:be}=e,{nTriggerFormBlur:He}=y;be&&Ye(be,X),He()}function Xe(X){const{onFocus:be}=e,{nTriggerFormFocus:He}=y;be&&Ye(be,X),He()}function Ve(X){const{onClear:be}=e;be&&Ye(be,X)}function fe(X){const{onInputBlur:be}=e;be&&Ye(be,X)}function Ee(X){const{onInputFocus:be}=e;be&&Ye(be,X)}function Pe(){const{onDeactivate:X}=e;X&&Ye(X)}function A(){const{onActivate:X}=e;X&&Ye(X)}function H(X){const{onClick:be}=e;be&&Ye(be,X)}function Y(X){const{onWrapperFocus:be}=e;be&&Ye(be,X)}function de(X){const{onWrapperBlur:be}=e;be&&Ye(be,X)}function le(){M.value=!0}function q(X){M.value=!1,X.target===d.value?N(X,1):N(X,0)}function N(X,be=0,He="input"){const Te=X.target.value;if(ae(Te),X instanceof InputEvent&&!X.isComposing&&(M.value=!1),e.type==="textarea"){const{value:De}=p;De&&De.syncUnifiedContainer()}if(R=Te,M.value)return;h.recordCursor();const gt=re(Te);if(gt)if(!e.pair)He==="input"?we(Te,{source:be}):Oe(Te,{source:be});else{let{value:De}=x;Array.isArray(De)?De=[De[0],De[1]]:De=["",""],De[be]=Te,He==="input"?we(De,{source:be}):Oe(De,{source:be})}ve.$forceUpdate(),gt||fn(h.restoreCursor)}function re(X){const{countGraphemes:be,maxlength:He,minlength:Te}=e;if(be){let De;if(He!==void 0&&(De===void 0&&(De=be(X)),De>Number(He))||Te!==void 0&&(De===void 0&&(De=be(X)),De<Number(He)))return!1}const{allowInput:gt}=e;return typeof gt=="function"?gt(X):!0}function L(X){fe(X),X.relatedTarget===a.value&&Pe(),X.relatedTarget!==null&&(X.relatedTarget===c.value||X.relatedTarget===d.value||X.relatedTarget===s.value)||(P.value=!1),B(X,"blur"),f.value=null}function O(X,be){Ee(X),w.value=!0,P.value=!0,A(),B(X,"focus"),be===0?f.value=c.value:be===1?f.value=d.value:be===2&&(f.value=s.value)}function ee(X){e.passivelyActivated&&(de(X),B(X,"blur"))}function U(X){e.passivelyActivated&&(w.value=!0,Y(X),B(X,"focus"))}function B(X,be){X.relatedTarget!==null&&(X.relatedTarget===c.value||X.relatedTarget===d.value||X.relatedTarget===s.value||X.relatedTarget===a.value)||(be==="focus"?(Xe(X),w.value=!0):be==="blur"&&(xe(X),w.value=!1))}function V(X,be){N(X,be,"change")}function me(X){H(X)}function Ae(X){Ve(X),Re()}function Re(){e.pair?(we(["",""],{source:"clear"}),Oe(["",""],{source:"clear"})):(we("",{source:"clear"}),Oe("",{source:"clear"}))}function rt(X){const{onMousedown:be}=e;be&&be(X);const{tagName:He}=X.target;if(He!=="INPUT"&&He!=="TEXTAREA"){if(e.resizable){const{value:Te}=a;if(Te){const{left:gt,top:De,width:ut,height:pn}=Te.getBoundingClientRect(),Wt=14;if(gt+ut-Wt<X.clientX&&X.clientX<gt+ut&&De+pn-Wt<X.clientY&&X.clientY<De+pn)return}}X.preventDefault(),w.value||I()}}function lt(){var X;T.value=!0,e.type==="textarea"&&((X=p.value)===null||X===void 0||X.handleMouseEnterWrapper())}function ft(){var X;T.value=!1,e.type==="textarea"&&((X=p.value)===null||X===void 0||X.handleMouseLeaveWrapper())}function zt(){S.value||Z.value==="click"&&(J.value=!J.value)}function yt(X){if(S.value)return;X.preventDefault();const be=Te=>{Te.preventDefault(),St("mouseup",document,be)};if(Mt("mouseup",document,be),Z.value!=="mousedown")return;J.value=!0;const He=()=>{J.value=!1,St("mouseup",document,He)};Mt("mouseup",document,He)}function Lt(X){e.onKeyup&&Ye(e.onKeyup,X)}function ye(X){switch(e.onKeydown&&Ye(e.onKeydown,X),X.key){case"Escape":m();break;case"Enter":G(X);break}}function G(X){var be,He;if(e.passivelyActivated){const{value:Te}=P;if(Te){e.internalDeactivateOnEnter&&m();return}X.preventDefault(),e.type==="textarea"?(be=s.value)===null||be===void 0||be.focus():(He=c.value)===null||He===void 0||He.focus()}}function m(){e.passivelyActivated&&(P.value=!1,fn(()=>{var X;(X=a.value)===null||X===void 0||X.focus()}))}function I(){var X,be,He;S.value||(e.passivelyActivated?(X=a.value)===null||X===void 0||X.focus():((be=s.value)===null||be===void 0||be.focus(),(He=c.value)===null||He===void 0||He.focus()))}function D(){var X;!((X=a.value)===null||X===void 0)&&X.contains(document.activeElement)&&document.activeElement.blur()}function te(){var X,be;(X=s.value)===null||X===void 0||X.select(),(be=c.value)===null||be===void 0||be.select()}function K(){S.value||(s.value?s.value.focus():c.value&&c.value.focus())}function se(){const{value:X}=a;X!=null&&X.contains(document.activeElement)&&X!==document.activeElement&&m()}function ue(X){if(e.type==="textarea"){const{value:be}=s;be==null||be.scrollTo(X)}else{const{value:be}=c;be==null||be.scrollTo(X)}}function ae(X){const{type:be,pair:He,autosize:Te}=e;if(!He&&Te)if(be==="textarea"){const{value:gt}=l;gt&&(gt.textContent=`${X??""}\r
|
|
1050
|
+
`)}else{const{value:gt}=u;gt&&(X?gt.textContent=X:gt.innerHTML=" ")}}function ke(){_e()}const Me=ne({top:"0"});function $e(X){var be;const{scrollTop:He}=X.target;Me.value.top=`${-He}px`,(be=p.value)===null||be===void 0||be.syncUnifiedContainer()}let ze=null;xr(()=>{const{autosize:X,type:be}=e;X&&be==="textarea"?ze=vt(x,He=>{!Array.isArray(He)&&He!==R&&ae(He)}):ze==null||ze()});let Je=null;xr(()=>{e.type==="textarea"?Je=vt(x,X=>{var be;!Array.isArray(X)&&X!==R&&((be=p.value)===null||be===void 0||be.syncUnifiedContainer())}):Je==null||Je()}),jn(k5,{mergedValueRef:x,maxlengthRef:oe,mergedClsPrefixRef:t,countGraphemesRef:et(e,"countGraphemes")});const Ne={wrapperElRef:a,inputElRef:c,textareaElRef:s,isCompositing:M,clear:Re,focus:I,blur:D,select:te,deactivate:se,activate:K,scrollTo:ue},ht=co("Input",i,t),Le=pe(()=>{const{value:X}=_,{common:{cubicBezierEaseInOut:be},self:{color:He,borderRadius:Te,textColor:gt,caretColor:De,caretColorError:ut,caretColorWarning:pn,textDecorationColor:Wt,border:vo,borderDisabled:bo,borderHover:Ss,borderFocus:dh,placeholderColor:hh,placeholderColorDisabled:ph,lineHeightTextarea:gh,colorDisabled:vh,colorFocus:xa,textColorDisabled:wa,boxShadowFocus:C4,iconSize:S4,colorFocusWarning:$4,boxShadowFocusWarning:k4,borderWarning:M4,borderFocusWarning:T4,borderHoverWarning:E4,colorFocusError:A4,boxShadowFocusError:P4,borderError:R4,borderFocusError:z4,borderHoverError:F4,clearSize:I4,clearColor:B4,clearColorHover:O4,clearColorPressed:N4,iconColor:L4,iconColorDisabled:D4,suffixTextColor:H4,countTextColor:U4,countTextColorDisabled:j4,iconColorHover:W4,iconColorPressed:V4,loadingColor:q4,loadingColorError:G4,loadingColorWarning:Y4,fontWeight:X4,[Se("padding",X)]:K4,[Se("fontSize",X)]:Z4,[Se("height",X)]:J4}}=o.value,{left:Q4,right:eS}=Kn(K4);return{"--n-bezier":be,"--n-count-text-color":U4,"--n-count-text-color-disabled":j4,"--n-color":He,"--n-font-size":Z4,"--n-font-weight":X4,"--n-border-radius":Te,"--n-height":J4,"--n-padding-left":Q4,"--n-padding-right":eS,"--n-text-color":gt,"--n-caret-color":De,"--n-text-decoration-color":Wt,"--n-border":vo,"--n-border-disabled":bo,"--n-border-hover":Ss,"--n-border-focus":dh,"--n-placeholder-color":hh,"--n-placeholder-color-disabled":ph,"--n-icon-size":S4,"--n-line-height-textarea":gh,"--n-color-disabled":vh,"--n-color-focus":xa,"--n-text-color-disabled":wa,"--n-box-shadow-focus":C4,"--n-loading-color":q4,"--n-caret-color-warning":pn,"--n-color-focus-warning":$4,"--n-box-shadow-focus-warning":k4,"--n-border-warning":M4,"--n-border-focus-warning":T4,"--n-border-hover-warning":E4,"--n-loading-color-warning":Y4,"--n-caret-color-error":ut,"--n-color-focus-error":A4,"--n-box-shadow-focus-error":P4,"--n-border-error":R4,"--n-border-focus-error":z4,"--n-border-hover-error":F4,"--n-loading-color-error":G4,"--n-clear-color":B4,"--n-clear-size":I4,"--n-clear-color-hover":O4,"--n-clear-color-pressed":N4,"--n-icon-color":L4,"--n-icon-color-hover":W4,"--n-icon-color-pressed":V4,"--n-icon-color-disabled":D4,"--n-suffix-text-color":H4}}),Be=r?Cn("input",pe(()=>{const{value:X}=_;return X[0]}),Le,e):void 0;return Object.assign(Object.assign({},Ne),{wrapperElRef:a,inputElRef:c,inputMirrorElRef:u,inputEl2Ref:d,textareaElRef:s,textareaMirrorElRef:l,textareaScrollbarInstRef:p,rtlEnabled:ht,uncontrolledValue:b,mergedValue:x,passwordVisible:J,mergedPlaceholder:C,showPlaceholder1:E,showPlaceholder2:F,mergedFocus:z,isComposing:M,activated:P,showClearButton:j,mergedSize:_,mergedDisabled:S,textDecorationStyle:ie,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Z,placeholderStyle:Me,mergedStatus:$,textAreaScrollContainerWidth:he,handleTextAreaScroll:$e,handleCompositionStart:le,handleCompositionEnd:q,handleInput:N,handleInputBlur:L,handleInputFocus:O,handleWrapperBlur:ee,handleWrapperFocus:U,handleMouseEnter:lt,handleMouseLeave:ft,handleMouseDown:rt,handleChange:V,handleClick:me,handleClear:Ae,handlePasswordToggleClick:zt,handlePasswordToggleMousedown:yt,handleWrapperKeydown:ye,handleWrapperKeyup:Lt,handleTextAreaMirrorResize:ke,getTextareaScrollContainer:()=>s.value,mergedTheme:o,cssVars:r?void 0:Le,themeClass:Be==null?void 0:Be.themeClass,onRender:Be==null?void 0:Be.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:o,countGraphemes:a,onRender:s}=this,l=this.$slots;return s==null||s(),k("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:o==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&o!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},k("div",{class:`${n}-input-wrapper`},Bt(l.prefix,u=>u&&k("div",{class:`${n}-input__prefix`},u)),o==="textarea"?k(gv,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var u,c;const{textAreaScrollContainerWidth:d}=this,f={width:this.autosize&&d&&`${d}px`};return k(kt,null,k("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(u=this.inputProps)===null||u===void 0?void 0:u.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(c=this.inputProps)===null||c===void 0?void 0:c.style,f],onBlur:this.handleInputBlur,onFocus:h=>{this.handleInputFocus(h,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?k("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,f],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?k(Wi,{onResize:this.handleTextAreaMirrorResize},{default:()=>k("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):k("div",{class:`${n}-input__input`},k("input",Object.assign({type:o==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":o},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,0)},onInput:u=>{this.handleInput(u,0)},onChange:u=>{this.handleChange(u,0)}})),this.showPlaceholder1?k("div",{class:`${n}-input__placeholder`},k("span",null,this.mergedPlaceholder[0])):null,this.autosize?k("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Bt(l.suffix,u=>u||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?k("div",{class:`${n}-input__suffix`},[Bt(l["clear-icon-placeholder"],c=>(this.clearable||c)&&k(S0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>c,icon:()=>{var d,f;return(f=(d=this.$slots)["clear-icon"])===null||f===void 0?void 0:f.call(d)}})),this.internalLoadingBeforeSuffix?null:u,this.loading!==void 0?k(w5,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?u:null,this.showCount&&this.type!=="textarea"?k(K1,null,{default:c=>{var d;return(d=l.count)===null||d===void 0?void 0:d.call(l,c)}}):null,this.mergedShowPasswordOn&&this.type==="password"?k("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Ur(l["password-visible-icon"],()=>[k(Cr,{clsPrefix:n},{default:()=>k(JP,null)})]):Ur(l["password-invisible-icon"],()=>[k(Cr,{clsPrefix:n},{default:()=>k(QP,null)})])):null]):null)),this.pair?k("span",{class:`${n}-input__separator`},Ur(l.separator,()=>[this.separator])):null,this.pair?k("div",{class:`${n}-input-wrapper`},k("div",{class:`${n}-input__input`},k("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:u=>{this.handleInputFocus(u,1)},onInput:u=>{this.handleInput(u,1)},onChange:u=>{this.handleChange(u,1)}}),this.showPlaceholder2?k("div",{class:`${n}-input__placeholder`},k("span",null,this.mergedPlaceholder[1])):null),Bt(l.suffix,u=>(this.clearable||u)&&k("div",{class:`${n}-input__suffix`},[this.clearable&&k(S0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var c;return(c=l["clear-icon"])===null||c===void 0?void 0:c.call(l)},placeholder:()=>{var c;return(c=l["clear-icon-placeholder"])===null||c===void 0?void 0:c.call(l)}}),u]))):null,this.mergedBordered?k("div",{class:`${n}-input__border`}):null,this.mergedBordered?k("div",{class:`${n}-input__state-border`}):null,this.showCount&&o==="textarea"?k(K1,null,{default:u=>{var c;const{renderCount:d}=this;return d?d(u):(c=l.count)===null||c===void 0?void 0:c.call(l,u)}}):null)}}),Nz=W("input-group",`
|
|
1051
1051
|
display: inline-flex;
|
|
1052
1052
|
width: 100%;
|
|
1053
1053
|
flex-wrap: nowrap;
|
|
@@ -1102,7 +1102,7 @@ ${t}
|
|
|
1102
1102
|
`),Q("box-shadow, border, state-border",`
|
|
1103
1103
|
border-top-left-radius: 0!important;
|
|
1104
1104
|
border-bottom-left-radius: 0!important;
|
|
1105
|
-
`)])])])])])]),Lz={},Dz=Fe({name:"InputGroup",props:Lz,setup(e){const{mergedClsPrefixRef:t}=rn(e);return
|
|
1105
|
+
`)])])])])])]),Lz={},Dz=Fe({name:"InputGroup",props:Lz,setup(e){const{mergedClsPrefixRef:t}=rn(e);return fa("-input-group",Nz,t),{mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return k("div",{class:`${e}-input-group`},this.$slots)}});function hf(e){return e.type==="group"}function M5(e){return e.type==="ignored"}function Kh(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Hz(e,t){return{getIsGroup:hf,getIgnored:M5,getKey(n){return hf(n)?n.name||n.key||"key-required":n[e]},getChildren(n){return n[t]}}}function Uz(e,t,n,r){if(!t)return e;function i(o){if(!Array.isArray(o))return[];const a=[];for(const s of o)if(hf(s)){const l=i(s[r]);l.length&&a.push(Object.assign({},s,{[r]:l}))}else{if(M5(s))continue;t(n,s)&&a.push(s)}return a}return i(e)}function jz(e,t,n){const r=new Map;return e.forEach(i=>{hf(i)?i[n].forEach(o=>{r.set(o[t],o)}):r.set(i[t],i)}),r}function xo(e){return ir(e,[255,255,255,.16])}function nc(e){return ir(e,[0,0,0,.12])}const Wz="n-button-group",Vz={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};function qz(e){const{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadius:o,fontSizeTiny:a,fontSizeSmall:s,fontSizeMedium:l,fontSizeLarge:u,opacityDisabled:c,textColor2:d,textColor3:f,primaryColorHover:h,primaryColorPressed:p,borderColor:g,primaryColor:b,baseColor:v,infoColor:x,infoColorHover:y,infoColorPressed:_,successColor:S,successColorHover:$,successColorPressed:w,warningColor:T,warningColorHover:M,warningColorPressed:P,errorColor:R,errorColorHover:C,errorColorPressed:E,fontWeight:F,buttonColor2:z,buttonColor2Hover:j,buttonColor2Pressed:Z,fontWeightStrong:J}=e;return Object.assign(Object.assign({},Vz),{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:i,borderRadiusTiny:o,borderRadiusSmall:o,borderRadiusMedium:o,borderRadiusLarge:o,fontSizeTiny:a,fontSizeSmall:s,fontSizeMedium:l,fontSizeLarge:u,opacityDisabled:c,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:z,colorSecondaryHover:j,colorSecondaryPressed:Z,colorTertiary:z,colorTertiaryHover:j,colorTertiaryPressed:Z,colorQuaternary:"#0000",colorQuaternaryHover:j,colorQuaternaryPressed:Z,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:d,textColorTertiary:f,textColorHover:h,textColorPressed:p,textColorFocus:h,textColorDisabled:d,textColorText:d,textColorTextHover:h,textColorTextPressed:p,textColorTextFocus:h,textColorTextDisabled:d,textColorGhost:d,textColorGhostHover:h,textColorGhostPressed:p,textColorGhostFocus:h,textColorGhostDisabled:d,border:`1px solid ${g}`,borderHover:`1px solid ${h}`,borderPressed:`1px solid ${p}`,borderFocus:`1px solid ${h}`,borderDisabled:`1px solid ${g}`,rippleColor:b,colorPrimary:b,colorHoverPrimary:h,colorPressedPrimary:p,colorFocusPrimary:h,colorDisabledPrimary:b,textColorPrimary:v,textColorHoverPrimary:v,textColorPressedPrimary:v,textColorFocusPrimary:v,textColorDisabledPrimary:v,textColorTextPrimary:b,textColorTextHoverPrimary:h,textColorTextPressedPrimary:p,textColorTextFocusPrimary:h,textColorTextDisabledPrimary:d,textColorGhostPrimary:b,textColorGhostHoverPrimary:h,textColorGhostPressedPrimary:p,textColorGhostFocusPrimary:h,textColorGhostDisabledPrimary:b,borderPrimary:`1px solid ${b}`,borderHoverPrimary:`1px solid ${h}`,borderPressedPrimary:`1px solid ${p}`,borderFocusPrimary:`1px solid ${h}`,borderDisabledPrimary:`1px solid ${b}`,rippleColorPrimary:b,colorInfo:x,colorHoverInfo:y,colorPressedInfo:_,colorFocusInfo:y,colorDisabledInfo:x,textColorInfo:v,textColorHoverInfo:v,textColorPressedInfo:v,textColorFocusInfo:v,textColorDisabledInfo:v,textColorTextInfo:x,textColorTextHoverInfo:y,textColorTextPressedInfo:_,textColorTextFocusInfo:y,textColorTextDisabledInfo:d,textColorGhostInfo:x,textColorGhostHoverInfo:y,textColorGhostPressedInfo:_,textColorGhostFocusInfo:y,textColorGhostDisabledInfo:x,borderInfo:`1px solid ${x}`,borderHoverInfo:`1px solid ${y}`,borderPressedInfo:`1px solid ${_}`,borderFocusInfo:`1px solid ${y}`,borderDisabledInfo:`1px solid ${x}`,rippleColorInfo:x,colorSuccess:S,colorHoverSuccess:$,colorPressedSuccess:w,colorFocusSuccess:$,colorDisabledSuccess:S,textColorSuccess:v,textColorHoverSuccess:v,textColorPressedSuccess:v,textColorFocusSuccess:v,textColorDisabledSuccess:v,textColorTextSuccess:S,textColorTextHoverSuccess:$,textColorTextPressedSuccess:w,textColorTextFocusSuccess:$,textColorTextDisabledSuccess:d,textColorGhostSuccess:S,textColorGhostHoverSuccess:$,textColorGhostPressedSuccess:w,textColorGhostFocusSuccess:$,textColorGhostDisabledSuccess:S,borderSuccess:`1px solid ${S}`,borderHoverSuccess:`1px solid ${$}`,borderPressedSuccess:`1px solid ${w}`,borderFocusSuccess:`1px solid ${$}`,borderDisabledSuccess:`1px solid ${S}`,rippleColorSuccess:S,colorWarning:T,colorHoverWarning:M,colorPressedWarning:P,colorFocusWarning:M,colorDisabledWarning:T,textColorWarning:v,textColorHoverWarning:v,textColorPressedWarning:v,textColorFocusWarning:v,textColorDisabledWarning:v,textColorTextWarning:T,textColorTextHoverWarning:M,textColorTextPressedWarning:P,textColorTextFocusWarning:M,textColorTextDisabledWarning:d,textColorGhostWarning:T,textColorGhostHoverWarning:M,textColorGhostPressedWarning:P,textColorGhostFocusWarning:M,textColorGhostDisabledWarning:T,borderWarning:`1px solid ${T}`,borderHoverWarning:`1px solid ${M}`,borderPressedWarning:`1px solid ${P}`,borderFocusWarning:`1px solid ${M}`,borderDisabledWarning:`1px solid ${T}`,rippleColorWarning:T,colorError:R,colorHoverError:C,colorPressedError:E,colorFocusError:C,colorDisabledError:R,textColorError:v,textColorHoverError:v,textColorPressedError:v,textColorFocusError:v,textColorDisabledError:v,textColorTextError:R,textColorTextHoverError:C,textColorTextPressedError:E,textColorTextFocusError:C,textColorTextDisabledError:d,textColorGhostError:R,textColorGhostHoverError:C,textColorGhostPressedError:E,textColorGhostFocusError:C,textColorGhostDisabledError:R,borderError:`1px solid ${R}`,borderHoverError:`1px solid ${C}`,borderPressedError:`1px solid ${E}`,borderFocusError:`1px solid ${C}`,borderDisabledError:`1px solid ${R}`,rippleColorError:R,waveOpacity:"0.6",fontWeight:F,fontWeightStrong:J})}const yv={name:"Button",common:hn,self:qz},Gz=ce([W("button",`
|
|
1106
1106
|
margin: 0;
|
|
1107
1107
|
font-weight: var(--n-font-weight);
|
|
1108
1108
|
line-height: 1;
|
|
@@ -1143,7 +1143,7 @@ ${t}
|
|
|
1143
1143
|
animation-iteration-count: 1;
|
|
1144
1144
|
animation-duration: var(--n-ripple-duration);
|
|
1145
1145
|
animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);
|
|
1146
|
-
`,[ge("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),
|
|
1146
|
+
`,[ge("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),_d&&"MozBoxSizing"in document.createElement("div").style?ce("&::moz-focus-inner",{border:0}):null,Q("border, state-border",`
|
|
1147
1147
|
position: absolute;
|
|
1148
1148
|
left: 0;
|
|
1149
1149
|
top: 0;
|
|
@@ -1179,7 +1179,7 @@ ${t}
|
|
|
1179
1179
|
`,[ce("~",[Q("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),ge("block",`
|
|
1180
1180
|
display: flex;
|
|
1181
1181
|
width: 100%;
|
|
1182
|
-
`),ge("dashed",[Q("border, state-border",{borderStyle:"dashed !important"})]),ge("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),ce("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),ce("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),Yz=Object.assign(Object.assign({},pt.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!$5}}),Lr=Fe({name:"Button",props:Yz,setup(e){const t=ne(null),n=ne(null),r=ne(!1),i=Ht(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),o=$t(Wz,{}),{mergedSizeRef:a}=aa({},{defaultSize:"medium",mergedSize:_=>{const{size:S}=e;if(S)return S;const{size:$}=o;if($)return $;const{mergedSize:w}=_||{};return w?w.value:"medium"}}),s=pe(()=>e.focusable&&!e.disabled),l=_=>{var S;s.value||_.preventDefault(),!e.nativeFocusBehavior&&(_.preventDefault(),!e.disabled&&s.value&&((S=t.value)===null||S===void 0||S.focus({preventScroll:!0})))},u=_=>{var S;if(!e.disabled&&!e.loading){const{onClick:$}=e;$&&Ye($,_),e.text||(S=n.value)===null||S===void 0||S.play()}},c=_=>{switch(_.key){case"Enter":if(!e.keyboard)return;r.value=!1}},f=_=>{switch(_.key){case"Enter":if(!e.keyboard||e.loading){_.preventDefault();return}r.value=!0}},d=()=>{r.value=!1},{inlineThemeDisabled:h,mergedClsPrefixRef:p,mergedRtlRef:g}=rn(e),b=pt("Button","-button",Gz,yv,e,p),v=co("Button",g,p),x=pe(()=>{const _=b.value,{common:{cubicBezierEaseInOut:S,cubicBezierEaseOut:$},self:w}=_,{rippleDuration:T,opacityDisabled:M,fontWeight:P,fontWeightStrong:R}=w,C=a.value,{dashed:E,type:F,ghost:z,text:j,color:Z,round:J,circle:ie,textColor:he,secondary:_e,tertiary:oe,quaternary:ve,strong:we}=e,Oe={"--n-font-weight":we?R:P};let xe={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Xe=F==="tertiary",Ve=F==="default",de=Xe?"default":F;if(j){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":L||w[Se("textColorText",de)],"--n-text-color-hover":L?xo(L):w[Se("textColorTextHover",de)],"--n-text-color-pressed":L?nc(L):w[Se("textColorTextPressed",de)],"--n-text-color-focus":L?xo(L):w[Se("textColorTextHover",de)],"--n-text-color-disabled":L||w[Se("textColorTextDisabled",de)]}}else if(z||E){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Z||w[Se("rippleColor",de)],"--n-text-color":L||w[Se("textColorGhost",de)],"--n-text-color-hover":L?xo(L):w[Se("textColorGhostHover",de)],"--n-text-color-pressed":L?nc(L):w[Se("textColorGhostPressed",de)],"--n-text-color-focus":L?xo(L):w[Se("textColorGhostHover",de)],"--n-text-color-disabled":L||w[Se("textColorGhostDisabled",de)]}}else if(_e){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",de)],O=Z||L,ee=F!=="default"&&F!=="tertiary";xe={"--n-color":ee?nt(O,{alpha:Number(w.colorOpacitySecondary)}):w.colorSecondary,"--n-color-hover":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-pressed":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryPressed)}):w.colorSecondaryPressed,"--n-color-focus":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-disabled":w.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":O,"--n-text-color-hover":O,"--n-text-color-pressed":O,"--n-text-color-focus":O,"--n-text-color-disabled":O}}else if(oe||ve){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",de)],O=Z||L;oe?(xe["--n-color"]=w.colorTertiary,xe["--n-color-hover"]=w.colorTertiaryHover,xe["--n-color-pressed"]=w.colorTertiaryPressed,xe["--n-color-focus"]=w.colorSecondaryHover,xe["--n-color-disabled"]=w.colorTertiary):(xe["--n-color"]=w.colorQuaternary,xe["--n-color-hover"]=w.colorQuaternaryHover,xe["--n-color-pressed"]=w.colorQuaternaryPressed,xe["--n-color-focus"]=w.colorQuaternaryHover,xe["--n-color-disabled"]=w.colorQuaternary),xe["--n-ripple-color"]="#0000",xe["--n-text-color"]=O,xe["--n-text-color-hover"]=O,xe["--n-text-color-pressed"]=O,xe["--n-text-color-focus"]=O,xe["--n-text-color-disabled"]=O}else xe={"--n-color":Z||w[Se("color",de)],"--n-color-hover":Z?xo(Z):w[Se("colorHover",de)],"--n-color-pressed":Z?nc(Z):w[Se("colorPressed",de)],"--n-color-focus":Z?xo(Z):w[Se("colorFocus",de)],"--n-color-disabled":Z||w[Se("colorDisabled",de)],"--n-ripple-color":Z||w[Se("rippleColor",de)],"--n-text-color":he||(Z?w.textColorPrimary:Xe?w.textColorTertiary:w[Se("textColor",de)]),"--n-text-color-hover":he||(Z?w.textColorHoverPrimary:w[Se("textColorHover",de)]),"--n-text-color-pressed":he||(Z?w.textColorPressedPrimary:w[Se("textColorPressed",de)]),"--n-text-color-focus":he||(Z?w.textColorFocusPrimary:w[Se("textColorFocus",de)]),"--n-text-color-disabled":he||(Z?w.textColorDisabledPrimary:w[Se("textColorDisabled",de)])};let Ee={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};j?Ee={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ee={"--n-border":w[Se("border",de)],"--n-border-hover":w[Se("borderHover",de)],"--n-border-pressed":w[Se("borderPressed",de)],"--n-border-focus":w[Se("borderFocus",de)],"--n-border-disabled":w[Se("borderDisabled",de)]};const{[Se("height",C)]:Pe,[Se("fontSize",C)]:A,[Se("padding",C)]:H,[Se("paddingRound",C)]:Y,[Se("iconSize",C)]:fe,[Se("borderRadius",C)]:le,[Se("iconMargin",C)]:q,waveOpacity:N}=w,re={"--n-width":ie&&!j?Pe:"initial","--n-height":j?"initial":Pe,"--n-font-size":A,"--n-padding":ie||j?"initial":J?Y:H,"--n-icon-size":fe,"--n-icon-margin":q,"--n-border-radius":j?"initial":ie||J?Pe:le};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":S,"--n-bezier-ease-out":$,"--n-ripple-duration":T,"--n-opacity-disabled":M,"--n-wave-opacity":N},Oe),xe),Ee),re)}),y=h?Cn("button",pe(()=>{let _="";const{dashed:S,type:$,ghost:w,text:T,color:M,round:P,circle:R,textColor:C,secondary:E,tertiary:F,quaternary:z,strong:j}=e;S&&(_+="a"),w&&(_+="b"),T&&(_+="c"),P&&(_+="d"),R&&(_+="e"),E&&(_+="f"),F&&(_+="g"),z&&(_+="h"),j&&(_+="i"),M&&(_+=`j${id(M)}`),C&&(_+=`k${id(C)}`);const{value:Z}=a;return _+=`l${Z[0]}`,_+=`m${$[0]}`,_}),x,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:p,mergedFocusable:s,mergedSize:a,showBorder:i,enterPressed:r,rtlEnabled:v,handleMousedown:l,handleKeydown:f,handleBlur:d,handleKeyup:c,handleClick:u,customColorCssVars:pe(()=>{const{color:_}=e;if(!_)return null;const S=xo(_);return{"--n-border-color":_,"--n-border-color-hover":S,"--n-border-color-pressed":nc(_),"--n-border-color-focus":S,"--n-border-color-disabled":_}}),cssVars:h?void 0:x,themeClass:y==null?void 0:y.themeClass,onRender:y==null?void 0:y.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Bt(this.$slots.default,i=>i&&k("span",{class:`${e}-button__content`},i));return k(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,k(f5,{width:!0},{default:()=>Bt(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&k("span",{class:`${e}-button__icon`,style:{margin:ja(this.$slots.default)?"0":""}},k(Ef,null,{default:()=>this.loading?k(Af,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):k("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:k(xz,{ref:"waveElRef",clsPrefix:e}),this.showBorder?k("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?k("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),Z1=Lr;function Xz(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:o,borderColor:a,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:f,fontSizeLarge:d,dividerColor:h}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:o,border:`1px solid ${a}`,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:f,fontSizeLarge:d,dividerColor:h}}const Kz={common:hn,peers:{Input:mv,Button:yv},self:Xz};function Zz(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return"#000000"}function jl(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function Jz(e){return e=Math.round(e),e>=360?359:e<0?0:e}function Qz(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const eF={rgb:{hex(e){return ji(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...s0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...a0(t,n,r),i])}},hex:{rgb(e){return Hr(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...s0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...a0(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=Oo(e);return ji([...td(t,n,r),i])},rgb(e){const[t,n,r,i]=Oo(e);return Hr([...td(t,n,r),i])},hsv(e){const[t,n,r,i]=Oo(e);return No([...s2(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=Hi(e);return ji([...si(t,n,r),i])},rgb(e){const[t,n,r,i]=Hi(e);return Hr([...si(t,n,r),i])},hsl(e){const[t,n,r,i]=Hi(e);return Ui([...Ec(t,n,r),i])}}};function T5(e,t,n){return n=n||jl(e),n?n===t?e:eF[n][t](e):null}const Ps="12px",tF=12,wo="6px",nF=Fe({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){!t.value||!e.rgba||(Mt("mousemove",document,r),Mt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=(o.clientX-l)/(s-tF);e.onUpdateAlpha(Qz(u))}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,railBackgroundImage:pe(()=>{const{rgba:o}=e;return o?`linear-gradient(to right, rgba(${o[0]}, ${o[1]}, ${o[2]}, 0) 0%, rgba(${o[0]}, ${o[1]}, ${o[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:Ps,borderRadius:wo},onMousedown:this.handleMouseDown},k("div",{style:{borderRadius:wo,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},k("div",{class:`${e}-color-picker-checkboard`}),k("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&k("div",{style:{position:"absolute",left:wo,right:wo,top:0,bottom:0}},k("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${wo})`,borderRadius:wo,width:Ps,height:Ps}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:Hr(this.rgba),borderRadius:wo,width:Ps,height:Ps}}))))}}),_v="n-color-picker";function rF(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function iF(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function oF(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function aF(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function sF(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const lF={paddingSmall:"0 4px"},J1=Fe({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=ne(""),{themeRef:n}=$t(_v,null);xr(()=>{t.value=r()});function r(){const{value:a}=e;if(a===null)return"";const{label:s}=e;return s==="HEX"?a:s==="A"?`${Math.floor(a*100)}%`:String(Math.floor(a))}function i(a){t.value=a}function o(a){let s,l;switch(e.label){case"HEX":l=aF(a),l&&e.onUpdateValue(a),t.value=r();break;case"H":s=iF(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=oF(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=sF(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=rF(a),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:o,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return k(ts,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:lF,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),uF=Fe({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?ji:bl)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?No:c0)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?Hr:u0)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?Ui:d0)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return k("div",{class:`${e}-color-picker-input`},k("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),k(Dz,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let o=null;try{o=r===null?null:(i?ji:bl)(r)}catch{}return k(J1,{label:"HEX",showAlpha:i,value:o,onUpdateValue:a=>{this.handleUnitUpdateValue(0,a)}})}return(n+(i?"a":"")).split("").map((o,a)=>k(J1,{label:o.toUpperCase(),value:r===null?null:r[a],onUpdateValue:s=>{this.handleUnitUpdateValue(a,s)}}))}}))}});function cF(e,t){if(t==="hsv"){const[n,r,i,o]=Hi(e);return Hr([...si(n,r,i),o])}return e}function dF(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const fF=Fe({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=pe(()=>e.swatches.map(o=>{const a=jl(o);return{value:o,mode:a,legalValue:cF(o,a)}}));function n(o){const{mode:a}=e;let{value:s,mode:l}=o;return l||(l="hex",/^[a-zA-Z]+$/.test(s)?s=dF(s):(od("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),l===a?s:T5(s,a,l)}function r(o){e.onUpdateColor(n(o))}function i(o,a){o.key==="Enter"&&r(a)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>k("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},k("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),hF=Fe({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=$t(_v,null);return()=>{const{hsla:r,value:i,clsPrefix:o,onClick:a,disabled:s}=e,l=t.label||n.value;return k("div",{class:[`${o}-color-picker-trigger`,s&&`${o}-color-picker-trigger--disabled`],onClick:s?void 0:a},k("div",{class:`${o}-color-picker-trigger__fill`},k("div",{class:`${o}-color-picker-checkboard`}),k("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?Ui(r):""}}),i&&r?k("div",{class:`${o}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},l?l(i):i):null))}}}),pF=Fe({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=jl(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,T5(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-preview__preview`},k("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),k("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),ka="12px",gF=12,Co="6px",vF=6,bF="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",mF=Fe({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(Mt("mousemove",document,r),Mt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=Jz((o.clientX-l-vF)/(s-gF)*360);e.onUpdateHue(u)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-slider`,style:{height:ka,borderRadius:Co}},k("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:bF,height:ka,borderRadius:Co,position:"relative"},onMousedown:this.handleMouseDown},k("div",{style:{position:"absolute",left:Co,right:Co,top:0,bottom:0}},k("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${Co})`,borderRadius:Co,width:ka,height:ka}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:Co,width:ka,height:ka}})))))}}),rc="12px",ic="6px",yF=Fe({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(Mt("mousemove",document,r),Mt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,height:l,left:u,bottom:c}=a.getBoundingClientRect(),f=(c-o.clientY)/l,d=(o.clientX-u)/s,h=100*(d>1?1:d<0?0:d),p=100*(f>1?1:f<0?0:f);e.onUpdateSV(h,p)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{palleteRef:t,handleColor:pe(()=>{const{rgba:o}=e;return o?`rgb(${o[0]}, ${o[1]}, ${o[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},k("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),k("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&k("div",{class:`${e}-color-picker-handle`,style:{width:rc,height:rc,borderRadius:ic,left:`calc(${this.displayedSv[0]}% - ${ic})`,bottom:`calc(${this.displayedSv[1]}% - ${ic})`}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:ic,width:rc,height:rc}})))}}),_F=ce([W("color-picker",`
|
|
1182
|
+
`),ge("dashed",[Q("border, state-border",{borderStyle:"dashed !important"})]),ge("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),ce("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),ce("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),Yz=Object.assign(Object.assign({},pt.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!$5}}),Lr=Fe({name:"Button",props:Yz,setup(e){const t=ne(null),n=ne(null),r=ne(!1),i=Ht(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),o=$t(Wz,{}),{mergedSizeRef:a}=aa({},{defaultSize:"medium",mergedSize:_=>{const{size:S}=e;if(S)return S;const{size:$}=o;if($)return $;const{mergedSize:w}=_||{};return w?w.value:"medium"}}),s=pe(()=>e.focusable&&!e.disabled),l=_=>{var S;s.value||_.preventDefault(),!e.nativeFocusBehavior&&(_.preventDefault(),!e.disabled&&s.value&&((S=t.value)===null||S===void 0||S.focus({preventScroll:!0})))},u=_=>{var S;if(!e.disabled&&!e.loading){const{onClick:$}=e;$&&Ye($,_),e.text||(S=n.value)===null||S===void 0||S.play()}},c=_=>{switch(_.key){case"Enter":if(!e.keyboard)return;r.value=!1}},d=_=>{switch(_.key){case"Enter":if(!e.keyboard||e.loading){_.preventDefault();return}r.value=!0}},f=()=>{r.value=!1},{inlineThemeDisabled:h,mergedClsPrefixRef:p,mergedRtlRef:g}=rn(e),b=pt("Button","-button",Gz,yv,e,p),v=co("Button",g,p),x=pe(()=>{const _=b.value,{common:{cubicBezierEaseInOut:S,cubicBezierEaseOut:$},self:w}=_,{rippleDuration:T,opacityDisabled:M,fontWeight:P,fontWeightStrong:R}=w,C=a.value,{dashed:E,type:F,ghost:z,text:j,color:Z,round:J,circle:ie,textColor:he,secondary:_e,tertiary:oe,quaternary:ve,strong:we}=e,Oe={"--n-font-weight":we?R:P};let xe={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Xe=F==="tertiary",Ve=F==="default",fe=Xe?"default":F;if(j){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":L||w[Se("textColorText",fe)],"--n-text-color-hover":L?xo(L):w[Se("textColorTextHover",fe)],"--n-text-color-pressed":L?nc(L):w[Se("textColorTextPressed",fe)],"--n-text-color-focus":L?xo(L):w[Se("textColorTextHover",fe)],"--n-text-color-disabled":L||w[Se("textColorTextDisabled",fe)]}}else if(z||E){const L=he||Z;xe={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Z||w[Se("rippleColor",fe)],"--n-text-color":L||w[Se("textColorGhost",fe)],"--n-text-color-hover":L?xo(L):w[Se("textColorGhostHover",fe)],"--n-text-color-pressed":L?nc(L):w[Se("textColorGhostPressed",fe)],"--n-text-color-focus":L?xo(L):w[Se("textColorGhostHover",fe)],"--n-text-color-disabled":L||w[Se("textColorGhostDisabled",fe)]}}else if(_e){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",fe)],O=Z||L,ee=F!=="default"&&F!=="tertiary";xe={"--n-color":ee?nt(O,{alpha:Number(w.colorOpacitySecondary)}):w.colorSecondary,"--n-color-hover":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-pressed":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryPressed)}):w.colorSecondaryPressed,"--n-color-focus":ee?nt(O,{alpha:Number(w.colorOpacitySecondaryHover)}):w.colorSecondaryHover,"--n-color-disabled":w.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":O,"--n-text-color-hover":O,"--n-text-color-pressed":O,"--n-text-color-focus":O,"--n-text-color-disabled":O}}else if(oe||ve){const L=Ve?w.textColor:Xe?w.textColorTertiary:w[Se("color",fe)],O=Z||L;oe?(xe["--n-color"]=w.colorTertiary,xe["--n-color-hover"]=w.colorTertiaryHover,xe["--n-color-pressed"]=w.colorTertiaryPressed,xe["--n-color-focus"]=w.colorSecondaryHover,xe["--n-color-disabled"]=w.colorTertiary):(xe["--n-color"]=w.colorQuaternary,xe["--n-color-hover"]=w.colorQuaternaryHover,xe["--n-color-pressed"]=w.colorQuaternaryPressed,xe["--n-color-focus"]=w.colorQuaternaryHover,xe["--n-color-disabled"]=w.colorQuaternary),xe["--n-ripple-color"]="#0000",xe["--n-text-color"]=O,xe["--n-text-color-hover"]=O,xe["--n-text-color-pressed"]=O,xe["--n-text-color-focus"]=O,xe["--n-text-color-disabled"]=O}else xe={"--n-color":Z||w[Se("color",fe)],"--n-color-hover":Z?xo(Z):w[Se("colorHover",fe)],"--n-color-pressed":Z?nc(Z):w[Se("colorPressed",fe)],"--n-color-focus":Z?xo(Z):w[Se("colorFocus",fe)],"--n-color-disabled":Z||w[Se("colorDisabled",fe)],"--n-ripple-color":Z||w[Se("rippleColor",fe)],"--n-text-color":he||(Z?w.textColorPrimary:Xe?w.textColorTertiary:w[Se("textColor",fe)]),"--n-text-color-hover":he||(Z?w.textColorHoverPrimary:w[Se("textColorHover",fe)]),"--n-text-color-pressed":he||(Z?w.textColorPressedPrimary:w[Se("textColorPressed",fe)]),"--n-text-color-focus":he||(Z?w.textColorFocusPrimary:w[Se("textColorFocus",fe)]),"--n-text-color-disabled":he||(Z?w.textColorDisabledPrimary:w[Se("textColorDisabled",fe)])};let Ee={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};j?Ee={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ee={"--n-border":w[Se("border",fe)],"--n-border-hover":w[Se("borderHover",fe)],"--n-border-pressed":w[Se("borderPressed",fe)],"--n-border-focus":w[Se("borderFocus",fe)],"--n-border-disabled":w[Se("borderDisabled",fe)]};const{[Se("height",C)]:Pe,[Se("fontSize",C)]:A,[Se("padding",C)]:H,[Se("paddingRound",C)]:Y,[Se("iconSize",C)]:de,[Se("borderRadius",C)]:le,[Se("iconMargin",C)]:q,waveOpacity:N}=w,re={"--n-width":ie&&!j?Pe:"initial","--n-height":j?"initial":Pe,"--n-font-size":A,"--n-padding":ie||j?"initial":J?Y:H,"--n-icon-size":de,"--n-icon-margin":q,"--n-border-radius":j?"initial":ie||J?Pe:le};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":S,"--n-bezier-ease-out":$,"--n-ripple-duration":T,"--n-opacity-disabled":M,"--n-wave-opacity":N},Oe),xe),Ee),re)}),y=h?Cn("button",pe(()=>{let _="";const{dashed:S,type:$,ghost:w,text:T,color:M,round:P,circle:R,textColor:C,secondary:E,tertiary:F,quaternary:z,strong:j}=e;S&&(_+="a"),w&&(_+="b"),T&&(_+="c"),P&&(_+="d"),R&&(_+="e"),E&&(_+="f"),F&&(_+="g"),z&&(_+="h"),j&&(_+="i"),M&&(_+=`j${of(M)}`),C&&(_+=`k${of(C)}`);const{value:Z}=a;return _+=`l${Z[0]}`,_+=`m${$[0]}`,_}),x,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:p,mergedFocusable:s,mergedSize:a,showBorder:i,enterPressed:r,rtlEnabled:v,handleMousedown:l,handleKeydown:d,handleBlur:f,handleKeyup:c,handleClick:u,customColorCssVars:pe(()=>{const{color:_}=e;if(!_)return null;const S=xo(_);return{"--n-border-color":_,"--n-border-color-hover":S,"--n-border-color-pressed":nc(_),"--n-border-color-focus":S,"--n-border-color-disabled":_}}),cssVars:h?void 0:x,themeClass:y==null?void 0:y.themeClass,onRender:y==null?void 0:y.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Bt(this.$slots.default,i=>i&&k("span",{class:`${e}-button__content`},i));return k(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,k(d5,{width:!0},{default:()=>Bt(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&k("span",{class:`${e}-button__icon`,style:{margin:ja(this.$slots.default)?"0":""}},k(Ed,null,{default:()=>this.loading?k(Ad,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):k("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:k(xz,{ref:"waveElRef",clsPrefix:e}),this.showBorder?k("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?k("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),Z1=Lr;function Xz(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:o,borderColor:a,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:f,dividerColor:h}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:o,border:`1px solid ${a}`,heightSmall:s,heightMedium:l,heightLarge:u,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:f,dividerColor:h}}const Kz={common:hn,peers:{Input:mv,Button:yv},self:Xz};function Zz(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return"#000000"}function jl(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function Jz(e){return e=Math.round(e),e>=360?359:e<0?0:e}function Qz(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const eF={rgb:{hex(e){return ji(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...s0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...a0(t,n,r),i])}},hex:{rgb(e){return Hr(en(e))},hsl(e){const[t,n,r,i]=en(e);return Ui([...s0(t,n,r),i])},hsv(e){const[t,n,r,i]=en(e);return No([...a0(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=Oo(e);return ji([...tf(t,n,r),i])},rgb(e){const[t,n,r,i]=Oo(e);return Hr([...tf(t,n,r),i])},hsv(e){const[t,n,r,i]=Oo(e);return No([...s2(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=Hi(e);return ji([...si(t,n,r),i])},rgb(e){const[t,n,r,i]=Hi(e);return Hr([...si(t,n,r),i])},hsl(e){const[t,n,r,i]=Hi(e);return Ui([...Ec(t,n,r),i])}}};function T5(e,t,n){return n=n||jl(e),n?n===t?e:eF[n][t](e):null}const Ps="12px",tF=12,wo="6px",nF=Fe({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){!t.value||!e.rgba||(Mt("mousemove",document,r),Mt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=(o.clientX-l)/(s-tF);e.onUpdateAlpha(Qz(u))}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,railBackgroundImage:pe(()=>{const{rgba:o}=e;return o?`linear-gradient(to right, rgba(${o[0]}, ${o[1]}, ${o[2]}, 0) 0%, rgba(${o[0]}, ${o[1]}, ${o[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:Ps,borderRadius:wo},onMousedown:this.handleMouseDown},k("div",{style:{borderRadius:wo,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},k("div",{class:`${e}-color-picker-checkboard`}),k("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&k("div",{style:{position:"absolute",left:wo,right:wo,top:0,bottom:0}},k("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${wo})`,borderRadius:wo,width:Ps,height:Ps}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:Hr(this.rgba),borderRadius:wo,width:Ps,height:Ps}}))))}}),_v="n-color-picker";function rF(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function iF(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function oF(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function aF(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function sF(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const lF={paddingSmall:"0 4px"},J1=Fe({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=ne(""),{themeRef:n}=$t(_v,null);xr(()=>{t.value=r()});function r(){const{value:a}=e;if(a===null)return"";const{label:s}=e;return s==="HEX"?a:s==="A"?`${Math.floor(a*100)}%`:String(Math.floor(a))}function i(a){t.value=a}function o(a){let s,l;switch(e.label){case"HEX":l=aF(a),l&&e.onUpdateValue(a),t.value=r();break;case"H":s=iF(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=oF(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=sF(a),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=rF(a),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:o,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return k(ts,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:lF,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),uF=Fe({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?ji:bl)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?No:c0)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?Hr:u0)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?Ui:f0)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return k("div",{class:`${e}-color-picker-input`},k("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),k(Dz,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let o=null;try{o=r===null?null:(i?ji:bl)(r)}catch{}return k(J1,{label:"HEX",showAlpha:i,value:o,onUpdateValue:a=>{this.handleUnitUpdateValue(0,a)}})}return(n+(i?"a":"")).split("").map((o,a)=>k(J1,{label:o.toUpperCase(),value:r===null?null:r[a],onUpdateValue:s=>{this.handleUnitUpdateValue(a,s)}}))}}))}});function cF(e,t){if(t==="hsv"){const[n,r,i,o]=Hi(e);return Hr([...si(n,r,i),o])}return e}function fF(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const dF=Fe({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=pe(()=>e.swatches.map(o=>{const a=jl(o);return{value:o,mode:a,legalValue:cF(o,a)}}));function n(o){const{mode:a}=e;let{value:s,mode:l}=o;return l||(l="hex",/^[a-zA-Z]+$/.test(s)?s=fF(s):(af("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),l===a?s:T5(s,a,l)}function r(o){e.onUpdateColor(n(o))}function i(o,a){o.key==="Enter"&&r(a)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>k("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},k("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),hF=Fe({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=$t(_v,null);return()=>{const{hsla:r,value:i,clsPrefix:o,onClick:a,disabled:s}=e,l=t.label||n.value;return k("div",{class:[`${o}-color-picker-trigger`,s&&`${o}-color-picker-trigger--disabled`],onClick:s?void 0:a},k("div",{class:`${o}-color-picker-trigger__fill`},k("div",{class:`${o}-color-picker-checkboard`}),k("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?Ui(r):""}}),i&&r?k("div",{class:`${o}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},l?l(i):i):null))}}}),pF=Fe({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=jl(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,T5(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-preview__preview`},k("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),k("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),ka="12px",gF=12,Co="6px",vF=6,bF="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",mF=Fe({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(Mt("mousemove",document,r),Mt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,left:l}=a.getBoundingClientRect(),u=Jz((o.clientX-l-vF)/(s-gF)*360);e.onUpdateHue(u)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-slider`,style:{height:ka,borderRadius:Co}},k("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:bF,height:ka,borderRadius:Co,position:"relative"},onMousedown:this.handleMouseDown},k("div",{style:{position:"absolute",left:Co,right:Co,top:0,bottom:0}},k("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${Co})`,borderRadius:Co,width:ka,height:ka}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:Co,width:ka,height:ka}})))))}}),rc="12px",ic="6px",yF=Fe({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=ne(null);function n(o){t.value&&(Mt("mousemove",document,r),Mt("mouseup",document,i),r(o))}function r(o){const{value:a}=t;if(!a)return;const{width:s,height:l,left:u,bottom:c}=a.getBoundingClientRect(),d=(c-o.clientY)/l,f=(o.clientX-u)/s,h=100*(f>1?1:f<0?0:f),p=100*(d>1?1:d<0?0:d);e.onUpdateSV(h,p)}function i(){var o;St("mousemove",document,r),St("mouseup",document,i),(o=e.onComplete)===null||o===void 0||o.call(e)}return{palleteRef:t,handleColor:pe(()=>{const{rgba:o}=e;return o?`rgb(${o[0]}, ${o[1]}, ${o[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return k("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},k("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),k("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&k("div",{class:`${e}-color-picker-handle`,style:{width:rc,height:rc,borderRadius:ic,left:`calc(${this.displayedSv[0]}% - ${ic})`,bottom:`calc(${this.displayedSv[1]}% - ${ic})`}},k("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:ic,width:rc,height:rc}})))}}),_F=ce([W("color-picker",`
|
|
1183
1183
|
display: inline-block;
|
|
1184
1184
|
box-sizing: border-box;
|
|
1185
1185
|
height: var(--n-height);
|
|
@@ -1359,7 +1359,7 @@ ${t}
|
|
|
1359
1359
|
background: inherit;
|
|
1360
1360
|
filter: blur(2px);
|
|
1361
1361
|
content: "";
|
|
1362
|
-
`)])])])])]),xF=Object.assign(Object.assign({},pt.props),{value:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,defaultValue:String,modes:{type:Array,default:()=>["rgb","hex","hsl"]},placement:{type:String,default:"bottom-start"},to:Pn.propTo,showAlpha:{type:Boolean,default:!0},showPreview:Boolean,swatches:Array,disabled:{type:Boolean,default:void 0},actions:{type:Array,default:null},internalActions:Array,size:String,renderLabel:Function,onComplete:Function,onConfirm:Function,onClear:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),wF=Fe({name:"ColorPicker",props:xF,setup(e,{slots:t}){const n=ne(null);let r=null;const i=aa(e),{mergedSizeRef:o,mergedDisabledRef:a}=i,{localeRef:s}=_u("global"),{mergedClsPrefixRef:l,namespaceRef:u,inlineThemeDisabled:c}=rn(e),
|
|
1362
|
+
`)])])])])]),xF=Object.assign(Object.assign({},pt.props),{value:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,defaultValue:String,modes:{type:Array,default:()=>["rgb","hex","hsl"]},placement:{type:String,default:"bottom-start"},to:Pn.propTo,showAlpha:{type:Boolean,default:!0},showPreview:Boolean,swatches:Array,disabled:{type:Boolean,default:void 0},actions:{type:Array,default:null},internalActions:Array,size:String,renderLabel:Function,onComplete:Function,onConfirm:Function,onClear:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),wF=Fe({name:"ColorPicker",props:xF,setup(e,{slots:t}){const n=ne(null);let r=null;const i=aa(e),{mergedSizeRef:o,mergedDisabledRef:a}=i,{localeRef:s}=_u("global"),{mergedClsPrefixRef:l,namespaceRef:u,inlineThemeDisabled:c}=rn(e),d=pt("ColorPicker","-color-picker",_F,Kz,e,l);jn(_v,{themeRef:d,renderLabelRef:et(e,"renderLabel"),colorPickerSlots:t});const f=ne(e.defaultShow),h=Gr(et(e,"show"),f);function p(N){const{onUpdateShow:re,"onUpdate:show":L}=e;re&&Ye(re,N),L&&Ye(L,N),f.value=N}const{defaultValue:g}=e,b=ne(g===void 0?Zz(e.modes,e.showAlpha):g),v=Gr(et(e,"value"),b),x=ne([v.value]),y=ne(0),_=pe(()=>jl(v.value)),{modes:S}=e,$=ne(jl(v.value)||S[0]||"rgb");function w(){const{modes:N}=e,{value:re}=$,L=N.findIndex(O=>O===re);~L?$.value=N[(L+1)%N.length]:$.value="rgb"}let T,M,P,R,C,E,F,z;const j=pe(()=>{const{value:N}=v;if(!N)return null;switch(_.value){case"hsv":return Hi(N);case"hsl":return[T,M,P,z]=Oo(N),[...s2(T,M,P),z];case"rgb":case"hex":return[C,E,F,z]=en(N),[...a0(C,E,F),z]}}),Z=pe(()=>{const{value:N}=v;if(!N)return null;switch(_.value){case"rgb":case"hex":return en(N);case"hsv":return[T,M,R,z]=Hi(N),[...si(T,M,R),z];case"hsl":return[T,M,P,z]=Oo(N),[...tf(T,M,P),z]}}),J=pe(()=>{const{value:N}=v;if(!N)return null;switch(_.value){case"hsl":return Oo(N);case"hsv":return[T,M,R,z]=Hi(N),[...Ec(T,M,R),z];case"rgb":case"hex":return[C,E,F,z]=en(N),[...s0(C,E,F),z]}}),ie=pe(()=>{switch($.value){case"rgb":case"hex":return Z.value;case"hsv":return j.value;case"hsl":return J.value}}),he=ne(0),_e=ne(1),oe=ne([0,0]);function ve(N,re){const{value:L}=j,O=he.value,ee=L?L[3]:1;oe.value=[N,re];const{showAlpha:U}=e;switch($.value){case"hsv":xe((U?No:c0)([O,N,re,ee]),"cursor");break;case"hsl":xe((U?Ui:f0)([...Ec(O,N,re),ee]),"cursor");break;case"rgb":xe((U?Hr:u0)([...si(O,N,re),ee]),"cursor");break;case"hex":xe((U?ji:bl)([...si(O,N,re),ee]),"cursor");break}}function we(N){he.value=N;const{value:re}=j;if(!re)return;const[,L,O,ee]=re,{showAlpha:U}=e;switch($.value){case"hsv":xe((U?No:c0)([N,L,O,ee]),"cursor");break;case"rgb":xe((U?Hr:u0)([...si(N,L,O),ee]),"cursor");break;case"hex":xe((U?ji:bl)([...si(N,L,O),ee]),"cursor");break;case"hsl":xe((U?Ui:f0)([...Ec(N,L,O),ee]),"cursor");break}}function Oe(N){switch($.value){case"hsv":[T,M,R]=j.value,xe(No([T,M,R,N]),"cursor");break;case"rgb":[C,E,F]=Z.value,xe(Hr([C,E,F,N]),"cursor");break;case"hex":[C,E,F]=Z.value,xe(ji([C,E,F,N]),"cursor");break;case"hsl":[T,M,P]=J.value,xe(Ui([T,M,P,N]),"cursor");break}_e.value=N}function xe(N,re){re==="cursor"?r=N:r=null;const{nTriggerFormChange:L,nTriggerFormInput:O}=i,{onUpdateValue:ee,"onUpdate:value":U}=e;ee&&Ye(ee,N),U&&Ye(U,N),L(),O(),b.value=N}function Xe(N){xe(N,"input"),fn(Ve)}function Ve(N=!0){const{value:re}=v;if(re){const{nTriggerFormChange:L,nTriggerFormInput:O}=i,{onComplete:ee}=e;ee&&ee(re);const{value:U}=x,{value:B}=y;N&&(U.splice(B+1,U.length,re),y.value=B+1),L(),O()}}function fe(){const{value:N}=y;N-1<0||(xe(x.value[N-1],"input"),Ve(!1),y.value=N-1)}function Ee(){const{value:N}=y;N<0||N+1>=x.value.length||(xe(x.value[N+1],"input"),Ve(!1),y.value=N+1)}function Pe(){xe(null,"input");const{onClear:N}=e;N&&N(),p(!1)}function A(){const{value:N}=v,{onConfirm:re}=e;re&&re(N),p(!1)}const H=pe(()=>y.value>=1),Y=pe(()=>{const{value:N}=x;return N.length>1&&y.value<N.length-1});vt(h,N=>{N||(x.value=[v.value],y.value=0)}),xr(()=>{if(!(r&&r===v.value)){const{value:N}=j;N&&(he.value=N[0],_e.value=N[3],oe.value=[N[1],N[2]])}r=null});const de=pe(()=>{const{value:N}=o,{common:{cubicBezierEaseInOut:re},self:{textColor:L,color:O,panelFontSize:ee,boxShadow:U,border:B,borderRadius:V,dividerColor:me,[Se("height",N)]:Ae,[Se("fontSize",N)]:Re}}=d.value;return{"--n-bezier":re,"--n-text-color":L,"--n-color":O,"--n-panel-font-size":ee,"--n-font-size":Re,"--n-box-shadow":U,"--n-border":B,"--n-border-radius":V,"--n-height":Ae,"--n-divider-color":me}}),le=c?Cn("color-picker",pe(()=>o.value[0]),de,e):void 0;function q(){var N;const{value:re}=Z,{value:L}=he,{internalActions:O,modes:ee,actions:U}=e,{value:B}=d,{value:V}=l;return k("div",{class:[`${V}-color-picker-panel`,le==null?void 0:le.themeClass.value],onDragstart:me=>{me.preventDefault()},style:c?void 0:de.value},k("div",{class:`${V}-color-picker-control`},k(yF,{clsPrefix:V,rgba:re,displayedHue:L,displayedSv:oe.value,onUpdateSV:ve,onComplete:Ve}),k("div",{class:`${V}-color-picker-preview`},k("div",{class:`${V}-color-picker-preview__sliders`},k(mF,{clsPrefix:V,hue:L,onUpdateHue:we,onComplete:Ve}),e.showAlpha?k(nF,{clsPrefix:V,rgba:re,alpha:_e.value,onUpdateAlpha:Oe,onComplete:Ve}):null),e.showPreview?k(pF,{clsPrefix:V,mode:$.value,color:Z.value&&bl(Z.value),onUpdateColor:me=>{xe(me,"input")}}):null),k(uF,{clsPrefix:V,showAlpha:e.showAlpha,mode:$.value,modes:ee,onUpdateMode:w,value:v.value,valueArr:ie.value,onUpdateValue:Xe}),((N=e.swatches)===null||N===void 0?void 0:N.length)&&k(dF,{clsPrefix:V,mode:$.value,swatches:e.swatches,onUpdateColor:me=>{xe(me,"input")}})),U!=null&&U.length?k("div",{class:`${V}-color-picker-action`},U.includes("confirm")&&k(Lr,{size:"small",onClick:A,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.confirm}),U.includes("clear")&&k(Lr,{size:"small",onClick:Pe,disabled:!v.value,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.clear})):null,t.action?k("div",{class:`${V}-color-picker-action`},{default:t.action}):O?k("div",{class:`${V}-color-picker-action`},O.includes("undo")&&k(Lr,{size:"small",onClick:fe,disabled:!H.value,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.undo}),O.includes("redo")&&k(Lr,{size:"small",onClick:Ee,disabled:!Y.value,theme:B.peers.Button,themeOverrides:B.peerOverrides.Button},{default:()=>s.value.redo})):null)}return{mergedClsPrefix:l,namespace:u,selfRef:n,hsla:J,rgba:Z,mergedShow:h,mergedDisabled:a,isMounted:gs(),adjustedTo:Pn(e),mergedValue:v,handleTriggerClick(){p(!0)},handleClickOutside(N){var re;!((re=n.value)===null||re===void 0)&&re.contains(Qa(N))||p(!1)},renderPanel:q,cssVars:c?void 0:de,themeClass:le==null?void 0:le.themeClass,onRender:le==null?void 0:le.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),k("div",{class:[this.themeClass,`${t}-color-picker`],ref:"selfRef",style:this.cssVars},k(xd,null,{default:()=>[k(wd,null,{default:()=>k(hF,{clsPrefix:t,value:this.mergedValue,hsla:this.hsla,disabled:this.mergedDisabled,onClick:this.handleTriggerClick},{label:e.label})}),k(Sd,{placement:this.placement,show:this.mergedShow,containerClass:this.namespace,teleportDisabled:this.adjustedTo===Pn.tdkey,to:this.adjustedTo},{default:()=>k(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?lo(this.renderPanel(),[[Ol,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function CF(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const SF={common:hn,peers:{InternalSelection:C5,InternalSelectMenu:m5},self:CF},$F=ce([W("select",`
|
|
1363
1363
|
z-index: auto;
|
|
1364
1364
|
outline: none;
|
|
1365
1365
|
width: 100%;
|
|
@@ -1368,7 +1368,7 @@ ${t}
|
|
|
1368
1368
|
`),W("select-menu",`
|
|
1369
1369
|
margin: 4px 0;
|
|
1370
1370
|
box-shadow: var(--n-menu-box-shadow);
|
|
1371
|
-
`,[Ul({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),kF=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),Pf=Fe({name:"Select",props:kF,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=rn(e),o=pt("Select","-select",$F,SF,e,t),a=ne(e.defaultValue),s=et(e,"value"),l=Gr(s,a),u=ne(!1),c=ne(""),f=nd(e,["items","options"]),d=ne([]),h=ne([]),p=pe(()=>h.value.concat(d.value).concat(f.value)),g=pe(()=>{const{filter:G}=e;if(G)return G;const{labelField:m,valueField:I}=e;return(D,te)=>{if(!te)return!1;const K=te[m];if(typeof K=="string")return Kh(D,K);const se=te[I];return typeof se=="string"?Kh(D,se):typeof se=="number"?Kh(D,String(se)):!1}}),b=pe(()=>{if(e.remote)return f.value;{const{value:G}=p,{value:m}=c;return!m.length||!e.filterable?G:Uz(G,g.value,m,e.childrenField)}}),v=pe(()=>{const{valueField:G,childrenField:m}=e,I=Hz(G,m);return UR(b.value,I)}),x=pe(()=>jz(p.value,e.valueField,e.childrenField)),y=ne(!1),_=Gr(et(e,"show"),y),S=ne(null),$=ne(null),w=ne(null),{localeRef:T}=_u("Select"),M=pe(()=>{var G;return(G=e.placeholder)!==null&&G!==void 0?G:T.value.placeholder}),P=[],R=ne(new Map),C=pe(()=>{const{fallbackOption:G}=e;if(G===void 0){const{labelField:m,valueField:I}=e;return D=>({[m]:String(D),[I]:D})}return G===!1?!1:m=>Object.assign(G(m),{value:m})});function E(G){const m=e.remote,{value:I}=R,{value:D}=x,{value:te}=C,K=[];return G.forEach(se=>{if(D.has(se))K.push(D.get(se));else if(m&&I.has(se))K.push(I.get(se));else if(te){const ue=te(se);ue&&K.push(ue)}}),K}const F=pe(()=>{if(e.multiple){const{value:G}=l;return Array.isArray(G)?E(G):[]}return null}),z=pe(()=>{const{value:G}=l;return!e.multiple&&!Array.isArray(G)?G===null?null:E([G])[0]||null:null}),j=aa(e),{mergedSizeRef:Z,mergedDisabledRef:J,mergedStatusRef:ie}=j;function he(G,m){const{onChange:I,"onUpdate:value":D,onUpdateValue:te}=e,{nTriggerFormChange:K,nTriggerFormInput:se}=j;I&&Ye(I,G,m),te&&Ye(te,G,m),D&&Ye(D,G,m),a.value=G,K(),se()}function _e(G){const{onBlur:m}=e,{nTriggerFormBlur:I}=j;m&&Ye(m,G),I()}function oe(){const{onClear:G}=e;G&&Ye(G)}function ve(G){const{onFocus:m,showOnFocus:I}=e,{nTriggerFormFocus:D}=j;m&&Ye(m,G),D(),I&&Ve()}function we(G){const{onSearch:m}=e;m&&Ye(m,G)}function Oe(G){const{onScroll:m}=e;m&&Ye(m,G)}function xe(){var G;const{remote:m,multiple:I}=e;if(m){const{value:D}=R;if(I){const{valueField:te}=e;(G=F.value)===null||G===void 0||G.forEach(K=>{D.set(K[te],K)})}else{const te=z.value;te&&D.set(te[e.valueField],te)}}}function Xe(G){const{onUpdateShow:m,"onUpdate:show":I}=e;m&&Ye(m,G),I&&Ye(I,G),y.value=G}function Ve(){J.value||(Xe(!0),y.value=!0,e.filterable&&dt())}function de(){Xe(!1)}function Ee(){c.value="",h.value=P}const Pe=ne(!1);function A(){e.filterable&&(Pe.value=!0)}function H(){e.filterable&&(Pe.value=!1,_.value||Ee())}function Y(){J.value||(_.value?e.filterable?dt():de():Ve())}function fe(G){var m,I;!((I=(m=w.value)===null||m===void 0?void 0:m.selfRef)===null||I===void 0)&&I.contains(G.relatedTarget)||(u.value=!1,_e(G),de())}function le(G){ve(G),u.value=!0}function q(){u.value=!0}function N(G){var m;!((m=S.value)===null||m===void 0)&&m.$el.contains(G.relatedTarget)||(u.value=!1,_e(G),de())}function re(){var G;(G=S.value)===null||G===void 0||G.focus(),de()}function L(G){var m;_.value&&(!((m=S.value)===null||m===void 0)&&m.$el.contains(Qa(G))||de())}function O(G){if(!Array.isArray(G))return[];if(C.value)return Array.from(G);{const{remote:m}=e,{value:I}=x;if(m){const{value:D}=R;return G.filter(te=>I.has(te)||D.has(te))}else return G.filter(D=>I.has(D))}}function ee(G){U(G.rawNode)}function U(G){if(J.value)return;const{tag:m,remote:I,clearFilterAfterSelect:D,valueField:te}=e;if(m&&!I){const{value:K}=h,se=K[0]||null;if(se){const ue=d.value;ue.length?ue.push(se):d.value=[se],h.value=P}}if(I&&R.value.set(G[te],G),e.multiple){const K=O(l.value),se=K.findIndex(ue=>ue===G[te]);if(~se){if(K.splice(se,1),m&&!I){const ue=B(G[te]);~ue&&(d.value.splice(ue,1),D&&(c.value=""))}}else K.push(G[te]),D&&(c.value="");he(K,E(K))}else{if(m&&!I){const K=B(G[te]);~K?d.value=[d.value[K]]:d.value=P}lt(),de(),he(G[te],G)}}function B(G){return d.value.findIndex(m=>m[e.valueField]===G)}function V(G){_.value||Ve();const{value:m}=G.target;c.value=m;const{tag:I,remote:D}=e;if(we(m),I&&!D){if(!m){h.value=P;return}const{onCreate:te}=e,K=te?te(m):{[e.labelField]:m,[e.valueField]:m},{valueField:se,labelField:ue}=e;f.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])||d.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])?h.value=P:h.value=[K]}}function me(G){G.stopPropagation();const{multiple:m}=e;!m&&e.filterable&&de(),oe(),m?he([],[]):he(null,null)}function Ae(G){!vl(G,"action")&&!vl(G,"empty")&&!vl(G,"header")&&G.preventDefault()}function Re(G){Oe(G)}function rt(G){var m,I,D,te,K;if(!e.keyboard){G.preventDefault();return}switch(G.key){case" ":if(e.filterable)break;G.preventDefault();case"Enter":if(!(!((m=S.value)===null||m===void 0)&&m.isComposing)){if(_.value){const se=(I=w.value)===null||I===void 0?void 0:I.getPendingTmNode();se?ee(se):e.filterable||(de(),lt())}else if(Ve(),e.tag&&Pe.value){const se=h.value[0];if(se){const ue=se[e.valueField],{value:ae}=l;e.multiple&&Array.isArray(ae)&&ae.includes(ue)||U(se)}}}G.preventDefault();break;case"ArrowUp":if(G.preventDefault(),e.loading)return;_.value&&((D=w.value)===null||D===void 0||D.prev());break;case"ArrowDown":if(G.preventDefault(),e.loading)return;_.value?(te=w.value)===null||te===void 0||te.next():Ve();break;case"Escape":_.value&&(C9(G),de()),(K=S.value)===null||K===void 0||K.focus();break}}function lt(){var G;(G=S.value)===null||G===void 0||G.focus()}function dt(){var G;(G=S.value)===null||G===void 0||G.focusInput()}function zt(){var G;_.value&&((G=$.value)===null||G===void 0||G.syncPosition())}xe(),vt(et(e,"options"),xe);const yt={focus:()=>{var G;(G=S.value)===null||G===void 0||G.focus()},focusInput:()=>{var G;(G=S.value)===null||G===void 0||G.focusInput()},blur:()=>{var G;(G=S.value)===null||G===void 0||G.blur()},blurInput:()=>{var G;(G=S.value)===null||G===void 0||G.blurInput()}},Lt=pe(()=>{const{self:{menuBoxShadow:G}}=o.value;return{"--n-menu-box-shadow":G}}),ye=i?Cn("select",void 0,Lt,e):void 0;return Object.assign(Object.assign({},yt),{mergedStatus:ie,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:v,isMounted:gs(),triggerRef:S,menuRef:w,pattern:c,uncontrolledShow:y,mergedShow:_,adjustedTo:Pn(e),uncontrolledValue:a,mergedValue:l,followerRef:$,localizedPlaceholder:M,selectedOption:z,selectedOptions:F,mergedSize:Z,mergedDisabled:J,focused:u,activeWithoutMenuOpen:Pe,inlineThemeDisabled:i,onTriggerInputFocus:A,onTriggerInputBlur:H,handleTriggerOrMenuResize:zt,handleMenuFocus:q,handleMenuBlur:N,handleMenuTabOut:re,handleTriggerClick:Y,handleToggle:ee,handleDeleteOption:U,handlePatternInput:V,handleClear:me,handleTriggerBlur:fe,handleTriggerFocus:le,handleKeydown:rt,handleMenuAfterLeave:Ee,handleMenuClickOutside:L,handleMenuScroll:Re,handleMenuKeydown:rt,handleMenuMousedown:Ae,mergedTheme:o,cssVars:i?void 0:Lt,themeClass:ye==null?void 0:ye.themeClass,onRender:ye==null?void 0:ye.onRender})},render(){return k("div",{class:`${this.mergedClsPrefix}-select`},k(xf,null,{default:()=>[k(wf,null,{default:()=>k(mz,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),k(Sf,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Pn.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>k(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),lo(k(JR,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[mf,this.mergedShow],[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),MF={padding:"8px 14px"};function TF(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},MF),{borderRadius:t,boxShadow:n,color:ir(r,"rgba(0, 0, 0, .85)"),textColor:r})}const EF={common:hn,peers:{Popover:bv},self:TF},AF=Object.assign(Object.assign({},_5),pt.props),Wl=Fe({name:"Tooltip",props:AF,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=rn(e),n=pt("Tooltip","-tooltip",void 0,EF,e,t),r=ne(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(i){r.value.setShow(i)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:pe(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return k(x5,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function PF(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:o,opacity5:a}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:o,opacity5Depth:a}}const RF={common:hn,self:PF},zF=W("icon",`
|
|
1371
|
+
`,[Ul({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),kF=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),Pd=Fe({name:"Select",props:kF,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=rn(e),o=pt("Select","-select",$F,SF,e,t),a=ne(e.defaultValue),s=et(e,"value"),l=Gr(s,a),u=ne(!1),c=ne(""),d=nf(e,["items","options"]),f=ne([]),h=ne([]),p=pe(()=>h.value.concat(f.value).concat(d.value)),g=pe(()=>{const{filter:G}=e;if(G)return G;const{labelField:m,valueField:I}=e;return(D,te)=>{if(!te)return!1;const K=te[m];if(typeof K=="string")return Kh(D,K);const se=te[I];return typeof se=="string"?Kh(D,se):typeof se=="number"?Kh(D,String(se)):!1}}),b=pe(()=>{if(e.remote)return d.value;{const{value:G}=p,{value:m}=c;return!m.length||!e.filterable?G:Uz(G,g.value,m,e.childrenField)}}),v=pe(()=>{const{valueField:G,childrenField:m}=e,I=Hz(G,m);return UR(b.value,I)}),x=pe(()=>jz(p.value,e.valueField,e.childrenField)),y=ne(!1),_=Gr(et(e,"show"),y),S=ne(null),$=ne(null),w=ne(null),{localeRef:T}=_u("Select"),M=pe(()=>{var G;return(G=e.placeholder)!==null&&G!==void 0?G:T.value.placeholder}),P=[],R=ne(new Map),C=pe(()=>{const{fallbackOption:G}=e;if(G===void 0){const{labelField:m,valueField:I}=e;return D=>({[m]:String(D),[I]:D})}return G===!1?!1:m=>Object.assign(G(m),{value:m})});function E(G){const m=e.remote,{value:I}=R,{value:D}=x,{value:te}=C,K=[];return G.forEach(se=>{if(D.has(se))K.push(D.get(se));else if(m&&I.has(se))K.push(I.get(se));else if(te){const ue=te(se);ue&&K.push(ue)}}),K}const F=pe(()=>{if(e.multiple){const{value:G}=l;return Array.isArray(G)?E(G):[]}return null}),z=pe(()=>{const{value:G}=l;return!e.multiple&&!Array.isArray(G)?G===null?null:E([G])[0]||null:null}),j=aa(e),{mergedSizeRef:Z,mergedDisabledRef:J,mergedStatusRef:ie}=j;function he(G,m){const{onChange:I,"onUpdate:value":D,onUpdateValue:te}=e,{nTriggerFormChange:K,nTriggerFormInput:se}=j;I&&Ye(I,G,m),te&&Ye(te,G,m),D&&Ye(D,G,m),a.value=G,K(),se()}function _e(G){const{onBlur:m}=e,{nTriggerFormBlur:I}=j;m&&Ye(m,G),I()}function oe(){const{onClear:G}=e;G&&Ye(G)}function ve(G){const{onFocus:m,showOnFocus:I}=e,{nTriggerFormFocus:D}=j;m&&Ye(m,G),D(),I&&Ve()}function we(G){const{onSearch:m}=e;m&&Ye(m,G)}function Oe(G){const{onScroll:m}=e;m&&Ye(m,G)}function xe(){var G;const{remote:m,multiple:I}=e;if(m){const{value:D}=R;if(I){const{valueField:te}=e;(G=F.value)===null||G===void 0||G.forEach(K=>{D.set(K[te],K)})}else{const te=z.value;te&&D.set(te[e.valueField],te)}}}function Xe(G){const{onUpdateShow:m,"onUpdate:show":I}=e;m&&Ye(m,G),I&&Ye(I,G),y.value=G}function Ve(){J.value||(Xe(!0),y.value=!0,e.filterable&&ft())}function fe(){Xe(!1)}function Ee(){c.value="",h.value=P}const Pe=ne(!1);function A(){e.filterable&&(Pe.value=!0)}function H(){e.filterable&&(Pe.value=!1,_.value||Ee())}function Y(){J.value||(_.value?e.filterable?ft():fe():Ve())}function de(G){var m,I;!((I=(m=w.value)===null||m===void 0?void 0:m.selfRef)===null||I===void 0)&&I.contains(G.relatedTarget)||(u.value=!1,_e(G),fe())}function le(G){ve(G),u.value=!0}function q(){u.value=!0}function N(G){var m;!((m=S.value)===null||m===void 0)&&m.$el.contains(G.relatedTarget)||(u.value=!1,_e(G),fe())}function re(){var G;(G=S.value)===null||G===void 0||G.focus(),fe()}function L(G){var m;_.value&&(!((m=S.value)===null||m===void 0)&&m.$el.contains(Qa(G))||fe())}function O(G){if(!Array.isArray(G))return[];if(C.value)return Array.from(G);{const{remote:m}=e,{value:I}=x;if(m){const{value:D}=R;return G.filter(te=>I.has(te)||D.has(te))}else return G.filter(D=>I.has(D))}}function ee(G){U(G.rawNode)}function U(G){if(J.value)return;const{tag:m,remote:I,clearFilterAfterSelect:D,valueField:te}=e;if(m&&!I){const{value:K}=h,se=K[0]||null;if(se){const ue=f.value;ue.length?ue.push(se):f.value=[se],h.value=P}}if(I&&R.value.set(G[te],G),e.multiple){const K=O(l.value),se=K.findIndex(ue=>ue===G[te]);if(~se){if(K.splice(se,1),m&&!I){const ue=B(G[te]);~ue&&(f.value.splice(ue,1),D&&(c.value=""))}}else K.push(G[te]),D&&(c.value="");he(K,E(K))}else{if(m&&!I){const K=B(G[te]);~K?f.value=[f.value[K]]:f.value=P}lt(),fe(),he(G[te],G)}}function B(G){return f.value.findIndex(m=>m[e.valueField]===G)}function V(G){_.value||Ve();const{value:m}=G.target;c.value=m;const{tag:I,remote:D}=e;if(we(m),I&&!D){if(!m){h.value=P;return}const{onCreate:te}=e,K=te?te(m):{[e.labelField]:m,[e.valueField]:m},{valueField:se,labelField:ue}=e;d.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])||f.value.some(ae=>ae[se]===K[se]||ae[ue]===K[ue])?h.value=P:h.value=[K]}}function me(G){G.stopPropagation();const{multiple:m}=e;!m&&e.filterable&&fe(),oe(),m?he([],[]):he(null,null)}function Ae(G){!vl(G,"action")&&!vl(G,"empty")&&!vl(G,"header")&&G.preventDefault()}function Re(G){Oe(G)}function rt(G){var m,I,D,te,K;if(!e.keyboard){G.preventDefault();return}switch(G.key){case" ":if(e.filterable)break;G.preventDefault();case"Enter":if(!(!((m=S.value)===null||m===void 0)&&m.isComposing)){if(_.value){const se=(I=w.value)===null||I===void 0?void 0:I.getPendingTmNode();se?ee(se):e.filterable||(fe(),lt())}else if(Ve(),e.tag&&Pe.value){const se=h.value[0];if(se){const ue=se[e.valueField],{value:ae}=l;e.multiple&&Array.isArray(ae)&&ae.includes(ue)||U(se)}}}G.preventDefault();break;case"ArrowUp":if(G.preventDefault(),e.loading)return;_.value&&((D=w.value)===null||D===void 0||D.prev());break;case"ArrowDown":if(G.preventDefault(),e.loading)return;_.value?(te=w.value)===null||te===void 0||te.next():Ve();break;case"Escape":_.value&&(C9(G),fe()),(K=S.value)===null||K===void 0||K.focus();break}}function lt(){var G;(G=S.value)===null||G===void 0||G.focus()}function ft(){var G;(G=S.value)===null||G===void 0||G.focusInput()}function zt(){var G;_.value&&((G=$.value)===null||G===void 0||G.syncPosition())}xe(),vt(et(e,"options"),xe);const yt={focus:()=>{var G;(G=S.value)===null||G===void 0||G.focus()},focusInput:()=>{var G;(G=S.value)===null||G===void 0||G.focusInput()},blur:()=>{var G;(G=S.value)===null||G===void 0||G.blur()},blurInput:()=>{var G;(G=S.value)===null||G===void 0||G.blurInput()}},Lt=pe(()=>{const{self:{menuBoxShadow:G}}=o.value;return{"--n-menu-box-shadow":G}}),ye=i?Cn("select",void 0,Lt,e):void 0;return Object.assign(Object.assign({},yt),{mergedStatus:ie,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:v,isMounted:gs(),triggerRef:S,menuRef:w,pattern:c,uncontrolledShow:y,mergedShow:_,adjustedTo:Pn(e),uncontrolledValue:a,mergedValue:l,followerRef:$,localizedPlaceholder:M,selectedOption:z,selectedOptions:F,mergedSize:Z,mergedDisabled:J,focused:u,activeWithoutMenuOpen:Pe,inlineThemeDisabled:i,onTriggerInputFocus:A,onTriggerInputBlur:H,handleTriggerOrMenuResize:zt,handleMenuFocus:q,handleMenuBlur:N,handleMenuTabOut:re,handleTriggerClick:Y,handleToggle:ee,handleDeleteOption:U,handlePatternInput:V,handleClear:me,handleTriggerBlur:de,handleTriggerFocus:le,handleKeydown:rt,handleMenuAfterLeave:Ee,handleMenuClickOutside:L,handleMenuScroll:Re,handleMenuKeydown:rt,handleMenuMousedown:Ae,mergedTheme:o,cssVars:i?void 0:Lt,themeClass:ye==null?void 0:ye.themeClass,onRender:ye==null?void 0:ye.onRender})},render(){return k("div",{class:`${this.mergedClsPrefix}-select`},k(xd,null,{default:()=>[k(wd,null,{default:()=>k(mz,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),k(Sd,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Pn.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>k(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),lo(k(JR,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[md,this.mergedShow],[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Ol,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),MF={padding:"8px 14px"};function TF(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},MF),{borderRadius:t,boxShadow:n,color:ir(r,"rgba(0, 0, 0, .85)"),textColor:r})}const EF={common:hn,peers:{Popover:bv},self:TF},AF=Object.assign(Object.assign({},_5),pt.props),Wl=Fe({name:"Tooltip",props:AF,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=rn(e),n=pt("Tooltip","-tooltip",void 0,EF,e,t),r=ne(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(i){r.value.setShow(i)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:pe(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return k(x5,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function PF(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:o,opacity5:a}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:o,opacity5Depth:a}}const RF={common:hn,self:PF},zF=W("icon",`
|
|
1372
1372
|
height: 1em;
|
|
1373
1373
|
width: 1em;
|
|
1374
1374
|
line-height: 1em;
|
|
@@ -1377,13 +1377,13 @@ ${t}
|
|
|
1377
1377
|
position: relative;
|
|
1378
1378
|
fill: currentColor;
|
|
1379
1379
|
transform: translateZ(0);
|
|
1380
|
-
`,[ge("color-transition",{transition:"color .3s var(--n-bezier)"}),ge("depth",{color:"var(--n-color)"},[ce("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),ce("svg",{height:"1em",width:"1em"})]),FF=Object.assign(Object.assign({},pt.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),mr=Fe({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:FF,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=rn(e),r=pt("Icon","-icon",zF,RF,e,t),i=pe(()=>{const{depth:a}=e,{common:{cubicBezierEaseInOut:s},self:l}=r.value;if(a!==void 0){const{color:u,[`opacity${a}Depth`]:c}=l;return{"--n-bezier":s,"--n-color":u,"--n-opacity":c}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),o=n?Cn("icon",pe(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:pe(()=>{const{size:a,color:s}=e;return{fontSize:Rc(a),color:s}}),cssVars:n?void 0:i,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender}},render(){var e;const{$parent:t,depth:n,mergedClsPrefix:r,component:i,onRender:o,themeClass:a}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&
|
|
1380
|
+
`,[ge("color-transition",{transition:"color .3s var(--n-bezier)"}),ge("depth",{color:"var(--n-color)"},[ce("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),ce("svg",{height:"1em",width:"1em"})]),FF=Object.assign(Object.assign({},pt.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),mr=Fe({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:FF,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=rn(e),r=pt("Icon","-icon",zF,RF,e,t),i=pe(()=>{const{depth:a}=e,{common:{cubicBezierEaseInOut:s},self:l}=r.value;if(a!==void 0){const{color:u,[`opacity${a}Depth`]:c}=l;return{"--n-bezier":s,"--n-color":u,"--n-opacity":c}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),o=n?Cn("icon",pe(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:pe(()=>{const{size:a,color:s}=e;return{fontSize:Rc(a),color:s}}),cssVars:n?void 0:i,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender}},render(){var e;const{$parent:t,depth:n,mergedClsPrefix:r,component:i,onRender:o,themeClass:a}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&af("icon","don't wrap `n-icon` inside `n-icon`"),o==null||o(),k("i",ia(this.$attrs,{role:"img",class:[`${r}-icon`,a,{[`${r}-icon--depth`]:n,[`${r}-icon--color-transition`]:n!==void 0}],style:[this.cssVars,this.mergedStyle]}),i?k(i):this.$slots)}});function IF(e){const{textColorDisabled:t}=e;return{iconColorDisabled:t}}const BF={common:hn,peers:{Button:yv,Input:mv},self:IF},OF={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};function NF(e){const t="rgba(0, 0, 0, .85)",n="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:r,primaryColor:i,baseColor:o,cardColor:a,modalColor:s,popoverColor:l,borderRadius:u,fontSize:c,opacityDisabled:d}=e;return Object.assign(Object.assign({},OF),{fontSize:c,markFontSize:c,railColor:r,railColorHover:r,fillColor:i,fillColorHover:i,opacityDisabled:d,handleColor:"#FFF",dotColor:a,dotColorModal:s,dotColorPopover:l,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:t,indicatorBoxShadow:n,indicatorTextColor:o,indicatorBorderRadius:u,dotBorder:`2px solid ${r}`,dotBorderActive:`2px solid ${i}`,dotBoxShadow:""})}const LF={common:hn,self:NF},DF={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};function HF(e){const{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},DF),{iconColor:i,textColor:"white",loadingColor:t,opacityDisabled:n,railColor:"rgba(0, 0, 0, .14)",railColorActive:t,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 0 2px ${nt(t,{alpha:.2})}`})}const UF={common:hn,self:HF},jF={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function WF(e){const{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:o,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:l,tabColor:u,baseColor:c,dividerColor:d,fontWeight:f,textColor1:h,borderRadius:p,fontSize:g,fontWeightStrong:b}=e;return Object.assign(Object.assign({},jF),{colorSegment:u,tabFontSizeCard:g,tabTextColorLine:h,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:h,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:h,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:h,tabTextColorHoverCard:h,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:o,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:l,closeBorderRadius:p,tabColor:u,tabColorSegment:c,tabBorderColor:d,tabFontWeightActive:f,tabFontWeight:f,tabBorderRadius:p,paneTextColor:t,fontWeightStrong:b})}const VF={common:hn,self:WF},qF=ce([W("input-number-suffix",`
|
|
1381
1381
|
display: inline-block;
|
|
1382
1382
|
margin-right: 10px;
|
|
1383
1383
|
`),W("input-number-prefix",`
|
|
1384
1384
|
display: inline-block;
|
|
1385
1385
|
margin-left: 10px;
|
|
1386
|
-
`)]);function GF(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function YF(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e==="-"||e==="-0"}function Zh(e){return e==null?!0:!Number.isNaN(e)}function Q1(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function Jh(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const ey=800,ty=100,XF=Object.assign(Object.assign({},pt.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),KF=Fe({name:"InputNumber",props:XF,setup(e){const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r}=rn(e),i=pt("InputNumber","-input-number",qF,BF,e,n),{localeRef:o}=_u("InputNumber"),a=aa(e),{mergedSizeRef:s,mergedDisabledRef:l,mergedStatusRef:u}=a,c=ne(null),
|
|
1386
|
+
`)]);function GF(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function YF(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e==="-"||e==="-0"}function Zh(e){return e==null?!0:!Number.isNaN(e)}function Q1(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function Jh(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const ey=800,ty=100,XF=Object.assign(Object.assign({},pt.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),KF=Fe({name:"InputNumber",props:XF,setup(e){const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r}=rn(e),i=pt("InputNumber","-input-number",qF,BF,e,n),{localeRef:o}=_u("InputNumber"),a=aa(e),{mergedSizeRef:s,mergedDisabledRef:l,mergedStatusRef:u}=a,c=ne(null),d=ne(null),f=ne(null),h=ne(e.defaultValue),p=et(e,"value"),g=Gr(p,h),b=ne(""),v=q=>{const N=String(q).split(".")[1];return N?N.length:0},x=q=>{const N=[e.min,e.max,e.step,q].map(re=>re===void 0?0:v(re));return Math.max(...N)},y=Ht(()=>{const{placeholder:q}=e;return q!==void 0?q:o.value.placeholder}),_=Ht(()=>{const q=Jh(e.step);return q!==null?q===0?1:Math.abs(q):1}),S=Ht(()=>{const q=Jh(e.min);return q!==null?q:null}),$=Ht(()=>{const q=Jh(e.max);return q!==null?q:null}),w=()=>{const{value:q}=g;if(Zh(q)){const{format:N,precision:re}=e;N?b.value=N(q):q===null||re===void 0||v(q)>re?b.value=Q1(q,void 0):b.value=Q1(q,re)}else b.value=String(q)};w();const T=q=>{const{value:N}=g;if(q===N){w();return}const{"onUpdate:value":re,onUpdateValue:L,onChange:O}=e,{nTriggerFormInput:ee,nTriggerFormChange:U}=a;O&&Ye(O,q),L&&Ye(L,q),re&&Ye(re,q),h.value=q,ee(),U()},M=({offset:q,doUpdateIfValid:N,fixPrecision:re,isInputing:L})=>{const{value:O}=b;if(L&&YF(O))return!1;const ee=(e.parse||GF)(O);if(ee===null)return N&&T(null),null;if(Zh(ee)){const U=v(ee),{precision:B}=e;if(B!==void 0&&B<U&&!re)return!1;let V=Number.parseFloat((ee+q).toFixed(B??x(ee)));if(Zh(V)){const{value:me}=$,{value:Ae}=S;if(me!==null&&V>me){if(!N||L)return!1;V=me}if(Ae!==null&&V<Ae){if(!N||L)return!1;V=Ae}return e.validator&&!e.validator(V)?!1:(N&&T(V),V)}}return!1},P=Ht(()=>M({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),R=Ht(()=>{const{value:q}=g;if(e.validator&&q===null)return!1;const{value:N}=_;return M({offset:-N,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),C=Ht(()=>{const{value:q}=g;if(e.validator&&q===null)return!1;const{value:N}=_;return M({offset:+N,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function E(q){const{onFocus:N}=e,{nTriggerFormFocus:re}=a;N&&Ye(N,q),re()}function F(q){var N,re;if(q.target===((N=c.value)===null||N===void 0?void 0:N.wrapperElRef))return;const L=M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(L!==!1){const U=(re=c.value)===null||re===void 0?void 0:re.inputElRef;U&&(U.value=String(L||"")),g.value===L&&w()}else w();const{onBlur:O}=e,{nTriggerFormBlur:ee}=a;O&&Ye(O,q),ee(),fn(()=>{w()})}function z(q){const{onClear:N}=e;N&&Ye(N,q)}function j(){const{value:q}=C;if(!q){Ve();return}const{value:N}=g;if(N===null)e.validator||T(he());else{const{value:re}=_;M({offset:re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function Z(){const{value:q}=R;if(!q){xe();return}const{value:N}=g;if(N===null)e.validator||T(he());else{const{value:re}=_;M({offset:-re,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const J=E,ie=F;function he(){if(e.validator)return null;const{value:q}=S,{value:N}=$;return q!==null?Math.max(0,q):N!==null?Math.min(0,N):0}function _e(q){z(q),T(null)}function oe(q){var N,re,L;!((N=f.value)===null||N===void 0)&&N.$el.contains(q.target)&&q.preventDefault(),!((re=d.value)===null||re===void 0)&&re.$el.contains(q.target)&&q.preventDefault(),(L=c.value)===null||L===void 0||L.activate()}let ve=null,we=null,Oe=null;function xe(){Oe&&(window.clearTimeout(Oe),Oe=null),ve&&(window.clearInterval(ve),ve=null)}let Xe=null;function Ve(){Xe&&(window.clearTimeout(Xe),Xe=null),we&&(window.clearInterval(we),we=null)}function fe(){xe(),Oe=window.setTimeout(()=>{ve=window.setInterval(()=>{Z()},ty)},ey),Mt("mouseup",document,xe,{once:!0})}function Ee(){Ve(),Xe=window.setTimeout(()=>{we=window.setInterval(()=>{j()},ty)},ey),Mt("mouseup",document,Ve,{once:!0})}const Pe=()=>{we||j()},A=()=>{ve||Z()};function H(q){var N,re;if(q.key==="Enter"){if(q.target===((N=c.value)===null||N===void 0?void 0:N.wrapperElRef))return;M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((re=c.value)===null||re===void 0||re.deactivate())}else if(q.key==="ArrowUp"){if(!C.value||e.keyboard.ArrowUp===!1)return;q.preventDefault(),M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&j()}else if(q.key==="ArrowDown"){if(!R.value||e.keyboard.ArrowDown===!1)return;q.preventDefault(),M({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Z()}}function Y(q){b.value=q,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&M({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}vt(g,()=>{w()});const de={focus:()=>{var q;return(q=c.value)===null||q===void 0?void 0:q.focus()},blur:()=>{var q;return(q=c.value)===null||q===void 0?void 0:q.blur()},select:()=>{var q;return(q=c.value)===null||q===void 0?void 0:q.select()}},le=co("InputNumber",r,n);return Object.assign(Object.assign({},de),{rtlEnabled:le,inputInstRef:c,minusButtonInstRef:d,addButtonInstRef:f,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:h,mergedValue:g,mergedPlaceholder:y,displayedValueInvalid:P,mergedSize:s,mergedDisabled:l,displayedValue:b,addable:C,minusable:R,mergedStatus:u,handleFocus:J,handleBlur:ie,handleClear:_e,handleMouseDown:oe,handleAddClick:Pe,handleMinusClick:A,handleAddMousedown:Ee,handleMinusMousedown:fe,handleKeyDown:H,handleUpdateDisplayedValue:Y,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:pe(()=>{const{self:{iconColorDisabled:q}}=i.value,[N,re,L,O]=en(q);return{textColorTextDisabled:`rgb(${N}, ${re}, ${L})`,opacityDisabled:`${O}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>k(Z1,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>Ur(t["minus-icon"],()=>[k(Cr,{clsPrefix:e},{default:()=>k(tR,null)})])}),r=()=>k(Z1,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>Ur(t["add-icon"],()=>[k(Cr,{clsPrefix:e},{default:()=>k(f5,null)})])});return k("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},k(ts,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var i;return this.showButton&&this.buttonPlacement==="both"?[n(),Bt(t.prefix,o=>o?k("span",{class:`${e}-input-number-prefix`},o):null)]:(i=t.prefix)===null||i===void 0?void 0:i.call(t)},suffix:()=>{var i;return this.showButton?[Bt(t.suffix,o=>o?k("span",{class:`${e}-input-number-suffix`},o):null),this.buttonPlacement==="right"?n():null,r()]:(i=t.suffix)===null||i===void 0?void 0:i.call(t)}}))}}),ZF=ce([W("slider",`
|
|
1387
1387
|
display: block;
|
|
1388
1388
|
padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
|
|
1389
1389
|
position: relative;
|
|
@@ -1541,7 +1541,7 @@ ${t}
|
|
|
1541
1541
|
margin-top: 12px;
|
|
1542
1542
|
`),ge("left",`
|
|
1543
1543
|
margin-right: 12px;
|
|
1544
|
-
`),Ul()]),ak(W("slider",[W("slider-dot","background-color: var(--n-dot-color-modal);")])),sk(W("slider",[W("slider-dot","background-color: var(--n-dot-color-popover);")]))]);function ny(e){return window.TouchEvent&&e instanceof window.TouchEvent}function ry(){const e=new Map,t=n=>r=>{e.set(n,r)};return fw(()=>{e.clear()}),[e,t]}const JF=0,QF=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),eI=Fe({name:"Slider",props:QF,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=rn(e),i=pt("Slider","-slider",ZF,LF,e,t),o=ne(null),[a,s]=ry(),[l,u]=ry(),c=ne(new Set),f=aa(e),{mergedDisabledRef:d}=f,h=pe(()=>{const{step:U}=e;if(Number(U)<=0||U==="mark")return 0;const B=U.toString();let V=0;return B.includes(".")&&(V=B.length-B.indexOf(".")-1),V}),p=ne(e.defaultValue),g=et(e,"value"),b=Gr(g,p),v=pe(()=>{const{value:U}=b;return(e.range?U:[U]).map(oe)}),x=pe(()=>v.value.length>2),y=pe(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),_=pe(()=>{const{marks:U}=e;return U?Object.keys(U).map(Number.parseFloat):null}),S=ne(-1),$=ne(-1),w=ne(-1),T=ne(!1),M=ne(!1),P=pe(()=>{const{vertical:U,reverse:B}=e;return U?B?"top":"bottom":B?"right":"left"}),R=pe(()=>{if(x.value)return;const U=v.value,B=ve(e.range?Math.min(...U):e.min),V=ve(e.range?Math.max(...U):U[0]),{value:me}=P;return e.vertical?{[me]:`${B}%`,height:`${V-B}%`}:{[me]:`${B}%`,width:`${V-B}%`}}),C=pe(()=>{const U=[],{marks:B}=e;if(B){const V=v.value.slice();V.sort((lt,dt)=>lt-dt);const{value:me}=P,{value:Ae}=x,{range:Re}=e,rt=Ae?()=>!1:lt=>Re?lt>=V[0]&<<=V[V.length-1]:lt<=V[0];for(const lt of Object.keys(B)){const dt=Number(lt);U.push({active:rt(dt),key:dt,label:B[lt],style:{[me]:`${ve(dt)}%`}})}}return U});function E(U,B){const V=ve(U),{value:me}=P;return{[me]:`${V}%`,zIndex:B===S.value?1:0}}function F(U){return e.showTooltip||w.value===U||S.value===U&&T.value}function z(U){return T.value?!(S.value===U&&$.value===U):!0}function j(U){var B;~U&&(S.value=U,(B=a.get(U))===null||B===void 0||B.focus())}function Z(){l.forEach((U,B)=>{F(B)&&U.syncPosition()})}function J(U){const{"onUpdate:value":B,onUpdateValue:V}=e,{nTriggerFormInput:me,nTriggerFormChange:Ae}=f;V&&Ye(V,U),B&&Ye(B,U),p.value=U,me(),Ae()}function ie(U){const{range:B}=e;if(B){if(Array.isArray(U)){const{value:V}=v;U.join()!==V.join()&&J(U)}}else Array.isArray(U)||v.value[0]!==U&&J(U)}function he(U,B){if(e.range){const V=v.value.slice();V.splice(B,1,U),ie(V)}else ie(U)}function _e(U,B,V){const me=V!==void 0;V||(V=U-B>0?1:-1);const Ae=_.value||[],{step:Re}=e;if(Re==="mark"){const dt=xe(U,Ae.concat(B),me?V:void 0);return dt?dt.value:B}if(Re<=0)return B;const{value:rt}=h;let lt;if(me){const dt=Number((B/Re).toFixed(rt)),zt=Math.floor(dt),yt=dt>zt?zt:zt-1,Lt=dt<zt?zt:zt+1;lt=xe(B,[Number((yt*Re).toFixed(rt)),Number((Lt*Re).toFixed(rt)),...Ae],V)}else{const dt=Oe(U);lt=xe(U,[...Ae,dt])}return lt?oe(lt.value):B}function oe(U){return Math.min(e.max,Math.max(e.min,U))}function ve(U){const{max:B,min:V}=e;return(U-V)/(B-V)*100}function we(U){const{max:B,min:V}=e;return V+(B-V)*U}function Oe(U){const{step:B,min:V}=e;if(Number(B)<=0||B==="mark")return U;const me=Math.round((U-V)/B)*B+V;return Number(me.toFixed(h.value))}function xe(U,B=_.value,V){if(!(B!=null&&B.length))return null;let me=null,Ae=-1;for(;++Ae<B.length;){const Re=B[Ae]-U,rt=Math.abs(Re);(V===void 0||Re*V>0)&&(me===null||rt<me.distance)&&(me={index:Ae,distance:rt,value:B[Ae]})}return me}function Xe(U){const B=o.value;if(!B)return;const V=ny(U)?U.touches[0]:U,me=B.getBoundingClientRect();let Ae;return e.vertical?Ae=(me.bottom-V.clientY)/me.height:Ae=(V.clientX-me.left)/me.width,e.reverse&&(Ae=1-Ae),we(Ae)}function Ve(U){if(d.value||!e.keyboard)return;const{vertical:B,reverse:V}=e;switch(U.key){case"ArrowUp":U.preventDefault(),de(B&&V?-1:1);break;case"ArrowRight":U.preventDefault(),de(!B&&V?-1:1);break;case"ArrowDown":U.preventDefault(),de(B&&V?1:-1);break;case"ArrowLeft":U.preventDefault(),de(!B&&V?1:-1);break}}function de(U){const B=S.value;if(B===-1)return;const{step:V}=e,me=v.value[B],Ae=Number(V)<=0||V==="mark"?me:me+V*U;he(_e(Ae,me,U>0?1:-1),B)}function Ee(U){var B,V;if(d.value||!ny(U)&&U.button!==JF)return;const me=Xe(U);if(me===void 0)return;const Ae=v.value.slice(),Re=e.range?(V=(B=xe(me,Ae))===null||B===void 0?void 0:B.index)!==null&&V!==void 0?V:-1:0;Re!==-1&&(U.preventDefault(),j(Re),Pe(),he(_e(me,v.value[Re]),Re))}function Pe(){T.value||(T.value=!0,e.onDragstart&&Ye(e.onDragstart),Mt("touchend",document,Y),Mt("mouseup",document,Y),Mt("touchmove",document,H),Mt("mousemove",document,H))}function A(){T.value&&(T.value=!1,e.onDragend&&Ye(e.onDragend),St("touchend",document,Y),St("mouseup",document,Y),St("touchmove",document,H),St("mousemove",document,H))}function H(U){const{value:B}=S;if(!T.value||B===-1){A();return}const V=Xe(U);V!==void 0&&he(_e(V,v.value[B]),B)}function Y(){A()}function fe(U){S.value=U,d.value||(w.value=U)}function le(U){S.value===U&&(S.value=-1,A()),w.value===U&&(w.value=-1)}function q(U){w.value=U}function N(U){w.value===U&&(w.value=-1)}vt(S,(U,B)=>void dn(()=>$.value=B)),vt(b,()=>{if(e.marks){if(M.value)return;M.value=!0,dn(()=>{M.value=!1})}dn(Z)}),Bn(()=>{A()});const re=pe(()=>{const{self:{markFontSize:U,railColor:B,railColorHover:V,fillColor:me,fillColorHover:Ae,handleColor:Re,opacityDisabled:rt,dotColor:lt,dotColorModal:dt,handleBoxShadow:zt,handleBoxShadowHover:yt,handleBoxShadowActive:Lt,handleBoxShadowFocus:ye,dotBorder:G,dotBoxShadow:m,railHeight:I,railWidthVertical:D,handleSize:te,dotHeight:K,dotWidth:se,dotBorderRadius:ue,fontSize:ae,dotBorderActive:ke,dotColorPopover:Me},common:{cubicBezierEaseInOut:$e}}=i.value;return{"--n-bezier":$e,"--n-dot-border":G,"--n-dot-border-active":ke,"--n-dot-border-radius":ue,"--n-dot-box-shadow":m,"--n-dot-color":lt,"--n-dot-color-modal":dt,"--n-dot-color-popover":Me,"--n-dot-height":K,"--n-dot-width":se,"--n-fill-color":me,"--n-fill-color-hover":Ae,"--n-font-size":ae,"--n-handle-box-shadow":zt,"--n-handle-box-shadow-active":Lt,"--n-handle-box-shadow-focus":ye,"--n-handle-box-shadow-hover":yt,"--n-handle-color":Re,"--n-handle-size":te,"--n-opacity-disabled":rt,"--n-rail-color":B,"--n-rail-color-hover":V,"--n-rail-height":I,"--n-rail-width-vertical":D,"--n-mark-font-size":U}}),L=r?Cn("slider",void 0,re,e):void 0,O=pe(()=>{const{self:{fontSize:U,indicatorColor:B,indicatorBoxShadow:V,indicatorTextColor:me,indicatorBorderRadius:Ae}}=i.value;return{"--n-font-size":U,"--n-indicator-border-radius":Ae,"--n-indicator-box-shadow":V,"--n-indicator-color":B,"--n-indicator-text-color":me}}),ee=r?Cn("slider-indicator",void 0,O,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:p,mergedValue:b,mergedDisabled:d,mergedPlacement:y,isMounted:gs(),adjustedTo:Pn(e),dotTransitionDisabled:M,markInfos:C,isShowTooltip:F,shouldKeepTooltipTransition:z,handleRailRef:o,setHandleRefs:s,setFollowerRefs:u,fillStyle:R,getHandleStyle:E,activeIndex:S,arrifiedValues:v,followerEnabledIndexSet:c,handleRailMouseDown:Ee,handleHandleFocus:fe,handleHandleBlur:le,handleHandleMouseEnter:q,handleHandleMouseLeave:N,handleRailKeyDown:Ve,indicatorCssVars:r?void 0:O,indicatorThemeClass:ee==null?void 0:ee.themeClass,indicatorOnRender:ee==null?void 0:ee.onRender,cssVars:r?void 0:re,themeClass:L==null?void 0:L.themeClass,onRender:L==null?void 0:L.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),k("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},k("div",{class:`${t}-slider-rail`},k("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?k("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>k("div",{key:i.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,k("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,o)=>{const a=this.isShowTooltip(o);return k(xf,null,{default:()=>[k(wf,null,{default:()=>k("div",{ref:this.setHandleRefs(o),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,o),onFocus:()=>{this.handleHandleFocus(o)},onBlur:()=>{this.handleHandleBlur(o)},onMouseenter:()=>{this.handleHandleMouseEnter(o)},onMouseleave:()=>{this.handleHandleMouseLeave(o)}},Ur(this.$slots.thumb,()=>[k("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&k(Sf,{ref:this.setFollowerRefs(o),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(o),teleportDisabled:this.adjustedTo===Pn.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>k(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(o),onEnter:()=>{this.followerEnabledIndexSet.add(o)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(o)}},{default:()=>{var s;return a?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),k("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?k("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>k("div",{key:i.key,class:`${t}-slider-mark`,style:i.style},typeof i.label=="function"?i.label():i.label))):null))}}),tI=W("switch",`
|
|
1544
|
+
`),Ul()]),ak(W("slider",[W("slider-dot","background-color: var(--n-dot-color-modal);")])),sk(W("slider",[W("slider-dot","background-color: var(--n-dot-color-popover);")]))]);function ny(e){return window.TouchEvent&&e instanceof window.TouchEvent}function ry(){const e=new Map,t=n=>r=>{e.set(n,r)};return dw(()=>{e.clear()}),[e,t]}const JF=0,QF=Object.assign(Object.assign({},pt.props),{to:Pn.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),eI=Fe({name:"Slider",props:QF,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=rn(e),i=pt("Slider","-slider",ZF,LF,e,t),o=ne(null),[a,s]=ry(),[l,u]=ry(),c=ne(new Set),d=aa(e),{mergedDisabledRef:f}=d,h=pe(()=>{const{step:U}=e;if(Number(U)<=0||U==="mark")return 0;const B=U.toString();let V=0;return B.includes(".")&&(V=B.length-B.indexOf(".")-1),V}),p=ne(e.defaultValue),g=et(e,"value"),b=Gr(g,p),v=pe(()=>{const{value:U}=b;return(e.range?U:[U]).map(oe)}),x=pe(()=>v.value.length>2),y=pe(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),_=pe(()=>{const{marks:U}=e;return U?Object.keys(U).map(Number.parseFloat):null}),S=ne(-1),$=ne(-1),w=ne(-1),T=ne(!1),M=ne(!1),P=pe(()=>{const{vertical:U,reverse:B}=e;return U?B?"top":"bottom":B?"right":"left"}),R=pe(()=>{if(x.value)return;const U=v.value,B=ve(e.range?Math.min(...U):e.min),V=ve(e.range?Math.max(...U):U[0]),{value:me}=P;return e.vertical?{[me]:`${B}%`,height:`${V-B}%`}:{[me]:`${B}%`,width:`${V-B}%`}}),C=pe(()=>{const U=[],{marks:B}=e;if(B){const V=v.value.slice();V.sort((lt,ft)=>lt-ft);const{value:me}=P,{value:Ae}=x,{range:Re}=e,rt=Ae?()=>!1:lt=>Re?lt>=V[0]&<<=V[V.length-1]:lt<=V[0];for(const lt of Object.keys(B)){const ft=Number(lt);U.push({active:rt(ft),key:ft,label:B[lt],style:{[me]:`${ve(ft)}%`}})}}return U});function E(U,B){const V=ve(U),{value:me}=P;return{[me]:`${V}%`,zIndex:B===S.value?1:0}}function F(U){return e.showTooltip||w.value===U||S.value===U&&T.value}function z(U){return T.value?!(S.value===U&&$.value===U):!0}function j(U){var B;~U&&(S.value=U,(B=a.get(U))===null||B===void 0||B.focus())}function Z(){l.forEach((U,B)=>{F(B)&&U.syncPosition()})}function J(U){const{"onUpdate:value":B,onUpdateValue:V}=e,{nTriggerFormInput:me,nTriggerFormChange:Ae}=d;V&&Ye(V,U),B&&Ye(B,U),p.value=U,me(),Ae()}function ie(U){const{range:B}=e;if(B){if(Array.isArray(U)){const{value:V}=v;U.join()!==V.join()&&J(U)}}else Array.isArray(U)||v.value[0]!==U&&J(U)}function he(U,B){if(e.range){const V=v.value.slice();V.splice(B,1,U),ie(V)}else ie(U)}function _e(U,B,V){const me=V!==void 0;V||(V=U-B>0?1:-1);const Ae=_.value||[],{step:Re}=e;if(Re==="mark"){const ft=xe(U,Ae.concat(B),me?V:void 0);return ft?ft.value:B}if(Re<=0)return B;const{value:rt}=h;let lt;if(me){const ft=Number((B/Re).toFixed(rt)),zt=Math.floor(ft),yt=ft>zt?zt:zt-1,Lt=ft<zt?zt:zt+1;lt=xe(B,[Number((yt*Re).toFixed(rt)),Number((Lt*Re).toFixed(rt)),...Ae],V)}else{const ft=Oe(U);lt=xe(U,[...Ae,ft])}return lt?oe(lt.value):B}function oe(U){return Math.min(e.max,Math.max(e.min,U))}function ve(U){const{max:B,min:V}=e;return(U-V)/(B-V)*100}function we(U){const{max:B,min:V}=e;return V+(B-V)*U}function Oe(U){const{step:B,min:V}=e;if(Number(B)<=0||B==="mark")return U;const me=Math.round((U-V)/B)*B+V;return Number(me.toFixed(h.value))}function xe(U,B=_.value,V){if(!(B!=null&&B.length))return null;let me=null,Ae=-1;for(;++Ae<B.length;){const Re=B[Ae]-U,rt=Math.abs(Re);(V===void 0||Re*V>0)&&(me===null||rt<me.distance)&&(me={index:Ae,distance:rt,value:B[Ae]})}return me}function Xe(U){const B=o.value;if(!B)return;const V=ny(U)?U.touches[0]:U,me=B.getBoundingClientRect();let Ae;return e.vertical?Ae=(me.bottom-V.clientY)/me.height:Ae=(V.clientX-me.left)/me.width,e.reverse&&(Ae=1-Ae),we(Ae)}function Ve(U){if(f.value||!e.keyboard)return;const{vertical:B,reverse:V}=e;switch(U.key){case"ArrowUp":U.preventDefault(),fe(B&&V?-1:1);break;case"ArrowRight":U.preventDefault(),fe(!B&&V?-1:1);break;case"ArrowDown":U.preventDefault(),fe(B&&V?1:-1);break;case"ArrowLeft":U.preventDefault(),fe(!B&&V?1:-1);break}}function fe(U){const B=S.value;if(B===-1)return;const{step:V}=e,me=v.value[B],Ae=Number(V)<=0||V==="mark"?me:me+V*U;he(_e(Ae,me,U>0?1:-1),B)}function Ee(U){var B,V;if(f.value||!ny(U)&&U.button!==JF)return;const me=Xe(U);if(me===void 0)return;const Ae=v.value.slice(),Re=e.range?(V=(B=xe(me,Ae))===null||B===void 0?void 0:B.index)!==null&&V!==void 0?V:-1:0;Re!==-1&&(U.preventDefault(),j(Re),Pe(),he(_e(me,v.value[Re]),Re))}function Pe(){T.value||(T.value=!0,e.onDragstart&&Ye(e.onDragstart),Mt("touchend",document,Y),Mt("mouseup",document,Y),Mt("touchmove",document,H),Mt("mousemove",document,H))}function A(){T.value&&(T.value=!1,e.onDragend&&Ye(e.onDragend),St("touchend",document,Y),St("mouseup",document,Y),St("touchmove",document,H),St("mousemove",document,H))}function H(U){const{value:B}=S;if(!T.value||B===-1){A();return}const V=Xe(U);V!==void 0&&he(_e(V,v.value[B]),B)}function Y(){A()}function de(U){S.value=U,f.value||(w.value=U)}function le(U){S.value===U&&(S.value=-1,A()),w.value===U&&(w.value=-1)}function q(U){w.value=U}function N(U){w.value===U&&(w.value=-1)}vt(S,(U,B)=>void fn(()=>$.value=B)),vt(b,()=>{if(e.marks){if(M.value)return;M.value=!0,fn(()=>{M.value=!1})}fn(Z)}),Bn(()=>{A()});const re=pe(()=>{const{self:{markFontSize:U,railColor:B,railColorHover:V,fillColor:me,fillColorHover:Ae,handleColor:Re,opacityDisabled:rt,dotColor:lt,dotColorModal:ft,handleBoxShadow:zt,handleBoxShadowHover:yt,handleBoxShadowActive:Lt,handleBoxShadowFocus:ye,dotBorder:G,dotBoxShadow:m,railHeight:I,railWidthVertical:D,handleSize:te,dotHeight:K,dotWidth:se,dotBorderRadius:ue,fontSize:ae,dotBorderActive:ke,dotColorPopover:Me},common:{cubicBezierEaseInOut:$e}}=i.value;return{"--n-bezier":$e,"--n-dot-border":G,"--n-dot-border-active":ke,"--n-dot-border-radius":ue,"--n-dot-box-shadow":m,"--n-dot-color":lt,"--n-dot-color-modal":ft,"--n-dot-color-popover":Me,"--n-dot-height":K,"--n-dot-width":se,"--n-fill-color":me,"--n-fill-color-hover":Ae,"--n-font-size":ae,"--n-handle-box-shadow":zt,"--n-handle-box-shadow-active":Lt,"--n-handle-box-shadow-focus":ye,"--n-handle-box-shadow-hover":yt,"--n-handle-color":Re,"--n-handle-size":te,"--n-opacity-disabled":rt,"--n-rail-color":B,"--n-rail-color-hover":V,"--n-rail-height":I,"--n-rail-width-vertical":D,"--n-mark-font-size":U}}),L=r?Cn("slider",void 0,re,e):void 0,O=pe(()=>{const{self:{fontSize:U,indicatorColor:B,indicatorBoxShadow:V,indicatorTextColor:me,indicatorBorderRadius:Ae}}=i.value;return{"--n-font-size":U,"--n-indicator-border-radius":Ae,"--n-indicator-box-shadow":V,"--n-indicator-color":B,"--n-indicator-text-color":me}}),ee=r?Cn("slider-indicator",void 0,O,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:p,mergedValue:b,mergedDisabled:f,mergedPlacement:y,isMounted:gs(),adjustedTo:Pn(e),dotTransitionDisabled:M,markInfos:C,isShowTooltip:F,shouldKeepTooltipTransition:z,handleRailRef:o,setHandleRefs:s,setFollowerRefs:u,fillStyle:R,getHandleStyle:E,activeIndex:S,arrifiedValues:v,followerEnabledIndexSet:c,handleRailMouseDown:Ee,handleHandleFocus:de,handleHandleBlur:le,handleHandleMouseEnter:q,handleHandleMouseLeave:N,handleRailKeyDown:Ve,indicatorCssVars:r?void 0:O,indicatorThemeClass:ee==null?void 0:ee.themeClass,indicatorOnRender:ee==null?void 0:ee.onRender,cssVars:r?void 0:re,themeClass:L==null?void 0:L.themeClass,onRender:L==null?void 0:L.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),k("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},k("div",{class:`${t}-slider-rail`},k("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?k("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>k("div",{key:i.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,k("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,o)=>{const a=this.isShowTooltip(o);return k(xd,null,{default:()=>[k(wd,null,{default:()=>k("div",{ref:this.setHandleRefs(o),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,o),onFocus:()=>{this.handleHandleFocus(o)},onBlur:()=>{this.handleHandleBlur(o)},onMouseenter:()=>{this.handleHandleMouseEnter(o)},onMouseleave:()=>{this.handleHandleMouseLeave(o)}},Ur(this.$slots.thumb,()=>[k("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&k(Sd,{ref:this.setFollowerRefs(o),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(o),teleportDisabled:this.adjustedTo===Pn.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>k(wr,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(o),onEnter:()=>{this.followerEnabledIndexSet.add(o)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(o)}},{default:()=>{var s;return a?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),k("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?k("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>k("div",{key:i.key,class:`${t}-slider-mark`,style:i.style},typeof i.label=="function"?i.label():i.label))):null))}}),tI=W("switch",`
|
|
1545
1545
|
height: var(--n-height);
|
|
1546
1546
|
min-width: var(--n-width);
|
|
1547
1547
|
vertical-align: middle;
|
|
@@ -1642,7 +1642,7 @@ ${t}
|
|
|
1642
1642
|
`)]),ge("disabled",[Q("rail",`
|
|
1643
1643
|
cursor: not-allowed;
|
|
1644
1644
|
opacity: .5;
|
|
1645
|
-
`)])]),nI=Object.assign(Object.assign({},pt.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let Rs;const E5=Fe({name:"Switch",props:nI,setup(e){Rs===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?Rs=CSS.supports("width","max(1px)"):Rs=!1:Rs=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=rn(e),r=pt("Switch","-switch",tI,UF,e,t),i=aa(e),{mergedSizeRef:o,mergedDisabledRef:a}=i,s=ne(e.defaultValue),l=et(e,"value"),u=Gr(l,s),c=pe(()=>u.value===e.checkedValue),
|
|
1645
|
+
`)])]),nI=Object.assign(Object.assign({},pt.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let Rs;const E5=Fe({name:"Switch",props:nI,setup(e){Rs===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?Rs=CSS.supports("width","max(1px)"):Rs=!1:Rs=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=rn(e),r=pt("Switch","-switch",tI,UF,e,t),i=aa(e),{mergedSizeRef:o,mergedDisabledRef:a}=i,s=ne(e.defaultValue),l=et(e,"value"),u=Gr(l,s),c=pe(()=>u.value===e.checkedValue),d=ne(!1),f=ne(!1),h=pe(()=>{const{railStyle:T}=e;if(T)return T({focused:f.value,checked:c.value})});function p(T){const{"onUpdate:value":M,onChange:P,onUpdateValue:R}=e,{nTriggerFormInput:C,nTriggerFormChange:E}=i;M&&Ye(M,T),R&&Ye(R,T),P&&Ye(P,T),s.value=T,C(),E()}function g(){const{nTriggerFormFocus:T}=i;T()}function b(){const{nTriggerFormBlur:T}=i;T()}function v(){e.loading||a.value||(u.value!==e.checkedValue?p(e.checkedValue):p(e.uncheckedValue))}function x(){f.value=!0,g()}function y(){f.value=!1,b(),d.value=!1}function _(T){e.loading||a.value||T.key===" "&&(u.value!==e.checkedValue?p(e.checkedValue):p(e.uncheckedValue),d.value=!1)}function S(T){e.loading||a.value||T.key===" "&&(T.preventDefault(),d.value=!0)}const $=pe(()=>{const{value:T}=o,{self:{opacityDisabled:M,railColor:P,railColorActive:R,buttonBoxShadow:C,buttonColor:E,boxShadowFocus:F,loadingColor:z,textColor:j,iconColor:Z,[Se("buttonHeight",T)]:J,[Se("buttonWidth",T)]:ie,[Se("buttonWidthPressed",T)]:he,[Se("railHeight",T)]:_e,[Se("railWidth",T)]:oe,[Se("railBorderRadius",T)]:ve,[Se("buttonBorderRadius",T)]:we},common:{cubicBezierEaseInOut:Oe}}=r.value;let xe,Xe,Ve;return Rs?(xe=`calc((${_e} - ${J}) / 2)`,Xe=`max(${_e}, ${J})`,Ve=`max(${oe}, calc(${oe} + ${J} - ${_e}))`):(xe=Bi((kn(_e)-kn(J))/2),Xe=Bi(Math.max(kn(_e),kn(J))),Ve=kn(_e)>kn(J)?oe:Bi(kn(oe)+kn(J)-kn(_e))),{"--n-bezier":Oe,"--n-button-border-radius":we,"--n-button-box-shadow":C,"--n-button-color":E,"--n-button-width":ie,"--n-button-width-pressed":he,"--n-button-height":J,"--n-height":Xe,"--n-offset":xe,"--n-opacity-disabled":M,"--n-rail-border-radius":ve,"--n-rail-color":P,"--n-rail-color-active":R,"--n-rail-height":_e,"--n-rail-width":oe,"--n-width":Ve,"--n-box-shadow-focus":F,"--n-loading-color":z,"--n-text-color":j,"--n-icon-color":Z}}),w=n?Cn("switch",pe(()=>o.value[0]),$,e):void 0;return{handleClick:v,handleBlur:y,handleFocus:x,handleKeyup:_,handleKeydown:S,mergedRailStyle:h,pressed:d,mergedClsPrefix:t,mergedValue:u,checked:c,mergedDisabled:a,cssVars:n?void 0:$,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:r,onRender:i,$slots:o}=this;i==null||i();const{checked:a,unchecked:s,icon:l,"checked-icon":u,"unchecked-icon":c}=o,d=!(ja(l)&&ja(u)&&ja(c));return k("div",{role:"switch","aria-checked":n,class:[`${e}-switch`,this.themeClass,d&&`${e}-switch--icon`,n&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},k("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:r},Bt(a,f=>Bt(s,h=>f||h?k("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},k("div",{class:`${e}-switch__rail-placeholder`},k("div",{class:`${e}-switch__button-placeholder`}),f),k("div",{class:`${e}-switch__rail-placeholder`},k("div",{class:`${e}-switch__button-placeholder`}),h)):null)),k("div",{class:`${e}-switch__button`},Bt(l,f=>Bt(u,h=>Bt(c,p=>k(Ed,null,{default:()=>this.loading?k(Ad,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(h||f)?k("div",{class:`${e}-switch__button-icon`,key:h?"checked-icon":"icon"},h||f):!this.checked&&(p||f)?k("div",{class:`${e}-switch__button-icon`,key:p?"unchecked-icon":"icon"},p||f):null})))),Bt(a,f=>f&&k("div",{key:"checked",class:`${e}-switch__checked`},f)),Bt(s,f=>f&&k("div",{key:"unchecked",class:`${e}-switch__unchecked`},f)))))}}),xv="n-tabs",A5={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:"if"},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},iy=Fe({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:A5,setup(e){const t=$t(xv,null);return t||I2("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return k("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),rI=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},$9(A5,["displayDirective"])),k0=Fe({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:rI,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:i,tabStyleRef:o,addTabStyleRef:a,tabClassRef:s,addTabClassRef:l,tabChangeIdRef:u,onBeforeLeaveRef:c,triggerRef:d,handleAdd:f,activateTab:h,handleClose:p}=$t(xv);return{trigger:d,mergedClosable:pe(()=>{if(e.internalAddable)return!1;const{closable:g}=e;return g===void 0?i.value:g}),style:o,addStyle:a,tabClass:s,addTabClass:l,clsPrefix:t,value:n,type:r,handleClose(g){g.stopPropagation(),!e.disabled&&p(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){f();return}const{name:g}=e,b=++u.id;if(g!==n.value){const{value:v}=c;v?Promise.resolve(v(e.name,n.value)).then(x=>{x&&u.id===b&&h(g)}):h(g)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:i,tab:o,value:a,mergedClosable:s,trigger:l,$slots:{default:u}}=this,c=i??o;return k("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?k("div",{class:`${t}-tabs-tab-pad`}):null,k("div",Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},ia({class:[`${t}-tabs-tab`,a===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,s&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:l==="click"?this.activateTab:void 0,onMouseenter:l==="hover"?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),k("span",{class:`${t}-tabs-tab__label`},e?k(kt,null,k("div",{class:`${t}-tabs-tab__height-placeholder`}," "),k(Cr,{clsPrefix:t},{default:()=>k(f5,null)})):u?u():typeof c=="object"?c:Fo(c??n)),s&&this.type==="card"?k(pv,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),iI=W("tabs",`
|
|
1646
1646
|
box-sizing: border-box;
|
|
1647
1647
|
width: 100%;
|
|
1648
1648
|
display: flex;
|
|
@@ -1993,14 +1993,14 @@ ${t}
|
|
|
1993
1993
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1994
1994
|
`),W("tabs-pad",`
|
|
1995
1995
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1996
|
-
`)])])])]),oI=Object.assign(Object.assign({},pt.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),aI=Fe({name:"Tabs",props:oI,setup(e,{slots:t}){var n,r,i,o;const{mergedClsPrefixRef:a,inlineThemeDisabled:s}=rn(e),l=pt("Tabs","-tabs",iI,VF,e,a),u=ne(null),c=ne(null),f=ne(null),d=ne(null),h=ne(null),p=ne(null),g=ne(!0),b=ne(!0),v=nd(e,["labelSize","size"]),x=nd(e,["activeName","value"]),y=ne((r=(n=x.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(o=(i=Ua(t.default())[0])===null||i===void 0?void 0:i.props)===null||o===void 0?void 0:o.name:null),_=Gr(x,y),S={id:0},$=pe(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});vt(_,()=>{S.id=0,R(),C()});function w(){var L;const{value:O}=_;return O===null?null:(L=u.value)===null||L===void 0?void 0:L.querySelector(`[data-name="${O}"]`)}function T(L){if(e.type==="card")return;const{value:O}=c;if(!O)return;const ee=O.style.opacity==="0";if(L){const U=`${a.value}-tabs-bar--disabled`,{barWidth:B,placement:V}=e;if(L.dataset.disabled==="true"?O.classList.add(U):O.classList.remove(U),["top","bottom"].includes(V)){if(P(["top","maxHeight","height"]),typeof B=="number"&&L.offsetWidth>=B){const me=Math.floor((L.offsetWidth-B)/2)+L.offsetLeft;O.style.left=`${me}px`,O.style.maxWidth=`${B}px`}else O.style.left=`${L.offsetLeft}px`,O.style.maxWidth=`${L.offsetWidth}px`;O.style.width="8192px",ee&&(O.style.transition="none"),O.offsetWidth,ee&&(O.style.transition="",O.style.opacity="1")}else{if(P(["left","maxWidth","width"]),typeof B=="number"&&L.offsetHeight>=B){const me=Math.floor((L.offsetHeight-B)/2)+L.offsetTop;O.style.top=`${me}px`,O.style.maxHeight=`${B}px`}else O.style.top=`${L.offsetTop}px`,O.style.maxHeight=`${L.offsetHeight}px`;O.style.height="8192px",ee&&(O.style.transition="none"),O.offsetHeight,ee&&(O.style.transition="",O.style.opacity="1")}}}function M(){if(e.type==="card")return;const{value:L}=c;L&&(L.style.opacity="0")}function P(L){const{value:O}=c;if(O)for(const ee of L)O.style[ee]=""}function R(){if(e.type==="card")return;const L=w();L?T(L):M()}function C(){var L;const O=(L=h.value)===null||L===void 0?void 0:L.$el;if(!O)return;const ee=w();if(!ee)return;const{scrollLeft:U,offsetWidth:B}=O,{offsetLeft:V,offsetWidth:me}=ee;U>V?O.scrollTo({top:0,left:V,behavior:"smooth"}):V+me>U+B&&O.scrollTo({top:0,left:V+me-B,behavior:"smooth"})}const E=ne(null);let F=0,z=null;function j(L){const O=E.value;if(O){F=L.getBoundingClientRect().height;const ee=`${F}px`,U=()=>{O.style.height=ee,O.style.maxHeight=ee};z?(U(),z(),z=null):z=U}}function Z(L){const O=E.value;if(O){const ee=L.getBoundingClientRect().height,U=()=>{document.body.offsetHeight,O.style.maxHeight=`${ee}px`,O.style.height=`${Math.max(F,ee)}px`};z?(z(),z=null,U()):z=U}}function J(){const L=E.value;if(L){L.style.maxHeight="",L.style.height="";const{paneWrapperStyle:O}=e;if(typeof O=="string")L.style.cssText=O;else if(O){const{maxHeight:ee,height:U}=O;ee!==void 0&&(L.style.maxHeight=ee),U!==void 0&&(L.style.height=U)}}}const ie={value:[]},he=ne("next");function _e(L){const O=_.value;let ee="next";for(const U of ie.value){if(U===O)break;if(U===L){ee="prev";break}}he.value=ee,oe(L)}function oe(L){const{onActiveNameChange:O,onUpdateValue:ee,"onUpdate:value":U}=e;O&&Ye(O,L),ee&&Ye(ee,L),U&&Ye(U,L),y.value=L}function ve(L){const{onClose:O}=e;O&&Ye(O,L)}function we(){const{value:L}=c;if(!L)return;const O="transition-disabled";L.classList.add(O),R(),L.classList.remove(O)}const Oe=ne(null);function xe({transitionDisabled:L}){const O=u.value;if(!O)return;L&&O.classList.add("transition-disabled");const ee=w();ee&&Oe.value&&(Oe.value.style.width=`${ee.offsetWidth}px`,Oe.value.style.height=`${ee.offsetHeight}px`,Oe.value.style.transform=`translateX(${ee.offsetLeft-kn(getComputedStyle(O).paddingLeft)}px)`,L&&Oe.value.offsetWidth),L&&O.classList.remove("transition-disabled")}vt([_],()=>{e.type==="segment"&&dn(()=>{xe({transitionDisabled:!1})})}),fn(()=>{e.type==="segment"&&xe({transitionDisabled:!0})});let Xe=0;function Ve(L){var O;if(L.contentRect.width===0&&L.contentRect.height===0||Xe===L.contentRect.width)return;Xe=L.contentRect.width;const{type:ee}=e;if((ee==="line"||ee==="bar")&&we(),ee!=="segment"){const{placement:U}=e;Y((U==="top"||U==="bottom"?(O=h.value)===null||O===void 0?void 0:O.$el:p.value)||null)}}const de=jh(Ve,64);vt([()=>e.justifyContent,()=>e.size],()=>{dn(()=>{const{type:L}=e;(L==="line"||L==="bar")&&we()})});const Ee=ne(!1);function Pe(L){var O;const{target:ee,contentRect:{width:U,height:B}}=L,V=ee.parentElement.parentElement.offsetWidth,me=ee.parentElement.parentElement.offsetHeight,{placement:Ae}=e;if(!Ee.value)Ae==="top"||Ae==="bottom"?V<U&&(Ee.value=!0):me<B&&(Ee.value=!0);else{const{value:Re}=d;if(!Re)return;Ae==="top"||Ae==="bottom"?V-U>Re.$el.offsetWidth&&(Ee.value=!1):me-B>Re.$el.offsetHeight&&(Ee.value=!1)}Y(((O=h.value)===null||O===void 0?void 0:O.$el)||null)}const A=jh(Pe,64);function H(){const{onAdd:L}=e;L&&L(),dn(()=>{const O=w(),{value:ee}=h;!O||!ee||ee.scrollTo({left:O.offsetLeft,top:0,behavior:"smooth"})})}function Y(L){if(!L)return;const{placement:O}=e;if(O==="top"||O==="bottom"){const{scrollLeft:ee,scrollWidth:U,offsetWidth:B}=L;g.value=ee<=0,b.value=ee+B>=U}else{const{scrollTop:ee,scrollHeight:U,offsetHeight:B}=L;g.value=ee<=0,b.value=ee+B>=U}}const fe=jh(L=>{Y(L.target)},64);jn(xv,{triggerRef:et(e,"trigger"),tabStyleRef:et(e,"tabStyle"),tabClassRef:et(e,"tabClass"),addTabStyleRef:et(e,"addTabStyle"),addTabClassRef:et(e,"addTabClass"),paneClassRef:et(e,"paneClass"),paneStyleRef:et(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:et(e,"type"),closableRef:et(e,"closable"),valueRef:_,tabChangeIdRef:S,onBeforeLeaveRef:et(e,"onBeforeLeave"),activateTab:_e,handleClose:ve,handleAdd:H}),h2(()=>{R(),C()}),xr(()=>{const{value:L}=f;if(!L)return;const{value:O}=a,ee=`${O}-tabs-nav-scroll-wrapper--shadow-start`,U=`${O}-tabs-nav-scroll-wrapper--shadow-end`;g.value?L.classList.remove(ee):L.classList.add(ee),b.value?L.classList.remove(U):L.classList.add(U)});const le={syncBarPosition:()=>{R()}},q=()=>{xe({transitionDisabled:!0})},N=pe(()=>{const{value:L}=v,{type:O}=e,ee={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[O],U=`${L}${ee}`,{self:{barColor:B,closeIconColor:V,closeIconColorHover:me,closeIconColorPressed:Ae,tabColor:Re,tabBorderColor:rt,paneTextColor:lt,tabFontWeight:dt,tabBorderRadius:zt,tabFontWeightActive:yt,colorSegment:Lt,fontWeightStrong:ye,tabColorSegment:G,closeSize:m,closeIconSize:I,closeColorHover:D,closeColorPressed:te,closeBorderRadius:K,[Se("panePadding",L)]:se,[Se("tabPadding",U)]:ue,[Se("tabPaddingVertical",U)]:ae,[Se("tabGap",U)]:ke,[Se("tabGap",`${U}Vertical`)]:Me,[Se("tabTextColor",O)]:$e,[Se("tabTextColorActive",O)]:ze,[Se("tabTextColorHover",O)]:Je,[Se("tabTextColorDisabled",O)]:Ne,[Se("tabFontSize",L)]:ht},common:{cubicBezierEaseInOut:Le}}=l.value;return{"--n-bezier":Le,"--n-color-segment":Lt,"--n-bar-color":B,"--n-tab-font-size":ht,"--n-tab-text-color":$e,"--n-tab-text-color-active":ze,"--n-tab-text-color-disabled":Ne,"--n-tab-text-color-hover":Je,"--n-pane-text-color":lt,"--n-tab-border-color":rt,"--n-tab-border-radius":zt,"--n-close-size":m,"--n-close-icon-size":I,"--n-close-color-hover":D,"--n-close-color-pressed":te,"--n-close-border-radius":K,"--n-close-icon-color":V,"--n-close-icon-color-hover":me,"--n-close-icon-color-pressed":Ae,"--n-tab-color":Re,"--n-tab-font-weight":dt,"--n-tab-font-weight-active":yt,"--n-tab-padding":ue,"--n-tab-padding-vertical":ae,"--n-tab-gap":ke,"--n-tab-gap-vertical":Me,"--n-pane-padding-left":Kn(se,"left"),"--n-pane-padding-right":Kn(se,"right"),"--n-pane-padding-top":Kn(se,"top"),"--n-pane-padding-bottom":Kn(se,"bottom"),"--n-font-weight-strong":ye,"--n-tab-color-segment":G}}),re=s?Cn("tabs",pe(()=>`${v.value[0]}${e.type[0]}`),N,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:_,renderedNames:new Set,segmentCapsuleElRef:Oe,tabsPaneWrapperRef:E,tabsElRef:u,barElRef:c,addTabInstRef:d,xScrollInstRef:h,scrollWrapperElRef:f,addTabFixed:Ee,tabWrapperStyle:$,handleNavResize:de,mergedSize:v,handleScroll:fe,handleTabsResize:A,cssVars:s?void 0:N,themeClass:re==null?void 0:re.themeClass,animationDirection:he,renderNameListRef:ie,yScrollElRef:p,handleSegmentResize:q,onAnimationBeforeLeave:j,onAnimationEnter:Z,onAnimationAfterEnter:J,onRender:re==null?void 0:re.onRender},le)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:o,renderNameListRef:a,onRender:s,paneWrapperClass:l,paneWrapperStyle:u,$slots:{default:c,prefix:f,suffix:d}}=this;s==null||s();const h=c?Ua(c()).filter(S=>S.type.__TAB_PANE__===!0):[],p=c?Ua(c()).filter(S=>S.type.__TAB__===!0):[],g=!p.length,b=t==="card",v=t==="segment",x=!b&&!v&&this.justifyContent;a.value=[];const y=()=>{const S=k("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},x?null:k("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?h.map(($,w)=>(a.value.push($.props.name),ly(k(k0,Object.assign({},$.props,{internalCreatedByPane:!0,internalLeftPadded:w!==0&&(!x||x==="center"||x==="start"||x==="end")}),$.children?{default:$.children.tab}:void 0)))):p.map(($,w)=>(a.value.push($.props.name),ly(w!==0&&!x?sy($):$))),!r&&i&&b?ay(i,(g?h.length:p.length)!==0):null,x?null:k("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return k("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},b&&i?k(Wi,{onResize:this.handleTabsResize},{default:()=>S}):S,b?k("div",{class:`${e}-tabs-pad`}):null,b?null:k("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},_=v?"top":n;return k("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${o}-size`,x&&`${e}-tabs--flex`,`${e}-tabs--${_}`],style:this.cssVars},k("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${_}`,`${e}-tabs-nav`]},Bt(f,S=>S&&k("div",{class:`${e}-tabs-nav__prefix`},S)),v?k(Wi,{onResize:this.handleSegmentResize},{default:()=>k("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},k("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},k("div",{class:`${e}-tabs-wrapper`},k("div",{class:`${e}-tabs-tab`}))),g?h.map((S,$)=>(a.value.push(S.props.name),k(k0,Object.assign({},S.props,{internalCreatedByPane:!0,internalLeftPadded:$!==0}),S.children?{default:S.children.tab}:void 0))):p.map((S,$)=>(a.value.push(S.props.name),$===0?S:sy(S))))}):k(Wi,{onResize:this.handleNavResize},{default:()=>k("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(_)?k(v9,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:y}):k("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},y()))}),r&&i&&b?ay(i,!0):null,Bt(d,S=>S&&k("div",{class:`${e}-tabs-nav__suffix`},S))),g&&(this.animated&&(_==="top"||_==="bottom")?k("div",{ref:"tabsPaneWrapperRef",style:u,class:[`${e}-tabs-pane-wrapper`,l]},oy(h,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):oy(h,this.mergedValue,this.renderedNames)))}});function oy(e,t,n,r,i,o,a){const s=[];return e.forEach(l=>{const{name:u,displayDirective:c,"display-directive":f}=l.props,d=p=>c===p||f===p,h=t===u;if(l.key!==void 0&&(l.key=u),h||d("show")||d("show:lazy")&&n.has(u)){n.has(u)||n.add(u);const p=!d("if");s.push(p?lo(l,[[mf,h]]):l)}}),a?k(Yw,{name:`${a}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:o},{default:()=>s}):s}function ay(e,t){return k(k0,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function sy(e){const t=Vr(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function ly(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function P5(e,t,n){try{const{data:r}=await bu().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){Bl(r)}}async function sI(e,t,n,r){try{if(t)await R5(t,n,r);else return await P5(e,n,r)}catch(i){Bl(i)}}async function R5(e,t,n){try{await bu().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(r){Bl(r)}}function qs(e){return String(e).toLowerCase()==="true"}async function lI(e,t={}){const n=xu(e.settings,t.settings),r=e.specs,i=dI(e.tracks,t.tracks);return{plugin:e,settings:n,specs:r,tracks:i}}function uI(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=qs(n)),n}function cI(e,t={}){var n,r,i;const o=t,a=(n=e.test_param)==null?void 0:n.name;if(!a)console.error(`Test parameter has no name: ${e.name}.`);else{const s=o[a]??((r=e.test_param)==null?void 0:r.value);for(const l of e.cases||[])l.value===s&&(o[a]=s,(i=l.inputs)!=null&&i.length&&xu(l.inputs,o))}return o}function xu(e,t){const n=t||{};return e==null||e.forEach(r=>{r.type==="conditional"?n[r.name]=cI(r,n[r.name]):n[r.name]=uI(r,n[r.name])}),n}function dI(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=xu(e,r)})),n}const fI={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},hI=Fe({__name:"InputConditional",props:Yc({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:Yc(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,r=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=ne(n.input.test_param),o=i.value.name;o||console.error(`Test parameter has no name: ${n.input.name}.`);const a=Xg(e,"value");(!a.value||!(o in a.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,a.value);const s=ne(d()),l=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=xu(g.inputs),p[g.value][o]=g.value;return p}),u=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=g.inputs;return p}),c=pe(()=>u.value[s.value]),f=pe({get(){return s.value==="true"},set(p){s.value=String(p)}});function d(){return a.value&&a.value[o]}function h(p){let g={...l.value[s.value]};if(p){const b={};c.value.forEach(v=>{b[v.name]=p[v.name]}),g={...g,...p}}r("update:value",g)}return vt(()=>a.value,()=>{s.value=d()}),vt(()=>s.value,()=>{h()}),(p,g)=>(We(),wt(kt,null,[i.value.type==="boolean"?(We(),It(qe(E5),{key:0,value:f.value,"onUpdate:value":g[0]||(g[0]=b=>f.value=b)},null,8,["value"])):(We(),It(qe(Pf),{key:1,value:s.value,"onUpdate:value":g[1]||(g[1]=b=>s.value=b),options:i.value.data},null,8,["value","options"])),c.value?(We(),wt("div",fI,[Ge(wv,{"dataset-id":p.datasetId,inputs:c.value,values:a.value,"onUpdate:values":h},null,8,["dataset-id","inputs","values"])])):Xn("",!0)],64))}}),pI={key:0,class:"text-red-600 mb-1"},gI=100,vI=Fe({__name:"InputData",props:Yc({extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=ne([]),r=Xg(e,"value"),i=ne(!1),o=ne(null);async function a(c){i.value=!0;try{const f=t.extension?`q=extension-eq&qv=${t.extension}&`:"",d=c?`q=name-contains&qv=${c}`:"",{data:h}=await bu().GET(`/api/datasets?limit=${gI}&${f}${d}`);if(h&&h.length>0){const p=h.map(g=>({label:g.name,value:{id:g.id,name:g.name}}));p.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&p.unshift({label:"-- Clear Selection --",value:null}),n.value=p}}catch(f){console.log(f)}finally{i.value=!1}}function s(){r.value=o.value}function l(c){return k("div",{class:"my-1 whitespace-normal break-all"},[k(mr,{class:"size-3 mr-1"},{default:()=>k(Jw)}),c.label])}function u({option:c}){return k("div",{class:"z-[1] whitespace-nowrap text-ellipsis overflow-hidden"},c.label)}return vt(()=>r.value,()=>{var c;o.value=((c=r.value)==null?void 0:c.name)||null},{immediate:!0}),a(),(c,f)=>(We(),wt(kt,null,[!c.optional&&!r.value?(We(),wt("div",pI,[Ge(qe(mr),{class:"size-3 mr-1"},{default:mt(()=>[Ge(qe(Zw))]),_:1}),f[1]||(f[1]=ot("span",null,"Please select a dataset.",-1))])):Xn("",!0),Ge(qe(Pf),{value:o.value,"onUpdate:value":[f[0]||(f[0]=d=>o.value=d),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,"render-label":l,"render-tag":u,options:n.value,onSearch:a},null,8,["value","loading","options"])],64))}});function bI(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const o=e.metadata_column_types;for(const a in o)(r&&["int","float"].includes(o[a])||n&&o[a]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(a)+1),value:a});return i}const mI=Fe({__name:"InputDataColumn",props:Yc({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=ne([]),r=Xg(e,"value");async function i(){if(t.datasetId)try{const{data:a}=await bu().GET(`/api/datasets/${t.datasetId}`),s=bI(a,t.isAuto,t.isText,t.isNumber);n.value=s,o()}catch(a){console.debug(a)}else console.debug("Data column selector disabled, since `datasetId` is unavailable.")}function o(){n.value.length>0&&r.value===null&&(r.value=n.value[0].value)}return i(),vt(()=>r.value,()=>o()),(a,s)=>a.datasetId?(We(),It(qe(Pf),{key:0,value:r.value,"onUpdate:value":s[0]||(s[0]=l=>r.value=l),options:n.value},null,8,["value","options"])):(We(),It(qe(ts),{key:1,value:r.value,"onUpdate:value":s[1]||(s[1]=l=>r.value=l)},null,8,["value"]))}}),yI={class:"select-none"},_I={class:"font-bold mb-1"},xI={key:0,class:"text-xs mb-1"},wI={key:5},uy=.01,wv=Fe({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=t,i=ne(o());function o(){const s={...n.values};return n.inputs.forEach(l=>{s[l.name]===void 0&&(s[l.name]=null)}),s}function a(){r("update:values",i.value)}return vt(()=>n.values,()=>{i.value=o()}),(s,l)=>(We(),wt("div",yI,[(We(!0),wt(kt,null,gw(s.inputs,(u,c)=>(We(),wt("div",{key:c,class:pu(c<s.inputs.length-1?"pb-2":"")},[ot("div",_I,fi(u.label||u.name),1),u.help?(We(),wt("div",xI,fi(u.help),1)):Xn("",!0),ot("div",null,[u.type==="boolean"?(We(),It(qe(E5),{key:0,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a]},null,8,["value","onUpdate:value"])):u.type==="color"?(We(),It(qe(wF),{key:1,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):u.type==="conditional"?(We(),It(hI,{key:2,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],"dataset-id":s.datasetId,input:u},null,8,["value","onUpdate:value","dataset-id","input"])):u.type==="data"?(We(),It(vI,{key:3,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],extension:u.extension,optional:qe(qs)(u.optional)},null,8,["value","onUpdate:value","extension","optional"])):u.type==="data_column"?(We(),It(mI,{key:4,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],"dataset-id":s.datasetId,"is-auto":qe(qs)(u.is_auto),"is-text":qe(qs)(u.is_text),"is-number":qe(qs)(u.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):["float","integer"].includes(u.type)?(We(),wt("div",wI,[u.min!==void 0&&u.max!==void 0?(We(),It(qe(eI),{key:0,class:"mb-2",value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],min:Number(u.min),max:Number(u.max),step:u.type==="float"?uy:1},null,8,["value","onUpdate:value","min","max","step"])):Xn("",!0),Ge(qe(KF),{value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],size:"small",min:Number(u.min),max:Number(u.max),step:u.type==="float"?uy:1},null,8,["value","onUpdate:value","min","max","step"])])):u.type==="select"?(We(),It(qe(Pf),{key:6,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],options:u.data},null,8,["value","onUpdate:value","options"])):u.type==="textarea"?(We(),It(qe(ts),{key:7,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,a],rows:Number(u.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(We(),It(qe(ts),{key:8,value:i.value[u.name],"onUpdate:value":[f=>i.value[u.name]=f,l[0]||(l[0]=f=>a())]},null,8,["value","onUpdate:value"]))])],2))),128))]))}}),CI={class:"border border-dotted border-green-600 rounded p-2"},SI={class:"mx-1"},$I=Fe({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=pe(()=>xu(n.inputs));function o(){const l=[...n.valuesArray];l.unshift(i.value),r("update:values-array",l)}function a(l){const u=[...n.valuesArray];u.splice(l,1),r("update:values-array",u)}function s(l,u){const c=[...n.valuesArray];c[l]={...u},r("update:values-array",c)}return(l,u)=>(We(),wt(kt,null,[Ge(qe(Lr),{size:"tiny",type:"primary",onClick:o},{default:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(Jw))]),_:1}),u[0]||(u[0]=ot("span",{class:"mx-1"},"Add New Track",-1))]),_:1}),(We(!0),wt(kt,null,gw(l.valuesArray,(c,f)=>(We(),wt("div",{key:f,class:"py-2"},[ot("div",CI,[Ge(wv,{"dataset-id":l.datasetId,inputs:l.inputs,values:c,"onUpdate:values":d=>s(f,d)},null,8,["dataset-id","inputs","values","onUpdate:values"]),Ge(qe(Lr),{class:"w-full mt-2","data-description":"remove repeat block",disabled:l.valuesArray.length<=1,size:"tiny",type:"primary",onClick:d=>a(f)},{default:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(N7))]),_:1}),ot("span",SI,"Remove Track "+fi(l.valuesArray.length-f),1)]),_:2},1032,["disabled","onClick"])])]))),128))],64))}}),kI=2e3,MI=Fe({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return vt(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),kI)}),(o,a)=>o.message?(We(),It(qe(S5),{key:0,type:o.messageType},{default:mt(()=>[Wo(fi(o.message),1)]),_:1},8,["type"])):Xn("",!0)}}),TI={class:"text-xs"},EI=Fe({__name:"ApiStatus",setup(e){const t=ne("...");async function n(){try{const{data:r}=await bu().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(r,i)=>t.value?(We(),It(qe(Wl),{key:0,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(mr),{class:"mx-1"},{default:mt(()=>[Ge(qe(z7),{class:"text-green-600"})]),_:1})]),default:mt(()=>[ot("span",TI,"Connected to Galaxy Version "+fi(t.value)+".",1)]),_:1})):(We(),It(qe(Wl),{key:1,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(mr),{class:"mx-1"},{default:mt(()=>[Ge(qe(Zw),{class:"text-red-600"})]),_:1})]),default:mt(()=>[i[0]||(i[0]=ot("span",{class:"text-xs"},"Galaxy is not accessible!",-1))]),_:1}))}}),AI=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},PI={},RI={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"};function zI(e,t){return We(),wt("svg",RI,t[0]||(t[0]=[ot("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),ot("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)]))}const FI=AI(PI,[["render",zI]]),II={class:"overflow-auto select-none bg-white z-10 p-2"},BI={key:0,class:"flex"},OI={class:"flex-1 font-thin text-lg mt-1"},NI={class:"bg-sky-50 text-sky-900 rounded my-2 p-2"},LI={class:"flex"},DI={class:"flex justify-center center-items"},HI={class:"m-2"},UI=["src"],jI={class:"overflow-hidden break-words p-1"},WI={class:"font-bold"},VI=["innerHTML"],qI=Fe({__name:"SidePanel",props:{datasetId:{},datasetUrl:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,r=t,i=ne(""),o=ne("info"),a=pe(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await R5(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",o.value="success";else{const f=await P5(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});f?(i.value="Successfully created.",o.value="success",r("update:visualization-id",f)):(i.value="Something went wrong.",o.value="error")}}catch(f){i.value=Xw(f),o.value="error"}}function l(f){r("update:settings",f)}function u(f){r("update:tracks",f)}function c(f){r("update:visualization-title",f)}return(f,d)=>(We(),wt("div",II,[f.datasetUrl?(We(),wt("div",BI,[ot("div",OI,[d[2]||(d[2]=ot("span",null,"Charts",-1)),Ge(EI)]),ot("div",null,[f.datasetId?(We(),It(qe(Wl),{key:0,trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 mr-2","data-description":"sidepanel save button",onClick:s},{icon:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(B7))]),_:1})]),_:1})]),default:mt(()=>[d[3]||(d[3]=ot("span",{class:"text-xs"},"Save",-1))]),_:1})):Xn("",!0),Ge(qe(Wl),{trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100",onClick:d[0]||(d[0]=h=>r("toggle"))},{icon:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(I7))]),_:1})]),_:1})]),default:mt(()=>[d[4]||(d[4]=ot("span",{class:"text-xs"},"Collapse",-1))]),_:1})])])):Xn("",!0),Ge(MI,{message:i.value,"message-type":o.value,onTimeout:d[1]||(d[1]=h=>i.value=""),class:"mt-2"},null,8,["message","message-type"]),ot("div",NI,[ot("div",LI,[ot("div",DI,[ot("div",HI,[n.logoUrl?(We(),wt("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,UI)):(We(),It(FI,{key:1}))])]),ot("div",jI,[ot("span",WI,fi(f.html),1),ot("div",{class:"text-xs",innerHTML:f.description},null,8,VI)])])]),ot("div",null,[d[5]||(d[5]=ot("div",{class:"font-bold"},"Title",-1)),d[6]||(d[6]=ot("div",{class:"text-xs py-1"},"Specify a visualization title.",-1)),Ge(qe(ts),{value:f.visualizationTitle,onInput:c},null,8,["value"])]),Ge(qe(aI),{type:"line",animated:"",class:"mt-2","pane-wrapper-class":"!overflow-visible","tab-class":a.value?"!hidden":""},{default:mt(()=>[f.trackInputs.length>0?(We(),It(qe(iy),{key:0,name:"tracks"},{tab:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(O7))]),_:1}),d[7]||(d[7]=ot("span",{class:"mx-1"},"Tracks",-1))]),default:mt(()=>[Ge($I,{"dataset-id":f.datasetId,inputs:f.trackInputs,"values-array":f.trackValues,"onUpdate:valuesArray":u},null,8,["dataset-id","inputs","values-array"])]),_:1})):Xn("",!0),f.settingInputs.length>0?(We(),It(qe(iy),{key:1,name:"settings"},{tab:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(P7))]),_:1}),d[8]||(d[8]=ot("span",{class:"mx-1"},"Settings",-1))]),default:mt(()=>[Ge(wv,{"dataset-id":f.datasetId,inputs:f.settingInputs,values:f.settingValues,"onUpdate:values":l},null,8,["dataset-id","inputs","values"])]),_:1})):Xn("",!0)]),_:1},8,["tab-class"])]))}});function GI(e,t="app"){if(e===void 0){const s=document.getElementById(t);if(s)e=JSON.parse((s==null?void 0:s.dataset.incoming)||"{}");else throw new Error(`Container element '${t}' not found.`)}const n=(e==null?void 0:e.root)??"/",r=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,o=(e==null?void 0:e.visualization_plugin)??{},a=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}}const YI={key:1,class:"m-2"},XI={key:0,class:"relative max-w-full h-screen overflow-hidden"},KI=Fe({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}=GI(t.incoming,t.container),s=ne(!0),l=ne(""),u=ne(""),c=ne(""),f=ne(!0),d=ne(""),h=ne(""),p=ne([]),g=ne({}),b=ne({}),v=ne([]),x=ne([]),y=ne(i),_=ne(a),S=Kw();S.setCredentials(t.credentials||"include"),S.setRoot(n||"/"),lI(o,r).then(({plugin:ie,settings:he,specs:_e,tracks:oe})=>{l.value=ie.description||"",c.value=ie.html||"",f.value=!1,d.value=ie.logo||"",h.value=ie.name||"",p.value=ie.settings||[],g.value=he,b.value=_e||{},v.value=ie.tracks||[],x.value=oe});const $=pe(()=>r.dataset_id||""),w=pe(()=>r.dataset_url?(console.debug(`GalaxyCharts: Evaluating dataset url: ${r.dataset_url}.`),r.dataset_url):$.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${$.value}.`),A7(n,$.value)):""),T=pe(()=>d.value&&`${n}${d.value}`),M=pe(()=>p.value.length===0&&v.value.length===0);async function P(){s.value=!s.value,await dn(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function R(){try{window.postMessage({container:t.container,from:"galaxy-visualization",visualization_config:JSON.parse(JSON.stringify(C())),visualization_id:y.value,visualization_title:_.value},"*")}catch(ie){u.value=`Failed to postMessage: ${ie}`}}function C(){return{dataset_id:$.value,dataset_url:w.value,settings:g.value,tracks:x.value}}function E(ie){g.value={...ie},R()}function F(ie){x.value=[...ie],R()}function z(ie){y.value=ie,R()}function j(ie){_.value=ie,R()}async function Z(ie){J(ie);try{const he=await sI(h.value,y.value,_.value,C());he&&z(he)}catch(he){u.value=`Failed to save: ${he}`}}function J(ie){E({...g.value,...ie})}return(ie,he)=>(We(),wt(kt,null,[u.value?(We(),It(qe(S5),{key:0,type:"error",class:"m-2"},{default:mt(()=>[Wo(fi(u.value),1)]),_:1})):Xn("",!0),f.value?(We(),wt("div",YI,[ot("span",null,[Ge(qe(R7),{class:"animate-spin size-4 inline mx-1"})]),he[0]||(he[0]=ot("span",{class:"text-xs"},"Please wait...",-1))])):(We(),wt("div",{key:2,class:pu(["grid h-screen",{"grid-cols-[1fr_17rem]":!s.value&&!M.value&&w.value}])},[w.value?(We(),wt("div",XI,[qg(ie.$slots,"default",{datasetId:$.value,datasetUrl:w.value,root:qe(n),settings:g.value,specs:b.value,tracks:x.value,save:Z,update:J})])):Xn("",!0),s.value&&!M.value&&w.value?(We(),It(qe(Wl),{key:1,trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2 absolute right-0",onClick:P},{icon:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(F7))]),_:1})]),_:1})]),default:mt(()=>[he[1]||(he[1]=ot("span",{class:"text-xs"},"Expand",-1))]),_:1})):Xn("",!0),lo(Ge(qI,{"dataset-id":$.value,"dataset-url":w.value,description:l.value,html:c.value,"logo-url":T.value,name:h.value,"setting-inputs":p.value,"setting-values":g.value,"track-inputs":v.value,"track-values":x.value,"visualization-id":y.value,"visualization-title":_.value,"onUpdate:settings":E,"onUpdate:tracks":F,"onUpdate:visualizationId":z,"onUpdate:visualizationTitle":j,onToggle:P},null,8,["dataset-id","dataset-url","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]),[[mf,!s.value&&!M.value||!w.value]])],2))],64))}}),z5="0.14.0";class Zi{constructor(){this._items=new Map}get(t){if(!this._items.has(t))throw new Error(`Item not found: ${t}`);return this._items.get(t)}add(t,n,r=!1){if(!r&&this._items.has(t))throw new Error(`Item ${t} is already defined`);return this._items.set(t,n),n}remove(t){return this._items.delete(t)}has(t){return this._items.has(t)}list(){return Array.from(this._items.keys())}}class Cv extends Zi{create(t,...n){const r=this.get(t);return new r(...n)}extend(t,n,r){if(console.warn("Deprecation warning: .extend method will be removed in future versions, in favor of explicit ES6 subclasses"),arguments.length!==3)throw new Error("Invalid arguments to .extend");const i=this.get(t);class o extends i{}return Object.assign(o.prototype,r,i),this.add(n,o),o}}class ZI{constructor(t,n,r={},i=null,o=null){this.key=t,this.value=n,this.metadata=r,this.prev=i,this.next=o}}class JI{constructor(t=3){if(this._max_size=t,this._cur_size=0,this._store=new Map,this._head=null,this._tail=null,t===null||t<0)throw new Error('Cache "max_size" must be >= 0')}has(t){return this._store.has(t)}get(t){const n=this._store.get(t);return n?(this._head!==n&&this.add(t,n.value),n.value):null}add(t,n,r={}){if(this._max_size===0)return;const i=this._store.get(t);i&&this._remove(i);const o=new ZI(t,n,r,null,this._head);if(this._head?this._head.prev=o:this._tail=o,this._head=o,this._store.set(t,o),this._max_size>=0&&this._cur_size>=this._max_size){const a=this._tail;this._tail=this._tail.prev,this._remove(a)}this._cur_size+=1}clear(){this._head=null,this._tail=null,this._cur_size=0,this._store=new Map}remove(t){const n=this._store.get(t);return n?(this._remove(n),!0):!1}_remove(t){t.prev!==null?t.prev.next=t.next:this._head=t.next,t.next!==null?t.next.prev=t.prev:this._tail=t.prev,this._store.delete(t.key),this._cur_size-=1}find(t){let n=this._head;for(;n;){const r=n.next;if(t(n))return n;n=r}}}function QI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qh,cy;function eB(){if(cy)return Qh;cy=1,Qh=e;function e(n){if(typeof n=="function")return n;var r=Array.isArray(n)?[]:{};for(var i in n){var o=n[i],a={}.toString.call(o).slice(8,-1);a=="Array"||a=="Object"?r[i]=e(o):a=="Date"?r[i]=new Date(o.getTime()):a=="RegExp"?r[i]=RegExp(o.source,t(o)):r[i]=o}return r}function t(n){if(typeof n.source.flags=="string")return n.source.flags;var r=[];return n.global&&r.push("g"),n.ignoreCase&&r.push("i"),n.multiline&&r.push("m"),n.sticky&&r.push("y"),n.unicode&&r.push("u"),r.join("")}return Qh}var tB=eB();const nB=QI(tB);function Gs(e){return typeof e!="object"?e:nB(e)}let rB=class{constructor(t={}){this._config=t;const{cache_enabled:n=!0,cache_size:r=3}=t;this._enable_cache=n,this._cache=new JI(r)}_buildRequestOptions(t,n){return Object.assign({},t)}_getCacheKey(t){if(this._enable_cache)throw new Error("Method not implemented");return null}_performRequest(t){throw new Error("Not implemented")}_normalizeResponse(t,n){return t}_annotateRecords(t,n){return t}_postProcessResponse(t,n){return t}getData(t={},...n){t=this._buildRequestOptions(t,...n);const r=this._getCacheKey(t);let i;return this._enable_cache&&this._cache.has(r)?i=this._cache.get(r):(i=Promise.resolve(this._performRequest(t)).then(o=>this._normalizeResponse(o,t)),this._cache.add(r,i,t._cache_meta),i.catch(o=>this._cache.remove(r))),i.then(o=>Gs(o)).then(o=>this._annotateRecords(o,t)).then(o=>this._postProcessResponse(o,t))}};class iB extends rB{constructor(t={}){super(t),this._url=t.url}_getCacheKey(t){return this._getURL(t)}_getURL(t){return this._url}_performRequest(t){const n=this._getURL(t);if(!this._url)throw new Error('Web based resources must specify a resource URL as option "url"');return fetch(n).then(r=>{if(!r.ok)throw new Error(r.statusText);return r.text()})}_normalizeResponse(t,n){return typeof t=="string"?JSON.parse(t):t}}var ep={},oc={exports:{}},tp,dy;function oB(){return dy||(dy=1,tp=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}),tp}var fy;function aB(){return fy||(fy=1,function(e,t){const n=oB();e.exports=class extends Error{constructor(r){const i=r.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:n(o));super(i.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t.assert)}}}(oc,oc.exports)),oc.exports}var np,hy;function sB(){if(hy)return np;hy=1;const e=aB();return np=function(t,...n){if(!t)throw n.length===1&&n[0]instanceof Error?n[0]:new e(n)},np}var py;function lB(){if(py)return ep;py=1;const e=sB(),t={};return ep.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(n,r){r=r||{};const i=[].concat(r.before||[]),o=[].concat(r.after||[]),a=r.group||"?",s=r.sort||0;e(!i.includes(a),`Item cannot come before itself: ${a}`),e(!i.includes("?"),"Item cannot come before unassociated items"),e(!o.includes(a),`Item cannot come after itself: ${a}`),e(!o.includes("?"),"Item cannot come after unassociated items"),Array.isArray(n)||(n=[n]);for(const l of n){const u={seq:this._items.length,sort:s,before:i,after:o,group:a,node:l};this._items.push(u)}if(!r.manual){const l=this._sort();e(l,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(n){Array.isArray(n)||(n=[n]);for(const i of n)if(i)for(const o of i._items)this._items.push(Object.assign({},o));this._items.sort(t.mergeSort);for(let i=0;i<this._items.length;++i)this._items[i].seq=i;const r=this._sort();return e(r,"merge created a dependencies error"),this.nodes}sort(){const n=this._sort();return e(n,"sort created a dependencies error"),this.nodes}_sort(){const n={},r=Object.create(null),i=Object.create(null);for(const u of this._items){const c=u.seq,f=u.group;i[f]=i[f]||[],i[f].push(c),n[c]=u.before;for(const d of u.after)r[d]=r[d]||[],r[d].push(c)}for(const u in n){const c=[];for(const f in n[u]){const d=n[u][f];i[d]=i[d]||[],c.push(...i[d])}n[u]=c}for(const u in r)if(i[u])for(const c of i[u])n[c].push(...r[u]);const o={};for(const u in n){const c=n[u];for(const f of c)o[f]=o[f]||[],o[f].push(u)}const a={},s=[];for(let u=0;u<this._items.length;++u){let c=u;if(o[u]){c=null;for(let f=0;f<this._items.length;++f){if(a[f]===!0)continue;o[f]||(o[f]=[]);const d=o[f].length;let h=0;for(let p=0;p<d;++p)a[o[f][p]]&&++h;if(h===d){c=f;break}}}c!==null&&(a[c]=!0,s.push(c))}if(s.length!==this._items.length)return!1;const l={};for(const u of this._items)l[u.seq]=u;this._items=[],this.nodes=[];for(const u of s){const c=l[u];this.nodes.push(c.node),this._items.push(c)}return!0}},t.mergeSort=(n,r)=>n.sort===r.sort?0:n.sort<r.sort?-1:1,ep}var uB=lB();function cB(e){const t=/^(?<name_alone>\w+)$|((?<name_deps>\w+)+\(\s*(?<deps>[^)]+?)\s*\))/.exec(e);if(!t)throw new Error(`Unable to parse dependency specification: ${e}`);let{name_alone:n,name_deps:r,deps:i}=t.groups;return n?[n,[]]:(i=i.split(/\s*,\s*/),[r,i])}function dB(e,t,n,r=!0){if(!n.length)return[];const i=n.map(u=>cB(u)),o=new Map(i),a=new uB.Sorter;for(let[u,c]of o.entries())try{a.add(u,{after:c,group:u})}catch{throw new Error(`Invalid or possible circular dependency specification for: ${u}`)}const s=a.nodes,l=new Map;for(let u of s){const c=t.get(u);if(!c)throw new Error(`Data has been requested from source '${u}', but no matching source was provided`);const f=o.get(u)||[],h=Promise.all(f.map(p=>l.get(p))).then(p=>{const g=Object.assign({_provider_name:u},e);return c.getData(g,...p)});l.set(u,h)}return Promise.all([...l.values()]).then(u=>r?u[u.length-1]:u)}function M0(e,t){const n=new Map;for(let r of e){const i=r[t];if(typeof i>"u")throw new Error(`All records must specify a value for the field "${t}"`);if(typeof i=="object")throw new Error("Attempted to group on a field with non-primitive values");let o=n.get(i);o||(o=[],n.set(i,o)),o.push(r)}return n}function Sv(e,t,n,r,i){const o=M0(n,i),a=[];for(let s of t){const l=s[r],u=o.get(l)||[];u.length?a.push(...u.map(c=>Object.assign({},Gs(c),Gs(s)))):e!=="inner"&&a.push(Gs(s))}if(e==="outer"){const s=M0(t,r);for(let l of n){const u=l[i];(s.get(u)||[]).length||a.push(Gs(l))}}return a}function F5(e,t,n,r){return Sv("left",...arguments)}function fB(e,t,n,r){return Sv("inner",...arguments)}function hB(e,t,n,r){return Sv("outer",...arguments)}const pB=/^(?:chr)?([a-zA-Z0-9]+?)[_:-](\d+)[_:|-]?(\w+)?[/_:|-]?([^_]+)?_?(.*)?/;function I5(e,t=!1){const n=e&&e.match(pB);if(n)return n.slice(1);if(t)return null;throw new Error(`Could not understand marker format for ${e}. Should be of format chr:pos or chr:pos_ref/alt`)}class B5{constructor(){throw new Error('The "BaseAdapter" and "BaseApiAdapter" classes have been replaced in LocusZoom 0.14. See migration guide for details.')}}class gB extends B5{}class Rf extends iB{constructor(t={}){t.params&&(console.warn('Deprecation warning: all options in "config.params" should now be specified as top level keys.'),Object.assign(t,t.params||{}),delete t.params),super(t);const{prefix_namespace:n=!0,limit_fields:r}=t;this._prefix_namespace=n,this._limit_fields=r?new Set(r):!1}_getCacheKey(t){let{chr:n,start:r,end:i}=t;const o=this._cache.find(({metadata:a})=>n===a.chr&&r>=a.start&&i<=a.end);return o&&({chr:n,start:r,end:i}=o.metadata),t._cache_meta={chr:n,start:r,end:i},`${n}_${r}_${i}`}_postProcessResponse(t,n){if(!this._prefix_namespace||!Array.isArray(t))return t;const{_limit_fields:r}=this,{_provider_name:i}=n;return t.map(o=>Object.entries(o).reduce((a,[s,l])=>((!r||r.has(s))&&(a[`${i}:${s}`]=l),a),{}))}_findPrefixedKey(t,n){const r=new RegExp(`:${n}$`),i=Object.keys(t).find(o=>r.test(o));if(!i)throw new Error(`Could not locate the required key name: ${n} in dependent data`);return i}}class fa extends Rf{constructor(t={}){super(t),this._genome_build=t.genome_build||t.build}_validateBuildSource(t,n){if(t&&n||!(t||n))throw new Error(`${this.constructor.name} must provide a parameter specifying either "build" or "source". It should not specify both.`);if(t&&!["GRCh37","GRCh38"].includes(t))throw new Error(`${this.constructor.name} must specify a valid 'genome_build'`)}_normalizeResponse(t,n){let r=super._normalizeResponse(...arguments);if(r=r.data||r,Array.isArray(r))return r;const i=Object.keys(r),o=r[i[0]].length;if(!i.every(function(u){return r[u].length===o}))throw new Error(`${this.constructor.name} expects a response in which all arrays of data are the same length`);const s=[],l=Object.keys(r);for(let u=0;u<o;u++){const c={};for(let f=0;f<l.length;f++)c[l[f]]=r[l[f]][u];s.push(c)}return s}}class vB extends fa{constructor(t={}){super(t);const{source:n}=t;this._source_id=n}_getURL(t){const{chr:n,start:r,end:i}=t;return`${super._getURL(t)}results/?filter=analysis in ${this._source_id} and chromosome in '${n}' and position ge ${r} and position le ${i}`}}class bB extends fa{constructor(t){t.limit_fields||(t.limit_fields=["log_pvalue","pos","rsid","trait","variant"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build,r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id eq ${r}`;return`${super._getURL(t)}?format=objects&sort=pos&filter=chrom eq '${t.chr}' and pos ge ${t.start} and pos le ${t.end}${i}`}}class mB extends fa{constructor(t={}){super(t),this._prefix_namespace=!1}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and source in ${r}`;return`${super._getURL(t)}?filter=chrom eq '${t.chr}' and start le ${t.end} and end ge ${t.start}${i}`}}class yB extends Rf{constructor(t={}){super(t),this._prefix_namespace=!1}_buildRequestOptions(t,n){const r=t.genome_build||this._config.build;if(!r)throw new Error(`Adapter ${this.constructor.name} must specify a 'genome_build' option`);const i=new Set;for(let o of n)i.add(o.gene_name);return t.query=[...i.values()].map(function(o){return`${`_${o.replace(/[^A-Za-z0-9_]/g,"_")}`}: gene(gene_symbol: "${o}", reference_genome: ${r}) { gnomad_constraint { exp_syn obs_syn syn_z oe_syn oe_syn_lower oe_syn_upper exp_mis obs_mis mis_z oe_mis oe_mis_lower oe_mis_upper exp_lof obs_lof pLI oe_lof oe_lof_lower oe_lof_upper } } `}),t.build=r,Object.assign({},t)}_performRequest(t){let{query:n,build:r}=t;if(!n.length||n.length>25||r==="GRCh38")return Promise.resolve([]);n=`{${n.join(" ")} }`;const i=this._getURL(t),o=JSON.stringify({query:n});return fetch(i,{method:"POST",body:o,headers:{"Content-Type":"application/json"}}).then(s=>s.ok?s.text():[]).catch(s=>[])}_normalizeResponse(t){return typeof t!="string"?t:JSON.parse(t).data}}class O5 extends fa{constructor(t){t.limit_fields||(t.limit_fields=["variant2","position2","correlation"]),super(t)}__find_ld_refvar(t,n){const r=this._findPrefixedKey(n[0],"variant"),i=this._findPrefixedKey(n[0],"log_pvalue");let o,a={};if(t.ldrefvar)o=t.ldrefvar,a=n.find(h=>h[r]===o)||{};else{let h=0;for(let p of n){const{[r]:g,[i]:b}=p;b>h&&(h=b,o=g,a=p)}}a.lz_is_ld_refvar=!0;const s=I5(o,!0);if(!s)throw new Error("Could not request LD for a missing or incomplete marker format");const[l,u,c,f]=s;o=`${l}:${u}`,c&&f&&(o+=`_${c}/${f}`);const d=+u;return d&&t.ldrefvar&&t.chr&&(l!==String(t.chr)||d<t.start||d>t.end)?(t.ldrefvar=null,this.__find_ld_refvar(t,n)):o}_buildRequestOptions(t,n){if(!n)throw new Error("LD request must depend on association data");const r=super._buildRequestOptions(...arguments);if(!n.length)return r._skip_request=!0,r;r.ld_refvar=this.__find_ld_refvar(t,n);const i=t.genome_build||this._config.build||"GRCh37";let o=t.ld_source||this._config.source||"1000G";const a=t.ld_pop||this._config.population||"ALL";return o==="1000G"&&i==="GRCh38"&&(o="1000G-FRZ09"),this._validateBuildSource(i,null),Object.assign({},r,{genome_build:i,ld_source:o,ld_population:a})}_getURL(t){const n=this._config.method||"rsquare",{chr:r,start:i,end:o,ld_refvar:a,genome_build:s,ld_source:l,ld_population:u}=t;return[super._getURL(t),"genome_builds/",s,"/references/",l,"/populations/",u,"/variants","?correlation=",n,"&variant=",encodeURIComponent(a),"&chrom=",encodeURIComponent(r),"&start=",encodeURIComponent(i),"&stop=",encodeURIComponent(o)].join("")}_getCacheKey(t){const n=super._getCacheKey(t),{ld_refvar:r,ld_source:i,ld_population:o}=t;return`${n}_${r}_${i}_${o}`}_performRequest(t){if(t._skip_request)return Promise.resolve([]);const n=this._getURL(t);let r={data:{}},i=function(o){return fetch(o).then().then(a=>{if(!a.ok)throw new Error(a.statusText);return a.text()}).then(function(a){return a=JSON.parse(a),Object.keys(a.data).forEach(function(s){r.data[s]=(r.data[s]||[]).concat(a.data[s])}),a.next?i(a.next):r})};return i(n)}}class _B extends fa{constructor(t){t.limit_fields||(t.limit_fields=["position","recomb_rate"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id in ${r}`;return`${super._getURL(t)}?filter=chromosome eq '${t.chr}' and position le ${t.end} and position ge ${t.start}${i}`}}class N5 extends Rf{constructor(t={}){super(...arguments);const{data:n}=t;if(!n||Array.isArray(t))throw new Error("'StaticSource' must provide data as required option 'config.data'");this._data=n}_performRequest(t){return Promise.resolve(this._data)}}class xB extends fa{_getURL(t){const n=(t.genome_build?[t.genome_build]:null)||this._config.build;if(!n||!Array.isArray(n)||!n.length)throw new Error(["Adapter",this.constructor.name,"requires that you specify array of one or more desired genome build names"].join(" "));return[super._getURL(t),"?filter=variant eq '",encodeURIComponent(t.variant),"'&format=objects&",n.map(function(o){return`build=${encodeURIComponent(o)}`}).join("&")].join("")}_getCacheKey(t){return this._getURL(t)}}const wB=Object.freeze(Object.defineProperty({__proto__:null,AssociationLZ:vB,BaseAdapter:B5,BaseApiAdapter:gB,BaseLZAdapter:Rf,BaseUMAdapter:fa,GeneConstraintLZ:yB,GeneLZ:mB,GwasCatalogLZ:bB,LDServer:O5,PheWASLZ:xB,RecombLZ:_B,StaticSource:N5},Symbol.toStringTag,{value:"Module"})),ns=new Cv;for(let[e,t]of Object.entries(wB))ns.add(e,t);ns.add("StaticJSON",N5);ns.add("LDLZ2",O5);var CB="5.16.0";function Sr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $v(e){return e.length===1&&(e=SB(e)),{left:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function SB(e){return function(t,n){return Sr(e(t),n)}}var L5=$v(Sr),Ji=L5.right,$B=L5.left;function kB(e,t){t==null&&(t=D5);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return o}function D5(e,t){return[e,t]}function MB(e,t,n){var r=e.length,i=t.length,o=new Array(r*i),a,s,l,u;for(n==null&&(n=D5),a=l=0;a<r;++a)for(u=e[a],s=0;s<i;++s,++l)o[l]=n(u,t[s]);return o}function TB(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Qi(e){return e===null?NaN:+e}function H5(e,t){var n=e.length,r=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<n;)isNaN(a=Qi(e[i]))||(s=a-o,o+=s/++r,l+=s*(a-o));else for(;++i<n;)isNaN(a=Qi(t(e[i],i,e)))||(s=a-o,o+=s/++r,l+=s*(a-o));if(r>1)return l/(r-1)}function U5(e,t){var n=H5(e,t);return n&&Math.sqrt(n)}function qo(e,t){var n=e.length,r=-1,i,o,a;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=a=i;++r<n;)(i=e[r])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=a=i;++r<n;)(i=t(e[r],r,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var j5=Array.prototype,EB=j5.slice,AB=j5.map;function ac(e){return function(){return e}}function PB(e){return e}function Jn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}var T0=Math.sqrt(50),E0=Math.sqrt(10),A0=Math.sqrt(2);function kv(e,t,n){var r,i=-1,o,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),(s=wl(e,t,n))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return r&&a.reverse(),a}function wl(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=T0?10:o>=E0?5:o>=A0?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T0?10:o>=E0?5:o>=A0?2:1)}function Go(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=T0?i*=10:o>=E0?i*=5:o>=A0&&(i*=2),t<e?-i:i}function Mv(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function RB(){var e=PB,t=qo,n=Mv;function r(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var u=t(l),c=u[0],f=u[1],d=n(l,c,f);Array.isArray(d)||(d=Go(c,f,d),d=Jn(Math.ceil(c/d)*d,f,d));for(var h=d.length;d[0]<=c;)d.shift(),--h;for(;d[h-1]>f;)d.pop(),--h;var p=new Array(h+1),g;for(o=0;o<=h;++o)g=p[o]=[],g.x0=o>0?d[o-1]:c,g.x1=o<h?d[o]:f;for(o=0;o<a;++o)s=l[o],c<=s&&s<=f&&p[Ji(d,s,0,h)].push(i[o]);return p}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:ac(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:ac([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Array.isArray(i)?ac(EB.call(i)):ac(i),r):n},r}function Vl(e,t,n){if(n==null&&(n=Qi),!!(r=e.length)){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function zB(e,t,n){return e=AB.call(e,Qi).sort(Sr),Math.ceil((n-t)/(2*(Vl(e,.75)-Vl(e,.25))*Math.pow(e.length,-1/3)))}function FB(e,t,n){return Math.ceil((n-t)/(3.5*U5(e)*Math.pow(e.length,-1/3)))}function W5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&i>o&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&i>o&&(o=i);return o}function IB(e,t){var n=e.length,r=n,i=-1,o,a=0;if(t==null)for(;++i<n;)isNaN(o=Qi(e[i]))?--r:a+=o;else for(;++i<n;)isNaN(o=Qi(t(e[i],i,e)))?--r:a+=o;if(r)return a/r}function BB(e,t){var n=e.length,r=-1,i,o=[];if(t==null)for(;++r<n;)isNaN(i=Qi(e[r]))||o.push(i);else for(;++r<n;)isNaN(i=Qi(t(e[r],r,e)))||o.push(i);return Vl(o.sort(Sr),.5)}function Tv(e){for(var t=e.length,n,r=-1,i=0,o,a;++r<t;)i+=e[r].length;for(o=new Array(i);--t>=0;)for(a=e[t],n=a.length;--n>=0;)o[--i]=a[n];return o}function V5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&o>i&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&o>i&&(o=i);return o}function OB(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}function NB(e,t){if(n=e.length){var n,r=0,i=0,o,a=e[i];for(t==null&&(t=Sr);++r<n;)(t(o=e[r],a)<0||t(a,a)!==0)&&(a=o,i=r);if(t(a,a)===0)return i}}function LB(e,t,n){for(var r=(n??e.length)-(t=t==null?0:+t),i,o;r;)o=Math.random()*r--|0,i=e[r+t],e[r+t]=e[o+t],e[o+t]=i;return e}function DB(e,t){var n=e.length,r=-1,i,o=0;if(t==null)for(;++r<n;)(i=+e[r])&&(o+=i);else for(;++r<n;)(i=+t(e[r],r,e))&&(o+=i);return o}function q5(e){if(!(o=e.length))return[];for(var t=-1,n=V5(e,HB),r=new Array(n);++t<n;)for(var i=-1,o,a=r[t]=new Array(o);++i<o;)a[i]=e[i][t];return r}function HB(e){return e.length}function UB(){return q5(arguments)}var rp=Array.prototype.slice;function jB(e){return e}var zc=1,Fc=2,P0=3,Ys=4,gy=1e-6;function WB(e){return"translate("+(e+.5)+",0)"}function VB(e){return"translate(0,"+(e+.5)+")"}function qB(e){return function(t){return+e(t)}}function GB(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function YB(){return!this.__axis}function zf(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=e===zc||e===Ys?-1:1,u=e===Ys||e===Fc?"x":"y",c=e===zc||e===P0?WB:VB;function f(d){var h=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):jB),g=Math.max(o,0)+s,b=t.range(),v=+b[0]+.5,x=+b[b.length-1]+.5,y=(t.bandwidth?GB:qB)(t.copy()),_=d.selection?d.selection():d,S=_.selectAll(".domain").data([null]),$=_.selectAll(".tick").data(h,t).order(),w=$.exit(),T=$.enter().append("g").attr("class","tick"),M=$.select("line"),P=$.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),$=$.merge(T),M=M.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",l*o)),P=P.merge(T.append("text").attr("fill","currentColor").attr(u,l*g).attr("dy",e===zc?"0em":e===P0?"0.71em":"0.32em")),d!==_&&(S=S.transition(d),$=$.transition(d),M=M.transition(d),P=P.transition(d),w=w.transition(d).attr("opacity",gy).attr("transform",function(R){return isFinite(R=y(R))?c(R):this.getAttribute("transform")}),T.attr("opacity",gy).attr("transform",function(R){var C=this.parentNode.__axis;return c(C&&isFinite(C=C(R))?C:y(R))})),w.remove(),S.attr("d",e===Ys||e==Fc?a?"M"+l*a+","+v+"H0.5V"+x+"H"+l*a:"M0.5,"+v+"V"+x:a?"M"+v+","+l*a+"V0.5H"+x+"V"+l*a:"M"+v+",0.5H"+x),$.attr("opacity",1).attr("transform",function(R){return c(y(R))}),M.attr(u+"2",l*o),P.attr(u,l*g).text(p),_.filter(YB).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Fc?"start":e===Ys?"end":"middle"),_.each(function(){this.__axis=y})}return f.scale=function(d){return arguments.length?(t=d,f):t},f.ticks=function(){return n=rp.call(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:rp.call(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(r=d==null?null:rp.call(d),f):r&&r.slice()},f.tickFormat=function(d){return arguments.length?(i=d,f):i},f.tickSize=function(d){return arguments.length?(o=a=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(a=+d,f):a},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f}function G5(e){return zf(zc,e)}function Ev(e){return zf(Fc,e)}function Y5(e){return zf(P0,e)}function X5(e){return zf(Ys,e)}var XB={value:function(){}};function ha(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ic(n)}function Ic(e){this._=e}function KB(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ic.prototype=ha.prototype={constructor:Ic,on:function(e,t){var n=this._,r=KB(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=ZB(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=vy(n[i],e.name,t);else if(t==null)for(i in n)n[i]=vy(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ic(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function ZB(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function vy(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=XB,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var R0="http://www.w3.org/1999/xhtml";const z0={svg:"http://www.w3.org/2000/svg",xhtml:R0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wu(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),z0.hasOwnProperty(t)?{space:z0[t],local:e}:e}function JB(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===R0&&t.documentElement.namespaceURI===R0?t.createElement(e):t.createElementNS(n,e)}}function QB(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ff(e){var t=wu(e);return(t.local?QB:JB)(t)}function eO(){}function If(e){return e==null?eO:function(){return this.querySelector(e)}}function tO(e){typeof e!="function"&&(e=If(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=e.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Rn(r,this._parents)}function nO(){return[]}function Av(e){return e==null?nO:function(){return this.querySelectorAll(e)}}function rO(e){typeof e!="function"&&(e=Av(e));for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new Rn(r,i)}function Pv(e){return function(){return this.matches(e)}}function iO(e){typeof e!="function"&&(e=Pv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Rn(r,this._parents)}function K5(e){return new Array(e.length)}function oO(){return new Rn(this._enter||this._groups.map(K5),this._parents)}function hd(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}hd.prototype={constructor:hd,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function aO(e){return function(){return e}}var by="$";function sO(e,t,n,r,i,o){for(var a=0,s,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new hd(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function lO(e,t,n,r,i,o,a){var s,l,u={},c=t.length,f=o.length,d=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(d[s]=h=by+a.call(l,l.__data__,s,t),h in u?i[s]=l:u[h]=l);for(s=0;s<f;++s)h=by+a.call(e,o[s],s,o),(l=u[h])?(r[s]=l,l.__data__=o[s],u[h]=null):n[s]=new hd(e,o[s]);for(s=0;s<c;++s)(l=t[s])&&u[d[s]]===l&&(i[s]=l)}function uO(e,t){if(!e)return h=new Array(this.size()),u=-1,this.each(function($){h[++u]=$}),h;var n=t?lO:sO,r=this._parents,i=this._groups;typeof e!="function"&&(e=aO(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],d=f.length,h=e.call(c,c&&c.__data__,u,r),p=h.length,g=s[u]=new Array(p),b=a[u]=new Array(p),v=l[u]=new Array(d);n(c,f,g,b,v,h,t);for(var x=0,y=0,_,S;x<p;++x)if(_=g[x]){for(x>=y&&(y=x+1);!(S=b[y])&&++y<p;);_._next=S||null}}return a=new Rn(a,r),a._enter=s,a._exit=l,a}function cO(){return new Rn(this._exit||this._groups.map(K5),this._parents)}function dO(e,t,n){var r=this.enter(),i=this,o=this.exit();return r=typeof e=="function"?e(r):r.append(e+""),t!=null&&(i=t(i)),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function fO(e){for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,f=a[s]=new Array(c),d,h=0;h<c;++h)(d=l[h]||u[h])&&(f[h]=d);for(;s<r;++s)a[s]=t[s];return new Rn(a,this._parents)}function hO(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function pO(e){e||(e=gO);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Rn(i,this._parents).order()}function gO(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function vO(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function bO(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function mO(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function yO(){var e=0;return this.each(function(){++e}),e}function _O(){return!this.node()}function xO(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function wO(e){return function(){this.removeAttribute(e)}}function CO(e){return function(){this.removeAttributeNS(e.space,e.local)}}function SO(e,t){return function(){this.setAttribute(e,t)}}function $O(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function MO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function TO(e,t){var n=wu(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?CO:wO:typeof t=="function"?n.local?MO:kO:n.local?$O:SO)(n,t))}function Rv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function EO(e){return function(){this.style.removeProperty(e)}}function AO(e,t,n){return function(){this.style.setProperty(e,t,n)}}function PO(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function RO(e,t,n){return arguments.length>1?this.each((t==null?EO:typeof t=="function"?PO:AO)(e,t,n??"")):Yo(this.node(),e)}function Yo(e,t){return e.style.getPropertyValue(t)||Rv(e).getComputedStyle(e,null).getPropertyValue(t)}function zO(e){return function(){delete this[e]}}function FO(e,t){return function(){this[e]=t}}function IO(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function BO(e,t){return arguments.length>1?this.each((t==null?zO:typeof t=="function"?IO:FO)(e,t)):this.node()[e]}function Z5(e){return e.trim().split(/^|\s+/)}function zv(e){return e.classList||new J5(e)}function J5(e){this._node=e,this._names=Z5(e.getAttribute("class")||"")}J5.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Q5(e,t){for(var n=zv(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function e8(e,t){for(var n=zv(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function OO(e){return function(){Q5(this,e)}}function NO(e){return function(){e8(this,e)}}function LO(e,t){return function(){(t.apply(this,arguments)?Q5:e8)(this,e)}}function DO(e,t){var n=Z5(e+"");if(arguments.length<2){for(var r=zv(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?LO:t?OO:NO)(n,t))}function HO(){this.textContent=""}function UO(e){return function(){this.textContent=e}}function jO(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function WO(e){return arguments.length?this.each(e==null?HO:(typeof e=="function"?jO:UO)(e)):this.node().textContent}function VO(){this.innerHTML=""}function qO(e){return function(){this.innerHTML=e}}function GO(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function YO(e){return arguments.length?this.each(e==null?VO:(typeof e=="function"?GO:qO)(e)):this.node().innerHTML}function XO(){this.nextSibling&&this.parentNode.appendChild(this)}function KO(){return this.each(XO)}function ZO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function JO(){return this.each(ZO)}function QO(e){var t=typeof e=="function"?e:Ff(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function eN(){return null}function tN(e,t){var n=typeof e=="function"?e:Ff(e),r=t==null?eN:typeof t=="function"?t:If(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function nN(){var e=this.parentNode;e&&e.removeChild(this)}function rN(){return this.each(nN)}function iN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oN(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function aN(e){return this.select(e?oN:iN)}function sN(e){return arguments.length?this.property("__data__",e):this.node().__data__}var t8={},Ce=null;if(typeof document<"u"){var lN=document.documentElement;"onmouseenter"in lN||(t8={mouseenter:"mouseover",mouseleave:"mouseout"})}function uN(e,t,n){return e=n8(e,t,n),function(r){var i=r.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,r)}}function n8(e,t,n){return function(r){var i=Ce;Ce=r;try{e.call(this,this.__data__,t,n)}finally{Ce=i}}}function cN(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function dN(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++r]=o;++r?t.length=r:delete this.__on}}}function fN(e,t,n){var r=t8.hasOwnProperty(e.type)?uN:n8;return function(i,o,a){var s=this.__on,l,u=r(t,o,a);if(s){for(var c=0,f=s.length;c<f;++c)if((l=s[c]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),l.value=t;return}}this.addEventListener(e.type,u,n),l={type:e.type,name:e.name,value:t,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function hN(e,t,n){var r=cN(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?fN:dN,n==null&&(n=!1),i=0;i<o;++i)this.each(s(r[i],t,n));return this}function ql(e,t,n,r){var i=Ce;e.sourceEvent=Ce,Ce=e;try{return t.apply(n,r)}finally{Ce=i}}function r8(e,t,n){var r=Rv(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function pN(e,t){return function(){return r8(this,e,t)}}function gN(e,t){return function(){return r8(this,e,t.apply(this,arguments))}}function vN(e,t){return this.each((typeof t=="function"?gN:pN)(e,t))}var Fv=[null];function Rn(e,t){this._groups=e,this._parents=t}function pa(){return new Rn([[document.documentElement]],Fv)}Rn.prototype=pa.prototype={constructor:Rn,select:tO,selectAll:rO,filter:iO,data:uO,enter:oO,exit:cO,join:dO,merge:fO,order:hO,sort:pO,call:vO,nodes:bO,node:mO,size:yO,empty:_O,each:xO,attr:TO,style:RO,property:BO,classed:DO,text:WO,html:YO,raise:KO,lower:JO,append:QO,insert:tN,remove:rN,clone:aN,datum:sN,on:hN,dispatch:vN};function Ue(e){return typeof e=="string"?new Rn([[document.querySelector(e)]],[document.documentElement]):new Rn([[e]],Fv)}function bN(e){return Ue(Ff(e).call(document.documentElement))}var mN=0;function i8(){return new F0}function F0(){this._="@"+(++mN).toString(36)}F0.prototype=i8.prototype={constructor:F0,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function Iv(){for(var e=Ce,t;t=e.sourceEvent;)e=t;return e}function Bf(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function lr(e){var t=Iv();return t.changedTouches&&(t=t.changedTouches[0]),Bf(e,t)}function o8(e){return typeof e=="string"?new Rn([document.querySelectorAll(e)],[document.documentElement]):new Rn([e??[]],Fv)}function Gl(e,t,n){arguments.length<3&&(n=t,t=Iv().changedTouches);for(var r=0,i=t?t.length:0,o;r<i;++r)if((o=t[r]).identifier===n)return Bf(e,o);return null}function yN(e,t){t==null&&(t=Iv().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n<r;++n)i[n]=Bf(e,t[n]);return i}function ip(){Ce.stopImmediatePropagation()}function Wa(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function Of(e){var t=e.document.documentElement,n=Ue(e).on("dragstart.drag",Wa,!0);"onselectstart"in t?n.on("selectstart.drag",Wa,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Nf(e,t){var n=e.document.documentElement,r=Ue(e).on("dragstart.drag",null);t&&(r.on("click.drag",Wa,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function sc(e){return function(){return e}}function I0(e,t,n,r,i,o,a,s,l,u){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=u}I0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function _N(){return!Ce.ctrlKey&&!Ce.button}function xN(){return this.parentNode}function wN(e){return e??{x:Ce.x,y:Ce.y}}function CN(){return navigator.maxTouchPoints||"ontouchstart"in this}function B0(){var e=_N,t=xN,n=wN,r=CN,i={},o=ha("start","drag","end"),a=0,s,l,u,c,f=0;function d(_){_.on("mousedown.drag",h).filter(r).on("touchstart.drag",b).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){if(!(c||!e.apply(this,arguments))){var _=y("mouse",t.apply(this,arguments),lr,this,arguments);_&&(Ue(Ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Of(Ce.view),ip(),u=!1,s=Ce.clientX,l=Ce.clientY,_("start"))}}function p(){if(Wa(),!u){var _=Ce.clientX-s,S=Ce.clientY-l;u=_*_+S*S>f}i.mouse("drag")}function g(){Ue(Ce.view).on("mousemove.drag mouseup.drag",null),Nf(Ce.view,u),Wa(),i.mouse("end")}function b(){if(e.apply(this,arguments)){var _=Ce.changedTouches,S=t.apply(this,arguments),$=_.length,w,T;for(w=0;w<$;++w)(T=y(_[w].identifier,S,Gl,this,arguments))&&(ip(),T("start"))}}function v(){var _=Ce.changedTouches,S=_.length,$,w;for($=0;$<S;++$)(w=i[_[$].identifier])&&(Wa(),w("drag"))}function x(){var _=Ce.changedTouches,S=_.length,$,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),$=0;$<S;++$)(w=i[_[$].identifier])&&(ip(),w("end"))}function y(_,S,$,w,T){var M=$(S,_),P,R,C,E=o.copy();if(ql(new I0(d,"beforestart",P,_,a,M[0],M[1],0,0,E),function(){return(Ce.subject=P=n.apply(w,T))==null?!1:(R=P.x-M[0]||0,C=P.y-M[1]||0,!0)}))return function F(z){var j=M,Z;switch(z){case"start":i[_]=F,Z=a++;break;case"end":delete i[_],--a;case"drag":M=$(S,_),Z=a;break}ql(new I0(d,z,P,_,Z,M[0]+R,M[1]+C,M[0]-j[0],M[1]-j[1],E),E.apply,E,[z,w,T])}}return d.filter=function(_){return arguments.length?(e=typeof _=="function"?_:sc(!!_),d):e},d.container=function(_){return arguments.length?(t=typeof _=="function"?_:sc(_),d):t},d.subject=function(_){return arguments.length?(n=typeof _=="function"?_:sc(_),d):n},d.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:sc(!!_),d):r},d.on=function(){var _=o.on.apply(o,arguments);return _===o?d:_},d.clickDistance=function(_){return arguments.length?(f=(_=+_)*_,d):Math.sqrt(f)},d}function ms(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fo(){}var Xo=.7,rs=1/Xo,Va="\\s*([+-]?\\d+)\\s*",Yl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SN=/^#([0-9a-f]{3,8})$/,$N=new RegExp("^rgb\\("+[Va,Va,Va]+"\\)$"),kN=new RegExp("^rgb\\("+[Wr,Wr,Wr]+"\\)$"),MN=new RegExp("^rgba\\("+[Va,Va,Va,Yl]+"\\)$"),TN=new RegExp("^rgba\\("+[Wr,Wr,Wr,Yl]+"\\)$"),EN=new RegExp("^hsl\\("+[Yl,Wr,Wr]+"\\)$"),AN=new RegExp("^hsla\\("+[Yl,Wr,Wr,Yl]+"\\)$"),my={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ms(fo,eo,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:yy,formatHex:yy,formatHsl:PN,formatRgb:_y,toString:_y});function yy(){return this.rgb().formatHex()}function PN(){return a8(this).formatHsl()}function _y(){return this.rgb().formatRgb()}function eo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?xy(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?lc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?lc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$N.exec(e))?new un(t[1],t[2],t[3],1):(t=kN.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=MN.exec(e))?lc(t[1],t[2],t[3],t[4]):(t=TN.exec(e))?lc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=EN.exec(e))?Sy(t[1],t[2]/100,t[3]/100,1):(t=AN.exec(e))?Sy(t[1],t[2]/100,t[3]/100,t[4]):my.hasOwnProperty(e)?xy(my[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function xy(e){return new un(e>>16&255,e>>8&255,e&255,1)}function lc(e,t,n,r){return r<=0&&(e=t=n=NaN),new un(e,t,n,r)}function Bv(e){return e instanceof fo||(e=eo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function is(e,t,n,r){return arguments.length===1?Bv(e):new un(e,t,n,r??1)}function un(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ms(un,is,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wy,formatHex:wy,formatRgb:Cy,toString:Cy}));function wy(){return"#"+op(this.r)+op(this.g)+op(this.b)}function Cy(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function op(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function Sy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ir(e,t,n,r)}function a8(e){if(e instanceof Ir)return new Ir(e.h,e.s,e.l,e.opacity);if(e instanceof fo||(e=eo(e)),!e)return new Ir;if(e instanceof Ir)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ir(a,s,l,e.opacity)}function pd(e,t,n,r){return arguments.length===1?a8(e):new Ir(e,t,n,r??1)}function Ir(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Ir,pd,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Ir(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Ir(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new un(ap(e>=240?e-240:e+120,i,r),ap(e,i,r),ap(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function ap(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var s8=Math.PI/180,l8=180/Math.PI,gd=18,u8=.96422,c8=1,d8=.82521,f8=4/29,qa=6/29,h8=3*qa*qa,RN=qa*qa*qa;function p8(e){if(e instanceof _r)return new _r(e.l,e.a,e.b,e.opacity);if(e instanceof Dr)return v8(e);e instanceof un||(e=Bv(e));var t=cp(e.r),n=cp(e.g),r=cp(e.b),i=sp((.2225045*t+.7168786*n+.0606169*r)/c8),o,a;return t===n&&n===r?o=a=i:(o=sp((.4360747*t+.3850649*n+.1430804*r)/u8),a=sp((.0139322*t+.0971045*n+.7141733*r)/d8)),new _r(116*i-16,500*(o-i),200*(i-a),e.opacity)}function zN(e,t){return new _r(e,0,0,t??1)}function vd(e,t,n,r){return arguments.length===1?p8(e):new _r(e,t,n,r??1)}function _r(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ms(_r,vd,Cu(fo,{brighter:function(e){return new _r(this.l+gd*(e??1),this.a,this.b,this.opacity)},darker:function(e){return new _r(this.l-gd*(e??1),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=u8*lp(t),e=c8*lp(e),n=d8*lp(n),new un(up(3.1338561*t-1.6168667*e-.4906146*n),up(-.9787684*t+1.9161415*e+.033454*n),up(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function sp(e){return e>RN?Math.pow(e,1/3):e/h8+f8}function lp(e){return e>qa?e*e*e:h8*(e-f8)}function up(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function cp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function g8(e){if(e instanceof Dr)return new Dr(e.h,e.c,e.l,e.opacity);if(e instanceof _r||(e=p8(e)),e.a===0&&e.b===0)return new Dr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*l8;return new Dr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function FN(e,t,n,r){return arguments.length===1?g8(e):new Dr(n,t,e,r??1)}function bd(e,t,n,r){return arguments.length===1?g8(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function v8(e){if(isNaN(e.h))return new _r(e.l,0,0,e.opacity);var t=e.h*s8;return new _r(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ms(Dr,bd,Cu(fo,{brighter:function(e){return new Dr(this.h,this.c,this.l+gd*(e??1),this.opacity)},darker:function(e){return new Dr(this.h,this.c,this.l-gd*(e??1),this.opacity)},rgb:function(){return v8(this).rgb()}}));var b8=-.14861,Ov=1.78277,Nv=-.29227,Lf=-.90649,Xl=1.97294,$y=Xl*Lf,ky=Xl*Ov,My=Ov*Nv-Lf*b8;function IN(e){if(e instanceof Ho)return new Ho(e.h,e.s,e.l,e.opacity);e instanceof un||(e=Bv(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(My*r+$y*t-ky*n)/(My+$y-ky),o=r-i,a=(Xl*(n-i)-Nv*o)/Lf,s=Math.sqrt(a*a+o*o)/(Xl*i*(1-i)),l=s?Math.atan2(a,o)*l8-120:NaN;return new Ho(l<0?l+360:l,s,i,e.opacity)}function $r(e,t,n,r){return arguments.length===1?IN(e):new Ho(e,t,n,r??1)}function Ho(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Ho,$r,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Ho(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Ho(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*s8,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new un(255*(t+n*(b8*r+Ov*i)),255*(t+n*(Nv*r+Lf*i)),255*(t+n*(Xl*r)),this.opacity)}}));function m8(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function y8(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return m8((n-r/t)*t,a,i,o,s)}}function _8(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return m8((n-r/t)*t,i,o,a,s)}}function Df(e){return function(){return e}}function x8(e,t){return function(n){return e+n*t}}function BN(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Hf(e,t){var n=t-e;return n?x8(e,n>180||n<-180?n-360*Math.round(n/360):n):Df(isNaN(e)?t:e)}function ON(e){return(e=+e)==1?tn:function(t,n){return n-t?BN(t,n,e):Df(isNaN(t)?n:t)}}function tn(e,t){var n=t-e;return n?x8(e,n):Df(isNaN(e)?t:e)}const Kl=function e(t){var n=ON(t);function r(i,o){var a=n((i=is(i)).r,(o=is(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=tn(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function w8(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=is(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=o(l),s+""}}}var C8=w8(y8),NN=w8(_8);function Lv(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function S8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function LN(e,t){return(S8(t)?Lv:$8)(e,t)}function $8(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=ys(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function k8(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function M8(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ys(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var O0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dp=new RegExp(O0.source,"g");function DN(e){return function(){return e}}function HN(e){return function(t){return e(t)+""}}function Dv(e,t){var n=O0.lastIndex=dp.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=O0.exec(e))&&(i=dp.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:or(r,i)})),n=dp.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?HN(l[0].x):DN(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function ys(e,t){var n=typeof t,r;return t==null||n==="boolean"?Df(t):(n==="number"?or:n==="string"?(r=eo(t))?(t=r,Kl):Dv:t instanceof eo?Kl:t instanceof Date?k8:S8(t)?Lv:Array.isArray(t)?$8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?M8:or)(e,t)}function UN(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function jN(e,t){var n=Hf(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function T8(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ty=180/Math.PI,N0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function E8(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ty,skewX:Math.atan(l)*Ty,scaleX:a,scaleY:s}}var zs,fp,Ey,uc;function WN(e){return e==="none"?N0:(zs||(zs=document.createElement("DIV"),fp=document.documentElement,Ey=document.defaultView),zs.style.transform=e,e=Ey.getComputedStyle(fp.appendChild(zs),null).getPropertyValue("transform"),fp.removeChild(zs),e=e.slice(7,-1).split(","),E8(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function VN(e){return e==null||(uc||(uc=document.createElementNS("http://www.w3.org/2000/svg","g")),uc.setAttribute("transform",e),!(e=uc.transform.baseVal.consolidate()))?N0:(e=e.matrix,E8(e.a,e.b,e.c,e.d,e.e,e.f))}function A8(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,f,d,h,p){if(u!==f||c!==d){var g=h.push("translate(",null,t,null,n);p.push({i:g-4,x:or(u,f)},{i:g-2,x:or(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function a(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,r)-2,x:or(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(u,c,f,d){u!==c?d.push({i:f.push(i(f)+"skewX(",null,r)-2,x:or(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function l(u,c,f,d,h,p){if(u!==f||c!==d){var g=h.push(i(h)+"scale(",null,",",null,")");p.push({i:g-4,x:or(u,f)},{i:g-2,x:or(c,d)})}else(f!==1||d!==1)&&h.push(i(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,d),a(u.rotate,c.rotate,f,d),s(u.skewX,c.skewX,f,d),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var p=-1,g=d.length,b;++p<g;)f[(b=d[p]).i]=b.x(h);return f.join("")}}}var P8=A8(WN,"px, ","px)","deg)"),R8=A8(VN,", ",")",")"),Fs=Math.SQRT2,hp=2,Ay=4,qN=1e-12;function Py(e){return((e=Math.exp(e))+1/e)/2}function GN(e){return((e=Math.exp(e))-1/e)/2}function YN(e){return((e=Math.exp(2*e))-1)/(e+1)}function z8(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-n,u=a-r,c=l*l+u*u,f,d;if(c<qN)d=Math.log(s/i)/Fs,f=function(x){return[n+x*l,r+x*u,i*Math.exp(Fs*x*d)]};else{var h=Math.sqrt(c),p=(s*s-i*i+Ay*c)/(2*i*hp*h),g=(s*s-i*i-Ay*c)/(2*s*hp*h),b=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);d=(v-b)/Fs,f=function(x){var y=x*d,_=Py(b),S=i/(hp*h)*(_*YN(Fs*y+b)-GN(b));return[n+S*l,r+S*u,i*_/Py(Fs*y+b)]}}return f.duration=d*1e3,f}function F8(e){return function(t,n){var r=e((t=pd(t)).h,(n=pd(n)).h),i=tn(t.s,n.s),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const XN=F8(Hf);var KN=F8(tn);function ZN(e,t){var n=tn((e=vd(e)).l,(t=vd(t)).l),r=tn(e.a,t.a),i=tn(e.b,t.b),o=tn(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function I8(e){return function(t,n){var r=e((t=bd(t)).h,(n=bd(n)).h),i=tn(t.c,n.c),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const JN=I8(Hf);var QN=I8(tn);function B8(e){return function t(n){n=+n;function r(i,o){var a=e((i=$r(i)).h,(o=$r(o)).h),s=tn(i.s,o.s),l=tn(i.l,o.l),u=tn(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=t,r}(1)}const eL=B8(Hf);var Uf=B8(tn);function tL(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function nL(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var os=0,Xs=0,Is=0,O8=1e3,md,Ks,yd=0,Ko=0,jf=0,Zl=typeof performance=="object"&&performance.now?performance:Date,N8=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _s(){return Ko||(N8(rL),Ko=Zl.now()+jf)}function rL(){Ko=0}function Jl(){this._call=this._time=this._next=null}Jl.prototype=Wf.prototype={constructor:Jl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_s():+n)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:md=this,Ks=this),this._call=e,this._time=n,L0()},stop:function(){this._call&&(this._call=null,this._time=1/0,L0())}};function Wf(e,t,n){var r=new Jl;return r.restart(e,t,n),r}function L8(){_s(),++os;for(var e=md,t;e;)(t=Ko-e._time)>=0&&e._call.call(null,t),e=e._next;--os}function Ry(){Ko=(yd=Zl.now())+jf,os=Xs=0;try{L8()}finally{os=0,oL(),Ko=0}}function iL(){var e=Zl.now(),t=e-yd;t>O8&&(jf-=t,yd=e)}function oL(){for(var e,t=md,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:md=n);Ks=e,L0(r)}function L0(e){if(!os){Xs&&(Xs=clearTimeout(Xs));var t=e-Ko;t>24?(e<1/0&&(Xs=setTimeout(Ry,e-Zl.now()-jf)),Is&&(Is=clearInterval(Is))):(Is||(yd=Zl.now(),Is=setInterval(iL,O8)),os=1,N8(Ry))}}function D0(e,t,n){var r=new Jl;return t=t==null?0:+t,r.restart(function(i){r.stop(),e(i+t)},t,n),r}function aL(e,t,n){var r=new Jl,i=t;return t==null?(r.restart(e,t,n),r):(t=+t,n=n==null?_s():+n,r.restart(function o(a){a+=i,r.restart(o,i+=t,n),e(a)},t,n),r)}var sL=ha("start","end","cancel","interrupt"),lL=[],D8=0,H0=1,U0=2,Bc=3,zy=4,j0=5,Oc=6;function Vf(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;uL(e,n,{name:t,index:r,group:i,on:sL,tween:lL,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:D8})}function Hv(e,t){var n=Mr(e,t);if(n.state>D8)throw new Error("too late; already scheduled");return n}function xi(e,t){var n=Mr(e,t);if(n.state>Bc)throw new Error("too late; already running");return n}function Mr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function uL(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Wf(o,0,n.time);function o(u){n.state=H0,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,d,h;if(n.state!==H0)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Bc)return D0(a);h.state===zy?(h.state=Oc,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=Oc,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(D0(function(){n.state===Bc&&(n.state=zy,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=U0,n.on.call("start",e,e.__data__,n.index,n.group),n.state===U0){for(n.state=Bc,i=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=h);i.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=j0,1),f=-1,d=i.length;++f<d;)i[f].call(e,c);n.state===j0&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Oc,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Uo(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>U0&&r.state<j0,r.state=Oc,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function cL(e){return this.each(function(){Uo(this,e)})}function dL(e,t){var n,r;return function(){var i=xi(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function fL(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=xi(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function hL(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Mr(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?dL:fL)(n,e,t))}function Uv(e,t,n){var r=e._id;return e.each(function(){var i=xi(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Mr(i,r).value[t]}}function H8(e,t){var n;return(typeof t=="number"?or:t instanceof eo?Kl:(n=eo(t))?(t=n,Kl):Dv)(e,t)}function pL(e){return function(){this.removeAttribute(e)}}function gL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function vL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function bL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function mL(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function yL(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function _L(e,t){var n=wu(e),r=n==="transform"?R8:H8;return this.attrTween(e,typeof t=="function"?(n.local?yL:mL)(n,r,Uv(this,"attr."+e,t)):t==null?(n.local?gL:pL)(n):(n.local?bL:vL)(n,r,t))}function xL(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wL(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function CL(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&wL(e,o)),n}return i._value=t,i}function SL(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&xL(e,o)),n}return i._value=t,i}function $L(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=wu(e);return this.tween(n,(r.local?CL:SL)(r,t))}function kL(e,t){return function(){Hv(this,e).delay=+t.apply(this,arguments)}}function ML(e,t){return t=+t,function(){Hv(this,e).delay=t}}function TL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?kL:ML)(t,e)):Mr(this.node(),t).delay}function EL(e,t){return function(){xi(this,e).duration=+t.apply(this,arguments)}}function AL(e,t){return t=+t,function(){xi(this,e).duration=t}}function PL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?EL:AL)(t,e)):Mr(this.node(),t).duration}function RL(e,t){if(typeof t!="function")throw new Error;return function(){xi(this,e).ease=t}}function zL(e){var t=this._id;return arguments.length?this.each(RL(t,e)):Mr(this.node(),t).ease}function FL(e){typeof e!="function"&&(e=Pv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Yr(r,this._parents,this._name,this._id)}function IL(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,f=a[s]=new Array(c),d,h=0;h<c;++h)(d=l[h]||u[h])&&(f[h]=d);for(;s<r;++s)a[s]=t[s];return new Yr(a,this._parents,this._name,this._id)}function BL(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function OL(e,t,n){var r,i,o=BL(t)?Hv:xi;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function NL(e,t){var n=this._id;return arguments.length<2?Mr(this.node(),n).on.on(e):this.each(OL(n,e,t))}function LL(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function DL(){return this.on("end.remove",LL(this._id))}function HL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=If(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,f,d=0;d<l;++d)(c=s[d])&&(f=e.call(c,c.__data__,d,s))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,Vf(u[d],t,n,d,u,Mr(c,n)));return new Yr(o,this._parents,t,n)}function UL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Av(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var d=e.call(c,c.__data__,f,l),h,p=Mr(c,n),g=0,b=d.length;g<b;++g)(h=d[g])&&Vf(h,t,n,g,d,p);o.push(d),a.push(c)}return new Yr(o,a,t,n)}var jL=pa.prototype.constructor;function WL(){return new jL(this._groups,this._parents)}function VL(e,t){var n,r,i;return function(){var o=Yo(this,e),a=(this.style.removeProperty(e),Yo(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function U8(e){return function(){this.style.removeProperty(e)}}function qL(e,t,n){var r,i=n+"",o;return function(){var a=Yo(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function GL(e,t,n){var r,i,o;return function(){var a=Yo(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Yo(this,e))),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}function YL(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var l=xi(this,e),u=l.on,c=l.value[o]==null?s||(s=U8(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function XL(e,t,n){var r=(e+="")=="transform"?P8:H8;return t==null?this.styleTween(e,VL(e,r)).on("end.style."+e,U8(e)):typeof t=="function"?this.styleTween(e,GL(e,r,Uv(this,"style."+e,t))).each(YL(this._id,e)):this.styleTween(e,qL(e,r,t),n).on("end.style."+e,null)}function KL(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function ZL(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&KL(e,a,n)),r}return o._value=t,o}function JL(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,ZL(e,t,n??""))}function QL(e){return function(){this.textContent=e}}function eD(e){return function(){var t=e(this);this.textContent=t??""}}function tD(e){return this.tween("text",typeof e=="function"?eD(Uv(this,"text",e)):QL(e==null?"":e+""))}function nD(e){return function(t){this.textContent=e.call(this,t)}}function rD(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&nD(i)),t}return r._value=e,r}function iD(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,rD(e))}function oD(){for(var e=this._name,t=this._id,n=W8(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Mr(l,t);Vf(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Yr(r,this._parents,e,n)}function aD(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=xi(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t})})}var sD=0;function Yr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function j8(e){return pa().transition(e)}function W8(){return++sD}var Ma=pa.prototype;Yr.prototype=j8.prototype={constructor:Yr,select:HL,selectAll:UL,filter:FL,merge:IL,selection:WL,transition:oD,call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:NL,attr:_L,attrTween:$L,style:XL,styleTween:JL,text:tD,textTween:iD,remove:DL,tween:hL,delay:TL,duration:PL,ease:zL,end:aD};function lD(e){return+e}function uD(e){return e*e}function cD(e){return e*(2-e)}function Fy(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function dD(e){return e*e*e}function fD(e){return--e*e*e+1}function W0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var jv=3,hD=function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n}(jv),pD=function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n}(jv),Iy=function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n}(jv),V8=Math.PI,q8=V8/2;function gD(e){return+e==1?1:1-Math.cos(e*q8)}function vD(e){return Math.sin(e*q8)}function By(e){return(1-Math.cos(V8*e))/2}function to(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function bD(e){return to(1-+e)}function mD(e){return 1-to(e)}function Oy(e){return((e*=2)<=1?to(1-e):2-to(e-1))/2}function yD(e){return 1-Math.sqrt(1-e*e)}function _D(e){return Math.sqrt(1- --e*e)}function Ny(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var V0=4/11,xD=6/11,wD=8/11,CD=3/4,SD=9/11,$D=10/11,kD=15/16,MD=21/22,TD=63/64,cc=1/V0/V0;function ED(e){return 1-Ql(1-e)}function Ql(e){return(e=+e)<V0?cc*e*e:e<wD?cc*(e-=xD)*e+CD:e<$D?cc*(e-=SD)*e+kD:cc*(e-=MD)*e+TD}function AD(e){return((e*=2)<=1?1-Ql(1-e):Ql(e-1)+1)/2}var Wv=1.70158,PD=function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n}(Wv),RD=function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n}(Wv),Ly=function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n}(Wv),as=2*Math.PI,Vv=1,qv=.3,zD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return t*to(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(Vv,qv),Dy=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return 1-t*to(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(Vv,qv),FD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return((o=o*2-1)<0?t*to(-o)*Math.sin((r-o)/n):2-t*to(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(Vv,qv),q0={time:null,delay:0,duration:250,ease:W0};function ID(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return q0.time=_s(),q0;return n}function BD(e){var t,n;e instanceof Yr?(t=e._id,e=e._name):(t=W8(),(n=q0).time=_s(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Vf(l,e,t,u,a,n||ID(l,t));return new Yr(r,this._parents,e,t)}pa.prototype.interrupt=cL;pa.prototype.transition=BD;var OD=[null];function ND(e,t){var n=e.__transition,r,i;if(n){t=t==null?null:t+"";for(i in n)if((r=n[i]).state>H0&&r.name===t)return new Yr([[e]],OD,t,+i)}return null}function pp(e){return function(){return e}}function LD(e,t,n){this.target=e,this.type=t,this.selection=n}function Hy(){Ce.stopImmediatePropagation()}function gp(){Ce.preventDefault(),Ce.stopImmediatePropagation()}var Uy={},vp={name:"space"},Ta={name:"handle"},Ea={name:"center"};function jy(e){return[+e[0],+e[1]]}function G0(e){return[jy(e[0]),jy(e[1])]}function DD(e){return function(t){return Gl(t,Ce.touches,e)}}var Nc={name:"x",handles:["w","e"].map(eu),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Lc={name:"y",handles:["n","s"].map(eu),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},HD={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(eu),input:function(e){return e==null?null:G0(e)},output:function(e){return e}},ti={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Wy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Vy={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},UD={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},jD={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function eu(e){return{type:e}}function WD(){return!Ce.ctrlKey&&!Ce.button}function VD(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function qD(){return navigator.maxTouchPoints||"ontouchstart"in this}function bp(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function GD(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function YD(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function XD(){return Gv(Nc)}function KD(){return Gv(Lc)}function ZD(){return Gv(HD)}function Gv(e){var t=VD,n=WD,r=qD,i=!0,o=ha("start","brush","end"),a=6,s;function l(b){var v=b.property("__brush",g).selectAll(".overlay").data([eu("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ti.overlay).merge(v).each(function(){var y=bp(this).extent;Ue(this).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1])}),b.selectAll(".selection").data([eu("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ti.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=b.selectAll(".handle").data(e.handles,function(y){return y.type});x.exit().remove(),x.enter().append("rect").attr("class",function(y){return"handle handle--"+y.type}).attr("cursor",function(y){return ti[y.type]}),b.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(b,v){b.selection?b.on("start.brush",function(){c(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){c(this,arguments).end()}).tween("brush",function(){var x=this,y=x.__brush,_=c(x,arguments),S=y.selection,$=e.input(typeof v=="function"?v.apply(this,arguments):v,y.extent),w=ys(S,$);function T(M){y.selection=M===1&&$===null?null:w(M),u.call(x),_.brush()}return S!==null&&$!==null?T:T(1)}):b.each(function(){var x=this,y=arguments,_=x.__brush,S=e.input(typeof v=="function"?v.apply(x,y):v,_.extent),$=c(x,y).beforestart();Uo(x),_.selection=S===null?null:S,u.call(x),$.start().brush().end()})},l.clear=function(b){l.move(b,null)};function u(){var b=Ue(this),v=bp(this).selection;v?(b.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),b.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?v[1][1]-v[0][1]+a:a})):b.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(b,v,x){var y=b.__brush.emitter;return y&&(!x||!y.clean)?y:new f(b,v,x)}function f(b,v,x){this.that=b,this.args=v,this.state=b.__brush,this.active=0,this.clean=x}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(b){ql(new LD(l,b,e.output(this.state.selection)),o.apply,o,[b,this.that,this.args])}};function d(){if(s&&!Ce.touches||!n.apply(this,arguments))return;var b=this,v=Ce.target.__data__.type,x=(i&&Ce.metaKey?v="overlay":v)==="selection"?Uy:i&&Ce.altKey?Ea:Ta,y=e===Lc?null:UD[v],_=e===Nc?null:jD[v],S=bp(b),$=S.extent,w=S.selection,T=$[0][0],M,P,R=$[0][1],C,E,F=$[1][0],z,j,Z=$[1][1],J,ie,he=0,_e=0,oe,ve=y&&_&&i&&Ce.shiftKey,we,Oe,xe=Ce.touches?DD(Ce.changedTouches[0].identifier):lr,Xe=xe(b),Ve=Xe,de=c(b,arguments,!0).beforestart();v==="overlay"?(w&&(oe=!0),S.selection=w=[[M=e===Lc?T:Xe[0],C=e===Nc?R:Xe[1]],[z=e===Lc?F:M,J=e===Nc?Z:C]]):(M=w[0][0],C=w[0][1],z=w[1][0],J=w[1][1]),P=M,E=C,j=z,ie=J;var Ee=Ue(b).attr("pointer-events","none"),Pe=Ee.selectAll(".overlay").attr("cursor",ti[v]);if(Ce.touches)de.moved=H,de.ended=fe;else{var A=Ue(Ce.view).on("mousemove.brush",H,!0).on("mouseup.brush",fe,!0);i&&A.on("keydown.brush",le,!0).on("keyup.brush",q,!0),Of(Ce.view)}Hy(),Uo(b),u.call(b),de.start();function H(){var N=xe(b);ve&&!we&&!Oe&&(Math.abs(N[0]-Ve[0])>Math.abs(N[1]-Ve[1])?Oe=!0:we=!0),Ve=N,oe=!0,gp(),Y()}function Y(){var N;switch(he=Ve[0]-Xe[0],_e=Ve[1]-Xe[1],x){case vp:case Uy:{y&&(he=Math.max(T-M,Math.min(F-z,he)),P=M+he,j=z+he),_&&(_e=Math.max(R-C,Math.min(Z-J,_e)),E=C+_e,ie=J+_e);break}case Ta:{y<0?(he=Math.max(T-M,Math.min(F-M,he)),P=M+he,j=z):y>0&&(he=Math.max(T-z,Math.min(F-z,he)),P=M,j=z+he),_<0?(_e=Math.max(R-C,Math.min(Z-C,_e)),E=C+_e,ie=J):_>0&&(_e=Math.max(R-J,Math.min(Z-J,_e)),E=C,ie=J+_e);break}case Ea:{y&&(P=Math.max(T,Math.min(F,M-he*y)),j=Math.max(T,Math.min(F,z+he*y))),_&&(E=Math.max(R,Math.min(Z,C-_e*_)),ie=Math.max(R,Math.min(Z,J+_e*_)));break}}j<P&&(y*=-1,N=M,M=z,z=N,N=P,P=j,j=N,v in Wy&&Pe.attr("cursor",ti[v=Wy[v]])),ie<E&&(_*=-1,N=C,C=J,J=N,N=E,E=ie,ie=N,v in Vy&&Pe.attr("cursor",ti[v=Vy[v]])),S.selection&&(w=S.selection),we&&(P=w[0][0],j=w[1][0]),Oe&&(E=w[0][1],ie=w[1][1]),(w[0][0]!==P||w[0][1]!==E||w[1][0]!==j||w[1][1]!==ie)&&(S.selection=[[P,E],[j,ie]],u.call(b),de.brush())}function fe(){if(Hy(),Ce.touches){if(Ce.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Nf(Ce.view,oe),A.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Ee.attr("pointer-events","all"),Pe.attr("cursor",ti.overlay),S.selection&&(w=S.selection),GD(w)&&(S.selection=null,u.call(b)),de.end()}function le(){switch(Ce.keyCode){case 16:{ve=y&&_;break}case 18:{x===Ta&&(y&&(z=j-he*y,M=P+he*y),_&&(J=ie-_e*_,C=E+_e*_),x=Ea,Y());break}case 32:{(x===Ta||x===Ea)&&(y<0?z=j-he:y>0&&(M=P-he),_<0?J=ie-_e:_>0&&(C=E-_e),x=vp,Pe.attr("cursor",ti.selection),Y());break}default:return}gp()}function q(){switch(Ce.keyCode){case 16:{ve&&(we=Oe=ve=!1,Y());break}case 18:{x===Ea&&(y<0?z=j:y>0&&(M=P),_<0?J=ie:_>0&&(C=E),x=Ta,Y());break}case 32:{x===vp&&(Ce.altKey?(y&&(z=j-he*y,M=P+he*y),_&&(J=ie-_e*_,C=E+_e*_),x=Ea):(y<0?z=j:y>0&&(M=P),_<0?J=ie:_>0&&(C=E),x=Ta),Pe.attr("cursor",ti[v]),Y());break}default:return}gp()}}function h(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var b=this.__brush||{selection:null};return b.extent=G0(t.apply(this,arguments)),b.dim=e,b}return l.extent=function(b){return arguments.length?(t=typeof b=="function"?b:pp(G0(b)),l):t},l.filter=function(b){return arguments.length?(n=typeof b=="function"?b:pp(!!b),l):n},l.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:pp(!!b),l):r},l.handleSize=function(b){return arguments.length?(a=+b,l):a},l.keyModifiers=function(b){return arguments.length?(i=!!b,l):i},l.on=function(){var b=o.on.apply(o,arguments);return b===o?l:b},l}var qy=Math.cos,Gy=Math.sin,G8=Math.PI,dc=G8/2,Yy=G8*2,Xy=Math.max;function JD(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}function QD(){var e=0,t=null,n=null,r=null;function i(o){var a=o.length,s=[],l=Jn(a),u=[],c=[],f=c.groups=new Array(a),d=new Array(a*a),h,p,g,b,v,x;for(h=0,v=-1;++v<a;){for(p=0,x=-1;++x<a;)p+=o[v][x];s.push(p),u.push(Jn(a)),h+=p}for(t&&l.sort(function(P,R){return t(s[P],s[R])}),n&&u.forEach(function(P,R){P.sort(function(C,E){return n(o[R][C],o[R][E])})}),h=Xy(0,Yy-e*a)/h,b=h?e:Yy/a,p=0,v=-1;++v<a;){for(g=p,x=-1;++x<a;){var y=l[v],_=u[y][x],S=o[y][_],$=p,w=p+=S*h;d[_*a+y]={index:y,subindex:_,startAngle:$,endAngle:w,value:S}}f[y]={index:y,startAngle:g,endAngle:p,value:s[y]},p+=b}for(v=-1;++v<a;)for(x=v-1;++x<a;){var T=d[x*a+v],M=d[v*a+x];(T.value||M.value)&&c.push(T.value<M.value?{source:M,target:T}:{source:T,target:M})}return r?c.sort(r):c}return i.padAngle=function(o){return arguments.length?(e=Xy(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(n=o,i):n},i.sortChords=function(o){return arguments.length?(o==null?r=null:(r=JD(o))._=o,i):r&&r._},i}var eH=Array.prototype.slice;function mp(e){return function(){return e}}var Y0=Math.PI,X0=2*Y0,ko=1e-6,tH=X0-ko;function K0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ho(){return new K0}K0.prototype=ho.prototype={constructor:K0,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,u=o-e,c=a-t,f=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>ko)if(!(Math.abs(c*s-l*u)>ko)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var d=n-o,h=r-a,p=s*s+l*l,g=d*d+h*h,b=Math.sqrt(p),v=Math.sqrt(f),x=i*Math.tan((Y0-Math.acos((p+f-g)/(2*b*v)))/2),y=x/v,_=x/b;Math.abs(y-1)>ko&&(this._+="L"+(e+y*u)+","+(t+y*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*h)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,u=t+s,c=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>ko||Math.abs(this._y1-u)>ko)&&(this._+="L"+l+","+u),n&&(f<0&&(f=f%X0+X0),f>tH?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):f>ko&&(this._+="A"+n+","+n+",0,"+ +(f>=Y0)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function nH(e){return e.source}function rH(e){return e.target}function iH(e){return e.radius}function oH(e){return e.startAngle}function aH(e){return e.endAngle}function sH(){var e=nH,t=rH,n=iH,r=oH,i=aH,o=null;function a(){var s,l=eH.call(arguments),u=e.apply(this,l),c=t.apply(this,l),f=+n.apply(this,(l[0]=u,l)),d=r.apply(this,l)-dc,h=i.apply(this,l)-dc,p=f*qy(d),g=f*Gy(d),b=+n.apply(this,(l[0]=c,l)),v=r.apply(this,l)-dc,x=i.apply(this,l)-dc;if(o||(o=s=ho()),o.moveTo(p,g),o.arc(0,0,f,d,h),(d!==v||h!==x)&&(o.quadraticCurveTo(0,0,b*qy(v),b*Gy(v)),o.arc(0,0,b,v,x)),o.quadraticCurveTo(0,0,p,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(n=typeof s=="function"?s:mp(+s),a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:mp(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:mp(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s??null,a):o},a}var rr="$";function _d(){}_d.prototype=hi.prototype={constructor:_d,has:function(e){return rr+e in this},get:function(e){return this[rr+e]},set:function(e,t){return this[rr+e]=t,this},remove:function(e){var t=rr+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===rr&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===rr&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===rr&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===rr&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===rr&&++e;return e},empty:function(){for(var e in this)if(e[0]===rr)return!1;return!0},each:function(e){for(var t in this)t[0]===rr&&e(this[t],t.slice(1),this)}};function hi(e,t){var n=new _d;if(e instanceof _d)e.each(function(s,l){n.set(l,s)});else if(Array.isArray(e)){var r=-1,i=e.length,o;if(t==null)for(;++r<i;)n.set(r,e[r]);else for(;++r<i;)n.set(t(o=e[r],r,e),o)}else if(e)for(var a in e)n.set(a,e[a]);return n}function lH(){var e=[],t=[],n,r,i;function o(s,l,u,c){if(l>=e.length)return n!=null&&s.sort(n),r!=null?r(s):s;for(var f=-1,d=s.length,h=e[l++],p,g,b=hi(),v,x=u();++f<d;)(v=b.get(p=h(g=s[f])+""))?v.push(g):b.set(p,[g]);return b.each(function(y,_){c(x,_,o(y,l,u,c))}),x}function a(s,l){if(++l>e.length)return s;var u,c=t[l-1];return r!=null&&l>=e.length?u=s.entries():(u=[],s.each(function(f,d){u.push({key:d,values:a(f,l)})})),c!=null?u.sort(function(f,d){return c(f.key,d.key)}):u}return i={object:function(s){return o(s,0,uH,cH)},map:function(s){return o(s,0,Ky,Zy)},entries:function(s){return a(o(s,0,Ky,Zy),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return n=s,i},rollup:function(s){return r=s,i}}}function uH(){return{}}function cH(e,t,n){e[t]=n}function Ky(){return hi()}function Zy(e,t,n){e.set(t,n)}function xd(){}var So=hi.prototype;xd.prototype=Y8.prototype={constructor:xd,has:So.has,add:function(e){return e+="",this[rr+e]=e,this},remove:So.remove,clear:So.clear,values:So.keys,size:So.size,empty:So.empty,each:So.each};function Y8(e,t){var n=new xd;if(e instanceof xd)e.each(function(o){n.add(o)});else if(e){var r=-1,i=e.length;if(t==null)for(;++r<i;)n.add(e[r]);else for(;++r<i;)n.add(t(e[r],r,e))}return n}function dH(e){var t=[];for(var n in e)t.push(n);return t}function fH(e){var t=[];for(var n in e)t.push(e[n]);return t}function hH(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t}var pH=Array.prototype,X8=pH.slice;function gH(e,t){return e-t}function vH(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}function Ri(e){return function(){return e}}function bH(e,t){for(var n=-1,r=t.length,i;++n<r;)if(i=mH(e,t[n]))return i;return 0}function mH(e,t){for(var n=t[0],r=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],u=l[0],c=l[1],f=e[s],d=f[0],h=f[1];if(yH(l,f,t))return 0;c>r!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(i=-i)}return i}function yH(e,t,n){var r;return _H(e,t,n)&&xH(e[r=+(e[0]===t[0])],n[r],t[r])}function _H(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function xH(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function wH(){}var ni=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function K8(){var e=1,t=1,n=Mv,r=l;function i(u){var c=n(u);if(Array.isArray(c))c=c.slice().sort(gH);else{var f=qo(u),d=f[0],h=f[1];c=Go(d,h,c),c=Jn(Math.floor(d/c)*c,Math.floor(h/c)*c,c)}return c.map(function(p){return o(u,p)})}function o(u,c){var f=[],d=[];return a(u,c,function(h){r(h,u,c),vH(h)>0?f.push([h]):d.push(h)}),d.forEach(function(h){for(var p=0,g=f.length,b;p<g;++p)if(bH((b=f[p])[0],h)!==-1){b.push(h);return}}),{type:"MultiPolygon",value:c,coordinates:f}}function a(u,c,f){var d=new Array,h=new Array,p,g,b,v,x,y;for(p=g=-1,v=u[0]>=c,ni[v<<1].forEach(_);++p<e-1;)b=v,v=u[p+1]>=c,ni[b|v<<1].forEach(_);for(ni[v<<0].forEach(_);++g<t-1;){for(p=-1,v=u[g*e+e]>=c,x=u[g*e]>=c,ni[v<<1|x<<2].forEach(_);++p<e-1;)b=v,v=u[g*e+e+p+1]>=c,y=x,x=u[g*e+p+1]>=c,ni[b|v<<1|x<<2|y<<3].forEach(_);ni[v|x<<3].forEach(_)}for(p=-1,x=u[g*e]>=c,ni[x<<2].forEach(_);++p<e-1;)y=x,x=u[g*e+p+1]>=c,ni[x<<2|y<<3].forEach(_);ni[x<<3].forEach(_);function _(S){var $=[S[0][0]+p,S[0][1]+g],w=[S[1][0]+p,S[1][1]+g],T=s($),M=s(w),P,R;(P=h[T])?(R=d[M])?(delete h[P.end],delete d[R.start],P===R?(P.ring.push(w),f(P.ring)):d[P.start]=h[R.end]={start:P.start,end:R.end,ring:P.ring.concat(R.ring)}):(delete h[P.end],P.ring.push(w),h[P.end=M]=P):(P=d[M])?(R=h[T])?(delete d[P.start],delete h[R.end],P===R?(P.ring.push(w),f(P.ring)):d[R.start]=h[P.end]={start:R.start,end:P.end,ring:R.ring.concat(P.ring)}):(delete d[P.start],P.ring.unshift($),d[P.start=T]=P):d[T]=h[M]={start:T,end:M,ring:[$,w]}}}function s(u){return u[0]*2+u[1]*(e+1)*4}function l(u,c,f){u.forEach(function(d){var h=d[0],p=d[1],g=h|0,b=p|0,v,x=c[b*e+g];h>0&&h<e&&g===h&&(v=c[b*e+g-1],d[0]=h+(f-v)/(x-v)-.5),p>0&&p<t&&b===p&&(v=c[(b-1)*e+g],d[1]=p+(f-v)/(x-v)-.5)})}return i.contour=o,i.size=function(u){if(!arguments.length)return[e,t];var c=Math.ceil(u[0]),f=Math.ceil(u[1]);if(!(c>0)||!(f>0))throw new Error("invalid size");return e=c,t=f,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?Ri(X8.call(u)):Ri(u),i):n},i.smooth=function(u){return arguments.length?(r=u?l:wH,i):r===l},i}function yp(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<i;++a)for(var s=0,l=0;s<r+n;++s)s<r&&(l+=e.data[s+a*r]),s>=n&&(s>=o&&(l-=e.data[s-o+a*r]),t.data[s-n+a*r]=l/Math.min(s+1,r-1+o-s,o))}function _p(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<r;++a)for(var s=0,l=0;s<i+n;++s)s<i&&(l+=e.data[a+s*r]),s>=n&&(s>=o&&(l-=e.data[a+(s-o)*r]),t.data[a+(s-n)*r]=l/Math.min(s+1,i-1+o-s,o))}function CH(e){return e[0]}function SH(e){return e[1]}function $H(){return 1}function kH(){var e=CH,t=SH,n=$H,r=960,i=500,o=20,a=2,s=o*3,l=r+s*2>>a,u=i+s*2>>a,c=Ri(20);function f(v){var x=new Float32Array(l*u),y=new Float32Array(l*u);v.forEach(function($,w,T){var M=+e($,w,T)+s>>a,P=+t($,w,T)+s>>a,R=+n($,w,T);M>=0&&M<l&&P>=0&&P<u&&(x[M+P*l]+=R)}),yp({width:l,height:u,data:x},{data:y},o>>a),_p({width:l,height:u,data:y},{data:x},o>>a),yp({width:l,height:u,data:x},{data:y},o>>a),_p({width:l,height:u,data:y},{data:x},o>>a),yp({width:l,height:u,data:x},{data:y},o>>a),_p({width:l,height:u,data:y},{data:x},o>>a);var _=c(x);if(!Array.isArray(_)){var S=W5(x);_=Go(0,S,_),_=Jn(0,Math.floor(S/_)*_,_),_.shift()}return K8().thresholds(_).size([l,u])(x).map(d)}function d(v){return v.value*=Math.pow(2,-2*a),v.coordinates.forEach(h),v}function h(v){v.forEach(p)}function p(v){v.forEach(g)}function g(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function b(){return s=o*3,l=r+s*2>>a,u=i+s*2>>a,f}return f.x=function(v){return arguments.length?(e=typeof v=="function"?v:Ri(+v),f):e},f.y=function(v){return arguments.length?(t=typeof v=="function"?v:Ri(+v),f):t},f.weight=function(v){return arguments.length?(n=typeof v=="function"?v:Ri(+v),f):n},f.size=function(v){if(!arguments.length)return[r,i];var x=Math.ceil(v[0]),y=Math.ceil(v[1]);if(!(x>=0)&&!(x>=0))throw new Error("invalid size");return r=x,i=y,b()},f.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),b()},f.thresholds=function(v){return arguments.length?(c=typeof v=="function"?v:Array.isArray(v)?Ri(X8.call(v)):Ri(v),f):c},f.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*v*v+1)-1)/2),b()},f}var Jy={},xp={},wp=34,Bs=10,Cp=13;function Z8(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function MH(e,t){var n=Z8(e);return function(r,i){return t(n(r),i,e)}}function Qy(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Dn(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function TH(e){return e<0?"-"+Dn(-e,6):e>9999?"+"+Dn(e,6):Dn(e,4)}function EH(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":TH(e.getUTCFullYear())+"-"+Dn(e.getUTCMonth()+1,2)+"-"+Dn(e.getUTCDate(),2)+(i?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"."+Dn(i,3)+"Z":r?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"Z":n||t?"T"+Dn(t,2)+":"+Dn(n,2)+"Z":"")}function qf(e){var t=new RegExp('["'+e+`
|
|
1997
|
-
\r]`),n=e.charCodeAt(0);function r(f
|
|
1998
|
-
`)}function s(f
|
|
1999
|
-
`)}function l(
|
|
2000
|
-
`)}function u(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?EH(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:u,formatValue:c}}var ga=qf(","),J8=ga.parse,AH=ga.parseRows,PH=ga.format,RH=ga.formatBody,zH=ga.formatRows,FH=ga.formatRow,IH=ga.formatValue,va=qf(" "),Q8=va.parse,BH=va.parseRows,OH=va.format,NH=va.formatBody,LH=va.formatRows,DH=va.formatRow,HH=va.formatValue;function UH(e){for(var t in e){var n=e[t].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))jH&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;e[t]=n}return e}var jH=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function WH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function VH(e,t){return fetch(e,t).then(WH)}function qH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function GH(e,t){return fetch(e,t).then(qH)}function YH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Gf(e,t){return fetch(e,t).then(YH)}function e3(e){return function(t,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gf(t,n).then(function(i){return e(i,r)})}}function XH(e,t,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=qf(e);return Gf(t,n).then(function(o){return i.parse(o,r)})}var KH=e3(J8),ZH=e3(Q8);function JH(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function QH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function eU(e,t){return fetch(e,t).then(QH)}function Yv(e){return function(t,n){return Gf(t,n).then(function(r){return new DOMParser().parseFromString(r,e)})}}const tU=Yv("application/xml");var nU=Yv("text/html"),rU=Yv("image/svg+xml");function iU(e,t){var n;e==null&&(e=0),t==null&&(t=0);function r(){var i,o=n.length,a,s=0,l=0;for(i=0;i<o;++i)a=n[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=n[i],a.x-=s,a.y-=l}return r.initialize=function(i){n=i},r.x=function(i){return arguments.length?(e=+i,r):e},r.y=function(i){return arguments.length?(t=+i,r):t},r}function Jt(e){return function(){return e}}function Ni(){return(Math.random()-.5)*1e-6}function oU(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return t3(this.cover(t,n),t,n,e)}function t3(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,c=e._y1,f,d,h,p,g,b,v,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(f=(s+u)/2))?s=f:u=f,(b=n>=(d=(l+c)/2))?l=d:c=d,i=o,!(o=o[v=b<<1|g]))return i[v]=a,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&n===p)return a.next=o,i?i[v]=a:e._root=a,e;do i=i?i[v]=new Array(4):e._root=new Array(4),(g=t>=(f=(s+u)/2))?s=f:u=f,(b=n>=(d=(l+c)/2))?l=d:c=d;while((v=b<<1|g)===(x=(p>=d)<<1|h>=f));return i[x]=o,i[v]=a,e}function aU(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<l&&(l=i),i>c&&(c=i),o<u&&(u=o),o>f&&(f=o));if(l>c||u>f)return this;for(this.cover(l,u).cover(c,f),n=0;n<r;++n)t3(this,a[n],s[n],e[n]);return this}function sU(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function lU(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function uU(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function An(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function cU(e,t,n){var r,i=this._x0,o=this._y0,a,s,l,u,c=this._x1,f=this._y1,d=[],h=this._root,p,g;for(h&&d.push(new An(h,i,o,c,f)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,f=t+n,n*=n);p=d.pop();)if(!(!(h=p.node)||(a=p.x0)>c||(s=p.y0)>f||(l=p.x1)<i||(u=p.y1)<o))if(h.length){var b=(a+l)/2,v=(s+u)/2;d.push(new An(h[3],b,v,l,u),new An(h[2],a,v,b,u),new An(h[1],b,s,l,v),new An(h[0],a,s,b,v)),(g=(t>=v)<<1|e>=b)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=p)}else{var x=e-+this._x.call(null,h.data),y=t-+this._y.call(null,h.data),_=x*x+y*y;if(_<n){var S=Math.sqrt(n=_);i=e-S,o=t-S,c=e+S,f=t+S,r=h.data}}return r}function dU(e){if(isNaN(c=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,c,f,d,h,p,g,b,v;if(!n)return this;if(n.length)for(;;){if((p=c>=(d=(a+l)/2))?a=d:l=d,(g=f>=(h=(s+u)/2))?s=h:u=h,t=n,!(n=n[b=g<<1|p]))return this;if(!n.length)break;(t[b+1&3]||t[b+2&3]||t[b+3&3])&&(r=t,v=b)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[b]=o:delete t[b],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[v]=n:this._root=n),this):(this._root=o,this)}function fU(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function hU(){return this._root}function pU(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function gU(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new An(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,c=(a+l)/2;(i=r[3])&&t.push(new An(i,u,c,s,l)),(i=r[2])&&t.push(new An(i,o,c,u,l)),(i=r[1])&&t.push(new An(i,u,a,s,c)),(i=r[0])&&t.push(new An(i,o,a,u,c))}return this}function vU(e){var t=[],n=[],r;for(this._root&&t.push(new An(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,f=(s+u)/2;(o=i[0])&&t.push(new An(o,a,s,c,f)),(o=i[1])&&t.push(new An(o,c,s,l,f)),(o=i[2])&&t.push(new An(o,a,f,c,u)),(o=i[3])&&t.push(new An(o,c,f,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function bU(e){return e[0]}function mU(e){return arguments.length?(this._x=e,this):this._x}function yU(e){return e[1]}function _U(e){return arguments.length?(this._y=e,this):this._y}function Yf(e,t,n){var r=new Xv(t??bU,n??yU,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Xv(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function e_(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var On=Yf.prototype=Xv.prototype;On.copy=function(){var e=new Xv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=e_(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=e_(r));return e};On.add=oU;On.addAll=aU;On.cover=sU;On.data=lU;On.extent=uU;On.find=cU;On.remove=dU;On.removeAll=fU;On.root=hU;On.size=pU;On.visit=gU;On.visitAfter=vU;On.x=mU;On.y=_U;function xU(e){return e.x+e.vx}function wU(e){return e.y+e.vy}function CU(e){var t,n,r=1,i=1;typeof e!="function"&&(e=Jt(e==null?1:+e));function o(){for(var l,u=t.length,c,f,d,h,p,g,b=0;b<i;++b)for(c=Yf(t,xU,wU).visitAfter(a),l=0;l<u;++l)f=t[l],p=n[f.index],g=p*p,d=f.x+f.vx,h=f.y+f.vy,c.visit(v);function v(x,y,_,S,$){var w=x.data,T=x.r,M=p+T;if(w){if(w.index>f.index){var P=d-w.x-w.vx,R=h-w.y-w.vy,C=P*P+R*R;C<M*M&&(P===0&&(P=Ni(),C+=P*P),R===0&&(R=Ni(),C+=R*R),C=(M-(C=Math.sqrt(C)))/C*r,f.vx+=(P*=C)*(M=(T*=T)/(g+T)),f.vy+=(R*=C)*M,w.vx-=P*(M=1-M),w.vy-=R*M)}return}return y>d+M||S<d-M||_>h+M||$<h-M}}function a(l){if(l.data)return l.r=n[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function s(){if(t){var l,u=t.length,c;for(n=new Array(u),l=0;l<u;++l)c=t[l],n[c.index]=+e(c,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(r=+l,o):r},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Jt(+l),s(),o):e},o}function SU(e){return e.index}function t_(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function $U(e){var t=SU,n=c,r,i=Jt(30),o,a,s,l,u=1;e==null&&(e=[]);function c(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function f(g){for(var b=0,v=e.length;b<u;++b)for(var x=0,y,_,S,$,w,T,M;x<v;++x)y=e[x],_=y.source,S=y.target,$=S.x+S.vx-_.x-_.vx||Ni(),w=S.y+S.vy-_.y-_.vy||Ni(),T=Math.sqrt($*$+w*w),T=(T-o[x])/T*g*r[x],$*=T,w*=T,S.vx-=$*(M=l[x]),S.vy-=w*M,_.vx+=$*(M=1-M),_.vy+=w*M}function d(){if(a){var g,b=a.length,v=e.length,x=hi(a,t),y;for(g=0,s=new Array(b);g<v;++g)y=e[g],y.index=g,typeof y.source!="object"&&(y.source=t_(x,y.source)),typeof y.target!="object"&&(y.target=t_(x,y.target)),s[y.source.index]=(s[y.source.index]||0)+1,s[y.target.index]=(s[y.target.index]||0)+1;for(g=0,l=new Array(v);g<v;++g)y=e[g],l[g]=s[y.source.index]/(s[y.source.index]+s[y.target.index]);r=new Array(v),h(),o=new Array(v),p()}}function h(){if(a)for(var g=0,b=e.length;g<b;++g)r[g]=+n(e[g],g,e)}function p(){if(a)for(var g=0,b=e.length;g<b;++g)o[g]=+i(e[g],g,e)}return f.initialize=function(g){a=g,d()},f.links=function(g){return arguments.length?(e=g,d(),f):e},f.id=function(g){return arguments.length?(t=g,f):t},f.iterations=function(g){return arguments.length?(u=+g,f):u},f.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Jt(+g),h(),f):n},f.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Jt(+g),p(),f):i},f}function kU(e){return e.x}function MU(e){return e.y}var TU=10,EU=Math.PI*(3-Math.sqrt(5));function AU(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=hi(),l=Wf(c),u=ha("tick","end");e==null&&(e=[]);function c(){f(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function f(p){var g,b=e.length,v;p===void 0&&(p=1);for(var x=0;x<p;++x)for(n+=(o-n)*i,s.each(function(y){y(n)}),g=0;g<b;++g)v=e[g],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return t}function d(){for(var p=0,g=e.length,b;p<g;++p){if(b=e[p],b.index=p,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var v=TU*Math.sqrt(p),x=p*EU;b.x=v*Math.cos(x),b.y=v*Math.sin(x)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function h(p){return p.initialize&&p.initialize(e),p}return d(),t={tick:f,restart:function(){return l.restart(c),t},stop:function(){return l.stop(),t},nodes:function(p){return arguments.length?(e=p,d(),s.each(h),t):e},alpha:function(p){return arguments.length?(n=+p,t):n},alphaMin:function(p){return arguments.length?(r=+p,t):r},alphaDecay:function(p){return arguments.length?(i=+p,t):+i},alphaTarget:function(p){return arguments.length?(o=+p,t):o},velocityDecay:function(p){return arguments.length?(a=1-p,t):1-a},force:function(p,g){return arguments.length>1?(g==null?s.remove(p):s.set(p,h(g)),t):s.get(p)},find:function(p,g,b){var v=0,x=e.length,y,_,S,$,w;for(b==null?b=1/0:b*=b,v=0;v<x;++v)$=e[v],y=p-$.x,_=g-$.y,S=y*y+_*_,S<b&&(w=$,b=S);return w},on:function(p,g){return arguments.length>1?(u.on(p,g),t):u.on(p)}}}function PU(){var e,t,n,r=Jt(-30),i,o=1,a=1/0,s=.81;function l(d){var h,p=e.length,g=Yf(e,kU,MU).visitAfter(c);for(n=d,h=0;h<p;++h)t=e[h],g.visit(f)}function u(){if(e){var d,h=e.length,p;for(i=new Array(h),d=0;d<h;++d)p=e[d],i[p.index]=+r(p,d,e)}}function c(d){var h=0,p,g,b=0,v,x,y;if(d.length){for(v=x=y=0;y<4;++y)(p=d[y])&&(g=Math.abs(p.value))&&(h+=p.value,b+=g,v+=g*p.x,x+=g*p.y);d.x=v/b,d.y=x/b}else{p=d,p.x=p.data.x,p.y=p.data.y;do h+=i[p.data.index];while(p=p.next)}d.value=h}function f(d,h,p,g){if(!d.value)return!0;var b=d.x-t.x,v=d.y-t.y,x=g-h,y=b*b+v*v;if(x*x/s<y)return y<a&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)),t.vx+=b*d.value*n/y,t.vy+=v*d.value*n/y),!0;if(d.length||y>=a)return;(d.data!==t||d.next)&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)));do d.data!==t&&(x=i[d.data.index]*n/y,t.vx+=b*x,t.vy+=v*x);while(d=d.next)}return l.initialize=function(d){e=d,u()},l.strength=function(d){return arguments.length?(r=typeof d=="function"?d:Jt(+d),u(),l):r},l.distanceMin=function(d){return arguments.length?(o=d*d,l):Math.sqrt(o)},l.distanceMax=function(d){return arguments.length?(a=d*d,l):Math.sqrt(a)},l.theta=function(d){return arguments.length?(s=d*d,l):Math.sqrt(s)},l}function RU(e,t,n){var r,i=Jt(.1),o,a;typeof e!="function"&&(e=Jt(+e)),t==null&&(t=0),n==null&&(n=0);function s(u){for(var c=0,f=r.length;c<f;++c){var d=r[c],h=d.x-t||1e-6,p=d.y-n||1e-6,g=Math.sqrt(h*h+p*p),b=(a[c]-g)*o[c]*u/g;d.vx+=h*b,d.vy+=p*b}}function l(){if(r){var u,c=r.length;for(o=new Array(c),a=new Array(c),u=0;u<c;++u)a[u]=+e(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,l()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Jt(+u),l(),s):i},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Jt(+u),l(),s):e},s.x=function(u){return arguments.length?(t=+u,s):t},s.y=function(u){return arguments.length?(n=+u,s):n},s}function zU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(i[l]-c.x)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function FU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(i[l]-c.y)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function IU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function wd(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ss(e){return e=wd(Math.abs(e)),e?e[1]:NaN}function BU(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function OU(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var NU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tu(e){if(!(t=NU.exec(e)))throw new Error("invalid format: "+e);var t;return new Xf({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}tu.prototype=Xf.prototype;function Xf(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Xf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function LU(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var n3;function DU(e,t){var n=wd(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(n3=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+wd(e,Math.max(0,t+o-1))[0]}function n_(e,t){var n=wd(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const r_={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:IU,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return n_(e*100,t)},r:n_,s:DU,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function i_(e){return e}var o_=Array.prototype.map,a_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function r3(e){var t=e.grouping===void 0||e.thousands===void 0?i_:BU(o_.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?i_:OU(o_.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=tu(f);var d=f.fill,h=f.align,p=f.sign,g=f.symbol,b=f.zero,v=f.width,x=f.comma,y=f.precision,_=f.trim,S=f.type;S==="n"?(x=!0,S="g"):r_[S]||(y===void 0&&(y=12),_=!0,S="g"),(b||d==="0"&&h==="=")&&(b=!0,d="0",h="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",w=g==="$"?r:/[%p]/.test(S)?a:"",T=r_[S],M=/[defgprs%]/.test(S);y=y===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function P(R){var C=$,E=w,F,z,j;if(S==="c")E=T(R)+E,R="";else{R=+R;var Z=R<0||1/R<0;if(R=isNaN(R)?l:T(Math.abs(R),y),_&&(R=LU(R)),Z&&+R==0&&p!=="+"&&(Z=!1),C=(Z?p==="("?p:s:p==="-"||p==="("?"":p)+C,E=(S==="s"?a_[8+n3/3]:"")+E+(Z&&p==="("?")":""),M){for(F=-1,z=R.length;++F<z;)if(j=R.charCodeAt(F),48>j||j>57){E=(j===46?i+R.slice(F+1):R.slice(F))+E,R=R.slice(0,F);break}}}x&&!b&&(R=t(R,1/0));var J=C.length+R.length+E.length,ie=J<v?new Array(v-J+1).join(d):"";switch(x&&b&&(R=t(ie+R,ie.length?v-E.length:1/0),ie=""),h){case"<":R=C+R+E+ie;break;case"=":R=C+ie+R+E;break;case"^":R=ie.slice(0,J=ie.length>>1)+C+R+E+ie.slice(J);break;default:R=ie+C+R+E;break}return o(R)}return P.toString=function(){return f+""},P}function c(f,d){var h=u((f=tu(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(ss(d)/3)))*3,g=Math.pow(10,-p),b=a_[8+p/3];return function(v){return h(g*v)+b}}return{format:u,formatPrefix:c}}var fc,Kf,Kv;i3({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function i3(e){return fc=r3(e),Kf=fc.format,Kv=fc.formatPrefix,fc}function o3(e){return Math.max(0,-ss(Math.abs(e)))}function a3(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ss(t)/3)))*3-ss(Math.abs(e)))}function s3(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ss(t)-ss(e))+1}function po(){return new Cd}function Cd(){this.reset()}Cd.prototype={constructor:Cd,reset:function(){this.s=this.t=0},add:function(e){s_(hc,e,this.t),s_(this,hc.s,this.s),this.s?this.t+=hc.t:this.s=hc.t},valueOf:function(){return this.s}};var hc=new Cd;function s_(e,t,n){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}var Qe=1e-6,Sd=1e-12,ct=Math.PI,jt=ct/2,$d=ct/4,zn=ct*2,Et=180/ct,Ze=ct/180,bt=Math.abs,xs=Math.atan,Fn=Math.atan2,je=Math.cos,pc=Math.ceil,l3=Math.exp,kd=Math.log,Sp=Math.pow,Ie=Math.sin,ur=Math.sign||function(e){return e>0?1:e<0?-1:0},Kt=Math.sqrt,Zv=Math.tan;function u3(e){return e>1?0:e<-1?ct:Math.acos(e)}function In(e){return e>1?jt:e<-1?-jt:Math.asin(e)}function l_(e){return(e=Ie(e/2))*e}function Nt(){}function Md(e,t){e&&c_.hasOwnProperty(e.type)&&c_[e.type](e,t)}var u_={Feature:function(e,t){Md(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Md(n[r].geometry,t)}},c_={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Z0(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Z0(n[r],t,0)},Polygon:function(e,t){d_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)d_(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Md(n[r],t)}};function Z0(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function d_(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Z0(e[n],t,1);t.polygonEnd()}function br(e,t){e&&u_.hasOwnProperty(e.type)?u_[e.type](e,t):Md(e,t)}var Td=po(),Ed=po(),c3,d3,J0,Q0,eg,Xr={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){Td.reset(),Xr.lineStart=HU,Xr.lineEnd=UU},polygonEnd:function(){var e=+Td;Ed.add(e<0?zn+e:e),this.lineStart=this.lineEnd=this.point=Nt},sphere:function(){Ed.add(zn)}};function HU(){Xr.point=jU}function UU(){f3(c3,d3)}function jU(e,t){Xr.point=f3,c3=e,d3=t,e*=Ze,t*=Ze,J0=e,Q0=je(t=t/2+$d),eg=Ie(t)}function f3(e,t){e*=Ze,t*=Ze,t=t/2+$d;var n=e-J0,r=n>=0?1:-1,i=r*n,o=je(t),a=Ie(t),s=eg*a,l=Q0*o+s*je(i),u=s*r*Ie(i);Td.add(Fn(u,l)),J0=e,Q0=o,eg=a}function WU(e){return Ed.reset(),br(e,Xr),Ed*2}function Ad(e){return[Fn(e[1],e[0]),In(e[2])]}function Zo(e){var t=e[0],n=e[1],r=je(n);return[r*je(t),r*Ie(t),Ie(n)]}function gc(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ls(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function $p(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function vc(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Pd(e){var t=Kt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ot,Un,Dt,qn,Mo,h3,p3,Ga,Cl=po(),zi,pi,ai={point:tg,lineStart:f_,lineEnd:h_,polygonStart:function(){ai.point=v3,ai.lineStart=VU,ai.lineEnd=qU,Cl.reset(),Xr.polygonStart()},polygonEnd:function(){Xr.polygonEnd(),ai.point=tg,ai.lineStart=f_,ai.lineEnd=h_,Td<0?(Ot=-(Dt=180),Un=-(qn=90)):Cl>Qe?qn=90:Cl<-1e-6&&(Un=-90),pi[0]=Ot,pi[1]=Dt},sphere:function(){Ot=-(Dt=180),Un=-(qn=90)}};function tg(e,t){zi.push(pi=[Ot=e,Dt=e]),t<Un&&(Un=t),t>qn&&(qn=t)}function g3(e,t){var n=Zo([e*Ze,t*Ze]);if(Ga){var r=ls(Ga,n),i=[r[1],-r[0],0],o=ls(i,r);Pd(o),o=Ad(o);var a=e-Mo,s=a>0?1:-1,l=o[0]*Et*s,u,c=bt(a)>180;c^(s*Mo<l&&l<s*e)?(u=o[1]*Et,u>qn&&(qn=u)):(l=(l+360)%360-180,c^(s*Mo<l&&l<s*e)?(u=-o[1]*Et,u<Un&&(Un=u)):(t<Un&&(Un=t),t>qn&&(qn=t))),c?e<Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e):Dt>=Ot?(e<Ot&&(Ot=e),e>Dt&&(Dt=e)):e>Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e)}else zi.push(pi=[Ot=e,Dt=e]);t<Un&&(Un=t),t>qn&&(qn=t),Ga=n,Mo=e}function f_(){ai.point=g3}function h_(){pi[0]=Ot,pi[1]=Dt,ai.point=tg,Ga=null}function v3(e,t){if(Ga){var n=e-Mo;Cl.add(bt(n)>180?n+(n>0?360:-360):n)}else h3=e,p3=t;Xr.point(e,t),g3(e,t)}function VU(){Xr.lineStart()}function qU(){v3(h3,p3),Xr.lineEnd(),bt(Cl)>Qe&&(Ot=-(Dt=180)),pi[0]=Ot,pi[1]=Dt,Ga=null}function Vn(e,t){return(t-=e)<0?t+360:t}function GU(e,t){return e[0]-t[0]}function p_(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function YU(e){var t,n,r,i,o,a,s;if(qn=Dt=-(Ot=Un=1/0),zi=[],br(e,ai),n=zi.length){for(zi.sort(GU),t=1,r=zi[0],o=[r];t<n;++t)i=zi[t],p_(r,i[0])||p_(r,i[1])?(Vn(r[0],i[1])>Vn(r[0],r[1])&&(r[1]=i[1]),Vn(i[0],r[1])>Vn(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,t=0,r=o[n];t<=n;r=i,++t)i=o[t],(s=Vn(r[1],i[0]))>a&&(a=s,Ot=i[0],Dt=r[1])}return zi=pi=null,Ot===1/0||Un===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ot,Un],[Dt,qn]]}var Zs,Rd,zd,Fd,Id,Bd,Od,Nd,ng,rg,ig,b3,m3,Mn,Tn,En,yr={sphere:Nt,point:Jv,lineStart:g_,lineEnd:v_,polygonStart:function(){yr.lineStart=ZU,yr.lineEnd=JU},polygonEnd:function(){yr.lineStart=g_,yr.lineEnd=v_}};function Jv(e,t){e*=Ze,t*=Ze;var n=je(t);Su(n*je(e),n*Ie(e),Ie(t))}function Su(e,t,n){++Zs,zd+=(e-zd)/Zs,Fd+=(t-Fd)/Zs,Id+=(n-Id)/Zs}function g_(){yr.point=XU}function XU(e,t){e*=Ze,t*=Ze;var n=je(t);Mn=n*je(e),Tn=n*Ie(e),En=Ie(t),yr.point=KU,Su(Mn,Tn,En)}function KU(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Ie(e),o=Ie(t),a=Fn(Kt((a=Tn*o-En*i)*a+(a=En*r-Mn*o)*a+(a=Mn*i-Tn*r)*a),Mn*r+Tn*i+En*o);Rd+=a,Bd+=a*(Mn+(Mn=r)),Od+=a*(Tn+(Tn=i)),Nd+=a*(En+(En=o)),Su(Mn,Tn,En)}function v_(){yr.point=Jv}function ZU(){yr.point=QU}function JU(){y3(b3,m3),yr.point=Jv}function QU(e,t){b3=e,m3=t,e*=Ze,t*=Ze,yr.point=y3;var n=je(t);Mn=n*je(e),Tn=n*Ie(e),En=Ie(t),Su(Mn,Tn,En)}function y3(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Ie(e),o=Ie(t),a=Tn*o-En*i,s=En*r-Mn*o,l=Mn*i-Tn*r,u=Kt(a*a+s*s+l*l),c=In(u),f=u&&-c/u;ng+=f*a,rg+=f*s,ig+=f*l,Rd+=c,Bd+=c*(Mn+(Mn=r)),Od+=c*(Tn+(Tn=i)),Nd+=c*(En+(En=o)),Su(Mn,Tn,En)}function ej(e){Zs=Rd=zd=Fd=Id=Bd=Od=Nd=ng=rg=ig=0,br(e,yr);var t=ng,n=rg,r=ig,i=t*t+n*n+r*r;return i<Sd&&(t=Bd,n=Od,r=Nd,Rd<Qe&&(t=zd,n=Fd,r=Id),i=t*t+n*n+r*r,i<Sd)?[NaN,NaN]:[Fn(n,t)*Et,In(r/Kt(i))*Et]}function Aa(e){return function(){return e}}function og(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function ag(e,t){return[bt(e)>ct?e+Math.round(-e/zn)*zn:e,t]}ag.invert=ag;function Qv(e,t,n){return(e%=zn)?t||n?og(m_(e),y_(t,n)):m_(e):t||n?y_(t,n):ag}function b_(e){return function(t,n){return t+=e,[t>ct?t-zn:t<-ct?t+zn:t,n]}}function m_(e){var t=b_(e);return t.invert=b_(-e),t}function y_(e,t){var n=je(e),r=Ie(e),i=je(t),o=Ie(t);function a(s,l){var u=je(l),c=je(s)*u,f=Ie(s)*u,d=Ie(l),h=d*n+c*r;return[Fn(f*i-h*o,c*n-d*r),In(h*i+f*o)]}return a.invert=function(s,l){var u=je(l),c=je(s)*u,f=Ie(s)*u,d=Ie(l),h=d*i-f*o;return[Fn(f*i+d*o,c*n+h*r),In(h*n-c*r)]},a}function _3(e){e=Qv(e[0]*Ze,e[1]*Ze,e.length>2?e[2]*Ze:0);function t(n){return n=e(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n}return t.invert=function(n){return n=e.invert(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n},t}function x3(e,t,n,r,i,o){if(n){var a=je(t),s=Ie(t),l=r*n;i==null?(i=t+r*zn,o=t-l/2):(i=__(a,i),o=__(a,o),(r>0?i<o:i>o)&&(i+=r*zn));for(var u,c=i;r>0?c>o:c<o;c-=l)u=Ad([a,-s*je(c),-s*Ie(c)]),e.point(u[0],u[1])}}function __(e,t){t=Zo(t),t[0]-=e,Pd(t);var n=u3(-t[1]);return((-t[2]<0?-n:n)+zn-Qe)%zn}function tj(){var e=Aa([0,0]),t=Aa(90),n=Aa(6),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=Et,l[1]*=Et}function s(){var l=e.apply(this,arguments),u=t.apply(this,arguments)*Ze,c=n.apply(this,arguments)*Ze;return r=[],i=Qv(-l[0]*Ze,-l[1]*Ze,0).invert,x3(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:Aa([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Aa(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:Aa(+l),s):n},s}function w3(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Nt,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Dc(e,t){return bt(e[0]-t[0])<Qe&&bt(e[1]-t[1])<Qe}function bc(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function C3(e,t,n,r,i){var o=[],a=[],s,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,b=p[0],v=p[g],x;if(Dc(b,v)){if(!b[2]&&!v[2]){for(i.lineStart(),s=0;s<g;++s)i.point((b=p[s])[0],b[1]);i.lineEnd();return}v[0]+=2*Qe}o.push(x=new bc(b,p,null,!0)),a.push(x.o=new bc(b,null,x,!1)),o.push(x=new bc(v,p,null,!1)),a.push(x.o=new bc(v,null,x,!0))}}),!!o.length){for(a.sort(t),x_(o),x_(a),s=0,l=a.length;s<l;++s)a[s].e=n=!n;for(var u=o[0],c,f;;){for(var d=u,h=!0;d.v;)if((d=d.n)===u)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(s=0,l=c.length;s<l;++s)i.point((f=c[s])[0],f[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(h)for(c=d.p.z,s=c.length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,h=!h}while(!d.v);i.lineEnd()}}}function x_(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}var kp=po();function Mp(e){return bt(e[0])<=ct?e[0]:ur(e[0])*((bt(e[0])+ct)%zn-ct)}function S3(e,t){var n=Mp(t),r=t[1],i=Ie(r),o=[Ie(n),-je(n),0],a=0,s=0;kp.reset(),i===1?r=jt+Qe:i===-1&&(r=-jt-Qe);for(var l=0,u=e.length;l<u;++l)if(f=(c=e[l]).length)for(var c,f,d=c[f-1],h=Mp(d),p=d[1]/2+$d,g=Ie(p),b=je(p),v=0;v<f;++v,h=y,g=S,b=$,d=x){var x=c[v],y=Mp(x),_=x[1]/2+$d,S=Ie(_),$=je(_),w=y-h,T=w>=0?1:-1,M=T*w,P=M>ct,R=g*S;if(kp.add(Fn(R*T*Ie(M),b*$+R*je(M))),a+=P?w+T*zn:w,P^h>=n^y>=n){var C=ls(Zo(d),Zo(x));Pd(C);var E=ls(o,C);Pd(E);var F=(P^w>=0?-1:1)*In(E[2]);(r>F||r===F&&(C[0]||C[1]))&&(s+=P^w>=0?1:-1)}}return(a<-1e-6||a<Qe&&kp<-1e-6)^s&1}function $3(e,t,n,r){return function(i){var o=t(i),a=w3(),s=t(a),l=!1,u,c,f,d={point:h,lineStart:g,lineEnd:b,polygonStart:function(){d.point=v,d.lineStart=x,d.lineEnd=y,c=[],u=[]},polygonEnd:function(){d.point=h,d.lineStart=g,d.lineEnd=b,c=Tv(c);var _=S3(u,r);c.length?(l||(i.polygonStart(),l=!0),C3(c,rj,_,n,i)):_&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(_,S){e(_,S)&&i.point(_,S)}function p(_,S){o.point(_,S)}function g(){d.point=p,o.lineStart()}function b(){d.point=h,o.lineEnd()}function v(_,S){f.push([_,S]),s.point(_,S)}function x(){s.lineStart(),f=[]}function y(){v(f[0][0],f[0][1]),s.lineEnd();var _=s.clean(),S=a.result(),$,w=S.length,T,M,P;if(f.pop(),u.push(f),f=null,!!w){if(_&1){if(M=S[0],(T=M.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),$=0;$<T;++$)i.point((P=M[$])[0],P[1]);i.lineEnd()}return}w>1&&_&2&&S.push(S.pop().concat(S.shift())),c.push(S.filter(nj))}}return d}}function nj(e){return e.length>1}function rj(e,t){return((e=e.x)[0]<0?e[1]-jt-Qe:jt-e[1])-((t=t.x)[0]<0?t[1]-jt-Qe:jt-t[1])}const sg=$3(function(){return!0},ij,aj,[-ct,-jt]);function ij(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?ct:-ct,l=bt(o-t);bt(l-ct)<Qe?(e.point(t,n=(n+a)/2>0?jt:-jt),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),i=0):r!==s&&l>=ct&&(bt(t-r)<Qe&&(t-=r*Qe),bt(o-s)<Qe&&(o-=s*Qe),n=oj(t,n,o,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=o,n=a),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function oj(e,t,n,r){var i,o,a=Ie(e-n);return bt(a)>Qe?xs((Ie(t)*(o=je(r))*Ie(n)-Ie(r)*(i=je(t))*Ie(e))/(i*o*a)):(t+r)/2}function aj(e,t,n,r){var i;if(e==null)i=n*jt,r.point(-ct,i),r.point(0,i),r.point(ct,i),r.point(ct,0),r.point(ct,-i),r.point(0,-i),r.point(-ct,-i),r.point(-ct,0),r.point(-ct,i);else if(bt(e[0]-t[0])>Qe){var o=e[0]<t[0]?ct:-ct;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function k3(e){var t=je(e),n=6*Ze,r=t>0,i=bt(t)>Qe;function o(c,f,d,h){x3(h,e,n,d,c,f)}function a(c,f){return je(c)*je(f)>t}function s(c){var f,d,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(b,v){var x=[b,v],y,_=a(b,v),S=r?_?0:u(b,v):_?u(b+(b<0?ct:-ct),v):0;if(!f&&(p=h=_)&&c.lineStart(),_!==h&&(y=l(f,x),(!y||Dc(f,y)||Dc(x,y))&&(x[2]=1)),_!==h)g=0,_?(c.lineStart(),y=l(x,f),c.point(y[0],y[1])):(y=l(f,x),c.point(y[0],y[1],2),c.lineEnd()),f=y;else if(i&&f&&r^_){var $;!(S&d)&&($=l(x,f,!0))&&(g=0,r?(c.lineStart(),c.point($[0][0],$[0][1]),c.point($[1][0],$[1][1]),c.lineEnd()):(c.point($[1][0],$[1][1]),c.lineEnd(),c.lineStart(),c.point($[0][0],$[0][1],3)))}_&&(!f||!Dc(f,x))&&c.point(x[0],x[1]),f=x,h=_,d=S},lineEnd:function(){h&&c.lineEnd(),f=null},clean:function(){return g|(p&&h)<<1}}}function l(c,f,d){var h=Zo(c),p=Zo(f),g=[1,0,0],b=ls(h,p),v=gc(b,b),x=b[0],y=v-x*x;if(!y)return!d&&c;var _=t*v/y,S=-t*x/y,$=ls(g,b),w=vc(g,_),T=vc(b,S);$p(w,T);var M=$,P=gc(w,M),R=gc(M,M),C=P*P-R*(gc(w,w)-1);if(!(C<0)){var E=Kt(C),F=vc(M,(-P-E)/R);if($p(F,w),F=Ad(F),!d)return F;var z=c[0],j=f[0],Z=c[1],J=f[1],ie;j<z&&(ie=z,z=j,j=ie);var he=j-z,_e=bt(he-ct)<Qe,oe=_e||he<Qe;if(!_e&&J<Z&&(ie=Z,Z=J,J=ie),oe?_e?Z+J>0^F[1]<(bt(F[0]-z)<Qe?Z:J):Z<=F[1]&&F[1]<=J:he>ct^(z<=F[0]&&F[0]<=j)){var ve=vc(M,(-P+E)/R);return $p(ve,w),[F,Ad(ve)]}}}function u(c,f){var d=r?e:ct-e,h=0;return c<-d?h|=1:c>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return $3(a,s,o,r?[0,-e]:[-ct,e-ct])}function sj(e,t,n,r,i,o){var a=e[0],s=e[1],l=t[0],u=t[1],c=0,f=1,d=l-a,h=u-s,p;if(p=n-a,!(!d&&p>0)){if(p/=d,d<0){if(p<c)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>c&&(c=p)}if(p=i-a,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>c&&(c=p)}else if(d>0){if(p<c)return;p<f&&(f=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<c)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>c&&(c=p)}if(p=o-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>c&&(c=p)}else if(h>0){if(p<c)return;p<f&&(f=p)}return c>0&&(e[0]=a+c*d,e[1]=s+c*h),f<1&&(t[0]=a+f*d,t[1]=s+f*h),!0}}}}}var mc=1e9,yc=-1e9;function Zf(e,t,n,r){function i(u,c){return e<=u&&u<=n&&t<=c&&c<=r}function o(u,c,f,d){var h=0,p=0;if(u==null||(h=a(u,f))!==(p=a(c,f))||l(u,c)<0^f>0)do d.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+f+4)%4)!==p);else d.point(c[0],c[1])}function a(u,c){return bt(u[0]-e)<Qe?c>0?0:3:bt(u[0]-n)<Qe?c>0?2:1:bt(u[1]-t)<Qe?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var f=a(u,1),d=a(c,1);return f!==d?f-d:f===0?c[1]-u[1]:f===1?u[0]-c[0]:f===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,f=w3(),d,h,p,g,b,v,x,y,_,S,$,w={point:T,lineStart:C,lineEnd:E,polygonStart:P,polygonEnd:R};function T(z,j){i(z,j)&&c.point(z,j)}function M(){for(var z=0,j=0,Z=h.length;j<Z;++j)for(var J=h[j],ie=1,he=J.length,_e=J[0],oe,ve,we=_e[0],Oe=_e[1];ie<he;++ie)oe=we,ve=Oe,_e=J[ie],we=_e[0],Oe=_e[1],ve<=r?Oe>r&&(we-oe)*(r-ve)>(Oe-ve)*(e-oe)&&++z:Oe<=r&&(we-oe)*(r-ve)<(Oe-ve)*(e-oe)&&--z;return z}function P(){c=f,d=[],h=[],$=!0}function R(){var z=M(),j=$&&z,Z=(d=Tv(d)).length;(j||Z)&&(u.polygonStart(),j&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),Z&&C3(d,s,z,o,u),u.polygonEnd()),c=u,d=h=p=null}function C(){w.point=F,h&&h.push(p=[]),S=!0,_=!1,x=y=NaN}function E(){d&&(F(g,b),v&&_&&f.rejoin(),d.push(f.result())),w.point=T,_&&c.lineEnd()}function F(z,j){var Z=i(z,j);if(h&&p.push([z,j]),S)g=z,b=j,v=Z,S=!1,Z&&(c.lineStart(),c.point(z,j));else if(Z&&_)c.point(z,j);else{var J=[x=Math.max(yc,Math.min(mc,x)),y=Math.max(yc,Math.min(mc,y))],ie=[z=Math.max(yc,Math.min(mc,z)),j=Math.max(yc,Math.min(mc,j))];sj(J,ie,e,t,n,r)?(_||(c.lineStart(),c.point(J[0],J[1])),c.point(ie[0],ie[1]),Z||c.lineEnd(),$=!1):Z&&(c.lineStart(),c.point(z,j),$=!1)}x=z,y=j,_=Z}return w}}function lj(){var e=0,t=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Zf(e,t,n,r)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[e,t],[n,r]]}}}var lg=po(),ug,Hc,Uc,us={sphere:Nt,point:Nt,lineStart:uj,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt};function uj(){us.point=dj,us.lineEnd=cj}function cj(){us.point=us.lineEnd=Nt}function dj(e,t){e*=Ze,t*=Ze,ug=e,Hc=Ie(t),Uc=je(t),us.point=fj}function fj(e,t){e*=Ze,t*=Ze;var n=Ie(t),r=je(t),i=bt(e-ug),o=je(i),a=Ie(i),s=r*a,l=Uc*n-Hc*r*o,u=Hc*n+Uc*r*o;lg.add(Fn(Kt(s*s+l*l),u)),ug=e,Hc=n,Uc=r}function M3(e){return lg.reset(),br(e,us),+lg}var cg=[null,null],hj={type:"LineString",coordinates:cg};function Ld(e,t){return cg[0]=e,cg[1]=t,M3(hj)}var w_={Feature:function(e,t){return Dd(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Dd(n[r].geometry,t))return!0;return!1}},C_={Sphere:function(){return!0},Point:function(e,t){return S_(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(S_(n[r],t))return!0;return!1},LineString:function(e,t){return $_(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if($_(n[r],t))return!0;return!1},Polygon:function(e,t){return k_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(k_(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Dd(n[r],t))return!0;return!1}};function Dd(e,t){return e&&C_.hasOwnProperty(e.type)?C_[e.type](e,t):!1}function S_(e,t){return Ld(e,t)===0}function $_(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(r=Ld(e[o],t),r===0||o>0&&(i=Ld(e[o],e[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Sd*i))return!0;n=r}return!1}function k_(e,t){return!!S3(e.map(pj),T3(t))}function pj(e){return e=e.map(T3),e.pop(),e}function T3(e){return[e[0]*Ze,e[1]*Ze]}function gj(e,t){return(e&&w_.hasOwnProperty(e.type)?w_[e.type]:Dd)(e,t)}function M_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function T_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function E3(){var e,t,n,r,i,o,a,s,l=10,u=l,c=90,f=360,d,h,p,g,b=2.5;function v(){return{type:"MultiLineString",coordinates:x()}}function x(){return Jn(pc(r/c)*c,n,c).map(p).concat(Jn(pc(s/f)*f,a,f).map(g)).concat(Jn(pc(t/l)*l,e,l).filter(function(y){return bt(y%c)>Qe}).map(d)).concat(Jn(pc(o/u)*u,i,u).filter(function(y){return bt(y%f)>Qe}).map(h))}return v.lines=function(){return x().map(function(y){return{type:"LineString",coordinates:y}})},v.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},v.extent=function(y){return arguments.length?v.extentMajor(y).extentMinor(y):v.extentMinor()},v.extentMajor=function(y){return arguments.length?(r=+y[0][0],n=+y[1][0],s=+y[0][1],a=+y[1][1],r>n&&(y=r,r=n,n=y),s>a&&(y=s,s=a,a=y),v.precision(b)):[[r,s],[n,a]]},v.extentMinor=function(y){return arguments.length?(t=+y[0][0],e=+y[1][0],o=+y[0][1],i=+y[1][1],t>e&&(y=t,t=e,e=y),o>i&&(y=o,o=i,i=y),v.precision(b)):[[t,o],[e,i]]},v.step=function(y){return arguments.length?v.stepMajor(y).stepMinor(y):v.stepMinor()},v.stepMajor=function(y){return arguments.length?(c=+y[0],f=+y[1],v):[c,f]},v.stepMinor=function(y){return arguments.length?(l=+y[0],u=+y[1],v):[l,u]},v.precision=function(y){return arguments.length?(b=+y,d=M_(o,i,90),h=T_(t,e,b),p=M_(s,a,90),g=T_(r,n,b),v):b},v.extentMajor([[-180,-90+Qe],[180,90-Qe]]).extentMinor([[-180,-80-Qe],[180,80+Qe]])}function vj(){return E3()()}function bj(e,t){var n=e[0]*Ze,r=e[1]*Ze,i=t[0]*Ze,o=t[1]*Ze,a=je(r),s=Ie(r),l=je(o),u=Ie(o),c=a*je(n),f=a*Ie(n),d=l*je(i),h=l*Ie(i),p=2*In(Kt(l_(o-r)+a*l*l_(i-n))),g=Ie(p),b=p?function(v){var x=Ie(v*=p)/g,y=Ie(p-v)/g,_=y*c+x*d,S=y*f+x*h,$=y*s+x*u;return[Fn(S,_)*Et,Fn($,Kt(_*_+S*S))*Et]}:function(){return[n*Et,r*Et]};return b.distance=p,b}function nu(e){return e}var Tp=po(),dg=po(),A3,P3,fg,hg,li={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){li.lineStart=mj,li.lineEnd=_j},polygonEnd:function(){li.lineStart=li.lineEnd=li.point=Nt,Tp.add(bt(dg)),dg.reset()},result:function(){var e=Tp/2;return Tp.reset(),e}};function mj(){li.point=yj}function yj(e,t){li.point=R3,A3=fg=e,P3=hg=t}function R3(e,t){dg.add(hg*e-fg*t),fg=e,hg=t}function _j(){R3(A3,P3)}var cs=1/0,Hd=cs,ru=-cs,Ud=ru,jd={point:xj,lineStart:Nt,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt,result:function(){var e=[[cs,Hd],[ru,Ud]];return ru=Ud=-(Hd=cs=1/0),e}};function xj(e,t){e<cs&&(cs=e),e>ru&&(ru=e),t<Hd&&(Hd=t),t>Ud&&(Ud=t)}var pg=0,gg=0,Js=0,Wd=0,Vd=0,Fa=0,vg=0,bg=0,Qs=0,z3,F3,Br,Or,ar={point:Jo,lineStart:E_,lineEnd:A_,polygonStart:function(){ar.lineStart=Sj,ar.lineEnd=$j},polygonEnd:function(){ar.point=Jo,ar.lineStart=E_,ar.lineEnd=A_},result:function(){var e=Qs?[vg/Qs,bg/Qs]:Fa?[Wd/Fa,Vd/Fa]:Js?[pg/Js,gg/Js]:[NaN,NaN];return pg=gg=Js=Wd=Vd=Fa=vg=bg=Qs=0,e}};function Jo(e,t){pg+=e,gg+=t,++Js}function E_(){ar.point=wj}function wj(e,t){ar.point=Cj,Jo(Br=e,Or=t)}function Cj(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);Wd+=i*(Br+e)/2,Vd+=i*(Or+t)/2,Fa+=i,Jo(Br=e,Or=t)}function A_(){ar.point=Jo}function Sj(){ar.point=kj}function $j(){I3(z3,F3)}function kj(e,t){ar.point=I3,Jo(z3=Br=e,F3=Or=t)}function I3(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);Wd+=i*(Br+e)/2,Vd+=i*(Or+t)/2,Fa+=i,i=Or*e-Br*t,vg+=i*(Br+e),bg+=i*(Or+t),Qs+=i*3,Jo(Br=e,Or=t)}function B3(e){this._context=e}B3.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,zn);break}}},result:Nt};var mg=po(),Ep,O3,N3,el,tl,iu={point:Nt,lineStart:function(){iu.point=Mj},lineEnd:function(){Ep&&L3(O3,N3),iu.point=Nt},polygonStart:function(){Ep=!0},polygonEnd:function(){Ep=null},result:function(){var e=+mg;return mg.reset(),e}};function Mj(e,t){iu.point=L3,O3=el=e,N3=tl=t}function L3(e,t){el-=e,tl-=t,mg.add(Kt(el*el+tl*tl)),el=e,tl=t}function D3(){this._string=[]}D3.prototype={_radius:4.5,_circle:P_(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=P_(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function P_(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Tj(e,t){var n=4.5,r,i;function o(a){return a&&(typeof n=="function"&&i.pointRadius(+n.apply(this,arguments)),br(a,r(i))),i.result()}return o.area=function(a){return br(a,r(li)),li.result()},o.measure=function(a){return br(a,r(iu)),iu.result()},o.bounds=function(a){return br(a,r(jd)),jd.result()},o.centroid=function(a){return br(a,r(ar)),ar.result()},o.projection=function(a){return arguments.length?(r=a==null?(e=null,nu):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new D3):new B3(t=a),typeof n!="function"&&i.pointRadius(n),o):t},o.pointRadius=function(a){return arguments.length?(n=typeof a=="function"?a:(i.pointRadius(+a),+a),o):n},o.projection(e).context(t)}function Ej(e){return{stream:$u(e)}}function $u(e){return function(t){var n=new yg;for(var r in e)n[r]=e[r];return n.stream=t,n}}function yg(){}yg.prototype={constructor:yg,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function eb(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),br(n,e.stream(jd)),t(jd.result()),r!=null&&e.clipExtent(r),e}function Jf(e,t,n){return eb(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,l])},n)}function tb(e,t,n){return Jf(e,[[0,0],t],n)}function nb(e,t,n){return eb(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];e.scale(150*o).translate([a,s])},n)}function rb(e,t,n){return eb(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])},n)}var R_=16,Aj=je(30*Ze);function z_(e,t){return+t?Rj(e,t):Pj(e)}function Pj(e){return $u({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Rj(e,t){function n(r,i,o,a,s,l,u,c,f,d,h,p,g,b){var v=u-r,x=c-i,y=v*v+x*x;if(y>4*t&&g--){var _=a+d,S=s+h,$=l+p,w=Kt(_*_+S*S+$*$),T=In($/=w),M=bt(bt($)-1)<Qe||bt(o-f)<Qe?(o+f)/2:Fn(S,_),P=e(M,T),R=P[0],C=P[1],E=R-r,F=C-i,z=x*E-v*F;(z*z/y>t||bt((v*E+x*F)/y-.5)>.3||a*d+s*h+l*p<Aj)&&(n(r,i,o,a,s,l,R,C,M,_/=w,S/=w,$,g,b),b.point(R,C),n(R,C,M,_,S,$,u,c,f,d,h,p,g,b))}}return function(r){var i,o,a,s,l,u,c,f,d,h,p,g,b={point:v,lineStart:x,lineEnd:_,polygonStart:function(){r.polygonStart(),b.lineStart=S},polygonEnd:function(){r.polygonEnd(),b.lineStart=x}};function v(T,M){T=e(T,M),r.point(T[0],T[1])}function x(){f=NaN,b.point=y,r.lineStart()}function y(T,M){var P=Zo([T,M]),R=e(T,M);n(f,d,c,h,p,g,f=R[0],d=R[1],c=T,h=P[0],p=P[1],g=P[2],R_,r),r.point(f,d)}function _(){b.point=v,r.lineEnd()}function S(){x(),b.point=$,b.lineEnd=w}function $(T,M){y(i=T,M),o=f,a=d,s=h,l=p,u=g,b.point=y}function w(){n(f,d,c,h,p,g,o,a,i,s,l,u,R_,r),b.lineEnd=_,_()}return b}}var zj=$u({point:function(e,t){this.stream.point(e*Ze,t*Ze)}});function Fj(e){return $u({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Ij(e,t,n,r,i){function o(a,s){return a*=r,s*=i,[t+e*a,n-e*s]}return o.invert=function(a,s){return[(a-t)/e*r,(n-s)/e*i]},o}function F_(e,t,n,r,i,o){var a=je(o),s=Ie(o),l=a*e,u=s*e,c=a/e,f=s/e,d=(s*n-a*t)/e,h=(s*t+a*n)/e;function p(g,b){return g*=r,b*=i,[l*g-u*b+t,n-u*g-l*b]}return p.invert=function(g,b){return[r*(c*g-f*b+d),i*(h-f*g-c*b)]},p}function Jr(e){return ib(function(){return e})()}function ib(e){var t,n=150,r=480,i=250,o=0,a=0,s=0,l=0,u=0,c,f=0,d=1,h=1,p=null,g=sg,b=null,v,x,y,_=nu,S=.5,$,w,T,M,P;function R(z){return T(z[0]*Ze,z[1]*Ze)}function C(z){return z=T.invert(z[0],z[1]),z&&[z[0]*Et,z[1]*Et]}R.stream=function(z){return M&&P===z?M:M=zj(Fj(c)(g($(_(P=z)))))},R.preclip=function(z){return arguments.length?(g=z,p=void 0,F()):g},R.postclip=function(z){return arguments.length?(_=z,b=v=x=y=null,F()):_},R.clipAngle=function(z){return arguments.length?(g=+z?k3(p=z*Ze):(p=null,sg),F()):p*Et},R.clipExtent=function(z){return arguments.length?(_=z==null?(b=v=x=y=null,nu):Zf(b=+z[0][0],v=+z[0][1],x=+z[1][0],y=+z[1][1]),F()):b==null?null:[[b,v],[x,y]]},R.scale=function(z){return arguments.length?(n=+z,E()):n},R.translate=function(z){return arguments.length?(r=+z[0],i=+z[1],E()):[r,i]},R.center=function(z){return arguments.length?(o=z[0]%360*Ze,a=z[1]%360*Ze,E()):[o*Et,a*Et]},R.rotate=function(z){return arguments.length?(s=z[0]%360*Ze,l=z[1]%360*Ze,u=z.length>2?z[2]%360*Ze:0,E()):[s*Et,l*Et,u*Et]},R.angle=function(z){return arguments.length?(f=z%360*Ze,E()):f*Et},R.reflectX=function(z){return arguments.length?(d=z?-1:1,E()):d<0},R.reflectY=function(z){return arguments.length?(h=z?-1:1,E()):h<0},R.precision=function(z){return arguments.length?($=z_(w,S=z*z),F()):Kt(S)},R.fitExtent=function(z,j){return Jf(R,z,j)},R.fitSize=function(z,j){return tb(R,z,j)},R.fitWidth=function(z,j){return nb(R,z,j)},R.fitHeight=function(z,j){return rb(R,z,j)};function E(){var z=F_(n,0,0,d,h,f).apply(null,t(o,a)),j=(f?F_:Ij)(n,r-z[0],i-z[1],d,h,f);return c=Qv(s,l,u),w=og(t,j),T=og(c,w),$=z_(w,S),F()}function F(){return M=P=null,R}return function(){return t=e.apply(this,arguments),R.invert=t.invert&&C,E()}}function ob(e){var t=0,n=ct/3,r=ib(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*Ze,n=o[1]*Ze):[t*Et,n*Et]},i}function Bj(e){var t=je(e);function n(r,i){return[r*t,Ie(i)/t]}return n.invert=function(r,i){return[r/t,In(i*t)]},n}function H3(e,t){var n=Ie(e),r=(n+Ie(t))/2;if(bt(r)<Qe)return Bj(e);var i=1+n*(2*r-n),o=Kt(i)/r;function a(s,l){var u=Kt(i-2*r*Ie(l))/r;return[u*Ie(s*=r),o-u*je(s)]}return a.invert=function(s,l){var u=o-l,c=Fn(s,bt(u))*ur(u);return u*r<0&&(c-=ct*ur(s)*ur(u)),[c/r,In((i-(s*s+u*u)*r*r)/(2*r))]},a}function qd(){return ob(H3).scale(155.424).center([0,33.6442])}function U3(){return qd().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Oj(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function Nj(){var e,t,n=U3(),r,i=qd().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=qd().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,u={point:function(d,h){l=[d,h]}};function c(d){var h=d[0],p=d[1];return l=null,r.point(h,p),l||(o.point(h,p),l)||(s.point(h,p),l)}c.invert=function(d){var h=n.scale(),p=n.translate(),g=(d[0]-p[0])/h,b=(d[1]-p[1])/h;return(b>=.12&&b<.234&&g>=-.425&&g<-.214?i:b>=.166&&b<.234&&g>=-.214&&g<-.115?a:n).invert(d)},c.stream=function(d){return e&&t===d?e:e=Oj([n.stream(t=d),i.stream(d),a.stream(d)])},c.precision=function(d){return arguments.length?(n.precision(d),i.precision(d),a.precision(d),f()):n.precision()},c.scale=function(d){return arguments.length?(n.scale(d),i.scale(d*.35),a.scale(d),c.translate(n.translate())):n.scale()},c.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],g=+d[1];return r=n.translate(d).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(u),o=i.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+Qe,g+.12*h+Qe],[p-.214*h-Qe,g+.234*h-Qe]]).stream(u),s=a.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+Qe,g+.166*h+Qe],[p-.115*h-Qe,g+.234*h-Qe]]).stream(u),f()},c.fitExtent=function(d,h){return Jf(c,d,h)},c.fitSize=function(d,h){return tb(c,d,h)},c.fitWidth=function(d,h){return nb(c,d,h)},c.fitHeight=function(d,h){return rb(c,d,h)};function f(){return e=t=null,c}return c.scale(1070)}function j3(e){return function(t,n){var r=je(t),i=je(n),o=e(r*i);return[o*i*Ie(t),o*Ie(n)]}}function ku(e){return function(t,n){var r=Kt(t*t+n*n),i=e(r),o=Ie(i),a=je(i);return[Fn(t*o,r*a),In(r&&n*o/r)]}}var ab=j3(function(e){return Kt(2/(1+e))});ab.invert=ku(function(e){return 2*In(e/2)});function Lj(){return Jr(ab).scale(124.75).clipAngle(180-.001)}var sb=j3(function(e){return(e=u3(e))&&e/Ie(e)});sb.invert=ku(function(e){return e});function Dj(){return Jr(sb).scale(79.4188).clipAngle(180-.001)}function Mu(e,t){return[e,kd(Zv((jt+t)/2))]}Mu.invert=function(e,t){return[e,2*xs(l3(t))-jt]};function Hj(){return W3(Mu).scale(961/zn)}function W3(e){var t=Jr(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,u;t.scale=function(f){return arguments.length?(r(f),c()):r()},t.translate=function(f){return arguments.length?(i(f),c()):i()},t.center=function(f){return arguments.length?(n(f),c()):n()},t.clipExtent=function(f){return arguments.length?(f==null?a=s=l=u=null:(a=+f[0][0],s=+f[0][1],l=+f[1][0],u=+f[1][1]),c()):a==null?null:[[a,s],[l,u]]};function c(){var f=ct*r(),d=t(_3(t.rotate()).invert([0,0]));return o(a==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===Mu?[[Math.max(d[0]-f,a),s],[Math.min(d[0]+f,l),u]]:[[a,Math.max(d[1]-f,s)],[l,Math.min(d[1]+f,u)]])}return c()}function _c(e){return Zv((jt+e)/2)}function V3(e,t){var n=je(e),r=e===t?Ie(e):kd(n/je(t))/kd(_c(t)/_c(e)),i=n*Sp(_c(e),r)/r;if(!r)return Mu;function o(a,s){i>0?s<-jt+Qe&&(s=-jt+Qe):s>jt-Qe&&(s=jt-Qe);var l=i/Sp(_c(s),r);return[l*Ie(r*a),i-l*je(r*a)]}return o.invert=function(a,s){var l=i-s,u=ur(r)*Kt(a*a+l*l),c=Fn(a,bt(l))*ur(l);return l*r<0&&(c-=ct*ur(a)*ur(l)),[c/r,2*xs(Sp(i/u,1/r))-jt]},o}function Uj(){return ob(V3).scale(109.5).parallels([30,30])}function ou(e,t){return[e,t]}ou.invert=ou;function jj(){return Jr(ou).scale(152.63)}function q3(e,t){var n=je(e),r=e===t?Ie(e):(n-je(t))/(t-e),i=n/r+e;if(bt(r)<Qe)return ou;function o(a,s){var l=i-s,u=r*a;return[l*Ie(u),i-l*je(u)]}return o.invert=function(a,s){var l=i-s,u=Fn(a,bt(l))*ur(l);return l*r<0&&(u-=ct*ur(a)*ur(l)),[u/r,i-ur(r)*Kt(a*a+l*l)]},o}function Wj(){return ob(q3).scale(131.154).center([0,13.9389])}var Sl=1.340264,$l=-.081106,kl=893e-6,Ml=.003796,Gd=Kt(3)/2,Vj=12;function lb(e,t){var n=In(Gd*Ie(t)),r=n*n,i=r*r*r;return[e*je(n)/(Gd*(Sl+3*$l*r+i*(7*kl+9*Ml*r))),n*(Sl+$l*r+i*(kl+Ml*r))]}lb.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,a,s,l;o<Vj&&(s=n*(Sl+$l*r+i*(kl+Ml*r))-t,l=Sl+3*$l*r+i*(7*kl+9*Ml*r),n-=a=s/l,r=n*n,i=r*r*r,!(bt(a)<Sd));++o);return[Gd*e*(Sl+3*$l*r+i*(7*kl+9*Ml*r))/je(n),In(Ie(n)/Gd)]};function qj(){return Jr(lb).scale(177.158)}function ub(e,t){var n=je(t),r=je(e)*n;return[n*Ie(e)/r,Ie(t)/r]}ub.invert=ku(xs);function Gj(){return Jr(ub).scale(144.049).clipAngle(60)}function Yj(){var e=1,t=0,n=0,r=1,i=1,o=0,a,s,l=null,u,c,f,d=1,h=1,p=$u({point:function(_,S){var $=y([_,S]);this.stream.point($[0],$[1])}}),g=nu,b,v;function x(){return d=e*r,h=e*i,b=v=null,y}function y(_){var S=_[0]*d,$=_[1]*h;if(o){var w=$*a-S*s;S=S*a+$*s,$=w}return[S+t,$+n]}return y.invert=function(_){var S=_[0]-t,$=_[1]-n;if(o){var w=$*a+S*s;S=S*a-$*s,$=w}return[S/d,$/h]},y.stream=function(_){return b&&v===_?b:b=p(g(v=_))},y.postclip=function(_){return arguments.length?(g=_,l=u=c=f=null,x()):g},y.clipExtent=function(_){return arguments.length?(g=_==null?(l=u=c=f=null,nu):Zf(l=+_[0][0],u=+_[0][1],c=+_[1][0],f=+_[1][1]),x()):l==null?null:[[l,u],[c,f]]},y.scale=function(_){return arguments.length?(e=+_,x()):e},y.translate=function(_){return arguments.length?(t=+_[0],n=+_[1],x()):[t,n]},y.angle=function(_){return arguments.length?(o=_%360*Ze,s=Ie(o),a=je(o),x()):o*Et},y.reflectX=function(_){return arguments.length?(r=_?-1:1,x()):r<0},y.reflectY=function(_){return arguments.length?(i=_?-1:1,x()):i<0},y.fitExtent=function(_,S){return Jf(y,_,S)},y.fitSize=function(_,S){return tb(y,_,S)},y.fitWidth=function(_,S){return nb(y,_,S)},y.fitHeight=function(_,S){return rb(y,_,S)},y}function cb(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}cb.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(bt(i)>Qe&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function Xj(){return Jr(cb).scale(175.295)}function db(e,t){return[je(t)*Ie(e),Ie(t)]}db.invert=ku(In);function Kj(){return Jr(db).scale(249.5).clipAngle(90+Qe)}function fb(e,t){var n=je(t),r=1+je(e)*n;return[n*Ie(e)/r,Ie(t)/r]}fb.invert=ku(function(e){return 2*xs(e)});function Zj(){return Jr(fb).scale(250).clipAngle(142)}function hb(e,t){return[kd(Zv((jt+t)/2)),-e]}hb.invert=function(e,t){return[-t,2*xs(l3(e))-jt]};function Jj(){var e=W3(hb),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function Qj(e,t){return e.parent===t.parent?1:2}function eW(e){return e.reduce(tW,0)/e.length}function tW(e,t){return e+t.x}function nW(e){return 1+e.reduce(rW,0)}function rW(e,t){return Math.max(e,t.y)}function iW(e){for(var t;t=e.children;)e=t[0];return e}function oW(e){for(var t;t=e.children;)e=t[t.length-1];return e}function aW(){var e=Qj,t=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(d){var h=d.children;h?(d.x=eW(h),d.y=nW(h)):(d.x=a?s+=e(d,a):0,d.y=0,a=d)});var l=iW(o),u=oW(o),c=l.x-e(l,u)/2,f=u.x+e(u,l)/2;return o.eachAfter(r?function(d){d.x=(d.x-o.x)*t,d.y=(o.y-d.y)*n}:function(d){d.x=(d.x-c)/(f-c)*t,d.y=(1-(o.y?d.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function sW(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function lW(){return this.eachAfter(sW)}function uW(e){var t=this,n,r=[t],i,o,a;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);while(r.length);return this}function cW(e){for(var t=this,n=[t],r,i;t=n.pop();)if(e(t),r=t.children,r)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function dW(e){for(var t=this,n=[t],r=[],i,o,a;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this}function fW(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function hW(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function pW(e){for(var t=this,n=gW(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function gW(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function vW(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function bW(){var e=[];return this.each(function(t){e.push(t)}),e}function mW(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function yW(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function pb(e,t){var n=new ds(e),r=+e.value&&(n.value=e.value),i,o=[n],a,s,l,u;for(t==null&&(t=xW);i=o.pop();)if(r&&(i.value=+i.data.value),(s=t(i.data))&&(u=s.length))for(i.children=new Array(u),l=u-1;l>=0;--l)o.push(a=i.children[l]=new ds(s[l])),a.parent=i,a.depth=i.depth+1;return n.eachBefore(G3)}function _W(){return pb(this).eachBefore(wW)}function xW(e){return e.children}function wW(e){e.data=e.data.data}function G3(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function ds(e){this.data=e,this.depth=this.height=0,this.parent=null}ds.prototype=pb.prototype={constructor:ds,count:lW,each:uW,eachAfter:dW,eachBefore:cW,sum:fW,sort:hW,path:pW,ancestors:vW,descendants:bW,leaves:mW,links:yW,copy:_W};var CW=Array.prototype.slice;function SW(e){for(var t=e.length,n,r;t;)r=Math.random()*t--|0,n=e[t],e[t]=e[r],e[r]=n;return e}function Y3(e){for(var t=0,n=(e=SW(CW.call(e))).length,r=[],i,o;t<n;)i=e[t],o&&X3(o,i)?++t:(o=kW(r=$W(r,i)),t=0);return o}function $W(e,t){var n,r;if(Ap(t,e))return[t];for(n=0;n<e.length;++n)if(xc(t,e[n])&&Ap(nl(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(xc(nl(e[n],e[r]),t)&&xc(nl(e[n],t),e[r])&&xc(nl(e[r],t),e[n])&&Ap(K3(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function xc(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function X3(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Ap(e,t){for(var n=0;n<t.length;++n)if(!X3(e,t[n]))return!1;return!0}function kW(e){switch(e.length){case 1:return MW(e[0]);case 2:return nl(e[0],e[1]);case 3:return K3(e[0],e[1],e[2])}}function MW(e){return{x:e.x,y:e.y,r:e.r}}function nl(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-n,u=a-r,c=s-i,f=Math.sqrt(l*l+u*u);return{x:(n+o+l/f*c)/2,y:(r+a+u/f*c)/2,r:(f+i+s)/2}}function K3(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,u=n.x,c=n.y,f=n.r,d=r-a,h=r-u,p=i-s,g=i-c,b=l-o,v=f-o,x=r*r+i*i-o*o,y=x-a*a-s*s+l*l,_=x-u*u-c*c+f*f,S=h*p-d*g,$=(p*_-g*y)/(S*2)-r,w=(g*b-p*v)/S,T=(h*y-d*_)/(S*2)-i,M=(d*v-h*b)/S,P=w*w+M*M-1,R=2*(o+$*w+T*M),C=$*$+T*T-o*o,E=-(P?(R+Math.sqrt(R*R-4*P*C))/(2*P):C/R);return{x:r+$+w*E,y:i+T+M*E,r:E}}function I_(e,t,n){var r=e.x-t.x,i,o,a=e.y-t.y,s,l,u=r*r+a*a;u?(o=t.r+n.r,o*=o,l=e.r+n.r,l*=l,o>l?(i=(u+l-o)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),n.x=e.x-i*r-s*a,n.y=e.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=t.x+i*r-s*a,n.y=t.y+i*a+s*r)):(n.x=t.x+n.r,n.y=t.y)}function B_(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function O_(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function wc(e){this._=e,this.next=null,this.previous=null}function Z3(e){if(!(i=e.length))return 0;var t,n,r,i,o,a,s,l,u,c,f;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;I_(n,t,r=e[2]),t=new wc(t),n=new wc(n),r=new wc(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s<i;++s){I_(t._,n._,r=e[s]),r=new wc(r),l=n.next,u=t.previous,c=n._.r,f=t._.r;do if(c<=f){if(B_(l._,r._)){n=l,t.next=n,n.previous=t,--s;continue e}c+=l._.r,l=l.next}else{if(B_(u._,r._)){t=u,t.next=n,n.previous=t,--s;continue e}f+=u._.r,u=u.previous}while(l!==u.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=O_(t);(r=r.next)!==n;)(a=O_(r))<o&&(t=r,o=a);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=Y3(t),s=0;s<i;++s)t=e[s],t.x-=r.x,t.y-=r.y;return r.r}function TW(e){return Z3(e),e}function EW(e){return e==null?null:Yd(e)}function Yd(e){if(typeof e!="function")throw new Error;return e}function Po(){return 0}function Ra(e){return function(){return e}}function AW(e){return Math.sqrt(e.value)}function PW(){var e=null,t=1,n=1,r=Po;function i(o){return o.x=t/2,o.y=n/2,e?o.eachBefore(N_(e)).eachAfter(Pp(r,.5)).eachBefore(L_(1)):o.eachBefore(N_(AW)).eachAfter(Pp(Po,1)).eachAfter(Pp(r,o.r/Math.min(t,n))).eachBefore(L_(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=EW(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Ra(+o),i):r},i}function N_(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Pp(e,t){return function(n){if(r=n.children){var r,i,o=r.length,a=e(n)*t||0,s;if(a)for(i=0;i<o;++i)r[i].r+=a;if(s=Z3(r),a)for(i=0;i<o;++i)r[i].r-=a;n.r=s+a}}}function L_(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function J3(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Tu(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function RW(){var e=1,t=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),r&&a.eachBefore(J3),a}function o(a,s){return function(l){l.children&&Tu(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var u=l.x0,c=l.y0,f=l.x1-n,d=l.y1-n;f<u&&(u=f=(u+f)/2),d<c&&(c=d=(c+d)/2),l.x0=u,l.y0=c,l.x1=f,l.y1=d}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var D_="$",zW={depth:-1},H_={};function FW(e){return e.id}function IW(e){return e.parentId}function BW(){var e=FW,t=IW;function n(r){var i,o,a=r.length,s,l,u,c=new Array(a),f,d,h={};for(o=0;o<a;++o)i=r[o],u=c[o]=new ds(i),(f=e(i,o,r))!=null&&(f+="")&&(d=D_+(u.id=f),h[d]=d in h?H_:u);for(o=0;o<a;++o)if(u=c[o],f=t(r[o],o,r),f==null||!(f+="")){if(s)throw new Error("multiple roots");s=u}else{if(l=h[D_+f],!l)throw new Error("missing: "+f);if(l===H_)throw new Error("ambiguous: "+f);l.children?l.children.push(u):l.children=[u],u.parent=l}if(!s)throw new Error("no root");if(s.parent=zW,s.eachBefore(function(p){p.depth=p.parent.depth+1,--a}).eachBefore(G3),s.parent=null,a>0)throw new Error("cycle");return s}return n.id=function(r){return arguments.length?(e=Yd(r),n):e},n.parentId=function(r){return arguments.length?(t=Yd(r),n):t},n}function OW(e,t){return e.parent===t.parent?1:2}function Rp(e){var t=e.children;return t?t[0]:e.t}function zp(e){var t=e.children;return t?t[t.length-1]:e.t}function NW(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function LW(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function DW(e,t,n){return e.a.parent===t.parent?e.a:n}function jc(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}jc.prototype=Object.create(ds.prototype);function HW(e){for(var t=new jc(e,0),n,r=[t],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new jc(o[a],a)),i.parent=n;return(t.parent=new jc(null,0)).children=[t],t}function UW(){var e=OW,t=1,n=1,r=null;function i(u){var c=HW(u);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)u.eachBefore(l);else{var f=u,d=u,h=u;u.eachBefore(function(x){x.x<f.x&&(f=x),x.x>d.x&&(d=x),x.depth>h.depth&&(h=x)});var p=f===d?1:e(f,d)/2,g=p-f.x,b=t/(d.x+p+g),v=n/(h.depth||1);u.eachBefore(function(x){x.x=(x.x+g)*b,x.y=x.depth*v})}return u}function o(u){var c=u.children,f=u.parent.children,d=u.i?f[u.i-1]:null;if(c){LW(u);var h=(c[0].z+c[c.length-1].z)/2;d?(u.z=d.z+e(u._,d._),u.m=u.z-h):u.z=h}else d&&(u.z=d.z+e(u._,d._));u.parent.A=s(u,d,u.parent.A||f[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,f){if(c){for(var d=u,h=u,p=c,g=d.parent.children[0],b=d.m,v=h.m,x=p.m,y=g.m,_;p=zp(p),d=Rp(d),p&&d;)g=Rp(g),h=zp(h),h.a=u,_=p.z+x-d.z-b+e(p._,d._),_>0&&(NW(DW(p,u,f),u,_),b+=_,v+=_),x+=p.m,b+=d.m,y+=g.m,v+=h.m;p&&!zp(h)&&(h.t=p,h.m+=x-v),d&&!Rp(g)&&(g.t=d,g.m+=b-y,f=u)}return f}function l(u){u.x*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}function Qf(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var Q3=(1+Math.sqrt(5))/2;function eC(e,t,n,r,i,o){for(var a=[],s=t.children,l,u,c=0,f=0,d=s.length,h,p,g=t.value,b,v,x,y,_,S,$;c<d;){h=i-n,p=o-r;do b=s[f++].value;while(!b&&f<d);for(v=x=b,S=Math.max(p/h,h/p)/(g*e),$=b*b*S,_=Math.max(x/$,$/v);f<d;++f){if(b+=u=s[f].value,u<v&&(v=u),u>x&&(x=u),$=b*b*S,y=Math.max(x/$,$/v),y>_){b-=u;break}_=y}a.push(l={value:b,dice:h<p,children:s.slice(c,f)}),l.dice?Tu(l,n,r,i,g?r+=p*b/g:o):Qf(l,n,r,g?n+=h*b/g:i,o),g-=b,c=f}return a}const tC=function e(t){function n(r,i,o,a,s){eC(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Q3);function jW(){var e=tC,t=!1,n=1,r=1,i=[0],o=Po,a=Po,s=Po,l=Po,u=Po;function c(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],t&&d.eachBefore(J3),d}function f(d){var h=i[d.depth],p=d.x0+h,g=d.y0+h,b=d.x1-h,v=d.y1-h;b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),d.x0=p,d.y0=g,d.x1=b,d.y1=v,d.children&&(h=i[d.depth+1]=o(d)/2,p+=u(d)-h,g+=a(d)-h,b-=s(d)-h,v-=l(d)-h,b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),e(d,p,g,b,v))}return c.round=function(d){return arguments.length?(t=!!d,c):t},c.size=function(d){return arguments.length?(n=+d[0],r=+d[1],c):[n,r]},c.tile=function(d){return arguments.length?(e=Yd(d),c):e},c.padding=function(d){return arguments.length?c.paddingInner(d).paddingOuter(d):c.paddingInner()},c.paddingInner=function(d){return arguments.length?(o=typeof d=="function"?d:Ra(+d),c):o},c.paddingOuter=function(d){return arguments.length?c.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):c.paddingTop()},c.paddingTop=function(d){return arguments.length?(a=typeof d=="function"?d:Ra(+d),c):a},c.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:Ra(+d),c):s},c.paddingBottom=function(d){return arguments.length?(l=typeof d=="function"?d:Ra(+d),c):l},c.paddingLeft=function(d){return arguments.length?(u=typeof d=="function"?d:Ra(+d),c):u},c}function WW(e,t,n,r,i){var o=e.children,a,s=o.length,l,u=new Array(s+1);for(u[0]=l=a=0;a<s;++a)u[a+1]=l+=o[a].value;c(0,s,e.value,t,n,r,i);function c(f,d,h,p,g,b,v){if(f>=d-1){var x=o[f];x.x0=p,x.y0=g,x.x1=b,x.y1=v;return}for(var y=u[f],_=h/2+y,S=f+1,$=d-1;S<$;){var w=S+$>>>1;u[w]<_?S=w+1:$=w}_-u[S-1]<u[S]-_&&f+1<S&&--S;var T=u[S]-y,M=h-T;if(b-p>v-g){var P=(p*M+b*T)/h;c(f,S,T,p,g,P,v),c(S,d,M,P,g,b,v)}else{var R=(g*M+v*T)/h;c(f,S,T,p,g,b,R),c(S,d,M,p,R,b,v)}}}function VW(e,t,n,r,i){(e.depth&1?Qf:Tu)(e,t,n,r,i)}const qW=function e(t){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===t)for(var l,u,c,f,d=-1,h,p=l.length,g=r.value;++d<p;){for(u=l[d],c=u.children,f=u.value=0,h=c.length;f<h;++f)u.value+=c[f].value;u.dice?Tu(u,i,o,a,o+=(s-o)*u.value/g):Qf(u,i,o,i+=(a-i)*u.value/g,s),g-=u.value}else r._squarify=l=eC(t,r,i,o,a,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Q3);function GW(e){for(var t=-1,n=e.length,r,i=e[n-1],o=0;++t<n;)r=i,i=e[t],o+=r[1]*i[0]-r[0]*i[1];return o/2}function YW(e){for(var t=-1,n=e.length,r=0,i=0,o,a=e[n-1],s,l=0;++t<n;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[r/l,i/l]}function XW(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function KW(e,t){return e[0]-t[0]||e[1]-t[1]}function U_(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;++i){for(;r>1&&XW(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function ZW(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(KW),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=U_(r),a=U_(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(t=o.length-1;t>=0;--t)u.push(e[r[o[t]][2]]);for(t=+s;t<a.length-l;++t)u.push(e[r[a[t]][2]]);return u}function JW(e,t){for(var n=e.length,r=e[n-1],i=t[0],o=t[1],a=r[0],s=r[1],l,u,c=!1,f=0;f<n;++f)r=e[f],l=r[0],u=r[1],u>o!=s>o&&i<(a-l)*(o-u)/(s-u)+l&&(c=!c),a=l,s=u;return c}function QW(e){for(var t=-1,n=e.length,r=e[n-1],i,o,a=r[0],s=r[1],l=0;++t<n;)i=a,o=s,r=e[t],a=r[0],s=r[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}function ws(){return Math.random()}const eV=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return t()*i+r}}return n.source=e,n}(ws),nC=function e(t){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=e,n}(ws),tV=function e(t){function n(){var r=nC.source(t).apply(this,arguments);return function(){return Math.exp(r())}}return n.source=e,n}(ws),rC=function e(t){function n(r){return function(){for(var i=0,o=0;o<r;++o)i+=t();return i}}return n.source=e,n}(ws),nV=function e(t){function n(r){var i=rC.source(t)(r);return function(){return i()/r}}return n.source=e,n}(ws),rV=function e(t){function n(r){return function(){return-Math.log(1-t())/r}}return n.source=e,n}(ws);function Tr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function wi(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e);break}return this}var iC=Array.prototype,Xd=iC.map,Qo=iC.slice,_g={name:"implicit"};function gb(){var e=hi(),t=[],n=[],r=_g;function i(o){var a=o+"",s=e.get(a);if(!s){if(r!==_g)return r;e.set(a,s=t.push(o))}return n[(s-1)%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=hi();for(var a=-1,s=o.length,l,u;++a<s;)e.has(u=(l=o[a])+"")||e.set(u,t.push(l));return i},i.range=function(o){return arguments.length?(n=Qo.call(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return gb(t,n).unknown(r)},Tr.apply(i,arguments),i}function vb(){var e=gb().unknown(void 0),t=e.domain,n=e.range,r=[0,1],i,o,a=!1,s=0,l=0,u=.5;delete e.unknown;function c(){var f=t().length,d=r[1]<r[0],h=r[d-0],p=r[1-d];i=(p-h)/Math.max(1,f-s+l*2),a&&(i=Math.floor(i)),h+=(p-h-i*(f-s))*u,o=i*(1-s),a&&(h=Math.round(h),o=Math.round(o));var g=Jn(f).map(function(b){return h+i*b});return n(d?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],c()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],a=!0,c()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(a=!!f,c()):a},e.padding=function(f){return arguments.length?(s=Math.min(1,l=+f),c()):s},e.paddingInner=function(f){return arguments.length?(s=Math.min(1,f),c()):s},e.paddingOuter=function(f){return arguments.length?(l=+f,c()):l},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.copy=function(){return vb(t(),r).round(a).paddingInner(s).paddingOuter(l).align(u)},Tr.apply(c(),arguments)}function oC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return oC(t())},e}function iV(){return oC(vb.apply(null,arguments).paddingInner(1))}function oV(e){return function(){return e}}function xg(e){return+e}var j_=[0,1];function cn(e){return e}function wg(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:oV(isNaN(t)?NaN:.5)}function W_(e){var t=e[0],n=e[e.length-1],r;return t>n&&(r=t,t=n,n=r),function(i){return Math.max(t,Math.min(n,i))}}function aV(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=wg(i,r),o=n(a,o)):(r=wg(r,i),o=n(o,a)),function(s){return o(r(s))}}function sV(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=wg(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=Ji(e,s,1,r)-1;return o[l](i[l](s))}}function Eu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function eh(){var e=j_,t=j_,n=ys,r,i,o,a=cn,s,l,u;function c(){return s=Math.min(e.length,t.length)>2?sV:aV,l=u=null,f}function f(d){return isNaN(d=+d)?o:(l||(l=s(e.map(r),t,n)))(r(a(d)))}return f.invert=function(d){return a(i((u||(u=s(t,e.map(r),or)))(d)))},f.domain=function(d){return arguments.length?(e=Xd.call(d,xg),a===cn||(a=W_(e)),c()):e.slice()},f.range=function(d){return arguments.length?(t=Qo.call(d),c()):t.slice()},f.rangeRound=function(d){return t=Qo.call(d),n=T8,c()},f.clamp=function(d){return arguments.length?(a=d?W_(e):cn,f):a!==cn},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,h){return r=d,i=h,c()}}function aC(e,t){return eh()(e,t)}function sC(e,t,n,r){var i=Go(e,t,n),o;switch(r=tu(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=a3(i,a))&&(r.precision=o),Kv(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=s3(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=o3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Kf(r)}function ba(e){var t=e.domain;return e.ticks=function(n){var r=t();return kv(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return sC(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=wl(a,s,n),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=wl(a,s,n)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=wl(a,s,n)),l>0?(r[i]=Math.floor(a/l)*l,r[o]=Math.ceil(s/l)*l,t(r)):l<0&&(r[i]=Math.ceil(a*l)/l,r[o]=Math.floor(s*l)/l,t(r)),e},e}function au(){var e=aC(cn,cn);return e.copy=function(){return Eu(e,au())},Tr.apply(e,arguments),ba(e)}function lC(e){var t;function n(r){return isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Xd.call(r,xg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return lC(e).unknown(t)},e=arguments.length?Xd.call(e,xg):[0,1],ba(n)}function uC(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function V_(e){return Math.log(e)}function q_(e){return Math.exp(e)}function lV(e){return-Math.log(-e)}function uV(e){return-Math.exp(-e)}function cV(e){return isFinite(e)?+("1e"+e):e<0?0:e}function dV(e){return e===10?cV:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function fV(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function G_(e){return function(t){return-e(-t)}}function bb(e){var t=e(V_,q_),n=t.domain,r=10,i,o;function a(){return i=fV(r),o=dV(r),n()[0]<0?(i=G_(i),o=G_(o),e(lV,uV)):e(V_,q_),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=function(s){var l=n(),u=l[0],c=l[l.length-1],f;(f=c<u)&&(d=u,u=c,c=d);var d=i(u),h=i(c),p,g,b,v=s==null?10:+s,x=[];if(!(r%1)&&h-d<v){if(d=Math.round(d)-1,h=Math.round(h)+1,u>0){for(;d<h;++d)for(g=1,p=o(d);g<r;++g)if(b=p*g,!(b<u)){if(b>c)break;x.push(b)}}else for(;d<h;++d)for(g=r-1,p=o(d);g>=1;--g)if(b=p*g,!(b<u)){if(b>c)break;x.push(b)}}else x=kv(d,h,Math.min(h-d,v)).map(o);return f?x.reverse():x},t.tickFormat=function(s,l){if(l==null&&(l=r===10?".0e":","),typeof l!="function"&&(l=Kf(l)),s===1/0)return l;s==null&&(s=10);var u=Math.max(1,r*s/t.ticks().length);return function(c){var f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=function(){return n(uC(n(),{floor:function(s){return o(Math.floor(i(s)))},ceil:function(s){return o(Math.ceil(i(s)))}}))},t}function cC(){var e=bb(eh()).domain([1,10]);return e.copy=function(){return Eu(e,cC()).base(e.base())},Tr.apply(e,arguments),e}function Y_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function X_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function mb(e){var t=1,n=e(Y_(t),X_(t));return n.constant=function(r){return arguments.length?e(Y_(t=+r),X_(t)):t},ba(n)}function dC(){var e=mb(eh());return e.copy=function(){return Eu(e,dC()).constant(e.constant())},Tr.apply(e,arguments)}function K_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function hV(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pV(e){return e<0?-e*e:e*e}function yb(e){var t=e(cn,cn),n=1;function r(){return n===1?e(cn,cn):n===.5?e(hV,pV):e(K_(n),K_(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ba(t)}function _b(){var e=yb(eh());return e.copy=function(){return Eu(e,_b()).exponent(e.exponent())},Tr.apply(e,arguments),e}function gV(){return _b.apply(null,arguments).exponent(.5)}function fC(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=Vl(e,a/s);return o}function o(a){return isNaN(a=+a)?r:t[Ji(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(var s=0,l=a.length,u;s<l;++s)u=a[s],u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Sr),i()},o.range=function(a){return arguments.length?(t=Qo.call(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return fC().domain(e).range(t).unknown(r)},Tr.apply(o,arguments)}function hC(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l<=l?i[Ji(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?(e=+l[0],t=+l[1],s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Qo.call(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return hC().domain([e,t]).range(i).unknown(o)},Tr.apply(ba(a),arguments)}function pC(){var e=[.5],t=[0,1],n,r=1;function i(o){return o<=o?t[Ji(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Qo.call(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Qo.call(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return pC().domain(e).range(t).unknown(n)},Tr.apply(i,arguments)}var Fp=new Date,Ip=new Date;function Qt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],u;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(u=new Date(+o)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=function(o){return Qt(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return Fp.setTime(+o),Ip.setTime(+a),e(Fp),e(Ip),Math.floor(n(Fp,Ip))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var ea=Qt(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});ea.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Qt(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):ea};var Z_=ea.range,Kd=1e3,ta=6e4,Zd=36e5,gC=864e5,vC=6048e5,su=Qt(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Kd)},function(e,t){return(t-e)/Kd},function(e){return e.getUTCSeconds()}),J_=su.range,xb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Kd)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getMinutes()}),vV=xb.range,wb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Kd-e.getMinutes()*ta)},function(e,t){e.setTime(+e+t*Zd)},function(e,t){return(t-e)/Zd},function(e){return e.getHours()}),bV=wb.range,Au=Qt(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ta)/gC},function(e){return e.getDate()-1}),mV=Au.range;function ma(e){return Qt(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ta)/vC})}var lu=ma(0),uu=ma(1),bC=ma(2),mC=ma(3),na=ma(4),yC=ma(5),_C=ma(6),Q_=lu.range,yV=uu.range,_V=bC.range,xV=mC.range,wV=na.range,CV=yC.range,SV=_C.range,Cb=Qt(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),$V=Cb.range,gi=Qt(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});gi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};var kV=gi.range,Sb=Qt(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getUTCMinutes()}),MV=Sb.range,$b=Qt(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Zd)},function(e,t){return(t-e)/Zd},function(e){return e.getUTCHours()}),TV=$b.range,Pu=Qt(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/gC},function(e){return e.getUTCDate()-1}),EV=Pu.range;function ya(e){return Qt(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/vC})}var cu=ya(0),du=ya(1),xC=ya(2),wC=ya(3),ra=ya(4),CC=ya(5),SC=ya(6),ex=cu.range,AV=du.range,PV=xC.range,RV=wC.range,zV=ra.range,FV=CC.range,IV=SC.range,kb=Qt(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),BV=kb.range,vi=Qt(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});vi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};var OV=vi.range;function Bp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Op(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Os(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function $C(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ns(i),c=Ls(i),f=Ns(o),d=Ls(o),h=Ns(a),p=Ls(a),g=Ns(s),b=Ls(s),v=Ns(l),x=Ls(l),y={a:Z,A:J,b:ie,B:he,c:null,d:ax,e:ax,f:aq,g:vq,G:mq,H:rq,I:iq,j:oq,L:kC,m:sq,M:lq,p:_e,q:oe,Q:ux,s:cx,S:uq,u:cq,U:dq,V:fq,w:hq,W:pq,x:null,X:null,y:gq,Y:bq,Z:yq,"%":lx},_={a:ve,A:we,b:Oe,B:xe,c:null,d:sx,e:sx,f:Cq,g:zq,G:Iq,H:_q,I:xq,j:wq,L:TC,m:Sq,M:$q,p:Xe,q:Ve,Q:ux,s:cx,S:kq,u:Mq,U:Tq,V:Eq,w:Aq,W:Pq,x:null,X:null,y:Rq,Y:Fq,Z:Bq,"%":lx},S={a:P,A:R,b:C,B:E,c:F,d:ix,e:ix,f:QV,g:rx,G:nx,H:ox,I:ox,j:XV,L:JV,m:YV,M:KV,p:M,q:GV,Q:tq,s:nq,S:ZV,u:UV,U:jV,V:WV,w:HV,W:VV,x:z,X:j,y:rx,Y:nx,Z:qV,"%":eq};y.x=$(n,y),y.X=$(r,y),y.c=$(t,y),_.x=$(n,_),_.X=$(r,_),_.c=$(t,_);function $(de,Ee){return function(Pe){var A=[],H=-1,Y=0,fe=de.length,le,q,N;for(Pe instanceof Date||(Pe=new Date(+Pe));++H<fe;)de.charCodeAt(H)===37&&(A.push(de.slice(Y,H)),(q=tx[le=de.charAt(++H)])!=null?le=de.charAt(++H):q=le==="e"?" ":"0",(N=Ee[le])&&(le=N(Pe,q)),A.push(le),Y=H+1);return A.push(de.slice(Y,H)),A.join("")}}function w(de,Ee){return function(Pe){var A=Os(1900,void 0,1),H=T(A,de,Pe+="",0),Y,fe;if(H!=Pe.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(Ee&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(Y=Op(Os(A.y,0,1)),fe=Y.getUTCDay(),Y=fe>4||fe===0?du.ceil(Y):du(Y),Y=Pu.offset(Y,(A.V-1)*7),A.y=Y.getUTCFullYear(),A.m=Y.getUTCMonth(),A.d=Y.getUTCDate()+(A.w+6)%7):(Y=Bp(Os(A.y,0,1)),fe=Y.getDay(),Y=fe>4||fe===0?uu.ceil(Y):uu(Y),Y=Au.offset(Y,(A.V-1)*7),A.y=Y.getFullYear(),A.m=Y.getMonth(),A.d=Y.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),fe="Z"in A?Op(Os(A.y,0,1)).getUTCDay():Bp(Os(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(fe+5)%7:A.w+A.U*7-(fe+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,Op(A)):Bp(A)}}function T(de,Ee,Pe,A){for(var H=0,Y=Ee.length,fe=Pe.length,le,q;H<Y;){if(A>=fe)return-1;if(le=Ee.charCodeAt(H++),le===37){if(le=Ee.charAt(H++),q=S[le in tx?Ee.charAt(H++):le],!q||(A=q(de,Pe,A))<0)return-1}else if(le!=Pe.charCodeAt(A++))return-1}return A}function M(de,Ee,Pe){var A=u.exec(Ee.slice(Pe));return A?(de.p=c[A[0].toLowerCase()],Pe+A[0].length):-1}function P(de,Ee,Pe){var A=h.exec(Ee.slice(Pe));return A?(de.w=p[A[0].toLowerCase()],Pe+A[0].length):-1}function R(de,Ee,Pe){var A=f.exec(Ee.slice(Pe));return A?(de.w=d[A[0].toLowerCase()],Pe+A[0].length):-1}function C(de,Ee,Pe){var A=v.exec(Ee.slice(Pe));return A?(de.m=x[A[0].toLowerCase()],Pe+A[0].length):-1}function E(de,Ee,Pe){var A=g.exec(Ee.slice(Pe));return A?(de.m=b[A[0].toLowerCase()],Pe+A[0].length):-1}function F(de,Ee,Pe){return T(de,t,Ee,Pe)}function z(de,Ee,Pe){return T(de,n,Ee,Pe)}function j(de,Ee,Pe){return T(de,r,Ee,Pe)}function Z(de){return a[de.getDay()]}function J(de){return o[de.getDay()]}function ie(de){return l[de.getMonth()]}function he(de){return s[de.getMonth()]}function _e(de){return i[+(de.getHours()>=12)]}function oe(de){return 1+~~(de.getMonth()/3)}function ve(de){return a[de.getUTCDay()]}function we(de){return o[de.getUTCDay()]}function Oe(de){return l[de.getUTCMonth()]}function xe(de){return s[de.getUTCMonth()]}function Xe(de){return i[+(de.getUTCHours()>=12)]}function Ve(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var Ee=$(de+="",y);return Ee.toString=function(){return de},Ee},parse:function(de){var Ee=w(de+="",!1);return Ee.toString=function(){return de},Ee},utcFormat:function(de){var Ee=$(de+="",_);return Ee.toString=function(){return de},Ee},utcParse:function(de){var Ee=w(de+="",!0);return Ee.toString=function(){return de},Ee}}}var tx={"-":"",_:" ",0:"0"},on=/^\s*\d+/,NV=/^%/,LV=/[\\^$*+?|[\]().{}]/g;function Ct(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function DV(e){return e.replace(LV,"\\$&")}function Ns(e){return new RegExp("^(?:"+e.map(DV).join("|")+")","i")}function Ls(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function HV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function UV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function jV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function WV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function VV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function nx(e,t,n){var r=on.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rx(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qV(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function GV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function YV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ix(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function XV(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ox(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function KV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ZV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function JV(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function QV(e,t,n){var r=on.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function eq(e,t,n){var r=NV.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tq(e,t,n){var r=on.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nq(e,t,n){var r=on.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ax(e,t){return Ct(e.getDate(),t,2)}function rq(e,t){return Ct(e.getHours(),t,2)}function iq(e,t){return Ct(e.getHours()%12||12,t,2)}function oq(e,t){return Ct(1+Au.count(gi(e),e),t,3)}function kC(e,t){return Ct(e.getMilliseconds(),t,3)}function aq(e,t){return kC(e,t)+"000"}function sq(e,t){return Ct(e.getMonth()+1,t,2)}function lq(e,t){return Ct(e.getMinutes(),t,2)}function uq(e,t){return Ct(e.getSeconds(),t,2)}function cq(e){var t=e.getDay();return t===0?7:t}function dq(e,t){return Ct(lu.count(gi(e)-1,e),t,2)}function MC(e){var t=e.getDay();return t>=4||t===0?na(e):na.ceil(e)}function fq(e,t){return e=MC(e),Ct(na.count(gi(e),e)+(gi(e).getDay()===4),t,2)}function hq(e){return e.getDay()}function pq(e,t){return Ct(uu.count(gi(e)-1,e),t,2)}function gq(e,t){return Ct(e.getFullYear()%100,t,2)}function vq(e,t){return e=MC(e),Ct(e.getFullYear()%100,t,2)}function bq(e,t){return Ct(e.getFullYear()%1e4,t,4)}function mq(e,t){var n=e.getDay();return e=n>=4||n===0?na(e):na.ceil(e),Ct(e.getFullYear()%1e4,t,4)}function yq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ct(t/60|0,"0",2)+Ct(t%60,"0",2)}function sx(e,t){return Ct(e.getUTCDate(),t,2)}function _q(e,t){return Ct(e.getUTCHours(),t,2)}function xq(e,t){return Ct(e.getUTCHours()%12||12,t,2)}function wq(e,t){return Ct(1+Pu.count(vi(e),e),t,3)}function TC(e,t){return Ct(e.getUTCMilliseconds(),t,3)}function Cq(e,t){return TC(e,t)+"000"}function Sq(e,t){return Ct(e.getUTCMonth()+1,t,2)}function $q(e,t){return Ct(e.getUTCMinutes(),t,2)}function kq(e,t){return Ct(e.getUTCSeconds(),t,2)}function Mq(e){var t=e.getUTCDay();return t===0?7:t}function Tq(e,t){return Ct(cu.count(vi(e)-1,e),t,2)}function EC(e){var t=e.getUTCDay();return t>=4||t===0?ra(e):ra.ceil(e)}function Eq(e,t){return e=EC(e),Ct(ra.count(vi(e),e)+(vi(e).getUTCDay()===4),t,2)}function Aq(e){return e.getUTCDay()}function Pq(e,t){return Ct(du.count(vi(e)-1,e),t,2)}function Rq(e,t){return Ct(e.getUTCFullYear()%100,t,2)}function zq(e,t){return e=EC(e),Ct(e.getUTCFullYear()%100,t,2)}function Fq(e,t){return Ct(e.getUTCFullYear()%1e4,t,4)}function Iq(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ra(e):ra.ceil(e),Ct(e.getUTCFullYear()%1e4,t,4)}function Bq(){return"+0000"}function lx(){return"%"}function ux(e){return+e}function cx(e){return Math.floor(+e/1e3)}var Pa,Mb,AC,th,Tb;PC({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function PC(e){return Pa=$C(e),Mb=Pa.format,AC=Pa.parse,th=Pa.utcFormat,Tb=Pa.utcParse,Pa}var RC="%Y-%m-%dT%H:%M:%S.%LZ";function Oq(e){return e.toISOString()}var Nq=Date.prototype.toISOString?Oq:th(RC);function Lq(e){var t=new Date(e);return isNaN(t)?null:t}var Dq=+new Date("2000-01-01T00:00:00.000Z")?Lq:Tb(RC),rl=1e3,il=rl*60,ol=il*60,fu=ol*24,Hq=fu*7,dx=fu*30,Np=fu*365;function Uq(e){return new Date(e)}function jq(e){return e instanceof Date?+e:+new Date(+e)}function Eb(e,t,n,r,i,o,a,s,l){var u=aC(cn,cn),c=u.invert,f=u.domain,d=l(".%L"),h=l(":%S"),p=l("%I:%M"),g=l("%I %p"),b=l("%a %d"),v=l("%b %d"),x=l("%B"),y=l("%Y"),_=[[a,1,rl],[a,5,5*rl],[a,15,15*rl],[a,30,30*rl],[o,1,il],[o,5,5*il],[o,15,15*il],[o,30,30*il],[i,1,ol],[i,3,3*ol],[i,6,6*ol],[i,12,12*ol],[r,1,fu],[r,2,2*fu],[n,1,Hq],[t,1,dx],[t,3,3*dx],[e,1,Np]];function S(w){return(a(w)<w?d:o(w)<w?h:i(w)<w?p:r(w)<w?g:t(w)<w?n(w)<w?b:v:e(w)<w?x:y)(w)}function $(w,T,M,P){if(w==null&&(w=10),typeof w=="number"){var R=Math.abs(M-T)/w,C=$v(function(E){return E[2]}).right(_,R);C===_.length?(P=Go(T/Np,M/Np,w),w=e):C?(C=_[R/_[C-1][2]<_[C][2]/R?C-1:C],P=C[1],w=C[0]):(P=Math.max(Go(T,M,w),1),w=s)}return P==null?w:w.every(P)}return u.invert=function(w){return new Date(c(w))},u.domain=function(w){return arguments.length?f(Xd.call(w,jq)):f().map(Uq)},u.ticks=function(w,T){var M=f(),P=M[0],R=M[M.length-1],C=R<P,E;return C&&(E=P,P=R,R=E),E=$(w,P,R,T),E=E?E.range(P,R+1):[],C?E.reverse():E},u.tickFormat=function(w,T){return T==null?S:l(T)},u.nice=function(w,T){var M=f();return(w=$(w,M[0],M[M.length-1],T))?f(uC(M,w)):u},u.copy=function(){return Eu(u,Eb(e,t,n,r,i,o,a,s,l))},u}function Wq(){return Tr.apply(Eb(gi,Cb,lu,Au,wb,xb,su,ea,Mb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Vq(){return Tr.apply(Eb(vi,kb,cu,Pu,$b,Sb,su,ea,th).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nh(){var e=0,t=1,n,r,i,o,a=cn,s=!1,l;function u(c){return isNaN(c=+c)?l:a(i===0?.5:(c=(o(c)-n)*i,s?Math.max(0,Math.min(1,c)):c))}return u.domain=function(c){return arguments.length?(n=o(e=+c[0]),r=o(t=+c[1]),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(c){return arguments.length?(s=!!c,u):s},u.interpolator=function(c){return arguments.length?(a=c,u):a},u.unknown=function(c){return arguments.length?(l=c,u):l},function(c){return o=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),u}}function go(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zC(){var e=ba(nh()(cn));return e.copy=function(){return go(e,zC())},wi.apply(e,arguments)}function FC(){var e=bb(nh()).domain([1,10]);return e.copy=function(){return go(e,FC()).base(e.base())},wi.apply(e,arguments)}function IC(){var e=mb(nh());return e.copy=function(){return go(e,IC()).constant(e.constant())},wi.apply(e,arguments)}function Ab(){var e=yb(nh());return e.copy=function(){return go(e,Ab()).exponent(e.exponent())},wi.apply(e,arguments)}function qq(){return Ab.apply(null,arguments).exponent(.5)}function BC(){var e=[],t=cn;function n(r){if(!isNaN(r=+r))return t((Ji(e,r)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(var i=0,o=r.length,a;i<o;++i)a=r[i],a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Sr),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return BC(t).domain(e)},wi.apply(n,arguments)}function rh(){var e=0,t=.5,n=1,r,i,o,a,s,l=cn,u,c=!1,f;function d(h){return isNaN(h=+h)?f:(h=.5+((h=+u(h))-i)*(h<i?a:s),l(c?Math.max(0,Math.min(1,h)):h))}return d.domain=function(h){return arguments.length?(r=u(e=+h[0]),i=u(t=+h[1]),o=u(n=+h[2]),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),d):[e,t,n]},d.clamp=function(h){return arguments.length?(c=!!h,d):c},d.interpolator=function(h){return arguments.length?(l=h,d):l},d.unknown=function(h){return arguments.length?(f=h,d):f},function(h){return u=h,r=h(e),i=h(t),o=h(n),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),d}}function OC(){var e=ba(rh()(cn));return e.copy=function(){return go(e,OC())},wi.apply(e,arguments)}function NC(){var e=bb(rh()).domain([.1,1,10]);return e.copy=function(){return go(e,NC()).base(e.base())},wi.apply(e,arguments)}function LC(){var e=mb(rh());return e.copy=function(){return go(e,LC()).constant(e.constant())},wi.apply(e,arguments)}function Pb(){var e=yb(rh());return e.copy=function(){return go(e,Pb()).exponent(e.exponent())},wi.apply(e,arguments)}function Gq(){return Pb.apply(null,arguments).exponent(.5)}function st(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const Yq=st("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Xq=st("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Kq=st("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Zq=st("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Jq=st("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Qq=st("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),eG=st("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),tG=st("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),nG=st("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),rG=st("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function At(e){return C8(e[e.length-1])}var DC=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(st);const iG=At(DC);var HC=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(st);const oG=At(HC);var UC=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(st);const aG=At(UC);var jC=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(st);const sG=At(jC);var WC=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(st);const lG=At(WC);var VC=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(st);const uG=At(VC);var qC=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(st);const cG=At(qC);var GC=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(st);const dG=At(GC);var YC=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(st);const fG=At(YC);var XC=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(st);const hG=At(XC);var KC=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(st);const pG=At(KC);var ZC=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(st);const gG=At(ZC);var JC=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(st);const vG=At(JC);var QC=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(st);const bG=At(QC);var e6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(st);const mG=At(e6);var t6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(st);const yG=At(t6);var n6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(st);const _G=At(n6);var r6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(st);const xG=At(r6);var i6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(st);const wG=At(i6);var o6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(st);const CG=At(o6);var a6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(st);const SG=At(a6);var s6=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(st);const $G=At(s6);var l6=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(st);const kG=At(l6);var u6=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(st);const MG=At(u6);var c6=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(st);const TG=At(c6);var d6=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(st);const EG=At(d6);var f6=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(st);const AG=At(f6);function PG(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const RG=Uf($r(300,.5,0),$r(-240,.5,1));var zG=Uf($r(-100,.75,.35),$r(80,1.5,.8)),FG=Uf($r(260,.75,.35),$r(80,1.5,.8)),Cc=$r();function IG(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Cc.h=360*e-100,Cc.s=1.5-1.5*t,Cc.l=.8-.9*t,Cc+""}var Sc=is(),BG=Math.PI/3,OG=Math.PI*2/3;function NG(e){var t;return e=(.5-e)*Math.PI,Sc.r=255*(t=Math.sin(e))*t,Sc.g=255*(t=Math.sin(e+BG))*t,Sc.b=255*(t=Math.sin(e+OG))*t,Sc+""}function LG(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function ih(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const DG=ih(st("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var HG=ih(st("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),UG=ih(st("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),jG=ih(st("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ft(e){return function(){return e}}var fx=Math.abs,vn=Math.atan2,$o=Math.cos,WG=Math.max,Lp=Math.min,Rr=Math.sin,Ia=Math.sqrt,bn=1e-12,no=Math.PI,Jd=no/2,Vi=2*no;function VG(e){return e>1?0:e<-1?no:Math.acos(e)}function hx(e){return e>=1?Jd:e<=-1?-Jd:Math.asin(e)}function qG(e){return e.innerRadius}function GG(e){return e.outerRadius}function YG(e){return e.startAngle}function XG(e){return e.endAngle}function KG(e){return e&&e.padAngle}function ZG(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,f=s-o,d=f*l-c*u;if(!(d*d<bn))return d=(c*(t-o)-f*(e-i))/d,[e+d*l,t+d*u]}function $c(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Ia(s*s+l*l),c=u*l,f=-u*s,d=e+c,h=t+f,p=n+c,g=r+f,b=(d+p)/2,v=(h+g)/2,x=p-d,y=g-h,_=x*x+y*y,S=i-o,$=d*g-p*h,w=(y<0?-1:1)*Ia(WG(0,S*S*_-$*$)),T=($*y-x*w)/_,M=(-$*x-y*w)/_,P=($*y+x*w)/_,R=(-$*x+y*w)/_,C=T-b,E=M-v,F=P-b,z=R-v;return C*C+E*E>F*F+z*z&&(T=P,M=R),{cx:T,cy:M,x01:-c,y01:-f,x11:T*(i/S-1),y11:M*(i/S-1)}}function JG(){var e=qG,t=GG,n=ft(0),r=null,i=YG,o=XG,a=KG,s=null;function l(){var u,c,f=+e.apply(this,arguments),d=+t.apply(this,arguments),h=i.apply(this,arguments)-Jd,p=o.apply(this,arguments)-Jd,g=fx(p-h),b=p>h;if(s||(s=u=ho()),d<f&&(c=d,d=f,f=c),!(d>bn))s.moveTo(0,0);else if(g>Vi-bn)s.moveTo(d*$o(h),d*Rr(h)),s.arc(0,0,d,h,p,!b),f>bn&&(s.moveTo(f*$o(p),f*Rr(p)),s.arc(0,0,f,p,h,b));else{var v=h,x=p,y=h,_=p,S=g,$=g,w=a.apply(this,arguments)/2,T=w>bn&&(r?+r.apply(this,arguments):Ia(f*f+d*d)),M=Lp(fx(d-f)/2,+n.apply(this,arguments)),P=M,R=M,C,E;if(T>bn){var F=hx(T/f*Rr(w)),z=hx(T/d*Rr(w));(S-=F*2)>bn?(F*=b?1:-1,y+=F,_-=F):(S=0,y=_=(h+p)/2),($-=z*2)>bn?(z*=b?1:-1,v+=z,x-=z):($=0,v=x=(h+p)/2)}var j=d*$o(v),Z=d*Rr(v),J=f*$o(_),ie=f*Rr(_);if(M>bn){var he=d*$o(x),_e=d*Rr(x),oe=f*$o(y),ve=f*Rr(y),we;if(g<no&&(we=ZG(j,Z,oe,ve,he,_e,J,ie))){var Oe=j-we[0],xe=Z-we[1],Xe=he-we[0],Ve=_e-we[1],de=1/Rr(VG((Oe*Xe+xe*Ve)/(Ia(Oe*Oe+xe*xe)*Ia(Xe*Xe+Ve*Ve)))/2),Ee=Ia(we[0]*we[0]+we[1]*we[1]);P=Lp(M,(f-Ee)/(de-1)),R=Lp(M,(d-Ee)/(de+1))}}$>bn?R>bn?(C=$c(oe,ve,j,Z,d,R,b),E=$c(he,_e,J,ie,d,R,b),s.moveTo(C.cx+C.x01,C.cy+C.y01),R<M?s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,d,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),!b),s.arc(E.cx,E.cy,R,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):(s.moveTo(j,Z),s.arc(0,0,d,v,x,!b)):s.moveTo(j,Z),!(f>bn)||!(S>bn)?s.lineTo(J,ie):P>bn?(C=$c(J,ie,he,_e,f,-P,b),E=$c(j,Z,oe,ve,f,-P,b),s.lineTo(C.cx+C.x01,C.cy+C.y01),P<M?s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,f,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),b),s.arc(E.cx,E.cy,P,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):s.arc(0,0,f,_,y,b)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-no/2;return[$o(c)*u,Rr(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ft(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ft(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ft(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ft(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:ft(+u),l):i},l.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:ft(+u),l):o},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ft(+u),l):a},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function h6(e){this._context=e}h6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function oh(e){return new h6(e)}function Rb(e){return e[0]}function zb(e){return e[1]}function Cs(){var e=Rb,t=zb,n=ft(!0),r=null,i=oh,o=null;function a(s){var l,u=s.length,c,f=!1,d;for(r==null&&(o=i(d=ho())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,l,s),+t(c,l,s));if(d)return o=null,d+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:ft(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:ft(+s),a):t},a.defined=function(s){return arguments.length?(n=typeof s=="function"?s:ft(!!s),a):n},a.curve=function(s){return arguments.length?(i=s,r!=null&&(o=i(r)),a):i},a.context=function(s){return arguments.length?(s==null?r=o=null:o=i(r=s),a):r},a}function Fb(){var e=Rb,t=null,n=ft(0),r=zb,i=ft(!0),o=null,a=oh,s=null;function l(c){var f,d,h,p=c.length,g,b=!1,v,x=new Array(p),y=new Array(p);for(o==null&&(s=a(v=ho())),f=0;f<=p;++f){if(!(f<p&&i(g=c[f],f,c))===b)if(b=!b)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=f-1;h>=d;--h)s.point(x[h],y[h]);s.lineEnd(),s.areaEnd()}b&&(x[f]=+e(g,f,c),y[f]=+n(g,f,c),s.point(t?+t(g,f,c):x[f],r?+r(g,f,c):y[f]))}if(v)return s=null,v+""||null}function u(){return Cs().defined(i).curve(a).context(o)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:ft(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:ft(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:ft(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:ft(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:ft(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ft(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(i=typeof c=="function"?c:ft(!!c),l):i},l.curve=function(c){return arguments.length?(a=c,o!=null&&(s=a(o)),l):a},l.context=function(c){return arguments.length?(c==null?o=s=null:s=a(o=c),l):o},l}function QG(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function eY(e){return e}function tY(){var e=eY,t=QG,n=null,r=ft(0),i=ft(Vi),o=ft(0);function a(s){var l,u=s.length,c,f,d=0,h=new Array(u),p=new Array(u),g=+r.apply(this,arguments),b=Math.min(Vi,Math.max(-Vi,i.apply(this,arguments)-g)),v,x=Math.min(Math.abs(b)/u,o.apply(this,arguments)),y=x*(b<0?-1:1),_;for(l=0;l<u;++l)(_=p[h[l]=l]=+e(s[l],l,s))>0&&(d+=_);for(t!=null?h.sort(function(S,$){return t(p[S],p[$])}):n!=null&&h.sort(function(S,$){return n(s[S],s[$])}),l=0,f=d?(b-u*y)/d:0;l<u;++l,g=v)c=h[l],_=p[c],v=g+(_>0?_*f:0)+y,p[c]={data:s[c],index:l,value:_,startAngle:g,endAngle:v,padAngle:x};return p}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:ft(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ft(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ft(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ft(+s),a):o},a}var p6=Ib(oh);function g6(e){this._curve=e}g6.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Ib(e){function t(n){return new g6(e(n))}return t._curve=e,t}function al(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Ib(n)):t()._curve},e}function px(){return al(Cs().curve(p6))}function gx(){var e=Fb().curve(p6),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return al(n())},delete e.lineX0,e.lineEndAngle=function(){return al(r())},delete e.lineX1,e.lineInnerRadius=function(){return al(i())},delete e.lineY0,e.lineOuterRadius=function(){return al(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Ib(a)):t()._curve},e}function sl(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Cg=Array.prototype.slice;function nY(e){return e.source}function rY(e){return e.target}function Bb(e){var t=nY,n=rY,r=Rb,i=zb,o=null;function a(){var s,l=Cg.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(o||(o=s=ho()),e(o,+r.apply(this,(l[0]=u,l)),+i.apply(this,l),+r.apply(this,(l[0]=c,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(n=s,a):n},a.x=function(s){return arguments.length?(r=typeof s=="function"?s:ft(+s),a):r},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:ft(+s),a):i},a.context=function(s){return arguments.length?(o=s??null,a):o},a}function iY(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function oY(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function aY(e,t,n,r,i){var o=sl(t,n),a=sl(t,n=(n+i)/2),s=sl(r,n),l=sl(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function sY(){return Bb(iY)}function lY(){return Bb(oY)}function uY(){var e=Bb(aY);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Ob={draw:function(e,t){var n=Math.sqrt(t/no);e.moveTo(n,0),e.arc(0,0,n,0,Vi)}},v6={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var b6=Math.sqrt(1/3),cY=b6*2;const m6={draw:function(e,t){var n=Math.sqrt(t/cY),r=n*b6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var dY=.8908130915292852,y6=Math.sin(no/10)/Math.sin(7*no/10),fY=Math.sin(Vi/10)*y6,hY=-Math.cos(Vi/10)*y6;const _6={draw:function(e,t){var n=Math.sqrt(t*dY),r=fY*n,i=hY*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=Vi*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},x6={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Dp=Math.sqrt(3);const w6={draw:function(e,t){var n=-Math.sqrt(t/(Dp*3));e.moveTo(0,n*2),e.lineTo(-Dp*n,-n),e.lineTo(Dp*n,-n),e.closePath()}};var tr=-.5,nr=Math.sqrt(3)/2,Sg=1/Math.sqrt(12),pY=(Sg/2+1)*3;const C6={draw:function(e,t){var n=Math.sqrt(t/pY),r=n/2,i=n*Sg,o=r,a=n*Sg+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(tr*r-nr*i,nr*r+tr*i),e.lineTo(tr*o-nr*a,nr*o+tr*a),e.lineTo(tr*s-nr*l,nr*s+tr*l),e.lineTo(tr*r+nr*i,tr*i-nr*r),e.lineTo(tr*o+nr*a,tr*a-nr*o),e.lineTo(tr*s+nr*l,tr*l-nr*s),e.closePath()}};var gY=[Ob,v6,m6,x6,_6,w6,C6];function Nb(){var e=ft(Ob),t=ft(64),n=null;function r(){var i;if(n||(n=i=ho()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:ft(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:ft(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function ro(){}function Qd(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ah(e){this._context=e}ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Qd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Qd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vY(e){return new ah(e)}function S6(e){this._context=e}S6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Qd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bY(e){return new S6(e)}function $6(e){this._context=e}$6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Qd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mY(e){return new $6(e)}function k6(e,t){this._basis=new ah(e),this._beta=t}k6.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const yY=function e(t){function n(r){return t===1?new ah(r):new k6(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function ef(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Lb(e,t){this._context=e,this._k=(1-t)/6}Lb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ef(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ef(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _Y=function e(t){function n(r){return new Lb(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Db(e,t){this._context=e,this._k=(1-t)/6}Db.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ef(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xY=function e(t){function n(r){return new Db(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Hb(e,t){this._context=e,this._k=(1-t)/6}Hb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ef(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wY=function e(t){function n(r){return new Hb(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ub(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>bn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bn){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function M6(e,t){this._context=e,this._alpha=t}M6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ub(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CY=function e(t){function n(r){return t?new M6(r,t):new Lb(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function T6(e,t){this._context=e,this._alpha=t}T6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ub(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const SY=function e(t){function n(r){return t?new T6(r,t):new Db(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function E6(e,t){this._context=e,this._alpha=t}E6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ub(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $Y=function e(t){function n(r){return t?new E6(r,t):new Hb(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function A6(e){this._context=e}A6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function kY(e){return new A6(e)}function vx(e){return e<0?-1:1}function bx(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(vx(o)+vx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function mx(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Hp(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function tf(e){this._context=e}tf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Hp(this,this._t0,mx(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Hp(this,mx(this,n=bx(this,e,t)),n);break;default:Hp(this,this._t0,n=bx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function P6(e){this._context=new R6(e)}(P6.prototype=Object.create(tf.prototype)).point=function(e,t){tf.prototype.point.call(this,t,e)};function R6(e){this._context=e}R6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function MY(e){return new tf(e)}function TY(e){return new P6(e)}function z6(e){this._context=e}z6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=yx(e),i=yx(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function yx(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function F6(e){return new z6(e)}function sh(e,t){this._context=e,this._t=t}sh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function EY(e){return new sh(e,.5)}function AY(e){return new sh(e,0)}function PY(e){return new sh(e,1)}function fs(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function hs(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function RY(e,t){return e[t]}function zY(){var e=ft([]),t=hs,n=fs,r=RY;function i(o){var a=e.apply(this,arguments),s,l=o.length,u=a.length,c=new Array(u),f;for(s=0;s<u;++s){for(var d=a[s],h=c[s]=new Array(l),p=0,g;p<l;++p)h[p]=g=[0,+r(o[p],d,p,o)],g.data=o[p];h.key=d}for(s=0,f=t(c);s<u;++s)c[f[s]].index=s;return n(c,f),c}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ft(Cg.call(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ft(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?hs:typeof o=="function"?o:ft(Cg.call(o)),i):t},i.offset=function(o){return arguments.length?(n=o??fs,i):n},i}function FY(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}fs(e,t)}}function IY(e,t){if((l=e.length)>0)for(var n,r=0,i,o,a,s,l,u=e[t[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function BY(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}fs(e,t)}}function OY(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=e[t[s]],f=c[r][1]||0,d=c[r-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var g=e[t[p]],b=g[r][1]||0,v=g[r-1][1]||0;h+=b-v}l+=f,u+=h*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,fs(e,t)}}function I6(e){var t=e.map(NY);return hs(e).sort(function(n,r){return t[n]-t[r]})}function NY(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function B6(e){var t=e.map(O6);return hs(e).sort(function(n,r){return t[n]-t[r]})}function O6(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function LY(e){return B6(e).reverse()}function DY(e){var t=e.length,n,r,i=e.map(O6),o=I6(e),a=0,s=0,l=[],u=[];for(n=0;n<t;++n)r=o[n],a<s?(a+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)}function HY(e){return hs(e).reverse()}function _x(e){return function(){return e}}function UY(e){return e[0]}function jY(e){return e[1]}function nf(){this._=null}function lh(e){e.U=e.C=e.L=e.R=e.P=e.N=null}nf.prototype={constructor:nf,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=xx(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Ds(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Hs(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Hs(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Ds(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,n,r=e.L,i=e.R,o,a;if(r?i?o=xx(i):o=r:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,r&&i?(a=o.C,o.C=e.C,o.L=r,r.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(n=t.R,n.C&&(n.C=!1,t.C=!0,Ds(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,Hs(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Ds(this,t),e=this._;break}}else if(n=t.L,n.C&&(n.C=!1,t.C=!0,Hs(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Ds(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,Hs(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function Ds(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Hs(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function xx(e){for(;e.L;)e=e.L;return e}function ll(e,t,n,r){var i=[null,null],o=mn.push(i)-1;return i.left=e,i.right=t,n&&rf(i,e,t,n),r&&rf(i,t,e,r),Gn[e.index].halfedges.push(o),Gn[t.index].halfedges.push(o),i}function Us(e,t,n){var r=[t,n];return r.left=e,r}function rf(e,t,n,r){!e[0]&&!e[1]?(e[0]=r,e.left=t,e.right=n):e.left===n?e[1]=r:e[0]=r}function WY(e,t,n,r,i){var o=e[0],a=e[1],s=o[0],l=o[1],u=a[0],c=a[1],f=0,d=1,h=u-s,p=c-l,g;if(g=t-s,!(!h&&g>0)){if(g/=h,h<0){if(g<f)return;g<d&&(d=g)}else if(h>0){if(g>d)return;g>f&&(f=g)}if(g=r-s,!(!h&&g<0)){if(g/=h,h<0){if(g>d)return;g>f&&(f=g)}else if(h>0){if(g<f)return;g<d&&(d=g)}if(g=n-l,!(!p&&g>0)){if(g/=p,p<0){if(g<f)return;g<d&&(d=g)}else if(p>0){if(g>d)return;g>f&&(f=g)}if(g=i-l,!(!p&&g<0)){if(g/=p,p<0){if(g>d)return;g>f&&(f=g)}else if(p>0){if(g<f)return;g<d&&(d=g)}return!(f>0)&&!(d<1)||(f>0&&(e[0]=[s+f*h,l+f*p]),d<1&&(e[1]=[s+d*h,l+d*p])),!0}}}}}function VY(e,t,n,r,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,u=s[0],c=s[1],f=l[0],d=l[1],h=(u+f)/2,p=(c+d)/2,g,b;if(d===c){if(h<t||h>=r)return;if(u>f){if(!a)a=[h,n];else if(a[1]>=i)return;o=[h,i]}else{if(!a)a=[h,i];else if(a[1]<n)return;o=[h,n]}}else if(g=(u-f)/(d-c),b=p-g*h,g<-1||g>1)if(u>f){if(!a)a=[(n-b)/g,n];else if(a[1]>=i)return;o=[(i-b)/g,i]}else{if(!a)a=[(i-b)/g,i];else if(a[1]<n)return;o=[(n-b)/g,n]}else if(c<d){if(!a)a=[t,g*t+b];else if(a[0]>=r)return;o=[r,g*r+b]}else{if(!a)a=[r,g*r+b];else if(a[0]<t)return;o=[t,g*t+b]}return e[0]=a,e[1]=o,!0}function qY(e,t,n,r){for(var i=mn.length,o;i--;)(!VY(o=mn[i],e,t,n,r)||!WY(o,e,t,n,r)||!(Math.abs(o[0][0]-o[1][0])>Pt||Math.abs(o[0][1]-o[1][1])>Pt))&&delete mn[i]}function GY(e){return Gn[e.index]={site:e,halfedges:[]}}function YY(e,t){var n=e.site,r=t.left,i=t.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=t[1],i=t[0]):(r=t[0],i=t[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function N6(e,t){return t[+(t.left!==e.site)]}function XY(e,t){return t[+(t.left===e.site)]}function KY(){for(var e=0,t=Gn.length,n,r,i,o;e<t;++e)if((n=Gn[e])&&(o=(r=n.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=YY(n,mn[r[i]]);for(a.sort(function(l,u){return s[u]-s[l]}),i=0;i<o;++i)s[i]=r[a[i]];for(i=0;i<o;++i)r[i]=s[i]}}function ZY(e,t,n,r){var i=Gn.length,o,a,s,l,u,c,f,d,h,p,g,b,v=!0;for(o=0;o<i;++o)if(a=Gn[o]){for(s=a.site,u=a.halfedges,l=u.length;l--;)mn[u[l]]||u.splice(l,1);for(l=0,c=u.length;l<c;)p=XY(a,mn[u[l]]),g=p[0],b=p[1],f=N6(a,mn[u[++l%c]]),d=f[0],h=f[1],(Math.abs(g-d)>Pt||Math.abs(b-h)>Pt)&&(u.splice(l,0,mn.push(Us(s,p,Math.abs(g-e)<Pt&&r-b>Pt?[e,Math.abs(d-e)<Pt?h:r]:Math.abs(b-r)<Pt&&n-g>Pt?[Math.abs(h-r)<Pt?d:n,r]:Math.abs(g-n)<Pt&&b-t>Pt?[n,Math.abs(d-n)<Pt?h:t]:Math.abs(b-t)<Pt&&g-e>Pt?[Math.abs(h-t)<Pt?d:e,t]:null))-1),++c);c&&(v=!1)}if(v){var x,y,_,S=1/0;for(o=0,v=null;o<i;++o)(a=Gn[o])&&(s=a.site,x=s[0]-e,y=s[1]-t,_=x*x+y*y,_<S&&(S=_,v=a));if(v){var $=[e,t],w=[e,r],T=[n,r],M=[n,t];v.halfedges.push(mn.push(Us(s=v.site,$,w))-1,mn.push(Us(s,w,T))-1,mn.push(Us(s,T,M))-1,mn.push(Us(s,M,$))-1)}}for(o=0;o<i;++o)(a=Gn[o])&&(a.halfedges.length||delete Gn[o])}var L6=[],jb;function JY(){lh(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ba(e){var t=e.P,n=e.N;if(!(!t||!n)){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i[0],s=i[1],l=r[0]-a,u=r[1]-s,c=o[0]-a,f=o[1]-s,d=2*(l*f-u*c);if(!(d>=-1e-12)){var h=l*l+u*u,p=c*c+f*f,g=(f*h-u*p)/d,b=(l*p-c*h)/d,v=L6.pop()||new JY;v.arc=e,v.site=i,v.x=g+a,v.y=(v.cy=b+s)+Math.sqrt(g*g+b*b),e.circle=v;for(var x=null,y=hu._;y;)if(v.y<y.y||v.y===y.y&&v.x<=y.x)if(y.L)y=y.L;else{x=y.P;break}else if(y.R)y=y.R;else{x=y;break}hu.insert(x,v),x||(jb=v)}}}}function Ya(e){var t=e.circle;t&&(t.P||(jb=t.N),hu.remove(t),L6.push(t),lh(t),e.circle=null)}var D6=[];function QY(){lh(this),this.edge=this.site=this.circle=null}function wx(e){var t=D6.pop()||new QY;return t.site=e,t}function Up(e){Ya(e),Xa.remove(e),D6.push(e),lh(e)}function eX(e){var t=e.circle,n=t.x,r=t.cy,i=[n,r],o=e.P,a=e.N,s=[e];Up(e);for(var l=o;l.circle&&Math.abs(n-l.circle.x)<Pt&&Math.abs(r-l.circle.cy)<Pt;)o=l.P,s.unshift(l),Up(l),l=o;s.unshift(l),Ya(l);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<Pt&&Math.abs(r-u.circle.cy)<Pt;)a=u.N,s.push(u),Up(u),u=a;s.push(u),Ya(u);var c=s.length,f;for(f=1;f<c;++f)u=s[f],l=s[f-1],rf(u.edge,l.site,u.site,i);l=s[0],u=s[c-1],u.edge=ll(l.site,u.site,null,i),Ba(l),Ba(u)}function tX(e){for(var t=e[0],n=e[1],r,i,o,a,s=Xa._;s;)if(o=H6(s,n)-t,o>Pt)s=s.L;else if(a=t-nX(s,n),a>Pt){if(!s.R){r=s;break}s=s.R}else{o>-1e-6?(r=s.P,i=s):a>-1e-6?(r=s,i=s.N):r=i=s;break}GY(e);var l=wx(e);if(Xa.insert(r,l),!(!r&&!i)){if(r===i){Ya(r),i=wx(r.site),Xa.insert(l,i),l.edge=i.edge=ll(r.site,l.site),Ba(r),Ba(i);return}if(!i){l.edge=ll(r.site,l.site);return}Ya(r),Ya(i);var u=r.site,c=u[0],f=u[1],d=e[0]-c,h=e[1]-f,p=i.site,g=p[0]-c,b=p[1]-f,v=2*(d*b-h*g),x=d*d+h*h,y=g*g+b*b,_=[(b*x-h*y)/v+c,(d*y-g*x)/v+f];rf(i.edge,u,p,_),l.edge=ll(u,e,null,_),i.edge=ll(e,p,null,_),Ba(r),Ba(i)}}function H6(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;n=a.site;var s=n[0],l=n[1],u=l-t;if(!u)return s;var c=s-r,f=1/o-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-l+u/2+i-o/2)))/f+r:(r+s)/2}function nX(e,t){var n=e.N;if(n)return H6(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var Pt=1e-6,Xa,Gn,hu,mn;function rX(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function iX(e,t){return t[1]-e[1]||t[0]-e[0]}function $g(e,t){var n=e.sort(iX).pop(),r,i,o;for(mn=[],Gn=new Array(e.length),Xa=new nf,hu=new nf;;)if(o=jb,n&&(!o||n[1]<o.y||n[1]===o.y&&n[0]<o.x))(n[0]!==r||n[1]!==i)&&(tX(n),r=n[0],i=n[1]),n=e.pop();else if(o)eX(o.arc);else break;if(KY(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],u=+t[1][1];qY(a,s,l,u),ZY(a,s,l,u)}this.edges=mn,this.cells=Gn,Xa=hu=mn=Gn=null}$g.prototype={constructor:$g,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(r){return N6(t,e[r])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,r){if(s=(o=n.halfedges).length)for(var i=n.site,o,a=-1,s,l,u=t[o[s-1]],c=u.left===i?u.right:u.left;++a<s;)l=c,u=t[o[a]],c=u.left===i?u.right:u.left,l&&c&&r<l.index&&r<c.index&&rX(i,l,c)<0&&e.push([i.data,l.data,c.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,n){for(var r=this,i,o=r._found||0,a=r.cells.length,s;!(s=r.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],u=t-s.site[1],c=l*l+u*u;do s=r.cells[i=o],o=null,s.halfedges.forEach(function(f){var d=r.edges[f],h=d.left;if(!((h===s.site||!h)&&!(h=d.right))){var p=e-h[0],g=t-h[1],b=p*p+g*g;b<c&&(c=b,o=h.index)}});while(o!==null);return r._found=i,n==null||c<=n*n?s.site:null}};function oX(){var e=UY,t=jY,n=null;function r(i){return new $g(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Pt)*Pt,Math.round(t(o,a,i)/Pt)*Pt];return s.index=a,s.data=o,s}),n)}return r.polygons=function(i){return r(i).polygons()},r.links=function(i){return r(i).links()},r.triangles=function(i){return r(i).triangles()},r.x=function(i){return arguments.length?(e=typeof i=="function"?i:_x(+i),r):e},r.y=function(i){return arguments.length?(t=typeof i=="function"?i:_x(+i),r):t},r.extent=function(i){return arguments.length?(n=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(i){return arguments.length?(n=i==null?null:[[0,0],[+i[0],+i[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function kc(e){return function(){return e}}function aX(e,t,n){this.target=e,this.type=t,this.transform=n}function ui(e,t,n){this.k=e,this.x=t,this.y=n}ui.prototype={constructor:ui,scale:function(e){return e===1?this:new ui(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ui(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var uh=new ui(1,0,0);U6.prototype=ui.prototype;function U6(e){for(;!e.__zoom;)if(!(e=e.parentNode))return uh;return e.__zoom}function jp(){Ce.stopImmediatePropagation()}function js(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function sX(){return!Ce.ctrlKey&&!Ce.button}function lX(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Cx(){return this.__zoom||uh}function uX(){return-Ce.deltaY*(Ce.deltaMode===1?.05:Ce.deltaMode?1:.002)}function cX(){return navigator.maxTouchPoints||"ontouchstart"in this}function dX(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function fX(){var e=sX,t=lX,n=dX,r=uX,i=cX,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=z8,u=ha("start","zoom","end"),c,f,d=500,h=150,p=0;function g(C){C.property("__zoom",Cx).on("wheel.zoom",$).on("mousedown.zoom",w).on("dblclick.zoom",T).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(C,E,F){var z=C.selection?C.selection():C;z.property("__zoom",Cx),C!==z?y(C,E,F):z.interrupt().each(function(){_(this,arguments).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},g.scaleBy=function(C,E,F){g.scaleTo(C,function(){var z=this.__zoom.k,j=typeof E=="function"?E.apply(this,arguments):E;return z*j},F)},g.scaleTo=function(C,E,F){g.transform(C,function(){var z=t.apply(this,arguments),j=this.__zoom,Z=F==null?x(z):typeof F=="function"?F.apply(this,arguments):F,J=j.invert(Z),ie=typeof E=="function"?E.apply(this,arguments):E;return n(v(b(j,ie),Z,J),z,a)},F)},g.translateBy=function(C,E,F){g.transform(C,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),a)})},g.translateTo=function(C,E,F,z){g.transform(C,function(){var j=t.apply(this,arguments),Z=this.__zoom,J=z==null?x(j):typeof z=="function"?z.apply(this,arguments):z;return n(uh.translate(J[0],J[1]).scale(Z.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof F=="function"?-F.apply(this,arguments):-F),j,a)},z)};function b(C,E){return E=Math.max(o[0],Math.min(o[1],E)),E===C.k?C:new ui(E,C.x,C.y)}function v(C,E,F){var z=E[0]-F[0]*C.k,j=E[1]-F[1]*C.k;return z===C.x&&j===C.y?C:new ui(C.k,z,j)}function x(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function y(C,E,F){C.on("start.zoom",function(){_(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).end()}).tween("zoom",function(){var z=this,j=arguments,Z=_(z,j),J=t.apply(z,j),ie=F==null?x(J):typeof F=="function"?F.apply(z,j):F,he=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),_e=z.__zoom,oe=typeof E=="function"?E.apply(z,j):E,ve=l(_e.invert(ie).concat(he/_e.k),oe.invert(ie).concat(he/oe.k));return function(we){if(we===1)we=oe;else{var Oe=ve(we),xe=he/Oe[2];we=new ui(xe,ie[0]-Oe[0]*xe,ie[1]-Oe[1]*xe)}Z.zoom(null,we)}})}function _(C,E,F){return!F&&C.__zooming||new S(C,E)}function S(C,E){this.that=C,this.args=E,this.active=0,this.extent=t.apply(C,E),this.taps=0}S.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,E){return this.mouse&&C!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){ql(new aX(g,C,this.that.__zoom),u.apply,u,[C,this.that,this.args])}};function $(){if(!e.apply(this,arguments))return;var C=_(this,arguments),E=this.__zoom,F=Math.max(o[0],Math.min(o[1],E.k*Math.pow(2,r.apply(this,arguments)))),z=lr(this);if(C.wheel)(C.mouse[0][0]!==z[0]||C.mouse[0][1]!==z[1])&&(C.mouse[1]=E.invert(C.mouse[0]=z)),clearTimeout(C.wheel);else{if(E.k===F)return;C.mouse=[z,E.invert(z)],Uo(this),C.start()}js(),C.wheel=setTimeout(j,h),C.zoom("mouse",n(v(b(E,F),C.mouse[0],C.mouse[1]),C.extent,a));function j(){C.wheel=null,C.end()}}function w(){if(f||!e.apply(this,arguments))return;var C=_(this,arguments,!0),E=Ue(Ce.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",J,!0),F=lr(this),z=Ce.clientX,j=Ce.clientY;Of(Ce.view),jp(),C.mouse=[F,this.__zoom.invert(F)],Uo(this),C.start();function Z(){if(js(),!C.moved){var ie=Ce.clientX-z,he=Ce.clientY-j;C.moved=ie*ie+he*he>p}C.zoom("mouse",n(v(C.that.__zoom,C.mouse[0]=lr(C.that),C.mouse[1]),C.extent,a))}function J(){E.on("mousemove.zoom mouseup.zoom",null),Nf(Ce.view,C.moved),js(),C.end()}}function T(){if(e.apply(this,arguments)){var C=this.__zoom,E=lr(this),F=C.invert(E),z=C.k*(Ce.shiftKey?.5:2),j=n(v(b(C,z),E,F),t.apply(this,arguments),a);js(),s>0?Ue(this).transition().duration(s).call(y,j,E):Ue(this).call(g.transform,j)}}function M(){if(e.apply(this,arguments)){var C=Ce.touches,E=C.length,F=_(this,arguments,Ce.changedTouches.length===E),z,j,Z,J;for(jp(),j=0;j<E;++j)Z=C[j],J=Gl(this,C,Z.identifier),J=[J,this.__zoom.invert(J),Z.identifier],F.touch0?!F.touch1&&F.touch0[2]!==J[2]&&(F.touch1=J,F.taps=0):(F.touch0=J,z=!0,F.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(F.taps<2&&(c=setTimeout(function(){c=null},d)),Uo(this),F.start())}}function P(){if(this.__zooming){var C=_(this,arguments),E=Ce.changedTouches,F=E.length,z,j,Z,J;for(js(),c&&(c=clearTimeout(c)),C.taps=0,z=0;z<F;++z)j=E[z],Z=Gl(this,E,j.identifier),C.touch0&&C.touch0[2]===j.identifier?C.touch0[0]=Z:C.touch1&&C.touch1[2]===j.identifier&&(C.touch1[0]=Z);if(j=C.that.__zoom,C.touch1){var ie=C.touch0[0],he=C.touch0[1],_e=C.touch1[0],oe=C.touch1[1],ve=(ve=_e[0]-ie[0])*ve+(ve=_e[1]-ie[1])*ve,we=(we=oe[0]-he[0])*we+(we=oe[1]-he[1])*we;j=b(j,Math.sqrt(ve/we)),Z=[(ie[0]+_e[0])/2,(ie[1]+_e[1])/2],J=[(he[0]+oe[0])/2,(he[1]+oe[1])/2]}else if(C.touch0)Z=C.touch0[0],J=C.touch0[1];else return;C.zoom("touch",n(v(j,Z,J),C.extent,a))}}function R(){if(this.__zooming){var C=_(this,arguments),E=Ce.changedTouches,F=E.length,z,j;for(jp(),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),z=0;z<F;++z)j=E[z],C.touch0&&C.touch0[2]===j.identifier?delete C.touch0:C.touch1&&C.touch1[2]===j.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2){var Z=Ue(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return g.wheelDelta=function(C){return arguments.length?(r=typeof C=="function"?C:kc(+C),g):r},g.filter=function(C){return arguments.length?(e=typeof C=="function"?C:kc(!!C),g):e},g.touchable=function(C){return arguments.length?(i=typeof C=="function"?C:kc(!!C),g):i},g.extent=function(C){return arguments.length?(t=typeof C=="function"?C:kc([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),g):t},g.scaleExtent=function(C){return arguments.length?(o[0]=+C[0],o[1]=+C[1],g):[o[0],o[1]]},g.translateExtent=function(C){return arguments.length?(a[0][0]=+C[0][0],a[1][0]=+C[1][0],a[0][1]=+C[0][1],a[1][1]=+C[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(C){return arguments.length?(n=C,g):n},g.duration=function(C){return arguments.length?(s=+C,g):s},g.interpolate=function(C){return arguments.length?(l=C,g):l},g.on=function(){var C=u.on.apply(u,arguments);return C===u?g:C},g.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,g):Math.sqrt(p)},g}const j6=Object.freeze(Object.defineProperty({__proto__:null,FormatSpecifier:Xf,active:ND,arc:JG,area:Fb,areaRadial:gx,ascending:Sr,autoType:UH,axisBottom:Y5,axisLeft:X5,axisRight:Ev,axisTop:G5,bisect:Ji,bisectLeft:$B,bisectRight:Ji,bisector:$v,blob:VH,brush:ZD,brushSelection:YD,brushX:XD,brushY:KD,buffer:GH,chord:QD,clientPoint:Bf,cluster:aW,color:eo,contourDensity:kH,contours:K8,create:bN,creator:Ff,cross:MB,csv:KH,csvFormat:PH,csvFormatBody:RH,csvFormatRow:FH,csvFormatRows:zH,csvFormatValue:IH,csvParse:J8,csvParseRows:AH,cubehelix:$r,curveBasis:vY,curveBasisClosed:bY,curveBasisOpen:mY,curveBundle:yY,curveCardinal:_Y,curveCardinalClosed:xY,curveCardinalOpen:wY,curveCatmullRom:CY,curveCatmullRomClosed:SY,curveCatmullRomOpen:$Y,curveLinear:oh,curveLinearClosed:kY,curveMonotoneX:MY,curveMonotoneY:TY,curveNatural:F6,curveStep:EY,curveStepAfter:PY,curveStepBefore:AY,customEvent:ql,descending:TB,deviation:U5,dispatch:ha,drag:B0,dragDisable:Of,dragEnable:Nf,dsv:XH,dsvFormat:qf,easeBack:Ly,easeBackIn:PD,easeBackInOut:Ly,easeBackOut:RD,easeBounce:Ql,easeBounceIn:ED,easeBounceInOut:AD,easeBounceOut:Ql,easeCircle:Ny,easeCircleIn:yD,easeCircleInOut:Ny,easeCircleOut:_D,easeCubic:W0,easeCubicIn:dD,easeCubicInOut:W0,easeCubicOut:fD,easeElastic:Dy,easeElasticIn:zD,easeElasticInOut:FD,easeElasticOut:Dy,easeExp:Oy,easeExpIn:bD,easeExpInOut:Oy,easeExpOut:mD,easeLinear:lD,easePoly:Iy,easePolyIn:hD,easePolyInOut:Iy,easePolyOut:pD,easeQuad:Fy,easeQuadIn:uD,easeQuadInOut:Fy,easeQuadOut:cD,easeSin:By,easeSinIn:gD,easeSinInOut:By,easeSinOut:vD,entries:hH,get event(){return Ce},extent:qo,forceCenter:iU,forceCollide:CU,forceLink:$U,forceManyBody:PU,forceRadial:RU,forceSimulation:AU,forceX:zU,forceY:FU,get format(){return Kf},formatDefaultLocale:i3,formatLocale:r3,get formatPrefix(){return Kv},formatSpecifier:tu,geoAlbers:U3,geoAlbersUsa:Nj,geoArea:WU,geoAzimuthalEqualArea:Lj,geoAzimuthalEqualAreaRaw:ab,geoAzimuthalEquidistant:Dj,geoAzimuthalEquidistantRaw:sb,geoBounds:YU,geoCentroid:ej,geoCircle:tj,geoClipAntimeridian:sg,geoClipCircle:k3,geoClipExtent:lj,geoClipRectangle:Zf,geoConicConformal:Uj,geoConicConformalRaw:V3,geoConicEqualArea:qd,geoConicEqualAreaRaw:H3,geoConicEquidistant:Wj,geoConicEquidistantRaw:q3,geoContains:gj,geoDistance:Ld,geoEqualEarth:qj,geoEqualEarthRaw:lb,geoEquirectangular:jj,geoEquirectangularRaw:ou,geoGnomonic:Gj,geoGnomonicRaw:ub,geoGraticule:E3,geoGraticule10:vj,geoIdentity:Yj,geoInterpolate:bj,geoLength:M3,geoMercator:Hj,geoMercatorRaw:Mu,geoNaturalEarth1:Xj,geoNaturalEarth1Raw:cb,geoOrthographic:Kj,geoOrthographicRaw:db,geoPath:Tj,geoProjection:Jr,geoProjectionMutator:ib,geoRotation:_3,geoStereographic:Zj,geoStereographicRaw:fb,geoStream:br,geoTransform:Ej,geoTransverseMercator:Jj,geoTransverseMercatorRaw:hb,gray:zN,hcl:bd,hierarchy:pb,histogram:RB,hsl:pd,html:nU,image:JH,interpolate:ys,interpolateArray:LN,interpolateBasis:y8,interpolateBasisClosed:_8,interpolateBlues:$G,interpolateBrBG:iG,interpolateBuGn:hG,interpolateBuPu:pG,interpolateCividis:PG,interpolateCool:FG,interpolateCubehelix:eL,interpolateCubehelixDefault:RG,interpolateCubehelixLong:Uf,interpolateDate:k8,interpolateDiscrete:UN,interpolateGnBu:gG,interpolateGreens:kG,interpolateGreys:MG,interpolateHcl:JN,interpolateHclLong:QN,interpolateHsl:XN,interpolateHslLong:KN,interpolateHue:jN,interpolateInferno:UG,interpolateLab:ZN,interpolateMagma:HG,interpolateNumber:or,interpolateNumberArray:Lv,interpolateObject:M8,interpolateOrRd:vG,interpolateOranges:AG,interpolatePRGn:oG,interpolatePiYG:aG,interpolatePlasma:jG,interpolatePuBu:mG,interpolatePuBuGn:bG,interpolatePuOr:sG,interpolatePuRd:yG,interpolatePurples:TG,interpolateRainbow:IG,interpolateRdBu:lG,interpolateRdGy:uG,interpolateRdPu:_G,interpolateRdYlBu:cG,interpolateRdYlGn:dG,interpolateReds:EG,interpolateRgb:Kl,interpolateRgbBasis:C8,interpolateRgbBasisClosed:NN,interpolateRound:T8,interpolateSinebow:NG,interpolateSpectral:fG,interpolateString:Dv,interpolateTransformCss:P8,interpolateTransformSvg:R8,interpolateTurbo:LG,interpolateViridis:DG,interpolateWarm:zG,interpolateYlGn:wG,interpolateYlGnBu:xG,interpolateYlOrBr:CG,interpolateYlOrRd:SG,interpolateZoom:z8,interrupt:Uo,interval:aL,isoFormat:Nq,isoParse:Dq,json:eU,keys:dH,lab:vd,lch:FN,line:Cs,lineRadial:px,linkHorizontal:sY,linkRadial:uY,linkVertical:lY,local:i8,map:hi,matcher:Pv,max:W5,mean:IB,median:BB,merge:Tv,min:V5,mouse:lr,namespace:wu,namespaces:z0,nest:lH,now:_s,pack:PW,packEnclose:Y3,packSiblings:TW,pairs:kB,partition:RW,path:ho,permute:OB,pie:tY,piecewise:tL,pointRadial:sl,polygonArea:GW,polygonCentroid:YW,polygonContains:JW,polygonHull:ZW,polygonLength:QW,precisionFixed:o3,precisionPrefix:a3,precisionRound:s3,quadtree:Yf,quantile:Vl,quantize:nL,radialArea:gx,radialLine:px,randomBates:nV,randomExponential:rV,randomIrwinHall:rC,randomLogNormal:tV,randomNormal:nC,randomUniform:eV,range:Jn,rgb:is,ribbon:sH,scaleBand:vb,scaleDiverging:OC,scaleDivergingLog:NC,scaleDivergingPow:Pb,scaleDivergingSqrt:Gq,scaleDivergingSymlog:LC,scaleIdentity:lC,scaleImplicit:_g,scaleLinear:au,scaleLog:cC,scaleOrdinal:gb,scalePoint:iV,scalePow:_b,scaleQuantile:fC,scaleQuantize:hC,scaleSequential:zC,scaleSequentialLog:FC,scaleSequentialPow:Ab,scaleSequentialQuantile:BC,scaleSequentialSqrt:qq,scaleSequentialSymlog:IC,scaleSqrt:gV,scaleSymlog:dC,scaleThreshold:pC,scaleTime:Wq,scaleUtc:Vq,scan:NB,schemeAccent:Xq,schemeBlues:s6,schemeBrBG:DC,schemeBuGn:XC,schemeBuPu:KC,schemeCategory10:Yq,schemeDark2:Kq,schemeGnBu:ZC,schemeGreens:l6,schemeGreys:u6,schemeOrRd:JC,schemeOranges:f6,schemePRGn:HC,schemePaired:Zq,schemePastel1:Jq,schemePastel2:Qq,schemePiYG:UC,schemePuBu:e6,schemePuBuGn:QC,schemePuOr:jC,schemePuRd:t6,schemePurples:c6,schemeRdBu:WC,schemeRdGy:VC,schemeRdPu:n6,schemeRdYlBu:qC,schemeRdYlGn:GC,schemeReds:d6,schemeSet1:eG,schemeSet2:tG,schemeSet3:nG,schemeSpectral:YC,schemeTableau10:rG,schemeYlGn:i6,schemeYlGnBu:r6,schemeYlOrBr:o6,schemeYlOrRd:a6,select:Ue,selectAll:o8,selection:pa,selector:If,selectorAll:Av,set:Y8,shuffle:LB,stack:zY,stackOffsetDiverging:IY,stackOffsetExpand:FY,stackOffsetNone:fs,stackOffsetSilhouette:BY,stackOffsetWiggle:OY,stackOrderAppearance:I6,stackOrderAscending:B6,stackOrderDescending:LY,stackOrderInsideOut:DY,stackOrderNone:hs,stackOrderReverse:HY,stratify:BW,style:Yo,sum:DB,svg:rU,symbol:Nb,symbolCircle:Ob,symbolCross:v6,symbolDiamond:m6,symbolSquare:x6,symbolStar:_6,symbolTriangle:w6,symbolWye:C6,symbols:gY,text:Gf,thresholdFreedmanDiaconis:zB,thresholdScott:FB,thresholdSturges:Mv,tickFormat:sC,tickIncrement:wl,tickStep:Go,ticks:kv,timeDay:Au,timeDays:mV,get timeFormat(){return Mb},timeFormatDefaultLocale:PC,timeFormatLocale:$C,timeFriday:yC,timeFridays:CV,timeHour:wb,timeHours:bV,timeInterval:Qt,timeMillisecond:ea,timeMilliseconds:Z_,timeMinute:xb,timeMinutes:vV,timeMonday:uu,timeMondays:yV,timeMonth:Cb,timeMonths:$V,get timeParse(){return AC},timeSaturday:_C,timeSaturdays:SV,timeSecond:su,timeSeconds:J_,timeSunday:lu,timeSundays:Q_,timeThursday:na,timeThursdays:wV,timeTuesday:bC,timeTuesdays:_V,timeWednesday:mC,timeWednesdays:xV,timeWeek:lu,timeWeeks:Q_,timeYear:gi,timeYears:kV,timeout:D0,timer:Wf,timerFlush:L8,touch:Gl,touches:yN,transition:j8,transpose:q5,tree:UW,treemap:jW,treemapBinary:WW,treemapDice:Tu,treemapResquarify:qW,treemapSlice:Qf,treemapSliceDice:VW,treemapSquarify:tC,tsv:ZH,tsvFormat:OH,tsvFormatBody:NH,tsvFormatRow:DH,tsvFormatRows:LH,tsvFormatValue:HH,tsvParse:Q8,tsvParseRows:BH,utcDay:Pu,utcDays:EV,get utcFormat(){return th},utcFriday:CC,utcFridays:FV,utcHour:$b,utcHours:TV,utcMillisecond:ea,utcMilliseconds:Z_,utcMinute:Sb,utcMinutes:MV,utcMonday:du,utcMondays:AV,utcMonth:kb,utcMonths:BV,get utcParse(){return Tb},utcSaturday:SC,utcSaturdays:IV,utcSecond:su,utcSeconds:J_,utcSunday:cu,utcSundays:ex,utcThursday:ra,utcThursdays:zV,utcTuesday:xC,utcTuesdays:PV,utcWednesday:wC,utcWednesdays:RV,utcWeek:cu,utcWeeks:ex,utcYear:vi,utcYears:OV,values:fH,variance:H5,version:CB,voronoi:oX,window:Rv,xml:tU,zip:UB,zoom:fX,zoomIdentity:uh,zoomTransform:U6},Symbol.toStringTag,{value:"Module"})),qi={verbs:["highlight","select","fade","hide"],adjectives:["highlighted","selected","faded","hidden"]};function hX(e){return isNaN(e)||e<=0?null:Math.log(e)/Math.LN10}function pX(e){return isNaN(e)||e<=0?null:-Math.log(e)/Math.LN10}function gX(e){if(isNaN(e))return"NaN";if(e===0)return"1";const t=Math.ceil(e),n=t-e,r=Math.pow(10,n);return t===1?(r/10).toFixed(4):t===2?(r/100).toFixed(3):`${r.toFixed(2)} × 10^-${t}`}function vX(e){if(isNaN(e))return"NaN";if(e===0)return"0";const t=Math.abs(e);let n;return t>1?n=Math.ceil(Math.log(t)/Math.LN10):n=Math.floor(Math.log(t)/Math.LN10),Math.abs(n)<=3?e.toFixed(3):e.toExponential(2).replace("+","").replace("e"," × 10^")}function bX(e){return e?(e=`${e}`,e.replace(/['"<>&`]/g,function(t){switch(t){case"'":return"'";case'"':return""";case"<":return"<";case">":return">";case"&":return"&";case"`":return"`"}})):""}function mX(e){return typeof e=="number"}function yX(e){return encodeURIComponent(e)}const _X=Object.freeze(Object.defineProperty({__proto__:null,htmlescape:bX,is_numeric:mX,log10:hX,logtoscinotation:gX,neglog10:pX,scinotation:vX,urlencode:yX},Symbol.toStringTag,{value:"Module"}));class xX extends Zi{_collectTransforms(t){const n=t.match(/\|([^|]+)/g).map(r=>super.get(r.substring(1)));return r=>n.reduce((i,o)=>o(i),r)}get(t){return t?t.substring(0,1)==="|"?this._collectTransforms(t):super.get(t):null}}const Wb=new xX;for(let[e,t]of Object.entries(_X))Wb.add(e,t);class za{constructor(t){if(!/^(?:\w+:\w+|^\w+)(?:\|\w+)*$/.test(t))throw new Error(`Invalid field specifier: '${t}'`);const[r,...i]=t.split("|");this.full_name=t,this.field_name=r,this.transformations=i.map(o=>Wb.get(o))}_applyTransformations(t){return this.transformations.forEach(function(n){t=n(t)}),t}resolve(t,n){if(typeof t[this.full_name]>"u"){let r=null;t[this.field_name]!==void 0?r=t[this.field_name]:n&&n[this.field_name]!==void 0&&(r=n[this.field_name]),t[this.full_name]=this._applyTransformations(r)}return t[this.full_name]}}const Sx=/^(\*|[\w]+)/,wX=/^\[\?\(@((?:\.[\w]+)+) *===? *([0-9.eE-]+|"[^"]*"|'[^']*')\)\]/;function CX(e){if(e.substr(0,2)===".."){if(e[2]==="[")return{text:"..",attr:"*",depth:".."};const t=Sx.exec(e.substr(2));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dotdot_attr.`;return{text:`..${t[0]}`,attr:t[1],depth:".."}}else if(e[0]==="."){const t=Sx.exec(e.substr(1));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dot_attr.`;return{text:`.${t[0]}`,attr:t[1],depth:"."}}else if(e[0]==="["){const t=wX.exec(e);if(!t)throw`Cannot parse ${JSON.stringify(e)} as expr.`;let n;try{n=JSON.parse(t[2])}catch{n=JSON.parse(t[2].replace(/^'|'$/g,'"'))}return{text:t[0],attrs:t[1].substr(1).split("."),value:n}}else throw`The query ${JSON.stringify(e)} doesn't look valid.`}function SX(e){return e?(["$","["].includes(e[0])||(e=`$.${e}`),e[0]==="$"&&(e=e.substr(1)),e):""}function $X(e){e=SX(e);let t=[];for(;e.length;){const n=CX(e);e=e.substr(n.text.length),t.push(n)}return t}function W6(e,t){let n;for(let r of t)n=e,e=e[r];return[n,t[t.length-1],e]}function To(e,t){if(!t.length)return[[]];const n=t[0],r=t.slice(1);let i=[];if(n.attr&&n.depth==="."&&n.attr!=="*"){const a=e[n.attr];t.length===1?a!==void 0&&i.push([n.attr]):i.push(...To(a,r).map(s=>[n.attr].concat(s)))}else if(n.attr&&n.depth==="."&&n.attr==="*")for(let[a,s]of Object.entries(e))i.push(...To(s,r).map(l=>[a].concat(l)));else if(n.attr&&n.depth===".."){if(typeof e=="object"&&e!==null){n.attr!=="*"&&n.attr in e&&i.push(...To(e[n.attr],r).map(a=>[n.attr].concat(a)));for(let[a,s]of Object.entries(e))i.push(...To(s,t).map(l=>[a].concat(l))),n.attr==="*"&&i.push(...To(s,r).map(l=>[a].concat(l)))}}else if(n.attrs)for(let[a,s]of Object.entries(e)){const[l,u,c]=W6(s,n.attrs);c===n.value&&i.push(...To(s,r).map(f=>[a].concat(f)))}const o=kX(i,JSON.stringify);return o.sort((a,s)=>s.length-a.length||JSON.stringify(a).localeCompare(JSON.stringify(s))),o}function kX(e,t){return[...new Map(e.map(n=>[t(n),n])).values()]}function MX(e,t){let n=[];for(let r of To(e,t))n.push(W6(e,r));return n}function V6(e,t){const n=$X(t),r=MX(e,n);return r.length||console.warn(`No items matched the specified query: '${t}'`),r}function TX(e,t){return V6(e,t).map(n=>n[2])}function EX(e,t,n){return V6(e,t).map(([i,o,a])=>{const s=typeof n=="function"?n(a):n;return i[o]=s,s})}const Wp=Math.sqrt(3),AX={draw(e,t){const n=-Math.sqrt(t/(Wp*3));e.moveTo(0,-n*2),e.lineTo(-Wp*n,n),e.lineTo(Wp*n,n),e.closePath()}};function q6(e,t){if(t=t||{},!e||typeof e!="object"||typeof t!="object")throw new Error("Layout and shared namespaces must be provided as objects");for(let[n,r]of Object.entries(e))n==="namespace"?Object.keys(r).forEach(i=>{const o=t[i];o&&(r[i]=o)}):r!==null&&typeof r=="object"&&(e[n]=q6(r,t));return e}function qt(e,t){if(typeof e!="object"||typeof t!="object")throw new Error(`LocusZoom.Layouts.merge only accepts two layout objects; ${typeof e}, ${typeof t} given`);for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=e[n]===null?"undefined":typeof e[n],i=typeof t[n];if(r==="object"&&Array.isArray(e[n])&&(r="array"),i==="object"&&Array.isArray(t[n])&&(i="array"),r==="function"||i==="function")throw new Error("LocusZoom.Layouts.merge encountered an unsupported property type");if(r==="undefined"){e[n]=at(t[n]);continue}if(r==="object"&&i==="object"){e[n]=qt(e[n],t[n]);continue}}return e}function at(e){return JSON.parse(JSON.stringify(e))}function G6(e){if(!e)return null;if(e==="triangledown")return AX;const t=`symbol${e.charAt(0).toUpperCase()+e.slice(1)}`;return j6[t]||null}function Vb(e,t,n=null){const r=new Set;if(!n){if(!t.length)return r;const i=t.join("|");n=new RegExp(`(?:{{)?(?:#if *)?((?:${i}):\\w+)`,"g")}for(const i of Object.values(e)){const o=typeof i;let a=[];if(o==="string"){let s;for(;(s=n.exec(i))!==null;)a.push(s[1])}else if(i!==null&&o==="object")a=Vb(i,t,n);else continue;for(let s of a)r.add(s)}return r}function kg(e,t,n,r=!0){const i=typeof e;if(Array.isArray(e))return e.map(o=>kg(o,t,n,r));if(i==="object"&&e!==null)return Object.keys(e).reduce((o,a)=>(o[a]=kg(e[a],t,n,r),o),{});if(i!=="string")return e;{const o=t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(r){const s=new RegExp(`${o}\\|\\w+`,"g");(e.match(s)||[]).forEach(u=>console.warn(`renameFields is renaming a field that uses transform functions: was '${u}' . Verify that these transforms are still appropriate.`))}const a=new RegExp(`${o}(?!\\w+)`,"g");return e.replace(a,n)}}function PX(e,t,n){return EX(e,t,n)}function RX(e,t){return TX(e,t)}class zX{constructor(t,n,r){this._callable=_a.get(t),this._initiator=n,this._params=r||[]}getData(t,...n){const r={plot_state:t,data_layer:this._initiator};return Promise.resolve(this._callable(r,n,...this._params))}}class FX{constructor(t){this._sources=t}config_to_sources(t={},n=[],r){const i=new Map,o=Object.keys(t);let a=n.find(u=>u.type==="fetch");a||(a={type:"fetch",from:o},n.unshift(a));const s=/^\w+$/;for(let[u,c]of Object.entries(t)){if(!s.test(u))throw new Error(`Invalid namespace name: '${u}'. Must contain only alphanumeric characters`);const f=this._sources.get(c);if(!f)throw new Error(`A data layer has requested an item not found in DataSources: data type '${u}' from ${c}`);i.set(u,f),a.from.find(d=>d.split("(")[0]===u)||a.from.push(u)}let l=Array.from(a.from);for(let u of n){let{type:c,name:f,requires:d,params:h}=u;if(c!=="fetch"){let p=0;if(f||(f=u.name=`join${p}`,p+=1),i.has(f))throw new Error(`Configuration error: within a layer, join name '${f}' must be unique`);d.forEach(b=>{if(!i.has(b))throw new Error(`Data operation cannot operate on unknown provider '${b}'`)});const g=new zX(c,r,h);i.set(f,g),l.push(`${f}(${d.join(", ")})`)}}return[i,l]}getData(t,n,r){return r.length?dB(t,n,r,!0):Promise.resolve([])}}function Y6(){return{showing:!1,selector:null,content_selector:null,hide_delay:null,show:(e,t)=>(this.curtain.showing||(this.curtain.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-curtain").attr("id",`${this.id}.curtain`),this.curtain.content_selector=this.curtain.selector.append("div").attr("class","lz-curtain-content"),this.curtain.selector.append("div").attr("class","lz-curtain-dismiss").html("Dismiss").on("click",()=>this.curtain.hide()),this.curtain.showing=!0),this.curtain.update(e,t)),update:(e,t)=>{if(!this.curtain.showing)return this.curtain;clearTimeout(this.curtain.hide_delay),typeof t=="object"&&xn(this.curtain.selector,t);const n=this._getPageOrigin(),r=this.layout.height||this._total_height;return this.curtain.selector.style("top",`${n.y}px`).style("left",`${n.x}px`).style("width",`${this.parent_plot.layout.width}px`).style("height",`${r}px`),this.curtain.content_selector.style("max-width",`${this.parent_plot.layout.width-40}px`).style("max-height",`${r-40}px`),typeof e=="string"&&this.curtain.content_selector.html(e),this.curtain},hide:e=>this.curtain.showing?typeof e=="number"?(clearTimeout(this.curtain.hide_delay),this.curtain.hide_delay=setTimeout(this.curtain.hide,e),this.curtain):(this.curtain.selector.remove(),this.curtain.selector=null,this.curtain.content_selector=null,this.curtain.showing=!1,this.curtain):this.curtain}}function X6(){return{showing:!1,selector:null,content_selector:null,progress_selector:null,cancel_selector:null,show:e=>(this.loader.showing||(this.loader.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-loader").attr("id",`${this.id}.loader`),this.loader.content_selector=this.loader.selector.append("div").attr("class","lz-loader-content"),this.loader.progress_selector=this.loader.selector.append("div").attr("class","lz-loader-progress-container").append("div").attr("class","lz-loader-progress"),this.loader.showing=!0,typeof e>"u"&&(e="Loading...")),this.loader.update(e)),update:(e,t)=>{if(!this.loader.showing)return this.loader;clearTimeout(this.loader.hide_delay),typeof e=="string"&&this.loader.content_selector.html(e);const n=6,r=this._getPageOrigin(),i=this.loader.selector.node().getBoundingClientRect();return this.loader.selector.style("top",`${r.y+this.layout.height-i.height-n}px`).style("left",`${r.x+n}px`),typeof t=="number"&&this.loader.progress_selector.style("width",`${Math.min(Math.max(t,1),100)}%`),this.loader},animate:()=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!0),this.loader),setPercentCompleted:e=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!1),this.loader.update(null,e)),hide:e=>this.loader.showing?typeof e=="number"?(clearTimeout(this.loader.hide_delay),this.loader.hide_delay=setTimeout(this.loader.hide,e),this.loader):(this.loader.selector.remove(),this.loader.selector=null,this.loader.content_selector=null,this.loader.progress_selector=null,this.loader.cancel_selector=null,this.loader.showing=!1,this.loader):this.loader}}function xn(e,t){t=t||{};for(let[n,r]of Object.entries(t))e.style(n,r)}function IX(e,t=500){let n;return()=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,arguments),t)}}class Sn{constructor(t,n){this.layout=t||{},this.layout.color||(this.layout.color="gray"),this.parent=n||null,this.parent_panel=null,this.parent_plot=null,this.parent_svg=null,this.parent&&(this.parent.type==="panel"?(this.parent_panel=this.parent.parent,this.parent_plot=this.parent.parent.parent,this.parent_svg=this.parent_panel):(this.parent_plot=this.parent.parent,this.parent_svg=this.parent_plot)),this.selector=null,this.button=null,this.persist=!1,this.layout.position||(this.layout.position="left")}show(){if(!(!this.parent||!this.parent.selector)){if(!this.selector){const t=["start","middle","end"].includes(this.layout.group_position)?` lz-toolbar-group-${this.layout.group_position}`:"";this.selector=this.parent.selector.append("div").attr("class",`lz-toolbar-${this.layout.position}${t}`),this.layout.style&&xn(this.selector,this.layout.style),typeof this.initialize=="function"&&this.initialize()}return this.button&&this.button.status==="highlighted"&&this.button.menu.show(),this.selector.style("visibility","visible"),this.update(),this.position()}}update(){}position(){return this.button&&this.button.menu.position(),this}shouldPersist(){return this.persist?!0:!!(this.button&&this.button.persist)}hide(){return!this.selector||this.shouldPersist()?this:(this.button&&this.button.menu.hide(),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.button&&this.button.menu&&this.button.menu.destroy(),this.selector.remove(),this.selector=null,this.button=null,this):this}}class gr{constructor(t){if(!(t instanceof Sn))throw new Error("Unable to create toolbar widget button, invalid parent");this.parent=t,this.parent_panel=this.parent.parent_panel,this.parent_plot=this.parent.parent_plot,this.parent_svg=this.parent.parent_svg,this.parent_toolbar=this.parent.parent,this.selector=null,this.tag="a",this.html="",this.title="",this.color="gray",this.style={},this.persist=!1,this.permanent=!1,this.status="",this.menu={outer_selector:null,inner_selector:null,scroll_position:0,hidden:!0,show:()=>(this.menu.outer_selector||(this.menu.outer_selector=Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class",`lz-toolbar-menu lz-toolbar-menu-${this.color}`).attr("id",`${this.parent_svg.getBaseId()}.toolbar.menu`),this.menu.inner_selector=this.menu.outer_selector.append("div").attr("class","lz-toolbar-menu-content"),this.menu.inner_selector.on("scroll",()=>{this.menu.scroll_position=this.menu.inner_selector.node().scrollTop})),this.menu.outer_selector.style("visibility","visible"),this.menu.hidden=!1,this.menu.update()),update:()=>this.menu.outer_selector?(this.menu.populate(),this.menu.inner_selector&&(this.menu.inner_selector.node().scrollTop=this.menu.scroll_position),this.menu.position()):this.menu,position:()=>{if(!this.menu.outer_selector)return this.menu;this.menu.outer_selector.style("height",null);const n=3,r=20,i=14,o=this.parent_svg._getPageOrigin(),a=document.documentElement.scrollTop||document.body.scrollTop,s=this.parent_plot.getContainerOffset(),l=this.parent_toolbar.selector.node().getBoundingClientRect(),u=this.selector.node().getBoundingClientRect(),c=this.menu.outer_selector.node().getBoundingClientRect(),f=this.menu.inner_selector.node().scrollHeight;let d,h;this.parent_toolbar.type==="panel"?(d=o.y+l.height+2*n,h=Math.max(o.x+this.parent_plot.layout.width-c.width-n,o.x+n)):(d=u.bottom+a+n-s.top,h=Math.max(u.left+u.width-c.width-s.left,o.x+n));const p=Math.max(this.parent_plot.layout.width-2*n-r,r),g=p,b=p-4*n,v=Math.max(this.parent_svg.layout.height-10*n-i,i),x=Math.min(f+i,v);return this.menu.outer_selector.style("top",`${d}px`).style("left",`${h}px`).style("max-width",`${g}px`).style("max-height",`${v}px`).style("height",`${x}px`),this.menu.inner_selector.style("max-width",`${b}px`),this.menu.inner_selector.node().scrollTop=this.menu.scroll_position,this.menu},hide:()=>this.menu.outer_selector?(this.menu.outer_selector.style("visibility","hidden"),this.menu.hidden=!0,this.menu):this.menu,destroy:()=>this.menu.outer_selector?(this.menu.inner_selector.remove(),this.menu.outer_selector.remove(),this.menu.inner_selector=null,this.menu.outer_selector=null,this.menu):this.menu,populate:()=>{throw new Error("Method must be implemented")},setPopulate:n=>(typeof n=="function"?(this.menu.populate=n,this.setOnclick(()=>{this.menu.hidden?(this.menu.show(),this.highlight().update(),this.persist=!0):(this.menu.hide(),this.highlight(!1).update(),this.permanent||(this.persist=!1))})):this.setOnclick(),this)}}setColor(t){return typeof t<"u"&&(["gray","red","orange","yellow","green","blue","purple"].includes(t)?this.color=t:this.color="gray"),this}setPermanent(t){return typeof t>"u"?t=!0:t=!!t,this.permanent=t,this.permanent&&(this.persist=!0),this}shouldPersist(){return this.permanent||this.persist}setStyle(t){return typeof t<"u"&&(this.style=t),this}getClass(){const t=["start","middle","end"].includes(this.parent.layout.group_position)?` lz-toolbar-button-group-${this.parent.layout.group_position}`:"";return`lz-toolbar-button lz-toolbar-button-${this.color}${this.status?`-${this.status}`:""}${t}`}setStatus(t){return typeof t<"u"&&["","highlighted","disabled"].includes(t)&&(this.status=t),this.update()}highlight(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("highlighted"):this.status==="highlighted"?this.setStatus(""):this}disable(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("disabled"):this.status==="disabled"?this.setStatus(""):this}onmouseover(){}setOnMouseover(t){return typeof t=="function"?this.onmouseover=t:this.onmouseover=function(){},this}onmouseout(){}setOnMouseout(t){return typeof t=="function"?this.onmouseout=t:this.onmouseout=function(){},this}onclick(){}setOnclick(t){return typeof t=="function"?this.onclick=t:this.onclick=function(){},this}setTitle(t){return typeof t<"u"&&(this.title=t.toString()),this}setHtml(t){return typeof t<"u"&&(this.html=t.toString()),this}show(){if(this.parent)return this.selector||(this.selector=this.parent.selector.append(this.tag).attr("class",this.getClass())),this.update()}preUpdate(){return this}update(){return this.selector?(this.preUpdate(),this.selector.attr("class",this.getClass()).attr("title",this.title).on("mouseover",this.status==="disabled"?null:this.onmouseover).on("mouseout",this.status==="disabled"?null:this.onmouseout).on("click",this.status==="disabled"?null:this.onclick).html(this.html).call(xn,this.style),this.menu.update(),this.postUpdate(),this):this}postUpdate(){return this}hide(){return this.selector&&!this.shouldPersist()&&(this.selector.remove(),this.selector=null),this}}class BX extends Sn{show(){return this.div_selector||(this.div_selector=this.parent.selector.append("div").attr("class",`lz-toolbar-title lz-toolbar-${this.layout.position}`),this.title_selector=this.div_selector.append("h3")),this.update()}update(){let t=this.layout.title.toString();return this.layout.subtitle&&(t+=` <small>${this.layout.subtitle}</small>`),this.title_selector.html(t),this}}class OX extends Sn{update(){return!isNaN(this.parent_plot.state.start)&&!isNaN(this.parent_plot.state.end)&&this.parent_plot.state.start!==null&&this.parent_plot.state.end!==null?(this.selector.style("display",null),this.selector.html(Gb(this.parent_plot.state.end-this.parent_plot.state.start,null,!0))):this.selector.style("display","none"),this.layout.class&&this.selector.attr("class",this.layout.class),this.layout.style&&xn(this.selector,this.layout.style),this}}class NX extends Sn{constructor(t,n){if(super(t,n),!this.parent_panel)throw new Error("Filter widget can only be used in panel toolbars");if(this._data_layer=this.parent_panel.data_layers[t.layer_name],!this._data_layer)throw new Error(`Filter widget could not locate the specified layer_name: '${t.layer_name}'`);if(this._event_name=t.custom_event_name||"widget_filter_field_action",this._field=t.field,this._field_display_html=t.field_display_html,this._operator=t.operator,this._filter_id=null,this._data_type=t.data_type||"number",!["number","string"].includes(this._data_type))throw new Error("Filter must be either string or number");this._value_selector=null}_getTarget(){this._data_layer.layout.filters||(this._data_layer.layout.filters=[]);let t=this._data_layer.layout.filters.find(n=>n.field===this._field&&n.operator===this._operator&&(!this._filter_id||n.id===this._filter_id));return t||(t={field:this._field,operator:this._operator,value:null},this._filter_id&&(t.id=this._filter_id),this._data_layer.layout.filters.push(t)),t}_clearFilter(){if(this._data_layer.layout.filters){const t=this._data_layer.layout.filters.indexOf(this._getTarget());this._data_layer.layout.filters.splice(t,1)}}_setFilter(t){if(t===null)this._value_selector.style("border","1px solid red").style("color","red"),this._clearFilter();else{const n=this._getTarget();n.value=t}this.parent_svg.emit(this._event_name,{field:this._field,operator:this._operator,value:t,filter_id:this._filter_id},!0)}_getValue(){let t=this._value_selector.property("value");return t===null||t===""||this._data_type==="number"&&(t=+t,Number.isNaN(t))?null:t}update(){this._value_selector||(this.selector.style("padding","0 6px"),this.selector.append("span").html(this._field_display_html).style("background","#fff").style("padding-left","3px"),this.selector.append("span").text(this._operator).style("padding","0 3px").style("background","#fff"),this._value_selector=this.selector.append("input").attr("size",this.layout.input_size||4).on("input",IX(()=>{this._value_selector.style("border",null).style("color",null);const t=this._getValue();this._setFilter(t),this.parent_panel.render()},750)))}}class K6 extends Sn{constructor(t,n){super(t,n),this._filename=this.layout.filename||"locuszoom.svg",this._button_html=this.layout.button_html||"Save SVG",this._button_title=this.layout.button_title||"Download hi-res image",this._event_name=t.custom_event_name||"widget_save_svg"}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this._button_html).setTitle(this._button_title).setOnMouseover(()=>{this.button.selector.classed("lz-toolbar-button-gray-disabled",!0).html("Preparing Image"),this._getBlobUrl().then(t=>{const n=this.button.selector.attr("href");n&&URL.revokeObjectURL(n),this.button.selector.attr("href",t).classed("lz-toolbar-button-gray-disabled",!1).classed("lz-toolbar-button-gray-highlighted",!0).html(this._button_html)})}).setOnMouseout(()=>{this.button.selector.classed("lz-toolbar-button-gray-highlighted",!1)}),this.button.show(),this.button.selector.attr("href-lang","image/svg+xml").attr("download",this._filename).on("click",()=>this.parent_svg.emit(this._event_name,{filename:this._filename},!0)),this)}_getCSS(t){const n=/^svg\.lz-locuszoom\s*/;let r="";for(let i=0;i<document.styleSheets.length;i++){const o=document.styleSheets[i];try{if(!o.cssRules)continue}catch(s){if(s.name!=="SecurityError")throw s;continue}let a=o.cssRules;for(let s=0;s<a.length;s++){const l=a[s];l.selectorText&&l.selectorText.match(n)&&(r+=l.cssText)}}return r}_appendCSS(t,n){var r=document.createElement("style");r.setAttribute("type","text/css"),r.innerHTML=t;var i=n.hasChildNodes()?n.children[0]:null;n.insertBefore(r,i)}_getDimensions(){let{width:t,height:n}=this.parent_plot.svg.node().getBoundingClientRect();const i=2400/t;return[i*t,i*n]}_generateSVG(){return new Promise(t=>{let n=this.parent_plot.svg.node().cloneNode(!0);n.setAttribute("xlink","http://www.w3.org/1999/xlink"),n=Ue(n),n.selectAll("g.lz-curtain").remove(),n.selectAll("g.lz-mouse_guide").remove(),n.selectAll("g.tick text").each(function(){const s=+Ue(this).attr("dy").substring(-2).slice(0,-2)*10;Ue(this).attr("dy",s)});const r=new XMLSerializer;n=n.node();const[i,o]=this._getDimensions();n.setAttribute("width",i),n.setAttribute("height",o),this._appendCSS(this._getCSS(n),n);let a=r.serializeToString(n);t(a)})}_getBlobUrl(){return this._generateSVG().then(t=>{const n=new Blob([t],{type:"image/svg+xml"});return URL.createObjectURL(n)})}}class LX extends K6{constructor(t,n){super(...arguments),this._filename=this.layout.filename||"locuszoom.png",this._button_html=this.layout.button_html||"Save PNG",this._button_title=this.layout.button_title||"Download image",this._event_name=t.custom_event_name||"widget_save_png"}_getBlobUrl(){return super._getBlobUrl().then(t=>{const n=document.createElement("canvas"),r=n.getContext("2d"),[i,o]=this._getDimensions();return n.width=i,n.height=o,new Promise((a,s)=>{const l=new Image;l.onload=()=>{r.drawImage(l,0,0,i,o),URL.revokeObjectURL(t),n.toBlob(u=>{a(URL.createObjectURL(u))})},l.src=t})})}}class DX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml("×").setTitle("Remove panel").setOnclick(()=>{if(!this.layout.suppress_confirm&&!confirm("Are you sure you want to remove this panel? This cannot be undone."))return!1;const t=this.parent_panel;return t.toolbar.hide(!0),Ue(t.parent.svg.node().parentNode).on(`mouseover.${t.getBaseId()}.toolbar`,null),Ue(t.parent.svg.node().parentNode).on(`mouseout.${t.getBaseId()}.toolbar`,null),t.parent.removePanel(t.id)}),this.button.show(),this)}}class HX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===0;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▴").setTitle("Move panel up").setOnclick(()=>{this.parent_panel.moveUp(),this.update()}),this.button.show(),this.update()}}class UX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===this.parent_plot._panel_ids_by_y_index.length-1;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▾").setTitle("Move panel down").setOnclick(()=>{this.parent_panel.moveDown(),this.update()}),this.button.show(),this.update()}}class jX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=5e4),typeof t.button_html!="string"&&(t.button_html=t.step>0?">":"<"),typeof t.button_title!="string"&&(t.button_title=`Shift region by ${t.step>0?"+":"-"}${Gb(Math.abs(t.step),null,!0)}`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add shift_region toolbar widget: plot state does not have region bounds")}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start+this.layout.step,1),end:this.parent_plot.state.end+this.layout.step})}),this.button.show(),this)}}class WX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=.2),typeof t.button_html!="string"&&(t.button_html=t.step>0?"z–":"z+"),typeof t.button_title!="string"&&(t.button_title=`Zoom region ${t.step>0?"out":"in"} by ${(Math.abs(t.step)*100).toFixed(1)}%`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add zoom_region toolbar widget: plot state does not have region bounds")}update(){if(this.button){let t=!0;const n=this.parent_plot.state.end-this.parent_plot.state.start;return this.layout.step>0&&!isNaN(this.parent_plot.layout.max_region_scale)&&n>=this.parent_plot.layout.max_region_scale&&(t=!1),this.layout.step<0&&!isNaN(this.parent_plot.layout.min_region_scale)&&n<=this.parent_plot.layout.min_region_scale&&(t=!1),this.button.disable(!t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{const t=this.parent_plot.state.end-this.parent_plot.state.start,n=1+this.layout.step;let r=t*n;isNaN(this.parent_plot.layout.max_region_scale)||(r=Math.min(r,this.parent_plot.layout.max_region_scale)),isNaN(this.parent_plot.layout.min_region_scale)||(r=Math.max(r,this.parent_plot.layout.min_region_scale));const i=Math.floor((r-t)/2);this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start-i,1),end:this.parent_plot.state.end+i})}),this.button.show(),this}}class VX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title),this.button.menu.setPopulate(()=>{this.button.menu.inner_selector.html(this.layout.menu_html)}),this.button.show(),this)}}class qX extends Sn{constructor(t){super(...arguments)}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html||"Resize to Data").setTitle(this.layout.button_title||"Automatically resize this panel to show all data available").setOnclick(()=>{this.parent_panel.scaleHeightToData(),this.update()}),this.button.show(),this)}}class GX extends Sn{update(){const t=this.parent_panel.legend.layout.hidden?"Show Legend":"Hide Legend";return this.button?(this.button.setHtml(t).show(),this.parent.position(),this):(this.button=new gr(this).setColor(this.layout.color).setTitle("Show or hide the legend for this panel").setOnclick(()=>{this.parent_panel.legend.layout.hidden=!this.parent_panel.legend.layout.hidden,this.parent_panel.legend.render(),this.update()}),this.update())}}class YX extends Sn{constructor(t,n){typeof t.button_html!="string"&&(t.button_html="Display options..."),typeof t.button_title!="string"&&(t.button_title="Control how plot items are displayed"),super(...arguments),this._event_name=t.custom_event_name||"widget_display_options_choice";const r=t.fields_whitelist||["color","fill_opacity","filters","label","legend","point_shape","point_size","tooltip","tooltip_positioning"],i=this.parent_panel.data_layers[t.layer_name];if(!i)throw new Error(`Display options could not locate the specified layer_name: '${t.layer_name}'`);const o=i.layout,a={};r.forEach(s=>{const l=o[s];l!==void 0&&(a[s]=at(l))}),this._selected_item="default",this.button=new gr(this).setColor(t.color).setHtml(t.button_html).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const s=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const l=this.button.menu.inner_selector.append("table"),u=this.layout,c=(d,h,p)=>{const g=l.append("tr"),b=`${s}${p}`;g.append("td").append("input").attr("id",b).attr("type","radio").attr("name",`display-option-${s}`).attr("value",p).style("margin",0).property("checked",p===this._selected_item).on("click",()=>{r.forEach(x=>{const y=typeof h[x]<"u";i.layout[x]=y?h[x]:a[x]}),this.parent_svg.emit(this._event_name,{choice:d},!0),this._selected_item=p,this.parent_panel.render();const v=this.parent_panel.legend;v&&v.render()}),g.append("td").append("label").style("font-weight","normal").attr("for",b).text(d)},f=u.default_config_display_name||"Default style";return c(f,a,"default"),u.options.forEach((d,h)=>c(d.display_name,d.display,h)),this})}update(){return this.button.show(),this}}class XX extends Sn{constructor(t,n){if(typeof t.button_html!="string"&&(t.button_html="Set option..."),typeof t.button_title!="string"&&(t.button_title="Choose an option to customize the plot"),super(t,n),this.parent_panel)throw new Error("This widget is designed to set global options, so it can only be used at the top (plot) level");if(!t.state_field)throw new Error("Must specify the `state_field` that this widget controls");if(this._event_name=t.custom_event_name||"widget_set_state_choice",this._selected_item=this.parent_plot.state[t.state_field]||t.options[0].value,!t.options.find(r=>r.value===this._selected_item))throw new Error("There is an existing state value that does not match the known values in this widget");this.button=new gr(this).setColor(t.color).setHtml(t.button_html+(t.show_selected?this._selected_item:"")).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const r=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const i=this.button.menu.inner_selector.append("table"),o=(a,s,l)=>{const u=i.append("tr"),c=`${r}${l}`;u.append("td").append("input").attr("id",c).attr("type","radio").attr("name",`set-state-${r}`).attr("value",l).style("margin",0).property("checked",s===this._selected_item).on("click",()=>{const f={};f[t.state_field]=s,this._selected_item=s,this.parent_plot.applyState(f),this.button.setHtml(t.button_html+(t.show_selected?this._selected_item:"")),this.parent_svg.emit(this._event_name,{choice_name:a,choice_value:s,state_field:t.state_field},!0)}),u.append("td").append("label").style("font-weight","normal").attr("for",c).text(a)};return t.options.forEach((a,s)=>o(a.display_name,a.value,s)),this})}update(){return this.button.show(),this}}const KX=Object.freeze(Object.defineProperty({__proto__:null,BaseWidget:Sn,_Button:gr,display_options:YX,download:K6,download_png:LX,filter_field:NX,menu:VX,move_panel_down:UX,move_panel_up:HX,region_scale:OX,remove_panel:DX,resize_to_data:qX,set_state:XX,shift_region:jX,title:BX,toggle_legend:GX,zoom_region:WX},Symbol.toStringTag,{value:"Module"})),qb=new Cv;for(let[e,t]of Object.entries(KX))qb.add(e,t);class Z6{constructor(t){this.parent=t,this.id=`${this.parent.getBaseId()}.toolbar`,this.type=this.parent.parent?"panel":"plot",this.parent_plot=this.parent.parent_plot,this.selector=null,this.widgets=[],this.hide_timeout=null,this.persist=!1,this.initialize()}initialize(){const t=this.parent.layout.toolbar.widgets;return Array.isArray(t)&&t.forEach(n=>{this.addWidget(n)}),this.type==="panel"&&Ue(this.parent.parent.svg.node().parentNode).on(`mouseover.${this.id}`,()=>{clearTimeout(this.hide_timeout),(!this.selector||this.selector.style("visibility")==="hidden")&&this.show()}).on(`mouseout.${this.id}`,()=>{clearTimeout(this.hide_timeout),this.hide_timeout=setTimeout(()=>{this.hide()},300)}),this}addWidget(t){try{const n=qb.create(t.type,t,this);return this.widgets.push(n),n}catch(n){console.warn("Failed to create widget"),console.error(n)}}shouldPersist(){if(this.persist)return!0;let t=!1;return this.widgets.forEach(n=>{t=t||n.shouldPersist()}),t=t||this.parent_plot._panel_boundaries.dragging||this.parent_plot._interaction.dragging,!!t}show(){if(!this.selector){switch(this.type){case"plot":this.selector=Ue(this.parent.svg.node().parentNode).insert("div",":first-child");break;case"panel":this.selector=Ue(this.parent.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip, .lz-toolbar-menu, .lz-curtain").classed("lz-panel-toolbar",!0);break;default:throw new Error(`Toolbar cannot be a child of ${this.type}`)}this.selector.classed("lz-toolbar",!0).classed(`lz-${this.type}-toolbar`,!0).attr("id",this.id)}return this.widgets.forEach(t=>t.show()),this.selector.style("visibility","visible"),this.update()}update(){return this.selector?(this.widgets.forEach(t=>t.update()),this.position()):this}position(){if(!this.selector)return this;if(this.type==="panel"){const t=this.parent._getPageOrigin(),n=`${(t.y+3.5).toString()}px`,r=`${t.x.toString()}px`,i=`${(this.parent_plot.layout.width-4).toString()}px`;this.selector.style("position","absolute").style("top",n).style("left",r).style("width",i)}return this.widgets.forEach(t=>t.position()),this}hide(){return!this.selector||this.shouldPersist()?this:(this.widgets.forEach(t=>t.hide()),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.widgets.forEach(n=>n.destroy(!0)),this.widgets=[],this.selector.remove(),this.selector=null,this):this}}const ZX={orientation:"vertical",origin:{x:0,y:0},width:10,height:10,padding:5,label_size:14,hidden:!1};class JX{constructor(t){return this.parent=t,this.id=`${this.parent.getBaseId()}.legend`,this.parent.layout.legend=qt(this.parent.layout.legend||{},ZX),this.layout=this.parent.layout.legend,this.selector=null,this.background_rect=null,this.elements=[],this.elements_group=null,this.hidden=!1,this.render()}render(){this.selector||(this.selector=this.parent.svg.group.append("g").attr("id",`${this.parent.getBaseId()}.legend`).attr("class","lz-legend")),this.background_rect||(this.background_rect=this.selector.append("rect").attr("width",100).attr("height",100).attr("class","lz-legend-background")),this.elements_group||(this.elements_group=this.selector.append("g")),this.elements.forEach(a=>a.remove()),this.elements=[];const t=+this.layout.padding||1;let n=t,r=t,i=0;this.parent._data_layer_ids_by_z_index.slice().reverse().forEach(a=>{const s=this.parent.data_layers[a].layout.legend;Array.isArray(s)&&s.forEach(l=>{const u=this.elements_group.append("g").attr("transform",`translate(${n}, ${r})`),c=+l.label_size||+this.layout.label_size;let f=0,d=c/2+t/2;i=Math.max(i,c+t);const h=l.shape||"",p=G6(h);if(h==="line"){const b=+l.length||16,v=c/4+t/2;u.append("path").attr("class",l.class||"").attr("d",`M0,${v}L${b},${v}`).call(xn,l.style||{}),f=b+t}else if(h==="rect"){const b=+l.width||16,v=+l.height||b;u.append("rect").attr("class",l.class||"").attr("width",b).attr("height",v).attr("fill",l.color||{}).call(xn,l.style||{}),f=b+t,i=Math.max(i,v+t)}else if(h==="ribbon"){const b=+l.width||25,v=+l.height||b,x=(l.orientation||"vertical")==="horizontal";let y=l.color_stops;const _=u.append("g"),S=_.append("g"),$=_.append("g");let w=0;if(l.tick_labels){let T;x?T=[0,b*y.length-1]:T=[v*y.length-1,0];const M=au().domain(qo(l.tick_labels)).range(T),P=(x?G5:Ev)(M).tickSize(3).tickValues(l.tick_labels).tickFormat(C=>C);$.call(P).attr("class","lz-axis"),w=$.node().getBoundingClientRect().height}x?($.attr("transform",`translate(0, ${w})`),S.attr("transform",`translate(0, ${w})`)):(_.attr("transform","translate(5, 0)"),$.attr("transform",`translate(${b}, 0)`)),x||(y=y.slice(),y.reverse());for(let T=0;T<y.length;T++){const M=y[T],P=x?`translate(${b*T}, 0)`:`translate(0, ${v*T})`;S.append("rect").attr("class",l.class||"").attr("stroke","black").attr("transform",P).attr("stroke-width",.5).attr("width",b).attr("height",v).attr("fill",M).call(xn,l.style||{})}if(!x&&l.label)throw new Error("Legend labels not supported for vertical ribbons (use a separate legend item as text instead)");f=b*y.length+t,d+=w}else if(p){const b=+l.size||40,v=Math.ceil(Math.sqrt(b/Math.PI));u.append("path").attr("class",l.class||"").attr("d",Nb().size(b).type(p)).attr("transform",`translate(${v}, ${v+t/2})`).attr("fill",l.color||{}).call(xn,l.style||{}),f=2*v+t,d=Math.max(2*v+t/2,d),i=Math.max(i,2*v+t)}u.append("text").attr("text-anchor","left").attr("class","lz-label").attr("x",f).attr("y",d).style("font-size",c).text(l.label);const g=u.node().getBoundingClientRect();if(this.layout.orientation==="vertical")r+=g.height+t,i=0;else{const b=this.layout.origin.x+n+g.width;n>t&&b>this.parent.parent.layout.width&&(r+=i,n=t,u.attr("transform",`translate(${n}, ${r})`)),n+=g.width+3*t}this.elements.push(u)})});const o=this.elements_group.node().getBoundingClientRect();return this.layout.width=o.width+2*this.layout.padding,this.layout.height=o.height+2*this.layout.padding,this.background_rect.attr("width",this.layout.width).attr("height",this.layout.height),this.selector.style("visibility",this.layout.hidden?"hidden":"visible"),this.position()}position(){if(!this.selector)return this;const t=this.selector.node().getBoundingClientRect();isNaN(+this.layout.pad_from_bottom)||(this.layout.origin.y=this.parent.layout.height-t.height-+this.layout.pad_from_bottom),isNaN(+this.layout.pad_from_right)||(this.layout.origin.x=this.parent.parent.layout.width-t.width-+this.layout.pad_from_right),this.selector.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`)}hide(){this.layout.hidden=!0,this.render()}show(){this.layout.hidden=!1,this.render()}}const QX={id:"",tag:"custom_data_type",title:{text:"",style:{},x:10,y:22},y_index:null,min_height:1,height:1,origin:{x:0,y:null},margin:{top:0,right:0,bottom:0,left:0},background_click:"clear_selections",toolbar:{widgets:[]},cliparea:{height:0,width:0,origin:{x:0,y:0}},axes:{x:{},y1:{},y2:{}},legend:null,interaction:{drag_background_to_pan:!1,drag_x_ticks_to_scale:!1,drag_y1_ticks_to_scale:!1,drag_y2_ticks_to_scale:!1,scroll_to_zoom:!1,x_linked:!1,y1_linked:!1,y2_linked:!1},show_loading_indicator:!0,data_layers:[]};class of{constructor(t,n){if(typeof t!="object")throw new Error("Unable to create panel, invalid layout");if(this.parent=n||null,this.parent_plot=n,typeof t.id!="string"||!t.id)throw new Error('Panel layouts must specify "id"');if(this.parent&&typeof this.parent.panels[t.id]<"u")throw new Error(`Cannot create panel with id [${t.id}]; panel with that id already exists`);this.id=t.id,this._initialized=!1,this._layout_idx=null,this.svg={},this.layout=qt(t||{},QX),this.parent?(this.state=this.parent.state,this._state_id=this.id,this.state[this._state_id]=this.state[this._state_id]||{}):(this.state=null,this._state_id=null),this.data_layers={},this._data_layer_ids_by_z_index=[],this._data_promises=[],this.x_scale=null,this.y1_scale=null,this.y2_scale=null,this.x_extent=null,this.y1_extent=null,this.y2_extent=null,this.x_ticks=[],this.y1_ticks=[],this.y2_ticks=[],this._zoom_timeout=null,this._event_hooks={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n,r){if(r=r||!1,typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);typeof n=="boolean"&&arguments.length===2&&(r=n,n=null);const o={sourceID:this.getBaseId(),target:this,data:n||null};return this._event_hooks[t]&&this._event_hooks[t].forEach(a=>{a.call(this,o)}),r&&this.parent&&this.parent.emit(t,o),this}setTitle(t){if(typeof this.layout.title=="string"){const n=this.layout.title;this.layout.title={text:n,x:0,y:0,style:{}}}return typeof t=="string"?this.layout.title.text=t:typeof t=="object"&&t!==null&&(this.layout.title=qt(t,this.layout.title)),this.layout.title.text.length?this.title.attr("display",null).attr("x",parseFloat(this.layout.title.x)).attr("y",parseFloat(this.layout.title.y)).text(this.layout.title.text).call(xn,this.layout.title.style):this.title.attr("display","none"),this}addDataLayer(t){if(typeof t!="object"||typeof t.id!="string"||!t.id.length)throw new Error("Invalid data layer layout");if(typeof this.data_layers[t.id]<"u")throw new Error(`Cannot create data_layer with id '${t.id}'; data layer with that id already exists in the panel`);if(typeof t.type!="string")throw new Error("Invalid data layer type");typeof t.y_axis=="object"&&(typeof t.y_axis.axis>"u"||![1,2].includes(t.y_axis.axis))&&(t.y_axis.axis=1);const n=Yb.create(t.type,t,this);if(this.data_layers[n.id]=n,n.layout.z_index!==null&&!isNaN(n.layout.z_index)&&this._data_layer_ids_by_z_index.length>0)n.layout.z_index<0&&(n.layout.z_index=Math.max(this._data_layer_ids_by_z_index.length+n.layout.z_index,0)),this._data_layer_ids_by_z_index.splice(n.layout.z_index,0,n.id),this._data_layer_ids_by_z_index.forEach((i,o)=>{this.data_layers[i].layout.z_index=o});else{const i=this._data_layer_ids_by_z_index.push(n.id);this.data_layers[n.id].layout.z_index=i-1}let r=null;return this.layout.data_layers.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.data_layers.push(this.data_layers[n.id].layout)-1),this.data_layers[n.id]._layout_idx=r,this.data_layers[n.id]}removeDataLayer(t){const n=this.data_layers[t];if(!n)throw new Error(`Unable to remove data layer, ID not found: ${t}`);return n.destroyAllTooltips(),n.svg.container&&n.svg.container.remove(),this.layout.data_layers.splice(n._layout_idx,1),delete this.state[n._state_id],delete this.data_layers[t],this._data_layer_ids_by_z_index.splice(this._data_layer_ids_by_z_index.indexOf(t),1),this.applyDataLayerZIndexesToDataLayerLayouts(),this.layout.data_layers.forEach((r,i)=>{this.data_layers[r.id]._layout_idx=i}),this}clearSelections(){return this._data_layer_ids_by_z_index.forEach(t=>{this.data_layers[t].setAllElementStatus("selected",!1)}),this}render(){this.svg.container.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`),this.svg.clipRect.attr("width",this.parent_plot.layout.width).attr("height",this.layout.height);const{cliparea:t}=this.layout,{margin:n}=this.layout;this.inner_border.attr("x",n.left).attr("y",n.top).attr("width",this.parent_plot.layout.width-(n.left+n.right)).attr("height",this.layout.height-(n.top+n.bottom)),this.layout.inner_border&&this.inner_border.style("stroke-width",1).style("stroke",this.layout.inner_border),this.setTitle(),this.generateExtents();const r=function(l,u){const c=Math.pow(-10,u),f=Math.pow(-10,-3),d=Math.pow(10,-3),h=Math.pow(10,u);return l===1/0&&(l=h),l===-1/0&&(l=c),l===0&&(l=d),l>0&&(l=Math.max(Math.min(l,h),d)),l<0&&(l=Math.max(Math.min(l,f),c)),l},i={},o=this.layout.axes;if(this.x_extent){const l={start:0,end:this.layout.cliparea.width};o.x.range&&(l.start=o.x.range.start||l.start,l.end=o.x.range.end||l.end),i.x=[l.start,l.end],i.x_shifted=[l.start,l.end]}if(this.y1_extent){const l={start:t.height,end:0};o.y1.range&&(l.start=o.y1.range.start||l.start,l.end=o.y1.range.end||l.end),i.y1=[l.start,l.end],i.y1_shifted=[l.start,l.end]}if(this.y2_extent){const l={start:t.height,end:0};o.y2.range&&(l.start=o.y2.range.start||l.start,l.end=o.y2.range.end||l.end),i.y2=[l.start,l.end],i.y2_shifted=[l.start,l.end]}let{_interaction:a}=this.parent;const s=a.dragging;if(a.panel_id&&(a.panel_id===this.id||a.linked_panel_ids.includes(this.id))){let l,u=null;if(a.zooming&&typeof this.x_scale=="function"){const c=Math.abs(this.x_extent[1]-this.x_extent[0]),f=Math.round(this.x_scale.invert(i.x_shifted[1]))-Math.round(this.x_scale.invert(i.x_shifted[0]));let d=a.zooming.scale;const h=Math.floor(f*(1/d));d<1&&!isNaN(this.parent.layout.max_region_scale)?d=1/(Math.min(h,this.parent.layout.max_region_scale)/f):d>1&&!isNaN(this.parent.layout.min_region_scale)&&(d=1/(Math.max(h,this.parent.layout.min_region_scale)/f));const p=Math.floor(c*d);l=a.zooming.center-n.left-this.layout.origin.x;const g=l/t.width,b=Math.max(Math.floor(this.x_scale.invert(i.x_shifted[0])-(p-f)*g),1);i.x_shifted=[this.x_scale(b),this.x_scale(b+p)]}else if(s)switch(s.method){case"background":i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x;break;case"x_tick":Ce&&Ce.shiftKey?(i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x):(l=s.start_x-n.left-this.layout.origin.x,u=r(l/(l+s.dragged_x),3),i.x_shifted[0]=0,i.x_shifted[1]=Math.max(t.width*(1/u),1));break;case"y1_tick":case"y2_tick":{const c=`y${s.method[1]}_shifted`;Ce&&Ce.shiftKey?(i[c][0]=t.height+s.dragged_y,i[c][1]=+s.dragged_y):(l=t.height-(s.start_y-n.top-this.layout.origin.y),u=r(l/(l-s.dragged_y),3),i[c][0]=t.height,i[c][1]=t.height-t.height*(1/u))}}}if(["x","y1","y2"].forEach(l=>{this[`${l}_extent`]&&(this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[`${l}_shifted`]),this[`${l}_extent`]=[this[`${l}_scale`].invert(i[l][0]),this[`${l}_scale`].invert(i[l][1])],this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[l]),this.renderAxis(l))}),this.layout.interaction.scroll_to_zoom){const l=()=>{if(!(Ce.shiftKey||Ce.altKey)){this.parent._canInteract(this.id)&&this.loader.show("Press <tt>[SHIFT]</tt> or <tt>[ALT]</tt> while scrolling to zoom").hide(1e3);return}if(Ce.preventDefault(),!this.parent._canInteract(this.id))return;const u=lr(this.svg.container.node()),c=Math.max(-1,Math.min(1,Ce.wheelDelta||-Ce.detail||-Ce.deltaY));c!==0&&(this.parent._interaction={panel_id:this.id,linked_panel_ids:this.getLinkedPanelIds("x"),zooming:{scale:c<1?.9:1.1,center:u[0]}},this.render(),a=this.parent._interaction,a.linked_panel_ids.forEach(f=>{this.parent.panels[f].render()}),this._zoom_timeout!==null&&clearTimeout(this._zoom_timeout),this._zoom_timeout=setTimeout(()=>{this.parent._interaction={},this.parent.applyState({start:this.x_extent[0],end:this.x_extent[1]})},500))};this.svg.container.on("wheel.zoom",l).on("mousewheel.zoom",l).on("DOMMouseScroll.zoom",l)}return this._data_layer_ids_by_z_index.forEach(l=>{this.data_layers[l].draw().render()}),this.legend&&this.legend.render(),this}addBasicLoader(t=!0){return this.layout.show_loading_indicator&&this._initialized?this:(t&&this.loader.show("Loading...").animate(),this.on("data_requested",()=>{this.loader.show("Loading...").animate()}),this.on("data_rendered",()=>{this.loader.hide()}),this.layout.show_loading_indicator=!0,this)}applyDataLayerZIndexesToDataLayerLayouts(){this._data_layer_ids_by_z_index.forEach((t,n)=>{this.data_layers[t].layout.z_index=n})}getBaseId(){return`${this.parent.id}.${this.id}`}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.layout.origin.x,y:t.y+this.layout.origin.y}}initializeLayout(){return this.setDimensions(),this.setOrigin(),this.setMargin(),this.x_range=[0,this.layout.cliparea.width],this.y1_range=[this.layout.cliparea.height,0],this.y2_range=[this.layout.cliparea.height,0],["x","y1","y2"].forEach(t=>{const n=this.layout.axes[t];!Object.keys(n).length||n.render===!1?n.render=!1:(n.render=!0,n.label=n.label||null)}),this.layout.data_layers.forEach(t=>{this.addDataLayer(t)}),this}setDimensions(t,n){const r=this.layout;return typeof t<"u"&&typeof n<"u"&&!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0&&(this.parent.layout.width=Math.round(+t),r.height=Math.max(Math.round(+n),r.min_height)),r.cliparea.width=Math.max(this.parent_plot.layout.width-(r.margin.left+r.margin.right),0),r.cliparea.height=Math.max(r.height-(r.margin.top+r.margin.bottom),0),this.svg.clipRect&&this.svg.clipRect.attr("width",this.parent.layout.width).attr("height",r.height),this._initialized&&(this.render(),this.curtain.update(),this.loader.update(),this.toolbar.update(),this.legend&&this.legend.position()),this}setOrigin(t,n){return!isNaN(t)&&t>=0&&(this.layout.origin.x=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(this.layout.origin.y=Math.max(Math.round(+n),0)),this._initialized&&this.render(),this}setMargin(t,n,r,i){let o;const{cliparea:a,margin:s}=this.layout;return!isNaN(t)&&t>=0&&(s.top=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(s.right=Math.max(Math.round(+n),0)),!isNaN(r)&&r>=0&&(s.bottom=Math.max(Math.round(+r),0)),!isNaN(i)&&i>=0&&(s.left=Math.max(Math.round(+i),0)),s.top+s.bottom>this.layout.height&&(o=Math.floor((s.top+s.bottom-this.layout.height)/2),s.top-=o,s.bottom-=o),s.left+s.right>this.parent_plot.layout.width&&(o=Math.floor((s.left+s.right-this.parent_plot.layout.width)/2),s.left-=o,s.right-=o),["top","right","bottom","left"].forEach(l=>{s[l]=Math.max(s[l],0)}),a.width=Math.max(this.parent_plot.layout.width-(s.left+s.right),0),a.height=Math.max(this.layout.height-(s.top+s.bottom),0),a.origin.x=s.left,a.origin.y=s.top,this._initialized&&this.render(),this}initialize(){const t=this.getBaseId();this.svg.container=this.parent.svg.append("g").attr("id",`${t}.panel_container`).attr("transform",`translate(${this.layout.origin.x||0}, ${this.layout.origin.y||0})`);const n=this.svg.container.append("clipPath").attr("id",`${t}.clip`);if(this.svg.clipRect=n.append("rect").attr("width",this.parent_plot.layout.width).attr("height",this.layout.height),this.svg.group=this.svg.container.append("g").attr("id",`${t}.panel`).attr("clip-path",`url(#${t}.clip)`),this.curtain=Y6.call(this),this.loader=X6.call(this),this.layout.show_loading_indicator&&this.addBasicLoader(!1),this.toolbar=new Z6(this),this.inner_border=this.svg.group.append("rect").attr("class","lz-panel-background").on("click",()=>{this.layout.background_click==="clear_selections"&&this.clearSelections()}),this.title=this.svg.group.append("text").attr("class","lz-panel-title"),typeof this.layout.title<"u"&&this.setTitle(),this.svg.x_axis=this.svg.group.append("g").attr("id",`${t}.x_axis`).attr("class","lz-x lz-axis"),this.layout.axes.x.render&&(this.svg.x_axis_label=this.svg.x_axis.append("text").attr("class","lz-x lz-axis lz-label").attr("text-anchor","middle")),this.svg.y1_axis=this.svg.group.append("g").attr("id",`${t}.y1_axis`).attr("class","lz-y lz-y1 lz-axis"),this.layout.axes.y1.render&&(this.svg.y1_axis_label=this.svg.y1_axis.append("text").attr("class","lz-y1 lz-axis lz-label").attr("text-anchor","middle")),this.svg.y2_axis=this.svg.group.append("g").attr("id",`${t}.y2_axis`).attr("class","lz-y lz-y2 lz-axis"),this.layout.axes.y2.render&&(this.svg.y2_axis_label=this.svg.y2_axis.append("text").attr("class","lz-y2 lz-axis lz-label").attr("text-anchor","middle")),this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].initialize()}),this.legend=null,this.layout.legend&&(this.legend=new JX(this)),this.layout.interaction.drag_background_to_pan){const r=`.${this.parent.id}.${this.id}.interaction.drag`,i=()=>this.parent.startDrag(this,"background");this.svg.container.select(".lz-panel-background").on(`mousedown${r}.background`,i).on(`touchstart${r}.background`,i)}return this}resortDataLayers(){const t=[];this._data_layer_ids_by_z_index.forEach(n=>{t.push(this.data_layers[n].layout.z_index)}),this.svg.group.selectAll("g.lz-data_layer-container").data(t).sort(Sr),this.applyDataLayerZIndexesToDataLayerLayouts()}getLinkedPanelIds(t){t=t||null;const n=[];return!["x","y1","y2"].includes(t)||!this.layout.interaction[`${t}_linked`]||this.parent._panel_ids_by_y_index.forEach(r=>{r!==this.id&&this.parent.panels[r].layout.interaction[`${t}_linked`]&&n.push(r)}),n}moveUp(){const{parent:t}=this,n=this.layout.y_index;return t._panel_ids_by_y_index[n-1]&&(t._panel_ids_by_y_index[n]=t._panel_ids_by_y_index[n-1],t._panel_ids_by_y_index[n-1]=this.id,t.applyPanelYIndexesToPanelLayouts(),t.positionPanels()),this}moveDown(){const{_panel_ids_by_y_index:t}=this.parent;return t[this.layout.y_index+1]&&(t[this.layout.y_index]=t[this.layout.y_index+1],t[this.layout.y_index+1]=this.id,this.parent.applyPanelYIndexesToPanelLayouts(),this.parent.positionPanels()),this}reMap(){this.emit("data_requested"),this._data_promises=[],this.curtain.hide();for(let t in this.data_layers)try{this._data_promises.push(this.data_layers[t].reMap())}catch(n){console.error(n),this.curtain.show(n.message||n)}return Promise.all(this._data_promises).then(()=>{this._initialized=!0,this.render(),this.emit("layout_changed",!0),this.emit("data_rendered")}).catch(t=>{console.error(t),this.curtain.show(t.message||t)})}generateExtents(){["x","y1","y2"].forEach(t=>{this[`${t}_extent`]=null});for(let t in this.data_layers){const n=this.data_layers[t];if(n.layout.x_axis&&!n.layout.x_axis.decoupled&&(this.x_extent=qo((this.x_extent||[]).concat(n.getAxisExtent("x")))),n.layout.y_axis&&!n.layout.y_axis.decoupled){const r=`y${n.layout.y_axis.axis}`;this[`${r}_extent`]=qo((this[`${r}_extent`]||[]).concat(n.getAxisExtent("y")))}}return this.layout.axes.x&&this.layout.axes.x.extent==="state"&&(this.x_extent=[this.state.start,this.state.end]),this}generateTicks(t){if(this.layout.axes[t].ticks){const r=this.layout.axes[t].ticks;if(Array.isArray(r))return r;if(typeof r=="object"){const i=this,o={position:r.position};return this._data_layer_ids_by_z_index.reduce((s,l)=>{const u=i.data_layers[l];return s.concat(u.getTicks(t,o))},[]).map(s=>{let l={};return l=qt(l,r),qt(l,s)})}}return this[`${t}_extent`]?rK(this[`${t}_extent`],"both"):[]}renderAxis(t){if(!["x","y1","y2"].includes(t))throw new Error(`Unable to render axis; invalid axis identifier: ${t}`);const n=this.layout.axes[t].render&&typeof this[`${t}_scale`]=="function"&&!isNaN(this[`${t}_scale`](0));if(this[`${t}_axis`]&&this.svg.container.select(`g.lz-axis.lz-${t}`).style("display",n?null:"none"),!n)return this;const r={x:{position:`translate(${this.layout.margin.left}, ${this.layout.height-this.layout.margin.bottom})`,orientation:"bottom",label_x:this.layout.cliparea.width/2,label_y:this.layout.axes[t].label_offset||0,label_rotate:null},y1:{position:`translate(${this.layout.margin.left}, ${this.layout.margin.top})`,orientation:"left",label_x:-1*(this.layout.axes[t].label_offset||0),label_y:this.layout.cliparea.height/2,label_rotate:-90},y2:{position:`translate(${this.parent_plot.layout.width-this.layout.margin.right}, ${this.layout.margin.top})`,orientation:"right",label_x:this.layout.axes[t].label_offset||0,label_y:this.layout.cliparea.height/2,label_rotate:-90}};this[`${t}_ticks`]=this.generateTicks(t);const i=(s=>{for(let l=0;l<s.length;l++)if(isNaN(s[l]))return!1;return!0})(this[`${t}_ticks`]);let o;switch(r[t].orientation){case"right":o=Ev;break;case"left":o=X5;break;case"bottom":o=Y5;break;default:throw new Error("Unrecognized axis orientation")}if(this[`${t}_axis`]=o(this[`${t}_scale`]).tickPadding(3),i)this[`${t}_axis`].tickValues(this[`${t}_ticks`]),this.layout.axes[t].tick_format==="region"&&this[`${t}_axis`].tickFormat(s=>Gb(s,6));else{let s=this[`${t}_ticks`].map(l=>l[t.substr(0,1)]);this[`${t}_axis`].tickValues(s).tickFormat((l,u)=>this[`${t}_ticks`][u].text)}if(this.svg[`${t}_axis`].attr("transform",r[t].position).call(this[`${t}_axis`]),!i){const s=o8(`g#${this.getBaseId().replace(".","\\.")}\\.${t}_axis g.tick`),l=this;s.each(function(u,c){const f=Ue(this).select("text");l[`${t}_ticks`][c].style&&xn(f,l[`${t}_ticks`][c].style),l[`${t}_ticks`][c].transform&&f.attr("transform",l[`${t}_ticks`][c].transform)})}const a=this.layout.axes[t].label||null;return a!==null&&(this.svg[`${t}_axis_label`].attr("x",r[t].label_x).attr("y",r[t].label_y).text(Tl(a,this.state)).attr("fill","currentColor"),r[t].label_rotate!==null&&this.svg[`${t}_axis_label`].attr("transform",`rotate(${r[t].label_rotate} ${r[t].label_x}, ${r[t].label_y})`)),["x","y1","y2"].forEach(s=>{if(this.layout.interaction[`drag_${s}_ticks_to_scale`]){const l=`.${this.parent.id}.${this.id}.interaction.drag`,u=function(){typeof Ue(this).node().focus=="function"&&Ue(this).node().focus();let c=s==="x"?"ew-resize":"ns-resize";Ce&&Ce.shiftKey&&(c="move"),Ue(this).style("font-weight","bold").style("cursor",c).on(`keydown${l}`,u).on(`keyup${l}`,u)};this.svg.container.selectAll(`.lz-axis.lz-${s} .tick text`).attr("tabindex",0).on(`mouseover${l}`,u).on(`mouseout${l}`,function(){Ue(this).style("font-weight","normal").on(`keydown${l}`,null).on(`keyup${l}`,null)}).on(`mousedown${l}`,()=>{this.parent.startDrag(this,`${s}_tick`)})}}),this}scaleHeightToData(t){t=+t||null,t===null&&this._data_layer_ids_by_z_index.forEach(n=>{const r=this.data_layers[n].getAbsoluteDataHeight();+r&&(t===null?t=+r:t=Math.max(t,+r))}),+t&&(t+=+this.layout.margin.top+ +this.layout.margin.bottom,this.setDimensions(this.parent_plot.layout.width,t),this.parent.setDimensions(),this.parent.positionPanels())}setAllElementStatus(t,n){this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].setAllElementStatus(t,n)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;of.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},of.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const eK={state:{},width:800,min_width:400,min_region_scale:null,max_region_scale:null,responsive_resize:!1,panels:[],toolbar:{widgets:[]},panel_boundaries:!0,mouse_guide:!0};function tK(e,t){e=e||{},t=t||{};let n=!1,r=null,i;if(typeof e.chr<"u"&&typeof e.start<"u"&&typeof e.end<"u"){if(e.start=Math.max(parseInt(e.start),1),e.end=Math.max(parseInt(e.end),1),isNaN(e.start)&&isNaN(e.end))e.start=1,e.end=1,r=.5,i=0;else if(isNaN(e.start)||isNaN(e.end))r=e.start||e.end,i=0,e.start=isNaN(e.start)?e.end:e.start,e.end=isNaN(e.end)?e.start:e.end;else{if(r=Math.round((e.start+e.end)/2),i=e.end-e.start,i<0){const o=e.start;e.end=e.start,e.start=o,i=e.end-e.start}r<0&&(e.start=1,e.end=1,i=0)}n=!0}return t.min_region_scale&&n&&i<t.min_region_scale&&(e.start=Math.max(r-Math.floor(t.min_region_scale/2),1),e.end=e.start+t.min_region_scale),t.max_region_scale&&n&&i>t.max_region_scale&&(e.start=Math.max(r-Math.floor(t.max_region_scale/2),1),e.end=e.start+t.max_region_scale),e}class nK{constructor(t,n,r){this._initialized=!1,this.parent_plot=this,this.id=t,this.container=null,this.svg=null,this.panels={},this._panel_ids_by_y_index=[],this._remap_promises=[],this.layout=r,qt(this.layout,eK),this._base_layout=at(this.layout),this.state=this.layout.state,this.lzd=new FX(n),this._external_listeners=new Map,this._event_hooks={},this._interaction={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n){const r=this._event_hooks[t];if(typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);if(!r&&!this._event_hooks.any_lz_event)return this;const i=this.getBaseId();let o;if(n&&n.sourceID?o=n:o={sourceID:i,target:this,data:n||null},r&&r.forEach(a=>{a.call(this,o)}),t!=="any_lz_event"){const a=Object.assign({event_name:t},o);this.emit("any_lz_event",a)}return this}addPanel(t){if(typeof t!="object")throw new Error("Invalid panel layout");const n=new of(t,this);if(this.panels[n.id]=n,n.layout.y_index!==null&&!isNaN(n.layout.y_index)&&this._panel_ids_by_y_index.length>0)n.layout.y_index<0&&(n.layout.y_index=Math.max(this._panel_ids_by_y_index.length+n.layout.y_index,0)),this._panel_ids_by_y_index.splice(n.layout.y_index,0,n.id),this.applyPanelYIndexesToPanelLayouts();else{const i=this._panel_ids_by_y_index.push(n.id);this.panels[n.id].layout.y_index=i-1}let r=null;return this.layout.panels.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.panels.push(this.panels[n.id].layout)-1),this.panels[n.id]._layout_idx=r,this._initialized&&(this.positionPanels(),this.panels[n.id].initialize(),this.panels[n.id].reMap(),this.setDimensions(this.layout.width,this._total_height)),this.panels[n.id]}clearPanelData(t,n){n=n||"wipe";let r;return t?r=[t]:r=Object.keys(this.panels),r.forEach(i=>{this.panels[i]._data_layer_ids_by_z_index.forEach(o=>{const a=this.panels[i].data_layers[o];a.destroyAllTooltips(),delete a._layer_state,delete this.layout.state[a._state_id],n==="reset"&&a._setDefaultState()})}),this}removePanel(t){const n=this.panels[t];if(!n)throw new Error(`Unable to remove panel, ID not found: ${t}`);return this._panel_boundaries.hide(),this.clearPanelData(t),n.loader.hide(),n.toolbar.destroy(!0),n.curtain.hide(),n.svg.container&&n.svg.container.remove(),this.layout.panels.splice(n._layout_idx,1),delete this.panels[t],delete this.layout.state[t],this.layout.panels.forEach((r,i)=>{this.panels[r.id]._layout_idx=i}),this._panel_ids_by_y_index.splice(this._panel_ids_by_y_index.indexOf(t),1),this.applyPanelYIndexesToPanelLayouts(),this._initialized&&(this.positionPanels(),this.setDimensions(this.layout.width,this._total_height)),this.emit("panel_removed",t),this}refresh(){return this.applyState()}subscribeToData(t,n){const{from_layer:r,namespace:i,data_operations:o,onerror:a}=t,s=a||function(f){console.error("An error occurred while acting on an external callback",f)};if(r){const f=`${this.getBaseId()}.`,d=r.startsWith(f)?r:`${f}${r}`;let h=!1;for(let g of Object.values(this.panels))if(h=Object.values(g.data_layers).some(b=>b.getBaseId()===d),h)break;if(!h)throw new Error(`Could not subscribe to unknown data layer ${d}`);const p=g=>{if(g.data.layer===d)try{n(g.data.content,this)}catch(b){s(b)}};return this.on("data_from_layer",p),p}if(!i)throw new Error("subscribeToData must specify the desired data: either 'from_layer' or 'namespace' option");const[l,u]=this.lzd.config_to_sources(i,o),c=()=>{try{this.lzd.getData(this.state,l,u).then(f=>n(f,this)).catch(s)}catch(f){s(f)}};return this.on("data_rendered",c),c}applyState(t){if(t=t||{},typeof t!="object")throw new Error(`applyState only accepts an object; ${typeof t} given`);let n={chr:this.state.chr,start:this.state.start,end:this.state.end};for(let r in t)n[r]=t[r];n=tK(n,this.layout);for(let r in n)this.state[r]=n[r];this.emit("data_requested"),this._remap_promises=[],this.loading_data=!0;for(let r in this.panels)this._remap_promises.push(this.panels[r].reMap());return Promise.all(this._remap_promises).catch(r=>{console.error(r),this.curtain.show(r.message||r),this.loading_data=!1}).then(()=>{this.toolbar.update(),this._panel_ids_by_y_index.forEach(s=>{const l=this.panels[s];l.toolbar.update(),l._data_layer_ids_by_z_index.forEach(u=>{l.data_layers[u].applyAllElementStatus()})}),this.emit("layout_changed"),this.emit("data_rendered"),this.emit("state_changed",t);const{chr:r,start:i,end:o}=this.state;Object.keys(t).some(s=>["chr","start","end"].includes(s))&&this.emit("region_changed",{chr:r,start:i,end:o}),this.loading_data=!1})}trackExternalListener(t,n,r){this._external_listeners.has(t)||this._external_listeners.set(t,new Map);const i=this._external_listeners.get(t),o=i.get(n)||[];o.includes(r)||o.push(r),i.set(n,o)}destroy(){for(let[n,r]of this._external_listeners.entries())for(let[i,o]of r)for(let a of o)n.removeEventListener(i,a);const t=this.svg.node().parentNode;if(!t)throw new Error("Plot has already been removed");for(;t.lastElementChild;)t.removeChild(t.lastElementChild);t.outerHTML=t.outerHTML,this._initialized=!1,this.svg=null,this.panels=null}mutateLayout(){Object.values(this.panels).forEach(t=>{Object.values(t.data_layers).forEach(n=>n.mutateLayout())})}_canInteract(t){t=t||null;const{_interaction:n}=this;return t?(typeof n.panel_id>"u"||n.panel_id===t)&&!this.loading_data:!(n.dragging||n.zooming||this.loading_data)}_getPageOrigin(){const t=this.svg.node().getBoundingClientRect();let n=document.documentElement.scrollLeft||document.body.scrollLeft,r=document.documentElement.scrollTop||document.body.scrollTop,i=this.svg.node();for(;i.parentNode!==null;)if(i=i.parentNode,i!==document&&Ue(i).style("position")!=="static"){n=-1*i.getBoundingClientRect().left,r=-1*i.getBoundingClientRect().top;break}return{x:n+t.left,y:r+t.top,width:t.width,height:t.height}}getContainerOffset(){const t={top:0,left:0};let n=this.container.offsetParent||null;for(;n!==null;)t.top+=n.offsetTop,t.left+=n.offsetLeft,n=n.offsetParent||null;return t}applyPanelYIndexesToPanelLayouts(){this._panel_ids_by_y_index.forEach((t,n)=>{this.panels[t].layout.y_index=n})}getBaseId(){return this.id}rescaleSVG(){const t=this.svg.node().getBoundingClientRect();return this.setDimensions(t.width,t.height),this}initializeLayout(){if(isNaN(this.layout.width)||this.layout.width<=0)throw new Error("Plot layout parameter `width` must be a positive number");return this.layout.responsive_resize=!!this.layout.responsive_resize,this.layout.panels.forEach(t=>{this.addPanel(t)}),this}setDimensions(t,n){if(!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0){const i=n/this._total_height;this.layout.width=Math.max(Math.round(+t),this.layout.min_width),this.layout.responsive_resize&&this.svg&&(this.layout.width=Math.max(this.svg.node().parentNode.getBoundingClientRect().width,this.layout.min_width));let o=0;this._panel_ids_by_y_index.forEach(a=>{const s=this.panels[a],l=this.layout.width,u=s.layout.height*i;s.setDimensions(l,u),s.setOrigin(0,o),o+=u,s.toolbar.update()})}const r=this._total_height;return this.svg!==null&&(this.svg.attr("viewBox",`0 0 ${this.layout.width} ${r}`),this.svg.attr("width",this.layout.width).attr("height",r)),this._initialized&&(this._panel_boundaries.position(),this.toolbar.update(),this.curtain.update(),this.loader.update()),this.emit("layout_changed")}positionPanels(){const t={left:0,right:0};for(let r of Object.values(this.panels))r.layout.interaction.x_linked&&(t.left=Math.max(t.left,r.layout.margin.left),t.right=Math.max(t.right,r.layout.margin.right));let n=0;return this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r],o=i.layout;if(i.setOrigin(0,n),n+=this.panels[r].layout.height,o.interaction.x_linked){const a=Math.max(t.left-o.margin.left,0)+Math.max(t.right-o.margin.right,0);o.width+=a,o.margin.left=t.left,o.margin.right=t.right,o.cliparea.origin.x=t.left}}),this.setDimensions(),this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r];i.setDimensions(this.layout.width,i.layout.height)}),this}initialize(){if(this.layout.responsive_resize){Ue(this.container).classed("lz-container-responsive",!0);const u=()=>window.requestAnimationFrame(()=>this.rescaleSVG());if(window.addEventListener("resize",u),this.trackExternalListener(window,"resize",u),typeof IntersectionObserver<"u"){const f={root:document.documentElement,threshold:.9};new IntersectionObserver((h,p)=>{h.some(g=>g.intersectionRatio>0)&&this.rescaleSVG()},f).observe(this.container)}const c=()=>this.setDimensions();window.addEventListener("load",c),this.trackExternalListener(window,"load",c)}if(this.layout.mouse_guide){const u=this.svg.append("g").attr("class","lz-mouse_guide").attr("id",`${this.id}.mouse_guide`),c=u.append("rect").attr("class","lz-mouse_guide-vertical").attr("x",-1),f=u.append("rect").attr("class","lz-mouse_guide-horizontal").attr("y",-1);this._mouse_guide={svg:u,vertical:c,horizontal:f}}this.curtain=Y6.call(this),this.loader=X6.call(this),this._panel_boundaries={parent:this,hide_timeout:null,showing:!1,dragging:!1,selectors:[],corner_selector:null,show:function(){if(!this.showing&&!this.parent.curtain.showing){this.showing=!0,this.parent._panel_ids_by_y_index.forEach((f,d)=>{const h=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-boundary").attr("title","Resize panel");h.append("span");const p=B0();p.on("start",()=>{this.dragging=!0}),p.on("end",()=>{this.dragging=!1}),p.on("drag",()=>{const g=this.parent.panels[this.parent._panel_ids_by_y_index[d]],b=g.layout.height;g.setDimensions(this.parent.layout.width,g.layout.height+Ce.dy);const v=g.layout.height-b;this.parent._panel_ids_by_y_index.forEach((x,y)=>{const _=this.parent.panels[this.parent._panel_ids_by_y_index[y]];y>d&&(_.setOrigin(_.layout.origin.x,_.layout.origin.y+v),_.toolbar.position())}),this.parent.positionPanels(),this.position()}),h.call(p),this.parent._panel_boundaries.selectors.push(h)});const u=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-corner-boundary").attr("title","Resize plot");u.append("span").attr("class","lz-panel-corner-boundary-outer"),u.append("span").attr("class","lz-panel-corner-boundary-inner");const c=B0();c.on("start",()=>{this.dragging=!0}),c.on("end",()=>{this.dragging=!1}),c.on("drag",()=>{this.parent.setDimensions(this.parent.layout.width+Ce.dx,this.parent._total_height+Ce.dy)}),u.call(c),this.parent._panel_boundaries.corner_selector=u}return this.position()},position:function(){if(!this.showing)return this;const u=this.parent._getPageOrigin();this.selectors.forEach((d,h)=>{const p=this.parent.panels[this.parent._panel_ids_by_y_index[h]],g=p._getPageOrigin(),b=u.x,v=g.y+p.layout.height-12,x=this.parent.layout.width-1;d.style("top",`${v}px`).style("left",`${b}px`).style("width",`${x}px`),d.select("span").style("width",`${x}px`)});const c=10,f=16;return this.corner_selector.style("top",`${u.y+this.parent._total_height-c-f}px`).style("left",`${u.x+this.parent.layout.width-c-f}px`),this},hide:function(){return this.showing?(this.showing=!1,this.selectors.forEach(u=>{u.remove()}),this.selectors=[],this.corner_selector.remove(),this.corner_selector=null,this):this}},this.layout.panel_boundaries&&Ue(this.svg.node().parentNode).on(`mouseover.${this.id}.panel_boundaries`,()=>{clearTimeout(this._panel_boundaries.hide_timeout),this._panel_boundaries.show()}).on(`mouseout.${this.id}.panel_boundaries`,()=>{this._panel_boundaries.hide_timeout=setTimeout(()=>{this._panel_boundaries.hide()},300)}),this.toolbar=new Z6(this).show();for(let u in this.panels)this.panels[u].initialize();const t=`.${this.id}`;if(this.layout.mouse_guide){const u=()=>{this._mouse_guide.vertical.attr("x",-1),this._mouse_guide.horizontal.attr("y",-1)},c=()=>{const f=lr(this.svg.node());this._mouse_guide.vertical.attr("x",f[0]),this._mouse_guide.horizontal.attr("y",f[1])};this.svg.on(`mouseout${t}-mouse_guide`,u).on(`touchleave${t}-mouse_guide`,u).on(`mousemove${t}-mouse_guide`,c)}const n=()=>{this.stopDrag()},r=()=>{const{_interaction:u}=this;if(u.dragging){const c=lr(this.svg.node());Ce&&Ce.preventDefault(),u.dragging.dragged_x=c[0]-u.dragging.start_x,u.dragging.dragged_y=c[1]-u.dragging.start_y,this.panels[u.panel_id].render(),u.linked_panel_ids.forEach(f=>{this.panels[f].render()})}};this.svg.on(`mouseup${t}`,n).on(`touchend${t}`,n).on(`mousemove${t}`,r).on(`touchmove${t}`,r);const o=Ue("body").node();o&&(o.addEventListener("mouseup",n),o.addEventListener("touchend",n),this.trackExternalListener(o,"mouseup",n),this.trackExternalListener(o,"touchend",n)),this.on("match_requested",u=>{const c=u.data,f=c.active?c.value:null,d=u.target.id;Object.values(this.panels).forEach(h=>{h.id!==d&&Object.values(h.data_layers).forEach(p=>p.destroyAllTooltips(!1))}),this.applyState({lz_match_value:f})}),this._initialized=!0;const a=this.svg.node().getBoundingClientRect(),s=a.width?a.width:this.layout.width,l=a.height?a.height:this._total_height;return this.setDimensions(s,l),this}startDrag(t,n){t=t||null,n=n||null;let r=null;switch(n){case"background":case"x_tick":r="x";break;case"y1_tick":r="y1";break;case"y2_tick":r="y2";break}if(!(t instanceof of)||!r||!this._canInteract())return this.stopDrag();const i=lr(this.svg.node());return this._interaction={panel_id:t.id,linked_panel_ids:t.getLinkedPanelIds(r),dragging:{method:n,start_x:i[0],start_y:i[1],dragged_x:0,dragged_y:0,axis:r}},this.svg.style("cursor","all-scroll"),this}stopDrag(){const{_interaction:t}=this;if(!t.dragging)return this;if(typeof this.panels[t.panel_id]!="object")return this._interaction={},this;const n=this.panels[t.panel_id],r=(i,o,a)=>{n._data_layer_ids_by_z_index.forEach(s=>{const l=n.data_layers[s].layout[`${i}_axis`];l.axis===o&&(l.floor=a[0],l.ceiling=a[1],delete l.lower_buffer,delete l.upper_buffer,delete l.min_extent,delete l.ticks)})};switch(t.dragging.method){case"background":case"x_tick":t.dragging.dragged_x!==0&&(r("x",1,n.x_extent),this.applyState({start:n.x_extent[0],end:n.x_extent[1]}));break;case"y1_tick":case"y2_tick":if(t.dragging.dragged_y!==0){const i=parseInt(t.dragging.method[1]);r("y",i,n[`y${i}_extent`])}break}return this._interaction={},this.svg.style("cursor",null),this}get _total_height(){return this.layout.panels.reduce((t,n)=>n.height+t,0)}}function Gb(e,t,n){const r={0:"",3:"K",6:"M",9:"G"};if(n=n||!1,isNaN(t)||t===null){const l=Math.log(e)/Math.LN10;t=Math.min(Math.max(l-l%3,0),9)}const i=t-Math.floor((Math.log(e)/Math.LN10).toFixed(t+3)),o=Math.min(Math.max(t,0),2),a=Math.min(Math.max(i,o),12);let s=`${(e/Math.pow(10,t)).toFixed(a)}`;return n&&typeof r[t]<"u"&&(s+=` ${r[t]}b`),s}function Ws(e){let t=e.toUpperCase();t=t.replace(/,/g,"");const n=/([KMG])[B]*$/,r=n.exec(t);let i=1;return r&&(r[1]==="M"?i=1e6:r[1]==="G"?i=1e9:i=1e3,t=t.replace(n,"")),t=Number(t)*i,t}function rK(e,t,n){(typeof n>"u"||isNaN(parseInt(n)))&&(n=5),n=+n;const r=n/3,i=.75,o=1.5,a=.5+1.5*o,s=Math.abs(e[0]-e[1]);let l=s/n;Math.log(s)/Math.LN10<-2&&(l=Math.max(Math.abs(s))*i/r);const u=Math.pow(10,Math.floor(Math.log(l)/Math.LN10));let c=0;u<1&&u!==0&&(c=Math.abs(Math.round(Math.log(u)/Math.LN10)));let f=u;2*u-l<o*(l-f)&&(f=2*u,5*u-l<a*(l-f)&&(f=5*u,10*u-l<o*(l-f)&&(f=10*u)));let d=[],h=parseFloat((Math.floor(e[0]/f)*f).toFixed(c));for(;h<e[1];)d.push(h),h+=f,c>0&&(h=parseFloat(h.toFixed(c)));return d.push(h),(typeof t>"u"||["low","high","both","neither"].indexOf(t)===-1)&&(t="neither"),(t==="low"||t==="both")&&d[0]<e[0]&&(d=d.slice(1)),(t==="high"||t==="both")&&d[d.length-1]>e[1]&&d.pop(),d}function Tl(e,t,n){if(typeof t!="object")throw new Error("invalid arguments: data is not an object");if(typeof e!="string")throw new Error("invalid arguments: html is not a string");const r=[],i=/{{(?:(#if )?([\w+_:|]+)|(#else)|(\/if))}}/;for(;e.length>0;){const u=i.exec(e);u?u.index!==0?(r.push({text:e.slice(0,u.index)}),e=e.slice(u.index)):u[1]==="#if "?(r.push({condition:u[2]}),e=e.slice(u[0].length)):u[2]?(r.push({variable:u[2]}),e=e.slice(u[0].length)):u[3]==="#else"?(r.push({branch:"else"}),e=e.slice(u[0].length)):u[4]==="/if"?(r.push({close:"if"}),e=e.slice(u[0].length)):(console.error(`Error tokenizing tooltip when remaining template is ${JSON.stringify(e)} and previous tokens are ${JSON.stringify(r)} and current regex match is ${JSON.stringify([u[1],u[2],u[3]])}`),e=e.slice(u[0].length)):(r.push({text:e}),e="")}const o=function(){const u=r.shift();if(typeof u.text<"u"||u.variable)return u;if(u.condition){let c=u.then=[];for(u.else=[];r.length>0;){if(r[0].close==="if"){r.shift();break}r[0].branch==="else"&&(r.shift(),c=u.else),c.push(o())}return u}else return console.error(`Error making tooltip AST due to unknown token ${JSON.stringify(u)}`),{text:""}},a=[];for(;r.length>0;)a.push(o());const s=function(u){return Object.prototype.hasOwnProperty.call(s.cache,u)||(s.cache[u]=new za(u).resolve(t,n)),s.cache[u]};s.cache={};const l=function(u){if(typeof u.text<"u")return u.text;if(u.variable){try{const c=s(u.variable);if(["string","number","boolean"].indexOf(typeof c)!==-1)return c;if(c===null)return""}catch{console.error(`Error while processing variable ${JSON.stringify(u.variable)}`)}return`{{${u.variable}}}`}else if(u.condition){try{if(s(u.condition))return u.then.map(l).join("");if(u.else)return u.else.map(l).join("")}catch{console.error(`Error while processing condition ${JSON.stringify(u.variable)}`)}return""}else console.error(`Error rendering tooltip due to unknown AST node ${JSON.stringify(u)}`)};return a.map(l).join("")}function iK(e,t,n){if(typeof e>"u")throw new Error("LocusZoom.populate selector not defined");Ue(e).html("");let r;return Ue(e).call(function(i){if(typeof i.node().id>"u"){let o=0;for(;!Ue(`#lz-${o}`).empty();)o++;i.attr("id",`#lz-${o}`)}if(r=new nK(i.node().id,t,n),r.container=i.node(),typeof i.node().dataset<"u"&&typeof i.node().dataset.region<"u"){const o=oK(i.node().dataset.region);Object.keys(o).forEach(function(a){r.state[a]=o[a]})}r.svg=Ue(`div#${r.id}`).append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("id",`${r.id}_svg`).attr("class","lz-locuszoom").call(xn,r.layout.style),r.setDimensions(),r.positionPanels(),r.initialize(),t&&r.refresh()}),r}function oK(e){const t=/^(\w+):([\d,.]+[kmgbKMGB]*)([-+])([\d,.]+[kmgbKMGB]*)$/,n=/^(\w+):([\d,.]+[kmgbKMGB]*)$/;let r=t.exec(e);if(r)if(r[3]==="+"){const i=Ws(r[2]),o=Ws(r[4]);return{chr:r[1],start:i-o,end:i+o}}else return{chr:r[1],start:Ws(r[2]),end:Ws(r[4])};return r=n.exec(e),r?{chr:r[1],position:Ws(r[2])}:null}const pr=new Zi;pr.add("=",(e,t)=>e===t);pr.add("!=",(e,t)=>e!=t);pr.add("<",(e,t)=>e<t);pr.add("<=",(e,t)=>e<=t);pr.add(">",(e,t)=>e>t);pr.add(">=",(e,t)=>e>=t);pr.add("%",(e,t)=>e%t);pr.add("in",(e,t)=>t&&t.includes(e));pr.add("match",(e,t)=>e&&e.includes(t));const J6=(e,t)=>typeof t>"u"||e.field_value!==t?typeof e.else<"u"?e.else:null:e.then,aK=(e,t)=>{const n=e.breaks||[],r=e.values||[];if(typeof t>"u"||t===null||isNaN(+t))return e.null_value?e.null_value:null;const i=n.reduce(function(o,a){return+t<o||+t>=o&&+t<a?o:a});return r[n.indexOf(i)]},sK=(e,t)=>typeof t>"u"||!e.categories.includes(t)?e.null_value?e.null_value:null:e.values[e.categories.indexOf(t)],lK=(e,t,n)=>{const r=e.values;return r[n%r.length]};let uK=(e,t,n)=>{const r=e._cache=e._cache||new Map,i=e.max_cache_size||500;if(r.size>=i&&r.clear(),r.has(t))return r.get(t);let o=0;t=String(t);for(let l=0;l<t.length;l++){let u=t.charCodeAt(l);o=(o<<5)-o+u,o|=0}const a=e.values,s=a[Math.abs(o)%a.length];return r.set(t,s),s};const cK=(e,t)=>{var n=e.breaks||[],r=e.values||[],i=e.null_value?e.null_value:null;if(n.length<2||n.length!==r.length||typeof t>"u"||t===null||isNaN(+t))return i;if(+t<=e.breaks[0])return r[0];if(+t>=e.breaks[e.breaks.length-1])return r[n.length-1];{var o=null;if(n.forEach(function(s,l){l&&n[l-1]<=+t&&n[l]>=+t&&(o=l)}),o===null)return i;const a=(+t-n[o-1])/(n[o]-n[o-1]);return isFinite(a)?ys(r[o-1],r[o])(a):i}};function dK(e,t){if(t===void 0)return null;const{beta_field:n,stderr_beta_field:r,"+":i=null,"-":o=null}=e;if(!n||!r)throw new Error("effect_direction must specify how to find required 'beta' and 'stderr_beta' fields");const a=t[n],s=t[r];if(a!==void 0)if(s!==void 0){if(a-1.96*s>0)return i;if(a+1.96*s<0)return o||null}else{if(a>0)return i;if(a<0)return o}return null}const fK=Object.freeze(Object.defineProperty({__proto__:null,categorical_bin:sK,effect_direction:dK,if_value:J6,interpolate:cK,numerical_bin:aK,ordinal_cycle:lK,stable_choice:uK},Symbol.toStringTag,{value:"Module"})),ch=new Zi;for(let[e,t]of Object.entries(fK))ch.add(e,t);ch.add("if",J6);const hK={id:"",type:"",tag:"custom_data_type",namespace:{},data_operations:[],id_field:"id",filters:null,match:{},x_axis:{},y_axis:{},legend:null,tooltip:{},tooltip_positioning:"horizontal",behaviors:{}};class cr{constructor(t,n){this._initialized=!1,this._layout_idx=null,this.id=null,this._base_id=null,this.parent=n||null,this.svg={},this.parent_plot=null,n&&(this.parent_plot=n.parent),this.layout=qt(t||{},hK),this.layout.id&&(this.id=this.layout.id),this._filter_func=null,this.layout.x_axis!=={}&&typeof this.layout.x_axis.axis!="number"&&(this.layout.x_axis.axis=1),this.layout.y_axis!=={}&&typeof this.layout.y_axis.axis!="number"&&(this.layout.y_axis.axis=1),this._base_layout=at(this.layout),this.state={},this._state_id=null,this._layer_state=null,this._setDefaultState(),this.data=[],this.layout.tooltip&&(this._tooltips={}),this._global_statuses={highlighted:!1,selected:!1,faded:!1,hidden:!1},this._data_contract=new Set,this._entities=new Map,this._dependencies=[],this.mutateLayout()}render(){throw new Error("Method must be implemented")}moveForward(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n+1]&&(t[n]=t[n+1],t[n+1]=this.id,this.parent.resortDataLayers()),this}moveBack(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n-1]&&(t[n]=t[n-1],t[n-1]=this.id,this.parent.resortDataLayers()),this}setElementAnnotation(t,n,r){const i=this.getElementId(t);return this._layer_state.extra_fields[i]||(this._layer_state.extra_fields[i]={}),this._layer_state.extra_fields[i][n]=r,this}setFilter(t){console.warn("The setFilter method is deprecated and will be removed in the future; please use the layout API with a custom filter function instead"),this._filter_func=t}mutateLayout(){if(this.parent_plot){const{namespace:t,data_operations:n}=this.layout;this._data_contract=Vb(this.layout,Object.keys(t));const[r,i]=this.parent_plot.lzd.config_to_sources(t,n,this);this._entities=r,this._dependencies=i}}_getDataExtent(t,n){return t=t||this.data,qo(t,r=>+new za(n.field).resolve(r))}getElementId(t){const n=Symbol.for("lzID");if(t[n])return t[n];const r=this.layout.id_field;let i=t[r];if(typeof i>"u"&&/{{[^{}]*}}/.test(r)&&(i=Tl(r,t,{})),i==null)throw new Error("Unable to generate element ID");const o=i.toString().replace(/\W/g,""),a=`${this.getBaseId()}-${o}`.replace(/([:.[\],])/g,"_");return t[n]=a,a}getElementStatusNodeId(t){return null}getElementById(t){const n=Ue(`#${t.replace(/([:.[\],])/g,"\\$1")}`);return!n.empty()&&n.data()&&n.data().length?n.data()[0]:null}applyDataMethods(){const t=this.layout.match&&this.layout.match.receive,n=pr.get(this.layout.match&&this.layout.match.operator||"="),r=this.parent_plot.state.lz_match_value,i=t?new za(t):null;if(this.data.length&&this._data_contract.size){const o=new Set(this._data_contract);for(let a of this.data)if(Object.keys(a).forEach(s=>o.delete(s)),!o.size)break;o.size&&console.debug(`Data layer '${this.getBaseId()}' did not receive all expected fields from retrieved data. Missing fields are: ${[...o]}
|
|
1996
|
+
`)])])])]),oI=Object.assign(Object.assign({},pt.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),aI=Fe({name:"Tabs",props:oI,setup(e,{slots:t}){var n,r,i,o;const{mergedClsPrefixRef:a,inlineThemeDisabled:s}=rn(e),l=pt("Tabs","-tabs",iI,VF,e,a),u=ne(null),c=ne(null),d=ne(null),f=ne(null),h=ne(null),p=ne(null),g=ne(!0),b=ne(!0),v=nf(e,["labelSize","size"]),x=nf(e,["activeName","value"]),y=ne((r=(n=x.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(o=(i=Ua(t.default())[0])===null||i===void 0?void 0:i.props)===null||o===void 0?void 0:o.name:null),_=Gr(x,y),S={id:0},$=pe(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});vt(_,()=>{S.id=0,R(),C()});function w(){var L;const{value:O}=_;return O===null?null:(L=u.value)===null||L===void 0?void 0:L.querySelector(`[data-name="${O}"]`)}function T(L){if(e.type==="card")return;const{value:O}=c;if(!O)return;const ee=O.style.opacity==="0";if(L){const U=`${a.value}-tabs-bar--disabled`,{barWidth:B,placement:V}=e;if(L.dataset.disabled==="true"?O.classList.add(U):O.classList.remove(U),["top","bottom"].includes(V)){if(P(["top","maxHeight","height"]),typeof B=="number"&&L.offsetWidth>=B){const me=Math.floor((L.offsetWidth-B)/2)+L.offsetLeft;O.style.left=`${me}px`,O.style.maxWidth=`${B}px`}else O.style.left=`${L.offsetLeft}px`,O.style.maxWidth=`${L.offsetWidth}px`;O.style.width="8192px",ee&&(O.style.transition="none"),O.offsetWidth,ee&&(O.style.transition="",O.style.opacity="1")}else{if(P(["left","maxWidth","width"]),typeof B=="number"&&L.offsetHeight>=B){const me=Math.floor((L.offsetHeight-B)/2)+L.offsetTop;O.style.top=`${me}px`,O.style.maxHeight=`${B}px`}else O.style.top=`${L.offsetTop}px`,O.style.maxHeight=`${L.offsetHeight}px`;O.style.height="8192px",ee&&(O.style.transition="none"),O.offsetHeight,ee&&(O.style.transition="",O.style.opacity="1")}}}function M(){if(e.type==="card")return;const{value:L}=c;L&&(L.style.opacity="0")}function P(L){const{value:O}=c;if(O)for(const ee of L)O.style[ee]=""}function R(){if(e.type==="card")return;const L=w();L?T(L):M()}function C(){var L;const O=(L=h.value)===null||L===void 0?void 0:L.$el;if(!O)return;const ee=w();if(!ee)return;const{scrollLeft:U,offsetWidth:B}=O,{offsetLeft:V,offsetWidth:me}=ee;U>V?O.scrollTo({top:0,left:V,behavior:"smooth"}):V+me>U+B&&O.scrollTo({top:0,left:V+me-B,behavior:"smooth"})}const E=ne(null);let F=0,z=null;function j(L){const O=E.value;if(O){F=L.getBoundingClientRect().height;const ee=`${F}px`,U=()=>{O.style.height=ee,O.style.maxHeight=ee};z?(U(),z(),z=null):z=U}}function Z(L){const O=E.value;if(O){const ee=L.getBoundingClientRect().height,U=()=>{document.body.offsetHeight,O.style.maxHeight=`${ee}px`,O.style.height=`${Math.max(F,ee)}px`};z?(z(),z=null,U()):z=U}}function J(){const L=E.value;if(L){L.style.maxHeight="",L.style.height="";const{paneWrapperStyle:O}=e;if(typeof O=="string")L.style.cssText=O;else if(O){const{maxHeight:ee,height:U}=O;ee!==void 0&&(L.style.maxHeight=ee),U!==void 0&&(L.style.height=U)}}}const ie={value:[]},he=ne("next");function _e(L){const O=_.value;let ee="next";for(const U of ie.value){if(U===O)break;if(U===L){ee="prev";break}}he.value=ee,oe(L)}function oe(L){const{onActiveNameChange:O,onUpdateValue:ee,"onUpdate:value":U}=e;O&&Ye(O,L),ee&&Ye(ee,L),U&&Ye(U,L),y.value=L}function ve(L){const{onClose:O}=e;O&&Ye(O,L)}function we(){const{value:L}=c;if(!L)return;const O="transition-disabled";L.classList.add(O),R(),L.classList.remove(O)}const Oe=ne(null);function xe({transitionDisabled:L}){const O=u.value;if(!O)return;L&&O.classList.add("transition-disabled");const ee=w();ee&&Oe.value&&(Oe.value.style.width=`${ee.offsetWidth}px`,Oe.value.style.height=`${ee.offsetHeight}px`,Oe.value.style.transform=`translateX(${ee.offsetLeft-kn(getComputedStyle(O).paddingLeft)}px)`,L&&Oe.value.offsetWidth),L&&O.classList.remove("transition-disabled")}vt([_],()=>{e.type==="segment"&&fn(()=>{xe({transitionDisabled:!1})})}),dn(()=>{e.type==="segment"&&xe({transitionDisabled:!0})});let Xe=0;function Ve(L){var O;if(L.contentRect.width===0&&L.contentRect.height===0||Xe===L.contentRect.width)return;Xe=L.contentRect.width;const{type:ee}=e;if((ee==="line"||ee==="bar")&&we(),ee!=="segment"){const{placement:U}=e;Y((U==="top"||U==="bottom"?(O=h.value)===null||O===void 0?void 0:O.$el:p.value)||null)}}const fe=jh(Ve,64);vt([()=>e.justifyContent,()=>e.size],()=>{fn(()=>{const{type:L}=e;(L==="line"||L==="bar")&&we()})});const Ee=ne(!1);function Pe(L){var O;const{target:ee,contentRect:{width:U,height:B}}=L,V=ee.parentElement.parentElement.offsetWidth,me=ee.parentElement.parentElement.offsetHeight,{placement:Ae}=e;if(!Ee.value)Ae==="top"||Ae==="bottom"?V<U&&(Ee.value=!0):me<B&&(Ee.value=!0);else{const{value:Re}=f;if(!Re)return;Ae==="top"||Ae==="bottom"?V-U>Re.$el.offsetWidth&&(Ee.value=!1):me-B>Re.$el.offsetHeight&&(Ee.value=!1)}Y(((O=h.value)===null||O===void 0?void 0:O.$el)||null)}const A=jh(Pe,64);function H(){const{onAdd:L}=e;L&&L(),fn(()=>{const O=w(),{value:ee}=h;!O||!ee||ee.scrollTo({left:O.offsetLeft,top:0,behavior:"smooth"})})}function Y(L){if(!L)return;const{placement:O}=e;if(O==="top"||O==="bottom"){const{scrollLeft:ee,scrollWidth:U,offsetWidth:B}=L;g.value=ee<=0,b.value=ee+B>=U}else{const{scrollTop:ee,scrollHeight:U,offsetHeight:B}=L;g.value=ee<=0,b.value=ee+B>=U}}const de=jh(L=>{Y(L.target)},64);jn(xv,{triggerRef:et(e,"trigger"),tabStyleRef:et(e,"tabStyle"),tabClassRef:et(e,"tabClass"),addTabStyleRef:et(e,"addTabStyle"),addTabClassRef:et(e,"addTabClass"),paneClassRef:et(e,"paneClass"),paneStyleRef:et(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:et(e,"type"),closableRef:et(e,"closable"),valueRef:_,tabChangeIdRef:S,onBeforeLeaveRef:et(e,"onBeforeLeave"),activateTab:_e,handleClose:ve,handleAdd:H}),h2(()=>{R(),C()}),xr(()=>{const{value:L}=d;if(!L)return;const{value:O}=a,ee=`${O}-tabs-nav-scroll-wrapper--shadow-start`,U=`${O}-tabs-nav-scroll-wrapper--shadow-end`;g.value?L.classList.remove(ee):L.classList.add(ee),b.value?L.classList.remove(U):L.classList.add(U)});const le={syncBarPosition:()=>{R()}},q=()=>{xe({transitionDisabled:!0})},N=pe(()=>{const{value:L}=v,{type:O}=e,ee={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[O],U=`${L}${ee}`,{self:{barColor:B,closeIconColor:V,closeIconColorHover:me,closeIconColorPressed:Ae,tabColor:Re,tabBorderColor:rt,paneTextColor:lt,tabFontWeight:ft,tabBorderRadius:zt,tabFontWeightActive:yt,colorSegment:Lt,fontWeightStrong:ye,tabColorSegment:G,closeSize:m,closeIconSize:I,closeColorHover:D,closeColorPressed:te,closeBorderRadius:K,[Se("panePadding",L)]:se,[Se("tabPadding",U)]:ue,[Se("tabPaddingVertical",U)]:ae,[Se("tabGap",U)]:ke,[Se("tabGap",`${U}Vertical`)]:Me,[Se("tabTextColor",O)]:$e,[Se("tabTextColorActive",O)]:ze,[Se("tabTextColorHover",O)]:Je,[Se("tabTextColorDisabled",O)]:Ne,[Se("tabFontSize",L)]:ht},common:{cubicBezierEaseInOut:Le}}=l.value;return{"--n-bezier":Le,"--n-color-segment":Lt,"--n-bar-color":B,"--n-tab-font-size":ht,"--n-tab-text-color":$e,"--n-tab-text-color-active":ze,"--n-tab-text-color-disabled":Ne,"--n-tab-text-color-hover":Je,"--n-pane-text-color":lt,"--n-tab-border-color":rt,"--n-tab-border-radius":zt,"--n-close-size":m,"--n-close-icon-size":I,"--n-close-color-hover":D,"--n-close-color-pressed":te,"--n-close-border-radius":K,"--n-close-icon-color":V,"--n-close-icon-color-hover":me,"--n-close-icon-color-pressed":Ae,"--n-tab-color":Re,"--n-tab-font-weight":ft,"--n-tab-font-weight-active":yt,"--n-tab-padding":ue,"--n-tab-padding-vertical":ae,"--n-tab-gap":ke,"--n-tab-gap-vertical":Me,"--n-pane-padding-left":Kn(se,"left"),"--n-pane-padding-right":Kn(se,"right"),"--n-pane-padding-top":Kn(se,"top"),"--n-pane-padding-bottom":Kn(se,"bottom"),"--n-font-weight-strong":ye,"--n-tab-color-segment":G}}),re=s?Cn("tabs",pe(()=>`${v.value[0]}${e.type[0]}`),N,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:_,renderedNames:new Set,segmentCapsuleElRef:Oe,tabsPaneWrapperRef:E,tabsElRef:u,barElRef:c,addTabInstRef:f,xScrollInstRef:h,scrollWrapperElRef:d,addTabFixed:Ee,tabWrapperStyle:$,handleNavResize:fe,mergedSize:v,handleScroll:de,handleTabsResize:A,cssVars:s?void 0:N,themeClass:re==null?void 0:re.themeClass,animationDirection:he,renderNameListRef:ie,yScrollElRef:p,handleSegmentResize:q,onAnimationBeforeLeave:j,onAnimationEnter:Z,onAnimationAfterEnter:J,onRender:re==null?void 0:re.onRender},le)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:o,renderNameListRef:a,onRender:s,paneWrapperClass:l,paneWrapperStyle:u,$slots:{default:c,prefix:d,suffix:f}}=this;s==null||s();const h=c?Ua(c()).filter(S=>S.type.__TAB_PANE__===!0):[],p=c?Ua(c()).filter(S=>S.type.__TAB__===!0):[],g=!p.length,b=t==="card",v=t==="segment",x=!b&&!v&&this.justifyContent;a.value=[];const y=()=>{const S=k("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},x?null:k("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?h.map(($,w)=>(a.value.push($.props.name),ly(k(k0,Object.assign({},$.props,{internalCreatedByPane:!0,internalLeftPadded:w!==0&&(!x||x==="center"||x==="start"||x==="end")}),$.children?{default:$.children.tab}:void 0)))):p.map(($,w)=>(a.value.push($.props.name),ly(w!==0&&!x?sy($):$))),!r&&i&&b?ay(i,(g?h.length:p.length)!==0):null,x?null:k("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return k("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},b&&i?k(Wi,{onResize:this.handleTabsResize},{default:()=>S}):S,b?k("div",{class:`${e}-tabs-pad`}):null,b?null:k("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},_=v?"top":n;return k("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${o}-size`,x&&`${e}-tabs--flex`,`${e}-tabs--${_}`],style:this.cssVars},k("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${_}`,`${e}-tabs-nav`]},Bt(d,S=>S&&k("div",{class:`${e}-tabs-nav__prefix`},S)),v?k(Wi,{onResize:this.handleSegmentResize},{default:()=>k("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},k("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},k("div",{class:`${e}-tabs-wrapper`},k("div",{class:`${e}-tabs-tab`}))),g?h.map((S,$)=>(a.value.push(S.props.name),k(k0,Object.assign({},S.props,{internalCreatedByPane:!0,internalLeftPadded:$!==0}),S.children?{default:S.children.tab}:void 0))):p.map((S,$)=>(a.value.push(S.props.name),$===0?S:sy(S))))}):k(Wi,{onResize:this.handleNavResize},{default:()=>k("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(_)?k(v9,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:y}):k("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},y()))}),r&&i&&b?ay(i,!0):null,Bt(f,S=>S&&k("div",{class:`${e}-tabs-nav__suffix`},S))),g&&(this.animated&&(_==="top"||_==="bottom")?k("div",{ref:"tabsPaneWrapperRef",style:u,class:[`${e}-tabs-pane-wrapper`,l]},oy(h,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):oy(h,this.mergedValue,this.renderedNames)))}});function oy(e,t,n,r,i,o,a){const s=[];return e.forEach(l=>{const{name:u,displayDirective:c,"display-directive":d}=l.props,f=p=>c===p||d===p,h=t===u;if(l.key!==void 0&&(l.key=u),h||f("show")||f("show:lazy")&&n.has(u)){n.has(u)||n.add(u);const p=!f("if");s.push(p?lo(l,[[md,h]]):l)}}),a?k(Yw,{name:`${a}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:o},{default:()=>s}):s}function ay(e,t){return k(k0,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function sy(e){const t=Vr(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function ly(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function P5(e,t,n){try{const{data:r}=await bu().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){Bl(r)}}async function sI(e,t,n,r){try{if(t)await R5(t,n,r);else return await P5(e,n,r)}catch(i){Bl(i)}}async function R5(e,t,n){try{await bu().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(r){Bl(r)}}function qs(e){return String(e).toLowerCase()==="true"}async function lI(e,t={}){const n=xu(e.settings,t.settings),r=e.specs,i=fI(e.tracks,t.tracks);return{plugin:e,settings:n,specs:r,tracks:i}}function uI(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=qs(n)),n}function cI(e,t={}){var n,r,i;const o=t,a=(n=e.test_param)==null?void 0:n.name;if(!a)console.error(`Test parameter has no name: ${e.name}.`);else{const s=o[a]??((r=e.test_param)==null?void 0:r.value);for(const l of e.cases||[])l.value===s&&(o[a]=s,(i=l.inputs)!=null&&i.length&&xu(l.inputs,o))}return o}function xu(e,t){const n=t||{};return e==null||e.forEach(r=>{r.type==="conditional"?n[r.name]=cI(r,n[r.name]):n[r.name]=uI(r,n[r.name])}),n}function fI(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=xu(e,r)})),n}const dI={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},hI=Fe({__name:"InputConditional",props:Yc({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:Yc(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,r=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=ne(n.input.test_param),o=i.value.name;o||console.error(`Test parameter has no name: ${n.input.name}.`);const a=Xg(e,"value");(!a.value||!(o in a.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,a.value);const s=ne(f()),l=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=xu(g.inputs),p[g.value][o]=g.value;return p}),u=pe(()=>{const p={};if(n.input.cases&&n.input.cases.length>0)for(const g of n.input.cases)p[g.value]=g.inputs;return p}),c=pe(()=>u.value[s.value]),d=pe({get(){return s.value==="true"},set(p){s.value=String(p)}});function f(){return a.value&&a.value[o]}function h(p){let g={...l.value[s.value]};if(p){const b={};c.value.forEach(v=>{b[v.name]=p[v.name]}),g={...g,...p}}r("update:value",g)}return vt(()=>a.value,()=>{s.value=f()}),vt(()=>s.value,()=>{h()}),(p,g)=>(We(),wt(kt,null,[i.value.type==="boolean"?(We(),It(qe(E5),{key:0,value:d.value,"onUpdate:value":g[0]||(g[0]=b=>d.value=b)},null,8,["value"])):(We(),It(qe(Pd),{key:1,value:s.value,"onUpdate:value":g[1]||(g[1]=b=>s.value=b),options:i.value.data},null,8,["value","options"])),c.value?(We(),wt("div",dI,[Ge(wv,{"dataset-id":p.datasetId,inputs:c.value,values:a.value,"onUpdate:values":h},null,8,["dataset-id","inputs","values"])])):Xn("",!0)],64))}}),pI={key:0,class:"text-red-600 mb-1"},gI=100,vI=Fe({__name:"InputData",props:Yc({extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=ne([]),r=Xg(e,"value"),i=ne(!1),o=ne(null);async function a(c){i.value=!0;try{const d=t.extension?`q=extension-eq&qv=${t.extension}&`:"",f=c?`q=name-contains&qv=${c}`:"",{data:h}=await bu().GET(`/api/datasets?limit=${gI}&${d}${f}`);if(h&&h.length>0){const p=h.map(g=>({label:g.name,value:{id:g.id,name:g.name}}));p.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&p.unshift({label:"-- Clear Selection --",value:null}),n.value=p}}catch(d){console.log(d)}finally{i.value=!1}}function s(){r.value=o.value}function l(c){return k("div",{class:"my-1 whitespace-normal break-all"},[k(mr,{class:"size-3 mr-1"},{default:()=>k(Jw)}),c.label])}function u({option:c}){return k("div",{class:"z-[1] whitespace-nowrap text-ellipsis overflow-hidden"},c.label)}return vt(()=>r.value,()=>{var c;o.value=((c=r.value)==null?void 0:c.name)||null},{immediate:!0}),a(),(c,d)=>(We(),wt(kt,null,[!c.optional&&!r.value?(We(),wt("div",pI,[Ge(qe(mr),{class:"size-3 mr-1"},{default:mt(()=>[Ge(qe(Zw))]),_:1}),d[1]||(d[1]=ot("span",null,"Please select a dataset.",-1))])):Xn("",!0),Ge(qe(Pd),{value:o.value,"onUpdate:value":[d[0]||(d[0]=f=>o.value=f),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,"render-label":l,"render-tag":u,options:n.value,onSearch:a},null,8,["value","loading","options"])],64))}});function bI(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const o=e.metadata_column_types;for(const a in o)(r&&["int","float"].includes(o[a])||n&&o[a]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(a)+1),value:a});return i}const mI=Fe({__name:"InputDataColumn",props:Yc({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=ne([]),r=Xg(e,"value");async function i(){if(t.datasetId)try{const{data:a}=await bu().GET(`/api/datasets/${t.datasetId}`),s=bI(a,t.isAuto,t.isText,t.isNumber);n.value=s,o()}catch(a){console.debug(a)}else console.debug("Data column selector disabled, since `datasetId` is unavailable.")}function o(){n.value.length>0&&r.value===null&&(r.value=n.value[0].value)}return i(),vt(()=>r.value,()=>o()),(a,s)=>a.datasetId?(We(),It(qe(Pd),{key:0,value:r.value,"onUpdate:value":s[0]||(s[0]=l=>r.value=l),options:n.value},null,8,["value","options"])):(We(),It(qe(ts),{key:1,value:r.value,"onUpdate:value":s[1]||(s[1]=l=>r.value=l)},null,8,["value"]))}}),yI={class:"select-none"},_I={class:"font-bold mb-1"},xI={key:0,class:"text-xs mb-1"},wI={key:5},uy=.01,wv=Fe({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=t,i=ne(o());function o(){const s={...n.values};return n.inputs.forEach(l=>{s[l.name]===void 0&&(s[l.name]=null)}),s}function a(){r("update:values",i.value)}return vt(()=>n.values,()=>{i.value=o()}),(s,l)=>(We(),wt("div",yI,[(We(!0),wt(kt,null,gw(s.inputs,(u,c)=>(We(),wt("div",{key:c,class:pu(c<s.inputs.length-1?"pb-2":"")},[ot("div",_I,di(u.label||u.name),1),u.help?(We(),wt("div",xI,di(u.help),1)):Xn("",!0),ot("div",null,[u.type==="boolean"?(We(),It(qe(E5),{key:0,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a]},null,8,["value","onUpdate:value"])):u.type==="color"?(We(),It(qe(wF),{key:1,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):u.type==="conditional"?(We(),It(hI,{key:2,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,input:u},null,8,["value","onUpdate:value","dataset-id","input"])):u.type==="data"?(We(),It(vI,{key:3,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],extension:u.extension,optional:qe(qs)(u.optional)},null,8,["value","onUpdate:value","extension","optional"])):u.type==="data_column"?(We(),It(mI,{key:4,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],"dataset-id":s.datasetId,"is-auto":qe(qs)(u.is_auto),"is-text":qe(qs)(u.is_text),"is-number":qe(qs)(u.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):["float","integer"].includes(u.type)?(We(),wt("div",wI,[u.min!==void 0&&u.max!==void 0?(We(),It(qe(eI),{key:0,class:"mb-2",value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],min:Number(u.min),max:Number(u.max),step:u.type==="float"?uy:1},null,8,["value","onUpdate:value","min","max","step"])):Xn("",!0),Ge(qe(KF),{value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],size:"small",min:Number(u.min),max:Number(u.max),step:u.type==="float"?uy:1},null,8,["value","onUpdate:value","min","max","step"])])):u.type==="select"?(We(),It(qe(Pd),{key:6,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],options:u.data},null,8,["value","onUpdate:value","options"])):u.type==="textarea"?(We(),It(qe(ts),{key:7,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,a],rows:Number(u.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(We(),It(qe(ts),{key:8,value:i.value[u.name],"onUpdate:value":[d=>i.value[u.name]=d,l[0]||(l[0]=d=>a())]},null,8,["value","onUpdate:value"]))])],2))),128))]))}}),CI={class:"border border-dotted border-green-600 rounded p-2"},SI={class:"mx-1"},$I=Fe({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=pe(()=>xu(n.inputs));function o(){const l=[...n.valuesArray];l.unshift(i.value),r("update:values-array",l)}function a(l){const u=[...n.valuesArray];u.splice(l,1),r("update:values-array",u)}function s(l,u){const c=[...n.valuesArray];c[l]={...u},r("update:values-array",c)}return(l,u)=>(We(),wt(kt,null,[Ge(qe(Lr),{size:"tiny",type:"primary",onClick:o},{default:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(Jw))]),_:1}),u[0]||(u[0]=ot("span",{class:"mx-1"},"Add New Track",-1))]),_:1}),(We(!0),wt(kt,null,gw(l.valuesArray,(c,d)=>(We(),wt("div",{key:d,class:"py-2"},[ot("div",CI,[Ge(wv,{"dataset-id":l.datasetId,inputs:l.inputs,values:c,"onUpdate:values":f=>s(d,f)},null,8,["dataset-id","inputs","values","onUpdate:values"]),Ge(qe(Lr),{class:"w-full mt-2","data-description":"remove repeat block",disabled:l.valuesArray.length<=1,size:"tiny",type:"primary",onClick:f=>a(d)},{default:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(N7))]),_:1}),ot("span",SI,"Remove Track "+di(l.valuesArray.length-d),1)]),_:2},1032,["disabled","onClick"])])]))),128))],64))}}),kI=2e3,MI=Fe({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return vt(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),kI)}),(o,a)=>o.message?(We(),It(qe(S5),{key:0,type:o.messageType},{default:mt(()=>[Wo(di(o.message),1)]),_:1},8,["type"])):Xn("",!0)}}),TI={class:"text-xs"},EI=Fe({__name:"ApiStatus",setup(e){const t=ne("...");async function n(){try{const{data:r}=await bu().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(r,i)=>t.value?(We(),It(qe(Wl),{key:0,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(mr),{class:"mx-1"},{default:mt(()=>[Ge(qe(z7),{class:"text-green-600"})]),_:1})]),default:mt(()=>[ot("span",TI,"Connected to Galaxy Version "+di(t.value)+".",1)]),_:1})):(We(),It(qe(Wl),{key:1,class:"mx-1",trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(mr),{class:"mx-1"},{default:mt(()=>[Ge(qe(Zw),{class:"text-red-600"})]),_:1})]),default:mt(()=>[i[0]||(i[0]=ot("span",{class:"text-xs"},"Galaxy is not accessible!",-1))]),_:1}))}}),AI=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},PI={},RI={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"};function zI(e,t){return We(),wt("svg",RI,t[0]||(t[0]=[ot("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),ot("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)]))}const FI=AI(PI,[["render",zI]]),II={class:"overflow-auto select-none bg-white z-10 p-2"},BI={key:0,class:"flex"},OI={class:"flex-1 font-thin text-lg mt-1"},NI={class:"bg-sky-50 text-sky-900 rounded my-2 p-2"},LI={class:"flex"},DI={class:"flex justify-center center-items"},HI={class:"m-2"},UI=["src"],jI={class:"overflow-hidden break-words p-1"},WI={class:"font-bold"},VI=["innerHTML"],qI=Fe({__name:"SidePanel",props:{datasetId:{},datasetUrl:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,r=t,i=ne(""),o=ne("info"),a=pe(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await R5(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",o.value="success";else{const d=await P5(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});d?(i.value="Successfully created.",o.value="success",r("update:visualization-id",d)):(i.value="Something went wrong.",o.value="error")}}catch(d){i.value=Xw(d),o.value="error"}}function l(d){r("update:settings",d)}function u(d){r("update:tracks",d)}function c(d){r("update:visualization-title",d)}return(d,f)=>(We(),wt("div",II,[d.datasetUrl?(We(),wt("div",BI,[ot("div",OI,[f[2]||(f[2]=ot("span",null,"Charts",-1)),Ge(EI)]),ot("div",null,[d.datasetId?(We(),It(qe(Wl),{key:0,trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 mr-2","data-description":"sidepanel save button",onClick:s},{icon:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(B7))]),_:1})]),_:1})]),default:mt(()=>[f[3]||(f[3]=ot("span",{class:"text-xs"},"Save",-1))]),_:1})):Xn("",!0),Ge(qe(Wl),{trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100",onClick:f[0]||(f[0]=h=>r("toggle"))},{icon:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(I7))]),_:1})]),_:1})]),default:mt(()=>[f[4]||(f[4]=ot("span",{class:"text-xs"},"Collapse",-1))]),_:1})])])):Xn("",!0),Ge(MI,{message:i.value,"message-type":o.value,onTimeout:f[1]||(f[1]=h=>i.value=""),class:"mt-2"},null,8,["message","message-type"]),ot("div",NI,[ot("div",LI,[ot("div",DI,[ot("div",HI,[n.logoUrl?(We(),wt("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,UI)):(We(),It(FI,{key:1}))])]),ot("div",jI,[ot("span",WI,di(d.html),1),ot("div",{class:"text-xs",innerHTML:d.description},null,8,VI)])])]),ot("div",null,[f[5]||(f[5]=ot("div",{class:"font-bold"},"Title",-1)),f[6]||(f[6]=ot("div",{class:"text-xs py-1"},"Specify a visualization title.",-1)),Ge(qe(ts),{value:d.visualizationTitle,onInput:c},null,8,["value"])]),Ge(qe(aI),{type:"line",animated:"",class:"mt-2","pane-wrapper-class":"!overflow-visible","tab-class":a.value?"!hidden":""},{default:mt(()=>[d.trackInputs.length>0?(We(),It(qe(iy),{key:0,name:"tracks"},{tab:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(O7))]),_:1}),f[7]||(f[7]=ot("span",{class:"mx-1"},"Tracks",-1))]),default:mt(()=>[Ge($I,{"dataset-id":d.datasetId,inputs:d.trackInputs,"values-array":d.trackValues,"onUpdate:valuesArray":u},null,8,["dataset-id","inputs","values-array"])]),_:1})):Xn("",!0),d.settingInputs.length>0?(We(),It(qe(iy),{key:1,name:"settings"},{tab:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(P7))]),_:1}),f[8]||(f[8]=ot("span",{class:"mx-1"},"Settings",-1))]),default:mt(()=>[Ge(wv,{"dataset-id":d.datasetId,inputs:d.settingInputs,values:d.settingValues,"onUpdate:values":l},null,8,["dataset-id","inputs","values"])]),_:1})):Xn("",!0)]),_:1},8,["tab-class"])]))}});function GI(e,t="app"){if(e===void 0){const s=document.getElementById(t);if(s)e=JSON.parse((s==null?void 0:s.dataset.incoming)||"{}");else throw new Error(`Container element '${t}' not found.`)}const n=(e==null?void 0:e.root)??"/",r=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,o=(e==null?void 0:e.visualization_plugin)??{},a=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}}const YI={key:1,class:"m-2"},XI={key:0,class:"relative max-w-full h-screen overflow-hidden"},KI=Fe({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:o,visualizationTitle:a}=GI(t.incoming,t.container),s=ne(!0),l=ne(""),u=ne(""),c=ne(""),d=ne(!0),f=ne(""),h=ne(""),p=ne([]),g=ne({}),b=ne({}),v=ne([]),x=ne([]),y=ne(i),_=ne(a),S=Kw();S.setCredentials(t.credentials||"include"),S.setRoot(n||"/"),lI(o,r).then(({plugin:ie,settings:he,specs:_e,tracks:oe})=>{l.value=ie.description||"",c.value=ie.html||"",d.value=!1,f.value=ie.logo||"",h.value=ie.name||"",p.value=ie.settings||[],g.value=he,b.value=_e||{},v.value=ie.tracks||[],x.value=oe});const $=pe(()=>r.dataset_id||""),w=pe(()=>r.dataset_url?(console.debug(`GalaxyCharts: Evaluating dataset url: ${r.dataset_url}.`),r.dataset_url):$.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${$.value}.`),A7(n,$.value)):""),T=pe(()=>f.value&&`${n}${f.value}`),M=pe(()=>p.value.length===0&&v.value.length===0);async function P(){s.value=!s.value,await fn(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function R(){try{window.postMessage({container:t.container,from:"galaxy-visualization",visualization_config:JSON.parse(JSON.stringify(C())),visualization_id:y.value,visualization_title:_.value},"*")}catch(ie){u.value=`Failed to postMessage: ${ie}`}}function C(){return{dataset_id:$.value,dataset_url:w.value,settings:g.value,tracks:x.value}}function E(ie){g.value={...ie},R()}function F(ie){x.value=[...ie],R()}function z(ie){y.value=ie,R()}function j(ie){_.value=ie,R()}async function Z(ie){J(ie);try{const he=await sI(h.value,y.value,_.value,C());he&&z(he)}catch(he){u.value=`Failed to save: ${he}`}}function J(ie){E({...g.value,...ie})}return(ie,he)=>(We(),wt(kt,null,[u.value?(We(),It(qe(S5),{key:0,type:"error",class:"m-2"},{default:mt(()=>[Wo(di(u.value),1)]),_:1})):Xn("",!0),d.value?(We(),wt("div",YI,[ot("span",null,[Ge(qe(R7),{class:"animate-spin size-4 inline mx-1"})]),he[0]||(he[0]=ot("span",{class:"text-xs"},"Please wait...",-1))])):(We(),wt("div",{key:2,class:pu(["grid h-screen",{"grid-cols-[1fr_17rem]":!s.value&&!M.value&&w.value}])},[w.value?(We(),wt("div",XI,[qg(ie.$slots,"default",{datasetId:$.value,datasetUrl:w.value,root:qe(n),settings:g.value,specs:b.value,tracks:x.value,save:Z,update:J})])):Xn("",!0),s.value&&!M.value&&w.value?(We(),It(qe(Wl),{key:1,trigger:"hover",to:!1},{trigger:mt(()=>[Ge(qe(Lr),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2 absolute right-0",onClick:P},{icon:mt(()=>[Ge(qe(mr),null,{default:mt(()=>[Ge(qe(F7))]),_:1})]),_:1})]),default:mt(()=>[he[1]||(he[1]=ot("span",{class:"text-xs"},"Expand",-1))]),_:1})):Xn("",!0),lo(Ge(qI,{"dataset-id":$.value,"dataset-url":w.value,description:l.value,html:c.value,"logo-url":T.value,name:h.value,"setting-inputs":p.value,"setting-values":g.value,"track-inputs":v.value,"track-values":x.value,"visualization-id":y.value,"visualization-title":_.value,"onUpdate:settings":E,"onUpdate:tracks":F,"onUpdate:visualizationId":z,"onUpdate:visualizationTitle":j,onToggle:P},null,8,["dataset-id","dataset-url","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]),[[md,!s.value&&!M.value||!w.value]])],2))],64))}}),z5="0.14.0";class Zi{constructor(){this._items=new Map}get(t){if(!this._items.has(t))throw new Error(`Item not found: ${t}`);return this._items.get(t)}add(t,n,r=!1){if(!r&&this._items.has(t))throw new Error(`Item ${t} is already defined`);return this._items.set(t,n),n}remove(t){return this._items.delete(t)}has(t){return this._items.has(t)}list(){return Array.from(this._items.keys())}}class Cv extends Zi{create(t,...n){const r=this.get(t);return new r(...n)}extend(t,n,r){if(console.warn("Deprecation warning: .extend method will be removed in future versions, in favor of explicit ES6 subclasses"),arguments.length!==3)throw new Error("Invalid arguments to .extend");const i=this.get(t);class o extends i{}return Object.assign(o.prototype,r,i),this.add(n,o),o}}class ZI{constructor(t,n,r={},i=null,o=null){this.key=t,this.value=n,this.metadata=r,this.prev=i,this.next=o}}class JI{constructor(t=3){if(this._max_size=t,this._cur_size=0,this._store=new Map,this._head=null,this._tail=null,t===null||t<0)throw new Error('Cache "max_size" must be >= 0')}has(t){return this._store.has(t)}get(t){const n=this._store.get(t);return n?(this._head!==n&&this.add(t,n.value),n.value):null}add(t,n,r={}){if(this._max_size===0)return;const i=this._store.get(t);i&&this._remove(i);const o=new ZI(t,n,r,null,this._head);if(this._head?this._head.prev=o:this._tail=o,this._head=o,this._store.set(t,o),this._max_size>=0&&this._cur_size>=this._max_size){const a=this._tail;this._tail=this._tail.prev,this._remove(a)}this._cur_size+=1}clear(){this._head=null,this._tail=null,this._cur_size=0,this._store=new Map}remove(t){const n=this._store.get(t);return n?(this._remove(n),!0):!1}_remove(t){t.prev!==null?t.prev.next=t.next:this._head=t.next,t.next!==null?t.next.prev=t.prev:this._tail=t.prev,this._store.delete(t.key),this._cur_size-=1}find(t){let n=this._head;for(;n;){const r=n.next;if(t(n))return n;n=r}}}function QI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qh,cy;function eB(){if(cy)return Qh;cy=1,Qh=e;function e(n){if(typeof n=="function")return n;var r=Array.isArray(n)?[]:{};for(var i in n){var o=n[i],a={}.toString.call(o).slice(8,-1);a=="Array"||a=="Object"?r[i]=e(o):a=="Date"?r[i]=new Date(o.getTime()):a=="RegExp"?r[i]=RegExp(o.source,t(o)):r[i]=o}return r}function t(n){if(typeof n.source.flags=="string")return n.source.flags;var r=[];return n.global&&r.push("g"),n.ignoreCase&&r.push("i"),n.multiline&&r.push("m"),n.sticky&&r.push("y"),n.unicode&&r.push("u"),r.join("")}return Qh}var tB=eB();const nB=QI(tB);function Gs(e){return typeof e!="object"?e:nB(e)}let rB=class{constructor(t={}){this._config=t;const{cache_enabled:n=!0,cache_size:r=3}=t;this._enable_cache=n,this._cache=new JI(r)}_buildRequestOptions(t,n){return Object.assign({},t)}_getCacheKey(t){if(this._enable_cache)throw new Error("Method not implemented");return null}_performRequest(t){throw new Error("Not implemented")}_normalizeResponse(t,n){return t}_annotateRecords(t,n){return t}_postProcessResponse(t,n){return t}getData(t={},...n){t=this._buildRequestOptions(t,...n);const r=this._getCacheKey(t);let i;return this._enable_cache&&this._cache.has(r)?i=this._cache.get(r):(i=Promise.resolve(this._performRequest(t)).then(o=>this._normalizeResponse(o,t)),this._cache.add(r,i,t._cache_meta),i.catch(o=>this._cache.remove(r))),i.then(o=>Gs(o)).then(o=>this._annotateRecords(o,t)).then(o=>this._postProcessResponse(o,t))}};class iB extends rB{constructor(t={}){super(t),this._url=t.url}_getCacheKey(t){return this._getURL(t)}_getURL(t){return this._url}_performRequest(t){const n=this._getURL(t);if(!this._url)throw new Error('Web based resources must specify a resource URL as option "url"');return fetch(n).then(r=>{if(!r.ok)throw new Error(r.statusText);return r.text()})}_normalizeResponse(t,n){return typeof t=="string"?JSON.parse(t):t}}var ep={},oc={exports:{}},tp,fy;function oB(){return fy||(fy=1,tp=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}),tp}var dy;function aB(){return dy||(dy=1,function(e,t){const n=oB();e.exports=class extends Error{constructor(r){const i=r.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:n(o));super(i.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t.assert)}}}(oc,oc.exports)),oc.exports}var np,hy;function sB(){if(hy)return np;hy=1;const e=aB();return np=function(t,...n){if(!t)throw n.length===1&&n[0]instanceof Error?n[0]:new e(n)},np}var py;function lB(){if(py)return ep;py=1;const e=sB(),t={};return ep.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(n,r){r=r||{};const i=[].concat(r.before||[]),o=[].concat(r.after||[]),a=r.group||"?",s=r.sort||0;e(!i.includes(a),`Item cannot come before itself: ${a}`),e(!i.includes("?"),"Item cannot come before unassociated items"),e(!o.includes(a),`Item cannot come after itself: ${a}`),e(!o.includes("?"),"Item cannot come after unassociated items"),Array.isArray(n)||(n=[n]);for(const l of n){const u={seq:this._items.length,sort:s,before:i,after:o,group:a,node:l};this._items.push(u)}if(!r.manual){const l=this._sort();e(l,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(n){Array.isArray(n)||(n=[n]);for(const i of n)if(i)for(const o of i._items)this._items.push(Object.assign({},o));this._items.sort(t.mergeSort);for(let i=0;i<this._items.length;++i)this._items[i].seq=i;const r=this._sort();return e(r,"merge created a dependencies error"),this.nodes}sort(){const n=this._sort();return e(n,"sort created a dependencies error"),this.nodes}_sort(){const n={},r=Object.create(null),i=Object.create(null);for(const u of this._items){const c=u.seq,d=u.group;i[d]=i[d]||[],i[d].push(c),n[c]=u.before;for(const f of u.after)r[f]=r[f]||[],r[f].push(c)}for(const u in n){const c=[];for(const d in n[u]){const f=n[u][d];i[f]=i[f]||[],c.push(...i[f])}n[u]=c}for(const u in r)if(i[u])for(const c of i[u])n[c].push(...r[u]);const o={};for(const u in n){const c=n[u];for(const d of c)o[d]=o[d]||[],o[d].push(u)}const a={},s=[];for(let u=0;u<this._items.length;++u){let c=u;if(o[u]){c=null;for(let d=0;d<this._items.length;++d){if(a[d]===!0)continue;o[d]||(o[d]=[]);const f=o[d].length;let h=0;for(let p=0;p<f;++p)a[o[d][p]]&&++h;if(h===f){c=d;break}}}c!==null&&(a[c]=!0,s.push(c))}if(s.length!==this._items.length)return!1;const l={};for(const u of this._items)l[u.seq]=u;this._items=[],this.nodes=[];for(const u of s){const c=l[u];this.nodes.push(c.node),this._items.push(c)}return!0}},t.mergeSort=(n,r)=>n.sort===r.sort?0:n.sort<r.sort?-1:1,ep}var uB=lB();function cB(e){const t=/^(?<name_alone>\w+)$|((?<name_deps>\w+)+\(\s*(?<deps>[^)]+?)\s*\))/.exec(e);if(!t)throw new Error(`Unable to parse dependency specification: ${e}`);let{name_alone:n,name_deps:r,deps:i}=t.groups;return n?[n,[]]:(i=i.split(/\s*,\s*/),[r,i])}function fB(e,t,n,r=!0){if(!n.length)return[];const i=n.map(u=>cB(u)),o=new Map(i),a=new uB.Sorter;for(let[u,c]of o.entries())try{a.add(u,{after:c,group:u})}catch{throw new Error(`Invalid or possible circular dependency specification for: ${u}`)}const s=a.nodes,l=new Map;for(let u of s){const c=t.get(u);if(!c)throw new Error(`Data has been requested from source '${u}', but no matching source was provided`);const d=o.get(u)||[],h=Promise.all(d.map(p=>l.get(p))).then(p=>{const g=Object.assign({_provider_name:u},e);return c.getData(g,...p)});l.set(u,h)}return Promise.all([...l.values()]).then(u=>r?u[u.length-1]:u)}function M0(e,t){const n=new Map;for(let r of e){const i=r[t];if(typeof i>"u")throw new Error(`All records must specify a value for the field "${t}"`);if(typeof i=="object")throw new Error("Attempted to group on a field with non-primitive values");let o=n.get(i);o||(o=[],n.set(i,o)),o.push(r)}return n}function Sv(e,t,n,r,i){const o=M0(n,i),a=[];for(let s of t){const l=s[r],u=o.get(l)||[];u.length?a.push(...u.map(c=>Object.assign({},Gs(c),Gs(s)))):e!=="inner"&&a.push(Gs(s))}if(e==="outer"){const s=M0(t,r);for(let l of n){const u=l[i];(s.get(u)||[]).length||a.push(Gs(l))}}return a}function F5(e,t,n,r){return Sv("left",...arguments)}function dB(e,t,n,r){return Sv("inner",...arguments)}function hB(e,t,n,r){return Sv("outer",...arguments)}const pB=/^(?:chr)?([a-zA-Z0-9]+?)[_:-](\d+)[_:|-]?(\w+)?[/_:|-]?([^_]+)?_?(.*)?/;function I5(e,t=!1){const n=e&&e.match(pB);if(n)return n.slice(1);if(t)return null;throw new Error(`Could not understand marker format for ${e}. Should be of format chr:pos or chr:pos_ref/alt`)}class B5{constructor(){throw new Error('The "BaseAdapter" and "BaseApiAdapter" classes have been replaced in LocusZoom 0.14. See migration guide for details.')}}class gB extends B5{}class Rd extends iB{constructor(t={}){t.params&&(console.warn('Deprecation warning: all options in "config.params" should now be specified as top level keys.'),Object.assign(t,t.params||{}),delete t.params),super(t);const{prefix_namespace:n=!0,limit_fields:r}=t;this._prefix_namespace=n,this._limit_fields=r?new Set(r):!1}_getCacheKey(t){let{chr:n,start:r,end:i}=t;const o=this._cache.find(({metadata:a})=>n===a.chr&&r>=a.start&&i<=a.end);return o&&({chr:n,start:r,end:i}=o.metadata),t._cache_meta={chr:n,start:r,end:i},`${n}_${r}_${i}`}_postProcessResponse(t,n){if(!this._prefix_namespace||!Array.isArray(t))return t;const{_limit_fields:r}=this,{_provider_name:i}=n;return t.map(o=>Object.entries(o).reduce((a,[s,l])=>((!r||r.has(s))&&(a[`${i}:${s}`]=l),a),{}))}_findPrefixedKey(t,n){const r=new RegExp(`:${n}$`),i=Object.keys(t).find(o=>r.test(o));if(!i)throw new Error(`Could not locate the required key name: ${n} in dependent data`);return i}}class da extends Rd{constructor(t={}){super(t),this._genome_build=t.genome_build||t.build}_validateBuildSource(t,n){if(t&&n||!(t||n))throw new Error(`${this.constructor.name} must provide a parameter specifying either "build" or "source". It should not specify both.`);if(t&&!["GRCh37","GRCh38"].includes(t))throw new Error(`${this.constructor.name} must specify a valid 'genome_build'`)}_normalizeResponse(t,n){let r=super._normalizeResponse(...arguments);if(r=r.data||r,Array.isArray(r))return r;const i=Object.keys(r),o=r[i[0]].length;if(!i.every(function(u){return r[u].length===o}))throw new Error(`${this.constructor.name} expects a response in which all arrays of data are the same length`);const s=[],l=Object.keys(r);for(let u=0;u<o;u++){const c={};for(let d=0;d<l.length;d++)c[l[d]]=r[l[d]][u];s.push(c)}return s}}class vB extends da{constructor(t={}){super(t);const{source:n}=t;this._source_id=n}_getURL(t){const{chr:n,start:r,end:i}=t;return`${super._getURL(t)}results/?filter=analysis in ${this._source_id} and chromosome in '${n}' and position ge ${r} and position le ${i}`}}class bB extends da{constructor(t){t.limit_fields||(t.limit_fields=["log_pvalue","pos","rsid","trait","variant"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build,r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id eq ${r}`;return`${super._getURL(t)}?format=objects&sort=pos&filter=chrom eq '${t.chr}' and pos ge ${t.start} and pos le ${t.end}${i}`}}class mB extends da{constructor(t={}){super(t),this._prefix_namespace=!1}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and source in ${r}`;return`${super._getURL(t)}?filter=chrom eq '${t.chr}' and start le ${t.end} and end ge ${t.start}${i}`}}class yB extends Rd{constructor(t={}){super(t),this._prefix_namespace=!1}_buildRequestOptions(t,n){const r=t.genome_build||this._config.build;if(!r)throw new Error(`Adapter ${this.constructor.name} must specify a 'genome_build' option`);const i=new Set;for(let o of n)i.add(o.gene_name);return t.query=[...i.values()].map(function(o){return`${`_${o.replace(/[^A-Za-z0-9_]/g,"_")}`}: gene(gene_symbol: "${o}", reference_genome: ${r}) { gnomad_constraint { exp_syn obs_syn syn_z oe_syn oe_syn_lower oe_syn_upper exp_mis obs_mis mis_z oe_mis oe_mis_lower oe_mis_upper exp_lof obs_lof pLI oe_lof oe_lof_lower oe_lof_upper } } `}),t.build=r,Object.assign({},t)}_performRequest(t){let{query:n,build:r}=t;if(!n.length||n.length>25||r==="GRCh38")return Promise.resolve([]);n=`{${n.join(" ")} }`;const i=this._getURL(t),o=JSON.stringify({query:n});return fetch(i,{method:"POST",body:o,headers:{"Content-Type":"application/json"}}).then(s=>s.ok?s.text():[]).catch(s=>[])}_normalizeResponse(t){return typeof t!="string"?t:JSON.parse(t).data}}class O5 extends da{constructor(t){t.limit_fields||(t.limit_fields=["variant2","position2","correlation"]),super(t)}__find_ld_refvar(t,n){const r=this._findPrefixedKey(n[0],"variant"),i=this._findPrefixedKey(n[0],"log_pvalue");let o,a={};if(t.ldrefvar)o=t.ldrefvar,a=n.find(h=>h[r]===o)||{};else{let h=0;for(let p of n){const{[r]:g,[i]:b}=p;b>h&&(h=b,o=g,a=p)}}a.lz_is_ld_refvar=!0;const s=I5(o,!0);if(!s)throw new Error("Could not request LD for a missing or incomplete marker format");const[l,u,c,d]=s;o=`${l}:${u}`,c&&d&&(o+=`_${c}/${d}`);const f=+u;return f&&t.ldrefvar&&t.chr&&(l!==String(t.chr)||f<t.start||f>t.end)?(t.ldrefvar=null,this.__find_ld_refvar(t,n)):o}_buildRequestOptions(t,n){if(!n)throw new Error("LD request must depend on association data");const r=super._buildRequestOptions(...arguments);if(!n.length)return r._skip_request=!0,r;r.ld_refvar=this.__find_ld_refvar(t,n);const i=t.genome_build||this._config.build||"GRCh37";let o=t.ld_source||this._config.source||"1000G";const a=t.ld_pop||this._config.population||"ALL";return o==="1000G"&&i==="GRCh38"&&(o="1000G-FRZ09"),this._validateBuildSource(i,null),Object.assign({},r,{genome_build:i,ld_source:o,ld_population:a})}_getURL(t){const n=this._config.method||"rsquare",{chr:r,start:i,end:o,ld_refvar:a,genome_build:s,ld_source:l,ld_population:u}=t;return[super._getURL(t),"genome_builds/",s,"/references/",l,"/populations/",u,"/variants","?correlation=",n,"&variant=",encodeURIComponent(a),"&chrom=",encodeURIComponent(r),"&start=",encodeURIComponent(i),"&stop=",encodeURIComponent(o)].join("")}_getCacheKey(t){const n=super._getCacheKey(t),{ld_refvar:r,ld_source:i,ld_population:o}=t;return`${n}_${r}_${i}_${o}`}_performRequest(t){if(t._skip_request)return Promise.resolve([]);const n=this._getURL(t);let r={data:{}},i=function(o){return fetch(o).then().then(a=>{if(!a.ok)throw new Error(a.statusText);return a.text()}).then(function(a){return a=JSON.parse(a),Object.keys(a.data).forEach(function(s){r.data[s]=(r.data[s]||[]).concat(a.data[s])}),a.next?i(a.next):r})};return i(n)}}class _B extends da{constructor(t){t.limit_fields||(t.limit_fields=["position","recomb_rate"]),super(t)}_getURL(t){const n=t.genome_build||this._config.build;let r=this._config.source;this._validateBuildSource(n,r);const i=n?`&build=${n}`:` and id in ${r}`;return`${super._getURL(t)}?filter=chromosome eq '${t.chr}' and position le ${t.end} and position ge ${t.start}${i}`}}class N5 extends Rd{constructor(t={}){super(...arguments);const{data:n}=t;if(!n||Array.isArray(t))throw new Error("'StaticSource' must provide data as required option 'config.data'");this._data=n}_performRequest(t){return Promise.resolve(this._data)}}class xB extends da{_getURL(t){const n=(t.genome_build?[t.genome_build]:null)||this._config.build;if(!n||!Array.isArray(n)||!n.length)throw new Error(["Adapter",this.constructor.name,"requires that you specify array of one or more desired genome build names"].join(" "));return[super._getURL(t),"?filter=variant eq '",encodeURIComponent(t.variant),"'&format=objects&",n.map(function(o){return`build=${encodeURIComponent(o)}`}).join("&")].join("")}_getCacheKey(t){return this._getURL(t)}}const wB=Object.freeze(Object.defineProperty({__proto__:null,AssociationLZ:vB,BaseAdapter:B5,BaseApiAdapter:gB,BaseLZAdapter:Rd,BaseUMAdapter:da,GeneConstraintLZ:yB,GeneLZ:mB,GwasCatalogLZ:bB,LDServer:O5,PheWASLZ:xB,RecombLZ:_B,StaticSource:N5},Symbol.toStringTag,{value:"Module"})),ns=new Cv;for(let[e,t]of Object.entries(wB))ns.add(e,t);ns.add("StaticJSON",N5);ns.add("LDLZ2",O5);var CB="5.16.0";function Sr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $v(e){return e.length===1&&(e=SB(e)),{left:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function SB(e){return function(t,n){return Sr(e(t),n)}}var L5=$v(Sr),Ji=L5.right,$B=L5.left;function kB(e,t){t==null&&(t=D5);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return o}function D5(e,t){return[e,t]}function MB(e,t,n){var r=e.length,i=t.length,o=new Array(r*i),a,s,l,u;for(n==null&&(n=D5),a=l=0;a<r;++a)for(u=e[a],s=0;s<i;++s,++l)o[l]=n(u,t[s]);return o}function TB(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Qi(e){return e===null?NaN:+e}function H5(e,t){var n=e.length,r=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<n;)isNaN(a=Qi(e[i]))||(s=a-o,o+=s/++r,l+=s*(a-o));else for(;++i<n;)isNaN(a=Qi(t(e[i],i,e)))||(s=a-o,o+=s/++r,l+=s*(a-o));if(r>1)return l/(r-1)}function U5(e,t){var n=H5(e,t);return n&&Math.sqrt(n)}function qo(e,t){var n=e.length,r=-1,i,o,a;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=a=i;++r<n;)(i=e[r])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=a=i;++r<n;)(i=t(e[r],r,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var j5=Array.prototype,EB=j5.slice,AB=j5.map;function ac(e){return function(){return e}}function PB(e){return e}function Jn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}var T0=Math.sqrt(50),E0=Math.sqrt(10),A0=Math.sqrt(2);function kv(e,t,n){var r,i=-1,o,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),(s=wl(e,t,n))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return r&&a.reverse(),a}function wl(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=T0?10:o>=E0?5:o>=A0?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T0?10:o>=E0?5:o>=A0?2:1)}function Go(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=T0?i*=10:o>=E0?i*=5:o>=A0&&(i*=2),t<e?-i:i}function Mv(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function RB(){var e=PB,t=qo,n=Mv;function r(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var u=t(l),c=u[0],d=u[1],f=n(l,c,d);Array.isArray(f)||(f=Go(c,d,f),f=Jn(Math.ceil(c/f)*f,d,f));for(var h=f.length;f[0]<=c;)f.shift(),--h;for(;f[h-1]>d;)f.pop(),--h;var p=new Array(h+1),g;for(o=0;o<=h;++o)g=p[o]=[],g.x0=o>0?f[o-1]:c,g.x1=o<h?f[o]:d;for(o=0;o<a;++o)s=l[o],c<=s&&s<=d&&p[Ji(f,s,0,h)].push(i[o]);return p}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:ac(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:ac([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Array.isArray(i)?ac(EB.call(i)):ac(i),r):n},r}function Vl(e,t,n){if(n==null&&(n=Qi),!!(r=e.length)){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function zB(e,t,n){return e=AB.call(e,Qi).sort(Sr),Math.ceil((n-t)/(2*(Vl(e,.75)-Vl(e,.25))*Math.pow(e.length,-1/3)))}function FB(e,t,n){return Math.ceil((n-t)/(3.5*U5(e)*Math.pow(e.length,-1/3)))}function W5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&i>o&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&i>o&&(o=i);return o}function IB(e,t){var n=e.length,r=n,i=-1,o,a=0;if(t==null)for(;++i<n;)isNaN(o=Qi(e[i]))?--r:a+=o;else for(;++i<n;)isNaN(o=Qi(t(e[i],i,e)))?--r:a+=o;if(r)return a/r}function BB(e,t){var n=e.length,r=-1,i,o=[];if(t==null)for(;++r<n;)isNaN(i=Qi(e[r]))||o.push(i);else for(;++r<n;)isNaN(i=Qi(t(e[r],r,e)))||o.push(i);return Vl(o.sort(Sr),.5)}function Tv(e){for(var t=e.length,n,r=-1,i=0,o,a;++r<t;)i+=e[r].length;for(o=new Array(i);--t>=0;)for(a=e[t],n=a.length;--n>=0;)o[--i]=a[n];return o}function V5(e,t){var n=e.length,r=-1,i,o;if(t==null){for(;++r<n;)if((i=e[r])!=null&&i>=i)for(o=i;++r<n;)(i=e[r])!=null&&o>i&&(o=i)}else for(;++r<n;)if((i=t(e[r],r,e))!=null&&i>=i)for(o=i;++r<n;)(i=t(e[r],r,e))!=null&&o>i&&(o=i);return o}function OB(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}function NB(e,t){if(n=e.length){var n,r=0,i=0,o,a=e[i];for(t==null&&(t=Sr);++r<n;)(t(o=e[r],a)<0||t(a,a)!==0)&&(a=o,i=r);if(t(a,a)===0)return i}}function LB(e,t,n){for(var r=(n??e.length)-(t=t==null?0:+t),i,o;r;)o=Math.random()*r--|0,i=e[r+t],e[r+t]=e[o+t],e[o+t]=i;return e}function DB(e,t){var n=e.length,r=-1,i,o=0;if(t==null)for(;++r<n;)(i=+e[r])&&(o+=i);else for(;++r<n;)(i=+t(e[r],r,e))&&(o+=i);return o}function q5(e){if(!(o=e.length))return[];for(var t=-1,n=V5(e,HB),r=new Array(n);++t<n;)for(var i=-1,o,a=r[t]=new Array(o);++i<o;)a[i]=e[i][t];return r}function HB(e){return e.length}function UB(){return q5(arguments)}var rp=Array.prototype.slice;function jB(e){return e}var zc=1,Fc=2,P0=3,Ys=4,gy=1e-6;function WB(e){return"translate("+(e+.5)+",0)"}function VB(e){return"translate(0,"+(e+.5)+")"}function qB(e){return function(t){return+e(t)}}function GB(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function YB(){return!this.__axis}function zd(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=e===zc||e===Ys?-1:1,u=e===Ys||e===Fc?"x":"y",c=e===zc||e===P0?WB:VB;function d(f){var h=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):jB),g=Math.max(o,0)+s,b=t.range(),v=+b[0]+.5,x=+b[b.length-1]+.5,y=(t.bandwidth?GB:qB)(t.copy()),_=f.selection?f.selection():f,S=_.selectAll(".domain").data([null]),$=_.selectAll(".tick").data(h,t).order(),w=$.exit(),T=$.enter().append("g").attr("class","tick"),M=$.select("line"),P=$.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),$=$.merge(T),M=M.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",l*o)),P=P.merge(T.append("text").attr("fill","currentColor").attr(u,l*g).attr("dy",e===zc?"0em":e===P0?"0.71em":"0.32em")),f!==_&&(S=S.transition(f),$=$.transition(f),M=M.transition(f),P=P.transition(f),w=w.transition(f).attr("opacity",gy).attr("transform",function(R){return isFinite(R=y(R))?c(R):this.getAttribute("transform")}),T.attr("opacity",gy).attr("transform",function(R){var C=this.parentNode.__axis;return c(C&&isFinite(C=C(R))?C:y(R))})),w.remove(),S.attr("d",e===Ys||e==Fc?a?"M"+l*a+","+v+"H0.5V"+x+"H"+l*a:"M0.5,"+v+"V"+x:a?"M"+v+","+l*a+"V0.5H"+x+"V"+l*a:"M"+v+",0.5H"+x),$.attr("opacity",1).attr("transform",function(R){return c(y(R))}),M.attr(u+"2",l*o),P.attr(u,l*g).text(p),_.filter(YB).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Fc?"start":e===Ys?"end":"middle"),_.each(function(){this.__axis=y})}return d.scale=function(f){return arguments.length?(t=f,d):t},d.ticks=function(){return n=rp.call(arguments),d},d.tickArguments=function(f){return arguments.length?(n=f==null?[]:rp.call(f),d):n.slice()},d.tickValues=function(f){return arguments.length?(r=f==null?null:rp.call(f),d):r&&r.slice()},d.tickFormat=function(f){return arguments.length?(i=f,d):i},d.tickSize=function(f){return arguments.length?(o=a=+f,d):o},d.tickSizeInner=function(f){return arguments.length?(o=+f,d):o},d.tickSizeOuter=function(f){return arguments.length?(a=+f,d):a},d.tickPadding=function(f){return arguments.length?(s=+f,d):s},d}function G5(e){return zd(zc,e)}function Ev(e){return zd(Fc,e)}function Y5(e){return zd(P0,e)}function X5(e){return zd(Ys,e)}var XB={value:function(){}};function ha(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ic(n)}function Ic(e){this._=e}function KB(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ic.prototype=ha.prototype={constructor:Ic,on:function(e,t){var n=this._,r=KB(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=ZB(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=vy(n[i],e.name,t);else if(t==null)for(i in n)n[i]=vy(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ic(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function ZB(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function vy(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=XB,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var R0="http://www.w3.org/1999/xhtml";const z0={svg:"http://www.w3.org/2000/svg",xhtml:R0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wu(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),z0.hasOwnProperty(t)?{space:z0[t],local:e}:e}function JB(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===R0&&t.documentElement.namespaceURI===R0?t.createElement(e):t.createElementNS(n,e)}}function QB(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fd(e){var t=wu(e);return(t.local?QB:JB)(t)}function eO(){}function Id(e){return e==null?eO:function(){return this.querySelector(e)}}function tO(e){typeof e!="function"&&(e=Id(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=e.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Rn(r,this._parents)}function nO(){return[]}function Av(e){return e==null?nO:function(){return this.querySelectorAll(e)}}function rO(e){typeof e!="function"&&(e=Av(e));for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new Rn(r,i)}function Pv(e){return function(){return this.matches(e)}}function iO(e){typeof e!="function"&&(e=Pv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Rn(r,this._parents)}function K5(e){return new Array(e.length)}function oO(){return new Rn(this._enter||this._groups.map(K5),this._parents)}function pf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}pf.prototype={constructor:pf,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function aO(e){return function(){return e}}var by="$";function sO(e,t,n,r,i,o){for(var a=0,s,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new pf(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function lO(e,t,n,r,i,o,a){var s,l,u={},c=t.length,d=o.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=by+a.call(l,l.__data__,s,t),h in u?i[s]=l:u[h]=l);for(s=0;s<d;++s)h=by+a.call(e,o[s],s,o),(l=u[h])?(r[s]=l,l.__data__=o[s],u[h]=null):n[s]=new pf(e,o[s]);for(s=0;s<c;++s)(l=t[s])&&u[f[s]]===l&&(i[s]=l)}function uO(e,t){if(!e)return h=new Array(this.size()),u=-1,this.each(function($){h[++u]=$}),h;var n=t?lO:sO,r=this._parents,i=this._groups;typeof e!="function"&&(e=aO(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],d=i[u],f=d.length,h=e.call(c,c&&c.__data__,u,r),p=h.length,g=s[u]=new Array(p),b=a[u]=new Array(p),v=l[u]=new Array(f);n(c,d,g,b,v,h,t);for(var x=0,y=0,_,S;x<p;++x)if(_=g[x]){for(x>=y&&(y=x+1);!(S=b[y])&&++y<p;);_._next=S||null}}return a=new Rn(a,r),a._enter=s,a._exit=l,a}function cO(){return new Rn(this._exit||this._groups.map(K5),this._parents)}function fO(e,t,n){var r=this.enter(),i=this,o=this.exit();return r=typeof e=="function"?e(r):r.append(e+""),t!=null&&(i=t(i)),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function dO(e){for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<r;++s)a[s]=t[s];return new Rn(a,this._parents)}function hO(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function pO(e){e||(e=gO);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Rn(i,this._parents).order()}function gO(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function vO(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function bO(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function mO(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function yO(){var e=0;return this.each(function(){++e}),e}function _O(){return!this.node()}function xO(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function wO(e){return function(){this.removeAttribute(e)}}function CO(e){return function(){this.removeAttributeNS(e.space,e.local)}}function SO(e,t){return function(){this.setAttribute(e,t)}}function $O(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function MO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function TO(e,t){var n=wu(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?CO:wO:typeof t=="function"?n.local?MO:kO:n.local?$O:SO)(n,t))}function Rv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function EO(e){return function(){this.style.removeProperty(e)}}function AO(e,t,n){return function(){this.style.setProperty(e,t,n)}}function PO(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function RO(e,t,n){return arguments.length>1?this.each((t==null?EO:typeof t=="function"?PO:AO)(e,t,n??"")):Yo(this.node(),e)}function Yo(e,t){return e.style.getPropertyValue(t)||Rv(e).getComputedStyle(e,null).getPropertyValue(t)}function zO(e){return function(){delete this[e]}}function FO(e,t){return function(){this[e]=t}}function IO(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function BO(e,t){return arguments.length>1?this.each((t==null?zO:typeof t=="function"?IO:FO)(e,t)):this.node()[e]}function Z5(e){return e.trim().split(/^|\s+/)}function zv(e){return e.classList||new J5(e)}function J5(e){this._node=e,this._names=Z5(e.getAttribute("class")||"")}J5.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Q5(e,t){for(var n=zv(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function e8(e,t){for(var n=zv(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function OO(e){return function(){Q5(this,e)}}function NO(e){return function(){e8(this,e)}}function LO(e,t){return function(){(t.apply(this,arguments)?Q5:e8)(this,e)}}function DO(e,t){var n=Z5(e+"");if(arguments.length<2){for(var r=zv(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?LO:t?OO:NO)(n,t))}function HO(){this.textContent=""}function UO(e){return function(){this.textContent=e}}function jO(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function WO(e){return arguments.length?this.each(e==null?HO:(typeof e=="function"?jO:UO)(e)):this.node().textContent}function VO(){this.innerHTML=""}function qO(e){return function(){this.innerHTML=e}}function GO(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function YO(e){return arguments.length?this.each(e==null?VO:(typeof e=="function"?GO:qO)(e)):this.node().innerHTML}function XO(){this.nextSibling&&this.parentNode.appendChild(this)}function KO(){return this.each(XO)}function ZO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function JO(){return this.each(ZO)}function QO(e){var t=typeof e=="function"?e:Fd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function eN(){return null}function tN(e,t){var n=typeof e=="function"?e:Fd(e),r=t==null?eN:typeof t=="function"?t:Id(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function nN(){var e=this.parentNode;e&&e.removeChild(this)}function rN(){return this.each(nN)}function iN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oN(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function aN(e){return this.select(e?oN:iN)}function sN(e){return arguments.length?this.property("__data__",e):this.node().__data__}var t8={},Ce=null;if(typeof document<"u"){var lN=document.documentElement;"onmouseenter"in lN||(t8={mouseenter:"mouseover",mouseleave:"mouseout"})}function uN(e,t,n){return e=n8(e,t,n),function(r){var i=r.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,r)}}function n8(e,t,n){return function(r){var i=Ce;Ce=r;try{e.call(this,this.__data__,t,n)}finally{Ce=i}}}function cN(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function fN(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++r]=o;++r?t.length=r:delete this.__on}}}function dN(e,t,n){var r=t8.hasOwnProperty(e.type)?uN:n8;return function(i,o,a){var s=this.__on,l,u=r(t,o,a);if(s){for(var c=0,d=s.length;c<d;++c)if((l=s[c]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),l.value=t;return}}this.addEventListener(e.type,u,n),l={type:e.type,name:e.name,value:t,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function hN(e,t,n){var r=cN(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?dN:fN,n==null&&(n=!1),i=0;i<o;++i)this.each(s(r[i],t,n));return this}function ql(e,t,n,r){var i=Ce;e.sourceEvent=Ce,Ce=e;try{return t.apply(n,r)}finally{Ce=i}}function r8(e,t,n){var r=Rv(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function pN(e,t){return function(){return r8(this,e,t)}}function gN(e,t){return function(){return r8(this,e,t.apply(this,arguments))}}function vN(e,t){return this.each((typeof t=="function"?gN:pN)(e,t))}var Fv=[null];function Rn(e,t){this._groups=e,this._parents=t}function pa(){return new Rn([[document.documentElement]],Fv)}Rn.prototype=pa.prototype={constructor:Rn,select:tO,selectAll:rO,filter:iO,data:uO,enter:oO,exit:cO,join:fO,merge:dO,order:hO,sort:pO,call:vO,nodes:bO,node:mO,size:yO,empty:_O,each:xO,attr:TO,style:RO,property:BO,classed:DO,text:WO,html:YO,raise:KO,lower:JO,append:QO,insert:tN,remove:rN,clone:aN,datum:sN,on:hN,dispatch:vN};function Ue(e){return typeof e=="string"?new Rn([[document.querySelector(e)]],[document.documentElement]):new Rn([[e]],Fv)}function bN(e){return Ue(Fd(e).call(document.documentElement))}var mN=0;function i8(){return new F0}function F0(){this._="@"+(++mN).toString(36)}F0.prototype=i8.prototype={constructor:F0,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function Iv(){for(var e=Ce,t;t=e.sourceEvent;)e=t;return e}function Bd(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function lr(e){var t=Iv();return t.changedTouches&&(t=t.changedTouches[0]),Bd(e,t)}function o8(e){return typeof e=="string"?new Rn([document.querySelectorAll(e)],[document.documentElement]):new Rn([e??[]],Fv)}function Gl(e,t,n){arguments.length<3&&(n=t,t=Iv().changedTouches);for(var r=0,i=t?t.length:0,o;r<i;++r)if((o=t[r]).identifier===n)return Bd(e,o);return null}function yN(e,t){t==null&&(t=Iv().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n<r;++n)i[n]=Bd(e,t[n]);return i}function ip(){Ce.stopImmediatePropagation()}function Wa(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function Od(e){var t=e.document.documentElement,n=Ue(e).on("dragstart.drag",Wa,!0);"onselectstart"in t?n.on("selectstart.drag",Wa,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Nd(e,t){var n=e.document.documentElement,r=Ue(e).on("dragstart.drag",null);t&&(r.on("click.drag",Wa,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function sc(e){return function(){return e}}function I0(e,t,n,r,i,o,a,s,l,u){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=u}I0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function _N(){return!Ce.ctrlKey&&!Ce.button}function xN(){return this.parentNode}function wN(e){return e??{x:Ce.x,y:Ce.y}}function CN(){return navigator.maxTouchPoints||"ontouchstart"in this}function B0(){var e=_N,t=xN,n=wN,r=CN,i={},o=ha("start","drag","end"),a=0,s,l,u,c,d=0;function f(_){_.on("mousedown.drag",h).filter(r).on("touchstart.drag",b).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){if(!(c||!e.apply(this,arguments))){var _=y("mouse",t.apply(this,arguments),lr,this,arguments);_&&(Ue(Ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Od(Ce.view),ip(),u=!1,s=Ce.clientX,l=Ce.clientY,_("start"))}}function p(){if(Wa(),!u){var _=Ce.clientX-s,S=Ce.clientY-l;u=_*_+S*S>d}i.mouse("drag")}function g(){Ue(Ce.view).on("mousemove.drag mouseup.drag",null),Nd(Ce.view,u),Wa(),i.mouse("end")}function b(){if(e.apply(this,arguments)){var _=Ce.changedTouches,S=t.apply(this,arguments),$=_.length,w,T;for(w=0;w<$;++w)(T=y(_[w].identifier,S,Gl,this,arguments))&&(ip(),T("start"))}}function v(){var _=Ce.changedTouches,S=_.length,$,w;for($=0;$<S;++$)(w=i[_[$].identifier])&&(Wa(),w("drag"))}function x(){var _=Ce.changedTouches,S=_.length,$,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),$=0;$<S;++$)(w=i[_[$].identifier])&&(ip(),w("end"))}function y(_,S,$,w,T){var M=$(S,_),P,R,C,E=o.copy();if(ql(new I0(f,"beforestart",P,_,a,M[0],M[1],0,0,E),function(){return(Ce.subject=P=n.apply(w,T))==null?!1:(R=P.x-M[0]||0,C=P.y-M[1]||0,!0)}))return function F(z){var j=M,Z;switch(z){case"start":i[_]=F,Z=a++;break;case"end":delete i[_],--a;case"drag":M=$(S,_),Z=a;break}ql(new I0(f,z,P,_,Z,M[0]+R,M[1]+C,M[0]-j[0],M[1]-j[1],E),E.apply,E,[z,w,T])}}return f.filter=function(_){return arguments.length?(e=typeof _=="function"?_:sc(!!_),f):e},f.container=function(_){return arguments.length?(t=typeof _=="function"?_:sc(_),f):t},f.subject=function(_){return arguments.length?(n=typeof _=="function"?_:sc(_),f):n},f.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:sc(!!_),f):r},f.on=function(){var _=o.on.apply(o,arguments);return _===o?f:_},f.clickDistance=function(_){return arguments.length?(d=(_=+_)*_,f):Math.sqrt(d)},f}function ms(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fo(){}var Xo=.7,rs=1/Xo,Va="\\s*([+-]?\\d+)\\s*",Yl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SN=/^#([0-9a-f]{3,8})$/,$N=new RegExp("^rgb\\("+[Va,Va,Va]+"\\)$"),kN=new RegExp("^rgb\\("+[Wr,Wr,Wr]+"\\)$"),MN=new RegExp("^rgba\\("+[Va,Va,Va,Yl]+"\\)$"),TN=new RegExp("^rgba\\("+[Wr,Wr,Wr,Yl]+"\\)$"),EN=new RegExp("^hsl\\("+[Yl,Wr,Wr]+"\\)$"),AN=new RegExp("^hsla\\("+[Yl,Wr,Wr,Yl]+"\\)$"),my={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ms(fo,eo,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:yy,formatHex:yy,formatHsl:PN,formatRgb:_y,toString:_y});function yy(){return this.rgb().formatHex()}function PN(){return a8(this).formatHsl()}function _y(){return this.rgb().formatRgb()}function eo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?xy(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?lc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?lc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$N.exec(e))?new un(t[1],t[2],t[3],1):(t=kN.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=MN.exec(e))?lc(t[1],t[2],t[3],t[4]):(t=TN.exec(e))?lc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=EN.exec(e))?Sy(t[1],t[2]/100,t[3]/100,1):(t=AN.exec(e))?Sy(t[1],t[2]/100,t[3]/100,t[4]):my.hasOwnProperty(e)?xy(my[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function xy(e){return new un(e>>16&255,e>>8&255,e&255,1)}function lc(e,t,n,r){return r<=0&&(e=t=n=NaN),new un(e,t,n,r)}function Bv(e){return e instanceof fo||(e=eo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function is(e,t,n,r){return arguments.length===1?Bv(e):new un(e,t,n,r??1)}function un(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ms(un,is,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wy,formatHex:wy,formatRgb:Cy,toString:Cy}));function wy(){return"#"+op(this.r)+op(this.g)+op(this.b)}function Cy(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function op(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function Sy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ir(e,t,n,r)}function a8(e){if(e instanceof Ir)return new Ir(e.h,e.s,e.l,e.opacity);if(e instanceof fo||(e=eo(e)),!e)return new Ir;if(e instanceof Ir)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ir(a,s,l,e.opacity)}function gf(e,t,n,r){return arguments.length===1?a8(e):new Ir(e,t,n,r??1)}function Ir(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Ir,gf,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Ir(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Ir(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new un(ap(e>=240?e-240:e+120,i,r),ap(e,i,r),ap(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function ap(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var s8=Math.PI/180,l8=180/Math.PI,vf=18,u8=.96422,c8=1,f8=.82521,d8=4/29,qa=6/29,h8=3*qa*qa,RN=qa*qa*qa;function p8(e){if(e instanceof _r)return new _r(e.l,e.a,e.b,e.opacity);if(e instanceof Dr)return v8(e);e instanceof un||(e=Bv(e));var t=cp(e.r),n=cp(e.g),r=cp(e.b),i=sp((.2225045*t+.7168786*n+.0606169*r)/c8),o,a;return t===n&&n===r?o=a=i:(o=sp((.4360747*t+.3850649*n+.1430804*r)/u8),a=sp((.0139322*t+.0971045*n+.7141733*r)/f8)),new _r(116*i-16,500*(o-i),200*(i-a),e.opacity)}function zN(e,t){return new _r(e,0,0,t??1)}function bf(e,t,n,r){return arguments.length===1?p8(e):new _r(e,t,n,r??1)}function _r(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ms(_r,bf,Cu(fo,{brighter:function(e){return new _r(this.l+vf*(e??1),this.a,this.b,this.opacity)},darker:function(e){return new _r(this.l-vf*(e??1),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=u8*lp(t),e=c8*lp(e),n=f8*lp(n),new un(up(3.1338561*t-1.6168667*e-.4906146*n),up(-.9787684*t+1.9161415*e+.033454*n),up(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function sp(e){return e>RN?Math.pow(e,1/3):e/h8+d8}function lp(e){return e>qa?e*e*e:h8*(e-d8)}function up(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function cp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function g8(e){if(e instanceof Dr)return new Dr(e.h,e.c,e.l,e.opacity);if(e instanceof _r||(e=p8(e)),e.a===0&&e.b===0)return new Dr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*l8;return new Dr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function FN(e,t,n,r){return arguments.length===1?g8(e):new Dr(n,t,e,r??1)}function mf(e,t,n,r){return arguments.length===1?g8(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function v8(e){if(isNaN(e.h))return new _r(e.l,0,0,e.opacity);var t=e.h*s8;return new _r(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ms(Dr,mf,Cu(fo,{brighter:function(e){return new Dr(this.h,this.c,this.l+vf*(e??1),this.opacity)},darker:function(e){return new Dr(this.h,this.c,this.l-vf*(e??1),this.opacity)},rgb:function(){return v8(this).rgb()}}));var b8=-.14861,Ov=1.78277,Nv=-.29227,Ld=-.90649,Xl=1.97294,$y=Xl*Ld,ky=Xl*Ov,My=Ov*Nv-Ld*b8;function IN(e){if(e instanceof Ho)return new Ho(e.h,e.s,e.l,e.opacity);e instanceof un||(e=Bv(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(My*r+$y*t-ky*n)/(My+$y-ky),o=r-i,a=(Xl*(n-i)-Nv*o)/Ld,s=Math.sqrt(a*a+o*o)/(Xl*i*(1-i)),l=s?Math.atan2(a,o)*l8-120:NaN;return new Ho(l<0?l+360:l,s,i,e.opacity)}function $r(e,t,n,r){return arguments.length===1?IN(e):new Ho(e,t,n,r??1)}function Ho(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ms(Ho,$r,Cu(fo,{brighter:function(e){return e=e==null?rs:Math.pow(rs,e),new Ho(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Xo:Math.pow(Xo,e),new Ho(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*s8,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new un(255*(t+n*(b8*r+Ov*i)),255*(t+n*(Nv*r+Ld*i)),255*(t+n*(Xl*r)),this.opacity)}}));function m8(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function y8(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return m8((n-r/t)*t,a,i,o,s)}}function _8(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return m8((n-r/t)*t,i,o,a,s)}}function Dd(e){return function(){return e}}function x8(e,t){return function(n){return e+n*t}}function BN(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Hd(e,t){var n=t-e;return n?x8(e,n>180||n<-180?n-360*Math.round(n/360):n):Dd(isNaN(e)?t:e)}function ON(e){return(e=+e)==1?tn:function(t,n){return n-t?BN(t,n,e):Dd(isNaN(t)?n:t)}}function tn(e,t){var n=t-e;return n?x8(e,n):Dd(isNaN(e)?t:e)}const Kl=function e(t){var n=ON(t);function r(i,o){var a=n((i=is(i)).r,(o=is(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=tn(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function w8(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=is(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=o(l),s+""}}}var C8=w8(y8),NN=w8(_8);function Lv(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function S8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function LN(e,t){return(S8(t)?Lv:$8)(e,t)}function $8(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=ys(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function k8(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function M8(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ys(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var O0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fp=new RegExp(O0.source,"g");function DN(e){return function(){return e}}function HN(e){return function(t){return e(t)+""}}function Dv(e,t){var n=O0.lastIndex=fp.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=O0.exec(e))&&(i=fp.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:or(r,i)})),n=fp.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?HN(l[0].x):DN(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}function ys(e,t){var n=typeof t,r;return t==null||n==="boolean"?Dd(t):(n==="number"?or:n==="string"?(r=eo(t))?(t=r,Kl):Dv:t instanceof eo?Kl:t instanceof Date?k8:S8(t)?Lv:Array.isArray(t)?$8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?M8:or)(e,t)}function UN(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function jN(e,t){var n=Hd(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function T8(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ty=180/Math.PI,N0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function E8(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ty,skewX:Math.atan(l)*Ty,scaleX:a,scaleY:s}}var zs,dp,Ey,uc;function WN(e){return e==="none"?N0:(zs||(zs=document.createElement("DIV"),dp=document.documentElement,Ey=document.defaultView),zs.style.transform=e,e=Ey.getComputedStyle(dp.appendChild(zs),null).getPropertyValue("transform"),dp.removeChild(zs),e=e.slice(7,-1).split(","),E8(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function VN(e){return e==null||(uc||(uc=document.createElementNS("http://www.w3.org/2000/svg","g")),uc.setAttribute("transform",e),!(e=uc.transform.baseVal.consolidate()))?N0:(e=e.matrix,E8(e.a,e.b,e.c,e.d,e.e,e.f))}function A8(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push("translate(",null,t,null,n);p.push({i:g-4,x:or(u,d)},{i:g-2,x:or(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:or(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:or(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function l(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");p.push({i:g-4,x:or(u,d)},{i:g-2,x:or(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var p=-1,g=f.length,b;++p<g;)d[(b=f[p]).i]=b.x(h);return d.join("")}}}var P8=A8(WN,"px, ","px)","deg)"),R8=A8(VN,", ",")",")"),Fs=Math.SQRT2,hp=2,Ay=4,qN=1e-12;function Py(e){return((e=Math.exp(e))+1/e)/2}function GN(e){return((e=Math.exp(e))-1/e)/2}function YN(e){return((e=Math.exp(2*e))-1)/(e+1)}function z8(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-n,u=a-r,c=l*l+u*u,d,f;if(c<qN)f=Math.log(s/i)/Fs,d=function(x){return[n+x*l,r+x*u,i*Math.exp(Fs*x*f)]};else{var h=Math.sqrt(c),p=(s*s-i*i+Ay*c)/(2*i*hp*h),g=(s*s-i*i-Ay*c)/(2*s*hp*h),b=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);f=(v-b)/Fs,d=function(x){var y=x*f,_=Py(b),S=i/(hp*h)*(_*YN(Fs*y+b)-GN(b));return[n+S*l,r+S*u,i*_/Py(Fs*y+b)]}}return d.duration=f*1e3,d}function F8(e){return function(t,n){var r=e((t=gf(t)).h,(n=gf(n)).h),i=tn(t.s,n.s),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const XN=F8(Hd);var KN=F8(tn);function ZN(e,t){var n=tn((e=bf(e)).l,(t=bf(t)).l),r=tn(e.a,t.a),i=tn(e.b,t.b),o=tn(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function I8(e){return function(t,n){var r=e((t=mf(t)).h,(n=mf(n)).h),i=tn(t.c,n.c),o=tn(t.l,n.l),a=tn(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const JN=I8(Hd);var QN=I8(tn);function B8(e){return function t(n){n=+n;function r(i,o){var a=e((i=$r(i)).h,(o=$r(o)).h),s=tn(i.s,o.s),l=tn(i.l,o.l),u=tn(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=t,r}(1)}const eL=B8(Hd);var Ud=B8(tn);function tL(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function nL(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var os=0,Xs=0,Is=0,O8=1e3,yf,Ks,_f=0,Ko=0,jd=0,Zl=typeof performance=="object"&&performance.now?performance:Date,N8=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _s(){return Ko||(N8(rL),Ko=Zl.now()+jd)}function rL(){Ko=0}function Jl(){this._call=this._time=this._next=null}Jl.prototype=Wd.prototype={constructor:Jl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_s():+n)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:yf=this,Ks=this),this._call=e,this._time=n,L0()},stop:function(){this._call&&(this._call=null,this._time=1/0,L0())}};function Wd(e,t,n){var r=new Jl;return r.restart(e,t,n),r}function L8(){_s(),++os;for(var e=yf,t;e;)(t=Ko-e._time)>=0&&e._call.call(null,t),e=e._next;--os}function Ry(){Ko=(_f=Zl.now())+jd,os=Xs=0;try{L8()}finally{os=0,oL(),Ko=0}}function iL(){var e=Zl.now(),t=e-_f;t>O8&&(jd-=t,_f=e)}function oL(){for(var e,t=yf,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:yf=n);Ks=e,L0(r)}function L0(e){if(!os){Xs&&(Xs=clearTimeout(Xs));var t=e-Ko;t>24?(e<1/0&&(Xs=setTimeout(Ry,e-Zl.now()-jd)),Is&&(Is=clearInterval(Is))):(Is||(_f=Zl.now(),Is=setInterval(iL,O8)),os=1,N8(Ry))}}function D0(e,t,n){var r=new Jl;return t=t==null?0:+t,r.restart(function(i){r.stop(),e(i+t)},t,n),r}function aL(e,t,n){var r=new Jl,i=t;return t==null?(r.restart(e,t,n),r):(t=+t,n=n==null?_s():+n,r.restart(function o(a){a+=i,r.restart(o,i+=t,n),e(a)},t,n),r)}var sL=ha("start","end","cancel","interrupt"),lL=[],D8=0,H0=1,U0=2,Bc=3,zy=4,j0=5,Oc=6;function Vd(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;uL(e,n,{name:t,index:r,group:i,on:sL,tween:lL,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:D8})}function Hv(e,t){var n=Mr(e,t);if(n.state>D8)throw new Error("too late; already scheduled");return n}function xi(e,t){var n=Mr(e,t);if(n.state>Bc)throw new Error("too late; already running");return n}function Mr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function uL(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Wd(o,0,n.time);function o(u){n.state=H0,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==H0)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Bc)return D0(a);h.state===zy?(h.state=Oc,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=Oc,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(D0(function(){n.state===Bc&&(n.state=zy,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=U0,n.on.call("start",e,e.__data__,n.index,n.group),n.state===U0){for(n.state=Bc,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=j0,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===j0&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Oc,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Uo(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>U0&&r.state<j0,r.state=Oc,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function cL(e){return this.each(function(){Uo(this,e)})}function fL(e,t){var n,r;return function(){var i=xi(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function dL(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=xi(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function hL(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Mr(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?fL:dL)(n,e,t))}function Uv(e,t,n){var r=e._id;return e.each(function(){var i=xi(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Mr(i,r).value[t]}}function H8(e,t){var n;return(typeof t=="number"?or:t instanceof eo?Kl:(n=eo(t))?(t=n,Kl):Dv)(e,t)}function pL(e){return function(){this.removeAttribute(e)}}function gL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function vL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function bL(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function mL(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function yL(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function _L(e,t){var n=wu(e),r=n==="transform"?R8:H8;return this.attrTween(e,typeof t=="function"?(n.local?yL:mL)(n,r,Uv(this,"attr."+e,t)):t==null?(n.local?gL:pL)(n):(n.local?bL:vL)(n,r,t))}function xL(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wL(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function CL(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&wL(e,o)),n}return i._value=t,i}function SL(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&xL(e,o)),n}return i._value=t,i}function $L(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=wu(e);return this.tween(n,(r.local?CL:SL)(r,t))}function kL(e,t){return function(){Hv(this,e).delay=+t.apply(this,arguments)}}function ML(e,t){return t=+t,function(){Hv(this,e).delay=t}}function TL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?kL:ML)(t,e)):Mr(this.node(),t).delay}function EL(e,t){return function(){xi(this,e).duration=+t.apply(this,arguments)}}function AL(e,t){return t=+t,function(){xi(this,e).duration=t}}function PL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?EL:AL)(t,e)):Mr(this.node(),t).duration}function RL(e,t){if(typeof t!="function")throw new Error;return function(){xi(this,e).ease=t}}function zL(e){var t=this._id;return arguments.length?this.each(RL(t,e)):Mr(this.node(),t).ease}function FL(e){typeof e!="function"&&(e=Pv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Yr(r,this._parents,this._name,this._id)}function IL(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<r;++s)a[s]=t[s];return new Yr(a,this._parents,this._name,this._id)}function BL(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function OL(e,t,n){var r,i,o=BL(t)?Hv:xi;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function NL(e,t){var n=this._id;return arguments.length<2?Mr(this.node(),n).on.on(e):this.each(OL(n,e,t))}function LL(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function DL(){return this.on("end.remove",LL(this._id))}function HL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Id(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,d,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Vd(u[f],t,n,f,u,Mr(c,n)));return new Yr(o,this._parents,t,n)}function UL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Av(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,p=Mr(c,n),g=0,b=f.length;g<b;++g)(h=f[g])&&Vd(h,t,n,g,f,p);o.push(f),a.push(c)}return new Yr(o,a,t,n)}var jL=pa.prototype.constructor;function WL(){return new jL(this._groups,this._parents)}function VL(e,t){var n,r,i;return function(){var o=Yo(this,e),a=(this.style.removeProperty(e),Yo(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function U8(e){return function(){this.style.removeProperty(e)}}function qL(e,t,n){var r,i=n+"",o;return function(){var a=Yo(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function GL(e,t,n){var r,i,o;return function(){var a=Yo(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Yo(this,e))),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}function YL(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var l=xi(this,e),u=l.on,c=l.value[o]==null?s||(s=U8(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function XL(e,t,n){var r=(e+="")=="transform"?P8:H8;return t==null?this.styleTween(e,VL(e,r)).on("end.style."+e,U8(e)):typeof t=="function"?this.styleTween(e,GL(e,r,Uv(this,"style."+e,t))).each(YL(this._id,e)):this.styleTween(e,qL(e,r,t),n).on("end.style."+e,null)}function KL(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function ZL(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&KL(e,a,n)),r}return o._value=t,o}function JL(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,ZL(e,t,n??""))}function QL(e){return function(){this.textContent=e}}function eD(e){return function(){var t=e(this);this.textContent=t??""}}function tD(e){return this.tween("text",typeof e=="function"?eD(Uv(this,"text",e)):QL(e==null?"":e+""))}function nD(e){return function(t){this.textContent=e.call(this,t)}}function rD(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&nD(i)),t}return r._value=e,r}function iD(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,rD(e))}function oD(){for(var e=this._name,t=this._id,n=W8(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Mr(l,t);Vd(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Yr(r,this._parents,e,n)}function aD(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=xi(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t})})}var sD=0;function Yr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function j8(e){return pa().transition(e)}function W8(){return++sD}var Ma=pa.prototype;Yr.prototype=j8.prototype={constructor:Yr,select:HL,selectAll:UL,filter:FL,merge:IL,selection:WL,transition:oD,call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:NL,attr:_L,attrTween:$L,style:XL,styleTween:JL,text:tD,textTween:iD,remove:DL,tween:hL,delay:TL,duration:PL,ease:zL,end:aD};function lD(e){return+e}function uD(e){return e*e}function cD(e){return e*(2-e)}function Fy(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function fD(e){return e*e*e}function dD(e){return--e*e*e+1}function W0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var jv=3,hD=function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n}(jv),pD=function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n}(jv),Iy=function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n}(jv),V8=Math.PI,q8=V8/2;function gD(e){return+e==1?1:1-Math.cos(e*q8)}function vD(e){return Math.sin(e*q8)}function By(e){return(1-Math.cos(V8*e))/2}function to(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function bD(e){return to(1-+e)}function mD(e){return 1-to(e)}function Oy(e){return((e*=2)<=1?to(1-e):2-to(e-1))/2}function yD(e){return 1-Math.sqrt(1-e*e)}function _D(e){return Math.sqrt(1- --e*e)}function Ny(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var V0=4/11,xD=6/11,wD=8/11,CD=3/4,SD=9/11,$D=10/11,kD=15/16,MD=21/22,TD=63/64,cc=1/V0/V0;function ED(e){return 1-Ql(1-e)}function Ql(e){return(e=+e)<V0?cc*e*e:e<wD?cc*(e-=xD)*e+CD:e<$D?cc*(e-=SD)*e+kD:cc*(e-=MD)*e+TD}function AD(e){return((e*=2)<=1?1-Ql(1-e):Ql(e-1)+1)/2}var Wv=1.70158,PD=function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n}(Wv),RD=function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n}(Wv),Ly=function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n}(Wv),as=2*Math.PI,Vv=1,qv=.3,zD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return t*to(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(Vv,qv),Dy=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return 1-t*to(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(Vv,qv),FD=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=as);function i(o){return((o=o*2-1)<0?t*to(-o)*Math.sin((r-o)/n):2-t*to(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return e(o,n*as)},i.period=function(o){return e(t,o)},i}(Vv,qv),q0={time:null,delay:0,duration:250,ease:W0};function ID(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return q0.time=_s(),q0;return n}function BD(e){var t,n;e instanceof Yr?(t=e._id,e=e._name):(t=W8(),(n=q0).time=_s(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Vd(l,e,t,u,a,n||ID(l,t));return new Yr(r,this._parents,e,t)}pa.prototype.interrupt=cL;pa.prototype.transition=BD;var OD=[null];function ND(e,t){var n=e.__transition,r,i;if(n){t=t==null?null:t+"";for(i in n)if((r=n[i]).state>H0&&r.name===t)return new Yr([[e]],OD,t,+i)}return null}function pp(e){return function(){return e}}function LD(e,t,n){this.target=e,this.type=t,this.selection=n}function Hy(){Ce.stopImmediatePropagation()}function gp(){Ce.preventDefault(),Ce.stopImmediatePropagation()}var Uy={},vp={name:"space"},Ta={name:"handle"},Ea={name:"center"};function jy(e){return[+e[0],+e[1]]}function G0(e){return[jy(e[0]),jy(e[1])]}function DD(e){return function(t){return Gl(t,Ce.touches,e)}}var Nc={name:"x",handles:["w","e"].map(eu),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Lc={name:"y",handles:["n","s"].map(eu),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},HD={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(eu),input:function(e){return e==null?null:G0(e)},output:function(e){return e}},ti={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Wy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Vy={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},UD={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},jD={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function eu(e){return{type:e}}function WD(){return!Ce.ctrlKey&&!Ce.button}function VD(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function qD(){return navigator.maxTouchPoints||"ontouchstart"in this}function bp(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function GD(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function YD(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function XD(){return Gv(Nc)}function KD(){return Gv(Lc)}function ZD(){return Gv(HD)}function Gv(e){var t=VD,n=WD,r=qD,i=!0,o=ha("start","brush","end"),a=6,s;function l(b){var v=b.property("__brush",g).selectAll(".overlay").data([eu("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ti.overlay).merge(v).each(function(){var y=bp(this).extent;Ue(this).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1])}),b.selectAll(".selection").data([eu("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ti.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=b.selectAll(".handle").data(e.handles,function(y){return y.type});x.exit().remove(),x.enter().append("rect").attr("class",function(y){return"handle handle--"+y.type}).attr("cursor",function(y){return ti[y.type]}),b.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(b,v){b.selection?b.on("start.brush",function(){c(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){c(this,arguments).end()}).tween("brush",function(){var x=this,y=x.__brush,_=c(x,arguments),S=y.selection,$=e.input(typeof v=="function"?v.apply(this,arguments):v,y.extent),w=ys(S,$);function T(M){y.selection=M===1&&$===null?null:w(M),u.call(x),_.brush()}return S!==null&&$!==null?T:T(1)}):b.each(function(){var x=this,y=arguments,_=x.__brush,S=e.input(typeof v=="function"?v.apply(x,y):v,_.extent),$=c(x,y).beforestart();Uo(x),_.selection=S===null?null:S,u.call(x),$.start().brush().end()})},l.clear=function(b){l.move(b,null)};function u(){var b=Ue(this),v=bp(this).selection;v?(b.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),b.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?v[1][1]-v[0][1]+a:a})):b.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(b,v,x){var y=b.__brush.emitter;return y&&(!x||!y.clean)?y:new d(b,v,x)}function d(b,v,x){this.that=b,this.args=v,this.state=b.__brush,this.active=0,this.clean=x}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(b){ql(new LD(l,b,e.output(this.state.selection)),o.apply,o,[b,this.that,this.args])}};function f(){if(s&&!Ce.touches||!n.apply(this,arguments))return;var b=this,v=Ce.target.__data__.type,x=(i&&Ce.metaKey?v="overlay":v)==="selection"?Uy:i&&Ce.altKey?Ea:Ta,y=e===Lc?null:UD[v],_=e===Nc?null:jD[v],S=bp(b),$=S.extent,w=S.selection,T=$[0][0],M,P,R=$[0][1],C,E,F=$[1][0],z,j,Z=$[1][1],J,ie,he=0,_e=0,oe,ve=y&&_&&i&&Ce.shiftKey,we,Oe,xe=Ce.touches?DD(Ce.changedTouches[0].identifier):lr,Xe=xe(b),Ve=Xe,fe=c(b,arguments,!0).beforestart();v==="overlay"?(w&&(oe=!0),S.selection=w=[[M=e===Lc?T:Xe[0],C=e===Nc?R:Xe[1]],[z=e===Lc?F:M,J=e===Nc?Z:C]]):(M=w[0][0],C=w[0][1],z=w[1][0],J=w[1][1]),P=M,E=C,j=z,ie=J;var Ee=Ue(b).attr("pointer-events","none"),Pe=Ee.selectAll(".overlay").attr("cursor",ti[v]);if(Ce.touches)fe.moved=H,fe.ended=de;else{var A=Ue(Ce.view).on("mousemove.brush",H,!0).on("mouseup.brush",de,!0);i&&A.on("keydown.brush",le,!0).on("keyup.brush",q,!0),Od(Ce.view)}Hy(),Uo(b),u.call(b),fe.start();function H(){var N=xe(b);ve&&!we&&!Oe&&(Math.abs(N[0]-Ve[0])>Math.abs(N[1]-Ve[1])?Oe=!0:we=!0),Ve=N,oe=!0,gp(),Y()}function Y(){var N;switch(he=Ve[0]-Xe[0],_e=Ve[1]-Xe[1],x){case vp:case Uy:{y&&(he=Math.max(T-M,Math.min(F-z,he)),P=M+he,j=z+he),_&&(_e=Math.max(R-C,Math.min(Z-J,_e)),E=C+_e,ie=J+_e);break}case Ta:{y<0?(he=Math.max(T-M,Math.min(F-M,he)),P=M+he,j=z):y>0&&(he=Math.max(T-z,Math.min(F-z,he)),P=M,j=z+he),_<0?(_e=Math.max(R-C,Math.min(Z-C,_e)),E=C+_e,ie=J):_>0&&(_e=Math.max(R-J,Math.min(Z-J,_e)),E=C,ie=J+_e);break}case Ea:{y&&(P=Math.max(T,Math.min(F,M-he*y)),j=Math.max(T,Math.min(F,z+he*y))),_&&(E=Math.max(R,Math.min(Z,C-_e*_)),ie=Math.max(R,Math.min(Z,J+_e*_)));break}}j<P&&(y*=-1,N=M,M=z,z=N,N=P,P=j,j=N,v in Wy&&Pe.attr("cursor",ti[v=Wy[v]])),ie<E&&(_*=-1,N=C,C=J,J=N,N=E,E=ie,ie=N,v in Vy&&Pe.attr("cursor",ti[v=Vy[v]])),S.selection&&(w=S.selection),we&&(P=w[0][0],j=w[1][0]),Oe&&(E=w[0][1],ie=w[1][1]),(w[0][0]!==P||w[0][1]!==E||w[1][0]!==j||w[1][1]!==ie)&&(S.selection=[[P,E],[j,ie]],u.call(b),fe.brush())}function de(){if(Hy(),Ce.touches){if(Ce.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Nd(Ce.view,oe),A.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Ee.attr("pointer-events","all"),Pe.attr("cursor",ti.overlay),S.selection&&(w=S.selection),GD(w)&&(S.selection=null,u.call(b)),fe.end()}function le(){switch(Ce.keyCode){case 16:{ve=y&&_;break}case 18:{x===Ta&&(y&&(z=j-he*y,M=P+he*y),_&&(J=ie-_e*_,C=E+_e*_),x=Ea,Y());break}case 32:{(x===Ta||x===Ea)&&(y<0?z=j-he:y>0&&(M=P-he),_<0?J=ie-_e:_>0&&(C=E-_e),x=vp,Pe.attr("cursor",ti.selection),Y());break}default:return}gp()}function q(){switch(Ce.keyCode){case 16:{ve&&(we=Oe=ve=!1,Y());break}case 18:{x===Ea&&(y<0?z=j:y>0&&(M=P),_<0?J=ie:_>0&&(C=E),x=Ta,Y());break}case 32:{x===vp&&(Ce.altKey?(y&&(z=j-he*y,M=P+he*y),_&&(J=ie-_e*_,C=E+_e*_),x=Ea):(y<0?z=j:y>0&&(M=P),_<0?J=ie:_>0&&(C=E),x=Ta),Pe.attr("cursor",ti[v]),Y());break}default:return}gp()}}function h(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var b=this.__brush||{selection:null};return b.extent=G0(t.apply(this,arguments)),b.dim=e,b}return l.extent=function(b){return arguments.length?(t=typeof b=="function"?b:pp(G0(b)),l):t},l.filter=function(b){return arguments.length?(n=typeof b=="function"?b:pp(!!b),l):n},l.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:pp(!!b),l):r},l.handleSize=function(b){return arguments.length?(a=+b,l):a},l.keyModifiers=function(b){return arguments.length?(i=!!b,l):i},l.on=function(){var b=o.on.apply(o,arguments);return b===o?l:b},l}var qy=Math.cos,Gy=Math.sin,G8=Math.PI,fc=G8/2,Yy=G8*2,Xy=Math.max;function JD(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}function QD(){var e=0,t=null,n=null,r=null;function i(o){var a=o.length,s=[],l=Jn(a),u=[],c=[],d=c.groups=new Array(a),f=new Array(a*a),h,p,g,b,v,x;for(h=0,v=-1;++v<a;){for(p=0,x=-1;++x<a;)p+=o[v][x];s.push(p),u.push(Jn(a)),h+=p}for(t&&l.sort(function(P,R){return t(s[P],s[R])}),n&&u.forEach(function(P,R){P.sort(function(C,E){return n(o[R][C],o[R][E])})}),h=Xy(0,Yy-e*a)/h,b=h?e:Yy/a,p=0,v=-1;++v<a;){for(g=p,x=-1;++x<a;){var y=l[v],_=u[y][x],S=o[y][_],$=p,w=p+=S*h;f[_*a+y]={index:y,subindex:_,startAngle:$,endAngle:w,value:S}}d[y]={index:y,startAngle:g,endAngle:p,value:s[y]},p+=b}for(v=-1;++v<a;)for(x=v-1;++x<a;){var T=f[x*a+v],M=f[v*a+x];(T.value||M.value)&&c.push(T.value<M.value?{source:M,target:T}:{source:T,target:M})}return r?c.sort(r):c}return i.padAngle=function(o){return arguments.length?(e=Xy(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(n=o,i):n},i.sortChords=function(o){return arguments.length?(o==null?r=null:(r=JD(o))._=o,i):r&&r._},i}var eH=Array.prototype.slice;function mp(e){return function(){return e}}var Y0=Math.PI,X0=2*Y0,ko=1e-6,tH=X0-ko;function K0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ho(){return new K0}K0.prototype=ho.prototype={constructor:K0,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,u=o-e,c=a-t,d=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>ko)if(!(Math.abs(c*s-l*u)>ko)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=n-o,h=r-a,p=s*s+l*l,g=f*f+h*h,b=Math.sqrt(p),v=Math.sqrt(d),x=i*Math.tan((Y0-Math.acos((p+d-g)/(2*b*v)))/2),y=x/v,_=x/b;Math.abs(y-1)>ko&&(this._+="L"+(e+y*u)+","+(t+y*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>u*h)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,u=t+s,c=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>ko||Math.abs(this._y1-u)>ko)&&(this._+="L"+l+","+u),n&&(d<0&&(d=d%X0+X0),d>tH?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):d>ko&&(this._+="A"+n+","+n+",0,"+ +(d>=Y0)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function nH(e){return e.source}function rH(e){return e.target}function iH(e){return e.radius}function oH(e){return e.startAngle}function aH(e){return e.endAngle}function sH(){var e=nH,t=rH,n=iH,r=oH,i=aH,o=null;function a(){var s,l=eH.call(arguments),u=e.apply(this,l),c=t.apply(this,l),d=+n.apply(this,(l[0]=u,l)),f=r.apply(this,l)-fc,h=i.apply(this,l)-fc,p=d*qy(f),g=d*Gy(f),b=+n.apply(this,(l[0]=c,l)),v=r.apply(this,l)-fc,x=i.apply(this,l)-fc;if(o||(o=s=ho()),o.moveTo(p,g),o.arc(0,0,d,f,h),(f!==v||h!==x)&&(o.quadraticCurveTo(0,0,b*qy(v),b*Gy(v)),o.arc(0,0,b,v,x)),o.quadraticCurveTo(0,0,p,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(n=typeof s=="function"?s:mp(+s),a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:mp(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:mp(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s??null,a):o},a}var rr="$";function xf(){}xf.prototype=hi.prototype={constructor:xf,has:function(e){return rr+e in this},get:function(e){return this[rr+e]},set:function(e,t){return this[rr+e]=t,this},remove:function(e){var t=rr+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===rr&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===rr&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===rr&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===rr&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===rr&&++e;return e},empty:function(){for(var e in this)if(e[0]===rr)return!1;return!0},each:function(e){for(var t in this)t[0]===rr&&e(this[t],t.slice(1),this)}};function hi(e,t){var n=new xf;if(e instanceof xf)e.each(function(s,l){n.set(l,s)});else if(Array.isArray(e)){var r=-1,i=e.length,o;if(t==null)for(;++r<i;)n.set(r,e[r]);else for(;++r<i;)n.set(t(o=e[r],r,e),o)}else if(e)for(var a in e)n.set(a,e[a]);return n}function lH(){var e=[],t=[],n,r,i;function o(s,l,u,c){if(l>=e.length)return n!=null&&s.sort(n),r!=null?r(s):s;for(var d=-1,f=s.length,h=e[l++],p,g,b=hi(),v,x=u();++d<f;)(v=b.get(p=h(g=s[d])+""))?v.push(g):b.set(p,[g]);return b.each(function(y,_){c(x,_,o(y,l,u,c))}),x}function a(s,l){if(++l>e.length)return s;var u,c=t[l-1];return r!=null&&l>=e.length?u=s.entries():(u=[],s.each(function(d,f){u.push({key:f,values:a(d,l)})})),c!=null?u.sort(function(d,f){return c(d.key,f.key)}):u}return i={object:function(s){return o(s,0,uH,cH)},map:function(s){return o(s,0,Ky,Zy)},entries:function(s){return a(o(s,0,Ky,Zy),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return n=s,i},rollup:function(s){return r=s,i}}}function uH(){return{}}function cH(e,t,n){e[t]=n}function Ky(){return hi()}function Zy(e,t,n){e.set(t,n)}function wf(){}var So=hi.prototype;wf.prototype=Y8.prototype={constructor:wf,has:So.has,add:function(e){return e+="",this[rr+e]=e,this},remove:So.remove,clear:So.clear,values:So.keys,size:So.size,empty:So.empty,each:So.each};function Y8(e,t){var n=new wf;if(e instanceof wf)e.each(function(o){n.add(o)});else if(e){var r=-1,i=e.length;if(t==null)for(;++r<i;)n.add(e[r]);else for(;++r<i;)n.add(t(e[r],r,e))}return n}function fH(e){var t=[];for(var n in e)t.push(n);return t}function dH(e){var t=[];for(var n in e)t.push(e[n]);return t}function hH(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t}var pH=Array.prototype,X8=pH.slice;function gH(e,t){return e-t}function vH(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}function Ri(e){return function(){return e}}function bH(e,t){for(var n=-1,r=t.length,i;++n<r;)if(i=mH(e,t[n]))return i;return 0}function mH(e,t){for(var n=t[0],r=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],u=l[0],c=l[1],d=e[s],f=d[0],h=d[1];if(yH(l,d,t))return 0;c>r!=h>r&&n<(f-u)*(r-c)/(h-c)+u&&(i=-i)}return i}function yH(e,t,n){var r;return _H(e,t,n)&&xH(e[r=+(e[0]===t[0])],n[r],t[r])}function _H(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function xH(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function wH(){}var ni=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function K8(){var e=1,t=1,n=Mv,r=l;function i(u){var c=n(u);if(Array.isArray(c))c=c.slice().sort(gH);else{var d=qo(u),f=d[0],h=d[1];c=Go(f,h,c),c=Jn(Math.floor(f/c)*c,Math.floor(h/c)*c,c)}return c.map(function(p){return o(u,p)})}function o(u,c){var d=[],f=[];return a(u,c,function(h){r(h,u,c),vH(h)>0?d.push([h]):f.push(h)}),f.forEach(function(h){for(var p=0,g=d.length,b;p<g;++p)if(bH((b=d[p])[0],h)!==-1){b.push(h);return}}),{type:"MultiPolygon",value:c,coordinates:d}}function a(u,c,d){var f=new Array,h=new Array,p,g,b,v,x,y;for(p=g=-1,v=u[0]>=c,ni[v<<1].forEach(_);++p<e-1;)b=v,v=u[p+1]>=c,ni[b|v<<1].forEach(_);for(ni[v<<0].forEach(_);++g<t-1;){for(p=-1,v=u[g*e+e]>=c,x=u[g*e]>=c,ni[v<<1|x<<2].forEach(_);++p<e-1;)b=v,v=u[g*e+e+p+1]>=c,y=x,x=u[g*e+p+1]>=c,ni[b|v<<1|x<<2|y<<3].forEach(_);ni[v|x<<3].forEach(_)}for(p=-1,x=u[g*e]>=c,ni[x<<2].forEach(_);++p<e-1;)y=x,x=u[g*e+p+1]>=c,ni[x<<2|y<<3].forEach(_);ni[x<<3].forEach(_);function _(S){var $=[S[0][0]+p,S[0][1]+g],w=[S[1][0]+p,S[1][1]+g],T=s($),M=s(w),P,R;(P=h[T])?(R=f[M])?(delete h[P.end],delete f[R.start],P===R?(P.ring.push(w),d(P.ring)):f[P.start]=h[R.end]={start:P.start,end:R.end,ring:P.ring.concat(R.ring)}):(delete h[P.end],P.ring.push(w),h[P.end=M]=P):(P=f[M])?(R=h[T])?(delete f[P.start],delete h[R.end],P===R?(P.ring.push(w),d(P.ring)):f[R.start]=h[P.end]={start:R.start,end:P.end,ring:R.ring.concat(P.ring)}):(delete f[P.start],P.ring.unshift($),f[P.start=T]=P):f[T]=h[M]={start:T,end:M,ring:[$,w]}}}function s(u){return u[0]*2+u[1]*(e+1)*4}function l(u,c,d){u.forEach(function(f){var h=f[0],p=f[1],g=h|0,b=p|0,v,x=c[b*e+g];h>0&&h<e&&g===h&&(v=c[b*e+g-1],f[0]=h+(d-v)/(x-v)-.5),p>0&&p<t&&b===p&&(v=c[(b-1)*e+g],f[1]=p+(d-v)/(x-v)-.5)})}return i.contour=o,i.size=function(u){if(!arguments.length)return[e,t];var c=Math.ceil(u[0]),d=Math.ceil(u[1]);if(!(c>0)||!(d>0))throw new Error("invalid size");return e=c,t=d,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?Ri(X8.call(u)):Ri(u),i):n},i.smooth=function(u){return arguments.length?(r=u?l:wH,i):r===l},i}function yp(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<i;++a)for(var s=0,l=0;s<r+n;++s)s<r&&(l+=e.data[s+a*r]),s>=n&&(s>=o&&(l-=e.data[s-o+a*r]),t.data[s-n+a*r]=l/Math.min(s+1,r-1+o-s,o))}function _p(e,t,n){for(var r=e.width,i=e.height,o=(n<<1)+1,a=0;a<r;++a)for(var s=0,l=0;s<i+n;++s)s<i&&(l+=e.data[a+s*r]),s>=n&&(s>=o&&(l-=e.data[a+(s-o)*r]),t.data[a+(s-n)*r]=l/Math.min(s+1,i-1+o-s,o))}function CH(e){return e[0]}function SH(e){return e[1]}function $H(){return 1}function kH(){var e=CH,t=SH,n=$H,r=960,i=500,o=20,a=2,s=o*3,l=r+s*2>>a,u=i+s*2>>a,c=Ri(20);function d(v){var x=new Float32Array(l*u),y=new Float32Array(l*u);v.forEach(function($,w,T){var M=+e($,w,T)+s>>a,P=+t($,w,T)+s>>a,R=+n($,w,T);M>=0&&M<l&&P>=0&&P<u&&(x[M+P*l]+=R)}),yp({width:l,height:u,data:x},{data:y},o>>a),_p({width:l,height:u,data:y},{data:x},o>>a),yp({width:l,height:u,data:x},{data:y},o>>a),_p({width:l,height:u,data:y},{data:x},o>>a),yp({width:l,height:u,data:x},{data:y},o>>a),_p({width:l,height:u,data:y},{data:x},o>>a);var _=c(x);if(!Array.isArray(_)){var S=W5(x);_=Go(0,S,_),_=Jn(0,Math.floor(S/_)*_,_),_.shift()}return K8().thresholds(_).size([l,u])(x).map(f)}function f(v){return v.value*=Math.pow(2,-2*a),v.coordinates.forEach(h),v}function h(v){v.forEach(p)}function p(v){v.forEach(g)}function g(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function b(){return s=o*3,l=r+s*2>>a,u=i+s*2>>a,d}return d.x=function(v){return arguments.length?(e=typeof v=="function"?v:Ri(+v),d):e},d.y=function(v){return arguments.length?(t=typeof v=="function"?v:Ri(+v),d):t},d.weight=function(v){return arguments.length?(n=typeof v=="function"?v:Ri(+v),d):n},d.size=function(v){if(!arguments.length)return[r,i];var x=Math.ceil(v[0]),y=Math.ceil(v[1]);if(!(x>=0)&&!(x>=0))throw new Error("invalid size");return r=x,i=y,b()},d.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),b()},d.thresholds=function(v){return arguments.length?(c=typeof v=="function"?v:Array.isArray(v)?Ri(X8.call(v)):Ri(v),d):c},d.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*v*v+1)-1)/2),b()},d}var Jy={},xp={},wp=34,Bs=10,Cp=13;function Z8(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function MH(e,t){var n=Z8(e);return function(r,i){return t(n(r),i,e)}}function Qy(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Dn(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function TH(e){return e<0?"-"+Dn(-e,6):e>9999?"+"+Dn(e,6):Dn(e,4)}function EH(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":TH(e.getUTCFullYear())+"-"+Dn(e.getUTCMonth()+1,2)+"-"+Dn(e.getUTCDate(),2)+(i?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"."+Dn(i,3)+"Z":r?"T"+Dn(t,2)+":"+Dn(n,2)+":"+Dn(r,2)+"Z":n||t?"T"+Dn(t,2)+":"+Dn(n,2)+"Z":"")}function qd(e){var t=new RegExp('["'+e+`
|
|
1997
|
+
\r]`),n=e.charCodeAt(0);function r(d,f){var h,p,g=i(d,function(b,v){if(h)return h(b,v-1);p=b,h=f?MH(b,f):Z8(b)});return g.columns=p||[],g}function i(d,f){var h=[],p=d.length,g=0,b=0,v,x=p<=0,y=!1;d.charCodeAt(p-1)===Bs&&--p,d.charCodeAt(p-1)===Cp&&--p;function _(){if(x)return xp;if(y)return y=!1,Jy;var $,w=g,T;if(d.charCodeAt(w)===wp){for(;g++<p&&d.charCodeAt(g)!==wp||d.charCodeAt(++g)===wp;);return($=g)>=p?x=!0:(T=d.charCodeAt(g++))===Bs?y=!0:T===Cp&&(y=!0,d.charCodeAt(g)===Bs&&++g),d.slice(w+1,$-1).replace(/""/g,'"')}for(;g<p;){if((T=d.charCodeAt($=g++))===Bs)y=!0;else if(T===Cp)y=!0,d.charCodeAt(g)===Bs&&++g;else if(T!==n)continue;return d.slice(w,$)}return x=!0,d.slice(w,p)}for(;(v=_())!==xp;){for(var S=[];v!==Jy&&v!==xp;)S.push(v),v=_();f&&(S=f(S,b++))==null||h.push(S)}return h}function o(d,f){return d.map(function(h){return f.map(function(p){return c(h[p])}).join(e)})}function a(d,f){return f==null&&(f=Qy(d)),[f.map(c).join(e)].concat(o(d,f)).join(`
|
|
1998
|
+
`)}function s(d,f){return f==null&&(f=Qy(d)),o(d,f).join(`
|
|
1999
|
+
`)}function l(d){return d.map(u).join(`
|
|
2000
|
+
`)}function u(d){return d.map(c).join(e)}function c(d){return d==null?"":d instanceof Date?EH(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:u,formatValue:c}}var ga=qd(","),J8=ga.parse,AH=ga.parseRows,PH=ga.format,RH=ga.formatBody,zH=ga.formatRows,FH=ga.formatRow,IH=ga.formatValue,va=qd(" "),Q8=va.parse,BH=va.parseRows,OH=va.format,NH=va.formatBody,LH=va.formatRows,DH=va.formatRow,HH=va.formatValue;function UH(e){for(var t in e){var n=e[t].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))jH&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;e[t]=n}return e}var jH=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function WH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function VH(e,t){return fetch(e,t).then(WH)}function qH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function GH(e,t){return fetch(e,t).then(qH)}function YH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Gd(e,t){return fetch(e,t).then(YH)}function e3(e){return function(t,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gd(t,n).then(function(i){return e(i,r)})}}function XH(e,t,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=qd(e);return Gd(t,n).then(function(o){return i.parse(o,r)})}var KH=e3(J8),ZH=e3(Q8);function JH(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function QH(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function eU(e,t){return fetch(e,t).then(QH)}function Yv(e){return function(t,n){return Gd(t,n).then(function(r){return new DOMParser().parseFromString(r,e)})}}const tU=Yv("application/xml");var nU=Yv("text/html"),rU=Yv("image/svg+xml");function iU(e,t){var n;e==null&&(e=0),t==null&&(t=0);function r(){var i,o=n.length,a,s=0,l=0;for(i=0;i<o;++i)a=n[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=n[i],a.x-=s,a.y-=l}return r.initialize=function(i){n=i},r.x=function(i){return arguments.length?(e=+i,r):e},r.y=function(i){return arguments.length?(t=+i,r):t},r}function Jt(e){return function(){return e}}function Ni(){return(Math.random()-.5)*1e-6}function oU(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return t3(this.cover(t,n),t,n,e)}function t3(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,c=e._y1,d,f,h,p,g,b,v,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(d=(s+u)/2))?s=d:u=d,(b=n>=(f=(l+c)/2))?l=f:c=f,i=o,!(o=o[v=b<<1|g]))return i[v]=a,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&n===p)return a.next=o,i?i[v]=a:e._root=a,e;do i=i?i[v]=new Array(4):e._root=new Array(4),(g=t>=(d=(s+u)/2))?s=d:u=d,(b=n>=(f=(l+c)/2))?l=f:c=f;while((v=b<<1|g)===(x=(p>=f)<<1|h>=d));return i[x]=o,i[v]=a,e}function aU(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,c=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<l&&(l=i),i>c&&(c=i),o<u&&(u=o),o>d&&(d=o));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),n=0;n<r;++n)t3(this,a[n],s[n],e[n]);return this}function sU(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function lU(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function uU(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function An(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function cU(e,t,n){var r,i=this._x0,o=this._y0,a,s,l,u,c=this._x1,d=this._y1,f=[],h=this._root,p,g;for(h&&f.push(new An(h,i,o,c,d)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,d=t+n,n*=n);p=f.pop();)if(!(!(h=p.node)||(a=p.x0)>c||(s=p.y0)>d||(l=p.x1)<i||(u=p.y1)<o))if(h.length){var b=(a+l)/2,v=(s+u)/2;f.push(new An(h[3],b,v,l,u),new An(h[2],a,v,b,u),new An(h[1],b,s,l,v),new An(h[0],a,s,b,v)),(g=(t>=v)<<1|e>=b)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var x=e-+this._x.call(null,h.data),y=t-+this._y.call(null,h.data),_=x*x+y*y;if(_<n){var S=Math.sqrt(n=_);i=e-S,o=t-S,c=e+S,d=t+S,r=h.data}}return r}function fU(e){if(isNaN(c=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,c,d,f,h,p,g,b,v;if(!n)return this;if(n.length)for(;;){if((p=c>=(f=(a+l)/2))?a=f:l=f,(g=d>=(h=(s+u)/2))?s=h:u=h,t=n,!(n=n[b=g<<1|p]))return this;if(!n.length)break;(t[b+1&3]||t[b+2&3]||t[b+3&3])&&(r=t,v=b)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[b]=o:delete t[b],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[v]=n:this._root=n),this):(this._root=o,this)}function dU(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function hU(){return this._root}function pU(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function gU(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new An(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,c=(a+l)/2;(i=r[3])&&t.push(new An(i,u,c,s,l)),(i=r[2])&&t.push(new An(i,o,c,u,l)),(i=r[1])&&t.push(new An(i,u,a,s,c)),(i=r[0])&&t.push(new An(i,o,a,u,c))}return this}function vU(e){var t=[],n=[],r;for(this._root&&t.push(new An(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&t.push(new An(o,a,s,c,d)),(o=i[1])&&t.push(new An(o,c,s,l,d)),(o=i[2])&&t.push(new An(o,a,d,c,u)),(o=i[3])&&t.push(new An(o,c,d,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function bU(e){return e[0]}function mU(e){return arguments.length?(this._x=e,this):this._x}function yU(e){return e[1]}function _U(e){return arguments.length?(this._y=e,this):this._y}function Yd(e,t,n){var r=new Xv(t??bU,n??yU,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Xv(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function e_(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var On=Yd.prototype=Xv.prototype;On.copy=function(){var e=new Xv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=e_(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=e_(r));return e};On.add=oU;On.addAll=aU;On.cover=sU;On.data=lU;On.extent=uU;On.find=cU;On.remove=fU;On.removeAll=dU;On.root=hU;On.size=pU;On.visit=gU;On.visitAfter=vU;On.x=mU;On.y=_U;function xU(e){return e.x+e.vx}function wU(e){return e.y+e.vy}function CU(e){var t,n,r=1,i=1;typeof e!="function"&&(e=Jt(e==null?1:+e));function o(){for(var l,u=t.length,c,d,f,h,p,g,b=0;b<i;++b)for(c=Yd(t,xU,wU).visitAfter(a),l=0;l<u;++l)d=t[l],p=n[d.index],g=p*p,f=d.x+d.vx,h=d.y+d.vy,c.visit(v);function v(x,y,_,S,$){var w=x.data,T=x.r,M=p+T;if(w){if(w.index>d.index){var P=f-w.x-w.vx,R=h-w.y-w.vy,C=P*P+R*R;C<M*M&&(P===0&&(P=Ni(),C+=P*P),R===0&&(R=Ni(),C+=R*R),C=(M-(C=Math.sqrt(C)))/C*r,d.vx+=(P*=C)*(M=(T*=T)/(g+T)),d.vy+=(R*=C)*M,w.vx-=P*(M=1-M),w.vy-=R*M)}return}return y>f+M||S<f-M||_>h+M||$<h-M}}function a(l){if(l.data)return l.r=n[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function s(){if(t){var l,u=t.length,c;for(n=new Array(u),l=0;l<u;++l)c=t[l],n[c.index]=+e(c,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(r=+l,o):r},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Jt(+l),s(),o):e},o}function SU(e){return e.index}function t_(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function $U(e){var t=SU,n=c,r,i=Jt(30),o,a,s,l,u=1;e==null&&(e=[]);function c(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var b=0,v=e.length;b<u;++b)for(var x=0,y,_,S,$,w,T,M;x<v;++x)y=e[x],_=y.source,S=y.target,$=S.x+S.vx-_.x-_.vx||Ni(),w=S.y+S.vy-_.y-_.vy||Ni(),T=Math.sqrt($*$+w*w),T=(T-o[x])/T*g*r[x],$*=T,w*=T,S.vx-=$*(M=l[x]),S.vy-=w*M,_.vx+=$*(M=1-M),_.vy+=w*M}function f(){if(a){var g,b=a.length,v=e.length,x=hi(a,t),y;for(g=0,s=new Array(b);g<v;++g)y=e[g],y.index=g,typeof y.source!="object"&&(y.source=t_(x,y.source)),typeof y.target!="object"&&(y.target=t_(x,y.target)),s[y.source.index]=(s[y.source.index]||0)+1,s[y.target.index]=(s[y.target.index]||0)+1;for(g=0,l=new Array(v);g<v;++g)y=e[g],l[g]=s[y.source.index]/(s[y.source.index]+s[y.target.index]);r=new Array(v),h(),o=new Array(v),p()}}function h(){if(a)for(var g=0,b=e.length;g<b;++g)r[g]=+n(e[g],g,e)}function p(){if(a)for(var g=0,b=e.length;g<b;++g)o[g]=+i(e[g],g,e)}return d.initialize=function(g){a=g,f()},d.links=function(g){return arguments.length?(e=g,f(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Jt(+g),h(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Jt(+g),p(),d):i},d}function kU(e){return e.x}function MU(e){return e.y}var TU=10,EU=Math.PI*(3-Math.sqrt(5));function AU(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=hi(),l=Wd(c),u=ha("tick","end");e==null&&(e=[]);function c(){d(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function d(p){var g,b=e.length,v;p===void 0&&(p=1);for(var x=0;x<p;++x)for(n+=(o-n)*i,s.each(function(y){y(n)}),g=0;g<b;++g)v=e[g],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return t}function f(){for(var p=0,g=e.length,b;p<g;++p){if(b=e[p],b.index=p,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var v=TU*Math.sqrt(p),x=p*EU;b.x=v*Math.cos(x),b.y=v*Math.sin(x)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function h(p){return p.initialize&&p.initialize(e),p}return f(),t={tick:d,restart:function(){return l.restart(c),t},stop:function(){return l.stop(),t},nodes:function(p){return arguments.length?(e=p,f(),s.each(h),t):e},alpha:function(p){return arguments.length?(n=+p,t):n},alphaMin:function(p){return arguments.length?(r=+p,t):r},alphaDecay:function(p){return arguments.length?(i=+p,t):+i},alphaTarget:function(p){return arguments.length?(o=+p,t):o},velocityDecay:function(p){return arguments.length?(a=1-p,t):1-a},force:function(p,g){return arguments.length>1?(g==null?s.remove(p):s.set(p,h(g)),t):s.get(p)},find:function(p,g,b){var v=0,x=e.length,y,_,S,$,w;for(b==null?b=1/0:b*=b,v=0;v<x;++v)$=e[v],y=p-$.x,_=g-$.y,S=y*y+_*_,S<b&&(w=$,b=S);return w},on:function(p,g){return arguments.length>1?(u.on(p,g),t):u.on(p)}}}function PU(){var e,t,n,r=Jt(-30),i,o=1,a=1/0,s=.81;function l(f){var h,p=e.length,g=Yd(e,kU,MU).visitAfter(c);for(n=f,h=0;h<p;++h)t=e[h],g.visit(d)}function u(){if(e){var f,h=e.length,p;for(i=new Array(h),f=0;f<h;++f)p=e[f],i[p.index]=+r(p,f,e)}}function c(f){var h=0,p,g,b=0,v,x,y;if(f.length){for(v=x=y=0;y<4;++y)(p=f[y])&&(g=Math.abs(p.value))&&(h+=p.value,b+=g,v+=g*p.x,x+=g*p.y);f.x=v/b,f.y=x/b}else{p=f,p.x=p.data.x,p.y=p.data.y;do h+=i[p.data.index];while(p=p.next)}f.value=h}function d(f,h,p,g){if(!f.value)return!0;var b=f.x-t.x,v=f.y-t.y,x=g-h,y=b*b+v*v;if(x*x/s<y)return y<a&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)),t.vx+=b*f.value*n/y,t.vy+=v*f.value*n/y),!0;if(f.length||y>=a)return;(f.data!==t||f.next)&&(b===0&&(b=Ni(),y+=b*b),v===0&&(v=Ni(),y+=v*v),y<o&&(y=Math.sqrt(o*y)));do f.data!==t&&(x=i[f.data.index]*n/y,t.vx+=b*x,t.vy+=v*x);while(f=f.next)}return l.initialize=function(f){e=f,u()},l.strength=function(f){return arguments.length?(r=typeof f=="function"?f:Jt(+f),u(),l):r},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l}function RU(e,t,n){var r,i=Jt(.1),o,a;typeof e!="function"&&(e=Jt(+e)),t==null&&(t=0),n==null&&(n=0);function s(u){for(var c=0,d=r.length;c<d;++c){var f=r[c],h=f.x-t||1e-6,p=f.y-n||1e-6,g=Math.sqrt(h*h+p*p),b=(a[c]-g)*o[c]*u/g;f.vx+=h*b,f.vy+=p*b}}function l(){if(r){var u,c=r.length;for(o=new Array(c),a=new Array(c),u=0;u<c;++u)a[u]=+e(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,l()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Jt(+u),l(),s):i},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Jt(+u),l(),s):e},s.x=function(u){return arguments.length?(t=+u,s):t},s.y=function(u){return arguments.length?(n=+u,s):n},s}function zU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(i[l]-c.x)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function FU(e){var t=Jt(.1),n,r,i;typeof e!="function"&&(e=Jt(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(i[l]-c.y)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Jt(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Jt(+s),a(),o):e},o}function IU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Cf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ss(e){return e=Cf(Math.abs(e)),e?e[1]:NaN}function BU(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function OU(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var NU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tu(e){if(!(t=NU.exec(e)))throw new Error("invalid format: "+e);var t;return new Xd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}tu.prototype=Xd.prototype;function Xd(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Xd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function LU(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var n3;function DU(e,t){var n=Cf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(n3=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Cf(e,Math.max(0,t+o-1))[0]}function n_(e,t){var n=Cf(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const r_={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:IU,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return n_(e*100,t)},r:n_,s:DU,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function i_(e){return e}var o_=Array.prototype.map,a_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function r3(e){var t=e.grouping===void 0||e.thousands===void 0?i_:BU(o_.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?i_:OU(o_.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=tu(d);var f=d.fill,h=d.align,p=d.sign,g=d.symbol,b=d.zero,v=d.width,x=d.comma,y=d.precision,_=d.trim,S=d.type;S==="n"?(x=!0,S="g"):r_[S]||(y===void 0&&(y=12),_=!0,S="g"),(b||f==="0"&&h==="=")&&(b=!0,f="0",h="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",w=g==="$"?r:/[%p]/.test(S)?a:"",T=r_[S],M=/[defgprs%]/.test(S);y=y===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function P(R){var C=$,E=w,F,z,j;if(S==="c")E=T(R)+E,R="";else{R=+R;var Z=R<0||1/R<0;if(R=isNaN(R)?l:T(Math.abs(R),y),_&&(R=LU(R)),Z&&+R==0&&p!=="+"&&(Z=!1),C=(Z?p==="("?p:s:p==="-"||p==="("?"":p)+C,E=(S==="s"?a_[8+n3/3]:"")+E+(Z&&p==="("?")":""),M){for(F=-1,z=R.length;++F<z;)if(j=R.charCodeAt(F),48>j||j>57){E=(j===46?i+R.slice(F+1):R.slice(F))+E,R=R.slice(0,F);break}}}x&&!b&&(R=t(R,1/0));var J=C.length+R.length+E.length,ie=J<v?new Array(v-J+1).join(f):"";switch(x&&b&&(R=t(ie+R,ie.length?v-E.length:1/0),ie=""),h){case"<":R=C+R+E+ie;break;case"=":R=C+ie+R+E;break;case"^":R=ie.slice(0,J=ie.length>>1)+C+R+E+ie.slice(J);break;default:R=ie+C+R+E;break}return o(R)}return P.toString=function(){return d+""},P}function c(d,f){var h=u((d=tu(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(ss(f)/3)))*3,g=Math.pow(10,-p),b=a_[8+p/3];return function(v){return h(g*v)+b}}return{format:u,formatPrefix:c}}var dc,Kd,Kv;i3({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function i3(e){return dc=r3(e),Kd=dc.format,Kv=dc.formatPrefix,dc}function o3(e){return Math.max(0,-ss(Math.abs(e)))}function a3(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ss(t)/3)))*3-ss(Math.abs(e)))}function s3(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ss(t)-ss(e))+1}function po(){return new Sf}function Sf(){this.reset()}Sf.prototype={constructor:Sf,reset:function(){this.s=this.t=0},add:function(e){s_(hc,e,this.t),s_(this,hc.s,this.s),this.s?this.t+=hc.t:this.s=hc.t},valueOf:function(){return this.s}};var hc=new Sf;function s_(e,t,n){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}var Qe=1e-6,$f=1e-12,ct=Math.PI,jt=ct/2,kf=ct/4,zn=ct*2,Et=180/ct,Ze=ct/180,bt=Math.abs,xs=Math.atan,Fn=Math.atan2,je=Math.cos,pc=Math.ceil,l3=Math.exp,Mf=Math.log,Sp=Math.pow,Ie=Math.sin,ur=Math.sign||function(e){return e>0?1:e<0?-1:0},Kt=Math.sqrt,Zv=Math.tan;function u3(e){return e>1?0:e<-1?ct:Math.acos(e)}function In(e){return e>1?jt:e<-1?-jt:Math.asin(e)}function l_(e){return(e=Ie(e/2))*e}function Nt(){}function Tf(e,t){e&&c_.hasOwnProperty(e.type)&&c_[e.type](e,t)}var u_={Feature:function(e,t){Tf(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Tf(n[r].geometry,t)}},c_={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Z0(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Z0(n[r],t,0)},Polygon:function(e,t){f_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)f_(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Tf(n[r],t)}};function Z0(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function f_(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Z0(e[n],t,1);t.polygonEnd()}function br(e,t){e&&u_.hasOwnProperty(e.type)?u_[e.type](e,t):Tf(e,t)}var Ef=po(),Af=po(),c3,f3,J0,Q0,eg,Xr={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){Ef.reset(),Xr.lineStart=HU,Xr.lineEnd=UU},polygonEnd:function(){var e=+Ef;Af.add(e<0?zn+e:e),this.lineStart=this.lineEnd=this.point=Nt},sphere:function(){Af.add(zn)}};function HU(){Xr.point=jU}function UU(){d3(c3,f3)}function jU(e,t){Xr.point=d3,c3=e,f3=t,e*=Ze,t*=Ze,J0=e,Q0=je(t=t/2+kf),eg=Ie(t)}function d3(e,t){e*=Ze,t*=Ze,t=t/2+kf;var n=e-J0,r=n>=0?1:-1,i=r*n,o=je(t),a=Ie(t),s=eg*a,l=Q0*o+s*je(i),u=s*r*Ie(i);Ef.add(Fn(u,l)),J0=e,Q0=o,eg=a}function WU(e){return Af.reset(),br(e,Xr),Af*2}function Pf(e){return[Fn(e[1],e[0]),In(e[2])]}function Zo(e){var t=e[0],n=e[1],r=je(n);return[r*je(t),r*Ie(t),Ie(n)]}function gc(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ls(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function $p(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function vc(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Rf(e){var t=Kt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ot,Un,Dt,qn,Mo,h3,p3,Ga,Cl=po(),zi,pi,ai={point:tg,lineStart:d_,lineEnd:h_,polygonStart:function(){ai.point=v3,ai.lineStart=VU,ai.lineEnd=qU,Cl.reset(),Xr.polygonStart()},polygonEnd:function(){Xr.polygonEnd(),ai.point=tg,ai.lineStart=d_,ai.lineEnd=h_,Ef<0?(Ot=-(Dt=180),Un=-(qn=90)):Cl>Qe?qn=90:Cl<-1e-6&&(Un=-90),pi[0]=Ot,pi[1]=Dt},sphere:function(){Ot=-(Dt=180),Un=-(qn=90)}};function tg(e,t){zi.push(pi=[Ot=e,Dt=e]),t<Un&&(Un=t),t>qn&&(qn=t)}function g3(e,t){var n=Zo([e*Ze,t*Ze]);if(Ga){var r=ls(Ga,n),i=[r[1],-r[0],0],o=ls(i,r);Rf(o),o=Pf(o);var a=e-Mo,s=a>0?1:-1,l=o[0]*Et*s,u,c=bt(a)>180;c^(s*Mo<l&&l<s*e)?(u=o[1]*Et,u>qn&&(qn=u)):(l=(l+360)%360-180,c^(s*Mo<l&&l<s*e)?(u=-o[1]*Et,u<Un&&(Un=u)):(t<Un&&(Un=t),t>qn&&(qn=t))),c?e<Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e):Dt>=Ot?(e<Ot&&(Ot=e),e>Dt&&(Dt=e)):e>Mo?Vn(Ot,e)>Vn(Ot,Dt)&&(Dt=e):Vn(e,Dt)>Vn(Ot,Dt)&&(Ot=e)}else zi.push(pi=[Ot=e,Dt=e]);t<Un&&(Un=t),t>qn&&(qn=t),Ga=n,Mo=e}function d_(){ai.point=g3}function h_(){pi[0]=Ot,pi[1]=Dt,ai.point=tg,Ga=null}function v3(e,t){if(Ga){var n=e-Mo;Cl.add(bt(n)>180?n+(n>0?360:-360):n)}else h3=e,p3=t;Xr.point(e,t),g3(e,t)}function VU(){Xr.lineStart()}function qU(){v3(h3,p3),Xr.lineEnd(),bt(Cl)>Qe&&(Ot=-(Dt=180)),pi[0]=Ot,pi[1]=Dt,Ga=null}function Vn(e,t){return(t-=e)<0?t+360:t}function GU(e,t){return e[0]-t[0]}function p_(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function YU(e){var t,n,r,i,o,a,s;if(qn=Dt=-(Ot=Un=1/0),zi=[],br(e,ai),n=zi.length){for(zi.sort(GU),t=1,r=zi[0],o=[r];t<n;++t)i=zi[t],p_(r,i[0])||p_(r,i[1])?(Vn(r[0],i[1])>Vn(r[0],r[1])&&(r[1]=i[1]),Vn(i[0],r[1])>Vn(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,t=0,r=o[n];t<=n;r=i,++t)i=o[t],(s=Vn(r[1],i[0]))>a&&(a=s,Ot=i[0],Dt=r[1])}return zi=pi=null,Ot===1/0||Un===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ot,Un],[Dt,qn]]}var Zs,zf,Ff,If,Bf,Of,Nf,Lf,ng,rg,ig,b3,m3,Mn,Tn,En,yr={sphere:Nt,point:Jv,lineStart:g_,lineEnd:v_,polygonStart:function(){yr.lineStart=ZU,yr.lineEnd=JU},polygonEnd:function(){yr.lineStart=g_,yr.lineEnd=v_}};function Jv(e,t){e*=Ze,t*=Ze;var n=je(t);Su(n*je(e),n*Ie(e),Ie(t))}function Su(e,t,n){++Zs,Ff+=(e-Ff)/Zs,If+=(t-If)/Zs,Bf+=(n-Bf)/Zs}function g_(){yr.point=XU}function XU(e,t){e*=Ze,t*=Ze;var n=je(t);Mn=n*je(e),Tn=n*Ie(e),En=Ie(t),yr.point=KU,Su(Mn,Tn,En)}function KU(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Ie(e),o=Ie(t),a=Fn(Kt((a=Tn*o-En*i)*a+(a=En*r-Mn*o)*a+(a=Mn*i-Tn*r)*a),Mn*r+Tn*i+En*o);zf+=a,Of+=a*(Mn+(Mn=r)),Nf+=a*(Tn+(Tn=i)),Lf+=a*(En+(En=o)),Su(Mn,Tn,En)}function v_(){yr.point=Jv}function ZU(){yr.point=QU}function JU(){y3(b3,m3),yr.point=Jv}function QU(e,t){b3=e,m3=t,e*=Ze,t*=Ze,yr.point=y3;var n=je(t);Mn=n*je(e),Tn=n*Ie(e),En=Ie(t),Su(Mn,Tn,En)}function y3(e,t){e*=Ze,t*=Ze;var n=je(t),r=n*je(e),i=n*Ie(e),o=Ie(t),a=Tn*o-En*i,s=En*r-Mn*o,l=Mn*i-Tn*r,u=Kt(a*a+s*s+l*l),c=In(u),d=u&&-c/u;ng+=d*a,rg+=d*s,ig+=d*l,zf+=c,Of+=c*(Mn+(Mn=r)),Nf+=c*(Tn+(Tn=i)),Lf+=c*(En+(En=o)),Su(Mn,Tn,En)}function ej(e){Zs=zf=Ff=If=Bf=Of=Nf=Lf=ng=rg=ig=0,br(e,yr);var t=ng,n=rg,r=ig,i=t*t+n*n+r*r;return i<$f&&(t=Of,n=Nf,r=Lf,zf<Qe&&(t=Ff,n=If,r=Bf),i=t*t+n*n+r*r,i<$f)?[NaN,NaN]:[Fn(n,t)*Et,In(r/Kt(i))*Et]}function Aa(e){return function(){return e}}function og(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function ag(e,t){return[bt(e)>ct?e+Math.round(-e/zn)*zn:e,t]}ag.invert=ag;function Qv(e,t,n){return(e%=zn)?t||n?og(m_(e),y_(t,n)):m_(e):t||n?y_(t,n):ag}function b_(e){return function(t,n){return t+=e,[t>ct?t-zn:t<-ct?t+zn:t,n]}}function m_(e){var t=b_(e);return t.invert=b_(-e),t}function y_(e,t){var n=je(e),r=Ie(e),i=je(t),o=Ie(t);function a(s,l){var u=je(l),c=je(s)*u,d=Ie(s)*u,f=Ie(l),h=f*n+c*r;return[Fn(d*i-h*o,c*n-f*r),In(h*i+d*o)]}return a.invert=function(s,l){var u=je(l),c=je(s)*u,d=Ie(s)*u,f=Ie(l),h=f*i-d*o;return[Fn(d*i+f*o,c*n+h*r),In(h*n-c*r)]},a}function _3(e){e=Qv(e[0]*Ze,e[1]*Ze,e.length>2?e[2]*Ze:0);function t(n){return n=e(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n}return t.invert=function(n){return n=e.invert(n[0]*Ze,n[1]*Ze),n[0]*=Et,n[1]*=Et,n},t}function x3(e,t,n,r,i,o){if(n){var a=je(t),s=Ie(t),l=r*n;i==null?(i=t+r*zn,o=t-l/2):(i=__(a,i),o=__(a,o),(r>0?i<o:i>o)&&(i+=r*zn));for(var u,c=i;r>0?c>o:c<o;c-=l)u=Pf([a,-s*je(c),-s*Ie(c)]),e.point(u[0],u[1])}}function __(e,t){t=Zo(t),t[0]-=e,Rf(t);var n=u3(-t[1]);return((-t[2]<0?-n:n)+zn-Qe)%zn}function tj(){var e=Aa([0,0]),t=Aa(90),n=Aa(6),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=Et,l[1]*=Et}function s(){var l=e.apply(this,arguments),u=t.apply(this,arguments)*Ze,c=n.apply(this,arguments)*Ze;return r=[],i=Qv(-l[0]*Ze,-l[1]*Ze,0).invert,x3(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:Aa([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Aa(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:Aa(+l),s):n},s}function w3(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Nt,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Dc(e,t){return bt(e[0]-t[0])<Qe&&bt(e[1]-t[1])<Qe}function bc(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function C3(e,t,n,r,i){var o=[],a=[],s,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,b=p[0],v=p[g],x;if(Dc(b,v)){if(!b[2]&&!v[2]){for(i.lineStart(),s=0;s<g;++s)i.point((b=p[s])[0],b[1]);i.lineEnd();return}v[0]+=2*Qe}o.push(x=new bc(b,p,null,!0)),a.push(x.o=new bc(b,null,x,!1)),o.push(x=new bc(v,p,null,!1)),a.push(x.o=new bc(v,null,x,!0))}}),!!o.length){for(a.sort(t),x_(o),x_(a),s=0,l=a.length;s<l;++s)a[s].e=n=!n;for(var u=o[0],c,d;;){for(var f=u,h=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(s=0,l=c.length;s<l;++s)i.point((d=c[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h)for(c=f.p.z,s=c.length-1;s>=0;--s)i.point((d=c[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,h=!h}while(!f.v);i.lineEnd()}}}function x_(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}var kp=po();function Mp(e){return bt(e[0])<=ct?e[0]:ur(e[0])*((bt(e[0])+ct)%zn-ct)}function S3(e,t){var n=Mp(t),r=t[1],i=Ie(r),o=[Ie(n),-je(n),0],a=0,s=0;kp.reset(),i===1?r=jt+Qe:i===-1&&(r=-jt-Qe);for(var l=0,u=e.length;l<u;++l)if(d=(c=e[l]).length)for(var c,d,f=c[d-1],h=Mp(f),p=f[1]/2+kf,g=Ie(p),b=je(p),v=0;v<d;++v,h=y,g=S,b=$,f=x){var x=c[v],y=Mp(x),_=x[1]/2+kf,S=Ie(_),$=je(_),w=y-h,T=w>=0?1:-1,M=T*w,P=M>ct,R=g*S;if(kp.add(Fn(R*T*Ie(M),b*$+R*je(M))),a+=P?w+T*zn:w,P^h>=n^y>=n){var C=ls(Zo(f),Zo(x));Rf(C);var E=ls(o,C);Rf(E);var F=(P^w>=0?-1:1)*In(E[2]);(r>F||r===F&&(C[0]||C[1]))&&(s+=P^w>=0?1:-1)}}return(a<-1e-6||a<Qe&&kp<-1e-6)^s&1}function $3(e,t,n,r){return function(i){var o=t(i),a=w3(),s=t(a),l=!1,u,c,d,f={point:h,lineStart:g,lineEnd:b,polygonStart:function(){f.point=v,f.lineStart=x,f.lineEnd=y,c=[],u=[]},polygonEnd:function(){f.point=h,f.lineStart=g,f.lineEnd=b,c=Tv(c);var _=S3(u,r);c.length?(l||(i.polygonStart(),l=!0),C3(c,rj,_,n,i)):_&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(_,S){e(_,S)&&i.point(_,S)}function p(_,S){o.point(_,S)}function g(){f.point=p,o.lineStart()}function b(){f.point=h,o.lineEnd()}function v(_,S){d.push([_,S]),s.point(_,S)}function x(){s.lineStart(),d=[]}function y(){v(d[0][0],d[0][1]),s.lineEnd();var _=s.clean(),S=a.result(),$,w=S.length,T,M,P;if(d.pop(),u.push(d),d=null,!!w){if(_&1){if(M=S[0],(T=M.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),$=0;$<T;++$)i.point((P=M[$])[0],P[1]);i.lineEnd()}return}w>1&&_&2&&S.push(S.pop().concat(S.shift())),c.push(S.filter(nj))}}return f}}function nj(e){return e.length>1}function rj(e,t){return((e=e.x)[0]<0?e[1]-jt-Qe:jt-e[1])-((t=t.x)[0]<0?t[1]-jt-Qe:jt-t[1])}const sg=$3(function(){return!0},ij,aj,[-ct,-jt]);function ij(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?ct:-ct,l=bt(o-t);bt(l-ct)<Qe?(e.point(t,n=(n+a)/2>0?jt:-jt),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),i=0):r!==s&&l>=ct&&(bt(t-r)<Qe&&(t-=r*Qe),bt(o-s)<Qe&&(o-=s*Qe),n=oj(t,n,o,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=o,n=a),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function oj(e,t,n,r){var i,o,a=Ie(e-n);return bt(a)>Qe?xs((Ie(t)*(o=je(r))*Ie(n)-Ie(r)*(i=je(t))*Ie(e))/(i*o*a)):(t+r)/2}function aj(e,t,n,r){var i;if(e==null)i=n*jt,r.point(-ct,i),r.point(0,i),r.point(ct,i),r.point(ct,0),r.point(ct,-i),r.point(0,-i),r.point(-ct,-i),r.point(-ct,0),r.point(-ct,i);else if(bt(e[0]-t[0])>Qe){var o=e[0]<t[0]?ct:-ct;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function k3(e){var t=je(e),n=6*Ze,r=t>0,i=bt(t)>Qe;function o(c,d,f,h){x3(h,e,n,f,c,d)}function a(c,d){return je(c)*je(d)>t}function s(c){var d,f,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(b,v){var x=[b,v],y,_=a(b,v),S=r?_?0:u(b,v):_?u(b+(b<0?ct:-ct),v):0;if(!d&&(p=h=_)&&c.lineStart(),_!==h&&(y=l(d,x),(!y||Dc(d,y)||Dc(x,y))&&(x[2]=1)),_!==h)g=0,_?(c.lineStart(),y=l(x,d),c.point(y[0],y[1])):(y=l(d,x),c.point(y[0],y[1],2),c.lineEnd()),d=y;else if(i&&d&&r^_){var $;!(S&f)&&($=l(x,d,!0))&&(g=0,r?(c.lineStart(),c.point($[0][0],$[0][1]),c.point($[1][0],$[1][1]),c.lineEnd()):(c.point($[1][0],$[1][1]),c.lineEnd(),c.lineStart(),c.point($[0][0],$[0][1],3)))}_&&(!d||!Dc(d,x))&&c.point(x[0],x[1]),d=x,h=_,f=S},lineEnd:function(){h&&c.lineEnd(),d=null},clean:function(){return g|(p&&h)<<1}}}function l(c,d,f){var h=Zo(c),p=Zo(d),g=[1,0,0],b=ls(h,p),v=gc(b,b),x=b[0],y=v-x*x;if(!y)return!f&&c;var _=t*v/y,S=-t*x/y,$=ls(g,b),w=vc(g,_),T=vc(b,S);$p(w,T);var M=$,P=gc(w,M),R=gc(M,M),C=P*P-R*(gc(w,w)-1);if(!(C<0)){var E=Kt(C),F=vc(M,(-P-E)/R);if($p(F,w),F=Pf(F),!f)return F;var z=c[0],j=d[0],Z=c[1],J=d[1],ie;j<z&&(ie=z,z=j,j=ie);var he=j-z,_e=bt(he-ct)<Qe,oe=_e||he<Qe;if(!_e&&J<Z&&(ie=Z,Z=J,J=ie),oe?_e?Z+J>0^F[1]<(bt(F[0]-z)<Qe?Z:J):Z<=F[1]&&F[1]<=J:he>ct^(z<=F[0]&&F[0]<=j)){var ve=vc(M,(-P+E)/R);return $p(ve,w),[F,Pf(ve)]}}}function u(c,d){var f=r?e:ct-e,h=0;return c<-f?h|=1:c>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return $3(a,s,o,r?[0,-e]:[-ct,e-ct])}function sj(e,t,n,r,i,o){var a=e[0],s=e[1],l=t[0],u=t[1],c=0,d=1,f=l-a,h=u-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<c)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>c&&(c=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>c&&(c=p)}else if(f>0){if(p<c)return;p<d&&(d=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<c)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>c&&(c=p)}if(p=o-s,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>c&&(c=p)}else if(h>0){if(p<c)return;p<d&&(d=p)}return c>0&&(e[0]=a+c*f,e[1]=s+c*h),d<1&&(t[0]=a+d*f,t[1]=s+d*h),!0}}}}}var mc=1e9,yc=-1e9;function Zd(e,t,n,r){function i(u,c){return e<=u&&u<=n&&t<=c&&c<=r}function o(u,c,d,f){var h=0,p=0;if(u==null||(h=a(u,d))!==(p=a(c,d))||l(u,c)<0^d>0)do f.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+d+4)%4)!==p);else f.point(c[0],c[1])}function a(u,c){return bt(u[0]-e)<Qe?c>0?0:3:bt(u[0]-n)<Qe?c>0?2:1:bt(u[1]-t)<Qe?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var d=a(u,1),f=a(c,1);return d!==f?d-f:d===0?c[1]-u[1]:d===1?u[0]-c[0]:d===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,d=w3(),f,h,p,g,b,v,x,y,_,S,$,w={point:T,lineStart:C,lineEnd:E,polygonStart:P,polygonEnd:R};function T(z,j){i(z,j)&&c.point(z,j)}function M(){for(var z=0,j=0,Z=h.length;j<Z;++j)for(var J=h[j],ie=1,he=J.length,_e=J[0],oe,ve,we=_e[0],Oe=_e[1];ie<he;++ie)oe=we,ve=Oe,_e=J[ie],we=_e[0],Oe=_e[1],ve<=r?Oe>r&&(we-oe)*(r-ve)>(Oe-ve)*(e-oe)&&++z:Oe<=r&&(we-oe)*(r-ve)<(Oe-ve)*(e-oe)&&--z;return z}function P(){c=d,f=[],h=[],$=!0}function R(){var z=M(),j=$&&z,Z=(f=Tv(f)).length;(j||Z)&&(u.polygonStart(),j&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),Z&&C3(f,s,z,o,u),u.polygonEnd()),c=u,f=h=p=null}function C(){w.point=F,h&&h.push(p=[]),S=!0,_=!1,x=y=NaN}function E(){f&&(F(g,b),v&&_&&d.rejoin(),f.push(d.result())),w.point=T,_&&c.lineEnd()}function F(z,j){var Z=i(z,j);if(h&&p.push([z,j]),S)g=z,b=j,v=Z,S=!1,Z&&(c.lineStart(),c.point(z,j));else if(Z&&_)c.point(z,j);else{var J=[x=Math.max(yc,Math.min(mc,x)),y=Math.max(yc,Math.min(mc,y))],ie=[z=Math.max(yc,Math.min(mc,z)),j=Math.max(yc,Math.min(mc,j))];sj(J,ie,e,t,n,r)?(_||(c.lineStart(),c.point(J[0],J[1])),c.point(ie[0],ie[1]),Z||c.lineEnd(),$=!1):Z&&(c.lineStart(),c.point(z,j),$=!1)}x=z,y=j,_=Z}return w}}function lj(){var e=0,t=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Zd(e,t,n,r)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[e,t],[n,r]]}}}var lg=po(),ug,Hc,Uc,us={sphere:Nt,point:Nt,lineStart:uj,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt};function uj(){us.point=fj,us.lineEnd=cj}function cj(){us.point=us.lineEnd=Nt}function fj(e,t){e*=Ze,t*=Ze,ug=e,Hc=Ie(t),Uc=je(t),us.point=dj}function dj(e,t){e*=Ze,t*=Ze;var n=Ie(t),r=je(t),i=bt(e-ug),o=je(i),a=Ie(i),s=r*a,l=Uc*n-Hc*r*o,u=Hc*n+Uc*r*o;lg.add(Fn(Kt(s*s+l*l),u)),ug=e,Hc=n,Uc=r}function M3(e){return lg.reset(),br(e,us),+lg}var cg=[null,null],hj={type:"LineString",coordinates:cg};function Df(e,t){return cg[0]=e,cg[1]=t,M3(hj)}var w_={Feature:function(e,t){return Hf(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Hf(n[r].geometry,t))return!0;return!1}},C_={Sphere:function(){return!0},Point:function(e,t){return S_(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(S_(n[r],t))return!0;return!1},LineString:function(e,t){return $_(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if($_(n[r],t))return!0;return!1},Polygon:function(e,t){return k_(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(k_(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Hf(n[r],t))return!0;return!1}};function Hf(e,t){return e&&C_.hasOwnProperty(e.type)?C_[e.type](e,t):!1}function S_(e,t){return Df(e,t)===0}function $_(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(r=Df(e[o],t),r===0||o>0&&(i=Df(e[o],e[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<$f*i))return!0;n=r}return!1}function k_(e,t){return!!S3(e.map(pj),T3(t))}function pj(e){return e=e.map(T3),e.pop(),e}function T3(e){return[e[0]*Ze,e[1]*Ze]}function gj(e,t){return(e&&w_.hasOwnProperty(e.type)?w_[e.type]:Hf)(e,t)}function M_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function T_(e,t,n){var r=Jn(e,t-Qe,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function E3(){var e,t,n,r,i,o,a,s,l=10,u=l,c=90,d=360,f,h,p,g,b=2.5;function v(){return{type:"MultiLineString",coordinates:x()}}function x(){return Jn(pc(r/c)*c,n,c).map(p).concat(Jn(pc(s/d)*d,a,d).map(g)).concat(Jn(pc(t/l)*l,e,l).filter(function(y){return bt(y%c)>Qe}).map(f)).concat(Jn(pc(o/u)*u,i,u).filter(function(y){return bt(y%d)>Qe}).map(h))}return v.lines=function(){return x().map(function(y){return{type:"LineString",coordinates:y}})},v.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},v.extent=function(y){return arguments.length?v.extentMajor(y).extentMinor(y):v.extentMinor()},v.extentMajor=function(y){return arguments.length?(r=+y[0][0],n=+y[1][0],s=+y[0][1],a=+y[1][1],r>n&&(y=r,r=n,n=y),s>a&&(y=s,s=a,a=y),v.precision(b)):[[r,s],[n,a]]},v.extentMinor=function(y){return arguments.length?(t=+y[0][0],e=+y[1][0],o=+y[0][1],i=+y[1][1],t>e&&(y=t,t=e,e=y),o>i&&(y=o,o=i,i=y),v.precision(b)):[[t,o],[e,i]]},v.step=function(y){return arguments.length?v.stepMajor(y).stepMinor(y):v.stepMinor()},v.stepMajor=function(y){return arguments.length?(c=+y[0],d=+y[1],v):[c,d]},v.stepMinor=function(y){return arguments.length?(l=+y[0],u=+y[1],v):[l,u]},v.precision=function(y){return arguments.length?(b=+y,f=M_(o,i,90),h=T_(t,e,b),p=M_(s,a,90),g=T_(r,n,b),v):b},v.extentMajor([[-180,-90+Qe],[180,90-Qe]]).extentMinor([[-180,-80-Qe],[180,80+Qe]])}function vj(){return E3()()}function bj(e,t){var n=e[0]*Ze,r=e[1]*Ze,i=t[0]*Ze,o=t[1]*Ze,a=je(r),s=Ie(r),l=je(o),u=Ie(o),c=a*je(n),d=a*Ie(n),f=l*je(i),h=l*Ie(i),p=2*In(Kt(l_(o-r)+a*l*l_(i-n))),g=Ie(p),b=p?function(v){var x=Ie(v*=p)/g,y=Ie(p-v)/g,_=y*c+x*f,S=y*d+x*h,$=y*s+x*u;return[Fn(S,_)*Et,Fn($,Kt(_*_+S*S))*Et]}:function(){return[n*Et,r*Et]};return b.distance=p,b}function nu(e){return e}var Tp=po(),fg=po(),A3,P3,dg,hg,li={point:Nt,lineStart:Nt,lineEnd:Nt,polygonStart:function(){li.lineStart=mj,li.lineEnd=_j},polygonEnd:function(){li.lineStart=li.lineEnd=li.point=Nt,Tp.add(bt(fg)),fg.reset()},result:function(){var e=Tp/2;return Tp.reset(),e}};function mj(){li.point=yj}function yj(e,t){li.point=R3,A3=dg=e,P3=hg=t}function R3(e,t){fg.add(hg*e-dg*t),dg=e,hg=t}function _j(){R3(A3,P3)}var cs=1/0,Uf=cs,ru=-cs,jf=ru,Wf={point:xj,lineStart:Nt,lineEnd:Nt,polygonStart:Nt,polygonEnd:Nt,result:function(){var e=[[cs,Uf],[ru,jf]];return ru=jf=-(Uf=cs=1/0),e}};function xj(e,t){e<cs&&(cs=e),e>ru&&(ru=e),t<Uf&&(Uf=t),t>jf&&(jf=t)}var pg=0,gg=0,Js=0,Vf=0,qf=0,Fa=0,vg=0,bg=0,Qs=0,z3,F3,Br,Or,ar={point:Jo,lineStart:E_,lineEnd:A_,polygonStart:function(){ar.lineStart=Sj,ar.lineEnd=$j},polygonEnd:function(){ar.point=Jo,ar.lineStart=E_,ar.lineEnd=A_},result:function(){var e=Qs?[vg/Qs,bg/Qs]:Fa?[Vf/Fa,qf/Fa]:Js?[pg/Js,gg/Js]:[NaN,NaN];return pg=gg=Js=Vf=qf=Fa=vg=bg=Qs=0,e}};function Jo(e,t){pg+=e,gg+=t,++Js}function E_(){ar.point=wj}function wj(e,t){ar.point=Cj,Jo(Br=e,Or=t)}function Cj(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);Vf+=i*(Br+e)/2,qf+=i*(Or+t)/2,Fa+=i,Jo(Br=e,Or=t)}function A_(){ar.point=Jo}function Sj(){ar.point=kj}function $j(){I3(z3,F3)}function kj(e,t){ar.point=I3,Jo(z3=Br=e,F3=Or=t)}function I3(e,t){var n=e-Br,r=t-Or,i=Kt(n*n+r*r);Vf+=i*(Br+e)/2,qf+=i*(Or+t)/2,Fa+=i,i=Or*e-Br*t,vg+=i*(Br+e),bg+=i*(Or+t),Qs+=i*3,Jo(Br=e,Or=t)}function B3(e){this._context=e}B3.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,zn);break}}},result:Nt};var mg=po(),Ep,O3,N3,el,tl,iu={point:Nt,lineStart:function(){iu.point=Mj},lineEnd:function(){Ep&&L3(O3,N3),iu.point=Nt},polygonStart:function(){Ep=!0},polygonEnd:function(){Ep=null},result:function(){var e=+mg;return mg.reset(),e}};function Mj(e,t){iu.point=L3,O3=el=e,N3=tl=t}function L3(e,t){el-=e,tl-=t,mg.add(Kt(el*el+tl*tl)),el=e,tl=t}function D3(){this._string=[]}D3.prototype={_radius:4.5,_circle:P_(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=P_(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function P_(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Tj(e,t){var n=4.5,r,i;function o(a){return a&&(typeof n=="function"&&i.pointRadius(+n.apply(this,arguments)),br(a,r(i))),i.result()}return o.area=function(a){return br(a,r(li)),li.result()},o.measure=function(a){return br(a,r(iu)),iu.result()},o.bounds=function(a){return br(a,r(Wf)),Wf.result()},o.centroid=function(a){return br(a,r(ar)),ar.result()},o.projection=function(a){return arguments.length?(r=a==null?(e=null,nu):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new D3):new B3(t=a),typeof n!="function"&&i.pointRadius(n),o):t},o.pointRadius=function(a){return arguments.length?(n=typeof a=="function"?a:(i.pointRadius(+a),+a),o):n},o.projection(e).context(t)}function Ej(e){return{stream:$u(e)}}function $u(e){return function(t){var n=new yg;for(var r in e)n[r]=e[r];return n.stream=t,n}}function yg(){}yg.prototype={constructor:yg,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function eb(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),br(n,e.stream(Wf)),t(Wf.result()),r!=null&&e.clipExtent(r),e}function Jd(e,t,n){return eb(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,l])},n)}function tb(e,t,n){return Jd(e,[[0,0],t],n)}function nb(e,t,n){return eb(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];e.scale(150*o).translate([a,s])},n)}function rb(e,t,n){return eb(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])},n)}var R_=16,Aj=je(30*Ze);function z_(e,t){return+t?Rj(e,t):Pj(e)}function Pj(e){return $u({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Rj(e,t){function n(r,i,o,a,s,l,u,c,d,f,h,p,g,b){var v=u-r,x=c-i,y=v*v+x*x;if(y>4*t&&g--){var _=a+f,S=s+h,$=l+p,w=Kt(_*_+S*S+$*$),T=In($/=w),M=bt(bt($)-1)<Qe||bt(o-d)<Qe?(o+d)/2:Fn(S,_),P=e(M,T),R=P[0],C=P[1],E=R-r,F=C-i,z=x*E-v*F;(z*z/y>t||bt((v*E+x*F)/y-.5)>.3||a*f+s*h+l*p<Aj)&&(n(r,i,o,a,s,l,R,C,M,_/=w,S/=w,$,g,b),b.point(R,C),n(R,C,M,_,S,$,u,c,d,f,h,p,g,b))}}return function(r){var i,o,a,s,l,u,c,d,f,h,p,g,b={point:v,lineStart:x,lineEnd:_,polygonStart:function(){r.polygonStart(),b.lineStart=S},polygonEnd:function(){r.polygonEnd(),b.lineStart=x}};function v(T,M){T=e(T,M),r.point(T[0],T[1])}function x(){d=NaN,b.point=y,r.lineStart()}function y(T,M){var P=Zo([T,M]),R=e(T,M);n(d,f,c,h,p,g,d=R[0],f=R[1],c=T,h=P[0],p=P[1],g=P[2],R_,r),r.point(d,f)}function _(){b.point=v,r.lineEnd()}function S(){x(),b.point=$,b.lineEnd=w}function $(T,M){y(i=T,M),o=d,a=f,s=h,l=p,u=g,b.point=y}function w(){n(d,f,c,h,p,g,o,a,i,s,l,u,R_,r),b.lineEnd=_,_()}return b}}var zj=$u({point:function(e,t){this.stream.point(e*Ze,t*Ze)}});function Fj(e){return $u({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Ij(e,t,n,r,i){function o(a,s){return a*=r,s*=i,[t+e*a,n-e*s]}return o.invert=function(a,s){return[(a-t)/e*r,(n-s)/e*i]},o}function F_(e,t,n,r,i,o){var a=je(o),s=Ie(o),l=a*e,u=s*e,c=a/e,d=s/e,f=(s*n-a*t)/e,h=(s*t+a*n)/e;function p(g,b){return g*=r,b*=i,[l*g-u*b+t,n-u*g-l*b]}return p.invert=function(g,b){return[r*(c*g-d*b+f),i*(h-d*g-c*b)]},p}function Jr(e){return ib(function(){return e})()}function ib(e){var t,n=150,r=480,i=250,o=0,a=0,s=0,l=0,u=0,c,d=0,f=1,h=1,p=null,g=sg,b=null,v,x,y,_=nu,S=.5,$,w,T,M,P;function R(z){return T(z[0]*Ze,z[1]*Ze)}function C(z){return z=T.invert(z[0],z[1]),z&&[z[0]*Et,z[1]*Et]}R.stream=function(z){return M&&P===z?M:M=zj(Fj(c)(g($(_(P=z)))))},R.preclip=function(z){return arguments.length?(g=z,p=void 0,F()):g},R.postclip=function(z){return arguments.length?(_=z,b=v=x=y=null,F()):_},R.clipAngle=function(z){return arguments.length?(g=+z?k3(p=z*Ze):(p=null,sg),F()):p*Et},R.clipExtent=function(z){return arguments.length?(_=z==null?(b=v=x=y=null,nu):Zd(b=+z[0][0],v=+z[0][1],x=+z[1][0],y=+z[1][1]),F()):b==null?null:[[b,v],[x,y]]},R.scale=function(z){return arguments.length?(n=+z,E()):n},R.translate=function(z){return arguments.length?(r=+z[0],i=+z[1],E()):[r,i]},R.center=function(z){return arguments.length?(o=z[0]%360*Ze,a=z[1]%360*Ze,E()):[o*Et,a*Et]},R.rotate=function(z){return arguments.length?(s=z[0]%360*Ze,l=z[1]%360*Ze,u=z.length>2?z[2]%360*Ze:0,E()):[s*Et,l*Et,u*Et]},R.angle=function(z){return arguments.length?(d=z%360*Ze,E()):d*Et},R.reflectX=function(z){return arguments.length?(f=z?-1:1,E()):f<0},R.reflectY=function(z){return arguments.length?(h=z?-1:1,E()):h<0},R.precision=function(z){return arguments.length?($=z_(w,S=z*z),F()):Kt(S)},R.fitExtent=function(z,j){return Jd(R,z,j)},R.fitSize=function(z,j){return tb(R,z,j)},R.fitWidth=function(z,j){return nb(R,z,j)},R.fitHeight=function(z,j){return rb(R,z,j)};function E(){var z=F_(n,0,0,f,h,d).apply(null,t(o,a)),j=(d?F_:Ij)(n,r-z[0],i-z[1],f,h,d);return c=Qv(s,l,u),w=og(t,j),T=og(c,w),$=z_(w,S),F()}function F(){return M=P=null,R}return function(){return t=e.apply(this,arguments),R.invert=t.invert&&C,E()}}function ob(e){var t=0,n=ct/3,r=ib(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*Ze,n=o[1]*Ze):[t*Et,n*Et]},i}function Bj(e){var t=je(e);function n(r,i){return[r*t,Ie(i)/t]}return n.invert=function(r,i){return[r/t,In(i*t)]},n}function H3(e,t){var n=Ie(e),r=(n+Ie(t))/2;if(bt(r)<Qe)return Bj(e);var i=1+n*(2*r-n),o=Kt(i)/r;function a(s,l){var u=Kt(i-2*r*Ie(l))/r;return[u*Ie(s*=r),o-u*je(s)]}return a.invert=function(s,l){var u=o-l,c=Fn(s,bt(u))*ur(u);return u*r<0&&(c-=ct*ur(s)*ur(u)),[c/r,In((i-(s*s+u*u)*r*r)/(2*r))]},a}function Gf(){return ob(H3).scale(155.424).center([0,33.6442])}function U3(){return Gf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Oj(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function Nj(){var e,t,n=U3(),r,i=Gf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Gf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,u={point:function(f,h){l=[f,h]}};function c(f){var h=f[0],p=f[1];return l=null,r.point(h,p),l||(o.point(h,p),l)||(s.point(h,p),l)}c.invert=function(f){var h=n.scale(),p=n.translate(),g=(f[0]-p[0])/h,b=(f[1]-p[1])/h;return(b>=.12&&b<.234&&g>=-.425&&g<-.214?i:b>=.166&&b<.234&&g>=-.214&&g<-.115?a:n).invert(f)},c.stream=function(f){return e&&t===f?e:e=Oj([n.stream(t=f),i.stream(f),a.stream(f)])},c.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),d()):n.precision()},c.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),c.translate(n.translate())):n.scale()},c.translate=function(f){if(!arguments.length)return n.translate();var h=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(u),o=i.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+Qe,g+.12*h+Qe],[p-.214*h-Qe,g+.234*h-Qe]]).stream(u),s=a.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+Qe,g+.166*h+Qe],[p-.115*h-Qe,g+.234*h-Qe]]).stream(u),d()},c.fitExtent=function(f,h){return Jd(c,f,h)},c.fitSize=function(f,h){return tb(c,f,h)},c.fitWidth=function(f,h){return nb(c,f,h)},c.fitHeight=function(f,h){return rb(c,f,h)};function d(){return e=t=null,c}return c.scale(1070)}function j3(e){return function(t,n){var r=je(t),i=je(n),o=e(r*i);return[o*i*Ie(t),o*Ie(n)]}}function ku(e){return function(t,n){var r=Kt(t*t+n*n),i=e(r),o=Ie(i),a=je(i);return[Fn(t*o,r*a),In(r&&n*o/r)]}}var ab=j3(function(e){return Kt(2/(1+e))});ab.invert=ku(function(e){return 2*In(e/2)});function Lj(){return Jr(ab).scale(124.75).clipAngle(180-.001)}var sb=j3(function(e){return(e=u3(e))&&e/Ie(e)});sb.invert=ku(function(e){return e});function Dj(){return Jr(sb).scale(79.4188).clipAngle(180-.001)}function Mu(e,t){return[e,Mf(Zv((jt+t)/2))]}Mu.invert=function(e,t){return[e,2*xs(l3(t))-jt]};function Hj(){return W3(Mu).scale(961/zn)}function W3(e){var t=Jr(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,u;t.scale=function(d){return arguments.length?(r(d),c()):r()},t.translate=function(d){return arguments.length?(i(d),c()):i()},t.center=function(d){return arguments.length?(n(d),c()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=s=l=u=null:(a=+d[0][0],s=+d[0][1],l=+d[1][0],u=+d[1][1]),c()):a==null?null:[[a,s],[l,u]]};function c(){var d=ct*r(),f=t(_3(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===Mu?[[Math.max(f[0]-d,a),s],[Math.min(f[0]+d,l),u]]:[[a,Math.max(f[1]-d,s)],[l,Math.min(f[1]+d,u)]])}return c()}function _c(e){return Zv((jt+e)/2)}function V3(e,t){var n=je(e),r=e===t?Ie(e):Mf(n/je(t))/Mf(_c(t)/_c(e)),i=n*Sp(_c(e),r)/r;if(!r)return Mu;function o(a,s){i>0?s<-jt+Qe&&(s=-jt+Qe):s>jt-Qe&&(s=jt-Qe);var l=i/Sp(_c(s),r);return[l*Ie(r*a),i-l*je(r*a)]}return o.invert=function(a,s){var l=i-s,u=ur(r)*Kt(a*a+l*l),c=Fn(a,bt(l))*ur(l);return l*r<0&&(c-=ct*ur(a)*ur(l)),[c/r,2*xs(Sp(i/u,1/r))-jt]},o}function Uj(){return ob(V3).scale(109.5).parallels([30,30])}function ou(e,t){return[e,t]}ou.invert=ou;function jj(){return Jr(ou).scale(152.63)}function q3(e,t){var n=je(e),r=e===t?Ie(e):(n-je(t))/(t-e),i=n/r+e;if(bt(r)<Qe)return ou;function o(a,s){var l=i-s,u=r*a;return[l*Ie(u),i-l*je(u)]}return o.invert=function(a,s){var l=i-s,u=Fn(a,bt(l))*ur(l);return l*r<0&&(u-=ct*ur(a)*ur(l)),[u/r,i-ur(r)*Kt(a*a+l*l)]},o}function Wj(){return ob(q3).scale(131.154).center([0,13.9389])}var Sl=1.340264,$l=-.081106,kl=893e-6,Ml=.003796,Yf=Kt(3)/2,Vj=12;function lb(e,t){var n=In(Yf*Ie(t)),r=n*n,i=r*r*r;return[e*je(n)/(Yf*(Sl+3*$l*r+i*(7*kl+9*Ml*r))),n*(Sl+$l*r+i*(kl+Ml*r))]}lb.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,a,s,l;o<Vj&&(s=n*(Sl+$l*r+i*(kl+Ml*r))-t,l=Sl+3*$l*r+i*(7*kl+9*Ml*r),n-=a=s/l,r=n*n,i=r*r*r,!(bt(a)<$f));++o);return[Yf*e*(Sl+3*$l*r+i*(7*kl+9*Ml*r))/je(n),In(Ie(n)/Yf)]};function qj(){return Jr(lb).scale(177.158)}function ub(e,t){var n=je(t),r=je(e)*n;return[n*Ie(e)/r,Ie(t)/r]}ub.invert=ku(xs);function Gj(){return Jr(ub).scale(144.049).clipAngle(60)}function Yj(){var e=1,t=0,n=0,r=1,i=1,o=0,a,s,l=null,u,c,d,f=1,h=1,p=$u({point:function(_,S){var $=y([_,S]);this.stream.point($[0],$[1])}}),g=nu,b,v;function x(){return f=e*r,h=e*i,b=v=null,y}function y(_){var S=_[0]*f,$=_[1]*h;if(o){var w=$*a-S*s;S=S*a+$*s,$=w}return[S+t,$+n]}return y.invert=function(_){var S=_[0]-t,$=_[1]-n;if(o){var w=$*a+S*s;S=S*a-$*s,$=w}return[S/f,$/h]},y.stream=function(_){return b&&v===_?b:b=p(g(v=_))},y.postclip=function(_){return arguments.length?(g=_,l=u=c=d=null,x()):g},y.clipExtent=function(_){return arguments.length?(g=_==null?(l=u=c=d=null,nu):Zd(l=+_[0][0],u=+_[0][1],c=+_[1][0],d=+_[1][1]),x()):l==null?null:[[l,u],[c,d]]},y.scale=function(_){return arguments.length?(e=+_,x()):e},y.translate=function(_){return arguments.length?(t=+_[0],n=+_[1],x()):[t,n]},y.angle=function(_){return arguments.length?(o=_%360*Ze,s=Ie(o),a=je(o),x()):o*Et},y.reflectX=function(_){return arguments.length?(r=_?-1:1,x()):r<0},y.reflectY=function(_){return arguments.length?(i=_?-1:1,x()):i<0},y.fitExtent=function(_,S){return Jd(y,_,S)},y.fitSize=function(_,S){return tb(y,_,S)},y.fitWidth=function(_,S){return nb(y,_,S)},y.fitHeight=function(_,S){return rb(y,_,S)},y}function cb(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}cb.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(bt(i)>Qe&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function Xj(){return Jr(cb).scale(175.295)}function fb(e,t){return[je(t)*Ie(e),Ie(t)]}fb.invert=ku(In);function Kj(){return Jr(fb).scale(249.5).clipAngle(90+Qe)}function db(e,t){var n=je(t),r=1+je(e)*n;return[n*Ie(e)/r,Ie(t)/r]}db.invert=ku(function(e){return 2*xs(e)});function Zj(){return Jr(db).scale(250).clipAngle(142)}function hb(e,t){return[Mf(Zv((jt+t)/2)),-e]}hb.invert=function(e,t){return[-t,2*xs(l3(e))-jt]};function Jj(){var e=W3(hb),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function Qj(e,t){return e.parent===t.parent?1:2}function eW(e){return e.reduce(tW,0)/e.length}function tW(e,t){return e+t.x}function nW(e){return 1+e.reduce(rW,0)}function rW(e,t){return Math.max(e,t.y)}function iW(e){for(var t;t=e.children;)e=t[0];return e}function oW(e){for(var t;t=e.children;)e=t[t.length-1];return e}function aW(){var e=Qj,t=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var h=f.children;h?(f.x=eW(h),f.y=nW(h)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=iW(o),u=oW(o),c=l.x-e(l,u)/2,d=u.x+e(u,l)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-c)/(d-c)*t,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function sW(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function lW(){return this.eachAfter(sW)}function uW(e){var t=this,n,r=[t],i,o,a;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);while(r.length);return this}function cW(e){for(var t=this,n=[t],r,i;t=n.pop();)if(e(t),r=t.children,r)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function fW(e){for(var t=this,n=[t],r=[],i,o,a;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this}function dW(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function hW(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function pW(e){for(var t=this,n=gW(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function gW(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function vW(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function bW(){var e=[];return this.each(function(t){e.push(t)}),e}function mW(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function yW(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function pb(e,t){var n=new fs(e),r=+e.value&&(n.value=e.value),i,o=[n],a,s,l,u;for(t==null&&(t=xW);i=o.pop();)if(r&&(i.value=+i.data.value),(s=t(i.data))&&(u=s.length))for(i.children=new Array(u),l=u-1;l>=0;--l)o.push(a=i.children[l]=new fs(s[l])),a.parent=i,a.depth=i.depth+1;return n.eachBefore(G3)}function _W(){return pb(this).eachBefore(wW)}function xW(e){return e.children}function wW(e){e.data=e.data.data}function G3(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function fs(e){this.data=e,this.depth=this.height=0,this.parent=null}fs.prototype=pb.prototype={constructor:fs,count:lW,each:uW,eachAfter:fW,eachBefore:cW,sum:dW,sort:hW,path:pW,ancestors:vW,descendants:bW,leaves:mW,links:yW,copy:_W};var CW=Array.prototype.slice;function SW(e){for(var t=e.length,n,r;t;)r=Math.random()*t--|0,n=e[t],e[t]=e[r],e[r]=n;return e}function Y3(e){for(var t=0,n=(e=SW(CW.call(e))).length,r=[],i,o;t<n;)i=e[t],o&&X3(o,i)?++t:(o=kW(r=$W(r,i)),t=0);return o}function $W(e,t){var n,r;if(Ap(t,e))return[t];for(n=0;n<e.length;++n)if(xc(t,e[n])&&Ap(nl(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(xc(nl(e[n],e[r]),t)&&xc(nl(e[n],t),e[r])&&xc(nl(e[r],t),e[n])&&Ap(K3(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function xc(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function X3(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Ap(e,t){for(var n=0;n<t.length;++n)if(!X3(e,t[n]))return!1;return!0}function kW(e){switch(e.length){case 1:return MW(e[0]);case 2:return nl(e[0],e[1]);case 3:return K3(e[0],e[1],e[2])}}function MW(e){return{x:e.x,y:e.y,r:e.r}}function nl(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-n,u=a-r,c=s-i,d=Math.sqrt(l*l+u*u);return{x:(n+o+l/d*c)/2,y:(r+a+u/d*c)/2,r:(d+i+s)/2}}function K3(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,u=n.x,c=n.y,d=n.r,f=r-a,h=r-u,p=i-s,g=i-c,b=l-o,v=d-o,x=r*r+i*i-o*o,y=x-a*a-s*s+l*l,_=x-u*u-c*c+d*d,S=h*p-f*g,$=(p*_-g*y)/(S*2)-r,w=(g*b-p*v)/S,T=(h*y-f*_)/(S*2)-i,M=(f*v-h*b)/S,P=w*w+M*M-1,R=2*(o+$*w+T*M),C=$*$+T*T-o*o,E=-(P?(R+Math.sqrt(R*R-4*P*C))/(2*P):C/R);return{x:r+$+w*E,y:i+T+M*E,r:E}}function I_(e,t,n){var r=e.x-t.x,i,o,a=e.y-t.y,s,l,u=r*r+a*a;u?(o=t.r+n.r,o*=o,l=e.r+n.r,l*=l,o>l?(i=(u+l-o)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),n.x=e.x-i*r-s*a,n.y=e.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=t.x+i*r-s*a,n.y=t.y+i*a+s*r)):(n.x=t.x+n.r,n.y=t.y)}function B_(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function O_(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function wc(e){this._=e,this.next=null,this.previous=null}function Z3(e){if(!(i=e.length))return 0;var t,n,r,i,o,a,s,l,u,c,d;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;I_(n,t,r=e[2]),t=new wc(t),n=new wc(n),r=new wc(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s<i;++s){I_(t._,n._,r=e[s]),r=new wc(r),l=n.next,u=t.previous,c=n._.r,d=t._.r;do if(c<=d){if(B_(l._,r._)){n=l,t.next=n,n.previous=t,--s;continue e}c+=l._.r,l=l.next}else{if(B_(u._,r._)){t=u,t.next=n,n.previous=t,--s;continue e}d+=u._.r,u=u.previous}while(l!==u.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=O_(t);(r=r.next)!==n;)(a=O_(r))<o&&(t=r,o=a);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=Y3(t),s=0;s<i;++s)t=e[s],t.x-=r.x,t.y-=r.y;return r.r}function TW(e){return Z3(e),e}function EW(e){return e==null?null:Xf(e)}function Xf(e){if(typeof e!="function")throw new Error;return e}function Po(){return 0}function Ra(e){return function(){return e}}function AW(e){return Math.sqrt(e.value)}function PW(){var e=null,t=1,n=1,r=Po;function i(o){return o.x=t/2,o.y=n/2,e?o.eachBefore(N_(e)).eachAfter(Pp(r,.5)).eachBefore(L_(1)):o.eachBefore(N_(AW)).eachAfter(Pp(Po,1)).eachAfter(Pp(r,o.r/Math.min(t,n))).eachBefore(L_(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=EW(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Ra(+o),i):r},i}function N_(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Pp(e,t){return function(n){if(r=n.children){var r,i,o=r.length,a=e(n)*t||0,s;if(a)for(i=0;i<o;++i)r[i].r+=a;if(s=Z3(r),a)for(i=0;i<o;++i)r[i].r-=a;n.r=s+a}}}function L_(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function J3(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Tu(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function RW(){var e=1,t=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),r&&a.eachBefore(J3),a}function o(a,s){return function(l){l.children&&Tu(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var u=l.x0,c=l.y0,d=l.x1-n,f=l.y1-n;d<u&&(u=d=(u+d)/2),f<c&&(c=f=(c+f)/2),l.x0=u,l.y0=c,l.x1=d,l.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var D_="$",zW={depth:-1},H_={};function FW(e){return e.id}function IW(e){return e.parentId}function BW(){var e=FW,t=IW;function n(r){var i,o,a=r.length,s,l,u,c=new Array(a),d,f,h={};for(o=0;o<a;++o)i=r[o],u=c[o]=new fs(i),(d=e(i,o,r))!=null&&(d+="")&&(f=D_+(u.id=d),h[f]=f in h?H_:u);for(o=0;o<a;++o)if(u=c[o],d=t(r[o],o,r),d==null||!(d+="")){if(s)throw new Error("multiple roots");s=u}else{if(l=h[D_+d],!l)throw new Error("missing: "+d);if(l===H_)throw new Error("ambiguous: "+d);l.children?l.children.push(u):l.children=[u],u.parent=l}if(!s)throw new Error("no root");if(s.parent=zW,s.eachBefore(function(p){p.depth=p.parent.depth+1,--a}).eachBefore(G3),s.parent=null,a>0)throw new Error("cycle");return s}return n.id=function(r){return arguments.length?(e=Xf(r),n):e},n.parentId=function(r){return arguments.length?(t=Xf(r),n):t},n}function OW(e,t){return e.parent===t.parent?1:2}function Rp(e){var t=e.children;return t?t[0]:e.t}function zp(e){var t=e.children;return t?t[t.length-1]:e.t}function NW(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function LW(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function DW(e,t,n){return e.a.parent===t.parent?e.a:n}function jc(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}jc.prototype=Object.create(fs.prototype);function HW(e){for(var t=new jc(e,0),n,r=[t],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new jc(o[a],a)),i.parent=n;return(t.parent=new jc(null,0)).children=[t],t}function UW(){var e=OW,t=1,n=1,r=null;function i(u){var c=HW(u);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)u.eachBefore(l);else{var d=u,f=u,h=u;u.eachBefore(function(x){x.x<d.x&&(d=x),x.x>f.x&&(f=x),x.depth>h.depth&&(h=x)});var p=d===f?1:e(d,f)/2,g=p-d.x,b=t/(f.x+p+g),v=n/(h.depth||1);u.eachBefore(function(x){x.x=(x.x+g)*b,x.y=x.depth*v})}return u}function o(u){var c=u.children,d=u.parent.children,f=u.i?d[u.i-1]:null;if(c){LW(u);var h=(c[0].z+c[c.length-1].z)/2;f?(u.z=f.z+e(u._,f._),u.m=u.z-h):u.z=h}else f&&(u.z=f.z+e(u._,f._));u.parent.A=s(u,f,u.parent.A||d[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,d){if(c){for(var f=u,h=u,p=c,g=f.parent.children[0],b=f.m,v=h.m,x=p.m,y=g.m,_;p=zp(p),f=Rp(f),p&&f;)g=Rp(g),h=zp(h),h.a=u,_=p.z+x-f.z-b+e(p._,f._),_>0&&(NW(DW(p,u,d),u,_),b+=_,v+=_),x+=p.m,b+=f.m,y+=g.m,v+=h.m;p&&!zp(h)&&(h.t=p,h.m+=x-v),f&&!Rp(g)&&(g.t=f,g.m+=b-y,d=u)}return d}function l(u){u.x*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}function Qd(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var Q3=(1+Math.sqrt(5))/2;function eC(e,t,n,r,i,o){for(var a=[],s=t.children,l,u,c=0,d=0,f=s.length,h,p,g=t.value,b,v,x,y,_,S,$;c<f;){h=i-n,p=o-r;do b=s[d++].value;while(!b&&d<f);for(v=x=b,S=Math.max(p/h,h/p)/(g*e),$=b*b*S,_=Math.max(x/$,$/v);d<f;++d){if(b+=u=s[d].value,u<v&&(v=u),u>x&&(x=u),$=b*b*S,y=Math.max(x/$,$/v),y>_){b-=u;break}_=y}a.push(l={value:b,dice:h<p,children:s.slice(c,d)}),l.dice?Tu(l,n,r,i,g?r+=p*b/g:o):Qd(l,n,r,g?n+=h*b/g:i,o),g-=b,c=d}return a}const tC=function e(t){function n(r,i,o,a,s){eC(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Q3);function jW(){var e=tC,t=!1,n=1,r=1,i=[0],o=Po,a=Po,s=Po,l=Po,u=Po;function c(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(d),i=[0],t&&f.eachBefore(J3),f}function d(f){var h=i[f.depth],p=f.x0+h,g=f.y0+h,b=f.x1-h,v=f.y1-h;b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),f.x0=p,f.y0=g,f.x1=b,f.y1=v,f.children&&(h=i[f.depth+1]=o(f)/2,p+=u(f)-h,g+=a(f)-h,b-=s(f)-h,v-=l(f)-h,b<p&&(p=b=(p+b)/2),v<g&&(g=v=(g+v)/2),e(f,p,g,b,v))}return c.round=function(f){return arguments.length?(t=!!f,c):t},c.size=function(f){return arguments.length?(n=+f[0],r=+f[1],c):[n,r]},c.tile=function(f){return arguments.length?(e=Xf(f),c):e},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Ra(+f),c):o},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Ra(+f),c):a},c.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Ra(+f),c):s},c.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Ra(+f),c):l},c.paddingLeft=function(f){return arguments.length?(u=typeof f=="function"?f:Ra(+f),c):u},c}function WW(e,t,n,r,i){var o=e.children,a,s=o.length,l,u=new Array(s+1);for(u[0]=l=a=0;a<s;++a)u[a+1]=l+=o[a].value;c(0,s,e.value,t,n,r,i);function c(d,f,h,p,g,b,v){if(d>=f-1){var x=o[d];x.x0=p,x.y0=g,x.x1=b,x.y1=v;return}for(var y=u[d],_=h/2+y,S=d+1,$=f-1;S<$;){var w=S+$>>>1;u[w]<_?S=w+1:$=w}_-u[S-1]<u[S]-_&&d+1<S&&--S;var T=u[S]-y,M=h-T;if(b-p>v-g){var P=(p*M+b*T)/h;c(d,S,T,p,g,P,v),c(S,f,M,P,g,b,v)}else{var R=(g*M+v*T)/h;c(d,S,T,p,g,b,R),c(S,f,M,p,R,b,v)}}}function VW(e,t,n,r,i){(e.depth&1?Qd:Tu)(e,t,n,r,i)}const qW=function e(t){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===t)for(var l,u,c,d,f=-1,h,p=l.length,g=r.value;++f<p;){for(u=l[f],c=u.children,d=u.value=0,h=c.length;d<h;++d)u.value+=c[d].value;u.dice?Tu(u,i,o,a,o+=(s-o)*u.value/g):Qd(u,i,o,i+=(a-i)*u.value/g,s),g-=u.value}else r._squarify=l=eC(t,r,i,o,a,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Q3);function GW(e){for(var t=-1,n=e.length,r,i=e[n-1],o=0;++t<n;)r=i,i=e[t],o+=r[1]*i[0]-r[0]*i[1];return o/2}function YW(e){for(var t=-1,n=e.length,r=0,i=0,o,a=e[n-1],s,l=0;++t<n;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[r/l,i/l]}function XW(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function KW(e,t){return e[0]-t[0]||e[1]-t[1]}function U_(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;++i){for(;r>1&&XW(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function ZW(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(KW),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=U_(r),a=U_(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(t=o.length-1;t>=0;--t)u.push(e[r[o[t]][2]]);for(t=+s;t<a.length-l;++t)u.push(e[r[a[t]][2]]);return u}function JW(e,t){for(var n=e.length,r=e[n-1],i=t[0],o=t[1],a=r[0],s=r[1],l,u,c=!1,d=0;d<n;++d)r=e[d],l=r[0],u=r[1],u>o!=s>o&&i<(a-l)*(o-u)/(s-u)+l&&(c=!c),a=l,s=u;return c}function QW(e){for(var t=-1,n=e.length,r=e[n-1],i,o,a=r[0],s=r[1],l=0;++t<n;)i=a,o=s,r=e[t],a=r[0],s=r[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}function ws(){return Math.random()}const eV=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return t()*i+r}}return n.source=e,n}(ws),nC=function e(t){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=e,n}(ws),tV=function e(t){function n(){var r=nC.source(t).apply(this,arguments);return function(){return Math.exp(r())}}return n.source=e,n}(ws),rC=function e(t){function n(r){return function(){for(var i=0,o=0;o<r;++o)i+=t();return i}}return n.source=e,n}(ws),nV=function e(t){function n(r){var i=rC.source(t)(r);return function(){return i()/r}}return n.source=e,n}(ws),rV=function e(t){function n(r){return function(){return-Math.log(1-t())/r}}return n.source=e,n}(ws);function Tr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function wi(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e);break}return this}var iC=Array.prototype,Kf=iC.map,Qo=iC.slice,_g={name:"implicit"};function gb(){var e=hi(),t=[],n=[],r=_g;function i(o){var a=o+"",s=e.get(a);if(!s){if(r!==_g)return r;e.set(a,s=t.push(o))}return n[(s-1)%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=hi();for(var a=-1,s=o.length,l,u;++a<s;)e.has(u=(l=o[a])+"")||e.set(u,t.push(l));return i},i.range=function(o){return arguments.length?(n=Qo.call(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return gb(t,n).unknown(r)},Tr.apply(i,arguments),i}function vb(){var e=gb().unknown(void 0),t=e.domain,n=e.range,r=[0,1],i,o,a=!1,s=0,l=0,u=.5;delete e.unknown;function c(){var d=t().length,f=r[1]<r[0],h=r[f-0],p=r[1-f];i=(p-h)/Math.max(1,d-s+l*2),a&&(i=Math.floor(i)),h+=(p-h-i*(d-s))*u,o=i*(1-s),a&&(h=Math.round(h),o=Math.round(o));var g=Jn(d).map(function(b){return h+i*b});return n(f?g.reverse():g)}return e.domain=function(d){return arguments.length?(t(d),c()):t()},e.range=function(d){return arguments.length?(r=[+d[0],+d[1]],c()):r.slice()},e.rangeRound=function(d){return r=[+d[0],+d[1]],a=!0,c()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(a=!!d,c()):a},e.padding=function(d){return arguments.length?(s=Math.min(1,l=+d),c()):s},e.paddingInner=function(d){return arguments.length?(s=Math.min(1,d),c()):s},e.paddingOuter=function(d){return arguments.length?(l=+d,c()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),c()):u},e.copy=function(){return vb(t(),r).round(a).paddingInner(s).paddingOuter(l).align(u)},Tr.apply(c(),arguments)}function oC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return oC(t())},e}function iV(){return oC(vb.apply(null,arguments).paddingInner(1))}function oV(e){return function(){return e}}function xg(e){return+e}var j_=[0,1];function cn(e){return e}function wg(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:oV(isNaN(t)?NaN:.5)}function W_(e){var t=e[0],n=e[e.length-1],r;return t>n&&(r=t,t=n,n=r),function(i){return Math.max(t,Math.min(n,i))}}function aV(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=wg(i,r),o=n(a,o)):(r=wg(r,i),o=n(o,a)),function(s){return o(r(s))}}function sV(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=wg(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=Ji(e,s,1,r)-1;return o[l](i[l](s))}}function Eu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function eh(){var e=j_,t=j_,n=ys,r,i,o,a=cn,s,l,u;function c(){return s=Math.min(e.length,t.length)>2?sV:aV,l=u=null,d}function d(f){return isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((u||(u=s(t,e.map(r),or)))(f)))},d.domain=function(f){return arguments.length?(e=Kf.call(f,xg),a===cn||(a=W_(e)),c()):e.slice()},d.range=function(f){return arguments.length?(t=Qo.call(f),c()):t.slice()},d.rangeRound=function(f){return t=Qo.call(f),n=T8,c()},d.clamp=function(f){return arguments.length?(a=f?W_(e):cn,d):a!==cn},d.interpolate=function(f){return arguments.length?(n=f,c()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,h){return r=f,i=h,c()}}function aC(e,t){return eh()(e,t)}function sC(e,t,n,r){var i=Go(e,t,n),o;switch(r=tu(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=a3(i,a))&&(r.precision=o),Kv(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=s3(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=o3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Kd(r)}function ba(e){var t=e.domain;return e.ticks=function(n){var r=t();return kv(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return sC(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=wl(a,s,n),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=wl(a,s,n)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=wl(a,s,n)),l>0?(r[i]=Math.floor(a/l)*l,r[o]=Math.ceil(s/l)*l,t(r)):l<0&&(r[i]=Math.ceil(a*l)/l,r[o]=Math.floor(s*l)/l,t(r)),e},e}function au(){var e=aC(cn,cn);return e.copy=function(){return Eu(e,au())},Tr.apply(e,arguments),ba(e)}function lC(e){var t;function n(r){return isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Kf.call(r,xg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return lC(e).unknown(t)},e=arguments.length?Kf.call(e,xg):[0,1],ba(n)}function uC(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function V_(e){return Math.log(e)}function q_(e){return Math.exp(e)}function lV(e){return-Math.log(-e)}function uV(e){return-Math.exp(-e)}function cV(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fV(e){return e===10?cV:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function dV(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function G_(e){return function(t){return-e(-t)}}function bb(e){var t=e(V_,q_),n=t.domain,r=10,i,o;function a(){return i=dV(r),o=fV(r),n()[0]<0?(i=G_(i),o=G_(o),e(lV,uV)):e(V_,q_),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=function(s){var l=n(),u=l[0],c=l[l.length-1],d;(d=c<u)&&(f=u,u=c,c=f);var f=i(u),h=i(c),p,g,b,v=s==null?10:+s,x=[];if(!(r%1)&&h-f<v){if(f=Math.round(f)-1,h=Math.round(h)+1,u>0){for(;f<h;++f)for(g=1,p=o(f);g<r;++g)if(b=p*g,!(b<u)){if(b>c)break;x.push(b)}}else for(;f<h;++f)for(g=r-1,p=o(f);g>=1;--g)if(b=p*g,!(b<u)){if(b>c)break;x.push(b)}}else x=kv(f,h,Math.min(h-f,v)).map(o);return d?x.reverse():x},t.tickFormat=function(s,l){if(l==null&&(l=r===10?".0e":","),typeof l!="function"&&(l=Kd(l)),s===1/0)return l;s==null&&(s=10);var u=Math.max(1,r*s/t.ticks().length);return function(c){var d=c/o(Math.round(i(c)));return d*r<r-.5&&(d*=r),d<=u?l(c):""}},t.nice=function(){return n(uC(n(),{floor:function(s){return o(Math.floor(i(s)))},ceil:function(s){return o(Math.ceil(i(s)))}}))},t}function cC(){var e=bb(eh()).domain([1,10]);return e.copy=function(){return Eu(e,cC()).base(e.base())},Tr.apply(e,arguments),e}function Y_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function X_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function mb(e){var t=1,n=e(Y_(t),X_(t));return n.constant=function(r){return arguments.length?e(Y_(t=+r),X_(t)):t},ba(n)}function fC(){var e=mb(eh());return e.copy=function(){return Eu(e,fC()).constant(e.constant())},Tr.apply(e,arguments)}function K_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function hV(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pV(e){return e<0?-e*e:e*e}function yb(e){var t=e(cn,cn),n=1;function r(){return n===1?e(cn,cn):n===.5?e(hV,pV):e(K_(n),K_(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ba(t)}function _b(){var e=yb(eh());return e.copy=function(){return Eu(e,_b()).exponent(e.exponent())},Tr.apply(e,arguments),e}function gV(){return _b.apply(null,arguments).exponent(.5)}function dC(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=Vl(e,a/s);return o}function o(a){return isNaN(a=+a)?r:t[Ji(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(var s=0,l=a.length,u;s<l;++s)u=a[s],u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Sr),i()},o.range=function(a){return arguments.length?(t=Qo.call(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return dC().domain(e).range(t).unknown(r)},Tr.apply(o,arguments)}function hC(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l<=l?i[Ji(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?(e=+l[0],t=+l[1],s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Qo.call(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return hC().domain([e,t]).range(i).unknown(o)},Tr.apply(ba(a),arguments)}function pC(){var e=[.5],t=[0,1],n,r=1;function i(o){return o<=o?t[Ji(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Qo.call(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Qo.call(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return pC().domain(e).range(t).unknown(n)},Tr.apply(i,arguments)}var Fp=new Date,Ip=new Date;function Qt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],u;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(u=new Date(+o)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=function(o){return Qt(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return Fp.setTime(+o),Ip.setTime(+a),e(Fp),e(Ip),Math.floor(n(Fp,Ip))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var ea=Qt(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});ea.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Qt(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):ea};var Z_=ea.range,Zf=1e3,ta=6e4,Jf=36e5,gC=864e5,vC=6048e5,su=Qt(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Zf)},function(e,t){return(t-e)/Zf},function(e){return e.getUTCSeconds()}),J_=su.range,xb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zf)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getMinutes()}),vV=xb.range,wb=Qt(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zf-e.getMinutes()*ta)},function(e,t){e.setTime(+e+t*Jf)},function(e,t){return(t-e)/Jf},function(e){return e.getHours()}),bV=wb.range,Au=Qt(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ta)/gC},function(e){return e.getDate()-1}),mV=Au.range;function ma(e){return Qt(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ta)/vC})}var lu=ma(0),uu=ma(1),bC=ma(2),mC=ma(3),na=ma(4),yC=ma(5),_C=ma(6),Q_=lu.range,yV=uu.range,_V=bC.range,xV=mC.range,wV=na.range,CV=yC.range,SV=_C.range,Cb=Qt(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),$V=Cb.range,gi=Qt(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});gi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};var kV=gi.range,Sb=Qt(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*ta)},function(e,t){return(t-e)/ta},function(e){return e.getUTCMinutes()}),MV=Sb.range,$b=Qt(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Jf)},function(e,t){return(t-e)/Jf},function(e){return e.getUTCHours()}),TV=$b.range,Pu=Qt(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/gC},function(e){return e.getUTCDate()-1}),EV=Pu.range;function ya(e){return Qt(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/vC})}var cu=ya(0),fu=ya(1),xC=ya(2),wC=ya(3),ra=ya(4),CC=ya(5),SC=ya(6),ex=cu.range,AV=fu.range,PV=xC.range,RV=wC.range,zV=ra.range,FV=CC.range,IV=SC.range,kb=Qt(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),BV=kb.range,vi=Qt(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});vi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};var OV=vi.range;function Bp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Op(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Os(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function $C(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ns(i),c=Ls(i),d=Ns(o),f=Ls(o),h=Ns(a),p=Ls(a),g=Ns(s),b=Ls(s),v=Ns(l),x=Ls(l),y={a:Z,A:J,b:ie,B:he,c:null,d:ax,e:ax,f:aq,g:vq,G:mq,H:rq,I:iq,j:oq,L:kC,m:sq,M:lq,p:_e,q:oe,Q:ux,s:cx,S:uq,u:cq,U:fq,V:dq,w:hq,W:pq,x:null,X:null,y:gq,Y:bq,Z:yq,"%":lx},_={a:ve,A:we,b:Oe,B:xe,c:null,d:sx,e:sx,f:Cq,g:zq,G:Iq,H:_q,I:xq,j:wq,L:TC,m:Sq,M:$q,p:Xe,q:Ve,Q:ux,s:cx,S:kq,u:Mq,U:Tq,V:Eq,w:Aq,W:Pq,x:null,X:null,y:Rq,Y:Fq,Z:Bq,"%":lx},S={a:P,A:R,b:C,B:E,c:F,d:ix,e:ix,f:QV,g:rx,G:nx,H:ox,I:ox,j:XV,L:JV,m:YV,M:KV,p:M,q:GV,Q:tq,s:nq,S:ZV,u:UV,U:jV,V:WV,w:HV,W:VV,x:z,X:j,y:rx,Y:nx,Z:qV,"%":eq};y.x=$(n,y),y.X=$(r,y),y.c=$(t,y),_.x=$(n,_),_.X=$(r,_),_.c=$(t,_);function $(fe,Ee){return function(Pe){var A=[],H=-1,Y=0,de=fe.length,le,q,N;for(Pe instanceof Date||(Pe=new Date(+Pe));++H<de;)fe.charCodeAt(H)===37&&(A.push(fe.slice(Y,H)),(q=tx[le=fe.charAt(++H)])!=null?le=fe.charAt(++H):q=le==="e"?" ":"0",(N=Ee[le])&&(le=N(Pe,q)),A.push(le),Y=H+1);return A.push(fe.slice(Y,H)),A.join("")}}function w(fe,Ee){return function(Pe){var A=Os(1900,void 0,1),H=T(A,fe,Pe+="",0),Y,de;if(H!=Pe.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(Ee&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(Y=Op(Os(A.y,0,1)),de=Y.getUTCDay(),Y=de>4||de===0?fu.ceil(Y):fu(Y),Y=Pu.offset(Y,(A.V-1)*7),A.y=Y.getUTCFullYear(),A.m=Y.getUTCMonth(),A.d=Y.getUTCDate()+(A.w+6)%7):(Y=Bp(Os(A.y,0,1)),de=Y.getDay(),Y=de>4||de===0?uu.ceil(Y):uu(Y),Y=Au.offset(Y,(A.V-1)*7),A.y=Y.getFullYear(),A.m=Y.getMonth(),A.d=Y.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),de="Z"in A?Op(Os(A.y,0,1)).getUTCDay():Bp(Os(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(de+5)%7:A.w+A.U*7-(de+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,Op(A)):Bp(A)}}function T(fe,Ee,Pe,A){for(var H=0,Y=Ee.length,de=Pe.length,le,q;H<Y;){if(A>=de)return-1;if(le=Ee.charCodeAt(H++),le===37){if(le=Ee.charAt(H++),q=S[le in tx?Ee.charAt(H++):le],!q||(A=q(fe,Pe,A))<0)return-1}else if(le!=Pe.charCodeAt(A++))return-1}return A}function M(fe,Ee,Pe){var A=u.exec(Ee.slice(Pe));return A?(fe.p=c[A[0].toLowerCase()],Pe+A[0].length):-1}function P(fe,Ee,Pe){var A=h.exec(Ee.slice(Pe));return A?(fe.w=p[A[0].toLowerCase()],Pe+A[0].length):-1}function R(fe,Ee,Pe){var A=d.exec(Ee.slice(Pe));return A?(fe.w=f[A[0].toLowerCase()],Pe+A[0].length):-1}function C(fe,Ee,Pe){var A=v.exec(Ee.slice(Pe));return A?(fe.m=x[A[0].toLowerCase()],Pe+A[0].length):-1}function E(fe,Ee,Pe){var A=g.exec(Ee.slice(Pe));return A?(fe.m=b[A[0].toLowerCase()],Pe+A[0].length):-1}function F(fe,Ee,Pe){return T(fe,t,Ee,Pe)}function z(fe,Ee,Pe){return T(fe,n,Ee,Pe)}function j(fe,Ee,Pe){return T(fe,r,Ee,Pe)}function Z(fe){return a[fe.getDay()]}function J(fe){return o[fe.getDay()]}function ie(fe){return l[fe.getMonth()]}function he(fe){return s[fe.getMonth()]}function _e(fe){return i[+(fe.getHours()>=12)]}function oe(fe){return 1+~~(fe.getMonth()/3)}function ve(fe){return a[fe.getUTCDay()]}function we(fe){return o[fe.getUTCDay()]}function Oe(fe){return l[fe.getUTCMonth()]}function xe(fe){return s[fe.getUTCMonth()]}function Xe(fe){return i[+(fe.getUTCHours()>=12)]}function Ve(fe){return 1+~~(fe.getUTCMonth()/3)}return{format:function(fe){var Ee=$(fe+="",y);return Ee.toString=function(){return fe},Ee},parse:function(fe){var Ee=w(fe+="",!1);return Ee.toString=function(){return fe},Ee},utcFormat:function(fe){var Ee=$(fe+="",_);return Ee.toString=function(){return fe},Ee},utcParse:function(fe){var Ee=w(fe+="",!0);return Ee.toString=function(){return fe},Ee}}}var tx={"-":"",_:" ",0:"0"},on=/^\s*\d+/,NV=/^%/,LV=/[\\^$*+?|[\]().{}]/g;function Ct(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function DV(e){return e.replace(LV,"\\$&")}function Ns(e){return new RegExp("^(?:"+e.map(DV).join("|")+")","i")}function Ls(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function HV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function UV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function jV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function WV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function VV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function nx(e,t,n){var r=on.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rx(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qV(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function GV(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function YV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ix(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function XV(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ox(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function KV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ZV(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function JV(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function QV(e,t,n){var r=on.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function eq(e,t,n){var r=NV.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tq(e,t,n){var r=on.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nq(e,t,n){var r=on.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ax(e,t){return Ct(e.getDate(),t,2)}function rq(e,t){return Ct(e.getHours(),t,2)}function iq(e,t){return Ct(e.getHours()%12||12,t,2)}function oq(e,t){return Ct(1+Au.count(gi(e),e),t,3)}function kC(e,t){return Ct(e.getMilliseconds(),t,3)}function aq(e,t){return kC(e,t)+"000"}function sq(e,t){return Ct(e.getMonth()+1,t,2)}function lq(e,t){return Ct(e.getMinutes(),t,2)}function uq(e,t){return Ct(e.getSeconds(),t,2)}function cq(e){var t=e.getDay();return t===0?7:t}function fq(e,t){return Ct(lu.count(gi(e)-1,e),t,2)}function MC(e){var t=e.getDay();return t>=4||t===0?na(e):na.ceil(e)}function dq(e,t){return e=MC(e),Ct(na.count(gi(e),e)+(gi(e).getDay()===4),t,2)}function hq(e){return e.getDay()}function pq(e,t){return Ct(uu.count(gi(e)-1,e),t,2)}function gq(e,t){return Ct(e.getFullYear()%100,t,2)}function vq(e,t){return e=MC(e),Ct(e.getFullYear()%100,t,2)}function bq(e,t){return Ct(e.getFullYear()%1e4,t,4)}function mq(e,t){var n=e.getDay();return e=n>=4||n===0?na(e):na.ceil(e),Ct(e.getFullYear()%1e4,t,4)}function yq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ct(t/60|0,"0",2)+Ct(t%60,"0",2)}function sx(e,t){return Ct(e.getUTCDate(),t,2)}function _q(e,t){return Ct(e.getUTCHours(),t,2)}function xq(e,t){return Ct(e.getUTCHours()%12||12,t,2)}function wq(e,t){return Ct(1+Pu.count(vi(e),e),t,3)}function TC(e,t){return Ct(e.getUTCMilliseconds(),t,3)}function Cq(e,t){return TC(e,t)+"000"}function Sq(e,t){return Ct(e.getUTCMonth()+1,t,2)}function $q(e,t){return Ct(e.getUTCMinutes(),t,2)}function kq(e,t){return Ct(e.getUTCSeconds(),t,2)}function Mq(e){var t=e.getUTCDay();return t===0?7:t}function Tq(e,t){return Ct(cu.count(vi(e)-1,e),t,2)}function EC(e){var t=e.getUTCDay();return t>=4||t===0?ra(e):ra.ceil(e)}function Eq(e,t){return e=EC(e),Ct(ra.count(vi(e),e)+(vi(e).getUTCDay()===4),t,2)}function Aq(e){return e.getUTCDay()}function Pq(e,t){return Ct(fu.count(vi(e)-1,e),t,2)}function Rq(e,t){return Ct(e.getUTCFullYear()%100,t,2)}function zq(e,t){return e=EC(e),Ct(e.getUTCFullYear()%100,t,2)}function Fq(e,t){return Ct(e.getUTCFullYear()%1e4,t,4)}function Iq(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ra(e):ra.ceil(e),Ct(e.getUTCFullYear()%1e4,t,4)}function Bq(){return"+0000"}function lx(){return"%"}function ux(e){return+e}function cx(e){return Math.floor(+e/1e3)}var Pa,Mb,AC,th,Tb;PC({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function PC(e){return Pa=$C(e),Mb=Pa.format,AC=Pa.parse,th=Pa.utcFormat,Tb=Pa.utcParse,Pa}var RC="%Y-%m-%dT%H:%M:%S.%LZ";function Oq(e){return e.toISOString()}var Nq=Date.prototype.toISOString?Oq:th(RC);function Lq(e){var t=new Date(e);return isNaN(t)?null:t}var Dq=+new Date("2000-01-01T00:00:00.000Z")?Lq:Tb(RC),rl=1e3,il=rl*60,ol=il*60,du=ol*24,Hq=du*7,fx=du*30,Np=du*365;function Uq(e){return new Date(e)}function jq(e){return e instanceof Date?+e:+new Date(+e)}function Eb(e,t,n,r,i,o,a,s,l){var u=aC(cn,cn),c=u.invert,d=u.domain,f=l(".%L"),h=l(":%S"),p=l("%I:%M"),g=l("%I %p"),b=l("%a %d"),v=l("%b %d"),x=l("%B"),y=l("%Y"),_=[[a,1,rl],[a,5,5*rl],[a,15,15*rl],[a,30,30*rl],[o,1,il],[o,5,5*il],[o,15,15*il],[o,30,30*il],[i,1,ol],[i,3,3*ol],[i,6,6*ol],[i,12,12*ol],[r,1,du],[r,2,2*du],[n,1,Hq],[t,1,fx],[t,3,3*fx],[e,1,Np]];function S(w){return(a(w)<w?f:o(w)<w?h:i(w)<w?p:r(w)<w?g:t(w)<w?n(w)<w?b:v:e(w)<w?x:y)(w)}function $(w,T,M,P){if(w==null&&(w=10),typeof w=="number"){var R=Math.abs(M-T)/w,C=$v(function(E){return E[2]}).right(_,R);C===_.length?(P=Go(T/Np,M/Np,w),w=e):C?(C=_[R/_[C-1][2]<_[C][2]/R?C-1:C],P=C[1],w=C[0]):(P=Math.max(Go(T,M,w),1),w=s)}return P==null?w:w.every(P)}return u.invert=function(w){return new Date(c(w))},u.domain=function(w){return arguments.length?d(Kf.call(w,jq)):d().map(Uq)},u.ticks=function(w,T){var M=d(),P=M[0],R=M[M.length-1],C=R<P,E;return C&&(E=P,P=R,R=E),E=$(w,P,R,T),E=E?E.range(P,R+1):[],C?E.reverse():E},u.tickFormat=function(w,T){return T==null?S:l(T)},u.nice=function(w,T){var M=d();return(w=$(w,M[0],M[M.length-1],T))?d(uC(M,w)):u},u.copy=function(){return Eu(u,Eb(e,t,n,r,i,o,a,s,l))},u}function Wq(){return Tr.apply(Eb(gi,Cb,lu,Au,wb,xb,su,ea,Mb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Vq(){return Tr.apply(Eb(vi,kb,cu,Pu,$b,Sb,su,ea,th).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nh(){var e=0,t=1,n,r,i,o,a=cn,s=!1,l;function u(c){return isNaN(c=+c)?l:a(i===0?.5:(c=(o(c)-n)*i,s?Math.max(0,Math.min(1,c)):c))}return u.domain=function(c){return arguments.length?(n=o(e=+c[0]),r=o(t=+c[1]),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(c){return arguments.length?(s=!!c,u):s},u.interpolator=function(c){return arguments.length?(a=c,u):a},u.unknown=function(c){return arguments.length?(l=c,u):l},function(c){return o=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),u}}function go(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zC(){var e=ba(nh()(cn));return e.copy=function(){return go(e,zC())},wi.apply(e,arguments)}function FC(){var e=bb(nh()).domain([1,10]);return e.copy=function(){return go(e,FC()).base(e.base())},wi.apply(e,arguments)}function IC(){var e=mb(nh());return e.copy=function(){return go(e,IC()).constant(e.constant())},wi.apply(e,arguments)}function Ab(){var e=yb(nh());return e.copy=function(){return go(e,Ab()).exponent(e.exponent())},wi.apply(e,arguments)}function qq(){return Ab.apply(null,arguments).exponent(.5)}function BC(){var e=[],t=cn;function n(r){if(!isNaN(r=+r))return t((Ji(e,r)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(var i=0,o=r.length,a;i<o;++i)a=r[i],a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Sr),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return BC(t).domain(e)},wi.apply(n,arguments)}function rh(){var e=0,t=.5,n=1,r,i,o,a,s,l=cn,u,c=!1,d;function f(h){return isNaN(h=+h)?d:(h=.5+((h=+u(h))-i)*(h<i?a:s),l(c?Math.max(0,Math.min(1,h)):h))}return f.domain=function(h){return arguments.length?(r=u(e=+h[0]),i=u(t=+h[1]),o=u(n=+h[2]),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),f):[e,t,n]},f.clamp=function(h){return arguments.length?(c=!!h,f):c},f.interpolator=function(h){return arguments.length?(l=h,f):l},f.unknown=function(h){return arguments.length?(d=h,f):d},function(h){return u=h,r=h(e),i=h(t),o=h(n),a=r===i?0:.5/(i-r),s=i===o?0:.5/(o-i),f}}function OC(){var e=ba(rh()(cn));return e.copy=function(){return go(e,OC())},wi.apply(e,arguments)}function NC(){var e=bb(rh()).domain([.1,1,10]);return e.copy=function(){return go(e,NC()).base(e.base())},wi.apply(e,arguments)}function LC(){var e=mb(rh());return e.copy=function(){return go(e,LC()).constant(e.constant())},wi.apply(e,arguments)}function Pb(){var e=yb(rh());return e.copy=function(){return go(e,Pb()).exponent(e.exponent())},wi.apply(e,arguments)}function Gq(){return Pb.apply(null,arguments).exponent(.5)}function st(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const Yq=st("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Xq=st("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Kq=st("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Zq=st("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Jq=st("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Qq=st("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),eG=st("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),tG=st("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),nG=st("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),rG=st("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function At(e){return C8(e[e.length-1])}var DC=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(st);const iG=At(DC);var HC=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(st);const oG=At(HC);var UC=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(st);const aG=At(UC);var jC=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(st);const sG=At(jC);var WC=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(st);const lG=At(WC);var VC=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(st);const uG=At(VC);var qC=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(st);const cG=At(qC);var GC=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(st);const fG=At(GC);var YC=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(st);const dG=At(YC);var XC=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(st);const hG=At(XC);var KC=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(st);const pG=At(KC);var ZC=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(st);const gG=At(ZC);var JC=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(st);const vG=At(JC);var QC=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(st);const bG=At(QC);var e6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(st);const mG=At(e6);var t6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(st);const yG=At(t6);var n6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(st);const _G=At(n6);var r6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(st);const xG=At(r6);var i6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(st);const wG=At(i6);var o6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(st);const CG=At(o6);var a6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(st);const SG=At(a6);var s6=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(st);const $G=At(s6);var l6=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(st);const kG=At(l6);var u6=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(st);const MG=At(u6);var c6=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(st);const TG=At(c6);var f6=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(st);const EG=At(f6);var d6=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(st);const AG=At(d6);function PG(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const RG=Ud($r(300,.5,0),$r(-240,.5,1));var zG=Ud($r(-100,.75,.35),$r(80,1.5,.8)),FG=Ud($r(260,.75,.35),$r(80,1.5,.8)),Cc=$r();function IG(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Cc.h=360*e-100,Cc.s=1.5-1.5*t,Cc.l=.8-.9*t,Cc+""}var Sc=is(),BG=Math.PI/3,OG=Math.PI*2/3;function NG(e){var t;return e=(.5-e)*Math.PI,Sc.r=255*(t=Math.sin(e))*t,Sc.g=255*(t=Math.sin(e+BG))*t,Sc.b=255*(t=Math.sin(e+OG))*t,Sc+""}function LG(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function ih(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const DG=ih(st("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var HG=ih(st("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),UG=ih(st("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),jG=ih(st("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function dt(e){return function(){return e}}var dx=Math.abs,vn=Math.atan2,$o=Math.cos,WG=Math.max,Lp=Math.min,Rr=Math.sin,Ia=Math.sqrt,bn=1e-12,no=Math.PI,Qf=no/2,Vi=2*no;function VG(e){return e>1?0:e<-1?no:Math.acos(e)}function hx(e){return e>=1?Qf:e<=-1?-Qf:Math.asin(e)}function qG(e){return e.innerRadius}function GG(e){return e.outerRadius}function YG(e){return e.startAngle}function XG(e){return e.endAngle}function KG(e){return e&&e.padAngle}function ZG(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,f=d*l-c*u;if(!(f*f<bn))return f=(c*(t-o)-d*(e-i))/f,[e+f*l,t+f*u]}function $c(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Ia(s*s+l*l),c=u*l,d=-u*s,f=e+c,h=t+d,p=n+c,g=r+d,b=(f+p)/2,v=(h+g)/2,x=p-f,y=g-h,_=x*x+y*y,S=i-o,$=f*g-p*h,w=(y<0?-1:1)*Ia(WG(0,S*S*_-$*$)),T=($*y-x*w)/_,M=(-$*x-y*w)/_,P=($*y+x*w)/_,R=(-$*x+y*w)/_,C=T-b,E=M-v,F=P-b,z=R-v;return C*C+E*E>F*F+z*z&&(T=P,M=R),{cx:T,cy:M,x01:-c,y01:-d,x11:T*(i/S-1),y11:M*(i/S-1)}}function JG(){var e=qG,t=GG,n=dt(0),r=null,i=YG,o=XG,a=KG,s=null;function l(){var u,c,d=+e.apply(this,arguments),f=+t.apply(this,arguments),h=i.apply(this,arguments)-Qf,p=o.apply(this,arguments)-Qf,g=dx(p-h),b=p>h;if(s||(s=u=ho()),f<d&&(c=f,f=d,d=c),!(f>bn))s.moveTo(0,0);else if(g>Vi-bn)s.moveTo(f*$o(h),f*Rr(h)),s.arc(0,0,f,h,p,!b),d>bn&&(s.moveTo(d*$o(p),d*Rr(p)),s.arc(0,0,d,p,h,b));else{var v=h,x=p,y=h,_=p,S=g,$=g,w=a.apply(this,arguments)/2,T=w>bn&&(r?+r.apply(this,arguments):Ia(d*d+f*f)),M=Lp(dx(f-d)/2,+n.apply(this,arguments)),P=M,R=M,C,E;if(T>bn){var F=hx(T/d*Rr(w)),z=hx(T/f*Rr(w));(S-=F*2)>bn?(F*=b?1:-1,y+=F,_-=F):(S=0,y=_=(h+p)/2),($-=z*2)>bn?(z*=b?1:-1,v+=z,x-=z):($=0,v=x=(h+p)/2)}var j=f*$o(v),Z=f*Rr(v),J=d*$o(_),ie=d*Rr(_);if(M>bn){var he=f*$o(x),_e=f*Rr(x),oe=d*$o(y),ve=d*Rr(y),we;if(g<no&&(we=ZG(j,Z,oe,ve,he,_e,J,ie))){var Oe=j-we[0],xe=Z-we[1],Xe=he-we[0],Ve=_e-we[1],fe=1/Rr(VG((Oe*Xe+xe*Ve)/(Ia(Oe*Oe+xe*xe)*Ia(Xe*Xe+Ve*Ve)))/2),Ee=Ia(we[0]*we[0]+we[1]*we[1]);P=Lp(M,(d-Ee)/(fe-1)),R=Lp(M,(f-Ee)/(fe+1))}}$>bn?R>bn?(C=$c(oe,ve,j,Z,f,R,b),E=$c(he,_e,J,ie,f,R,b),s.moveTo(C.cx+C.x01,C.cy+C.y01),R<M?s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,R,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,f,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),!b),s.arc(E.cx,E.cy,R,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):(s.moveTo(j,Z),s.arc(0,0,f,v,x,!b)):s.moveTo(j,Z),!(d>bn)||!(S>bn)?s.lineTo(J,ie):P>bn?(C=$c(J,ie,he,_e,d,-P,b),E=$c(j,Z,oe,ve,d,-P,b),s.lineTo(C.cx+C.x01,C.cy+C.y01),P<M?s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(E.y01,E.x01),!b):(s.arc(C.cx,C.cy,P,vn(C.y01,C.x01),vn(C.y11,C.x11),!b),s.arc(0,0,d,vn(C.cy+C.y11,C.cx+C.x11),vn(E.cy+E.y11,E.cx+E.x11),b),s.arc(E.cx,E.cy,P,vn(E.y11,E.x11),vn(E.y01,E.x01),!b))):s.arc(0,0,d,_,y,b)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-no/2;return[$o(c)*u,Rr(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:dt(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:dt(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:dt(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:dt(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:dt(+u),l):i},l.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:dt(+u),l):o},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:dt(+u),l):a},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function h6(e){this._context=e}h6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function oh(e){return new h6(e)}function Rb(e){return e[0]}function zb(e){return e[1]}function Cs(){var e=Rb,t=zb,n=dt(!0),r=null,i=oh,o=null;function a(s){var l,u=s.length,c,d=!1,f;for(r==null&&(o=i(f=ho())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(c,l,s),+t(c,l,s));if(f)return o=null,f+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:dt(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:dt(+s),a):t},a.defined=function(s){return arguments.length?(n=typeof s=="function"?s:dt(!!s),a):n},a.curve=function(s){return arguments.length?(i=s,r!=null&&(o=i(r)),a):i},a.context=function(s){return arguments.length?(s==null?r=o=null:o=i(r=s),a):r},a}function Fb(){var e=Rb,t=null,n=dt(0),r=zb,i=dt(!0),o=null,a=oh,s=null;function l(c){var d,f,h,p=c.length,g,b=!1,v,x=new Array(p),y=new Array(p);for(o==null&&(s=a(v=ho())),d=0;d<=p;++d){if(!(d<p&&i(g=c[d],d,c))===b)if(b=!b)f=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=d-1;h>=f;--h)s.point(x[h],y[h]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(g,d,c),y[d]=+n(g,d,c),s.point(t?+t(g,d,c):x[d],r?+r(g,d,c):y[d]))}if(v)return s=null,v+""||null}function u(){return Cs().defined(i).curve(a).context(o)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:dt(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:dt(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:dt(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:dt(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:dt(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:dt(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(i=typeof c=="function"?c:dt(!!c),l):i},l.curve=function(c){return arguments.length?(a=c,o!=null&&(s=a(o)),l):a},l.context=function(c){return arguments.length?(c==null?o=s=null:s=a(o=c),l):o},l}function QG(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function eY(e){return e}function tY(){var e=eY,t=QG,n=null,r=dt(0),i=dt(Vi),o=dt(0);function a(s){var l,u=s.length,c,d,f=0,h=new Array(u),p=new Array(u),g=+r.apply(this,arguments),b=Math.min(Vi,Math.max(-Vi,i.apply(this,arguments)-g)),v,x=Math.min(Math.abs(b)/u,o.apply(this,arguments)),y=x*(b<0?-1:1),_;for(l=0;l<u;++l)(_=p[h[l]=l]=+e(s[l],l,s))>0&&(f+=_);for(t!=null?h.sort(function(S,$){return t(p[S],p[$])}):n!=null&&h.sort(function(S,$){return n(s[S],s[$])}),l=0,d=f?(b-u*y)/f:0;l<u;++l,g=v)c=h[l],_=p[c],v=g+(_>0?_*d:0)+y,p[c]={data:s[c],index:l,value:_,startAngle:g,endAngle:v,padAngle:x};return p}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:dt(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:dt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:dt(+s),a):o},a}var p6=Ib(oh);function g6(e){this._curve=e}g6.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Ib(e){function t(n){return new g6(e(n))}return t._curve=e,t}function al(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Ib(n)):t()._curve},e}function px(){return al(Cs().curve(p6))}function gx(){var e=Fb().curve(p6),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return al(n())},delete e.lineX0,e.lineEndAngle=function(){return al(r())},delete e.lineX1,e.lineInnerRadius=function(){return al(i())},delete e.lineY0,e.lineOuterRadius=function(){return al(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Ib(a)):t()._curve},e}function sl(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Cg=Array.prototype.slice;function nY(e){return e.source}function rY(e){return e.target}function Bb(e){var t=nY,n=rY,r=Rb,i=zb,o=null;function a(){var s,l=Cg.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(o||(o=s=ho()),e(o,+r.apply(this,(l[0]=u,l)),+i.apply(this,l),+r.apply(this,(l[0]=c,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(n=s,a):n},a.x=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),a):r},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:dt(+s),a):i},a.context=function(s){return arguments.length?(o=s??null,a):o},a}function iY(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function oY(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function aY(e,t,n,r,i){var o=sl(t,n),a=sl(t,n=(n+i)/2),s=sl(r,n),l=sl(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function sY(){return Bb(iY)}function lY(){return Bb(oY)}function uY(){var e=Bb(aY);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Ob={draw:function(e,t){var n=Math.sqrt(t/no);e.moveTo(n,0),e.arc(0,0,n,0,Vi)}},v6={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var b6=Math.sqrt(1/3),cY=b6*2;const m6={draw:function(e,t){var n=Math.sqrt(t/cY),r=n*b6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var fY=.8908130915292852,y6=Math.sin(no/10)/Math.sin(7*no/10),dY=Math.sin(Vi/10)*y6,hY=-Math.cos(Vi/10)*y6;const _6={draw:function(e,t){var n=Math.sqrt(t*fY),r=dY*n,i=hY*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=Vi*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},x6={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Dp=Math.sqrt(3);const w6={draw:function(e,t){var n=-Math.sqrt(t/(Dp*3));e.moveTo(0,n*2),e.lineTo(-Dp*n,-n),e.lineTo(Dp*n,-n),e.closePath()}};var tr=-.5,nr=Math.sqrt(3)/2,Sg=1/Math.sqrt(12),pY=(Sg/2+1)*3;const C6={draw:function(e,t){var n=Math.sqrt(t/pY),r=n/2,i=n*Sg,o=r,a=n*Sg+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(tr*r-nr*i,nr*r+tr*i),e.lineTo(tr*o-nr*a,nr*o+tr*a),e.lineTo(tr*s-nr*l,nr*s+tr*l),e.lineTo(tr*r+nr*i,tr*i-nr*r),e.lineTo(tr*o+nr*a,tr*a-nr*o),e.lineTo(tr*s+nr*l,tr*l-nr*s),e.closePath()}};var gY=[Ob,v6,m6,x6,_6,w6,C6];function Nb(){var e=dt(Ob),t=dt(64),n=null;function r(){var i;if(n||(n=i=ho()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:dt(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:dt(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function ro(){}function ed(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ah(e){this._context=e}ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ed(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vY(e){return new ah(e)}function S6(e){this._context=e}S6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bY(e){return new S6(e)}function $6(e){this._context=e}$6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mY(e){return new $6(e)}function k6(e,t){this._basis=new ah(e),this._beta=t}k6.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const yY=function e(t){function n(r){return t===1?new ah(r):new k6(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function td(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Lb(e,t){this._context=e,this._k=(1-t)/6}Lb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:td(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:td(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _Y=function e(t){function n(r){return new Lb(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Db(e,t){this._context=e,this._k=(1-t)/6}Db.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:td(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xY=function e(t){function n(r){return new Db(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Hb(e,t){this._context=e,this._k=(1-t)/6}Hb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:td(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wY=function e(t){function n(r){return new Hb(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ub(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>bn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bn){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function M6(e,t){this._context=e,this._alpha=t}M6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ub(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CY=function e(t){function n(r){return t?new M6(r,t):new Lb(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function T6(e,t){this._context=e,this._alpha=t}T6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ub(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const SY=function e(t){function n(r){return t?new T6(r,t):new Db(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function E6(e,t){this._context=e,this._alpha=t}E6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ub(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $Y=function e(t){function n(r){return t?new E6(r,t):new Hb(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function A6(e){this._context=e}A6.prototype={areaStart:ro,areaEnd:ro,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function kY(e){return new A6(e)}function vx(e){return e<0?-1:1}function bx(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(vx(o)+vx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function mx(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Hp(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function nd(e){this._context=e}nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Hp(this,this._t0,mx(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Hp(this,mx(this,n=bx(this,e,t)),n);break;default:Hp(this,this._t0,n=bx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function P6(e){this._context=new R6(e)}(P6.prototype=Object.create(nd.prototype)).point=function(e,t){nd.prototype.point.call(this,t,e)};function R6(e){this._context=e}R6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function MY(e){return new nd(e)}function TY(e){return new P6(e)}function z6(e){this._context=e}z6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=yx(e),i=yx(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function yx(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function F6(e){return new z6(e)}function sh(e,t){this._context=e,this._t=t}sh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function EY(e){return new sh(e,.5)}function AY(e){return new sh(e,0)}function PY(e){return new sh(e,1)}function ds(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function hs(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function RY(e,t){return e[t]}function zY(){var e=dt([]),t=hs,n=ds,r=RY;function i(o){var a=e.apply(this,arguments),s,l=o.length,u=a.length,c=new Array(u),d;for(s=0;s<u;++s){for(var f=a[s],h=c[s]=new Array(l),p=0,g;p<l;++p)h[p]=g=[0,+r(o[p],f,p,o)],g.data=o[p];h.key=f}for(s=0,d=t(c);s<u;++s)c[d[s]].index=s;return n(c,d),c}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:dt(Cg.call(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:dt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?hs:typeof o=="function"?o:dt(Cg.call(o)),i):t},i.offset=function(o){return arguments.length?(n=o??ds,i):n},i}function FY(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}ds(e,t)}}function IY(e,t){if((l=e.length)>0)for(var n,r=0,i,o,a,s,l,u=e[t[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function BY(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ds(e,t)}}function OY(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=e[t[s]],d=c[r][1]||0,f=c[r-1][1]||0,h=(d-f)/2,p=0;p<s;++p){var g=e[t[p]],b=g[r][1]||0,v=g[r-1][1]||0;h+=b-v}l+=d,u+=h*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,ds(e,t)}}function I6(e){var t=e.map(NY);return hs(e).sort(function(n,r){return t[n]-t[r]})}function NY(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function B6(e){var t=e.map(O6);return hs(e).sort(function(n,r){return t[n]-t[r]})}function O6(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function LY(e){return B6(e).reverse()}function DY(e){var t=e.length,n,r,i=e.map(O6),o=I6(e),a=0,s=0,l=[],u=[];for(n=0;n<t;++n)r=o[n],a<s?(a+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)}function HY(e){return hs(e).reverse()}function _x(e){return function(){return e}}function UY(e){return e[0]}function jY(e){return e[1]}function rd(){this._=null}function lh(e){e.U=e.C=e.L=e.R=e.P=e.N=null}rd.prototype={constructor:rd,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=xx(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Ds(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Hs(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Hs(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Ds(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,n,r=e.L,i=e.R,o,a;if(r?i?o=xx(i):o=r:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,r&&i?(a=o.C,o.C=e.C,o.L=r,r.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(n=t.R,n.C&&(n.C=!1,t.C=!0,Ds(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,Hs(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Ds(this,t),e=this._;break}}else if(n=t.L,n.C&&(n.C=!1,t.C=!0,Hs(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Ds(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,Hs(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function Ds(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Hs(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function xx(e){for(;e.L;)e=e.L;return e}function ll(e,t,n,r){var i=[null,null],o=mn.push(i)-1;return i.left=e,i.right=t,n&&id(i,e,t,n),r&&id(i,t,e,r),Gn[e.index].halfedges.push(o),Gn[t.index].halfedges.push(o),i}function Us(e,t,n){var r=[t,n];return r.left=e,r}function id(e,t,n,r){!e[0]&&!e[1]?(e[0]=r,e.left=t,e.right=n):e.left===n?e[1]=r:e[0]=r}function WY(e,t,n,r,i){var o=e[0],a=e[1],s=o[0],l=o[1],u=a[0],c=a[1],d=0,f=1,h=u-s,p=c-l,g;if(g=t-s,!(!h&&g>0)){if(g/=h,h<0){if(g<d)return;g<f&&(f=g)}else if(h>0){if(g>f)return;g>d&&(d=g)}if(g=r-s,!(!h&&g<0)){if(g/=h,h<0){if(g>f)return;g>d&&(d=g)}else if(h>0){if(g<d)return;g<f&&(f=g)}if(g=n-l,!(!p&&g>0)){if(g/=p,p<0){if(g<d)return;g<f&&(f=g)}else if(p>0){if(g>f)return;g>d&&(d=g)}if(g=i-l,!(!p&&g<0)){if(g/=p,p<0){if(g>f)return;g>d&&(d=g)}else if(p>0){if(g<d)return;g<f&&(f=g)}return!(d>0)&&!(f<1)||(d>0&&(e[0]=[s+d*h,l+d*p]),f<1&&(e[1]=[s+f*h,l+f*p])),!0}}}}}function VY(e,t,n,r,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,u=s[0],c=s[1],d=l[0],f=l[1],h=(u+d)/2,p=(c+f)/2,g,b;if(f===c){if(h<t||h>=r)return;if(u>d){if(!a)a=[h,n];else if(a[1]>=i)return;o=[h,i]}else{if(!a)a=[h,i];else if(a[1]<n)return;o=[h,n]}}else if(g=(u-d)/(f-c),b=p-g*h,g<-1||g>1)if(u>d){if(!a)a=[(n-b)/g,n];else if(a[1]>=i)return;o=[(i-b)/g,i]}else{if(!a)a=[(i-b)/g,i];else if(a[1]<n)return;o=[(n-b)/g,n]}else if(c<f){if(!a)a=[t,g*t+b];else if(a[0]>=r)return;o=[r,g*r+b]}else{if(!a)a=[r,g*r+b];else if(a[0]<t)return;o=[t,g*t+b]}return e[0]=a,e[1]=o,!0}function qY(e,t,n,r){for(var i=mn.length,o;i--;)(!VY(o=mn[i],e,t,n,r)||!WY(o,e,t,n,r)||!(Math.abs(o[0][0]-o[1][0])>Pt||Math.abs(o[0][1]-o[1][1])>Pt))&&delete mn[i]}function GY(e){return Gn[e.index]={site:e,halfedges:[]}}function YY(e,t){var n=e.site,r=t.left,i=t.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=t[1],i=t[0]):(r=t[0],i=t[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function N6(e,t){return t[+(t.left!==e.site)]}function XY(e,t){return t[+(t.left===e.site)]}function KY(){for(var e=0,t=Gn.length,n,r,i,o;e<t;++e)if((n=Gn[e])&&(o=(r=n.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=YY(n,mn[r[i]]);for(a.sort(function(l,u){return s[u]-s[l]}),i=0;i<o;++i)s[i]=r[a[i]];for(i=0;i<o;++i)r[i]=s[i]}}function ZY(e,t,n,r){var i=Gn.length,o,a,s,l,u,c,d,f,h,p,g,b,v=!0;for(o=0;o<i;++o)if(a=Gn[o]){for(s=a.site,u=a.halfedges,l=u.length;l--;)mn[u[l]]||u.splice(l,1);for(l=0,c=u.length;l<c;)p=XY(a,mn[u[l]]),g=p[0],b=p[1],d=N6(a,mn[u[++l%c]]),f=d[0],h=d[1],(Math.abs(g-f)>Pt||Math.abs(b-h)>Pt)&&(u.splice(l,0,mn.push(Us(s,p,Math.abs(g-e)<Pt&&r-b>Pt?[e,Math.abs(f-e)<Pt?h:r]:Math.abs(b-r)<Pt&&n-g>Pt?[Math.abs(h-r)<Pt?f:n,r]:Math.abs(g-n)<Pt&&b-t>Pt?[n,Math.abs(f-n)<Pt?h:t]:Math.abs(b-t)<Pt&&g-e>Pt?[Math.abs(h-t)<Pt?f:e,t]:null))-1),++c);c&&(v=!1)}if(v){var x,y,_,S=1/0;for(o=0,v=null;o<i;++o)(a=Gn[o])&&(s=a.site,x=s[0]-e,y=s[1]-t,_=x*x+y*y,_<S&&(S=_,v=a));if(v){var $=[e,t],w=[e,r],T=[n,r],M=[n,t];v.halfedges.push(mn.push(Us(s=v.site,$,w))-1,mn.push(Us(s,w,T))-1,mn.push(Us(s,T,M))-1,mn.push(Us(s,M,$))-1)}}for(o=0;o<i;++o)(a=Gn[o])&&(a.halfedges.length||delete Gn[o])}var L6=[],jb;function JY(){lh(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ba(e){var t=e.P,n=e.N;if(!(!t||!n)){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i[0],s=i[1],l=r[0]-a,u=r[1]-s,c=o[0]-a,d=o[1]-s,f=2*(l*d-u*c);if(!(f>=-1e-12)){var h=l*l+u*u,p=c*c+d*d,g=(d*h-u*p)/f,b=(l*p-c*h)/f,v=L6.pop()||new JY;v.arc=e,v.site=i,v.x=g+a,v.y=(v.cy=b+s)+Math.sqrt(g*g+b*b),e.circle=v;for(var x=null,y=hu._;y;)if(v.y<y.y||v.y===y.y&&v.x<=y.x)if(y.L)y=y.L;else{x=y.P;break}else if(y.R)y=y.R;else{x=y;break}hu.insert(x,v),x||(jb=v)}}}}function Ya(e){var t=e.circle;t&&(t.P||(jb=t.N),hu.remove(t),L6.push(t),lh(t),e.circle=null)}var D6=[];function QY(){lh(this),this.edge=this.site=this.circle=null}function wx(e){var t=D6.pop()||new QY;return t.site=e,t}function Up(e){Ya(e),Xa.remove(e),D6.push(e),lh(e)}function eX(e){var t=e.circle,n=t.x,r=t.cy,i=[n,r],o=e.P,a=e.N,s=[e];Up(e);for(var l=o;l.circle&&Math.abs(n-l.circle.x)<Pt&&Math.abs(r-l.circle.cy)<Pt;)o=l.P,s.unshift(l),Up(l),l=o;s.unshift(l),Ya(l);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<Pt&&Math.abs(r-u.circle.cy)<Pt;)a=u.N,s.push(u),Up(u),u=a;s.push(u),Ya(u);var c=s.length,d;for(d=1;d<c;++d)u=s[d],l=s[d-1],id(u.edge,l.site,u.site,i);l=s[0],u=s[c-1],u.edge=ll(l.site,u.site,null,i),Ba(l),Ba(u)}function tX(e){for(var t=e[0],n=e[1],r,i,o,a,s=Xa._;s;)if(o=H6(s,n)-t,o>Pt)s=s.L;else if(a=t-nX(s,n),a>Pt){if(!s.R){r=s;break}s=s.R}else{o>-1e-6?(r=s.P,i=s):a>-1e-6?(r=s,i=s.N):r=i=s;break}GY(e);var l=wx(e);if(Xa.insert(r,l),!(!r&&!i)){if(r===i){Ya(r),i=wx(r.site),Xa.insert(l,i),l.edge=i.edge=ll(r.site,l.site),Ba(r),Ba(i);return}if(!i){l.edge=ll(r.site,l.site);return}Ya(r),Ya(i);var u=r.site,c=u[0],d=u[1],f=e[0]-c,h=e[1]-d,p=i.site,g=p[0]-c,b=p[1]-d,v=2*(f*b-h*g),x=f*f+h*h,y=g*g+b*b,_=[(b*x-h*y)/v+c,(f*y-g*x)/v+d];id(i.edge,u,p,_),l.edge=ll(u,e,null,_),i.edge=ll(e,p,null,_),Ba(r),Ba(i)}}function H6(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;n=a.site;var s=n[0],l=n[1],u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,f=c/u;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function nX(e,t){var n=e.N;if(n)return H6(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var Pt=1e-6,Xa,Gn,hu,mn;function rX(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function iX(e,t){return t[1]-e[1]||t[0]-e[0]}function $g(e,t){var n=e.sort(iX).pop(),r,i,o;for(mn=[],Gn=new Array(e.length),Xa=new rd,hu=new rd;;)if(o=jb,n&&(!o||n[1]<o.y||n[1]===o.y&&n[0]<o.x))(n[0]!==r||n[1]!==i)&&(tX(n),r=n[0],i=n[1]),n=e.pop();else if(o)eX(o.arc);else break;if(KY(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],u=+t[1][1];qY(a,s,l,u),ZY(a,s,l,u)}this.edges=mn,this.cells=Gn,Xa=hu=mn=Gn=null}$g.prototype={constructor:$g,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(r){return N6(t,e[r])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,r){if(s=(o=n.halfedges).length)for(var i=n.site,o,a=-1,s,l,u=t[o[s-1]],c=u.left===i?u.right:u.left;++a<s;)l=c,u=t[o[a]],c=u.left===i?u.right:u.left,l&&c&&r<l.index&&r<c.index&&rX(i,l,c)<0&&e.push([i.data,l.data,c.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,n){for(var r=this,i,o=r._found||0,a=r.cells.length,s;!(s=r.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],u=t-s.site[1],c=l*l+u*u;do s=r.cells[i=o],o=null,s.halfedges.forEach(function(d){var f=r.edges[d],h=f.left;if(!((h===s.site||!h)&&!(h=f.right))){var p=e-h[0],g=t-h[1],b=p*p+g*g;b<c&&(c=b,o=h.index)}});while(o!==null);return r._found=i,n==null||c<=n*n?s.site:null}};function oX(){var e=UY,t=jY,n=null;function r(i){return new $g(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Pt)*Pt,Math.round(t(o,a,i)/Pt)*Pt];return s.index=a,s.data=o,s}),n)}return r.polygons=function(i){return r(i).polygons()},r.links=function(i){return r(i).links()},r.triangles=function(i){return r(i).triangles()},r.x=function(i){return arguments.length?(e=typeof i=="function"?i:_x(+i),r):e},r.y=function(i){return arguments.length?(t=typeof i=="function"?i:_x(+i),r):t},r.extent=function(i){return arguments.length?(n=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(i){return arguments.length?(n=i==null?null:[[0,0],[+i[0],+i[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function kc(e){return function(){return e}}function aX(e,t,n){this.target=e,this.type=t,this.transform=n}function ui(e,t,n){this.k=e,this.x=t,this.y=n}ui.prototype={constructor:ui,scale:function(e){return e===1?this:new ui(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ui(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var uh=new ui(1,0,0);U6.prototype=ui.prototype;function U6(e){for(;!e.__zoom;)if(!(e=e.parentNode))return uh;return e.__zoom}function jp(){Ce.stopImmediatePropagation()}function js(){Ce.preventDefault(),Ce.stopImmediatePropagation()}function sX(){return!Ce.ctrlKey&&!Ce.button}function lX(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Cx(){return this.__zoom||uh}function uX(){return-Ce.deltaY*(Ce.deltaMode===1?.05:Ce.deltaMode?1:.002)}function cX(){return navigator.maxTouchPoints||"ontouchstart"in this}function fX(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function dX(){var e=sX,t=lX,n=fX,r=uX,i=cX,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=z8,u=ha("start","zoom","end"),c,d,f=500,h=150,p=0;function g(C){C.property("__zoom",Cx).on("wheel.zoom",$).on("mousedown.zoom",w).on("dblclick.zoom",T).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(C,E,F){var z=C.selection?C.selection():C;z.property("__zoom",Cx),C!==z?y(C,E,F):z.interrupt().each(function(){_(this,arguments).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},g.scaleBy=function(C,E,F){g.scaleTo(C,function(){var z=this.__zoom.k,j=typeof E=="function"?E.apply(this,arguments):E;return z*j},F)},g.scaleTo=function(C,E,F){g.transform(C,function(){var z=t.apply(this,arguments),j=this.__zoom,Z=F==null?x(z):typeof F=="function"?F.apply(this,arguments):F,J=j.invert(Z),ie=typeof E=="function"?E.apply(this,arguments):E;return n(v(b(j,ie),Z,J),z,a)},F)},g.translateBy=function(C,E,F){g.transform(C,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),a)})},g.translateTo=function(C,E,F,z){g.transform(C,function(){var j=t.apply(this,arguments),Z=this.__zoom,J=z==null?x(j):typeof z=="function"?z.apply(this,arguments):z;return n(uh.translate(J[0],J[1]).scale(Z.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof F=="function"?-F.apply(this,arguments):-F),j,a)},z)};function b(C,E){return E=Math.max(o[0],Math.min(o[1],E)),E===C.k?C:new ui(E,C.x,C.y)}function v(C,E,F){var z=E[0]-F[0]*C.k,j=E[1]-F[1]*C.k;return z===C.x&&j===C.y?C:new ui(C.k,z,j)}function x(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function y(C,E,F){C.on("start.zoom",function(){_(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).end()}).tween("zoom",function(){var z=this,j=arguments,Z=_(z,j),J=t.apply(z,j),ie=F==null?x(J):typeof F=="function"?F.apply(z,j):F,he=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),_e=z.__zoom,oe=typeof E=="function"?E.apply(z,j):E,ve=l(_e.invert(ie).concat(he/_e.k),oe.invert(ie).concat(he/oe.k));return function(we){if(we===1)we=oe;else{var Oe=ve(we),xe=he/Oe[2];we=new ui(xe,ie[0]-Oe[0]*xe,ie[1]-Oe[1]*xe)}Z.zoom(null,we)}})}function _(C,E,F){return!F&&C.__zooming||new S(C,E)}function S(C,E){this.that=C,this.args=E,this.active=0,this.extent=t.apply(C,E),this.taps=0}S.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,E){return this.mouse&&C!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){ql(new aX(g,C,this.that.__zoom),u.apply,u,[C,this.that,this.args])}};function $(){if(!e.apply(this,arguments))return;var C=_(this,arguments),E=this.__zoom,F=Math.max(o[0],Math.min(o[1],E.k*Math.pow(2,r.apply(this,arguments)))),z=lr(this);if(C.wheel)(C.mouse[0][0]!==z[0]||C.mouse[0][1]!==z[1])&&(C.mouse[1]=E.invert(C.mouse[0]=z)),clearTimeout(C.wheel);else{if(E.k===F)return;C.mouse=[z,E.invert(z)],Uo(this),C.start()}js(),C.wheel=setTimeout(j,h),C.zoom("mouse",n(v(b(E,F),C.mouse[0],C.mouse[1]),C.extent,a));function j(){C.wheel=null,C.end()}}function w(){if(d||!e.apply(this,arguments))return;var C=_(this,arguments,!0),E=Ue(Ce.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",J,!0),F=lr(this),z=Ce.clientX,j=Ce.clientY;Od(Ce.view),jp(),C.mouse=[F,this.__zoom.invert(F)],Uo(this),C.start();function Z(){if(js(),!C.moved){var ie=Ce.clientX-z,he=Ce.clientY-j;C.moved=ie*ie+he*he>p}C.zoom("mouse",n(v(C.that.__zoom,C.mouse[0]=lr(C.that),C.mouse[1]),C.extent,a))}function J(){E.on("mousemove.zoom mouseup.zoom",null),Nd(Ce.view,C.moved),js(),C.end()}}function T(){if(e.apply(this,arguments)){var C=this.__zoom,E=lr(this),F=C.invert(E),z=C.k*(Ce.shiftKey?.5:2),j=n(v(b(C,z),E,F),t.apply(this,arguments),a);js(),s>0?Ue(this).transition().duration(s).call(y,j,E):Ue(this).call(g.transform,j)}}function M(){if(e.apply(this,arguments)){var C=Ce.touches,E=C.length,F=_(this,arguments,Ce.changedTouches.length===E),z,j,Z,J;for(jp(),j=0;j<E;++j)Z=C[j],J=Gl(this,C,Z.identifier),J=[J,this.__zoom.invert(J),Z.identifier],F.touch0?!F.touch1&&F.touch0[2]!==J[2]&&(F.touch1=J,F.taps=0):(F.touch0=J,z=!0,F.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(F.taps<2&&(c=setTimeout(function(){c=null},f)),Uo(this),F.start())}}function P(){if(this.__zooming){var C=_(this,arguments),E=Ce.changedTouches,F=E.length,z,j,Z,J;for(js(),c&&(c=clearTimeout(c)),C.taps=0,z=0;z<F;++z)j=E[z],Z=Gl(this,E,j.identifier),C.touch0&&C.touch0[2]===j.identifier?C.touch0[0]=Z:C.touch1&&C.touch1[2]===j.identifier&&(C.touch1[0]=Z);if(j=C.that.__zoom,C.touch1){var ie=C.touch0[0],he=C.touch0[1],_e=C.touch1[0],oe=C.touch1[1],ve=(ve=_e[0]-ie[0])*ve+(ve=_e[1]-ie[1])*ve,we=(we=oe[0]-he[0])*we+(we=oe[1]-he[1])*we;j=b(j,Math.sqrt(ve/we)),Z=[(ie[0]+_e[0])/2,(ie[1]+_e[1])/2],J=[(he[0]+oe[0])/2,(he[1]+oe[1])/2]}else if(C.touch0)Z=C.touch0[0],J=C.touch0[1];else return;C.zoom("touch",n(v(j,Z,J),C.extent,a))}}function R(){if(this.__zooming){var C=_(this,arguments),E=Ce.changedTouches,F=E.length,z,j;for(jp(),d&&clearTimeout(d),d=setTimeout(function(){d=null},f),z=0;z<F;++z)j=E[z],C.touch0&&C.touch0[2]===j.identifier?delete C.touch0:C.touch1&&C.touch1[2]===j.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2){var Z=Ue(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return g.wheelDelta=function(C){return arguments.length?(r=typeof C=="function"?C:kc(+C),g):r},g.filter=function(C){return arguments.length?(e=typeof C=="function"?C:kc(!!C),g):e},g.touchable=function(C){return arguments.length?(i=typeof C=="function"?C:kc(!!C),g):i},g.extent=function(C){return arguments.length?(t=typeof C=="function"?C:kc([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),g):t},g.scaleExtent=function(C){return arguments.length?(o[0]=+C[0],o[1]=+C[1],g):[o[0],o[1]]},g.translateExtent=function(C){return arguments.length?(a[0][0]=+C[0][0],a[1][0]=+C[1][0],a[0][1]=+C[0][1],a[1][1]=+C[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(C){return arguments.length?(n=C,g):n},g.duration=function(C){return arguments.length?(s=+C,g):s},g.interpolate=function(C){return arguments.length?(l=C,g):l},g.on=function(){var C=u.on.apply(u,arguments);return C===u?g:C},g.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,g):Math.sqrt(p)},g}const j6=Object.freeze(Object.defineProperty({__proto__:null,FormatSpecifier:Xd,active:ND,arc:JG,area:Fb,areaRadial:gx,ascending:Sr,autoType:UH,axisBottom:Y5,axisLeft:X5,axisRight:Ev,axisTop:G5,bisect:Ji,bisectLeft:$B,bisectRight:Ji,bisector:$v,blob:VH,brush:ZD,brushSelection:YD,brushX:XD,brushY:KD,buffer:GH,chord:QD,clientPoint:Bd,cluster:aW,color:eo,contourDensity:kH,contours:K8,create:bN,creator:Fd,cross:MB,csv:KH,csvFormat:PH,csvFormatBody:RH,csvFormatRow:FH,csvFormatRows:zH,csvFormatValue:IH,csvParse:J8,csvParseRows:AH,cubehelix:$r,curveBasis:vY,curveBasisClosed:bY,curveBasisOpen:mY,curveBundle:yY,curveCardinal:_Y,curveCardinalClosed:xY,curveCardinalOpen:wY,curveCatmullRom:CY,curveCatmullRomClosed:SY,curveCatmullRomOpen:$Y,curveLinear:oh,curveLinearClosed:kY,curveMonotoneX:MY,curveMonotoneY:TY,curveNatural:F6,curveStep:EY,curveStepAfter:PY,curveStepBefore:AY,customEvent:ql,descending:TB,deviation:U5,dispatch:ha,drag:B0,dragDisable:Od,dragEnable:Nd,dsv:XH,dsvFormat:qd,easeBack:Ly,easeBackIn:PD,easeBackInOut:Ly,easeBackOut:RD,easeBounce:Ql,easeBounceIn:ED,easeBounceInOut:AD,easeBounceOut:Ql,easeCircle:Ny,easeCircleIn:yD,easeCircleInOut:Ny,easeCircleOut:_D,easeCubic:W0,easeCubicIn:fD,easeCubicInOut:W0,easeCubicOut:dD,easeElastic:Dy,easeElasticIn:zD,easeElasticInOut:FD,easeElasticOut:Dy,easeExp:Oy,easeExpIn:bD,easeExpInOut:Oy,easeExpOut:mD,easeLinear:lD,easePoly:Iy,easePolyIn:hD,easePolyInOut:Iy,easePolyOut:pD,easeQuad:Fy,easeQuadIn:uD,easeQuadInOut:Fy,easeQuadOut:cD,easeSin:By,easeSinIn:gD,easeSinInOut:By,easeSinOut:vD,entries:hH,get event(){return Ce},extent:qo,forceCenter:iU,forceCollide:CU,forceLink:$U,forceManyBody:PU,forceRadial:RU,forceSimulation:AU,forceX:zU,forceY:FU,get format(){return Kd},formatDefaultLocale:i3,formatLocale:r3,get formatPrefix(){return Kv},formatSpecifier:tu,geoAlbers:U3,geoAlbersUsa:Nj,geoArea:WU,geoAzimuthalEqualArea:Lj,geoAzimuthalEqualAreaRaw:ab,geoAzimuthalEquidistant:Dj,geoAzimuthalEquidistantRaw:sb,geoBounds:YU,geoCentroid:ej,geoCircle:tj,geoClipAntimeridian:sg,geoClipCircle:k3,geoClipExtent:lj,geoClipRectangle:Zd,geoConicConformal:Uj,geoConicConformalRaw:V3,geoConicEqualArea:Gf,geoConicEqualAreaRaw:H3,geoConicEquidistant:Wj,geoConicEquidistantRaw:q3,geoContains:gj,geoDistance:Df,geoEqualEarth:qj,geoEqualEarthRaw:lb,geoEquirectangular:jj,geoEquirectangularRaw:ou,geoGnomonic:Gj,geoGnomonicRaw:ub,geoGraticule:E3,geoGraticule10:vj,geoIdentity:Yj,geoInterpolate:bj,geoLength:M3,geoMercator:Hj,geoMercatorRaw:Mu,geoNaturalEarth1:Xj,geoNaturalEarth1Raw:cb,geoOrthographic:Kj,geoOrthographicRaw:fb,geoPath:Tj,geoProjection:Jr,geoProjectionMutator:ib,geoRotation:_3,geoStereographic:Zj,geoStereographicRaw:db,geoStream:br,geoTransform:Ej,geoTransverseMercator:Jj,geoTransverseMercatorRaw:hb,gray:zN,hcl:mf,hierarchy:pb,histogram:RB,hsl:gf,html:nU,image:JH,interpolate:ys,interpolateArray:LN,interpolateBasis:y8,interpolateBasisClosed:_8,interpolateBlues:$G,interpolateBrBG:iG,interpolateBuGn:hG,interpolateBuPu:pG,interpolateCividis:PG,interpolateCool:FG,interpolateCubehelix:eL,interpolateCubehelixDefault:RG,interpolateCubehelixLong:Ud,interpolateDate:k8,interpolateDiscrete:UN,interpolateGnBu:gG,interpolateGreens:kG,interpolateGreys:MG,interpolateHcl:JN,interpolateHclLong:QN,interpolateHsl:XN,interpolateHslLong:KN,interpolateHue:jN,interpolateInferno:UG,interpolateLab:ZN,interpolateMagma:HG,interpolateNumber:or,interpolateNumberArray:Lv,interpolateObject:M8,interpolateOrRd:vG,interpolateOranges:AG,interpolatePRGn:oG,interpolatePiYG:aG,interpolatePlasma:jG,interpolatePuBu:mG,interpolatePuBuGn:bG,interpolatePuOr:sG,interpolatePuRd:yG,interpolatePurples:TG,interpolateRainbow:IG,interpolateRdBu:lG,interpolateRdGy:uG,interpolateRdPu:_G,interpolateRdYlBu:cG,interpolateRdYlGn:fG,interpolateReds:EG,interpolateRgb:Kl,interpolateRgbBasis:C8,interpolateRgbBasisClosed:NN,interpolateRound:T8,interpolateSinebow:NG,interpolateSpectral:dG,interpolateString:Dv,interpolateTransformCss:P8,interpolateTransformSvg:R8,interpolateTurbo:LG,interpolateViridis:DG,interpolateWarm:zG,interpolateYlGn:wG,interpolateYlGnBu:xG,interpolateYlOrBr:CG,interpolateYlOrRd:SG,interpolateZoom:z8,interrupt:Uo,interval:aL,isoFormat:Nq,isoParse:Dq,json:eU,keys:fH,lab:bf,lch:FN,line:Cs,lineRadial:px,linkHorizontal:sY,linkRadial:uY,linkVertical:lY,local:i8,map:hi,matcher:Pv,max:W5,mean:IB,median:BB,merge:Tv,min:V5,mouse:lr,namespace:wu,namespaces:z0,nest:lH,now:_s,pack:PW,packEnclose:Y3,packSiblings:TW,pairs:kB,partition:RW,path:ho,permute:OB,pie:tY,piecewise:tL,pointRadial:sl,polygonArea:GW,polygonCentroid:YW,polygonContains:JW,polygonHull:ZW,polygonLength:QW,precisionFixed:o3,precisionPrefix:a3,precisionRound:s3,quadtree:Yd,quantile:Vl,quantize:nL,radialArea:gx,radialLine:px,randomBates:nV,randomExponential:rV,randomIrwinHall:rC,randomLogNormal:tV,randomNormal:nC,randomUniform:eV,range:Jn,rgb:is,ribbon:sH,scaleBand:vb,scaleDiverging:OC,scaleDivergingLog:NC,scaleDivergingPow:Pb,scaleDivergingSqrt:Gq,scaleDivergingSymlog:LC,scaleIdentity:lC,scaleImplicit:_g,scaleLinear:au,scaleLog:cC,scaleOrdinal:gb,scalePoint:iV,scalePow:_b,scaleQuantile:dC,scaleQuantize:hC,scaleSequential:zC,scaleSequentialLog:FC,scaleSequentialPow:Ab,scaleSequentialQuantile:BC,scaleSequentialSqrt:qq,scaleSequentialSymlog:IC,scaleSqrt:gV,scaleSymlog:fC,scaleThreshold:pC,scaleTime:Wq,scaleUtc:Vq,scan:NB,schemeAccent:Xq,schemeBlues:s6,schemeBrBG:DC,schemeBuGn:XC,schemeBuPu:KC,schemeCategory10:Yq,schemeDark2:Kq,schemeGnBu:ZC,schemeGreens:l6,schemeGreys:u6,schemeOrRd:JC,schemeOranges:d6,schemePRGn:HC,schemePaired:Zq,schemePastel1:Jq,schemePastel2:Qq,schemePiYG:UC,schemePuBu:e6,schemePuBuGn:QC,schemePuOr:jC,schemePuRd:t6,schemePurples:c6,schemeRdBu:WC,schemeRdGy:VC,schemeRdPu:n6,schemeRdYlBu:qC,schemeRdYlGn:GC,schemeReds:f6,schemeSet1:eG,schemeSet2:tG,schemeSet3:nG,schemeSpectral:YC,schemeTableau10:rG,schemeYlGn:i6,schemeYlGnBu:r6,schemeYlOrBr:o6,schemeYlOrRd:a6,select:Ue,selectAll:o8,selection:pa,selector:Id,selectorAll:Av,set:Y8,shuffle:LB,stack:zY,stackOffsetDiverging:IY,stackOffsetExpand:FY,stackOffsetNone:ds,stackOffsetSilhouette:BY,stackOffsetWiggle:OY,stackOrderAppearance:I6,stackOrderAscending:B6,stackOrderDescending:LY,stackOrderInsideOut:DY,stackOrderNone:hs,stackOrderReverse:HY,stratify:BW,style:Yo,sum:DB,svg:rU,symbol:Nb,symbolCircle:Ob,symbolCross:v6,symbolDiamond:m6,symbolSquare:x6,symbolStar:_6,symbolTriangle:w6,symbolWye:C6,symbols:gY,text:Gd,thresholdFreedmanDiaconis:zB,thresholdScott:FB,thresholdSturges:Mv,tickFormat:sC,tickIncrement:wl,tickStep:Go,ticks:kv,timeDay:Au,timeDays:mV,get timeFormat(){return Mb},timeFormatDefaultLocale:PC,timeFormatLocale:$C,timeFriday:yC,timeFridays:CV,timeHour:wb,timeHours:bV,timeInterval:Qt,timeMillisecond:ea,timeMilliseconds:Z_,timeMinute:xb,timeMinutes:vV,timeMonday:uu,timeMondays:yV,timeMonth:Cb,timeMonths:$V,get timeParse(){return AC},timeSaturday:_C,timeSaturdays:SV,timeSecond:su,timeSeconds:J_,timeSunday:lu,timeSundays:Q_,timeThursday:na,timeThursdays:wV,timeTuesday:bC,timeTuesdays:_V,timeWednesday:mC,timeWednesdays:xV,timeWeek:lu,timeWeeks:Q_,timeYear:gi,timeYears:kV,timeout:D0,timer:Wd,timerFlush:L8,touch:Gl,touches:yN,transition:j8,transpose:q5,tree:UW,treemap:jW,treemapBinary:WW,treemapDice:Tu,treemapResquarify:qW,treemapSlice:Qd,treemapSliceDice:VW,treemapSquarify:tC,tsv:ZH,tsvFormat:OH,tsvFormatBody:NH,tsvFormatRow:DH,tsvFormatRows:LH,tsvFormatValue:HH,tsvParse:Q8,tsvParseRows:BH,utcDay:Pu,utcDays:EV,get utcFormat(){return th},utcFriday:CC,utcFridays:FV,utcHour:$b,utcHours:TV,utcMillisecond:ea,utcMilliseconds:Z_,utcMinute:Sb,utcMinutes:MV,utcMonday:fu,utcMondays:AV,utcMonth:kb,utcMonths:BV,get utcParse(){return Tb},utcSaturday:SC,utcSaturdays:IV,utcSecond:su,utcSeconds:J_,utcSunday:cu,utcSundays:ex,utcThursday:ra,utcThursdays:zV,utcTuesday:xC,utcTuesdays:PV,utcWednesday:wC,utcWednesdays:RV,utcWeek:cu,utcWeeks:ex,utcYear:vi,utcYears:OV,values:dH,variance:H5,version:CB,voronoi:oX,window:Rv,xml:tU,zip:UB,zoom:dX,zoomIdentity:uh,zoomTransform:U6},Symbol.toStringTag,{value:"Module"})),qi={verbs:["highlight","select","fade","hide"],adjectives:["highlighted","selected","faded","hidden"]};function hX(e){return isNaN(e)||e<=0?null:Math.log(e)/Math.LN10}function pX(e){return isNaN(e)||e<=0?null:-Math.log(e)/Math.LN10}function gX(e){if(isNaN(e))return"NaN";if(e===0)return"1";const t=Math.ceil(e),n=t-e,r=Math.pow(10,n);return t===1?(r/10).toFixed(4):t===2?(r/100).toFixed(3):`${r.toFixed(2)} × 10^-${t}`}function vX(e){if(isNaN(e))return"NaN";if(e===0)return"0";const t=Math.abs(e);let n;return t>1?n=Math.ceil(Math.log(t)/Math.LN10):n=Math.floor(Math.log(t)/Math.LN10),Math.abs(n)<=3?e.toFixed(3):e.toExponential(2).replace("+","").replace("e"," × 10^")}function bX(e){return e?(e=`${e}`,e.replace(/['"<>&`]/g,function(t){switch(t){case"'":return"'";case'"':return""";case"<":return"<";case">":return">";case"&":return"&";case"`":return"`"}})):""}function mX(e){return typeof e=="number"}function yX(e){return encodeURIComponent(e)}const _X=Object.freeze(Object.defineProperty({__proto__:null,htmlescape:bX,is_numeric:mX,log10:hX,logtoscinotation:gX,neglog10:pX,scinotation:vX,urlencode:yX},Symbol.toStringTag,{value:"Module"}));class xX extends Zi{_collectTransforms(t){const n=t.match(/\|([^|]+)/g).map(r=>super.get(r.substring(1)));return r=>n.reduce((i,o)=>o(i),r)}get(t){return t?t.substring(0,1)==="|"?this._collectTransforms(t):super.get(t):null}}const Wb=new xX;for(let[e,t]of Object.entries(_X))Wb.add(e,t);class za{constructor(t){if(!/^(?:\w+:\w+|^\w+)(?:\|\w+)*$/.test(t))throw new Error(`Invalid field specifier: '${t}'`);const[r,...i]=t.split("|");this.full_name=t,this.field_name=r,this.transformations=i.map(o=>Wb.get(o))}_applyTransformations(t){return this.transformations.forEach(function(n){t=n(t)}),t}resolve(t,n){if(typeof t[this.full_name]>"u"){let r=null;t[this.field_name]!==void 0?r=t[this.field_name]:n&&n[this.field_name]!==void 0&&(r=n[this.field_name]),t[this.full_name]=this._applyTransformations(r)}return t[this.full_name]}}const Sx=/^(\*|[\w]+)/,wX=/^\[\?\(@((?:\.[\w]+)+) *===? *([0-9.eE-]+|"[^"]*"|'[^']*')\)\]/;function CX(e){if(e.substr(0,2)===".."){if(e[2]==="[")return{text:"..",attr:"*",depth:".."};const t=Sx.exec(e.substr(2));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dotdot_attr.`;return{text:`..${t[0]}`,attr:t[1],depth:".."}}else if(e[0]==="."){const t=Sx.exec(e.substr(1));if(!t)throw`Cannot parse ${JSON.stringify(e)} as dot_attr.`;return{text:`.${t[0]}`,attr:t[1],depth:"."}}else if(e[0]==="["){const t=wX.exec(e);if(!t)throw`Cannot parse ${JSON.stringify(e)} as expr.`;let n;try{n=JSON.parse(t[2])}catch{n=JSON.parse(t[2].replace(/^'|'$/g,'"'))}return{text:t[0],attrs:t[1].substr(1).split("."),value:n}}else throw`The query ${JSON.stringify(e)} doesn't look valid.`}function SX(e){return e?(["$","["].includes(e[0])||(e=`$.${e}`),e[0]==="$"&&(e=e.substr(1)),e):""}function $X(e){e=SX(e);let t=[];for(;e.length;){const n=CX(e);e=e.substr(n.text.length),t.push(n)}return t}function W6(e,t){let n;for(let r of t)n=e,e=e[r];return[n,t[t.length-1],e]}function To(e,t){if(!t.length)return[[]];const n=t[0],r=t.slice(1);let i=[];if(n.attr&&n.depth==="."&&n.attr!=="*"){const a=e[n.attr];t.length===1?a!==void 0&&i.push([n.attr]):i.push(...To(a,r).map(s=>[n.attr].concat(s)))}else if(n.attr&&n.depth==="."&&n.attr==="*")for(let[a,s]of Object.entries(e))i.push(...To(s,r).map(l=>[a].concat(l)));else if(n.attr&&n.depth===".."){if(typeof e=="object"&&e!==null){n.attr!=="*"&&n.attr in e&&i.push(...To(e[n.attr],r).map(a=>[n.attr].concat(a)));for(let[a,s]of Object.entries(e))i.push(...To(s,t).map(l=>[a].concat(l))),n.attr==="*"&&i.push(...To(s,r).map(l=>[a].concat(l)))}}else if(n.attrs)for(let[a,s]of Object.entries(e)){const[l,u,c]=W6(s,n.attrs);c===n.value&&i.push(...To(s,r).map(d=>[a].concat(d)))}const o=kX(i,JSON.stringify);return o.sort((a,s)=>s.length-a.length||JSON.stringify(a).localeCompare(JSON.stringify(s))),o}function kX(e,t){return[...new Map(e.map(n=>[t(n),n])).values()]}function MX(e,t){let n=[];for(let r of To(e,t))n.push(W6(e,r));return n}function V6(e,t){const n=$X(t),r=MX(e,n);return r.length||console.warn(`No items matched the specified query: '${t}'`),r}function TX(e,t){return V6(e,t).map(n=>n[2])}function EX(e,t,n){return V6(e,t).map(([i,o,a])=>{const s=typeof n=="function"?n(a):n;return i[o]=s,s})}const Wp=Math.sqrt(3),AX={draw(e,t){const n=-Math.sqrt(t/(Wp*3));e.moveTo(0,-n*2),e.lineTo(-Wp*n,n),e.lineTo(Wp*n,n),e.closePath()}};function q6(e,t){if(t=t||{},!e||typeof e!="object"||typeof t!="object")throw new Error("Layout and shared namespaces must be provided as objects");for(let[n,r]of Object.entries(e))n==="namespace"?Object.keys(r).forEach(i=>{const o=t[i];o&&(r[i]=o)}):r!==null&&typeof r=="object"&&(e[n]=q6(r,t));return e}function qt(e,t){if(typeof e!="object"||typeof t!="object")throw new Error(`LocusZoom.Layouts.merge only accepts two layout objects; ${typeof e}, ${typeof t} given`);for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=e[n]===null?"undefined":typeof e[n],i=typeof t[n];if(r==="object"&&Array.isArray(e[n])&&(r="array"),i==="object"&&Array.isArray(t[n])&&(i="array"),r==="function"||i==="function")throw new Error("LocusZoom.Layouts.merge encountered an unsupported property type");if(r==="undefined"){e[n]=at(t[n]);continue}if(r==="object"&&i==="object"){e[n]=qt(e[n],t[n]);continue}}return e}function at(e){return JSON.parse(JSON.stringify(e))}function G6(e){if(!e)return null;if(e==="triangledown")return AX;const t=`symbol${e.charAt(0).toUpperCase()+e.slice(1)}`;return j6[t]||null}function Vb(e,t,n=null){const r=new Set;if(!n){if(!t.length)return r;const i=t.join("|");n=new RegExp(`(?:{{)?(?:#if *)?((?:${i}):\\w+)`,"g")}for(const i of Object.values(e)){const o=typeof i;let a=[];if(o==="string"){let s;for(;(s=n.exec(i))!==null;)a.push(s[1])}else if(i!==null&&o==="object")a=Vb(i,t,n);else continue;for(let s of a)r.add(s)}return r}function kg(e,t,n,r=!0){const i=typeof e;if(Array.isArray(e))return e.map(o=>kg(o,t,n,r));if(i==="object"&&e!==null)return Object.keys(e).reduce((o,a)=>(o[a]=kg(e[a],t,n,r),o),{});if(i!=="string")return e;{const o=t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(r){const s=new RegExp(`${o}\\|\\w+`,"g");(e.match(s)||[]).forEach(u=>console.warn(`renameFields is renaming a field that uses transform functions: was '${u}' . Verify that these transforms are still appropriate.`))}const a=new RegExp(`${o}(?!\\w+)`,"g");return e.replace(a,n)}}function PX(e,t,n){return EX(e,t,n)}function RX(e,t){return TX(e,t)}class zX{constructor(t,n,r){this._callable=_a.get(t),this._initiator=n,this._params=r||[]}getData(t,...n){const r={plot_state:t,data_layer:this._initiator};return Promise.resolve(this._callable(r,n,...this._params))}}class FX{constructor(t){this._sources=t}config_to_sources(t={},n=[],r){const i=new Map,o=Object.keys(t);let a=n.find(u=>u.type==="fetch");a||(a={type:"fetch",from:o},n.unshift(a));const s=/^\w+$/;for(let[u,c]of Object.entries(t)){if(!s.test(u))throw new Error(`Invalid namespace name: '${u}'. Must contain only alphanumeric characters`);const d=this._sources.get(c);if(!d)throw new Error(`A data layer has requested an item not found in DataSources: data type '${u}' from ${c}`);i.set(u,d),a.from.find(f=>f.split("(")[0]===u)||a.from.push(u)}let l=Array.from(a.from);for(let u of n){let{type:c,name:d,requires:f,params:h}=u;if(c!=="fetch"){let p=0;if(d||(d=u.name=`join${p}`,p+=1),i.has(d))throw new Error(`Configuration error: within a layer, join name '${d}' must be unique`);f.forEach(b=>{if(!i.has(b))throw new Error(`Data operation cannot operate on unknown provider '${b}'`)});const g=new zX(c,r,h);i.set(d,g),l.push(`${d}(${f.join(", ")})`)}}return[i,l]}getData(t,n,r){return r.length?fB(t,n,r,!0):Promise.resolve([])}}function Y6(){return{showing:!1,selector:null,content_selector:null,hide_delay:null,show:(e,t)=>(this.curtain.showing||(this.curtain.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-curtain").attr("id",`${this.id}.curtain`),this.curtain.content_selector=this.curtain.selector.append("div").attr("class","lz-curtain-content"),this.curtain.selector.append("div").attr("class","lz-curtain-dismiss").html("Dismiss").on("click",()=>this.curtain.hide()),this.curtain.showing=!0),this.curtain.update(e,t)),update:(e,t)=>{if(!this.curtain.showing)return this.curtain;clearTimeout(this.curtain.hide_delay),typeof t=="object"&&xn(this.curtain.selector,t);const n=this._getPageOrigin(),r=this.layout.height||this._total_height;return this.curtain.selector.style("top",`${n.y}px`).style("left",`${n.x}px`).style("width",`${this.parent_plot.layout.width}px`).style("height",`${r}px`),this.curtain.content_selector.style("max-width",`${this.parent_plot.layout.width-40}px`).style("max-height",`${r-40}px`),typeof e=="string"&&this.curtain.content_selector.html(e),this.curtain},hide:e=>this.curtain.showing?typeof e=="number"?(clearTimeout(this.curtain.hide_delay),this.curtain.hide_delay=setTimeout(this.curtain.hide,e),this.curtain):(this.curtain.selector.remove(),this.curtain.selector=null,this.curtain.content_selector=null,this.curtain.showing=!1,this.curtain):this.curtain}}function X6(){return{showing:!1,selector:null,content_selector:null,progress_selector:null,cancel_selector:null,show:e=>(this.loader.showing||(this.loader.selector=Ue(this.parent_plot.svg.node().parentNode).insert("div").attr("class","lz-loader").attr("id",`${this.id}.loader`),this.loader.content_selector=this.loader.selector.append("div").attr("class","lz-loader-content"),this.loader.progress_selector=this.loader.selector.append("div").attr("class","lz-loader-progress-container").append("div").attr("class","lz-loader-progress"),this.loader.showing=!0,typeof e>"u"&&(e="Loading...")),this.loader.update(e)),update:(e,t)=>{if(!this.loader.showing)return this.loader;clearTimeout(this.loader.hide_delay),typeof e=="string"&&this.loader.content_selector.html(e);const n=6,r=this._getPageOrigin(),i=this.loader.selector.node().getBoundingClientRect();return this.loader.selector.style("top",`${r.y+this.layout.height-i.height-n}px`).style("left",`${r.x+n}px`),typeof t=="number"&&this.loader.progress_selector.style("width",`${Math.min(Math.max(t,1),100)}%`),this.loader},animate:()=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!0),this.loader),setPercentCompleted:e=>(this.loader.progress_selector.classed("lz-loader-progress-animated",!1),this.loader.update(null,e)),hide:e=>this.loader.showing?typeof e=="number"?(clearTimeout(this.loader.hide_delay),this.loader.hide_delay=setTimeout(this.loader.hide,e),this.loader):(this.loader.selector.remove(),this.loader.selector=null,this.loader.content_selector=null,this.loader.progress_selector=null,this.loader.cancel_selector=null,this.loader.showing=!1,this.loader):this.loader}}function xn(e,t){t=t||{};for(let[n,r]of Object.entries(t))e.style(n,r)}function IX(e,t=500){let n;return()=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,arguments),t)}}class Sn{constructor(t,n){this.layout=t||{},this.layout.color||(this.layout.color="gray"),this.parent=n||null,this.parent_panel=null,this.parent_plot=null,this.parent_svg=null,this.parent&&(this.parent.type==="panel"?(this.parent_panel=this.parent.parent,this.parent_plot=this.parent.parent.parent,this.parent_svg=this.parent_panel):(this.parent_plot=this.parent.parent,this.parent_svg=this.parent_plot)),this.selector=null,this.button=null,this.persist=!1,this.layout.position||(this.layout.position="left")}show(){if(!(!this.parent||!this.parent.selector)){if(!this.selector){const t=["start","middle","end"].includes(this.layout.group_position)?` lz-toolbar-group-${this.layout.group_position}`:"";this.selector=this.parent.selector.append("div").attr("class",`lz-toolbar-${this.layout.position}${t}`),this.layout.style&&xn(this.selector,this.layout.style),typeof this.initialize=="function"&&this.initialize()}return this.button&&this.button.status==="highlighted"&&this.button.menu.show(),this.selector.style("visibility","visible"),this.update(),this.position()}}update(){}position(){return this.button&&this.button.menu.position(),this}shouldPersist(){return this.persist?!0:!!(this.button&&this.button.persist)}hide(){return!this.selector||this.shouldPersist()?this:(this.button&&this.button.menu.hide(),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.button&&this.button.menu&&this.button.menu.destroy(),this.selector.remove(),this.selector=null,this.button=null,this):this}}class gr{constructor(t){if(!(t instanceof Sn))throw new Error("Unable to create toolbar widget button, invalid parent");this.parent=t,this.parent_panel=this.parent.parent_panel,this.parent_plot=this.parent.parent_plot,this.parent_svg=this.parent.parent_svg,this.parent_toolbar=this.parent.parent,this.selector=null,this.tag="a",this.html="",this.title="",this.color="gray",this.style={},this.persist=!1,this.permanent=!1,this.status="",this.menu={outer_selector:null,inner_selector:null,scroll_position:0,hidden:!0,show:()=>(this.menu.outer_selector||(this.menu.outer_selector=Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class",`lz-toolbar-menu lz-toolbar-menu-${this.color}`).attr("id",`${this.parent_svg.getBaseId()}.toolbar.menu`),this.menu.inner_selector=this.menu.outer_selector.append("div").attr("class","lz-toolbar-menu-content"),this.menu.inner_selector.on("scroll",()=>{this.menu.scroll_position=this.menu.inner_selector.node().scrollTop})),this.menu.outer_selector.style("visibility","visible"),this.menu.hidden=!1,this.menu.update()),update:()=>this.menu.outer_selector?(this.menu.populate(),this.menu.inner_selector&&(this.menu.inner_selector.node().scrollTop=this.menu.scroll_position),this.menu.position()):this.menu,position:()=>{if(!this.menu.outer_selector)return this.menu;this.menu.outer_selector.style("height",null);const n=3,r=20,i=14,o=this.parent_svg._getPageOrigin(),a=document.documentElement.scrollTop||document.body.scrollTop,s=this.parent_plot.getContainerOffset(),l=this.parent_toolbar.selector.node().getBoundingClientRect(),u=this.selector.node().getBoundingClientRect(),c=this.menu.outer_selector.node().getBoundingClientRect(),d=this.menu.inner_selector.node().scrollHeight;let f,h;this.parent_toolbar.type==="panel"?(f=o.y+l.height+2*n,h=Math.max(o.x+this.parent_plot.layout.width-c.width-n,o.x+n)):(f=u.bottom+a+n-s.top,h=Math.max(u.left+u.width-c.width-s.left,o.x+n));const p=Math.max(this.parent_plot.layout.width-2*n-r,r),g=p,b=p-4*n,v=Math.max(this.parent_svg.layout.height-10*n-i,i),x=Math.min(d+i,v);return this.menu.outer_selector.style("top",`${f}px`).style("left",`${h}px`).style("max-width",`${g}px`).style("max-height",`${v}px`).style("height",`${x}px`),this.menu.inner_selector.style("max-width",`${b}px`),this.menu.inner_selector.node().scrollTop=this.menu.scroll_position,this.menu},hide:()=>this.menu.outer_selector?(this.menu.outer_selector.style("visibility","hidden"),this.menu.hidden=!0,this.menu):this.menu,destroy:()=>this.menu.outer_selector?(this.menu.inner_selector.remove(),this.menu.outer_selector.remove(),this.menu.inner_selector=null,this.menu.outer_selector=null,this.menu):this.menu,populate:()=>{throw new Error("Method must be implemented")},setPopulate:n=>(typeof n=="function"?(this.menu.populate=n,this.setOnclick(()=>{this.menu.hidden?(this.menu.show(),this.highlight().update(),this.persist=!0):(this.menu.hide(),this.highlight(!1).update(),this.permanent||(this.persist=!1))})):this.setOnclick(),this)}}setColor(t){return typeof t<"u"&&(["gray","red","orange","yellow","green","blue","purple"].includes(t)?this.color=t:this.color="gray"),this}setPermanent(t){return typeof t>"u"?t=!0:t=!!t,this.permanent=t,this.permanent&&(this.persist=!0),this}shouldPersist(){return this.permanent||this.persist}setStyle(t){return typeof t<"u"&&(this.style=t),this}getClass(){const t=["start","middle","end"].includes(this.parent.layout.group_position)?` lz-toolbar-button-group-${this.parent.layout.group_position}`:"";return`lz-toolbar-button lz-toolbar-button-${this.color}${this.status?`-${this.status}`:""}${t}`}setStatus(t){return typeof t<"u"&&["","highlighted","disabled"].includes(t)&&(this.status=t),this.update()}highlight(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("highlighted"):this.status==="highlighted"?this.setStatus(""):this}disable(t){return typeof t>"u"?t=!0:t=!!t,t?this.setStatus("disabled"):this.status==="disabled"?this.setStatus(""):this}onmouseover(){}setOnMouseover(t){return typeof t=="function"?this.onmouseover=t:this.onmouseover=function(){},this}onmouseout(){}setOnMouseout(t){return typeof t=="function"?this.onmouseout=t:this.onmouseout=function(){},this}onclick(){}setOnclick(t){return typeof t=="function"?this.onclick=t:this.onclick=function(){},this}setTitle(t){return typeof t<"u"&&(this.title=t.toString()),this}setHtml(t){return typeof t<"u"&&(this.html=t.toString()),this}show(){if(this.parent)return this.selector||(this.selector=this.parent.selector.append(this.tag).attr("class",this.getClass())),this.update()}preUpdate(){return this}update(){return this.selector?(this.preUpdate(),this.selector.attr("class",this.getClass()).attr("title",this.title).on("mouseover",this.status==="disabled"?null:this.onmouseover).on("mouseout",this.status==="disabled"?null:this.onmouseout).on("click",this.status==="disabled"?null:this.onclick).html(this.html).call(xn,this.style),this.menu.update(),this.postUpdate(),this):this}postUpdate(){return this}hide(){return this.selector&&!this.shouldPersist()&&(this.selector.remove(),this.selector=null),this}}class BX extends Sn{show(){return this.div_selector||(this.div_selector=this.parent.selector.append("div").attr("class",`lz-toolbar-title lz-toolbar-${this.layout.position}`),this.title_selector=this.div_selector.append("h3")),this.update()}update(){let t=this.layout.title.toString();return this.layout.subtitle&&(t+=` <small>${this.layout.subtitle}</small>`),this.title_selector.html(t),this}}class OX extends Sn{update(){return!isNaN(this.parent_plot.state.start)&&!isNaN(this.parent_plot.state.end)&&this.parent_plot.state.start!==null&&this.parent_plot.state.end!==null?(this.selector.style("display",null),this.selector.html(Gb(this.parent_plot.state.end-this.parent_plot.state.start,null,!0))):this.selector.style("display","none"),this.layout.class&&this.selector.attr("class",this.layout.class),this.layout.style&&xn(this.selector,this.layout.style),this}}class NX extends Sn{constructor(t,n){if(super(t,n),!this.parent_panel)throw new Error("Filter widget can only be used in panel toolbars");if(this._data_layer=this.parent_panel.data_layers[t.layer_name],!this._data_layer)throw new Error(`Filter widget could not locate the specified layer_name: '${t.layer_name}'`);if(this._event_name=t.custom_event_name||"widget_filter_field_action",this._field=t.field,this._field_display_html=t.field_display_html,this._operator=t.operator,this._filter_id=null,this._data_type=t.data_type||"number",!["number","string"].includes(this._data_type))throw new Error("Filter must be either string or number");this._value_selector=null}_getTarget(){this._data_layer.layout.filters||(this._data_layer.layout.filters=[]);let t=this._data_layer.layout.filters.find(n=>n.field===this._field&&n.operator===this._operator&&(!this._filter_id||n.id===this._filter_id));return t||(t={field:this._field,operator:this._operator,value:null},this._filter_id&&(t.id=this._filter_id),this._data_layer.layout.filters.push(t)),t}_clearFilter(){if(this._data_layer.layout.filters){const t=this._data_layer.layout.filters.indexOf(this._getTarget());this._data_layer.layout.filters.splice(t,1)}}_setFilter(t){if(t===null)this._value_selector.style("border","1px solid red").style("color","red"),this._clearFilter();else{const n=this._getTarget();n.value=t}this.parent_svg.emit(this._event_name,{field:this._field,operator:this._operator,value:t,filter_id:this._filter_id},!0)}_getValue(){let t=this._value_selector.property("value");return t===null||t===""||this._data_type==="number"&&(t=+t,Number.isNaN(t))?null:t}update(){this._value_selector||(this.selector.style("padding","0 6px"),this.selector.append("span").html(this._field_display_html).style("background","#fff").style("padding-left","3px"),this.selector.append("span").text(this._operator).style("padding","0 3px").style("background","#fff"),this._value_selector=this.selector.append("input").attr("size",this.layout.input_size||4).on("input",IX(()=>{this._value_selector.style("border",null).style("color",null);const t=this._getValue();this._setFilter(t),this.parent_panel.render()},750)))}}class K6 extends Sn{constructor(t,n){super(t,n),this._filename=this.layout.filename||"locuszoom.svg",this._button_html=this.layout.button_html||"Save SVG",this._button_title=this.layout.button_title||"Download hi-res image",this._event_name=t.custom_event_name||"widget_save_svg"}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this._button_html).setTitle(this._button_title).setOnMouseover(()=>{this.button.selector.classed("lz-toolbar-button-gray-disabled",!0).html("Preparing Image"),this._getBlobUrl().then(t=>{const n=this.button.selector.attr("href");n&&URL.revokeObjectURL(n),this.button.selector.attr("href",t).classed("lz-toolbar-button-gray-disabled",!1).classed("lz-toolbar-button-gray-highlighted",!0).html(this._button_html)})}).setOnMouseout(()=>{this.button.selector.classed("lz-toolbar-button-gray-highlighted",!1)}),this.button.show(),this.button.selector.attr("href-lang","image/svg+xml").attr("download",this._filename).on("click",()=>this.parent_svg.emit(this._event_name,{filename:this._filename},!0)),this)}_getCSS(t){const n=/^svg\.lz-locuszoom\s*/;let r="";for(let i=0;i<document.styleSheets.length;i++){const o=document.styleSheets[i];try{if(!o.cssRules)continue}catch(s){if(s.name!=="SecurityError")throw s;continue}let a=o.cssRules;for(let s=0;s<a.length;s++){const l=a[s];l.selectorText&&l.selectorText.match(n)&&(r+=l.cssText)}}return r}_appendCSS(t,n){var r=document.createElement("style");r.setAttribute("type","text/css"),r.innerHTML=t;var i=n.hasChildNodes()?n.children[0]:null;n.insertBefore(r,i)}_getDimensions(){let{width:t,height:n}=this.parent_plot.svg.node().getBoundingClientRect();const i=2400/t;return[i*t,i*n]}_generateSVG(){return new Promise(t=>{let n=this.parent_plot.svg.node().cloneNode(!0);n.setAttribute("xlink","http://www.w3.org/1999/xlink"),n=Ue(n),n.selectAll("g.lz-curtain").remove(),n.selectAll("g.lz-mouse_guide").remove(),n.selectAll("g.tick text").each(function(){const s=+Ue(this).attr("dy").substring(-2).slice(0,-2)*10;Ue(this).attr("dy",s)});const r=new XMLSerializer;n=n.node();const[i,o]=this._getDimensions();n.setAttribute("width",i),n.setAttribute("height",o),this._appendCSS(this._getCSS(n),n);let a=r.serializeToString(n);t(a)})}_getBlobUrl(){return this._generateSVG().then(t=>{const n=new Blob([t],{type:"image/svg+xml"});return URL.createObjectURL(n)})}}class LX extends K6{constructor(t,n){super(...arguments),this._filename=this.layout.filename||"locuszoom.png",this._button_html=this.layout.button_html||"Save PNG",this._button_title=this.layout.button_title||"Download image",this._event_name=t.custom_event_name||"widget_save_png"}_getBlobUrl(){return super._getBlobUrl().then(t=>{const n=document.createElement("canvas"),r=n.getContext("2d"),[i,o]=this._getDimensions();return n.width=i,n.height=o,new Promise((a,s)=>{const l=new Image;l.onload=()=>{r.drawImage(l,0,0,i,o),URL.revokeObjectURL(t),n.toBlob(u=>{a(URL.createObjectURL(u))})},l.src=t})})}}class DX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml("×").setTitle("Remove panel").setOnclick(()=>{if(!this.layout.suppress_confirm&&!confirm("Are you sure you want to remove this panel? This cannot be undone."))return!1;const t=this.parent_panel;return t.toolbar.hide(!0),Ue(t.parent.svg.node().parentNode).on(`mouseover.${t.getBaseId()}.toolbar`,null),Ue(t.parent.svg.node().parentNode).on(`mouseout.${t.getBaseId()}.toolbar`,null),t.parent.removePanel(t.id)}),this.button.show(),this)}}class HX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===0;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▴").setTitle("Move panel up").setOnclick(()=>{this.parent_panel.moveUp(),this.update()}),this.button.show(),this.update()}}class UX extends Sn{update(){if(this.button){const t=this.parent_panel.layout.y_index===this.parent_plot._panel_ids_by_y_index.length-1;return this.button.disable(t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml("▾").setTitle("Move panel down").setOnclick(()=>{this.parent_panel.moveDown(),this.update()}),this.button.show(),this.update()}}class jX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=5e4),typeof t.button_html!="string"&&(t.button_html=t.step>0?">":"<"),typeof t.button_title!="string"&&(t.button_title=`Shift region by ${t.step>0?"+":"-"}${Gb(Math.abs(t.step),null,!0)}`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add shift_region toolbar widget: plot state does not have region bounds")}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start+this.layout.step,1),end:this.parent_plot.state.end+this.layout.step})}),this.button.show(),this)}}class WX extends Sn{constructor(t,n){if((isNaN(t.step)||t.step===0)&&(t.step=.2),typeof t.button_html!="string"&&(t.button_html=t.step>0?"z–":"z+"),typeof t.button_title!="string"&&(t.button_title=`Zoom region ${t.step>0?"out":"in"} by ${(Math.abs(t.step)*100).toFixed(1)}%`),super(t,n),isNaN(this.parent_plot.state.start)||isNaN(this.parent_plot.state.end))throw new Error("Unable to add zoom_region toolbar widget: plot state does not have region bounds")}update(){if(this.button){let t=!0;const n=this.parent_plot.state.end-this.parent_plot.state.start;return this.layout.step>0&&!isNaN(this.parent_plot.layout.max_region_scale)&&n>=this.parent_plot.layout.max_region_scale&&(t=!1),this.layout.step<0&&!isNaN(this.parent_plot.layout.min_region_scale)&&n<=this.parent_plot.layout.min_region_scale&&(t=!1),this.button.disable(!t),this}return this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title).setOnclick(()=>{const t=this.parent_plot.state.end-this.parent_plot.state.start,n=1+this.layout.step;let r=t*n;isNaN(this.parent_plot.layout.max_region_scale)||(r=Math.min(r,this.parent_plot.layout.max_region_scale)),isNaN(this.parent_plot.layout.min_region_scale)||(r=Math.max(r,this.parent_plot.layout.min_region_scale));const i=Math.floor((r-t)/2);this.parent_plot.applyState({start:Math.max(this.parent_plot.state.start-i,1),end:this.parent_plot.state.end+i})}),this.button.show(),this}}class VX extends Sn{update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html).setTitle(this.layout.button_title),this.button.menu.setPopulate(()=>{this.button.menu.inner_selector.html(this.layout.menu_html)}),this.button.show(),this)}}class qX extends Sn{constructor(t){super(...arguments)}update(){return this.button?this:(this.button=new gr(this).setColor(this.layout.color).setHtml(this.layout.button_html||"Resize to Data").setTitle(this.layout.button_title||"Automatically resize this panel to show all data available").setOnclick(()=>{this.parent_panel.scaleHeightToData(),this.update()}),this.button.show(),this)}}class GX extends Sn{update(){const t=this.parent_panel.legend.layout.hidden?"Show Legend":"Hide Legend";return this.button?(this.button.setHtml(t).show(),this.parent.position(),this):(this.button=new gr(this).setColor(this.layout.color).setTitle("Show or hide the legend for this panel").setOnclick(()=>{this.parent_panel.legend.layout.hidden=!this.parent_panel.legend.layout.hidden,this.parent_panel.legend.render(),this.update()}),this.update())}}class YX extends Sn{constructor(t,n){typeof t.button_html!="string"&&(t.button_html="Display options..."),typeof t.button_title!="string"&&(t.button_title="Control how plot items are displayed"),super(...arguments),this._event_name=t.custom_event_name||"widget_display_options_choice";const r=t.fields_whitelist||["color","fill_opacity","filters","label","legend","point_shape","point_size","tooltip","tooltip_positioning"],i=this.parent_panel.data_layers[t.layer_name];if(!i)throw new Error(`Display options could not locate the specified layer_name: '${t.layer_name}'`);const o=i.layout,a={};r.forEach(s=>{const l=o[s];l!==void 0&&(a[s]=at(l))}),this._selected_item="default",this.button=new gr(this).setColor(t.color).setHtml(t.button_html).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const s=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const l=this.button.menu.inner_selector.append("table"),u=this.layout,c=(f,h,p)=>{const g=l.append("tr"),b=`${s}${p}`;g.append("td").append("input").attr("id",b).attr("type","radio").attr("name",`display-option-${s}`).attr("value",p).style("margin",0).property("checked",p===this._selected_item).on("click",()=>{r.forEach(x=>{const y=typeof h[x]<"u";i.layout[x]=y?h[x]:a[x]}),this.parent_svg.emit(this._event_name,{choice:f},!0),this._selected_item=p,this.parent_panel.render();const v=this.parent_panel.legend;v&&v.render()}),g.append("td").append("label").style("font-weight","normal").attr("for",b).text(f)},d=u.default_config_display_name||"Default style";return c(d,a,"default"),u.options.forEach((f,h)=>c(f.display_name,f.display,h)),this})}update(){return this.button.show(),this}}class XX extends Sn{constructor(t,n){if(typeof t.button_html!="string"&&(t.button_html="Set option..."),typeof t.button_title!="string"&&(t.button_title="Choose an option to customize the plot"),super(t,n),this.parent_panel)throw new Error("This widget is designed to set global options, so it can only be used at the top (plot) level");if(!t.state_field)throw new Error("Must specify the `state_field` that this widget controls");if(this._event_name=t.custom_event_name||"widget_set_state_choice",this._selected_item=this.parent_plot.state[t.state_field]||t.options[0].value,!t.options.find(r=>r.value===this._selected_item))throw new Error("There is an existing state value that does not match the known values in this widget");this.button=new gr(this).setColor(t.color).setHtml(t.button_html+(t.show_selected?this._selected_item:"")).setTitle(t.button_title).setOnclick(()=>{this.button.menu.populate()}),this.button.menu.setPopulate(()=>{const r=Math.floor(Math.random()*1e4).toString();this.button.menu.inner_selector.html("");const i=this.button.menu.inner_selector.append("table"),o=(a,s,l)=>{const u=i.append("tr"),c=`${r}${l}`;u.append("td").append("input").attr("id",c).attr("type","radio").attr("name",`set-state-${r}`).attr("value",l).style("margin",0).property("checked",s===this._selected_item).on("click",()=>{const d={};d[t.state_field]=s,this._selected_item=s,this.parent_plot.applyState(d),this.button.setHtml(t.button_html+(t.show_selected?this._selected_item:"")),this.parent_svg.emit(this._event_name,{choice_name:a,choice_value:s,state_field:t.state_field},!0)}),u.append("td").append("label").style("font-weight","normal").attr("for",c).text(a)};return t.options.forEach((a,s)=>o(a.display_name,a.value,s)),this})}update(){return this.button.show(),this}}const KX=Object.freeze(Object.defineProperty({__proto__:null,BaseWidget:Sn,_Button:gr,display_options:YX,download:K6,download_png:LX,filter_field:NX,menu:VX,move_panel_down:UX,move_panel_up:HX,region_scale:OX,remove_panel:DX,resize_to_data:qX,set_state:XX,shift_region:jX,title:BX,toggle_legend:GX,zoom_region:WX},Symbol.toStringTag,{value:"Module"})),qb=new Cv;for(let[e,t]of Object.entries(KX))qb.add(e,t);class Z6{constructor(t){this.parent=t,this.id=`${this.parent.getBaseId()}.toolbar`,this.type=this.parent.parent?"panel":"plot",this.parent_plot=this.parent.parent_plot,this.selector=null,this.widgets=[],this.hide_timeout=null,this.persist=!1,this.initialize()}initialize(){const t=this.parent.layout.toolbar.widgets;return Array.isArray(t)&&t.forEach(n=>{this.addWidget(n)}),this.type==="panel"&&Ue(this.parent.parent.svg.node().parentNode).on(`mouseover.${this.id}`,()=>{clearTimeout(this.hide_timeout),(!this.selector||this.selector.style("visibility")==="hidden")&&this.show()}).on(`mouseout.${this.id}`,()=>{clearTimeout(this.hide_timeout),this.hide_timeout=setTimeout(()=>{this.hide()},300)}),this}addWidget(t){try{const n=qb.create(t.type,t,this);return this.widgets.push(n),n}catch(n){console.warn("Failed to create widget"),console.error(n)}}shouldPersist(){if(this.persist)return!0;let t=!1;return this.widgets.forEach(n=>{t=t||n.shouldPersist()}),t=t||this.parent_plot._panel_boundaries.dragging||this.parent_plot._interaction.dragging,!!t}show(){if(!this.selector){switch(this.type){case"plot":this.selector=Ue(this.parent.svg.node().parentNode).insert("div",":first-child");break;case"panel":this.selector=Ue(this.parent.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip, .lz-toolbar-menu, .lz-curtain").classed("lz-panel-toolbar",!0);break;default:throw new Error(`Toolbar cannot be a child of ${this.type}`)}this.selector.classed("lz-toolbar",!0).classed(`lz-${this.type}-toolbar`,!0).attr("id",this.id)}return this.widgets.forEach(t=>t.show()),this.selector.style("visibility","visible"),this.update()}update(){return this.selector?(this.widgets.forEach(t=>t.update()),this.position()):this}position(){if(!this.selector)return this;if(this.type==="panel"){const t=this.parent._getPageOrigin(),n=`${(t.y+3.5).toString()}px`,r=`${t.x.toString()}px`,i=`${(this.parent_plot.layout.width-4).toString()}px`;this.selector.style("position","absolute").style("top",n).style("left",r).style("width",i)}return this.widgets.forEach(t=>t.position()),this}hide(){return!this.selector||this.shouldPersist()?this:(this.widgets.forEach(t=>t.hide()),this.selector.style("visibility","hidden"),this)}destroy(t){return typeof t>"u"&&(t=!1),this.selector?this.shouldPersist()&&!t?this:(this.widgets.forEach(n=>n.destroy(!0)),this.widgets=[],this.selector.remove(),this.selector=null,this):this}}const ZX={orientation:"vertical",origin:{x:0,y:0},width:10,height:10,padding:5,label_size:14,hidden:!1};class JX{constructor(t){return this.parent=t,this.id=`${this.parent.getBaseId()}.legend`,this.parent.layout.legend=qt(this.parent.layout.legend||{},ZX),this.layout=this.parent.layout.legend,this.selector=null,this.background_rect=null,this.elements=[],this.elements_group=null,this.hidden=!1,this.render()}render(){this.selector||(this.selector=this.parent.svg.group.append("g").attr("id",`${this.parent.getBaseId()}.legend`).attr("class","lz-legend")),this.background_rect||(this.background_rect=this.selector.append("rect").attr("width",100).attr("height",100).attr("class","lz-legend-background")),this.elements_group||(this.elements_group=this.selector.append("g")),this.elements.forEach(a=>a.remove()),this.elements=[];const t=+this.layout.padding||1;let n=t,r=t,i=0;this.parent._data_layer_ids_by_z_index.slice().reverse().forEach(a=>{const s=this.parent.data_layers[a].layout.legend;Array.isArray(s)&&s.forEach(l=>{const u=this.elements_group.append("g").attr("transform",`translate(${n}, ${r})`),c=+l.label_size||+this.layout.label_size;let d=0,f=c/2+t/2;i=Math.max(i,c+t);const h=l.shape||"",p=G6(h);if(h==="line"){const b=+l.length||16,v=c/4+t/2;u.append("path").attr("class",l.class||"").attr("d",`M0,${v}L${b},${v}`).call(xn,l.style||{}),d=b+t}else if(h==="rect"){const b=+l.width||16,v=+l.height||b;u.append("rect").attr("class",l.class||"").attr("width",b).attr("height",v).attr("fill",l.color||{}).call(xn,l.style||{}),d=b+t,i=Math.max(i,v+t)}else if(h==="ribbon"){const b=+l.width||25,v=+l.height||b,x=(l.orientation||"vertical")==="horizontal";let y=l.color_stops;const _=u.append("g"),S=_.append("g"),$=_.append("g");let w=0;if(l.tick_labels){let T;x?T=[0,b*y.length-1]:T=[v*y.length-1,0];const M=au().domain(qo(l.tick_labels)).range(T),P=(x?G5:Ev)(M).tickSize(3).tickValues(l.tick_labels).tickFormat(C=>C);$.call(P).attr("class","lz-axis"),w=$.node().getBoundingClientRect().height}x?($.attr("transform",`translate(0, ${w})`),S.attr("transform",`translate(0, ${w})`)):(_.attr("transform","translate(5, 0)"),$.attr("transform",`translate(${b}, 0)`)),x||(y=y.slice(),y.reverse());for(let T=0;T<y.length;T++){const M=y[T],P=x?`translate(${b*T}, 0)`:`translate(0, ${v*T})`;S.append("rect").attr("class",l.class||"").attr("stroke","black").attr("transform",P).attr("stroke-width",.5).attr("width",b).attr("height",v).attr("fill",M).call(xn,l.style||{})}if(!x&&l.label)throw new Error("Legend labels not supported for vertical ribbons (use a separate legend item as text instead)");d=b*y.length+t,f+=w}else if(p){const b=+l.size||40,v=Math.ceil(Math.sqrt(b/Math.PI));u.append("path").attr("class",l.class||"").attr("d",Nb().size(b).type(p)).attr("transform",`translate(${v}, ${v+t/2})`).attr("fill",l.color||{}).call(xn,l.style||{}),d=2*v+t,f=Math.max(2*v+t/2,f),i=Math.max(i,2*v+t)}u.append("text").attr("text-anchor","left").attr("class","lz-label").attr("x",d).attr("y",f).style("font-size",c).text(l.label);const g=u.node().getBoundingClientRect();if(this.layout.orientation==="vertical")r+=g.height+t,i=0;else{const b=this.layout.origin.x+n+g.width;n>t&&b>this.parent.parent.layout.width&&(r+=i,n=t,u.attr("transform",`translate(${n}, ${r})`)),n+=g.width+3*t}this.elements.push(u)})});const o=this.elements_group.node().getBoundingClientRect();return this.layout.width=o.width+2*this.layout.padding,this.layout.height=o.height+2*this.layout.padding,this.background_rect.attr("width",this.layout.width).attr("height",this.layout.height),this.selector.style("visibility",this.layout.hidden?"hidden":"visible"),this.position()}position(){if(!this.selector)return this;const t=this.selector.node().getBoundingClientRect();isNaN(+this.layout.pad_from_bottom)||(this.layout.origin.y=this.parent.layout.height-t.height-+this.layout.pad_from_bottom),isNaN(+this.layout.pad_from_right)||(this.layout.origin.x=this.parent.parent.layout.width-t.width-+this.layout.pad_from_right),this.selector.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`)}hide(){this.layout.hidden=!0,this.render()}show(){this.layout.hidden=!1,this.render()}}const QX={id:"",tag:"custom_data_type",title:{text:"",style:{},x:10,y:22},y_index:null,min_height:1,height:1,origin:{x:0,y:null},margin:{top:0,right:0,bottom:0,left:0},background_click:"clear_selections",toolbar:{widgets:[]},cliparea:{height:0,width:0,origin:{x:0,y:0}},axes:{x:{},y1:{},y2:{}},legend:null,interaction:{drag_background_to_pan:!1,drag_x_ticks_to_scale:!1,drag_y1_ticks_to_scale:!1,drag_y2_ticks_to_scale:!1,scroll_to_zoom:!1,x_linked:!1,y1_linked:!1,y2_linked:!1},show_loading_indicator:!0,data_layers:[]};class od{constructor(t,n){if(typeof t!="object")throw new Error("Unable to create panel, invalid layout");if(this.parent=n||null,this.parent_plot=n,typeof t.id!="string"||!t.id)throw new Error('Panel layouts must specify "id"');if(this.parent&&typeof this.parent.panels[t.id]<"u")throw new Error(`Cannot create panel with id [${t.id}]; panel with that id already exists`);this.id=t.id,this._initialized=!1,this._layout_idx=null,this.svg={},this.layout=qt(t||{},QX),this.parent?(this.state=this.parent.state,this._state_id=this.id,this.state[this._state_id]=this.state[this._state_id]||{}):(this.state=null,this._state_id=null),this.data_layers={},this._data_layer_ids_by_z_index=[],this._data_promises=[],this.x_scale=null,this.y1_scale=null,this.y2_scale=null,this.x_extent=null,this.y1_extent=null,this.y2_extent=null,this.x_ticks=[],this.y1_ticks=[],this.y2_ticks=[],this._zoom_timeout=null,this._event_hooks={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n,r){if(r=r||!1,typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);typeof n=="boolean"&&arguments.length===2&&(r=n,n=null);const o={sourceID:this.getBaseId(),target:this,data:n||null};return this._event_hooks[t]&&this._event_hooks[t].forEach(a=>{a.call(this,o)}),r&&this.parent&&this.parent.emit(t,o),this}setTitle(t){if(typeof this.layout.title=="string"){const n=this.layout.title;this.layout.title={text:n,x:0,y:0,style:{}}}return typeof t=="string"?this.layout.title.text=t:typeof t=="object"&&t!==null&&(this.layout.title=qt(t,this.layout.title)),this.layout.title.text.length?this.title.attr("display",null).attr("x",parseFloat(this.layout.title.x)).attr("y",parseFloat(this.layout.title.y)).text(this.layout.title.text).call(xn,this.layout.title.style):this.title.attr("display","none"),this}addDataLayer(t){if(typeof t!="object"||typeof t.id!="string"||!t.id.length)throw new Error("Invalid data layer layout");if(typeof this.data_layers[t.id]<"u")throw new Error(`Cannot create data_layer with id '${t.id}'; data layer with that id already exists in the panel`);if(typeof t.type!="string")throw new Error("Invalid data layer type");typeof t.y_axis=="object"&&(typeof t.y_axis.axis>"u"||![1,2].includes(t.y_axis.axis))&&(t.y_axis.axis=1);const n=Yb.create(t.type,t,this);if(this.data_layers[n.id]=n,n.layout.z_index!==null&&!isNaN(n.layout.z_index)&&this._data_layer_ids_by_z_index.length>0)n.layout.z_index<0&&(n.layout.z_index=Math.max(this._data_layer_ids_by_z_index.length+n.layout.z_index,0)),this._data_layer_ids_by_z_index.splice(n.layout.z_index,0,n.id),this._data_layer_ids_by_z_index.forEach((i,o)=>{this.data_layers[i].layout.z_index=o});else{const i=this._data_layer_ids_by_z_index.push(n.id);this.data_layers[n.id].layout.z_index=i-1}let r=null;return this.layout.data_layers.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.data_layers.push(this.data_layers[n.id].layout)-1),this.data_layers[n.id]._layout_idx=r,this.data_layers[n.id]}removeDataLayer(t){const n=this.data_layers[t];if(!n)throw new Error(`Unable to remove data layer, ID not found: ${t}`);return n.destroyAllTooltips(),n.svg.container&&n.svg.container.remove(),this.layout.data_layers.splice(n._layout_idx,1),delete this.state[n._state_id],delete this.data_layers[t],this._data_layer_ids_by_z_index.splice(this._data_layer_ids_by_z_index.indexOf(t),1),this.applyDataLayerZIndexesToDataLayerLayouts(),this.layout.data_layers.forEach((r,i)=>{this.data_layers[r.id]._layout_idx=i}),this}clearSelections(){return this._data_layer_ids_by_z_index.forEach(t=>{this.data_layers[t].setAllElementStatus("selected",!1)}),this}render(){this.svg.container.attr("transform",`translate(${this.layout.origin.x}, ${this.layout.origin.y})`),this.svg.clipRect.attr("width",this.parent_plot.layout.width).attr("height",this.layout.height);const{cliparea:t}=this.layout,{margin:n}=this.layout;this.inner_border.attr("x",n.left).attr("y",n.top).attr("width",this.parent_plot.layout.width-(n.left+n.right)).attr("height",this.layout.height-(n.top+n.bottom)),this.layout.inner_border&&this.inner_border.style("stroke-width",1).style("stroke",this.layout.inner_border),this.setTitle(),this.generateExtents();const r=function(l,u){const c=Math.pow(-10,u),d=Math.pow(-10,-3),f=Math.pow(10,-3),h=Math.pow(10,u);return l===1/0&&(l=h),l===-1/0&&(l=c),l===0&&(l=f),l>0&&(l=Math.max(Math.min(l,h),f)),l<0&&(l=Math.max(Math.min(l,d),c)),l},i={},o=this.layout.axes;if(this.x_extent){const l={start:0,end:this.layout.cliparea.width};o.x.range&&(l.start=o.x.range.start||l.start,l.end=o.x.range.end||l.end),i.x=[l.start,l.end],i.x_shifted=[l.start,l.end]}if(this.y1_extent){const l={start:t.height,end:0};o.y1.range&&(l.start=o.y1.range.start||l.start,l.end=o.y1.range.end||l.end),i.y1=[l.start,l.end],i.y1_shifted=[l.start,l.end]}if(this.y2_extent){const l={start:t.height,end:0};o.y2.range&&(l.start=o.y2.range.start||l.start,l.end=o.y2.range.end||l.end),i.y2=[l.start,l.end],i.y2_shifted=[l.start,l.end]}let{_interaction:a}=this.parent;const s=a.dragging;if(a.panel_id&&(a.panel_id===this.id||a.linked_panel_ids.includes(this.id))){let l,u=null;if(a.zooming&&typeof this.x_scale=="function"){const c=Math.abs(this.x_extent[1]-this.x_extent[0]),d=Math.round(this.x_scale.invert(i.x_shifted[1]))-Math.round(this.x_scale.invert(i.x_shifted[0]));let f=a.zooming.scale;const h=Math.floor(d*(1/f));f<1&&!isNaN(this.parent.layout.max_region_scale)?f=1/(Math.min(h,this.parent.layout.max_region_scale)/d):f>1&&!isNaN(this.parent.layout.min_region_scale)&&(f=1/(Math.max(h,this.parent.layout.min_region_scale)/d));const p=Math.floor(c*f);l=a.zooming.center-n.left-this.layout.origin.x;const g=l/t.width,b=Math.max(Math.floor(this.x_scale.invert(i.x_shifted[0])-(p-d)*g),1);i.x_shifted=[this.x_scale(b),this.x_scale(b+p)]}else if(s)switch(s.method){case"background":i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x;break;case"x_tick":Ce&&Ce.shiftKey?(i.x_shifted[0]=+s.dragged_x,i.x_shifted[1]=t.width+s.dragged_x):(l=s.start_x-n.left-this.layout.origin.x,u=r(l/(l+s.dragged_x),3),i.x_shifted[0]=0,i.x_shifted[1]=Math.max(t.width*(1/u),1));break;case"y1_tick":case"y2_tick":{const c=`y${s.method[1]}_shifted`;Ce&&Ce.shiftKey?(i[c][0]=t.height+s.dragged_y,i[c][1]=+s.dragged_y):(l=t.height-(s.start_y-n.top-this.layout.origin.y),u=r(l/(l-s.dragged_y),3),i[c][0]=t.height,i[c][1]=t.height-t.height*(1/u))}}}if(["x","y1","y2"].forEach(l=>{this[`${l}_extent`]&&(this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[`${l}_shifted`]),this[`${l}_extent`]=[this[`${l}_scale`].invert(i[l][0]),this[`${l}_scale`].invert(i[l][1])],this[`${l}_scale`]=au().domain(this[`${l}_extent`]).range(i[l]),this.renderAxis(l))}),this.layout.interaction.scroll_to_zoom){const l=()=>{if(!(Ce.shiftKey||Ce.altKey)){this.parent._canInteract(this.id)&&this.loader.show("Press <tt>[SHIFT]</tt> or <tt>[ALT]</tt> while scrolling to zoom").hide(1e3);return}if(Ce.preventDefault(),!this.parent._canInteract(this.id))return;const u=lr(this.svg.container.node()),c=Math.max(-1,Math.min(1,Ce.wheelDelta||-Ce.detail||-Ce.deltaY));c!==0&&(this.parent._interaction={panel_id:this.id,linked_panel_ids:this.getLinkedPanelIds("x"),zooming:{scale:c<1?.9:1.1,center:u[0]}},this.render(),a=this.parent._interaction,a.linked_panel_ids.forEach(d=>{this.parent.panels[d].render()}),this._zoom_timeout!==null&&clearTimeout(this._zoom_timeout),this._zoom_timeout=setTimeout(()=>{this.parent._interaction={},this.parent.applyState({start:this.x_extent[0],end:this.x_extent[1]})},500))};this.svg.container.on("wheel.zoom",l).on("mousewheel.zoom",l).on("DOMMouseScroll.zoom",l)}return this._data_layer_ids_by_z_index.forEach(l=>{this.data_layers[l].draw().render()}),this.legend&&this.legend.render(),this}addBasicLoader(t=!0){return this.layout.show_loading_indicator&&this._initialized?this:(t&&this.loader.show("Loading...").animate(),this.on("data_requested",()=>{this.loader.show("Loading...").animate()}),this.on("data_rendered",()=>{this.loader.hide()}),this.layout.show_loading_indicator=!0,this)}applyDataLayerZIndexesToDataLayerLayouts(){this._data_layer_ids_by_z_index.forEach((t,n)=>{this.data_layers[t].layout.z_index=n})}getBaseId(){return`${this.parent.id}.${this.id}`}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.layout.origin.x,y:t.y+this.layout.origin.y}}initializeLayout(){return this.setDimensions(),this.setOrigin(),this.setMargin(),this.x_range=[0,this.layout.cliparea.width],this.y1_range=[this.layout.cliparea.height,0],this.y2_range=[this.layout.cliparea.height,0],["x","y1","y2"].forEach(t=>{const n=this.layout.axes[t];!Object.keys(n).length||n.render===!1?n.render=!1:(n.render=!0,n.label=n.label||null)}),this.layout.data_layers.forEach(t=>{this.addDataLayer(t)}),this}setDimensions(t,n){const r=this.layout;return typeof t<"u"&&typeof n<"u"&&!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0&&(this.parent.layout.width=Math.round(+t),r.height=Math.max(Math.round(+n),r.min_height)),r.cliparea.width=Math.max(this.parent_plot.layout.width-(r.margin.left+r.margin.right),0),r.cliparea.height=Math.max(r.height-(r.margin.top+r.margin.bottom),0),this.svg.clipRect&&this.svg.clipRect.attr("width",this.parent.layout.width).attr("height",r.height),this._initialized&&(this.render(),this.curtain.update(),this.loader.update(),this.toolbar.update(),this.legend&&this.legend.position()),this}setOrigin(t,n){return!isNaN(t)&&t>=0&&(this.layout.origin.x=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(this.layout.origin.y=Math.max(Math.round(+n),0)),this._initialized&&this.render(),this}setMargin(t,n,r,i){let o;const{cliparea:a,margin:s}=this.layout;return!isNaN(t)&&t>=0&&(s.top=Math.max(Math.round(+t),0)),!isNaN(n)&&n>=0&&(s.right=Math.max(Math.round(+n),0)),!isNaN(r)&&r>=0&&(s.bottom=Math.max(Math.round(+r),0)),!isNaN(i)&&i>=0&&(s.left=Math.max(Math.round(+i),0)),s.top+s.bottom>this.layout.height&&(o=Math.floor((s.top+s.bottom-this.layout.height)/2),s.top-=o,s.bottom-=o),s.left+s.right>this.parent_plot.layout.width&&(o=Math.floor((s.left+s.right-this.parent_plot.layout.width)/2),s.left-=o,s.right-=o),["top","right","bottom","left"].forEach(l=>{s[l]=Math.max(s[l],0)}),a.width=Math.max(this.parent_plot.layout.width-(s.left+s.right),0),a.height=Math.max(this.layout.height-(s.top+s.bottom),0),a.origin.x=s.left,a.origin.y=s.top,this._initialized&&this.render(),this}initialize(){const t=this.getBaseId();this.svg.container=this.parent.svg.append("g").attr("id",`${t}.panel_container`).attr("transform",`translate(${this.layout.origin.x||0}, ${this.layout.origin.y||0})`);const n=this.svg.container.append("clipPath").attr("id",`${t}.clip`);if(this.svg.clipRect=n.append("rect").attr("width",this.parent_plot.layout.width).attr("height",this.layout.height),this.svg.group=this.svg.container.append("g").attr("id",`${t}.panel`).attr("clip-path",`url(#${t}.clip)`),this.curtain=Y6.call(this),this.loader=X6.call(this),this.layout.show_loading_indicator&&this.addBasicLoader(!1),this.toolbar=new Z6(this),this.inner_border=this.svg.group.append("rect").attr("class","lz-panel-background").on("click",()=>{this.layout.background_click==="clear_selections"&&this.clearSelections()}),this.title=this.svg.group.append("text").attr("class","lz-panel-title"),typeof this.layout.title<"u"&&this.setTitle(),this.svg.x_axis=this.svg.group.append("g").attr("id",`${t}.x_axis`).attr("class","lz-x lz-axis"),this.layout.axes.x.render&&(this.svg.x_axis_label=this.svg.x_axis.append("text").attr("class","lz-x lz-axis lz-label").attr("text-anchor","middle")),this.svg.y1_axis=this.svg.group.append("g").attr("id",`${t}.y1_axis`).attr("class","lz-y lz-y1 lz-axis"),this.layout.axes.y1.render&&(this.svg.y1_axis_label=this.svg.y1_axis.append("text").attr("class","lz-y1 lz-axis lz-label").attr("text-anchor","middle")),this.svg.y2_axis=this.svg.group.append("g").attr("id",`${t}.y2_axis`).attr("class","lz-y lz-y2 lz-axis"),this.layout.axes.y2.render&&(this.svg.y2_axis_label=this.svg.y2_axis.append("text").attr("class","lz-y2 lz-axis lz-label").attr("text-anchor","middle")),this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].initialize()}),this.legend=null,this.layout.legend&&(this.legend=new JX(this)),this.layout.interaction.drag_background_to_pan){const r=`.${this.parent.id}.${this.id}.interaction.drag`,i=()=>this.parent.startDrag(this,"background");this.svg.container.select(".lz-panel-background").on(`mousedown${r}.background`,i).on(`touchstart${r}.background`,i)}return this}resortDataLayers(){const t=[];this._data_layer_ids_by_z_index.forEach(n=>{t.push(this.data_layers[n].layout.z_index)}),this.svg.group.selectAll("g.lz-data_layer-container").data(t).sort(Sr),this.applyDataLayerZIndexesToDataLayerLayouts()}getLinkedPanelIds(t){t=t||null;const n=[];return!["x","y1","y2"].includes(t)||!this.layout.interaction[`${t}_linked`]||this.parent._panel_ids_by_y_index.forEach(r=>{r!==this.id&&this.parent.panels[r].layout.interaction[`${t}_linked`]&&n.push(r)}),n}moveUp(){const{parent:t}=this,n=this.layout.y_index;return t._panel_ids_by_y_index[n-1]&&(t._panel_ids_by_y_index[n]=t._panel_ids_by_y_index[n-1],t._panel_ids_by_y_index[n-1]=this.id,t.applyPanelYIndexesToPanelLayouts(),t.positionPanels()),this}moveDown(){const{_panel_ids_by_y_index:t}=this.parent;return t[this.layout.y_index+1]&&(t[this.layout.y_index]=t[this.layout.y_index+1],t[this.layout.y_index+1]=this.id,this.parent.applyPanelYIndexesToPanelLayouts(),this.parent.positionPanels()),this}reMap(){this.emit("data_requested"),this._data_promises=[],this.curtain.hide();for(let t in this.data_layers)try{this._data_promises.push(this.data_layers[t].reMap())}catch(n){console.error(n),this.curtain.show(n.message||n)}return Promise.all(this._data_promises).then(()=>{this._initialized=!0,this.render(),this.emit("layout_changed",!0),this.emit("data_rendered")}).catch(t=>{console.error(t),this.curtain.show(t.message||t)})}generateExtents(){["x","y1","y2"].forEach(t=>{this[`${t}_extent`]=null});for(let t in this.data_layers){const n=this.data_layers[t];if(n.layout.x_axis&&!n.layout.x_axis.decoupled&&(this.x_extent=qo((this.x_extent||[]).concat(n.getAxisExtent("x")))),n.layout.y_axis&&!n.layout.y_axis.decoupled){const r=`y${n.layout.y_axis.axis}`;this[`${r}_extent`]=qo((this[`${r}_extent`]||[]).concat(n.getAxisExtent("y")))}}return this.layout.axes.x&&this.layout.axes.x.extent==="state"&&(this.x_extent=[this.state.start,this.state.end]),this}generateTicks(t){if(this.layout.axes[t].ticks){const r=this.layout.axes[t].ticks;if(Array.isArray(r))return r;if(typeof r=="object"){const i=this,o={position:r.position};return this._data_layer_ids_by_z_index.reduce((s,l)=>{const u=i.data_layers[l];return s.concat(u.getTicks(t,o))},[]).map(s=>{let l={};return l=qt(l,r),qt(l,s)})}}return this[`${t}_extent`]?rK(this[`${t}_extent`],"both"):[]}renderAxis(t){if(!["x","y1","y2"].includes(t))throw new Error(`Unable to render axis; invalid axis identifier: ${t}`);const n=this.layout.axes[t].render&&typeof this[`${t}_scale`]=="function"&&!isNaN(this[`${t}_scale`](0));if(this[`${t}_axis`]&&this.svg.container.select(`g.lz-axis.lz-${t}`).style("display",n?null:"none"),!n)return this;const r={x:{position:`translate(${this.layout.margin.left}, ${this.layout.height-this.layout.margin.bottom})`,orientation:"bottom",label_x:this.layout.cliparea.width/2,label_y:this.layout.axes[t].label_offset||0,label_rotate:null},y1:{position:`translate(${this.layout.margin.left}, ${this.layout.margin.top})`,orientation:"left",label_x:-1*(this.layout.axes[t].label_offset||0),label_y:this.layout.cliparea.height/2,label_rotate:-90},y2:{position:`translate(${this.parent_plot.layout.width-this.layout.margin.right}, ${this.layout.margin.top})`,orientation:"right",label_x:this.layout.axes[t].label_offset||0,label_y:this.layout.cliparea.height/2,label_rotate:-90}};this[`${t}_ticks`]=this.generateTicks(t);const i=(s=>{for(let l=0;l<s.length;l++)if(isNaN(s[l]))return!1;return!0})(this[`${t}_ticks`]);let o;switch(r[t].orientation){case"right":o=Ev;break;case"left":o=X5;break;case"bottom":o=Y5;break;default:throw new Error("Unrecognized axis orientation")}if(this[`${t}_axis`]=o(this[`${t}_scale`]).tickPadding(3),i)this[`${t}_axis`].tickValues(this[`${t}_ticks`]),this.layout.axes[t].tick_format==="region"&&this[`${t}_axis`].tickFormat(s=>Gb(s,6));else{let s=this[`${t}_ticks`].map(l=>l[t.substr(0,1)]);this[`${t}_axis`].tickValues(s).tickFormat((l,u)=>this[`${t}_ticks`][u].text)}if(this.svg[`${t}_axis`].attr("transform",r[t].position).call(this[`${t}_axis`]),!i){const s=o8(`g#${this.getBaseId().replace(".","\\.")}\\.${t}_axis g.tick`),l=this;s.each(function(u,c){const d=Ue(this).select("text");l[`${t}_ticks`][c].style&&xn(d,l[`${t}_ticks`][c].style),l[`${t}_ticks`][c].transform&&d.attr("transform",l[`${t}_ticks`][c].transform)})}const a=this.layout.axes[t].label||null;return a!==null&&(this.svg[`${t}_axis_label`].attr("x",r[t].label_x).attr("y",r[t].label_y).text(Tl(a,this.state)).attr("fill","currentColor"),r[t].label_rotate!==null&&this.svg[`${t}_axis_label`].attr("transform",`rotate(${r[t].label_rotate} ${r[t].label_x}, ${r[t].label_y})`)),["x","y1","y2"].forEach(s=>{if(this.layout.interaction[`drag_${s}_ticks_to_scale`]){const l=`.${this.parent.id}.${this.id}.interaction.drag`,u=function(){typeof Ue(this).node().focus=="function"&&Ue(this).node().focus();let c=s==="x"?"ew-resize":"ns-resize";Ce&&Ce.shiftKey&&(c="move"),Ue(this).style("font-weight","bold").style("cursor",c).on(`keydown${l}`,u).on(`keyup${l}`,u)};this.svg.container.selectAll(`.lz-axis.lz-${s} .tick text`).attr("tabindex",0).on(`mouseover${l}`,u).on(`mouseout${l}`,function(){Ue(this).style("font-weight","normal").on(`keydown${l}`,null).on(`keyup${l}`,null)}).on(`mousedown${l}`,()=>{this.parent.startDrag(this,`${s}_tick`)})}}),this}scaleHeightToData(t){t=+t||null,t===null&&this._data_layer_ids_by_z_index.forEach(n=>{const r=this.data_layers[n].getAbsoluteDataHeight();+r&&(t===null?t=+r:t=Math.max(t,+r))}),+t&&(t+=+this.layout.margin.top+ +this.layout.margin.bottom,this.setDimensions(this.parent_plot.layout.width,t),this.parent.setDimensions(),this.parent.positionPanels())}setAllElementStatus(t,n){this._data_layer_ids_by_z_index.forEach(r=>{this.data_layers[r].setAllElementStatus(t,n)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;od.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},od.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const eK={state:{},width:800,min_width:400,min_region_scale:null,max_region_scale:null,responsive_resize:!1,panels:[],toolbar:{widgets:[]},panel_boundaries:!0,mouse_guide:!0};function tK(e,t){e=e||{},t=t||{};let n=!1,r=null,i;if(typeof e.chr<"u"&&typeof e.start<"u"&&typeof e.end<"u"){if(e.start=Math.max(parseInt(e.start),1),e.end=Math.max(parseInt(e.end),1),isNaN(e.start)&&isNaN(e.end))e.start=1,e.end=1,r=.5,i=0;else if(isNaN(e.start)||isNaN(e.end))r=e.start||e.end,i=0,e.start=isNaN(e.start)?e.end:e.start,e.end=isNaN(e.end)?e.start:e.end;else{if(r=Math.round((e.start+e.end)/2),i=e.end-e.start,i<0){const o=e.start;e.end=e.start,e.start=o,i=e.end-e.start}r<0&&(e.start=1,e.end=1,i=0)}n=!0}return t.min_region_scale&&n&&i<t.min_region_scale&&(e.start=Math.max(r-Math.floor(t.min_region_scale/2),1),e.end=e.start+t.min_region_scale),t.max_region_scale&&n&&i>t.max_region_scale&&(e.start=Math.max(r-Math.floor(t.max_region_scale/2),1),e.end=e.start+t.max_region_scale),e}class nK{constructor(t,n,r){this._initialized=!1,this.parent_plot=this,this.id=t,this.container=null,this.svg=null,this.panels={},this._panel_ids_by_y_index=[],this._remap_promises=[],this.layout=r,qt(this.layout,eK),this._base_layout=at(this.layout),this.state=this.layout.state,this.lzd=new FX(n),this._external_listeners=new Map,this._event_hooks={},this._interaction={},this.initializeLayout()}on(t,n){if(typeof t!="string")throw new Error(`Unable to register event hook. Event name must be a string: ${t.toString()}`);if(typeof n!="function")throw new Error("Unable to register event hook, invalid hook function passed");return this._event_hooks[t]||(this._event_hooks[t]=[]),this._event_hooks[t].push(n),n}off(t,n){const r=this._event_hooks[t];if(typeof t!="string"||!Array.isArray(r))throw new Error(`Unable to remove event hook, invalid event: ${t.toString()}`);if(n===void 0)this._event_hooks[t]=[];else{const i=r.indexOf(n);if(i!==-1)r.splice(i,1);else throw new Error("The specified event listener is not registered and therefore cannot be removed")}return this}emit(t,n){const r=this._event_hooks[t];if(typeof t!="string")throw new Error(`LocusZoom attempted to throw an invalid event: ${t.toString()}`);if(!r&&!this._event_hooks.any_lz_event)return this;const i=this.getBaseId();let o;if(n&&n.sourceID?o=n:o={sourceID:i,target:this,data:n||null},r&&r.forEach(a=>{a.call(this,o)}),t!=="any_lz_event"){const a=Object.assign({event_name:t},o);this.emit("any_lz_event",a)}return this}addPanel(t){if(typeof t!="object")throw new Error("Invalid panel layout");const n=new od(t,this);if(this.panels[n.id]=n,n.layout.y_index!==null&&!isNaN(n.layout.y_index)&&this._panel_ids_by_y_index.length>0)n.layout.y_index<0&&(n.layout.y_index=Math.max(this._panel_ids_by_y_index.length+n.layout.y_index,0)),this._panel_ids_by_y_index.splice(n.layout.y_index,0,n.id),this.applyPanelYIndexesToPanelLayouts();else{const i=this._panel_ids_by_y_index.push(n.id);this.panels[n.id].layout.y_index=i-1}let r=null;return this.layout.panels.forEach((i,o)=>{i.id===n.id&&(r=o)}),r===null&&(r=this.layout.panels.push(this.panels[n.id].layout)-1),this.panels[n.id]._layout_idx=r,this._initialized&&(this.positionPanels(),this.panels[n.id].initialize(),this.panels[n.id].reMap(),this.setDimensions(this.layout.width,this._total_height)),this.panels[n.id]}clearPanelData(t,n){n=n||"wipe";let r;return t?r=[t]:r=Object.keys(this.panels),r.forEach(i=>{this.panels[i]._data_layer_ids_by_z_index.forEach(o=>{const a=this.panels[i].data_layers[o];a.destroyAllTooltips(),delete a._layer_state,delete this.layout.state[a._state_id],n==="reset"&&a._setDefaultState()})}),this}removePanel(t){const n=this.panels[t];if(!n)throw new Error(`Unable to remove panel, ID not found: ${t}`);return this._panel_boundaries.hide(),this.clearPanelData(t),n.loader.hide(),n.toolbar.destroy(!0),n.curtain.hide(),n.svg.container&&n.svg.container.remove(),this.layout.panels.splice(n._layout_idx,1),delete this.panels[t],delete this.layout.state[t],this.layout.panels.forEach((r,i)=>{this.panels[r.id]._layout_idx=i}),this._panel_ids_by_y_index.splice(this._panel_ids_by_y_index.indexOf(t),1),this.applyPanelYIndexesToPanelLayouts(),this._initialized&&(this.positionPanels(),this.setDimensions(this.layout.width,this._total_height)),this.emit("panel_removed",t),this}refresh(){return this.applyState()}subscribeToData(t,n){const{from_layer:r,namespace:i,data_operations:o,onerror:a}=t,s=a||function(d){console.error("An error occurred while acting on an external callback",d)};if(r){const d=`${this.getBaseId()}.`,f=r.startsWith(d)?r:`${d}${r}`;let h=!1;for(let g of Object.values(this.panels))if(h=Object.values(g.data_layers).some(b=>b.getBaseId()===f),h)break;if(!h)throw new Error(`Could not subscribe to unknown data layer ${f}`);const p=g=>{if(g.data.layer===f)try{n(g.data.content,this)}catch(b){s(b)}};return this.on("data_from_layer",p),p}if(!i)throw new Error("subscribeToData must specify the desired data: either 'from_layer' or 'namespace' option");const[l,u]=this.lzd.config_to_sources(i,o),c=()=>{try{this.lzd.getData(this.state,l,u).then(d=>n(d,this)).catch(s)}catch(d){s(d)}};return this.on("data_rendered",c),c}applyState(t){if(t=t||{},typeof t!="object")throw new Error(`applyState only accepts an object; ${typeof t} given`);let n={chr:this.state.chr,start:this.state.start,end:this.state.end};for(let r in t)n[r]=t[r];n=tK(n,this.layout);for(let r in n)this.state[r]=n[r];this.emit("data_requested"),this._remap_promises=[],this.loading_data=!0;for(let r in this.panels)this._remap_promises.push(this.panels[r].reMap());return Promise.all(this._remap_promises).catch(r=>{console.error(r),this.curtain.show(r.message||r),this.loading_data=!1}).then(()=>{this.toolbar.update(),this._panel_ids_by_y_index.forEach(s=>{const l=this.panels[s];l.toolbar.update(),l._data_layer_ids_by_z_index.forEach(u=>{l.data_layers[u].applyAllElementStatus()})}),this.emit("layout_changed"),this.emit("data_rendered"),this.emit("state_changed",t);const{chr:r,start:i,end:o}=this.state;Object.keys(t).some(s=>["chr","start","end"].includes(s))&&this.emit("region_changed",{chr:r,start:i,end:o}),this.loading_data=!1})}trackExternalListener(t,n,r){this._external_listeners.has(t)||this._external_listeners.set(t,new Map);const i=this._external_listeners.get(t),o=i.get(n)||[];o.includes(r)||o.push(r),i.set(n,o)}destroy(){for(let[n,r]of this._external_listeners.entries())for(let[i,o]of r)for(let a of o)n.removeEventListener(i,a);const t=this.svg.node().parentNode;if(!t)throw new Error("Plot has already been removed");for(;t.lastElementChild;)t.removeChild(t.lastElementChild);t.outerHTML=t.outerHTML,this._initialized=!1,this.svg=null,this.panels=null}mutateLayout(){Object.values(this.panels).forEach(t=>{Object.values(t.data_layers).forEach(n=>n.mutateLayout())})}_canInteract(t){t=t||null;const{_interaction:n}=this;return t?(typeof n.panel_id>"u"||n.panel_id===t)&&!this.loading_data:!(n.dragging||n.zooming||this.loading_data)}_getPageOrigin(){const t=this.svg.node().getBoundingClientRect();let n=document.documentElement.scrollLeft||document.body.scrollLeft,r=document.documentElement.scrollTop||document.body.scrollTop,i=this.svg.node();for(;i.parentNode!==null;)if(i=i.parentNode,i!==document&&Ue(i).style("position")!=="static"){n=-1*i.getBoundingClientRect().left,r=-1*i.getBoundingClientRect().top;break}return{x:n+t.left,y:r+t.top,width:t.width,height:t.height}}getContainerOffset(){const t={top:0,left:0};let n=this.container.offsetParent||null;for(;n!==null;)t.top+=n.offsetTop,t.left+=n.offsetLeft,n=n.offsetParent||null;return t}applyPanelYIndexesToPanelLayouts(){this._panel_ids_by_y_index.forEach((t,n)=>{this.panels[t].layout.y_index=n})}getBaseId(){return this.id}rescaleSVG(){const t=this.svg.node().getBoundingClientRect();return this.setDimensions(t.width,t.height),this}initializeLayout(){if(isNaN(this.layout.width)||this.layout.width<=0)throw new Error("Plot layout parameter `width` must be a positive number");return this.layout.responsive_resize=!!this.layout.responsive_resize,this.layout.panels.forEach(t=>{this.addPanel(t)}),this}setDimensions(t,n){if(!isNaN(t)&&t>=0&&!isNaN(n)&&n>=0){const i=n/this._total_height;this.layout.width=Math.max(Math.round(+t),this.layout.min_width),this.layout.responsive_resize&&this.svg&&(this.layout.width=Math.max(this.svg.node().parentNode.getBoundingClientRect().width,this.layout.min_width));let o=0;this._panel_ids_by_y_index.forEach(a=>{const s=this.panels[a],l=this.layout.width,u=s.layout.height*i;s.setDimensions(l,u),s.setOrigin(0,o),o+=u,s.toolbar.update()})}const r=this._total_height;return this.svg!==null&&(this.svg.attr("viewBox",`0 0 ${this.layout.width} ${r}`),this.svg.attr("width",this.layout.width).attr("height",r)),this._initialized&&(this._panel_boundaries.position(),this.toolbar.update(),this.curtain.update(),this.loader.update()),this.emit("layout_changed")}positionPanels(){const t={left:0,right:0};for(let r of Object.values(this.panels))r.layout.interaction.x_linked&&(t.left=Math.max(t.left,r.layout.margin.left),t.right=Math.max(t.right,r.layout.margin.right));let n=0;return this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r],o=i.layout;if(i.setOrigin(0,n),n+=this.panels[r].layout.height,o.interaction.x_linked){const a=Math.max(t.left-o.margin.left,0)+Math.max(t.right-o.margin.right,0);o.width+=a,o.margin.left=t.left,o.margin.right=t.right,o.cliparea.origin.x=t.left}}),this.setDimensions(),this._panel_ids_by_y_index.forEach(r=>{const i=this.panels[r];i.setDimensions(this.layout.width,i.layout.height)}),this}initialize(){if(this.layout.responsive_resize){Ue(this.container).classed("lz-container-responsive",!0);const u=()=>window.requestAnimationFrame(()=>this.rescaleSVG());if(window.addEventListener("resize",u),this.trackExternalListener(window,"resize",u),typeof IntersectionObserver<"u"){const d={root:document.documentElement,threshold:.9};new IntersectionObserver((h,p)=>{h.some(g=>g.intersectionRatio>0)&&this.rescaleSVG()},d).observe(this.container)}const c=()=>this.setDimensions();window.addEventListener("load",c),this.trackExternalListener(window,"load",c)}if(this.layout.mouse_guide){const u=this.svg.append("g").attr("class","lz-mouse_guide").attr("id",`${this.id}.mouse_guide`),c=u.append("rect").attr("class","lz-mouse_guide-vertical").attr("x",-1),d=u.append("rect").attr("class","lz-mouse_guide-horizontal").attr("y",-1);this._mouse_guide={svg:u,vertical:c,horizontal:d}}this.curtain=Y6.call(this),this.loader=X6.call(this),this._panel_boundaries={parent:this,hide_timeout:null,showing:!1,dragging:!1,selectors:[],corner_selector:null,show:function(){if(!this.showing&&!this.parent.curtain.showing){this.showing=!0,this.parent._panel_ids_by_y_index.forEach((d,f)=>{const h=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-boundary").attr("title","Resize panel");h.append("span");const p=B0();p.on("start",()=>{this.dragging=!0}),p.on("end",()=>{this.dragging=!1}),p.on("drag",()=>{const g=this.parent.panels[this.parent._panel_ids_by_y_index[f]],b=g.layout.height;g.setDimensions(this.parent.layout.width,g.layout.height+Ce.dy);const v=g.layout.height-b;this.parent._panel_ids_by_y_index.forEach((x,y)=>{const _=this.parent.panels[this.parent._panel_ids_by_y_index[y]];y>f&&(_.setOrigin(_.layout.origin.x,_.layout.origin.y+v),_.toolbar.position())}),this.parent.positionPanels(),this.position()}),h.call(p),this.parent._panel_boundaries.selectors.push(h)});const u=Ue(this.parent.svg.node().parentNode).insert("div",".lz-data_layer-tooltip").attr("class","lz-panel-corner-boundary").attr("title","Resize plot");u.append("span").attr("class","lz-panel-corner-boundary-outer"),u.append("span").attr("class","lz-panel-corner-boundary-inner");const c=B0();c.on("start",()=>{this.dragging=!0}),c.on("end",()=>{this.dragging=!1}),c.on("drag",()=>{this.parent.setDimensions(this.parent.layout.width+Ce.dx,this.parent._total_height+Ce.dy)}),u.call(c),this.parent._panel_boundaries.corner_selector=u}return this.position()},position:function(){if(!this.showing)return this;const u=this.parent._getPageOrigin();this.selectors.forEach((f,h)=>{const p=this.parent.panels[this.parent._panel_ids_by_y_index[h]],g=p._getPageOrigin(),b=u.x,v=g.y+p.layout.height-12,x=this.parent.layout.width-1;f.style("top",`${v}px`).style("left",`${b}px`).style("width",`${x}px`),f.select("span").style("width",`${x}px`)});const c=10,d=16;return this.corner_selector.style("top",`${u.y+this.parent._total_height-c-d}px`).style("left",`${u.x+this.parent.layout.width-c-d}px`),this},hide:function(){return this.showing?(this.showing=!1,this.selectors.forEach(u=>{u.remove()}),this.selectors=[],this.corner_selector.remove(),this.corner_selector=null,this):this}},this.layout.panel_boundaries&&Ue(this.svg.node().parentNode).on(`mouseover.${this.id}.panel_boundaries`,()=>{clearTimeout(this._panel_boundaries.hide_timeout),this._panel_boundaries.show()}).on(`mouseout.${this.id}.panel_boundaries`,()=>{this._panel_boundaries.hide_timeout=setTimeout(()=>{this._panel_boundaries.hide()},300)}),this.toolbar=new Z6(this).show();for(let u in this.panels)this.panels[u].initialize();const t=`.${this.id}`;if(this.layout.mouse_guide){const u=()=>{this._mouse_guide.vertical.attr("x",-1),this._mouse_guide.horizontal.attr("y",-1)},c=()=>{const d=lr(this.svg.node());this._mouse_guide.vertical.attr("x",d[0]),this._mouse_guide.horizontal.attr("y",d[1])};this.svg.on(`mouseout${t}-mouse_guide`,u).on(`touchleave${t}-mouse_guide`,u).on(`mousemove${t}-mouse_guide`,c)}const n=()=>{this.stopDrag()},r=()=>{const{_interaction:u}=this;if(u.dragging){const c=lr(this.svg.node());Ce&&Ce.preventDefault(),u.dragging.dragged_x=c[0]-u.dragging.start_x,u.dragging.dragged_y=c[1]-u.dragging.start_y,this.panels[u.panel_id].render(),u.linked_panel_ids.forEach(d=>{this.panels[d].render()})}};this.svg.on(`mouseup${t}`,n).on(`touchend${t}`,n).on(`mousemove${t}`,r).on(`touchmove${t}`,r);const o=Ue("body").node();o&&(o.addEventListener("mouseup",n),o.addEventListener("touchend",n),this.trackExternalListener(o,"mouseup",n),this.trackExternalListener(o,"touchend",n)),this.on("match_requested",u=>{const c=u.data,d=c.active?c.value:null,f=u.target.id;Object.values(this.panels).forEach(h=>{h.id!==f&&Object.values(h.data_layers).forEach(p=>p.destroyAllTooltips(!1))}),this.applyState({lz_match_value:d})}),this._initialized=!0;const a=this.svg.node().getBoundingClientRect(),s=a.width?a.width:this.layout.width,l=a.height?a.height:this._total_height;return this.setDimensions(s,l),this}startDrag(t,n){t=t||null,n=n||null;let r=null;switch(n){case"background":case"x_tick":r="x";break;case"y1_tick":r="y1";break;case"y2_tick":r="y2";break}if(!(t instanceof od)||!r||!this._canInteract())return this.stopDrag();const i=lr(this.svg.node());return this._interaction={panel_id:t.id,linked_panel_ids:t.getLinkedPanelIds(r),dragging:{method:n,start_x:i[0],start_y:i[1],dragged_x:0,dragged_y:0,axis:r}},this.svg.style("cursor","all-scroll"),this}stopDrag(){const{_interaction:t}=this;if(!t.dragging)return this;if(typeof this.panels[t.panel_id]!="object")return this._interaction={},this;const n=this.panels[t.panel_id],r=(i,o,a)=>{n._data_layer_ids_by_z_index.forEach(s=>{const l=n.data_layers[s].layout[`${i}_axis`];l.axis===o&&(l.floor=a[0],l.ceiling=a[1],delete l.lower_buffer,delete l.upper_buffer,delete l.min_extent,delete l.ticks)})};switch(t.dragging.method){case"background":case"x_tick":t.dragging.dragged_x!==0&&(r("x",1,n.x_extent),this.applyState({start:n.x_extent[0],end:n.x_extent[1]}));break;case"y1_tick":case"y2_tick":if(t.dragging.dragged_y!==0){const i=parseInt(t.dragging.method[1]);r("y",i,n[`y${i}_extent`])}break}return this._interaction={},this.svg.style("cursor",null),this}get _total_height(){return this.layout.panels.reduce((t,n)=>n.height+t,0)}}function Gb(e,t,n){const r={0:"",3:"K",6:"M",9:"G"};if(n=n||!1,isNaN(t)||t===null){const l=Math.log(e)/Math.LN10;t=Math.min(Math.max(l-l%3,0),9)}const i=t-Math.floor((Math.log(e)/Math.LN10).toFixed(t+3)),o=Math.min(Math.max(t,0),2),a=Math.min(Math.max(i,o),12);let s=`${(e/Math.pow(10,t)).toFixed(a)}`;return n&&typeof r[t]<"u"&&(s+=` ${r[t]}b`),s}function Ws(e){let t=e.toUpperCase();t=t.replace(/,/g,"");const n=/([KMG])[B]*$/,r=n.exec(t);let i=1;return r&&(r[1]==="M"?i=1e6:r[1]==="G"?i=1e9:i=1e3,t=t.replace(n,"")),t=Number(t)*i,t}function rK(e,t,n){(typeof n>"u"||isNaN(parseInt(n)))&&(n=5),n=+n;const r=n/3,i=.75,o=1.5,a=.5+1.5*o,s=Math.abs(e[0]-e[1]);let l=s/n;Math.log(s)/Math.LN10<-2&&(l=Math.max(Math.abs(s))*i/r);const u=Math.pow(10,Math.floor(Math.log(l)/Math.LN10));let c=0;u<1&&u!==0&&(c=Math.abs(Math.round(Math.log(u)/Math.LN10)));let d=u;2*u-l<o*(l-d)&&(d=2*u,5*u-l<a*(l-d)&&(d=5*u,10*u-l<o*(l-d)&&(d=10*u)));let f=[],h=parseFloat((Math.floor(e[0]/d)*d).toFixed(c));for(;h<e[1];)f.push(h),h+=d,c>0&&(h=parseFloat(h.toFixed(c)));return f.push(h),(typeof t>"u"||["low","high","both","neither"].indexOf(t)===-1)&&(t="neither"),(t==="low"||t==="both")&&f[0]<e[0]&&(f=f.slice(1)),(t==="high"||t==="both")&&f[f.length-1]>e[1]&&f.pop(),f}function Tl(e,t,n){if(typeof t!="object")throw new Error("invalid arguments: data is not an object");if(typeof e!="string")throw new Error("invalid arguments: html is not a string");const r=[],i=/{{(?:(#if )?([\w+_:|]+)|(#else)|(\/if))}}/;for(;e.length>0;){const u=i.exec(e);u?u.index!==0?(r.push({text:e.slice(0,u.index)}),e=e.slice(u.index)):u[1]==="#if "?(r.push({condition:u[2]}),e=e.slice(u[0].length)):u[2]?(r.push({variable:u[2]}),e=e.slice(u[0].length)):u[3]==="#else"?(r.push({branch:"else"}),e=e.slice(u[0].length)):u[4]==="/if"?(r.push({close:"if"}),e=e.slice(u[0].length)):(console.error(`Error tokenizing tooltip when remaining template is ${JSON.stringify(e)} and previous tokens are ${JSON.stringify(r)} and current regex match is ${JSON.stringify([u[1],u[2],u[3]])}`),e=e.slice(u[0].length)):(r.push({text:e}),e="")}const o=function(){const u=r.shift();if(typeof u.text<"u"||u.variable)return u;if(u.condition){let c=u.then=[];for(u.else=[];r.length>0;){if(r[0].close==="if"){r.shift();break}r[0].branch==="else"&&(r.shift(),c=u.else),c.push(o())}return u}else return console.error(`Error making tooltip AST due to unknown token ${JSON.stringify(u)}`),{text:""}},a=[];for(;r.length>0;)a.push(o());const s=function(u){return Object.prototype.hasOwnProperty.call(s.cache,u)||(s.cache[u]=new za(u).resolve(t,n)),s.cache[u]};s.cache={};const l=function(u){if(typeof u.text<"u")return u.text;if(u.variable){try{const c=s(u.variable);if(["string","number","boolean"].indexOf(typeof c)!==-1)return c;if(c===null)return""}catch{console.error(`Error while processing variable ${JSON.stringify(u.variable)}`)}return`{{${u.variable}}}`}else if(u.condition){try{if(s(u.condition))return u.then.map(l).join("");if(u.else)return u.else.map(l).join("")}catch{console.error(`Error while processing condition ${JSON.stringify(u.variable)}`)}return""}else console.error(`Error rendering tooltip due to unknown AST node ${JSON.stringify(u)}`)};return a.map(l).join("")}function iK(e,t,n){if(typeof e>"u")throw new Error("LocusZoom.populate selector not defined");Ue(e).html("");let r;return Ue(e).call(function(i){if(typeof i.node().id>"u"){let o=0;for(;!Ue(`#lz-${o}`).empty();)o++;i.attr("id",`#lz-${o}`)}if(r=new nK(i.node().id,t,n),r.container=i.node(),typeof i.node().dataset<"u"&&typeof i.node().dataset.region<"u"){const o=oK(i.node().dataset.region);Object.keys(o).forEach(function(a){r.state[a]=o[a]})}r.svg=Ue(`div#${r.id}`).append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("id",`${r.id}_svg`).attr("class","lz-locuszoom").call(xn,r.layout.style),r.setDimensions(),r.positionPanels(),r.initialize(),t&&r.refresh()}),r}function oK(e){const t=/^(\w+):([\d,.]+[kmgbKMGB]*)([-+])([\d,.]+[kmgbKMGB]*)$/,n=/^(\w+):([\d,.]+[kmgbKMGB]*)$/;let r=t.exec(e);if(r)if(r[3]==="+"){const i=Ws(r[2]),o=Ws(r[4]);return{chr:r[1],start:i-o,end:i+o}}else return{chr:r[1],start:Ws(r[2]),end:Ws(r[4])};return r=n.exec(e),r?{chr:r[1],position:Ws(r[2])}:null}const pr=new Zi;pr.add("=",(e,t)=>e===t);pr.add("!=",(e,t)=>e!=t);pr.add("<",(e,t)=>e<t);pr.add("<=",(e,t)=>e<=t);pr.add(">",(e,t)=>e>t);pr.add(">=",(e,t)=>e>=t);pr.add("%",(e,t)=>e%t);pr.add("in",(e,t)=>t&&t.includes(e));pr.add("match",(e,t)=>e&&e.includes(t));const J6=(e,t)=>typeof t>"u"||e.field_value!==t?typeof e.else<"u"?e.else:null:e.then,aK=(e,t)=>{const n=e.breaks||[],r=e.values||[];if(typeof t>"u"||t===null||isNaN(+t))return e.null_value?e.null_value:null;const i=n.reduce(function(o,a){return+t<o||+t>=o&&+t<a?o:a});return r[n.indexOf(i)]},sK=(e,t)=>typeof t>"u"||!e.categories.includes(t)?e.null_value?e.null_value:null:e.values[e.categories.indexOf(t)],lK=(e,t,n)=>{const r=e.values;return r[n%r.length]};let uK=(e,t,n)=>{const r=e._cache=e._cache||new Map,i=e.max_cache_size||500;if(r.size>=i&&r.clear(),r.has(t))return r.get(t);let o=0;t=String(t);for(let l=0;l<t.length;l++){let u=t.charCodeAt(l);o=(o<<5)-o+u,o|=0}const a=e.values,s=a[Math.abs(o)%a.length];return r.set(t,s),s};const cK=(e,t)=>{var n=e.breaks||[],r=e.values||[],i=e.null_value?e.null_value:null;if(n.length<2||n.length!==r.length||typeof t>"u"||t===null||isNaN(+t))return i;if(+t<=e.breaks[0])return r[0];if(+t>=e.breaks[e.breaks.length-1])return r[n.length-1];{var o=null;if(n.forEach(function(s,l){l&&n[l-1]<=+t&&n[l]>=+t&&(o=l)}),o===null)return i;const a=(+t-n[o-1])/(n[o]-n[o-1]);return isFinite(a)?ys(r[o-1],r[o])(a):i}};function fK(e,t){if(t===void 0)return null;const{beta_field:n,stderr_beta_field:r,"+":i=null,"-":o=null}=e;if(!n||!r)throw new Error("effect_direction must specify how to find required 'beta' and 'stderr_beta' fields");const a=t[n],s=t[r];if(a!==void 0)if(s!==void 0){if(a-1.96*s>0)return i;if(a+1.96*s<0)return o||null}else{if(a>0)return i;if(a<0)return o}return null}const dK=Object.freeze(Object.defineProperty({__proto__:null,categorical_bin:sK,effect_direction:fK,if_value:J6,interpolate:cK,numerical_bin:aK,ordinal_cycle:lK,stable_choice:uK},Symbol.toStringTag,{value:"Module"})),ch=new Zi;for(let[e,t]of Object.entries(dK))ch.add(e,t);ch.add("if",J6);const hK={id:"",type:"",tag:"custom_data_type",namespace:{},data_operations:[],id_field:"id",filters:null,match:{},x_axis:{},y_axis:{},legend:null,tooltip:{},tooltip_positioning:"horizontal",behaviors:{}};class cr{constructor(t,n){this._initialized=!1,this._layout_idx=null,this.id=null,this._base_id=null,this.parent=n||null,this.svg={},this.parent_plot=null,n&&(this.parent_plot=n.parent),this.layout=qt(t||{},hK),this.layout.id&&(this.id=this.layout.id),this._filter_func=null,this.layout.x_axis!=={}&&typeof this.layout.x_axis.axis!="number"&&(this.layout.x_axis.axis=1),this.layout.y_axis!=={}&&typeof this.layout.y_axis.axis!="number"&&(this.layout.y_axis.axis=1),this._base_layout=at(this.layout),this.state={},this._state_id=null,this._layer_state=null,this._setDefaultState(),this.data=[],this.layout.tooltip&&(this._tooltips={}),this._global_statuses={highlighted:!1,selected:!1,faded:!1,hidden:!1},this._data_contract=new Set,this._entities=new Map,this._dependencies=[],this.mutateLayout()}render(){throw new Error("Method must be implemented")}moveForward(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n+1]&&(t[n]=t[n+1],t[n+1]=this.id,this.parent.resortDataLayers()),this}moveBack(){const t=this.parent._data_layer_ids_by_z_index,n=this.layout.z_index;return t[n-1]&&(t[n]=t[n-1],t[n-1]=this.id,this.parent.resortDataLayers()),this}setElementAnnotation(t,n,r){const i=this.getElementId(t);return this._layer_state.extra_fields[i]||(this._layer_state.extra_fields[i]={}),this._layer_state.extra_fields[i][n]=r,this}setFilter(t){console.warn("The setFilter method is deprecated and will be removed in the future; please use the layout API with a custom filter function instead"),this._filter_func=t}mutateLayout(){if(this.parent_plot){const{namespace:t,data_operations:n}=this.layout;this._data_contract=Vb(this.layout,Object.keys(t));const[r,i]=this.parent_plot.lzd.config_to_sources(t,n,this);this._entities=r,this._dependencies=i}}_getDataExtent(t,n){return t=t||this.data,qo(t,r=>+new za(n.field).resolve(r))}getElementId(t){const n=Symbol.for("lzID");if(t[n])return t[n];const r=this.layout.id_field;let i=t[r];if(typeof i>"u"&&/{{[^{}]*}}/.test(r)&&(i=Tl(r,t,{})),i==null)throw new Error("Unable to generate element ID");const o=i.toString().replace(/\W/g,""),a=`${this.getBaseId()}-${o}`.replace(/([:.[\],])/g,"_");return t[n]=a,a}getElementStatusNodeId(t){return null}getElementById(t){const n=Ue(`#${t.replace(/([:.[\],])/g,"\\$1")}`);return!n.empty()&&n.data()&&n.data().length?n.data()[0]:null}applyDataMethods(){const t=this.layout.match&&this.layout.match.receive,n=pr.get(this.layout.match&&this.layout.match.operator||"="),r=this.parent_plot.state.lz_match_value,i=t?new za(t):null;if(this.data.length&&this._data_contract.size){const o=new Set(this._data_contract);for(let a of this.data)if(Object.keys(a).forEach(s=>o.delete(s)),!o.size)break;o.size&&console.debug(`Data layer '${this.getBaseId()}' did not receive all expected fields from retrieved data. Missing fields are: ${[...o]}
|
|
2001
2001
|
Common reasons for this error include API payloads with missing fields, or data layer layouts that use two kinds of data and need join logic in "data_operations"
|
|
2002
2002
|
If this field is optional, you can safely ignore this message. Examples include {{#if value}} tags or conditional color rules.
|
|
2003
|
-
`)}return this.data.forEach((o,a)=>{t&&r!==null&&r!==void 0&&(o.lz_is_match=n(i.resolve(o),r)),o.getDataLayer=()=>this,o.getPanel=()=>this.parent||null,o.getPlot=()=>{const s=this.parent;return s?s.parent:null}}),this.applyCustomDataMethods(),this}applyCustomDataMethods(){return this}resolveScalableParameter(t,n,r){let i=null;if(Array.isArray(t)){let o=0;for(;i===null&&o<t.length;)i=this.resolveScalableParameter(t[o],n,r),o++}else switch(typeof t){case"number":case"string":i=t;break;case"object":if(t.scale_function){const o=ch.get(t.scale_function);if(t.field){const a=new za(t.field);let s;try{s=this.getElementAnnotation(n)}catch{s=null}i=o(t.parameters||{},a.resolve(n,s),r)}else i=o(t.parameters||{},n,r)}break}return i}getAxisExtent(t){if(!["x","y"].includes(t))throw new Error("Invalid dimension identifier");const n=`${t}_axis`,r=this.layout[n];if(!isNaN(r.floor)&&!isNaN(r.ceiling))return[+r.floor,+r.ceiling];let i=[];if(r.field&&this.data)if(this.data.length){i=this._getDataExtent(this.data,r);const o=i[1]-i[0];if(isNaN(r.lower_buffer)||(i[0]-=o*r.lower_buffer),isNaN(r.upper_buffer)||(i[1]+=o*r.upper_buffer),typeof r.min_extent=="object"){const a=r.min_extent[0],s=r.min_extent[1];!isNaN(a)&&!isNaN(s)&&(i[0]=Math.min(i[0],a)),isNaN(s)||(i[1]=Math.max(i[1],s))}return[isNaN(r.floor)?i[0]:r.floor,isNaN(r.ceiling)?i[1]:r.ceiling]}else return i=r.min_extent||[],i;return t==="x"&&!isNaN(this.state.start)&&!isNaN(this.state.end)?[this.state.start,this.state.end]:[]}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error(`Invalid dimension identifier ${t}`);return[]}_getTooltipPosition(t){const n=this.parent,r=n[`y${this.layout.y_axis.axis}_scale`],i=n[`y${this.layout.y_axis.axis}_extent`],o=n.x_scale(n.x_extent[0]),a=r(i[0]);return{x_min:o,x_max:o,y_min:a,y_max:a}}_drawTooltip(t,n,r,i,o,a){const s=this.parent.layout,l=this.parent_plot.layout,u=this.layout,c=7,f=1,d=c+f,h=6,p=this._getPageOrigin(),g=t.selector.node().getBoundingClientRect(),b=s.height-(s.margin.top+s.margin.bottom),v=l.width-(s.margin.left+s.margin.right);r=Math.max(r,0),i=Math.min(i,v),o=Math.max(o,0),a=Math.min(a,b);const x=(r+i)/2,y=(o+a)/2;let _=i-x,S=a-y,$=u.tooltip_positioning,w,T,M,P,R;if($==="vertical"?(_=0,g.height+d>b-(y+S)?$="top":$="bottom"):$==="horizontal"&&(S=0,x<=l.width/2?$="left":$="right"),$==="top"||$==="bottom"){const C=Math.max(g.width/2-x,0),E=Math.max(g.width/2+x-v,0);T=p.x+x-g.width/2-E+C,R=p.x+x-T-c,$==="top"?(w=p.y+y-(S+g.height+d),M="down",P=g.height-f):(w=p.y+y+S+d,M="up",P=0-d)}else if($==="left"||$==="right")$==="left"?(T=p.x+x+_+d,M="left",R=-1*(c+f)):(T=p.x+x-g.width-_-d,M="right",R=g.width-f),y-g.height/2<=0?(w=p.y+y-1.5*c-h,P=h):y+g.height/2>=b?(w=p.y+y+c+h-g.height,P=g.height-2*c-h):(w=p.y+y-g.height/2,P=g.height/2-c);else throw new Error("Unrecognized placement value");return t.selector.style("left",`${T}px`).style("top",`${w}px`),t.arrow||(t.arrow=t.selector.append("div").style("position","absolute")),t.arrow.attr("class",`lz-data_layer-tooltip-arrow_${M}`).style("left",`${R}px`).style("top",`${P}px`),this}filter(t,n,r,i){let o=!0;return t.forEach(a=>{const{field:s,operator:l,value:u}=a,c=pr.get(l),f=this.getElementAnnotation(n),d=s?new za(s).resolve(n,f):n;c(d,u)||(o=!1)}),o}getElementAnnotation(t,n){const r=this.getElementId(t),i=this._layer_state.extra_fields[r];return n?i&&i[n]:i}_applyFilters(t){return t=t||this.data,this._filter_func?t=t.filter(this._filter_func):this.layout.filters&&(t=t.filter(this.filter.bind(this,this.layout.filters))),t}_setDefaultState(){const t={status_flags:{},extra_fields:{}},n=t.status_flags;qi.adjectives.forEach(r=>{n[r]=n[r]||new Set}),n.has_tooltip=n.has_tooltip||new Set,this.parent&&(this._state_id=`${this.parent.id}.${this.id}`,this.state=this.parent.state,this.state[this._state_id]=t),this._layer_state=t}getBaseId(){return this._base_id?this._base_id:this.parent?`${this.parent_plot.id}.${this.parent.id}.${this.id}`:(this.id||"").toString()}getAbsoluteDataHeight(){return this.svg.group.node().getBoundingClientRect().height}initialize(){this._base_id=this.getBaseId();const t=this.getBaseId();return this.svg.container=this.parent.svg.group.append("g").attr("class","lz-data_layer-container").attr("id",`${t}.data_layer_container`),this.svg.clipRect=this.svg.container.append("clipPath").attr("id",`${t}.clip`).append("rect"),this.svg.group=this.svg.container.append("g").attr("id",`${t}.data_layer`).attr("clip-path",`url(#${t}.clip)`),this}createTooltip(t){if(typeof this.layout.tooltip!="object")throw new Error(`DataLayer [${this.id}] layout does not define a tooltip`);const n=this.getElementId(t);if(this._tooltips[n]){this.positionTooltip(n);return}return this._tooltips[n]={data:t,arrow:null,selector:Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class","lz-data_layer-tooltip").attr("id",`${n}-tooltip`)},this._layer_state.status_flags.has_tooltip.add(n),this.updateTooltip(t),this}updateTooltip(t,n){return typeof n>"u"&&(n=this.getElementId(t)),this._tooltips[n].selector.html(""),this._tooltips[n].arrow=null,this.layout.tooltip.html&&this._tooltips[n].selector.html(Tl(this.layout.tooltip.html,t,this.getElementAnnotation(t))),this.layout.tooltip.closable&&this._tooltips[n].selector.insert("button",":first-child").attr("class","lz-tooltip-close-button").attr("title","Close").text("×").on("click",()=>{this.destroyTooltip(n)}),this._tooltips[n].selector.data([t]),this.positionTooltip(n),this}destroyTooltip(t,n){let r;return typeof t=="string"?r=t:r=this.getElementId(t),this._tooltips[r]&&(typeof this._tooltips[r].selector=="object"&&this._tooltips[r].selector.remove(),delete this._tooltips[r]),n||this._layer_state.status_flags.has_tooltip.delete(r),this}destroyAllTooltips(t=!0){for(let n in this._tooltips)this.destroyTooltip(n,t);return this}positionTooltip(t){if(typeof t!="string")throw new Error("Unable to position tooltip: id is not a string");if(!this._tooltips[t])throw new Error("Unable to position tooltip: id does not point to a valid tooltip");const n=this._tooltips[t],r=this._getTooltipPosition(n);if(!r)return null;this._drawTooltip(n,this.layout.tooltip_positioning,r.x_min,r.x_max,r.y_min,r.y_max)}positionAllTooltips(){for(let t in this._tooltips)this.positionTooltip(t);return this}showOrHideTooltip(t,n){const r=this.layout.tooltip;if(typeof r!="object")return this;const i=this.getElementId(t),o=(p,g,b)=>{let v=null;if(typeof p!="object"||p===null)return null;if(Array.isArray(g))b=b||"and",g.length===1?v=p[g[0]]:v=g.reduce((x,y)=>b==="and"?p[x]&&p[y]:b==="or"?p[x]||p[y]:null);else if(typeof g=="object"){let x;for(let y in g)x=o(p,g[y],y),v===null?v=x:b==="and"?v=v&&x:b==="or"&&(v=v||x)}else return!1;return v};let a={};typeof r.show=="string"?a={and:[r.show]}:typeof r.show=="object"&&(a=r.show);let s={};typeof r.hide=="string"?s={and:[r.hide]}:typeof r.hide=="object"&&(s=r.hide);const l=this._layer_state;var u={};qi.adjectives.forEach(p=>{const g=`un${p}`;u[p]=l.status_flags[p].has(i),u[g]=!u[p]});const c=o(u,a),f=o(u,s),d=l.status_flags.has_tooltip.has(i);return c&&!(n?!1:!d)&&!f?this.createTooltip(t):this.destroyTooltip(t),this}setElementStatus(t,n,r,i){if(t==="has_tooltip")return this;typeof r>"u"&&(r=!0);let o;try{o=this.getElementId(n)}catch{return this}i&&this.setAllElementStatus(t,!r),Ue(`#${o}`).classed(`lz-data_layer-${this.layout.type}-${t}`,r);const a=this.getElementStatusNodeId(n);a!==null&&Ue(`#${a}`).classed(`lz-data_layer-${this.layout.type}-statusnode-${t}`,r);const s=!this._layer_state.status_flags[t].has(o);r&&s&&this._layer_state.status_flags[t].add(o),!r&&!s&&this._layer_state.status_flags[t].delete(o),this.showOrHideTooltip(n,s),s&&this.parent.emit("layout_changed",!0);const l=t==="selected";l&&(s||!r)&&this.parent.emit("element_selection",{element:n,active:r},!0);const u=this.layout.match&&this.layout.match.send;return l&&typeof u<"u"&&(s||!r)&&this.parent.emit("match_requested",{value:new za(u).resolve(n),active:r},!0),this}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");return typeof this._layer_state.status_flags[t]>"u"?this:(typeof n>"u"&&(n=!0),n?this.data.forEach(r=>this.setElementStatus(t,r,!0)):(new Set(this._layer_state.status_flags[t]).forEach(i=>{const o=this.getElementById(i);typeof o=="object"&&o!==null&&this.setElementStatus(t,o,!1)}),this._layer_state.status_flags[t]=new Set),this._global_statuses[t]=n,this)}applyBehaviors(t){typeof this.layout.behaviors=="object"&&Object.keys(this.layout.behaviors).forEach(n=>{const r=/(click|mouseover|mouseout)/.exec(n);r&&t.on(`${r[0]}.${n}`,this.executeBehaviors(n,this.layout.behaviors[n]))})}executeBehaviors(t,n){const r={ctrl:t.includes("ctrl"),shift:t.includes("shift")},i=this;return function(o){o=o||Ue(Ce.target).datum(),!(r.ctrl!==!!Ce.ctrlKey||r.shift!==!!Ce.shiftKey)&&n.forEach(a=>{if(!(typeof a!="object"||a===null))switch(a.action){case"set":i.setElementStatus(a.status,o,!0,a.exclusive);break;case"unset":i.setElementStatus(a.status,o,!1,a.exclusive);break;case"toggle":var s=i._layer_state.status_flags[a.status].has(i.getElementId(o)),l=a.exclusive&&!s;i.setElementStatus(a.status,o,!s,l);break;case"link":if(typeof a.href=="string"){const u=Tl(a.href,o,i.getElementAnnotation(o));typeof a.target=="string"?window.open(u,a.target):window.location.href=u}break}})}}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.parent.layout.margin.left,y:t.y+this.parent.layout.margin.top}}applyAllElementStatus(){const t=this._layer_state.status_flags,n=this;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].forEach(i=>{try{this.setElementStatus(r,this.getElementById(i),!0)}catch(o){console.warn(`Unable to apply state: ${n._state_id}, ${r}`),console.error(o)}})}draw(){return this.svg.container.attr("transform",`translate(${this.parent.layout.cliparea.origin.x}, ${this.parent.layout.cliparea.origin.y})`),this.svg.clipRect.attr("width",this.parent.layout.cliparea.width).attr("height",this.parent.layout.cliparea.height),this.positionAllTooltips(),this}reMap(){return this.destroyAllTooltips(),this.parent_plot.lzd.getData(this.state,this._entities,this._dependencies).then(t=>{this.data=t,this.applyDataMethods(),this._initialized=!0,this.parent.emit("data_from_layer",{layer:this.getBaseId(),content:at(t)},!0)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;cr.prototype[`${e}Element`]=function(i,o=!1){return o=!!o,this.setElementStatus(n,i,!0,o),this},cr.prototype[`${r}Element`]=function(i,o){return typeof o>"u"?o=!1:o=!!o,this.setElementStatus(n,i,!1,o),this},cr.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},cr.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const pK={color:"#000000",filters:null,tooltip_positioning:"vertical",hitarea_width:8};class gK extends cr{constructor(t){if(!Array.isArray(t.filters))throw new Error("Annotation track must specify array of filters for selecting points to annotate");qt(t,pK),super(...arguments)}initialize(){super.initialize(),this._hitareas_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-hit_areas`),this._visible_lines_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-visible_lines`)}render(){const t=this._applyFilters(),n=this._hitareas_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]),r=(a,s)=>{const l=this.parent.x_scale(a[this.layout.x_axis.field]);let u=l-this.layout.hitarea_width/2;if(s>=1){const c=t[s-1],f=this.parent.x_scale(c[this.layout.x_axis.field]);u=Math.max(u,(l+f)/2)}return[u,l]};n.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(n).attr("id",a=>this.getElementId(a)).attr("height",this.parent.layout.height).attr("opacity",0).attr("x",(a,s)=>r(a,s)[0]).attr("width",(a,s)=>{const l=r(a,s);return l[1]-l[0]+this.layout.hitarea_width/2});const i=1,o=this._visible_lines_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]);o.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(o).attr("id",a=>this.getElementId(a)).attr("x",a=>this.parent.x_scale(a[this.layout.x_axis.field])-i/2).attr("width",i).attr("height",this.parent.layout.height).attr("fill",(a,s)=>this.resolveScalableParameter(this.layout.color,a,s)),o.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),n.exit().remove()}_getTooltipPosition(t){const n=this.parent,r=n.layout.height-(n.layout.margin.top+n.layout.margin.bottom),i=1,o=n.x_scale(t.data[this.layout.x_axis.field]),a=r/2;return{x_min:o-i,x_max:o+i,y_min:a-n.layout.margin.top,y_max:a+n.layout.margin.bottom}}}const vK={color:"#CCCCCC",fill_opacity:.5,filters:null,regions:[],id_field:"id",start_field:"start",end_field:"end",merge_field:null};class bK extends cr{constructor(t){if(qt(t,vK),t.interaction||t.behaviors)throw new Error("highlight_regions layer does not support mouse events");if(t.regions.length&&t.namespace&&Object.keys(t.namespace).length)throw new Error('highlight_regions layer can specify "regions" in layout, OR external data "fields", but not both');super(...arguments)}_mergeNodes(t){const{end_field:n,merge_field:r,start_field:i}=this.layout;if(!r)return t;t.sort((a,s)=>Sr(a[r],s[r])||Sr(a[i],s[i]));let o=[];return t.forEach(function(a,s){const l=o[o.length-1]||a;if(a[r]===l[r]&&a[i]<=l[n]){const u=Math.min(l[i],a[i]),c=Math.max(l[n],a[n]);a=Object.assign({},l,a,{[i]:u,[n]:c}),o.pop()}o.push(a)}),o}render(){const{x_scale:t}=this.parent;let n=this.layout.regions.length?this.layout.regions:this.data;n.forEach((i,o)=>i.id||(i.id=o)),n=this._applyFilters(n),n=this._mergeNodes(n);const r=this.svg.group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(n);r.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(r).attr("id",i=>this.getElementId(i)).attr("x",i=>t(i[this.layout.start_field])).attr("width",i=>t(i[this.layout.end_field])-t(i[this.layout.start_field])).attr("height",this.parent.layout.height).attr("fill",(i,o)=>this.resolveScalableParameter(this.layout.color,i,o)).attr("fill-opacity",(i,o)=>this.resolveScalableParameter(this.layout.fill_opacity,i,o)),r.exit().remove(),this.svg.group.style("pointer-events","none")}_getTooltipPosition(t){throw new Error("This layer does not support tooltips")}}const mK={color:"seagreen",hitarea_width:"10px",style:{fill:"none","stroke-width":"1px","stroke-opacity":"100%"},tooltip_positioning:"top"};class yK extends cr{constructor(t){t=qt(t,mK),super(...arguments)}render(){const t=this,n=t.layout,r=t.parent.x_scale,i=t.parent[`y${n.y_axis.axis}_scale`],o=this._applyFilters();function a(u){const c=u[n.x_axis.field1],f=u[n.x_axis.field2],d=(c+f)/2,h=[[r(c),i(0)],[r(d),i(u[n.y_axis.field])],[r(f),i(0)]];return Cs().x(g=>g[0]).y(g=>g[1]).curve(F6)(h)}const s=this.svg.group.selectAll("path.lz-data_layer-arcs-hitarea").data(o,u=>this.getElementId(u)),l=this.svg.group.selectAll("path.lz-data_layer-arcs").data(o,u=>this.getElementId(u));return this.svg.group.call(xn,n.style),s.enter().append("path").attr("class","lz-data_layer-arcs-hitarea").merge(s).attr("id",u=>this.getElementId(u)).style("fill","none").style("stroke-width",n.hitarea_width).style("stroke-opacity",0).style("stroke","transparent").attr("d",u=>a(u)),l.enter().append("path").attr("class","lz-data_layer-arcs").merge(l).attr("id",u=>this.getElementId(u)).attr("stroke",(u,c)=>this.resolveScalableParameter(this.layout.color,u,c)).attr("d",(u,c)=>a(u)),l.exit().remove(),s.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),this}_getTooltipPosition(t){const n=this.parent,r=this.layout,i=t.data[r.x_axis.field1],o=t.data[r.x_axis.field2],a=n[`y${r.y_axis.axis}_scale`];return{x_min:n.x_scale(Math.min(i,o)),x_max:n.x_scale(Math.max(i,o)),y_min:a(t.data[r.y_axis.field]),y_max:a(0)}}}const _K={stroke:"rgb(54, 54, 150)",color:"#363696",label_font_size:15,label_exon_spacing:3,exon_height:10,bounding_box_padding:3,track_vertical_spacing:5,tooltip_positioning:"top"};class xK extends cr{constructor(t){t=qt(t,_K),super(...arguments),this.transcript_idx=0,this.tracks=1,this.gene_track_index={1:[]}}getElementStatusNodeId(t){return`${this.getElementId(t)}-statusnode`}getTrackHeight(){return 2*this.layout.bounding_box_padding+this.layout.label_font_size+this.layout.label_exon_spacing+this.layout.exon_height+this.layout.track_vertical_spacing}assignTracks(t){const n=(r,i)=>{try{const o=this.svg.group.append("text").attr("x",0).attr("y",0).attr("class","lz-data_layer-genes lz-label").style("font-size",i).text(`${r}→`),a=o.node().getBBox().width;return o.remove(),a}catch{return 0}};return this.tracks=1,this.gene_track_index={1:[]},t.filter(r=>!(r.end<this.state.start)&&!(r.start>this.state.end)).map(r=>{if(r.gene_id&&r.gene_id.indexOf(".")){const o=r.gene_id.split(".");r.gene_id=o[0],r.gene_version=o[1]}if(r.transcript_id=r.transcripts[this.transcript_idx].transcript_id,r.display_range={start:this.parent.x_scale(Math.max(r.start,this.state.start)),end:this.parent.x_scale(Math.min(r.end,this.state.end))},r.display_range.label_width=n(r.gene_name,this.layout.label_font_size),r.display_range.width=r.display_range.end-r.display_range.start,r.display_range.text_anchor="middle",r.display_range.width<r.display_range.label_width){if(r.start<this.state.start)r.display_range.end=r.display_range.start+r.display_range.label_width+this.layout.label_font_size,r.display_range.text_anchor="start";else if(r.end>this.state.end)r.display_range.start=r.display_range.end-r.display_range.label_width-this.layout.label_font_size,r.display_range.text_anchor="end";else{const o=(r.display_range.label_width-r.display_range.width)/2+this.layout.label_font_size;r.display_range.start-o<this.parent.x_scale(this.state.start)?(r.display_range.start=this.parent.x_scale(this.state.start),r.display_range.end=r.display_range.start+r.display_range.label_width,r.display_range.text_anchor="start"):r.display_range.end+o>this.parent.x_scale(this.state.end)?(r.display_range.end=this.parent.x_scale(this.state.end),r.display_range.start=r.display_range.end-r.display_range.label_width,r.display_range.text_anchor="end"):(r.display_range.start-=o,r.display_range.end+=o)}r.display_range.width=r.display_range.end-r.display_range.start}r.display_range.start-=this.layout.bounding_box_padding,r.display_range.end+=this.layout.bounding_box_padding,r.display_range.width+=2*this.layout.bounding_box_padding,r.display_domain={start:this.parent.x_scale.invert(r.display_range.start),end:this.parent.x_scale.invert(r.display_range.end)},r.display_domain.width=r.display_domain.end-r.display_domain.start,r.track=null;let i=1;for(;r.track===null;){let o=!1;this.gene_track_index[i].map(a=>{if(!o){const s=Math.min(a.display_range.start,r.display_range.start);Math.max(a.display_range.end,r.display_range.end)-s<a.display_range.width+r.display_range.width&&(o=!0)}}),o?(i++,i>this.tracks&&(this.tracks=i,this.gene_track_index[i]=[])):(r.track=i,this.gene_track_index[i].push(r))}return r.parent=this,r.transcripts.map((o,a)=>{r.transcripts[a].parent=r,r.transcripts[a].exons.map((s,l)=>r.transcripts[a].exons[l].parent=r.transcripts[a])}),r})}render(){const t=this;let n=this._applyFilters();n=this.assignTracks(n);let r;const i=this.svg.group.selectAll("g.lz-data_layer-genes").data(n,o=>o.gene_name);i.enter().append("g").attr("class","lz-data_layer-genes").merge(i).attr("id",o=>this.getElementId(o)).each(function(o){const a=o.parent,s=Ue(this).selectAll("rect.lz-data_layer-genes.lz-data_layer-genes-statusnode").data([o],d=>a.getElementStatusNodeId(d));r=a.getTrackHeight()-a.layout.track_vertical_spacing,s.enter().append("rect").attr("class","lz-data_layer-genes lz-data_layer-genes-statusnode").merge(s).attr("id",d=>a.getElementStatusNodeId(d)).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",d=>d.display_range.width).attr("height",r).attr("x",d=>d.display_range.start).attr("y",d=>(d.track-1)*a.getTrackHeight()),s.exit().remove();const l=Ue(this).selectAll("rect.lz-data_layer-genes.lz-boundary").data([o],d=>`${d.gene_name}_boundary`);r=1,l.enter().append("rect").attr("class","lz-data_layer-genes lz-boundary").merge(l).attr("width",d=>a.parent.x_scale(d.end)-a.parent.x_scale(d.start)).attr("height",r).attr("x",d=>a.parent.x_scale(d.start)).attr("y",d=>(d.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing+Math.max(a.layout.exon_height,3)/2).style("fill",(d,h)=>t.resolveScalableParameter(t.layout.color,d,h)).style("stroke",(d,h)=>t.resolveScalableParameter(t.layout.stroke,d,h)),l.exit().remove();const u=Ue(this).selectAll("text.lz-data_layer-genes.lz-label").data([o],d=>`${d.gene_name}_label`);u.enter().append("text").attr("class","lz-data_layer-genes lz-label").merge(u).attr("text-anchor",d=>d.display_range.text_anchor).text(d=>d.strand==="+"?`${d.gene_name}→`:`←${d.gene_name}`).style("font-size",o.parent.layout.label_font_size).attr("x",d=>{if(d.display_range.text_anchor==="middle")return d.display_range.start+d.display_range.width/2;if(d.display_range.text_anchor==="start")return d.display_range.start+a.layout.bounding_box_padding;if(d.display_range.text_anchor==="end")return d.display_range.end-a.layout.bounding_box_padding}).attr("y",d=>(d.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size),u.exit().remove();const c=Ue(this).selectAll("rect.lz-data_layer-genes.lz-exon").data(o.transcripts[o.parent.transcript_idx].exons,d=>d.exon_id);r=a.layout.exon_height,c.enter().append("rect").attr("class","lz-data_layer-genes lz-exon").merge(c).style("fill",(d,h)=>t.resolveScalableParameter(t.layout.color,d.parent.parent,h)).style("stroke",(d,h)=>t.resolveScalableParameter(t.layout.stroke,d.parent.parent,h)).attr("width",d=>a.parent.x_scale(d.end)-a.parent.x_scale(d.start)).attr("height",r).attr("x",d=>a.parent.x_scale(d.start)).attr("y",()=>(o.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing),c.exit().remove();const f=Ue(this).selectAll("rect.lz-data_layer-genes.lz-clickarea").data([o],d=>`${d.gene_name}_clickarea`);r=a.getTrackHeight()-a.layout.track_vertical_spacing,f.enter().append("rect").attr("class","lz-data_layer-genes lz-clickarea").merge(f).attr("id",d=>`${a.getElementId(d)}_clickarea`).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",d=>d.display_range.width).attr("height",r).attr("x",d=>d.display_range.start).attr("y",d=>(d.track-1)*a.getTrackHeight()),f.exit().remove()}),i.exit().remove(),this.svg.group.on("click.event_emitter",o=>this.parent.emit("element_clicked",o,!0)).call(this.applyBehaviors.bind(this))}_getTooltipPosition(t){const n=this.getElementStatusNodeId(t.data),r=Ue(`#${n}`).node().getBBox();return{x_min:this.parent.x_scale(t.data.start),x_max:this.parent.x_scale(t.data.end),y_min:r.y,y_max:r.y+r.height}}}const wK={style:{fill:"none","stroke-width":"2px"},interpolate:"curveLinear",x_axis:{field:"x"},y_axis:{field:"y",axis:1},hitarea_width:5,tooltip:null};class CK extends cr{constructor(t){if(t=qt(t,wK),t.tooltip)throw new Error("The line / filled curve layer does not support tooltips");super(...arguments)}render(){const t=this.parent,n=this.layout.x_axis.field,r=this.layout.y_axis.field,i=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]);this.path=i.enter().append("path").attr("class","lz-data_layer-line");let o;const a=t.x_scale,s=t[`y${this.layout.y_axis.axis}_scale`];this.layout.style.fill&&this.layout.style.fill!=="none"?o=Fb().x(l=>+a(l[n])).y0(+s(0)).y1(l=>+s(l[r])):o=Cs().x(l=>+a(l[n])).y(l=>+s(l[r])).curve(j6[this.layout.interpolate]),i.merge(this.path).attr("d",o).call(xn,this.layout.style),i.exit().remove()}setElementStatus(t,n,r){return this.setAllElementStatus(t,r)}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");if(typeof this._layer_state.status_flags[t]>"u")return this;typeof n>"u"&&(n=!0),this._global_statuses[t]=n;let r="lz-data_layer-line";return Object.keys(this._global_statuses).forEach(i=>{this._global_statuses[i]&&(r+=` lz-data_layer-line-${i}`)}),this.path.attr("class",r),this.parent.emit("layout_changed",!0),this}}const SK={style:{stroke:"#D3D3D3","stroke-width":"3px","stroke-dasharray":"10px 10px"},orientation:"horizontal",x_axis:{axis:1,decoupled:!0},y_axis:{axis:1,decoupled:!0},tooltip_positioning:"vertical",offset:0};class $K extends cr{constructor(t){t=qt(t,SK),["horizontal","vertical"].includes(t.orientation)||(t.orientation="horizontal"),super(...arguments)}getElementId(t){return this.getBaseId()}render(){const t=this.parent,n="x_scale",r=`y${this.layout.y_axis.axis}_scale`,i="x_extent",o=`y${this.layout.y_axis.axis}_extent`,a="x_range";if(this.layout.orientation==="horizontal")this.data=[{x:t[i][0],y:this.layout.offset},{x:t[i][1],y:this.layout.offset}];else if(this.layout.orientation==="vertical")this.data=[{x:this.layout.offset,y:t[o][0]},{x:this.layout.offset,y:t[o][1]}];else throw new Error('Unrecognized vertical line type. Must be "vertical" or "horizontal"');const s=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]),l=[t.layout.cliparea.height,0],u=Cs().x((c,f)=>{const d=+t[n](c.x);return isNaN(d)?t[a][f]:d}).y((c,f)=>{const d=+t[r](c.y);return isNaN(d)?l[f]:d});this.path=s.enter().append("path").attr("class","lz-data_layer-line").merge(s).attr("d",u).call(xn,this.layout.style).call(this.applyBehaviors.bind(this)),s.exit().remove()}_getTooltipPosition(t){try{const n=lr(this.svg.container.node()),r=n[0],i=n[1];return{x_min:r-1,x_max:r+1,y_min:i-1,y_max:i+1}}catch{return null}}}function kK(e,t,n,r,i,o,a){let s=[];const l=Symbol.for("lzX"),u=Symbol.for("lzY");let c=null,f=null,d=[];function h(){if(d.length){const g=d[Math.floor((d.length-1)/2)];s.push(g)}c=f=null,d=[]}function p(g,b,v){c=g,f=b,d.push(v)}return e.forEach(g=>{const b=g[l],v=g[u],x=b>=t&&b<=n&&v>=i&&v<=o;g.lz_is_match||!x?(h(),s.push(g)):c===null?p(b,v,g):Math.abs(b-c)<=r&&Math.abs(v-f)<=a?d.push(g):(h(),p(b,v,g))}),h(),s}const MK={point_size:40,point_shape:"circle",tooltip_positioning:"horizontal",color:"#888888",coalesce:{active:!1,max_points:800,x_min:"-Infinity",x_max:"Infinity",y_min:0,y_max:3,x_gap:7,y_gap:7},fill_opacity:1,y_axis:{axis:1},id_field:"id"};class Q6 extends cr{constructor(t){t=qt(t,MK),t.label&&isNaN(t.label.spacing)&&(t.label.spacing=4),super(...arguments)}_getTooltipPosition(t){const n=this.parent.x_scale(t.data[this.layout.x_axis.field]),r=`y${this.layout.y_axis.axis}_scale`,i=this.parent[r](t.data[this.layout.y_axis.field]),o=this.resolveScalableParameter(this.layout.point_size,t.data),a=Math.sqrt(o/Math.PI);return{x_min:n-a,x_max:n+a,y_min:i-a,y_max:i+a}}flip_labels(){const t=this,n=t.resolveScalableParameter(t.layout.point_size,{}),r=t.layout.label.spacing,i=!!t.layout.label.lines,o=2*r,a=this.parent_plot.layout.width-this.parent.layout.margin.left-this.parent.layout.margin.right-2*r,s=(l,u)=>{const c=+l.attr("x"),f=2*r+2*Math.sqrt(n);let d,h;i&&(d=+u.attr("x2"),h=r+2*Math.sqrt(n)),l.style("text-anchor")==="start"?(l.style("text-anchor","end"),l.attr("x",c-f),i&&u.attr("x2",d-h)):(l.style("text-anchor","start"),l.attr("x",c+f),i&&u.attr("x2",d+h))};t._label_texts.each(function(l,u){const f=Ue(this),d=+f.attr("x"),h=f.node().getBoundingClientRect();if(d+h.width+r>a){const p=i?Ue(t._label_lines.nodes()[u]):null;s(f,p)}}),t._label_texts.each(function(l,u){const f=Ue(this);if(f.style("text-anchor")==="end")return;let d=+f.attr("x");const h=f.node().getBoundingClientRect(),p=i?Ue(t._label_lines.nodes()[u]):null;t._label_texts.each(function(){const v=Ue(this).node().getBoundingClientRect();h.left<v.left+v.width+2*r&&h.left+h.width+2*r>v.left&&h.top<v.top+v.height+2*r&&h.height+h.top+2*r>v.top&&(s(f,p),d=+f.attr("x"),d-h.width-r<o&&s(f,p))})})}separate_labels(){this._label_iterations++;const t=this,n=.5;if(!this.layout.label)return;const r=this.layout.label.spacing;let i=!1;if(t._label_texts.each(function(){const o=this,a=Ue(o),s=a.attr("y");t._label_texts.each(function(){const l=this;if(o===l)return;const u=Ue(l);if(a.attr("text-anchor")!==u.attr("text-anchor"))return;const c=a.node().getBoundingClientRect(),f=u.node().getBoundingClientRect();if(!(c.left<f.left+f.width+2*r&&c.left+c.width+2*r>f.left&&c.top<f.top+f.height+2*r&&c.height+c.top+2*r>f.top))return;i=!0;const h=u.attr("y"),g=(c.top<f.top?1:-1)*n;let b=+s-g,v=+h+g;const x=2*r,y=t.parent.layout.height-t.parent.layout.margin.top-t.parent.layout.margin.bottom-2*r;let _;b-c.height/2<x?(_=+s-b,b=+s,v+=_):v-f.height/2<x&&(_=+h-v,v=+h,b+=_),b+c.height/2>y?(_=b-+s,b=+s,v-=_):v+f.height/2>y&&(_=v-+h,v=+h,b-=_),a.attr("y",b),u.attr("y",v)})}),i){if(t.layout.label.lines){const o=t._label_texts.nodes();t._label_lines.attr("y2",(a,s)=>Ue(o[s]).attr("y"))}this._label_iterations<150&&setTimeout(()=>{this.separate_labels()},1)}}render(){const t=this,n=this.parent.x_scale,r=this.parent[`y${this.layout.y_axis.axis}_scale`],i=Symbol.for("lzX"),o=Symbol.for("lzY");let a=this._applyFilters();if(a.forEach(f=>{let d=n(f[this.layout.x_axis.field]),h=r(f[this.layout.y_axis.field]);isNaN(d)&&(d=-1e3),isNaN(h)&&(h=-1e3),f[i]=d,f[o]=h}),this.layout.coalesce.active&&a.length>this.layout.coalesce.max_points){let{x_min:f,x_max:d,y_min:h,y_max:p,x_gap:g,y_gap:b}=this.layout.coalesce;const v=isFinite(f)?n(+f):-1/0,x=isFinite(d)?n(+d):1/0,y=isFinite(p)?r(+p):-1/0,_=isFinite(h)?r(+h):1/0;a=kK(a,v,x,g,y,_,b)}if(this.layout.label){let f;const d=t.layout.label.filters||[];if(!d.length)f=a;else{const g=this.filter.bind(this,d);f=a.filter(g)}this._label_groups=this.svg.group.selectAll(`g.lz-data_layer-${this.layout.type}-label`).data(f,g=>`${g[this.layout.id_field]}_label`);const h=`lz-data_layer-${this.layout.type}-label`,p=this._label_groups.enter().append("g").attr("class",h);this._label_texts&&this._label_texts.remove(),this._label_texts=this._label_groups.merge(p).append("text").text(g=>Tl(t.layout.label.text||"",g,this.getElementAnnotation(g))).attr("x",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing).attr("y",g=>g[o]).attr("text-anchor","start").call(xn,t.layout.label.style||{}),t.layout.label.lines&&(this._label_lines&&this._label_lines.remove(),this._label_lines=this._label_groups.merge(p).append("line").attr("x1",g=>g[i]).attr("y1",g=>g[o]).attr("x2",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing/2).attr("y2",g=>g[o]).call(xn,t.layout.label.lines.style||{})),this._label_groups.exit().remove()}else this._label_texts&&this._label_texts.remove(),this._label_lines&&this._label_lines.remove(),this._label_groups&&this._label_groups.remove();const s=this.svg.group.selectAll(`path.lz-data_layer-${this.layout.type}`).data(a,f=>f[this.layout.id_field]),l=f=>`translate(${f[i]}, ${f[o]})`,u=Nb().size((f,d)=>this.resolveScalableParameter(this.layout.point_size,f,d)).type((f,d)=>G6(this.resolveScalableParameter(this.layout.point_shape,f,d))),c=`lz-data_layer-${this.layout.type}`;s.enter().append("path").attr("class",c).attr("id",f=>this.getElementId(f)).merge(s).attr("transform",l).attr("fill",(f,d)=>this.resolveScalableParameter(this.layout.color,f,d)).attr("fill-opacity",(f,d)=>this.resolveScalableParameter(this.layout.fill_opacity,f,d)).attr("d",u),s.exit().remove(),this.layout.label&&(this.flip_labels(),this._label_iterations=0,this.separate_labels()),this.svg.group.on("click.event_emitter",()=>{const f=Ue(Ce.target).datum();this.parent.emit("element_clicked",f,!0)}).call(this.applyBehaviors.bind(this))}makeLDReference(t){let n=null;if(typeof t>"u")throw new Error("makeLDReference requires one argument of any type");return typeof t=="object"?this.layout.id_field&&typeof t[this.layout.id_field]<"u"?n=t[this.layout.id_field].toString():typeof t.id<"u"?n=t.id.toString():n=t.toString():n=t.toString(),this.parent.emit("set_ldrefvar",{ldrefvar:n},!0),this.parent_plot.applyState({ldrefvar:n})}}class TK extends Q6{constructor(t){super(...arguments),this._categories={}}_prepareData(){const t=this.layout.x_axis.field||"x",n=this.layout.x_axis.category_field;if(!n)throw new Error(`Layout for ${this.layout.id} must specify category_field`);const r=this.data.sort((i,o)=>{const a=i[n],s=o[n],l=typeof a=="string"?a.toLowerCase():a,u=typeof s=="string"?s.toLowerCase():s;return l===u?0:l<u?-1:1});return r.forEach((i,o)=>{i[t]=i[t]||o}),r}_generateCategoryBounds(){const t=this.layout.x_axis.category_field,n=this.layout.x_axis.field||"x",r={};this.data.forEach(o=>{const a=o[t],s=o[n],l=r[a]||[s,s];r[a]=[Math.min(l[0],s),Math.max(l[1],s)]});const i=Object.keys(r);return this._setDynamicColorScheme(i),r}_getColorScale(t){t=t||this.layout;let n=t.color||[];if(Array.isArray(n)&&(n=n.find(r=>r.scale_function==="categorical_bin")),!n||n.scale_function!=="categorical_bin")throw new Error("This layer requires that color options be provided as a `categorical_bin`");return n}_setDynamicColorScheme(t){const n=this._getColorScale(this.layout).parameters,r=this._getColorScale(this._base_layout).parameters;if(r.categories.length&&r.values.length){const o={};r.categories.forEach(a=>{o[a]=1}),t.every(a=>Object.prototype.hasOwnProperty.call(o,a))?n.categories=r.categories:n.categories=t}else n.categories=t;let i;for(r.values.length?i=r.values:i=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];i.length<t.length;)i=i.concat(i);i=i.slice(0,t.length),n.values=i}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error("Invalid dimension identifier");const r=n.position||"left";if(!["left","center","right"].includes(r))throw new Error("Invalid tick position");const i=this._categories;if(!i||!Object.keys(i).length)return[];if(t==="y")return[];if(t==="x"){const o=this._getColorScale(this.layout),a=o.parameters.categories||[],s=o.parameters.values||[];return Object.keys(i).map((l,u)=>{const c=i[l];let f;switch(r){case"left":f=c[0];break;case"center":const d=c[1]-c[0];f=c[0]+(d!==0?d:c[0])/2;break;case"right":f=c[1];break}return{x:f,text:l,style:{fill:s[a.indexOf(l)]||"#000000"}}})}}applyCustomDataMethods(){return this.data=this._prepareData(),this._categories=this._generateCategoryBounds(),this}}const EK=Object.freeze(Object.defineProperty({__proto__:null,BaseDataLayer:cr,annotation_track:gK,arcs:yK,category_scatter:TK,genes:xK,highlight_regions:bK,line:CK,orthogonal_line:$K,scatter:Q6},Symbol.toStringTag,{value:"Module"})),Yb=new Cv;for(let[e,t]of Object.entries(EK))Yb.add(e,t);const Xb=7.301,Kb={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2003
|
+
`)}return this.data.forEach((o,a)=>{t&&r!==null&&r!==void 0&&(o.lz_is_match=n(i.resolve(o),r)),o.getDataLayer=()=>this,o.getPanel=()=>this.parent||null,o.getPlot=()=>{const s=this.parent;return s?s.parent:null}}),this.applyCustomDataMethods(),this}applyCustomDataMethods(){return this}resolveScalableParameter(t,n,r){let i=null;if(Array.isArray(t)){let o=0;for(;i===null&&o<t.length;)i=this.resolveScalableParameter(t[o],n,r),o++}else switch(typeof t){case"number":case"string":i=t;break;case"object":if(t.scale_function){const o=ch.get(t.scale_function);if(t.field){const a=new za(t.field);let s;try{s=this.getElementAnnotation(n)}catch{s=null}i=o(t.parameters||{},a.resolve(n,s),r)}else i=o(t.parameters||{},n,r)}break}return i}getAxisExtent(t){if(!["x","y"].includes(t))throw new Error("Invalid dimension identifier");const n=`${t}_axis`,r=this.layout[n];if(!isNaN(r.floor)&&!isNaN(r.ceiling))return[+r.floor,+r.ceiling];let i=[];if(r.field&&this.data)if(this.data.length){i=this._getDataExtent(this.data,r);const o=i[1]-i[0];if(isNaN(r.lower_buffer)||(i[0]-=o*r.lower_buffer),isNaN(r.upper_buffer)||(i[1]+=o*r.upper_buffer),typeof r.min_extent=="object"){const a=r.min_extent[0],s=r.min_extent[1];!isNaN(a)&&!isNaN(s)&&(i[0]=Math.min(i[0],a)),isNaN(s)||(i[1]=Math.max(i[1],s))}return[isNaN(r.floor)?i[0]:r.floor,isNaN(r.ceiling)?i[1]:r.ceiling]}else return i=r.min_extent||[],i;return t==="x"&&!isNaN(this.state.start)&&!isNaN(this.state.end)?[this.state.start,this.state.end]:[]}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error(`Invalid dimension identifier ${t}`);return[]}_getTooltipPosition(t){const n=this.parent,r=n[`y${this.layout.y_axis.axis}_scale`],i=n[`y${this.layout.y_axis.axis}_extent`],o=n.x_scale(n.x_extent[0]),a=r(i[0]);return{x_min:o,x_max:o,y_min:a,y_max:a}}_drawTooltip(t,n,r,i,o,a){const s=this.parent.layout,l=this.parent_plot.layout,u=this.layout,c=7,d=1,f=c+d,h=6,p=this._getPageOrigin(),g=t.selector.node().getBoundingClientRect(),b=s.height-(s.margin.top+s.margin.bottom),v=l.width-(s.margin.left+s.margin.right);r=Math.max(r,0),i=Math.min(i,v),o=Math.max(o,0),a=Math.min(a,b);const x=(r+i)/2,y=(o+a)/2;let _=i-x,S=a-y,$=u.tooltip_positioning,w,T,M,P,R;if($==="vertical"?(_=0,g.height+f>b-(y+S)?$="top":$="bottom"):$==="horizontal"&&(S=0,x<=l.width/2?$="left":$="right"),$==="top"||$==="bottom"){const C=Math.max(g.width/2-x,0),E=Math.max(g.width/2+x-v,0);T=p.x+x-g.width/2-E+C,R=p.x+x-T-c,$==="top"?(w=p.y+y-(S+g.height+f),M="down",P=g.height-d):(w=p.y+y+S+f,M="up",P=0-f)}else if($==="left"||$==="right")$==="left"?(T=p.x+x+_+f,M="left",R=-1*(c+d)):(T=p.x+x-g.width-_-f,M="right",R=g.width-d),y-g.height/2<=0?(w=p.y+y-1.5*c-h,P=h):y+g.height/2>=b?(w=p.y+y+c+h-g.height,P=g.height-2*c-h):(w=p.y+y-g.height/2,P=g.height/2-c);else throw new Error("Unrecognized placement value");return t.selector.style("left",`${T}px`).style("top",`${w}px`),t.arrow||(t.arrow=t.selector.append("div").style("position","absolute")),t.arrow.attr("class",`lz-data_layer-tooltip-arrow_${M}`).style("left",`${R}px`).style("top",`${P}px`),this}filter(t,n,r,i){let o=!0;return t.forEach(a=>{const{field:s,operator:l,value:u}=a,c=pr.get(l),d=this.getElementAnnotation(n),f=s?new za(s).resolve(n,d):n;c(f,u)||(o=!1)}),o}getElementAnnotation(t,n){const r=this.getElementId(t),i=this._layer_state.extra_fields[r];return n?i&&i[n]:i}_applyFilters(t){return t=t||this.data,this._filter_func?t=t.filter(this._filter_func):this.layout.filters&&(t=t.filter(this.filter.bind(this,this.layout.filters))),t}_setDefaultState(){const t={status_flags:{},extra_fields:{}},n=t.status_flags;qi.adjectives.forEach(r=>{n[r]=n[r]||new Set}),n.has_tooltip=n.has_tooltip||new Set,this.parent&&(this._state_id=`${this.parent.id}.${this.id}`,this.state=this.parent.state,this.state[this._state_id]=t),this._layer_state=t}getBaseId(){return this._base_id?this._base_id:this.parent?`${this.parent_plot.id}.${this.parent.id}.${this.id}`:(this.id||"").toString()}getAbsoluteDataHeight(){return this.svg.group.node().getBoundingClientRect().height}initialize(){this._base_id=this.getBaseId();const t=this.getBaseId();return this.svg.container=this.parent.svg.group.append("g").attr("class","lz-data_layer-container").attr("id",`${t}.data_layer_container`),this.svg.clipRect=this.svg.container.append("clipPath").attr("id",`${t}.clip`).append("rect"),this.svg.group=this.svg.container.append("g").attr("id",`${t}.data_layer`).attr("clip-path",`url(#${t}.clip)`),this}createTooltip(t){if(typeof this.layout.tooltip!="object")throw new Error(`DataLayer [${this.id}] layout does not define a tooltip`);const n=this.getElementId(t);if(this._tooltips[n]){this.positionTooltip(n);return}return this._tooltips[n]={data:t,arrow:null,selector:Ue(this.parent_plot.svg.node().parentNode).append("div").attr("class","lz-data_layer-tooltip").attr("id",`${n}-tooltip`)},this._layer_state.status_flags.has_tooltip.add(n),this.updateTooltip(t),this}updateTooltip(t,n){return typeof n>"u"&&(n=this.getElementId(t)),this._tooltips[n].selector.html(""),this._tooltips[n].arrow=null,this.layout.tooltip.html&&this._tooltips[n].selector.html(Tl(this.layout.tooltip.html,t,this.getElementAnnotation(t))),this.layout.tooltip.closable&&this._tooltips[n].selector.insert("button",":first-child").attr("class","lz-tooltip-close-button").attr("title","Close").text("×").on("click",()=>{this.destroyTooltip(n)}),this._tooltips[n].selector.data([t]),this.positionTooltip(n),this}destroyTooltip(t,n){let r;return typeof t=="string"?r=t:r=this.getElementId(t),this._tooltips[r]&&(typeof this._tooltips[r].selector=="object"&&this._tooltips[r].selector.remove(),delete this._tooltips[r]),n||this._layer_state.status_flags.has_tooltip.delete(r),this}destroyAllTooltips(t=!0){for(let n in this._tooltips)this.destroyTooltip(n,t);return this}positionTooltip(t){if(typeof t!="string")throw new Error("Unable to position tooltip: id is not a string");if(!this._tooltips[t])throw new Error("Unable to position tooltip: id does not point to a valid tooltip");const n=this._tooltips[t],r=this._getTooltipPosition(n);if(!r)return null;this._drawTooltip(n,this.layout.tooltip_positioning,r.x_min,r.x_max,r.y_min,r.y_max)}positionAllTooltips(){for(let t in this._tooltips)this.positionTooltip(t);return this}showOrHideTooltip(t,n){const r=this.layout.tooltip;if(typeof r!="object")return this;const i=this.getElementId(t),o=(p,g,b)=>{let v=null;if(typeof p!="object"||p===null)return null;if(Array.isArray(g))b=b||"and",g.length===1?v=p[g[0]]:v=g.reduce((x,y)=>b==="and"?p[x]&&p[y]:b==="or"?p[x]||p[y]:null);else if(typeof g=="object"){let x;for(let y in g)x=o(p,g[y],y),v===null?v=x:b==="and"?v=v&&x:b==="or"&&(v=v||x)}else return!1;return v};let a={};typeof r.show=="string"?a={and:[r.show]}:typeof r.show=="object"&&(a=r.show);let s={};typeof r.hide=="string"?s={and:[r.hide]}:typeof r.hide=="object"&&(s=r.hide);const l=this._layer_state;var u={};qi.adjectives.forEach(p=>{const g=`un${p}`;u[p]=l.status_flags[p].has(i),u[g]=!u[p]});const c=o(u,a),d=o(u,s),f=l.status_flags.has_tooltip.has(i);return c&&!(n?!1:!f)&&!d?this.createTooltip(t):this.destroyTooltip(t),this}setElementStatus(t,n,r,i){if(t==="has_tooltip")return this;typeof r>"u"&&(r=!0);let o;try{o=this.getElementId(n)}catch{return this}i&&this.setAllElementStatus(t,!r),Ue(`#${o}`).classed(`lz-data_layer-${this.layout.type}-${t}`,r);const a=this.getElementStatusNodeId(n);a!==null&&Ue(`#${a}`).classed(`lz-data_layer-${this.layout.type}-statusnode-${t}`,r);const s=!this._layer_state.status_flags[t].has(o);r&&s&&this._layer_state.status_flags[t].add(o),!r&&!s&&this._layer_state.status_flags[t].delete(o),this.showOrHideTooltip(n,s),s&&this.parent.emit("layout_changed",!0);const l=t==="selected";l&&(s||!r)&&this.parent.emit("element_selection",{element:n,active:r},!0);const u=this.layout.match&&this.layout.match.send;return l&&typeof u<"u"&&(s||!r)&&this.parent.emit("match_requested",{value:new za(u).resolve(n),active:r},!0),this}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");return typeof this._layer_state.status_flags[t]>"u"?this:(typeof n>"u"&&(n=!0),n?this.data.forEach(r=>this.setElementStatus(t,r,!0)):(new Set(this._layer_state.status_flags[t]).forEach(i=>{const o=this.getElementById(i);typeof o=="object"&&o!==null&&this.setElementStatus(t,o,!1)}),this._layer_state.status_flags[t]=new Set),this._global_statuses[t]=n,this)}applyBehaviors(t){typeof this.layout.behaviors=="object"&&Object.keys(this.layout.behaviors).forEach(n=>{const r=/(click|mouseover|mouseout)/.exec(n);r&&t.on(`${r[0]}.${n}`,this.executeBehaviors(n,this.layout.behaviors[n]))})}executeBehaviors(t,n){const r={ctrl:t.includes("ctrl"),shift:t.includes("shift")},i=this;return function(o){o=o||Ue(Ce.target).datum(),!(r.ctrl!==!!Ce.ctrlKey||r.shift!==!!Ce.shiftKey)&&n.forEach(a=>{if(!(typeof a!="object"||a===null))switch(a.action){case"set":i.setElementStatus(a.status,o,!0,a.exclusive);break;case"unset":i.setElementStatus(a.status,o,!1,a.exclusive);break;case"toggle":var s=i._layer_state.status_flags[a.status].has(i.getElementId(o)),l=a.exclusive&&!s;i.setElementStatus(a.status,o,!s,l);break;case"link":if(typeof a.href=="string"){const u=Tl(a.href,o,i.getElementAnnotation(o));typeof a.target=="string"?window.open(u,a.target):window.location.href=u}break}})}}_getPageOrigin(){const t=this.parent._getPageOrigin();return{x:t.x+this.parent.layout.margin.left,y:t.y+this.parent.layout.margin.top}}applyAllElementStatus(){const t=this._layer_state.status_flags,n=this;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].forEach(i=>{try{this.setElementStatus(r,this.getElementById(i),!0)}catch(o){console.warn(`Unable to apply state: ${n._state_id}, ${r}`),console.error(o)}})}draw(){return this.svg.container.attr("transform",`translate(${this.parent.layout.cliparea.origin.x}, ${this.parent.layout.cliparea.origin.y})`),this.svg.clipRect.attr("width",this.parent.layout.cliparea.width).attr("height",this.parent.layout.cliparea.height),this.positionAllTooltips(),this}reMap(){return this.destroyAllTooltips(),this.parent_plot.lzd.getData(this.state,this._entities,this._dependencies).then(t=>{this.data=t,this.applyDataMethods(),this._initialized=!0,this.parent.emit("data_from_layer",{layer:this.getBaseId(),content:at(t)},!0)})}}qi.verbs.forEach((e,t)=>{const n=qi.adjectives[t],r=`un${e}`;cr.prototype[`${e}Element`]=function(i,o=!1){return o=!!o,this.setElementStatus(n,i,!0,o),this},cr.prototype[`${r}Element`]=function(i,o){return typeof o>"u"?o=!1:o=!!o,this.setElementStatus(n,i,!1,o),this},cr.prototype[`${e}AllElements`]=function(){return this.setAllElementStatus(n,!0),this},cr.prototype[`${r}AllElements`]=function(){return this.setAllElementStatus(n,!1),this}});const pK={color:"#000000",filters:null,tooltip_positioning:"vertical",hitarea_width:8};class gK extends cr{constructor(t){if(!Array.isArray(t.filters))throw new Error("Annotation track must specify array of filters for selecting points to annotate");qt(t,pK),super(...arguments)}initialize(){super.initialize(),this._hitareas_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-hit_areas`),this._visible_lines_group=this.svg.group.append("g").attr("class",`lz-data_layer-${this.layout.type}-visible_lines`)}render(){const t=this._applyFilters(),n=this._hitareas_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]),r=(a,s)=>{const l=this.parent.x_scale(a[this.layout.x_axis.field]);let u=l-this.layout.hitarea_width/2;if(s>=1){const c=t[s-1],d=this.parent.x_scale(c[this.layout.x_axis.field]);u=Math.max(u,(l+d)/2)}return[u,l]};n.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(n).attr("id",a=>this.getElementId(a)).attr("height",this.parent.layout.height).attr("opacity",0).attr("x",(a,s)=>r(a,s)[0]).attr("width",(a,s)=>{const l=r(a,s);return l[1]-l[0]+this.layout.hitarea_width/2});const i=1,o=this._visible_lines_group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(t,a=>a[this.layout.id_field]);o.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(o).attr("id",a=>this.getElementId(a)).attr("x",a=>this.parent.x_scale(a[this.layout.x_axis.field])-i/2).attr("width",i).attr("height",this.parent.layout.height).attr("fill",(a,s)=>this.resolveScalableParameter(this.layout.color,a,s)),o.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),n.exit().remove()}_getTooltipPosition(t){const n=this.parent,r=n.layout.height-(n.layout.margin.top+n.layout.margin.bottom),i=1,o=n.x_scale(t.data[this.layout.x_axis.field]),a=r/2;return{x_min:o-i,x_max:o+i,y_min:a-n.layout.margin.top,y_max:a+n.layout.margin.bottom}}}const vK={color:"#CCCCCC",fill_opacity:.5,filters:null,regions:[],id_field:"id",start_field:"start",end_field:"end",merge_field:null};class bK extends cr{constructor(t){if(qt(t,vK),t.interaction||t.behaviors)throw new Error("highlight_regions layer does not support mouse events");if(t.regions.length&&t.namespace&&Object.keys(t.namespace).length)throw new Error('highlight_regions layer can specify "regions" in layout, OR external data "fields", but not both');super(...arguments)}_mergeNodes(t){const{end_field:n,merge_field:r,start_field:i}=this.layout;if(!r)return t;t.sort((a,s)=>Sr(a[r],s[r])||Sr(a[i],s[i]));let o=[];return t.forEach(function(a,s){const l=o[o.length-1]||a;if(a[r]===l[r]&&a[i]<=l[n]){const u=Math.min(l[i],a[i]),c=Math.max(l[n],a[n]);a=Object.assign({},l,a,{[i]:u,[n]:c}),o.pop()}o.push(a)}),o}render(){const{x_scale:t}=this.parent;let n=this.layout.regions.length?this.layout.regions:this.data;n.forEach((i,o)=>i.id||(i.id=o)),n=this._applyFilters(n),n=this._mergeNodes(n);const r=this.svg.group.selectAll(`rect.lz-data_layer-${this.layout.type}`).data(n);r.enter().append("rect").attr("class",`lz-data_layer-${this.layout.type}`).merge(r).attr("id",i=>this.getElementId(i)).attr("x",i=>t(i[this.layout.start_field])).attr("width",i=>t(i[this.layout.end_field])-t(i[this.layout.start_field])).attr("height",this.parent.layout.height).attr("fill",(i,o)=>this.resolveScalableParameter(this.layout.color,i,o)).attr("fill-opacity",(i,o)=>this.resolveScalableParameter(this.layout.fill_opacity,i,o)),r.exit().remove(),this.svg.group.style("pointer-events","none")}_getTooltipPosition(t){throw new Error("This layer does not support tooltips")}}const mK={color:"seagreen",hitarea_width:"10px",style:{fill:"none","stroke-width":"1px","stroke-opacity":"100%"},tooltip_positioning:"top"};class yK extends cr{constructor(t){t=qt(t,mK),super(...arguments)}render(){const t=this,n=t.layout,r=t.parent.x_scale,i=t.parent[`y${n.y_axis.axis}_scale`],o=this._applyFilters();function a(u){const c=u[n.x_axis.field1],d=u[n.x_axis.field2],f=(c+d)/2,h=[[r(c),i(0)],[r(f),i(u[n.y_axis.field])],[r(d),i(0)]];return Cs().x(g=>g[0]).y(g=>g[1]).curve(F6)(h)}const s=this.svg.group.selectAll("path.lz-data_layer-arcs-hitarea").data(o,u=>this.getElementId(u)),l=this.svg.group.selectAll("path.lz-data_layer-arcs").data(o,u=>this.getElementId(u));return this.svg.group.call(xn,n.style),s.enter().append("path").attr("class","lz-data_layer-arcs-hitarea").merge(s).attr("id",u=>this.getElementId(u)).style("fill","none").style("stroke-width",n.hitarea_width).style("stroke-opacity",0).style("stroke","transparent").attr("d",u=>a(u)),l.enter().append("path").attr("class","lz-data_layer-arcs").merge(l).attr("id",u=>this.getElementId(u)).attr("stroke",(u,c)=>this.resolveScalableParameter(this.layout.color,u,c)).attr("d",(u,c)=>a(u)),l.exit().remove(),s.exit().remove(),this.svg.group.call(this.applyBehaviors.bind(this)),this}_getTooltipPosition(t){const n=this.parent,r=this.layout,i=t.data[r.x_axis.field1],o=t.data[r.x_axis.field2],a=n[`y${r.y_axis.axis}_scale`];return{x_min:n.x_scale(Math.min(i,o)),x_max:n.x_scale(Math.max(i,o)),y_min:a(t.data[r.y_axis.field]),y_max:a(0)}}}const _K={stroke:"rgb(54, 54, 150)",color:"#363696",label_font_size:15,label_exon_spacing:3,exon_height:10,bounding_box_padding:3,track_vertical_spacing:5,tooltip_positioning:"top"};class xK extends cr{constructor(t){t=qt(t,_K),super(...arguments),this.transcript_idx=0,this.tracks=1,this.gene_track_index={1:[]}}getElementStatusNodeId(t){return`${this.getElementId(t)}-statusnode`}getTrackHeight(){return 2*this.layout.bounding_box_padding+this.layout.label_font_size+this.layout.label_exon_spacing+this.layout.exon_height+this.layout.track_vertical_spacing}assignTracks(t){const n=(r,i)=>{try{const o=this.svg.group.append("text").attr("x",0).attr("y",0).attr("class","lz-data_layer-genes lz-label").style("font-size",i).text(`${r}→`),a=o.node().getBBox().width;return o.remove(),a}catch{return 0}};return this.tracks=1,this.gene_track_index={1:[]},t.filter(r=>!(r.end<this.state.start)&&!(r.start>this.state.end)).map(r=>{if(r.gene_id&&r.gene_id.indexOf(".")){const o=r.gene_id.split(".");r.gene_id=o[0],r.gene_version=o[1]}if(r.transcript_id=r.transcripts[this.transcript_idx].transcript_id,r.display_range={start:this.parent.x_scale(Math.max(r.start,this.state.start)),end:this.parent.x_scale(Math.min(r.end,this.state.end))},r.display_range.label_width=n(r.gene_name,this.layout.label_font_size),r.display_range.width=r.display_range.end-r.display_range.start,r.display_range.text_anchor="middle",r.display_range.width<r.display_range.label_width){if(r.start<this.state.start)r.display_range.end=r.display_range.start+r.display_range.label_width+this.layout.label_font_size,r.display_range.text_anchor="start";else if(r.end>this.state.end)r.display_range.start=r.display_range.end-r.display_range.label_width-this.layout.label_font_size,r.display_range.text_anchor="end";else{const o=(r.display_range.label_width-r.display_range.width)/2+this.layout.label_font_size;r.display_range.start-o<this.parent.x_scale(this.state.start)?(r.display_range.start=this.parent.x_scale(this.state.start),r.display_range.end=r.display_range.start+r.display_range.label_width,r.display_range.text_anchor="start"):r.display_range.end+o>this.parent.x_scale(this.state.end)?(r.display_range.end=this.parent.x_scale(this.state.end),r.display_range.start=r.display_range.end-r.display_range.label_width,r.display_range.text_anchor="end"):(r.display_range.start-=o,r.display_range.end+=o)}r.display_range.width=r.display_range.end-r.display_range.start}r.display_range.start-=this.layout.bounding_box_padding,r.display_range.end+=this.layout.bounding_box_padding,r.display_range.width+=2*this.layout.bounding_box_padding,r.display_domain={start:this.parent.x_scale.invert(r.display_range.start),end:this.parent.x_scale.invert(r.display_range.end)},r.display_domain.width=r.display_domain.end-r.display_domain.start,r.track=null;let i=1;for(;r.track===null;){let o=!1;this.gene_track_index[i].map(a=>{if(!o){const s=Math.min(a.display_range.start,r.display_range.start);Math.max(a.display_range.end,r.display_range.end)-s<a.display_range.width+r.display_range.width&&(o=!0)}}),o?(i++,i>this.tracks&&(this.tracks=i,this.gene_track_index[i]=[])):(r.track=i,this.gene_track_index[i].push(r))}return r.parent=this,r.transcripts.map((o,a)=>{r.transcripts[a].parent=r,r.transcripts[a].exons.map((s,l)=>r.transcripts[a].exons[l].parent=r.transcripts[a])}),r})}render(){const t=this;let n=this._applyFilters();n=this.assignTracks(n);let r;const i=this.svg.group.selectAll("g.lz-data_layer-genes").data(n,o=>o.gene_name);i.enter().append("g").attr("class","lz-data_layer-genes").merge(i).attr("id",o=>this.getElementId(o)).each(function(o){const a=o.parent,s=Ue(this).selectAll("rect.lz-data_layer-genes.lz-data_layer-genes-statusnode").data([o],f=>a.getElementStatusNodeId(f));r=a.getTrackHeight()-a.layout.track_vertical_spacing,s.enter().append("rect").attr("class","lz-data_layer-genes lz-data_layer-genes-statusnode").merge(s).attr("id",f=>a.getElementStatusNodeId(f)).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",f=>f.display_range.width).attr("height",r).attr("x",f=>f.display_range.start).attr("y",f=>(f.track-1)*a.getTrackHeight()),s.exit().remove();const l=Ue(this).selectAll("rect.lz-data_layer-genes.lz-boundary").data([o],f=>`${f.gene_name}_boundary`);r=1,l.enter().append("rect").attr("class","lz-data_layer-genes lz-boundary").merge(l).attr("width",f=>a.parent.x_scale(f.end)-a.parent.x_scale(f.start)).attr("height",r).attr("x",f=>a.parent.x_scale(f.start)).attr("y",f=>(f.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing+Math.max(a.layout.exon_height,3)/2).style("fill",(f,h)=>t.resolveScalableParameter(t.layout.color,f,h)).style("stroke",(f,h)=>t.resolveScalableParameter(t.layout.stroke,f,h)),l.exit().remove();const u=Ue(this).selectAll("text.lz-data_layer-genes.lz-label").data([o],f=>`${f.gene_name}_label`);u.enter().append("text").attr("class","lz-data_layer-genes lz-label").merge(u).attr("text-anchor",f=>f.display_range.text_anchor).text(f=>f.strand==="+"?`${f.gene_name}→`:`←${f.gene_name}`).style("font-size",o.parent.layout.label_font_size).attr("x",f=>{if(f.display_range.text_anchor==="middle")return f.display_range.start+f.display_range.width/2;if(f.display_range.text_anchor==="start")return f.display_range.start+a.layout.bounding_box_padding;if(f.display_range.text_anchor==="end")return f.display_range.end-a.layout.bounding_box_padding}).attr("y",f=>(f.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size),u.exit().remove();const c=Ue(this).selectAll("rect.lz-data_layer-genes.lz-exon").data(o.transcripts[o.parent.transcript_idx].exons,f=>f.exon_id);r=a.layout.exon_height,c.enter().append("rect").attr("class","lz-data_layer-genes lz-exon").merge(c).style("fill",(f,h)=>t.resolveScalableParameter(t.layout.color,f.parent.parent,h)).style("stroke",(f,h)=>t.resolveScalableParameter(t.layout.stroke,f.parent.parent,h)).attr("width",f=>a.parent.x_scale(f.end)-a.parent.x_scale(f.start)).attr("height",r).attr("x",f=>a.parent.x_scale(f.start)).attr("y",()=>(o.track-1)*a.getTrackHeight()+a.layout.bounding_box_padding+a.layout.label_font_size+a.layout.label_exon_spacing),c.exit().remove();const d=Ue(this).selectAll("rect.lz-data_layer-genes.lz-clickarea").data([o],f=>`${f.gene_name}_clickarea`);r=a.getTrackHeight()-a.layout.track_vertical_spacing,d.enter().append("rect").attr("class","lz-data_layer-genes lz-clickarea").merge(d).attr("id",f=>`${a.getElementId(f)}_clickarea`).attr("rx",a.layout.bounding_box_padding).attr("ry",a.layout.bounding_box_padding).attr("width",f=>f.display_range.width).attr("height",r).attr("x",f=>f.display_range.start).attr("y",f=>(f.track-1)*a.getTrackHeight()),d.exit().remove()}),i.exit().remove(),this.svg.group.on("click.event_emitter",o=>this.parent.emit("element_clicked",o,!0)).call(this.applyBehaviors.bind(this))}_getTooltipPosition(t){const n=this.getElementStatusNodeId(t.data),r=Ue(`#${n}`).node().getBBox();return{x_min:this.parent.x_scale(t.data.start),x_max:this.parent.x_scale(t.data.end),y_min:r.y,y_max:r.y+r.height}}}const wK={style:{fill:"none","stroke-width":"2px"},interpolate:"curveLinear",x_axis:{field:"x"},y_axis:{field:"y",axis:1},hitarea_width:5,tooltip:null};class CK extends cr{constructor(t){if(t=qt(t,wK),t.tooltip)throw new Error("The line / filled curve layer does not support tooltips");super(...arguments)}render(){const t=this.parent,n=this.layout.x_axis.field,r=this.layout.y_axis.field,i=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]);this.path=i.enter().append("path").attr("class","lz-data_layer-line");let o;const a=t.x_scale,s=t[`y${this.layout.y_axis.axis}_scale`];this.layout.style.fill&&this.layout.style.fill!=="none"?o=Fb().x(l=>+a(l[n])).y0(+s(0)).y1(l=>+s(l[r])):o=Cs().x(l=>+a(l[n])).y(l=>+s(l[r])).curve(j6[this.layout.interpolate]),i.merge(this.path).attr("d",o).call(xn,this.layout.style),i.exit().remove()}setElementStatus(t,n,r){return this.setAllElementStatus(t,r)}setAllElementStatus(t,n){if(typeof t>"u"||!qi.adjectives.includes(t))throw new Error("Invalid status");if(typeof this._layer_state.status_flags[t]>"u")return this;typeof n>"u"&&(n=!0),this._global_statuses[t]=n;let r="lz-data_layer-line";return Object.keys(this._global_statuses).forEach(i=>{this._global_statuses[i]&&(r+=` lz-data_layer-line-${i}`)}),this.path.attr("class",r),this.parent.emit("layout_changed",!0),this}}const SK={style:{stroke:"#D3D3D3","stroke-width":"3px","stroke-dasharray":"10px 10px"},orientation:"horizontal",x_axis:{axis:1,decoupled:!0},y_axis:{axis:1,decoupled:!0},tooltip_positioning:"vertical",offset:0};class $K extends cr{constructor(t){t=qt(t,SK),["horizontal","vertical"].includes(t.orientation)||(t.orientation="horizontal"),super(...arguments)}getElementId(t){return this.getBaseId()}render(){const t=this.parent,n="x_scale",r=`y${this.layout.y_axis.axis}_scale`,i="x_extent",o=`y${this.layout.y_axis.axis}_extent`,a="x_range";if(this.layout.orientation==="horizontal")this.data=[{x:t[i][0],y:this.layout.offset},{x:t[i][1],y:this.layout.offset}];else if(this.layout.orientation==="vertical")this.data=[{x:this.layout.offset,y:t[o][0]},{x:this.layout.offset,y:t[o][1]}];else throw new Error('Unrecognized vertical line type. Must be "vertical" or "horizontal"');const s=this.svg.group.selectAll("path.lz-data_layer-line").data([this.data]),l=[t.layout.cliparea.height,0],u=Cs().x((c,d)=>{const f=+t[n](c.x);return isNaN(f)?t[a][d]:f}).y((c,d)=>{const f=+t[r](c.y);return isNaN(f)?l[d]:f});this.path=s.enter().append("path").attr("class","lz-data_layer-line").merge(s).attr("d",u).call(xn,this.layout.style).call(this.applyBehaviors.bind(this)),s.exit().remove()}_getTooltipPosition(t){try{const n=lr(this.svg.container.node()),r=n[0],i=n[1];return{x_min:r-1,x_max:r+1,y_min:i-1,y_max:i+1}}catch{return null}}}function kK(e,t,n,r,i,o,a){let s=[];const l=Symbol.for("lzX"),u=Symbol.for("lzY");let c=null,d=null,f=[];function h(){if(f.length){const g=f[Math.floor((f.length-1)/2)];s.push(g)}c=d=null,f=[]}function p(g,b,v){c=g,d=b,f.push(v)}return e.forEach(g=>{const b=g[l],v=g[u],x=b>=t&&b<=n&&v>=i&&v<=o;g.lz_is_match||!x?(h(),s.push(g)):c===null?p(b,v,g):Math.abs(b-c)<=r&&Math.abs(v-d)<=a?f.push(g):(h(),p(b,v,g))}),h(),s}const MK={point_size:40,point_shape:"circle",tooltip_positioning:"horizontal",color:"#888888",coalesce:{active:!1,max_points:800,x_min:"-Infinity",x_max:"Infinity",y_min:0,y_max:3,x_gap:7,y_gap:7},fill_opacity:1,y_axis:{axis:1},id_field:"id"};class Q6 extends cr{constructor(t){t=qt(t,MK),t.label&&isNaN(t.label.spacing)&&(t.label.spacing=4),super(...arguments)}_getTooltipPosition(t){const n=this.parent.x_scale(t.data[this.layout.x_axis.field]),r=`y${this.layout.y_axis.axis}_scale`,i=this.parent[r](t.data[this.layout.y_axis.field]),o=this.resolveScalableParameter(this.layout.point_size,t.data),a=Math.sqrt(o/Math.PI);return{x_min:n-a,x_max:n+a,y_min:i-a,y_max:i+a}}flip_labels(){const t=this,n=t.resolveScalableParameter(t.layout.point_size,{}),r=t.layout.label.spacing,i=!!t.layout.label.lines,o=2*r,a=this.parent_plot.layout.width-this.parent.layout.margin.left-this.parent.layout.margin.right-2*r,s=(l,u)=>{const c=+l.attr("x"),d=2*r+2*Math.sqrt(n);let f,h;i&&(f=+u.attr("x2"),h=r+2*Math.sqrt(n)),l.style("text-anchor")==="start"?(l.style("text-anchor","end"),l.attr("x",c-d),i&&u.attr("x2",f-h)):(l.style("text-anchor","start"),l.attr("x",c+d),i&&u.attr("x2",f+h))};t._label_texts.each(function(l,u){const d=Ue(this),f=+d.attr("x"),h=d.node().getBoundingClientRect();if(f+h.width+r>a){const p=i?Ue(t._label_lines.nodes()[u]):null;s(d,p)}}),t._label_texts.each(function(l,u){const d=Ue(this);if(d.style("text-anchor")==="end")return;let f=+d.attr("x");const h=d.node().getBoundingClientRect(),p=i?Ue(t._label_lines.nodes()[u]):null;t._label_texts.each(function(){const v=Ue(this).node().getBoundingClientRect();h.left<v.left+v.width+2*r&&h.left+h.width+2*r>v.left&&h.top<v.top+v.height+2*r&&h.height+h.top+2*r>v.top&&(s(d,p),f=+d.attr("x"),f-h.width-r<o&&s(d,p))})})}separate_labels(){this._label_iterations++;const t=this,n=.5;if(!this.layout.label)return;const r=this.layout.label.spacing;let i=!1;if(t._label_texts.each(function(){const o=this,a=Ue(o),s=a.attr("y");t._label_texts.each(function(){const l=this;if(o===l)return;const u=Ue(l);if(a.attr("text-anchor")!==u.attr("text-anchor"))return;const c=a.node().getBoundingClientRect(),d=u.node().getBoundingClientRect();if(!(c.left<d.left+d.width+2*r&&c.left+c.width+2*r>d.left&&c.top<d.top+d.height+2*r&&c.height+c.top+2*r>d.top))return;i=!0;const h=u.attr("y"),g=(c.top<d.top?1:-1)*n;let b=+s-g,v=+h+g;const x=2*r,y=t.parent.layout.height-t.parent.layout.margin.top-t.parent.layout.margin.bottom-2*r;let _;b-c.height/2<x?(_=+s-b,b=+s,v+=_):v-d.height/2<x&&(_=+h-v,v=+h,b+=_),b+c.height/2>y?(_=b-+s,b=+s,v-=_):v+d.height/2>y&&(_=v-+h,v=+h,b-=_),a.attr("y",b),u.attr("y",v)})}),i){if(t.layout.label.lines){const o=t._label_texts.nodes();t._label_lines.attr("y2",(a,s)=>Ue(o[s]).attr("y"))}this._label_iterations<150&&setTimeout(()=>{this.separate_labels()},1)}}render(){const t=this,n=this.parent.x_scale,r=this.parent[`y${this.layout.y_axis.axis}_scale`],i=Symbol.for("lzX"),o=Symbol.for("lzY");let a=this._applyFilters();if(a.forEach(d=>{let f=n(d[this.layout.x_axis.field]),h=r(d[this.layout.y_axis.field]);isNaN(f)&&(f=-1e3),isNaN(h)&&(h=-1e3),d[i]=f,d[o]=h}),this.layout.coalesce.active&&a.length>this.layout.coalesce.max_points){let{x_min:d,x_max:f,y_min:h,y_max:p,x_gap:g,y_gap:b}=this.layout.coalesce;const v=isFinite(d)?n(+d):-1/0,x=isFinite(f)?n(+f):1/0,y=isFinite(p)?r(+p):-1/0,_=isFinite(h)?r(+h):1/0;a=kK(a,v,x,g,y,_,b)}if(this.layout.label){let d;const f=t.layout.label.filters||[];if(!f.length)d=a;else{const g=this.filter.bind(this,f);d=a.filter(g)}this._label_groups=this.svg.group.selectAll(`g.lz-data_layer-${this.layout.type}-label`).data(d,g=>`${g[this.layout.id_field]}_label`);const h=`lz-data_layer-${this.layout.type}-label`,p=this._label_groups.enter().append("g").attr("class",h);this._label_texts&&this._label_texts.remove(),this._label_texts=this._label_groups.merge(p).append("text").text(g=>Tl(t.layout.label.text||"",g,this.getElementAnnotation(g))).attr("x",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing).attr("y",g=>g[o]).attr("text-anchor","start").call(xn,t.layout.label.style||{}),t.layout.label.lines&&(this._label_lines&&this._label_lines.remove(),this._label_lines=this._label_groups.merge(p).append("line").attr("x1",g=>g[i]).attr("y1",g=>g[o]).attr("x2",g=>g[i]+Math.sqrt(t.resolveScalableParameter(t.layout.point_size,g))+t.layout.label.spacing/2).attr("y2",g=>g[o]).call(xn,t.layout.label.lines.style||{})),this._label_groups.exit().remove()}else this._label_texts&&this._label_texts.remove(),this._label_lines&&this._label_lines.remove(),this._label_groups&&this._label_groups.remove();const s=this.svg.group.selectAll(`path.lz-data_layer-${this.layout.type}`).data(a,d=>d[this.layout.id_field]),l=d=>`translate(${d[i]}, ${d[o]})`,u=Nb().size((d,f)=>this.resolveScalableParameter(this.layout.point_size,d,f)).type((d,f)=>G6(this.resolveScalableParameter(this.layout.point_shape,d,f))),c=`lz-data_layer-${this.layout.type}`;s.enter().append("path").attr("class",c).attr("id",d=>this.getElementId(d)).merge(s).attr("transform",l).attr("fill",(d,f)=>this.resolveScalableParameter(this.layout.color,d,f)).attr("fill-opacity",(d,f)=>this.resolveScalableParameter(this.layout.fill_opacity,d,f)).attr("d",u),s.exit().remove(),this.layout.label&&(this.flip_labels(),this._label_iterations=0,this.separate_labels()),this.svg.group.on("click.event_emitter",()=>{const d=Ue(Ce.target).datum();this.parent.emit("element_clicked",d,!0)}).call(this.applyBehaviors.bind(this))}makeLDReference(t){let n=null;if(typeof t>"u")throw new Error("makeLDReference requires one argument of any type");return typeof t=="object"?this.layout.id_field&&typeof t[this.layout.id_field]<"u"?n=t[this.layout.id_field].toString():typeof t.id<"u"?n=t.id.toString():n=t.toString():n=t.toString(),this.parent.emit("set_ldrefvar",{ldrefvar:n},!0),this.parent_plot.applyState({ldrefvar:n})}}class TK extends Q6{constructor(t){super(...arguments),this._categories={}}_prepareData(){const t=this.layout.x_axis.field||"x",n=this.layout.x_axis.category_field;if(!n)throw new Error(`Layout for ${this.layout.id} must specify category_field`);const r=this.data.sort((i,o)=>{const a=i[n],s=o[n],l=typeof a=="string"?a.toLowerCase():a,u=typeof s=="string"?s.toLowerCase():s;return l===u?0:l<u?-1:1});return r.forEach((i,o)=>{i[t]=i[t]||o}),r}_generateCategoryBounds(){const t=this.layout.x_axis.category_field,n=this.layout.x_axis.field||"x",r={};this.data.forEach(o=>{const a=o[t],s=o[n],l=r[a]||[s,s];r[a]=[Math.min(l[0],s),Math.max(l[1],s)]});const i=Object.keys(r);return this._setDynamicColorScheme(i),r}_getColorScale(t){t=t||this.layout;let n=t.color||[];if(Array.isArray(n)&&(n=n.find(r=>r.scale_function==="categorical_bin")),!n||n.scale_function!=="categorical_bin")throw new Error("This layer requires that color options be provided as a `categorical_bin`");return n}_setDynamicColorScheme(t){const n=this._getColorScale(this.layout).parameters,r=this._getColorScale(this._base_layout).parameters;if(r.categories.length&&r.values.length){const o={};r.categories.forEach(a=>{o[a]=1}),t.every(a=>Object.prototype.hasOwnProperty.call(o,a))?n.categories=r.categories:n.categories=t}else n.categories=t;let i;for(r.values.length?i=r.values:i=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];i.length<t.length;)i=i.concat(i);i=i.slice(0,t.length),n.values=i}getTicks(t,n){if(!["x","y1","y2"].includes(t))throw new Error("Invalid dimension identifier");const r=n.position||"left";if(!["left","center","right"].includes(r))throw new Error("Invalid tick position");const i=this._categories;if(!i||!Object.keys(i).length)return[];if(t==="y")return[];if(t==="x"){const o=this._getColorScale(this.layout),a=o.parameters.categories||[],s=o.parameters.values||[];return Object.keys(i).map((l,u)=>{const c=i[l];let d;switch(r){case"left":d=c[0];break;case"center":const f=c[1]-c[0];d=c[0]+(f!==0?f:c[0])/2;break;case"right":d=c[1];break}return{x:d,text:l,style:{fill:s[a.indexOf(l)]||"#000000"}}})}}applyCustomDataMethods(){return this.data=this._prepareData(),this._categories=this._generateCategoryBounds(),this}}const EK=Object.freeze(Object.defineProperty({__proto__:null,BaseDataLayer:cr,annotation_track:gK,arcs:yK,category_scatter:TK,genes:xK,highlight_regions:bK,line:CK,orthogonal_line:$K,scatter:Q6},Symbol.toStringTag,{value:"Module"})),Yb=new Cv;for(let[e,t]of Object.entries(EK))Yb.add(e,t);const Xb=7.301,Kb={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2004
2004
|
P Value: <strong>{{assoc:log_pvalue|logtoscinotation|htmlescape}}</strong><br>
|
|
2005
2005
|
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>
|
|
2006
2006
|
{{#if lz_is_ld_refvar}}<strong>LD Reference Variant</strong>{{#else}}
|
|
@@ -2011,10 +2011,10 @@ ${t}
|
|
|
2011
2011
|
onclick="var item = this.parentNode.__data__, layer = item.getDataLayer();
|
|
2012
2012
|
var current = layer.getElementAnnotation(item, 'lz_show_label');
|
|
2013
2013
|
layer.setElementAnnotation(item, 'lz_show_label', !current );
|
|
2014
|
-
layer.parent_plot.applyState();">{{#if lz_show_label}}Hide{{#else}}Show{{/if}} label</a>`,e}(),e4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:'<h4><strong><i>{{gene_name|htmlescape}}</i></strong></h4>Gene ID: <a href="https://useast.ensembl.org/homo_sapiens/Gene/Summary?g={{gene_id|htmlescape}}&db=core" target="_blank" rel="noopener">{{gene_id|htmlescape}}</a><br>Transcript ID: <strong>{{transcript_id|htmlescape}}</strong><br>{{#if pLI}}<table><tr><th>Constraint</th><th>Expected variants</th><th>Observed variants</th><th>Const. Metric</th></tr><tr><td>Synonymous</td><td>{{exp_syn}}</td><td>{{obs_syn}}</td><td>z = {{syn_z}}<br>o/e = {{oe_syn}} ({{oe_syn_lower}} - {{oe_syn_upper}})</td></tr><tr><td>Missense</td><td>{{exp_mis}}</td><td>{{obs_mis}}</td><td>z = {{mis_z}}<br>o/e = {{oe_mis}} ({{oe_mis_lower}} - {{oe_mis_upper}})</td></tr><tr><td>pLoF</td><td>{{exp_lof}}</td><td>{{obs_lof}}</td><td>pLI = {{pLI}}<br>o/e = {{oe_lof}} ({{oe_lof_lower}} - {{oe_lof_upper}})</td></tr></table><br>{{/if}}<a href="https://gnomad.broadinstitute.org/gene/{{gene_id|htmlescape}}" target="_blank" rel="noopener">More data on gnomAD</a>'},t4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:'<strong>{{catalog:variant|htmlescape}}</strong><br>Catalog entries: <strong>{{n_catalog_matches|htmlescape}}</strong><br>Top Trait: <strong>{{catalog:trait|htmlescape}}</strong><br>Top P Value: <strong>{{catalog:log_pvalue|logtoscinotation}}</strong><br>More: <a href="https://www.ebi.ac.uk/gwas/search?query={{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">GWAS catalog</a> / <a href="https://www.ncbi.nlm.nih.gov/snp/{{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">dbSNP</a>'},n4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:"<strong>Regulatory element</strong><br>{{access:start1|htmlescape}}-{{access:end1|htmlescape}}<br><strong>Promoter</strong><br>{{access:start2|htmlescape}}-{{access:end2|htmlescape}}<br>{{#if access:target}}<strong>Target</strong>: {{access:target|htmlescape}}<br>{{/if}}<strong>Score</strong>: {{access:score|htmlescape}}"},
|
|
2014
|
+
layer.parent_plot.applyState();">{{#if lz_show_label}}Hide{{#else}}Show{{/if}} label</a>`,e}(),e4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:'<h4><strong><i>{{gene_name|htmlescape}}</i></strong></h4>Gene ID: <a href="https://useast.ensembl.org/homo_sapiens/Gene/Summary?g={{gene_id|htmlescape}}&db=core" target="_blank" rel="noopener">{{gene_id|htmlescape}}</a><br>Transcript ID: <strong>{{transcript_id|htmlescape}}</strong><br>{{#if pLI}}<table><tr><th>Constraint</th><th>Expected variants</th><th>Observed variants</th><th>Const. Metric</th></tr><tr><td>Synonymous</td><td>{{exp_syn}}</td><td>{{obs_syn}}</td><td>z = {{syn_z}}<br>o/e = {{oe_syn}} ({{oe_syn_lower}} - {{oe_syn_upper}})</td></tr><tr><td>Missense</td><td>{{exp_mis}}</td><td>{{obs_mis}}</td><td>z = {{mis_z}}<br>o/e = {{oe_mis}} ({{oe_mis_lower}} - {{oe_mis_upper}})</td></tr><tr><td>pLoF</td><td>{{exp_lof}}</td><td>{{obs_lof}}</td><td>pLI = {{pLI}}<br>o/e = {{oe_lof}} ({{oe_lof_lower}} - {{oe_lof_upper}})</td></tr></table><br>{{/if}}<a href="https://gnomad.broadinstitute.org/gene/{{gene_id|htmlescape}}" target="_blank" rel="noopener">More data on gnomAD</a>'},t4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:'<strong>{{catalog:variant|htmlescape}}</strong><br>Catalog entries: <strong>{{n_catalog_matches|htmlescape}}</strong><br>Top Trait: <strong>{{catalog:trait|htmlescape}}</strong><br>Top P Value: <strong>{{catalog:log_pvalue|logtoscinotation}}</strong><br>More: <a href="https://www.ebi.ac.uk/gwas/search?query={{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">GWAS catalog</a> / <a href="https://www.ncbi.nlm.nih.gov/snp/{{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">dbSNP</a>'},n4={closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:"<strong>Regulatory element</strong><br>{{access:start1|htmlescape}}-{{access:end1|htmlescape}}<br><strong>Promoter</strong><br>{{access:start2|htmlescape}}-{{access:end2|htmlescape}}<br>{{#if access:target}}<strong>Target</strong>: {{access:target|htmlescape}}<br>{{/if}}<strong>Score</strong>: {{access:score|htmlescape}}"},fh={id:"significance",type:"orthogonal_line",tag:"significance",orientation:"horizontal",offset:Xb},Zb={id:"recombrate",namespace:{recomb:"recomb"},data_operations:[{type:"fetch",from:["recomb"]}],type:"line",tag:"recombination",z_index:1,style:{stroke:"#0000FF","stroke-width":"1.5px"},x_axis:{field:"recomb:position"},y_axis:{axis:2,field:"recomb:recomb_rate",floor:0,ceiling:100}},Jb={namespace:{assoc:"assoc",ld:"ld"},data_operations:[{type:"fetch",from:["assoc","ld(assoc)"]},{type:"left_match",name:"assoc_plus_ld",requires:["assoc","ld"],params:["assoc:position","ld:position2"]}],id:"associationpvalues",type:"scatter",tag:"association",id_field:"assoc:variant",coalesce:{active:!0},point_shape:[{scale_function:"if",field:"lz_is_ld_refvar",parameters:{field_value:!0,then:"diamond"}},{scale_function:"effect_direction",parameters:{"+":"triangle","-":"triangledown",beta_field:"assoc:beta",stderr_beta_field:"assoc:se"}},"circle"],point_size:{scale_function:"if",field:"lz_is_ld_refvar",parameters:{field_value:!0,then:80,else:40}},color:[{scale_function:"if",field:"lz_is_ld_refvar",parameters:{field_value:!0,then:"#9632b8"}},{scale_function:"numerical_bin",field:"ld:correlation",parameters:{breaks:[0,.2,.4,.6,.8],values:["rgb(70, 54, 153)","rgb(38, 188, 225)","rgb(110, 254, 104)","rgb(248, 195, 42)","rgb(219, 61, 17)"]}},"#AAAAAA"],legend:[{label:"LD (r²)",label_size:14},{shape:"ribbon",orientation:"vertical",width:10,height:15,color_stops:["rgb(70, 54, 153)","rgb(38, 188, 225)","rgb(110, 254, 104)","rgb(248, 195, 42)","rgb(219, 61, 17)"],tick_labels:[0,.2,.4,.6,.8,1]}],label:null,z_index:2,x_axis:{field:"assoc:position"},y_axis:{axis:1,field:"assoc:log_pvalue",floor:0,upper_buffer:.1,min_extent:[0,10]},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(Kb)},r4={id:"coaccessibility",type:"arcs",tag:"coaccessibility",namespace:{access:"access"},data_operations:[{type:"fetch",from:["access"]}],match:{send:"access:target",receive:"access:target"},id_field:"{{access:start1}}_{{access:end1}}_{{access:start2}}_{{access:end2}}_{{access:score}}_{{access:target}}",filters:[{field:"access:score",operator:"!=",value:null}],color:[{field:"lz_is_match",scale_function:"if",parameters:{field_value:!0,then:"#4285f4"}},{field:"lz_is_match",scale_function:"if",parameters:{field_value:!1,then:"#EAE6E6"}},{scale_function:"ordinal_cycle",parameters:{values:["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"]}}],x_axis:{field1:"access:start1",field2:"access:start2"},y_axis:{axis:1,field:"access:score",upper_buffer:.1,min_extent:[0,1]},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(n4)},i4=function(){let e=at(Jb);return e=qt({id:"associationpvaluescatalog",fill_opacity:.7},e),e.data_operations.push({type:"assoc_to_gwas_catalog",name:"assoc_catalog",requires:["assoc_plus_ld","catalog"],params:["assoc:position","catalog:pos","catalog:log_pvalue"]}),e.tooltip.html+='{{#if catalog:rsid}}<br><a href="https://www.ebi.ac.uk/gwas/search?query={{catalog:rsid|htmlescape}}" target="_blank" rel="noopener">See hits in GWAS catalog</a>{{/if}}',e.namespace.catalog="catalog",e}(),o4={id:"phewaspvalues",type:"category_scatter",tag:"phewas",namespace:{phewas:"phewas"},data_operations:[{type:"fetch",from:["phewas"]}],point_shape:[{scale_function:"effect_direction",parameters:{"+":"triangle","-":"triangledown",beta_field:"phewas:beta",stderr_beta_field:"phewas:se"}},"circle"],point_size:70,tooltip_positioning:"vertical",id_field:"{{phewas:trait_group}}_{{phewas:trait_label}}",x_axis:{field:"lz_auto_x",category_field:"phewas:trait_group",lower_buffer:.025,upper_buffer:.025},y_axis:{axis:1,field:"phewas:log_pvalue",floor:0,upper_buffer:.15},color:[{field:"phewas:trait_group",scale_function:"categorical_bin",parameters:{categories:[],values:[],null_value:"#B8B8B8"}}],fill_opacity:.7,tooltip:{closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>Trait:</strong> {{phewas:trait_label|htmlescape}}<br>
|
|
2015
2015
|
<strong>Trait Category:</strong> {{phewas:trait_group|htmlescape}}<br>
|
|
2016
2016
|
<strong>P-value:</strong> {{phewas:log_pvalue|logtoscinotation|htmlescape}}
|
|
2017
2017
|
{{#if phewas:beta|is_numeric}}<br><strong>β:</strong> {{phewas:beta|scinotation|htmlescape}}<br>{{/if}}
|
|
2018
|
-
{{#if phewas:se|is_numeric}}<strong>SE (β):</strong> {{phewas:se|scinotation|htmlescape}}{{/if}}`},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},label:{text:"{{phewas:trait_label}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"phewas:log_pvalue",operator:">=",value:20}],style:{"font-size":"14px","font-weight":"bold",fill:"#333333"}}},a4={namespace:{gene:"gene",constraint:"constraint"},data_operations:[{type:"fetch",from:["gene","constraint(gene)"]},{name:"gene_constraint",type:"genes_to_gnomad_constraint",requires:["gene","constraint"]}],id:"genes",type:"genes",tag:"genes",id_field:"gene_id",behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(e4)},s4=qt({filters:[{field:"gene_type",operator:"in",value:["protein_coding","IG_C_gene","IG_D_gene","IG_J_gene","IG_V_gene","TR_C_gene","TR_D_gene","TR_J_gene","TR_V_gene","rRNA","Mt_rRNA","Mt_tRNA"]}]},at(a4)),l4={namespace:{assoc:"assoc",catalog:"catalog"},data_operations:[{type:"fetch",from:["assoc","catalog"]},{type:"assoc_to_gwas_catalog",name:"assoc_plus_ld",requires:["assoc","catalog"],params:["assoc:position","catalog:pos","catalog:log_pvalue"]}],id:"annotation_catalog",type:"annotation_track",tag:"gwascatalog",id_field:"assoc:variant",x_axis:{field:"assoc:position"},color:"#0000CC",filters:[{field:"catalog:rsid",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Xb}],behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(t4),tooltip_positioning:"top"},u4={type:"set_state",tag:"ld_population",position:"right",color:"blue",button_html:"LD Population: ",show_selected:!0,button_title:"Select LD Population: ",custom_event_name:"widget_set_ldpop",state_field:"ld_pop",options:[{display_name:"ALL (default)",value:"ALL"},{display_name:"AFR",value:"AFR"},{display_name:"AMR",value:"AMR"},{display_name:"EAS",value:"EAS"},{display_name:"EUR",value:"EUR"},{display_name:"SAS",value:"SAS"}]},c4={type:"display_options",tag:"gene_filter",custom_event_name:"widget_gene_filter_choice",position:"right",color:"blue",button_html:"Filter...",button_title:"Choose which genes to show",layer_name:"genes",default_config_display_name:"Coding genes & rRNA",options:[{display_name:"All features",display:{filters:null}}]},Ru={widgets:[{type:"remove_panel",position:"right",color:"red",group_position:"end"},{type:"move_panel_up",position:"right",group_position:"middle"},{type:"move_panel_down",position:"right",group_position:"start",style:{"margin-left":"0.75em"}}]},zu={widgets:[{type:"title",title:"LocusZoom",subtitle:`<a href="https://statgen.github.io/locuszoom/" target="_blank" rel="noopener">v${z5}</a>`,position:"left"},{type:"download",position:"right",group_position:"end"},{type:"download_png",position:"right",group_position:"start"}]},Qb=function(){const e=at(zu);return e.widgets.push(at(u4)),e}(),PK=function(){const e=at(zu);return e.widgets.push({type:"shift_region",step:5e5,button_html:">>",position:"right",group_position:"end"},{type:"shift_region",step:5e4,button_html:">",position:"right",group_position:"middle"},{type:"zoom_region",step:.2,position:"right",group_position:"middle"},{type:"zoom_region",step:-.2,position:"right",group_position:"middle"},{type:"shift_region",step:-5e4,button_html:"<",position:"right",group_position:"middle"},{type:"shift_region",step:-5e5,button_html:"<<",position:"right",group_position:"start"}),e}(),em={id:"association",tag:"association",min_height:200,height:300,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:function(){const e=at(Ru);return e.widgets.push({type:"toggle_legend",position:"right"}),e}(),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"-log10 p-value",label_offset:50},y2:{label:"Recombination Rate (cM/Mb)",label_offset:46}},legend:{orientation:"vertical",origin:{x:75,y:40},hidden:!0},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,drag_y2_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(dh),at(Zb),at(Jb)]},d4={id:"coaccessibility",tag:"coaccessibility",min_height:150,height:180,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"Score",label_offset:40,render:!1}},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(r4)]},f4=function(){let e=at(em);return e=qt({id:"associationcatalog"},e),e.toolbar.widgets.push({type:"display_options",position:"right",color:"blue",button_html:"Display options...",button_title:"Control how plot items are displayed",layer_name:"associationpvaluescatalog",default_config_display_name:"No catalog labels (default)",options:[{display_name:"Label catalog traits",display:{label:{text:"{{catalog:trait}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"catalog:trait",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Xb},{field:"ld:correlation",operator:">",value:.4}],style:{"font-size":"12px","font-weight":"bold",fill:"#333333"}}}}]}),e.data_layers=[at(dh),at(Zb),at(i4)],e}(),Fu={id:"genes",tag:"genes",min_height:150,height:225,margin:{top:20,right:55,bottom:20,left:70},axes:{},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},toolbar:function(){const e=at(Ru);return e.widgets.push({type:"resize_to_data",position:"right",button_html:"Resize"},at(c4)),e}(),data_layers:[at(s4)]},h4={id:"phewas",tag:"phewas",min_height:300,height:300,margin:{top:20,right:55,bottom:120,left:70},inner_border:"rgb(210, 210, 210)",axes:{x:{ticks:{style:{"font-weight":"bold","font-size":"11px","text-anchor":"start"},transform:"rotate(50)",position:"left"}},y1:{label:"-log10 p-value",label_offset:50}},data_layers:[at(dh),at(o4)]},p4={id:"annotationcatalog",tag:"gwascatalog",min_height:50,height:50,margin:{top:25,right:55,bottom:10,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{extent:"state",render:!1}},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(l4)]},RK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:Qb,panels:[at(em),at(Fu)]},zK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:Qb,panels:[p4,f4,Fu]},FK={width:800,responsive_resize:!0,toolbar:zu,panels:[at(h4),qt({height:300,margin:{bottom:40},axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"}}},at(Fu))],mouse_guide:!1},IK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:at(zu),panels:[at(d4),function(){const e=Object.assign({height:270},at(Fu)),t=e.data_layers[0];t.match={send:"gene_name",receive:"gene_name"};const n=[{field:"lz_is_match",scale_function:"if",parameters:{field_value:!0,then:"#4285f4"}},{field:"lz_is_match",scale_function:"if",parameters:{field_value:!1,then:"#EAE6E6"}},"#363696"];return t.color=n,t.stroke=n,e}()]},BK={standard_association:Kb,standard_association_with_label:AK,standard_genes:e4,catalog_variant:t4,coaccessibility:n4},OK={ldlz2_pop_selector:u4,gene_selector_menu:c4},NK={standard_panel:Ru,standard_plot:zu,standard_association:Qb,region_nav_plot:PK},LK={significance:dh,recomb_rate:Zb,association_pvalues:Jb,coaccessibility:r4,association_pvalues_catalog:i4,phewas_pvalues:o4,genes:a4,genes_filtered:s4,annotation_catalog:l4},DK={association:em,coaccessibility:d4,association_catalog:f4,genes:Fu,phewas:h4,annotation_catalog:p4},HK={standard_association:RK,association_catalog:zK,standard_phewas:FK,coaccessibility:IK},UK=Object.freeze(Object.defineProperty({__proto__:null,data_layer:LK,panel:DK,plot:HK,toolbar:NK,toolbar_widgets:OK,tooltip:BK},Symbol.toStringTag,{value:"Module"}));class jK extends Zi{get(t,n,r={}){if(!(t&&n))throw new Error("Must specify both the type and name for the layout desired. See .list() for available options");let i=super.get(t).get(n);const o=r.namespace;i.namespace||delete r.namespace;let a=qt(r,i);return o&&(a=q6(a,o)),at(a)}add(t,n,r,i=!1){if(!(t&&n&&r))throw new Error("To add a layout, type, name, and item must all be specified");if(typeof r!="object")throw new Error("The configuration to be added must be an object");this.has(t)||super.add(t,new Zi);const o=at(r);return t==="data_layer"&&o.namespace&&(o._auto_fields=[...Vb(o,Object.keys(o.namespace))].sort()),super.get(t).add(n,o,i)}list(t){if(!t){let n={};for(let[r,i]of this._items)n[r]=i.list();return n}return super.get(t).list()}merge(t,n){return qt(t,n)}renameField(){return kg(...arguments)}mutate_attrs(){return PX(...arguments)}query_attrs(){return RX(...arguments)}}const g4=new jK;for(let[e,t]of Object.entries(UK))for(let[n,r]of Object.entries(t))g4.add(e,n,r);const _a=new Zi;function Iu(e){return(t,n,...r)=>{if(n.length!==2)throw new Error("Join functions must receive exactly two recordsets");return e(...n,...r)}}function WK(e,t,n,r,i){if(!e.length)return e;const o=M0(t,r),a=[];for(let s of o.values()){let l=0,u;for(let c of s){const f=c[i];f>=l&&(u=c,l=f)}u.n_catalog_matches=s.length,a.push(u)}return F5(e,a,n,r)}function VK(e,t){return e.forEach(function(n){const r=`_${n.gene_name.replace(/[^A-Za-z0-9_]/g,"_")}`,i=t[r]&&t[r].gnomad_constraint;i&&Object.keys(i).forEach(function(o){let a=i[o];typeof n[o]>"u"&&(typeof a=="number"&&a.toString().includes(".")&&(a=parseFloat(a.toFixed(2))),n[o]=a)})}),e}_a.add("left_match",Iu(F5));_a.add("inner_match",Iu(fB));_a.add("full_outer_match",Iu(hB));_a.add("assoc_to_gwas_catalog",Iu(WK));_a.add("genes_to_gnomad_constraint",Iu(VK));class qK extends Zi{constructor(t){super(),this._registry=t||ns}add(t,n,r=!1){if(this._registry.has(t))throw new Error(`The namespace ${t} is already in use by another source`);if(t.match(/[^A-Za-z0-9_]/))throw new Error(`Data source namespace names can only contain alphanumeric characters or underscores. Invalid name: ${t}`);if(Array.isArray(n)){const[i,o]=n;n=this._registry.create(i,o)}return n.source_id=t,super.add(t,n,r),this}}const Fi={version:z5,populate:iK,DataSources:qK,Adapters:ns,DataLayers:Yb,DataFunctions:_a,Layouts:g4,MatchFunctions:pr,ScaleFunctions:ch,TransformationFunctions:Wb,Widgets:qb,get KnownDataSources(){return console.warn('Deprecation warning: KnownDataSources has been renamed to "Adapters"'),ns}},$x=[];Fi.use=function(e,...t){if(!$x.includes(e)){if(t.unshift(Fi),typeof e.install=="function")e.install.apply(e,t);else if(typeof e=="function")e.apply(null,t);else throw new Error("Plugin must export a function that receives the LocusZoom object as an argument");$x.push(e)}};var GK="";function v4(e){return XK(YK(KK(e)))}function YK(e){return JK(QK(ZK(e),e.length*8))}function XK(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=e.length,i=0;i<r;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<r?e.charCodeAt(i+1)<<8:0)|(i+2<r?e.charCodeAt(i+2):0),a=0;a<4;a++)i*8+a*6>e.length*8?n+=GK:n+=t.charAt(o>>>6*(3-a)&63);return n}function KK(e){for(var t="",n=-1,r,i;++n<e.length;)r=e.charCodeAt(n),i=n+1<e.length?e.charCodeAt(n+1):0,55296<=r&&r<=56319&&56320<=i&&i<=57343&&(r=65536+((r&1023)<<10)+(i&1023),n++),r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(192|r>>>6&31,128|r&63):r<=65535?t+=String.fromCharCode(224|r>>>12&15,128|r>>>6&63,128|r&63):r<=2097151&&(t+=String.fromCharCode(240|r>>>18&7,128|r>>>12&63,128|r>>>6&63,128|r&63));return t}function ZK(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(var n=0;n<e.length*8;n+=8)t[n>>5]|=(e.charCodeAt(n/8)&255)<<24-n%32;return t}function JK(e){for(var t="",n=0;n<e.length*32;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}function QK(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,s=-1009589776,l=0;l<e.length;l+=16){for(var u=r,c=i,f=o,d=a,h=s,p=0;p<80;p++){p<16?n[p]=e[l+p]:n[p]=Vp(n[p-3]^n[p-8]^n[p-14]^n[p-16],1);var g=ri(ri(Vp(r,5),eZ(p,i,o,a)),ri(ri(s,n[p]),tZ(p)));s=a,a=o,o=Vp(i,30),i=r,r=g}r=ri(r,u),i=ri(i,c),o=ri(o,f),a=ri(a,d),s=ri(s,h)}return Array(r,i,o,a,s)}function eZ(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function tZ(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function ri(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function Vp(e,t){return e<<t|e>>>32-t}function nZ(e){var t={};for(var n in e)t[n]=e[n];return t}"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")});function bi(e,t,n,r){r||(typeof t=="object"?(r=t,t=void 0):r={}),this.url=e,this.start=t||0,n&&(this.end=n),this.opts=r}bi.prototype.slice=function(e,t){if(e<0)throw"Bad slice "+e;var n=this.start,r=this.end;return n&&e?n=n+e:n=e||n,t&&n?r=n+t-1:r=r||t-1,new bi(this.url,n,r,this.opts)};var b4=0,m4=typeof navigator<"u"&&navigator.userAgent.indexOf("Safari")>=0&&navigator.userAgent.indexOf("Chrome")<0;bi.prototype.fetchAsText=function(e){var t=this;this.getURL().then(function(n){try{var r=new XMLHttpRequest,i;if((m4||t.opts.salt)&&n.indexOf("?")<0&&(n=n+"?salt="+v4(""+Date.now()+","+ ++b4)),r.open("GET",n,!0),t.end){if(t.end-t.start>1e8)throw"Monster fetch!";r.setRequestHeader("Range","bytes="+t.start+"-"+t.end),i=t.end-t.start+1}r.onreadystatechange=function(){if(r.readyState==4)return r.status==200||r.status==206?e(r.responseText):e(null)},t.opts.credentials&&(r.withCredentials=!0),r.send()}catch{return e(null)}}).catch(function(n){return console.log(n),e(null,n)})};bi.prototype.salted=function(){var e=nZ(this.opts);return e.salt=!0,new bi(this.url,this.start,this.end,e)};bi.prototype.getURL=function(){return this.opts.resolver?this.opts.resolver(this.url).then(function(e){return typeof e=="string"?e:e.url}):Promise.resolve(this.url)};bi.prototype.fetch=function(e,t){var n=this;t=t||{};var r=t.attempt||1,i=t.truncatedLength;if(r>3)return e(null);this.getURL().then(function(o){try{var a;t.timeout&&!n.opts.credentials&&(a=setTimeout(function(){return console.log("timing out "+o),s.abort(),e(null,"Timeout")},t.timeout));var s=new XMLHttpRequest,l;if((m4||n.opts.salt)&&o.indexOf("?")<0&&(o=o+"?salt="+v4(""+Date.now()+","+ ++b4)),s.open("GET",o,!0),s.overrideMimeType("text/plain; charset=x-user-defined"),n.end){if(n.end-n.start>1e8)throw"Monster fetch!";s.setRequestHeader("Range","bytes="+n.start+"-"+n.end),l=n.end-n.start+1}s.responseType="arraybuffer",s.onreadystatechange=function(){if(s.readyState==4)if(a&&clearTimeout(a),s.status==200||s.status==206)if(s.response){var u=s.response.byteLength;return l&&l!=u&&(!i||u!=i)?n.fetch(e,{attempt:r+1,truncatedLength:u}):e(s.response)}else{if(s.mozResponseArrayBuffer)return e(s.mozResponseArrayBuffer);var c=s.responseText;return l&&l!=c.length&&(!i||c.length!=i)?n.fetch(e,{attempt:r+1,truncatedLength:c.length}):e(rZ(s.responseText))}else return n.fetch(e,{attempt:r+1})},n.opts.credentials&&(s.withCredentials=!0),s.send()}catch{return e(null)}}).catch(function(o){return console.log(o),e(null,o)})};function rZ(e){if(!e)return null;for(var t=new Uint8Array(e.length),n=0;n<t.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function an(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}var qp={exports:{}},kx;function iZ(){return kx||(kx=1,function(e){var t=15,n=t,r=1440,i=15,o=32,a=0,s=4,l=8,u=0,c=1,f=2,d=-2,h=-3,p=-4,g=-5,b=0,v=1,x=2,y=3,_=4,S=5,$=6,w=7,T=8,M=9,P=10,R=11,C=12,E=13,F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],z=0,j=1,Z=2,J=3,ie=4,he=5,_e=6,oe=7,ve=8,we=9,Oe=9,xe=5,Xe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ve=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],de=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ee=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Pe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function H(){}H.prototype.inflateInit=function(m,I){return m||(m=n),I&&(I=!1),this.istate=new Y,this.istate.inflateInit(this,I?-m:m)},H.prototype.inflate=function(m){return this.istate==null?d:this.istate.inflate(this,m)},H.prototype.inflateEnd=function(){if(this.istate==null)return d;var m=istate.inflateEnd(this);return this.istate=null,m},H.prototype.inflateSync=function(){return istate.inflateSync(this)},H.prototype.inflateSetDictionary=function(m,I){return istate.inflateSetDictionary(this,m,I)};function Y(){this.was=[0]}Y.prototype.inflateReset=function(m){return m==null||m.istate==null?d:(m.total_in=m.total_out=0,m.msg=null,m.istate.mode=m.istate.nowrap!=0?w:b,m.istate.blocks.reset(m,null),u)},Y.prototype.inflateEnd=function(m){return this.blocks!=null&&this.blocks.free(m),this.blocks=null,u},Y.prototype.inflateInit=function(m,I){return m.msg=null,this.blocks=null,nowrap=0,I<0&&(I=-I,nowrap=1),I<8||I>15?(this.inflateEnd(m),d):(this.wbits=I,m.istate.blocks=new q(m,m.istate.nowrap!=0?null:this,1<<I),this.inflateReset(m),u)},Y.prototype.inflate=function(m,I){var D,te;if(m==null||m.istate==null||m.next_in==null)return d;for(I=I==s?g:u,D=g;;)switch(m.istate.mode){case b:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,((m.istate.method=m.next_in[m.next_in_index++])&15)!=l){m.istate.mode=E,m.msg="unknown compression method",m.istate.marker=5;break}if((m.istate.method>>4)+8>m.istate.wbits){m.istate.mode=E,m.msg="invalid window size",m.istate.marker=5;break}m.istate.mode=v;case v:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,te=m.next_in[m.next_in_index++]&255,((m.istate.method<<8)+te)%31!=0){m.istate.mode=E,m.msg="incorrect header check",m.istate.marker=5;break}if((te&o)==0){m.istate.mode=w;break}m.istate.mode=x;case x:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=y;case y:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=_;case _:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=S;case S:return m.avail_in==0?D:(D=I,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.adler=m.istate.need,m.istate.mode=$,f);case $:return m.istate.mode=E,m.msg="need dictionary",m.istate.marker=0,d;case w:if(D=m.istate.blocks.proc(m,D),D==h){m.istate.mode=E,m.istate.marker=0;break}if(D==u&&(D=I),D!=c)return D;if(D=I,m.istate.blocks.reset(m,m.istate.was),m.istate.nowrap!=0){m.istate.mode=C;break}m.istate.mode=T;case T:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=M;case M:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=P;case P:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=R;case R:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.istate.was[0]!=m.istate.need){m.istate.mode=E,m.msg="incorrect data check",m.istate.marker=5;break}m.istate.mode=C;case C:return c;case E:return h;default:return d}},Y.prototype.inflateSetDictionary=function(m,I,D){var te=0,K=D;return m==null||m.istate==null||m.istate.mode!=$?d:m._adler.adler32(1,I,0,D)!=m.adler?h:(m.adler=m._adler.adler32(0,null,0,0),K>=1<<m.istate.wbits&&(K=(1<<m.istate.wbits)-1,te=D-K),m.istate.blocks.set_dictionary(I,te,K),m.istate.mode=w,u)};var fe=[0,0,255,255];Y.prototype.inflateSync=function(m){var I,D,te,K,se;if(m==null||m.istate==null)return d;if(m.istate.mode!=E&&(m.istate.mode=E,m.istate.marker=0),(I=m.avail_in)==0)return g;for(D=m.next_in_index,te=m.istate.marker;I!=0&&te<4;)m.next_in[D]==fe[te]?te++:m.next_in[D]!=0?te=0:te=4-te,D++,I--;return m.total_in+=D-m.next_in_index,m.next_in_index=D,m.avail_in=I,m.istate.marker=te,te!=4?h:(K=m.total_in,se=m.total_out,this.inflateReset(m),m.total_in=K,m.total_out=se,m.istate.mode=w,u)},Y.prototype.inflateSyncPoint=function(m){return m==null||m.istate==null||m.istate.blocks==null?d:m.istate.blocks.sync_point()};var le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function q(m,I,D){this.hufts=new Int32Array(r*3),this.window=new Uint8Array(D),this.end=D,this.checkfn=I,this.mode=z,this.reset(m,null),this.left=0,this.table=0,this.index=0,this.blens=null,this.bb=new Int32Array(1),this.tb=new Int32Array(1),this.codes=new Re,this.last=0,this.bitk=0,this.bitb=0,this.read=0,this.write=0,this.check=0,this.inftree=new rt}q.prototype.reset=function(m,I){I&&(I[0]=this.check),this.mode==_e&&this.codes.free(m),this.mode=z,this.bitk=0,this.bitb=0,this.read=this.write=0,this.checkfn&&(m.adler=this.check=m._adler.adler32(0,null,0,0))},q.prototype.proc=function(m,I){var D,te,K,se,ue,ae,ke;for(se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae;;)switch(this.mode){case z:for(;K<3;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}switch(D=te&7,this.last=D&1,D>>>1){case 0:te>>>=3,K-=3,D=K&7,te>>>=D,K-=D,this.mode=j;break;case 1:{var Me=new Int32Array(1),$e=new Int32Array(1),ze=[],Je=[];lt(Me,$e,ze,Je),this.codes.init(Me[0],$e[0],ze[0],0,Je[0],0,m)}te>>>=3,K-=3,this.mode=_e;break;case 2:te>>>=3,K-=3,this.mode=J;break;case 3:return te>>>=3,K-=3,this.mode=E,m.msg="invalid block type",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I)}break;case j:for(;K<32;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if((~te>>>16&65535)!=(te&65535))return this.mode=E,m.msg="invalid stored block lengths",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);this.left=te&65535,te=K=0,this.mode=this.left!=0?Z:this.last!=0?oe:z;break;case Z:if(ue==0)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,I);if(ke==0&&(ae==end&&read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0&&(this.write=ae,I=this.inflate_flush(m,I),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,ae==this.end&&this.read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0)))return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);if(I=u,D=this.left,D>ue&&(D=ue),D>ke&&(D=ke),yt(m.next_in,se,this.window,ae,D),se+=D,ue-=D,ae+=D,ke-=D,(this.left-=D)!=0)break;this.mode=this.last!=0?oe:z;break;case J:for(;K<14;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(this.table=D=te&16383,(D&31)>29||(D>>5&31)>29)return this.mode=we,m.msg="too many length or distance symbols",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);if(D=258+(D&31)+(D>>5&31),this.blens==null||this.blens.length<D)this.blens=new Int32Array(D);else for(var Ne=0;Ne<D;Ne++)this.blens[Ne]=0;te>>>=14,K-=14,this.index=0,mode=ie;case ie:for(;this.index<4+(this.table>>>10);){for(;K<3;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}this.blens[le[this.index++]]=te&7,te>>>=3,K-=3}for(;this.index<19;)this.blens[le[this.index++]]=0;if(this.bb[0]=7,D=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,m),D!=u)return I=D,I==h&&(this.blens=null,this.mode=we),this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,I);this.index=0,this.mode=he;case he:for(;D=this.table,this.index<258+(D&31)+(D>>5&31);){var Ne,ht,Le;for(D=this.bb[0];K<D;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(D=this.hufts[(this.tb[0]+(te&F[D]))*3+1],Le=this.hufts[(this.tb[0]+(te&F[D]))*3+2],Le<16)te>>>=D,K-=D,this.blens[this.index++]=Le;else{for(Ne=Le==18?7:Le-14,ht=Le==18?11:3;K<D+Ne;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(te>>>=D,K-=D,ht+=te&F[Ne],te>>>=Ne,K-=Ne,Ne=this.index,D=this.table,Ne+ht>258+(D&31)+(D>>5&31)||Le==16&&Ne<1)return this.blens=null,this.mode=we,m.msg="invalid bit length repeat",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);Le=Le==16?this.blens[Ne-1]:0;do this.blens[Ne++]=Le;while(--ht!=0);this.index=Ne}}this.tb[0]=-1;{var Me=new Int32Array(1),$e=new Int32Array(1),ze=new Int32Array(1),Je=new Int32Array(1);if(Me[0]=9,$e[0]=6,D=this.table,D=this.inftree.inflate_trees_dynamic(257+(D&31),1+(D>>5&31),this.blens,Me,$e,ze,Je,this.hufts,m),D!=u)return D==h&&(this.blens=null,this.mode=E),I=D,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);this.codes.init(Me[0],$e[0],this.hufts,ze[0],this.hufts,Je[0],m)}this.mode=_e;case _e:if(this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,(I=this.codes.proc(this,m,I))!=c)return this.inflate_flush(m,I);if(I=u,this.codes.free(m),se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.last==0){this.mode=z;break}this.mode=oe;case oe:if(this.write=ae,I=this.inflate_flush(m,I),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.read!=this.write)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);mode=C;case ve:return I=c,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);case we:return I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);default:return I=d,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I)}},q.prototype.free=function(m){this.reset(m,null),this.window=null,this.hufts=null},q.prototype.set_dictionary=function(m,I,D){yt(m,I,window,0,D),this.read=this.write=D},q.prototype.sync_point=function(){return this.mode==j},q.prototype.inflate_flush=function(m,I){var D,te,K;return te=m.next_out_index,K=this.read,D=(K<=this.write?this.write:this.end)-K,D>m.avail_out&&(D=m.avail_out),D!=0&&I==g&&(I=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D,K==this.end&&(K=0,this.write==this.end&&(this.write=0),D=this.write-K,D>m.avail_out&&(D=m.avail_out),D!=0&&I==g&&(I=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D),m.next_out_index=te,this.read=K,I};var N=0,re=1,L=2,O=3,ee=4,U=5,B=6,V=7,me=8,Ae=9;function Re(){}Re.prototype.init=function(m,I,D,te,K,se,ue){this.mode=N,this.lbits=m,this.dbits=I,this.ltree=D,this.ltree_index=te,this.dtree=K,this.dtree_index=se,this.tree=null},Re.prototype.proc=function(m,I,D){var te,K,se,ue=0,ae=0,ke=0,Me,$e,ze,Je;for(ke=I.next_in_index,Me=I.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e;;)switch(this.mode){case N:if(ze>=258&&Me>=10&&(m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,D=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,m,I),ke=I.next_in_index,Me=I.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,D!=u)){this.mode=D==c?V:Ae;break}this.need=this.lbits,this.tree=this.ltree,this.tree_index=this.ltree_index,this.mode=re;case re:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&F[te]))*3,ue>>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],se==0){this.lit=this.tree[K+2],this.mode=B;break}if((se&16)!=0){this.get=se&15,this.len=this.tree[K+2],this.mode=L;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}if((se&32)!=0){this.mode=V;break}return this.mode=Ae,I.msg="invalid literal/length code",D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case L:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}this.len+=ue&F[te],ue>>=te,ae-=te,this.need=this.dbits,this.tree=this.dtree,this.tree_index=this.dtree_index,this.mode=O;case O:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&F[te]))*3,ue>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],(se&16)!=0){this.get=se&15,this.dist=this.tree[K+2],this.mode=ee;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}return this.mode=Ae,I.msg="invalid distance code",D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case ee:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}this.dist+=ue&F[te],ue>>=te,ae-=te,this.mode=U;case U:for(Je=$e-this.dist;Je<0;)Je+=m.end;for(;this.len!=0;){if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);m.window[$e++]=m.window[Je++],ze--,Je==m.end&&(Je=0),this.len--}this.mode=N;break;case B:if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);D=u,m.window[$e++]=this.lit,ze--,this.mode=N;break;case V:if(ae>7&&(ae-=8,Me++,ke--),m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,m.read!=m.write)return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);this.mode=me;case me:return D=c,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case Ae:return D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);default:return D=d,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D)}},Re.prototype.free=function(m){},Re.prototype.inflate_fast=function(m,I,D,te,K,se,ue,ae){var ke,Me,$e,ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut;ht=ae.next_in_index,Le=ae.avail_in,Je=ue.bitb,Ne=ue.bitk,Be=ue.write,X=Be<ue.read?ue.read-Be-1:ue.end-Be,be=F[m],He=F[I];do{for(;Ne<20;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(ke=Je&be,Me=D,$e=te,ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;continue}do{if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15,Te=Me[ut+2]+(Je&F[ze]),Je>>=ze,Ne-=ze;Ne<15;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;ke=Je&He,Me=K,$e=se,ut=($e+ke)*3,ze=Me[ut];do if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15;Ne<ze;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(gt=Me[ut+2]+(Je&F[ze]),Je>>=ze,Ne-=ze,X-=Te,Be>=gt)De=Be-gt,Be-De>0&&2>Be-De,ue.window[Be++]=ue.window[De++],ue.window[Be++]=ue.window[De++],Te-=2;else{De=Be-gt;do De+=ue.end;while(De<0);if(ze=ue.end-De,Te>ze){if(Te-=ze,Be-De>0&&ze>Be-De)do ue.window[Be++]=ue.window[De++];while(--ze!=0);else yt(ue.window,De,ue.window,Be,ze),Be+=ze,De+=ze,ze=0;De=0}}do ue.window[Be++]=ue.window[De++];while(--Te!=0);break}else if((ze&64)==0)ke+=Me[ut+2],ke+=Je&F[ze],ut=($e+ke)*3,ze=Me[ut];else return ae.msg="invalid distance code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h;while(!0);break}if((ze&64)==0){if(ke+=Me[ut+2],ke+=Je&F[ze],ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;break}}else return(ze&32)!=0?(Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,c):(ae.msg="invalid literal/length code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h)}while(!0)}while(X>=258&&Le>=10);return Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,u};function rt(){}rt.prototype.huft_build=function(m,I,D,te,K,se,ue,ae,ke,Me,$e){var ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut,pn,Wt;Te=0,Le=D;do this.c[m[I+Te]]++,Te++,Le--;while(Le!=0);if(this.c[0]==D)return ue[0]=-1,ae[0]=0,u;for(be=ae[0],Be=1;Be<=i&&this.c[Be]==0;Be++);for(X=Be,be<Be&&(be=Be),Le=i;Le!=0&&this.c[Le]==0;Le--);for(Ne=Le,be>Le&&(be=Le),ae[0]=be,pn=1<<Be;Be<Le;Be++,pn<<=1)if((pn-=this.c[Be])<0)return h;if((pn-=this.c[Le])<0)return h;for(this.c[Le]+=pn,this.x[1]=Be=0,Te=1,ut=2;--Le!=0;)this.x[ut]=Be+=this.c[Te],ut++,Te++;Le=0,Te=0;do(Be=m[I+Te])!=0&&(this.v[this.x[Be]++]=Le),Te++;while(++Le<D);for(D=this.x[Ne],this.x[0]=Le=0,Te=0,ht=-1,De=-be,this.u[0]=0,gt=0,Wt=0;X<=Ne;X++)for(ze=this.c[X];ze--!=0;){for(;X>De+be;){if(ht++,De+=be,Wt=Ne-De,Wt=Wt>be?be:Wt,(Je=1<<(Be=X-De))>ze+1&&(Je-=ze+1,ut=X,Be<Wt))for(;++Be<Wt&&!((Je<<=1)<=this.c[++ut]);)Je-=this.c[ut];if(Wt=1<<Be,this.hn[0]+Wt>r)return h;this.u[ht]=gt=this.hn[0],this.hn[0]+=Wt,ht!=0?(this.x[ht]=Le,this.r[0]=Be,this.r[1]=be,Be=Le>>>De-be,this.r[2]=gt-this.u[ht-1]-Be,yt(this.r,0,ke,(this.u[ht-1]+Be)*3,3)):ue[0]=gt}for(this.r[1]=X-De,Te>=D?this.r[0]=192:$e[Te]<te?(this.r[0]=this.v[Te]<256?0:96,this.r[2]=this.v[Te++]):(this.r[0]=se[this.v[Te]-te]+16+64,this.r[2]=K[this.v[Te++]-te]),Je=1<<X-De,Be=Le>>>De;Be<Wt;Be+=Je)yt(this.r,0,ke,(gt+Be)*3,3);for(Be=1<<X-1;(Le&Be)!=0;Be>>>=1)Le^=Be;for(Le^=Be,He=(1<<De)-1;(Le&He)!=this.x[ht];)ht--,De-=be,He=(1<<De)-1}return pn!=0&&Ne!=1?g:u},rt.prototype.inflate_trees_bits=function(m,I,D,te,K){var se;return this.initWorkArea(19),this.hn[0]=0,se=this.huft_build(m,0,19,19,null,null,D,I,te,this.hn,this.v),se==h?K.msg="oversubscribed dynamic bit lengths tree":(se==g||I[0]==0)&&(K.msg="incomplete dynamic bit lengths tree",se=h),se},rt.prototype.inflate_trees_dynamic=function(m,I,D,te,K,se,ue,ae,ke){var Me;return this.initWorkArea(288),this.hn[0]=0,Me=this.huft_build(D,0,m,257,de,Ee,se,te,ae,this.hn,this.v),Me!=u||te[0]==0?(Me==h?ke.msg="oversubscribed literal/length tree":Me!=p&&(ke.msg="incomplete literal/length tree",Me=h),Me):(this.initWorkArea(288),Me=this.huft_build(D,m,I,0,Pe,A,ue,K,ae,this.hn,this.v),Me!=u||K[0]==0&&m>257?(Me==h?ke.msg="oversubscribed distance tree":Me==g?(ke.msg="incomplete distance tree",Me=h):Me!=p&&(ke.msg="empty distance tree with lengths",Me=h),Me):u)};function lt(m,I,D,te,K){return m[0]=Oe,I[0]=xe,D[0]=Xe,te[0]=Ve,u}rt.prototype.initWorkArea=function(m){this.hn==null&&(this.hn=new Int32Array(1),this.v=new Int32Array(m),this.c=new Int32Array(i+1),this.r=new Int32Array(3),this.u=new Int32Array(i),this.x=new Int32Array(i+1)),this.v.length<m&&(this.v=new Int32Array(m));for(var I=0;I<m;I++)this.v[I]=0;for(var I=0;I<i+1;I++)this.c[I]=0;for(var I=0;I<3;I++)this.r[I]=0;yt(this.c,0,this.u,0,i),yt(this.c,0,this.x,0,i+1)};var dt=new Uint8Array(1),zt=typeof dt.subarray=="function";function yt(m,I,D,te,K){if(K!=0){if(m){if(!D)throw"Undef dest"}else throw"Undef src";I==0&&K==m.length?ye(m,D,te):zt?ye(m.subarray(I,I+K),D,te):m.BYTES_PER_ELEMENT==1&&K>100?ye(new Uint8Array(m.buffer,m.byteOffset+I,K),D,te):Lt(m,I,D,te,K)}}function Lt(m,I,D,te,K){for(var se=0;se<K;++se)D[te+se]=m[I+se]}function ye(m,I,D){I.set(m,D)}function G(m,I,D,te){I?D?m=new Uint8Array(m,I,D):m=new Uint8Array(m,I,m.byteLength-I):m=new Uint8Array(m);var K=new H;K.inflateInit(n,!0),K.next_in=m,K.next_in_index=0,K.avail_in=m.length;for(var se=[],ue=0;;){var ae=new Uint8Array(32e3);K.next_out=ae,K.next_out_index=0,K.avail_out=ae.length;var ke=K.inflate(a);if(ke!=u&&ke!=c&&ke!=g)throw K.msg;if(K.avail_out!=0){var Me=new Uint8Array(ae.length-K.avail_out);yt(ae,0,Me,0,ae.length-K.avail_out),ae=Me}if(se.push(ae),ue+=ae.length,ke==c||ke==g)break}if(te&&(te[0]=(I||0)+K.next_in_index),se.length==1)return se[0].buffer;for(var $e=new Uint8Array(ue),ze=0,Je=0;Je<se.length;++Je){var Ne=se[Je];yt(Ne,0,$e,ze,Ne.length),ze+=Ne.length}return $e.buffer}e.exports={inflateBuffer:G,arrayCopy:yt}}(qp)),qp.exports}var Mx=iZ();function y4(e,t){this.block=e,this.offset=t}y4.prototype.toString=function(){return""+this.block+":"+this.offset};function Wc(e,t,n){var r=(e[t+6]&255)*4294967296+(e[t+5]&255)*16777216+(e[t+4]&255)*65536+(e[t+3]&255)*256+(e[t+2]&255),i=e[t+1]<<8|e[t];return r==0&&i==0&&!n?null:new y4(r,i)}function tm(e,t){t=Math.min(t||1,e.byteLength-50);for(var n=[],r=[0],i=0;r[0]<t;){var o=new Uint8Array(e,r[0],12),a=o[11]<<8|o[10],s=Mx.inflateBuffer(e,12+a+r[0],Math.min(65536,e.byteLength-12-a-r[0]),r);r[0]+=8,i+=s.byteLength,n.push(s)}if(n.length==1)return n[0];for(var l=new Uint8Array(i),u=0,c=0;c<n.length;++c){var f=new Uint8Array(n[c]);Mx.arrayCopy(f,0,l,u,f.length),u+=f.length}return l.buffer}function Tx(e,t){this.minv=e,this.maxv=t}function oZ(e,t){var n,r=[];for(--t,r.push(0),n=1+(e>>26);n<=1+(t>>26);++n)r.push(n);for(n=9+(e>>23);n<=9+(t>>23);++n)r.push(n);for(n=73+(e>>20);n<=73+(t>>20);++n)r.push(n);for(n=585+(e>>17);n<=585+(t>>17);++n)r.push(n);for(n=4681+(e>>14);n<=4681+(t>>14);++n)r.push(n);return r}var aZ=21578324;function Bu(){}function sZ(e,t,n){var r=new Bu;r.data=e,r.tbi=t,r.tbi.fetch(function(i){if(!i)return n(null,"Couldn't access Tabix");var o=tm(i,i.byteLength),a=new Uint8Array(o),s=an(a,0);if(s!=aZ)return n(null,"Not a tabix index");var l=an(a,4);r.format=an(a,8),r.colSeq=an(a,12),r.colStart=an(a,16),r.colEnd=an(a,20),r.meta=an(a,24),r.skip=an(a,28),an(a,32),r.indices=[];var u=36;r.chrToIndex={},r.indexToChr=[];for(var c=0;c<l;++c){for(var f="";;){var d=a[u++];if(d==0)break;f+=String.fromCharCode(d)}r.chrToIndex[f]=c,f.indexOf("chr")==0?r.chrToIndex[f.substring(3)]=c:r.chrToIndex["chr"+f]=c,r.indexToChr.push(f)}for(var h=1e9,p=0;p<l;++p){var g=u,b=an(a,u);u+=4;for(var v=0;v<b;++v){an(a,u);var x=an(a,u+4);u+=8+x*16}var y=an(a,u);u+=4;for(var _=u,c=0;c<y;++c){var S=Wc(a,_);if(_+=8,S){var $=S.block;S.offset>0&&($+=65536),$<h&&(h=$);break}}u+=y*8,b>0&&(r.indices[p]=new Uint8Array(o,g,u-g))}r.headerMax=h,n(r)},{timeout:5e4})}Bu.prototype.blocksForRange=function(e,t,n){var r=this.indices[e];if(!r)return[];for(var i=oZ(t,n),o=[],a=0;a<i.length;++a)o[i[a]]=!0;for(var s=[],l=[],u=an(r,0),c=4,f=0;f<u;++f){var d=an(r,c),h=an(r,c+4);if(c+=8,o[d])for(var p=0;p<h;++p){var g=Wc(r,c,!0),b=Wc(r,c+8,!0);(d<4681?l:s).push(new Tx(g,b)),c+=16}else c+=h*16}for(var v=an(r,c),x=null,y=Math.min(t>>14,v-1),_=Math.min(n>>14,v-1),a=y;a<=_;++a){var S=Wc(r,c+4+a*8);S&&(!x||S.block<x.block||S.offset<x.offset)&&(x=S)}var $=[];if(x!=null)for(var a=0;a<l.length;++a){var w=l[a];w.maxv.block>=x.block&&w.maxv.offset>=x.offset&&$.push(w)}l=$;for(var T=[],a=0;a<l.length;++a)T.push(l[a]);for(var a=0;a<s.length;++a)T.push(s[a]);T.sort(function(C,E){var F=C.minv.block-E.minv.block;return F!=0?F:C.minv.offset-E.minv.offset});var M=[];if(T.length>0){for(var P=T[0],a=1;a<T.length;++a){var R=T[a];R.minv.block==P.maxv.block?P=new Tx(P.minv,R.maxv):(M.push(P),P=R)}M.push(P)}return M};Bu.prototype.fetch=function(e,t,n,r){var i=this,o=this.chrToIndex[e];if(o==null)return r([]);var a=this.indexToChr[o],s;o===void 0?s=[]:(s=this.blocksForRange(o,t,n),s||r(null,"Error in index fetch"));var l=[],u=0,c;function f(){if(u>=s.length)return r(l);if(c){var g=new Uint8Array(c);return i.readRecords(g,s[u].minv.offset,l,t,n,a),c=null,++u,f()}else{var d=s[u],h=d.minv.block,p=d.maxv.block+65536;i.data.slice(h,p-h).fetch(function(b){try{return c=tm(b,d.maxv.block-d.minv.block+1),f()}catch(v){return r(null,v)}})}}try{f()}catch(d){r(null,d)}};Bu.prototype.readRecords=function(e,t,n,r,i,o){e:for(;;){for(var a="";t<e.length;){var s=e[t++];if(s==10){var l=a.split(" ");if(l[this.colSeq-1]==o){var u=parseInt(l[this.colStart-1]),c=u;this.colEnd>0&&(c=parseInt(l[this.colEnd-1])),this.format&65536&&++u,u<=i&&c>=r&&n.push(a)}continue e}else a+=String.fromCharCode(s)}return}};Bu.prototype.fetchHeader=function(e,t){var n={metaOnly:!0,skipped:!1,nLines:0};t=t||n,Object.keys(n).forEach(function(i){t.hasOwnProperty(i)||(t[i]=n[i])});var r=this;r.data.slice(0,r.headerMax).fetch(function(i){if(!i)return e(null,"Fetch failed");for(var o=new Uint8Array(tm(i,i.byteLength)),a=0,s="",l=[];a<o.length;){var u=o[a++];if(u==10)if(t.metaOnly&&s.charCodeAt(0)==r.meta||t.skipped&&l.length<r.skip||t.nLines&&l.length<t.nLines)l.push(s),s="";else return e(l);else s+=String.fromCharCode(u)}e(l)})};function lZ(e,t){return new Promise(function(n,r){sZ(new bi(e),new bi(t),function(i,o){o?r(o):n(i)})})}function _4(e){const t=e.Adapters.get("BaseLZAdapter");class n extends t{constructor(i){if(super(i),!i.parser_func||!(i.url_data||i.reader))throw new Error("Tabix source is missing required configuration options");if(this.parser=i.parser_func,this.url_data=i.url_data,this.url_tbi=i.url_tbi||`${this.url_data}.tbi`,this._overfetch=i.overfetch||0,this._overfetch<0||this._overfetch>1)throw new Error("Overfetch must be specified as a fraction (0-1) of the requested region size");this.url_data?this._reader_promise=lZ(this.url_data,this.url_tbi).catch(function(){throw new Error("Failed to create a tabix reader from the provided URL")}):this._reader_promise=Promise.resolve(i.reader)}_performRequest(i){return new Promise((o,a)=>{const s=i.start,l=i.end,u=this._overfetch*(l-s),c=i.start-u,f=i.end+u;this._reader_promise.then(d=>{d.fetch(i.chr,c,f,function(h,p){p&&a(new Error("Could not read requested region. This may indicate an error with the .tbi index.")),o(h)})})})}_normalizeResponse(i){return i.map(this.parser)}}e.Adapters.add("TabixUrlSource",n)}typeof LocusZoom<"u"&&LocusZoom.use(_4);const Oi=new Set(["",".","NA","N/A","n/a","nan","-nan","NaN","-NaN","null","NULL","None",null]),uZ=/([\d.-]+)([\sxeE]*)([0-9-]*)/;function Yt(e){return Number.isInteger(e)}function cZ(e){return e.replace(/^chr/g,"").toUpperCase()}function dZ(e,t=!1){if(e===null)return e;const n=+e;if(t)return n;if(n<0||n>1)throw new Error("p value is not in the allowed range");if(n===0){if(e==="0")return 1/0;let[,r,,i]=e.match(uZ);return r=+r,i!==""?i=+i:i=0,r===0?1/0:-(Math.log10(+r)+ +i)}return-Math.log10(n)}function fZ({freq:e,allele_count:t,n_samples:n,is_alt_effect:r=!0}){if(e!==void 0&&t!==void 0)throw new Error("Frequency and allele count options are mutually exclusive");let i;if(e===void 0&&(Oi.has(t)||Oi.has(n)))return null;if(e===void 0&&t!==void 0)i=+t/+n/2;else{if(Oi.has(e))return null;i=+e}if(i<0||i>1)throw new Error("Allele frequency is not in the allowed range");return r?i:1-i}function hZ({marker_col:e,chrom_col:t,pos_col:n,ref_col:r,alt_col:i,pvalue_col:o,is_neg_log_pvalue:a=!1,rsid_col:s,beta_col:l,stderr_beta_col:u,allele_freq_col:c,allele_count_col:f,n_samples_col:d,is_alt_effect:h=!0,delimiter:p=" "}){if(Yt(e)&&Yt(t)&&Yt(n))throw new Error("Must specify either marker OR chr + pos");if(!(Yt(e)||Yt(t)&&Yt(n)))throw new Error("Must specify how to locate marker");if(Yt(f)&&Yt(c))throw new Error("Allele count and frequency options are mutually exclusive");if(Yt(f)&&!Yt(d))throw new Error("To calculate allele frequency from counts, you must also provide n_samples");return g=>{const b=g.split(p);let v,x,y,_,S=null,$,w=null,T=null,M=null,P,R;if(Yt(e))[v,x,y,_]=I5(b[e-1],!1);else if(Yt(t)&&Yt(n))v=b[t-1],x=b[n-1];else throw new Error("Must specify all fields required to identify the variant");if(v=cZ(v),v.startsWith("RS"))throw new Error(`Invalid chromosome specified: value "${v}" is an rsID`);Yt(r)&&(y=b[r-1]),Yt(i)&&(_=b[i-1]),Yt(s)&&(S=b[s-1]),Oi.has(y)&&(y=null),Oi.has(_)&&(_=null),Oi.has(S)?S=null:S&&(S=S.toLowerCase(),S.startsWith("rs")||(S=`rs${S}`));const C=dZ(b[o-1],a);y=y||null,_=_||null,Yt(c)&&($=b[c-1]),Yt(f)&&(P=b[f-1],R=b[d-1]),Yt(l)&&(w=b[l-1],w=Oi.has(w)?null:+w),Yt(u)&&(T=b[u-1],T=Oi.has(T)?null:+T),(c||f)&&(M=fZ({freq:$,allele_count:P,n_samples:R,is_alt_effect:h}));const E=y&&_?`_${y}/${_}`:"";return{chromosome:v,position:+x,ref_allele:y?y.toUpperCase():null,alt_allele:_?_.toUpperCase():null,variant:`${v}:${x}${E}`,rsid:S,log_pvalue:C,beta:w,stderr_beta:T,alt_allele_freq:M}}}function pZ(e){if(e.Adapters.has("TabixUrlSource")){const t=e.Adapters.get("TabixUrlSource"),n=e.Adapters.get("LDServer");class r extends t{constructor(o){o.limit_fields||(o.limit_fields=["variant2","position2","correlation"]),super(o)}_buildRequestOptions(o,a){if(!a)throw new Error("LD request must depend on association data");const s=super._buildRequestOptions(...arguments);return a.length?(s.ld_refvar=n.prototype.__find_ld_refvar(o,a),s):(s._skip_request=!0,s)}_performRequest(o){return o._skip_request?Promise.resolve([]):super._performRequest(o)}_annotateRecords(o,a){return o.filter(s=>s.variant1===a.ld_refvar)}}e.Adapters.add("UserTabixLD",r)}}typeof LocusZoom<"u"&&LocusZoom.use(pZ);function gZ(e){return`?${Object.keys(e).map(function(t){return`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`}).join("&")}`}function x4(e){const t={};if(e){const n=(e[0]==="?"?e.substr(1):e).split("&");for(let r=0;r<n.length;r++){const i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}}return t}function w4(e,t,n){n=n||!1;const r={};let i=t;return n&&(i={},Object.keys(t).forEach(function(o){i[t[o]]=o})),Object.keys(i).forEach(function(o){const a=i[o];Object.prototype.hasOwnProperty.call(e,o)&&(r[a]=e[o])}),r}function vZ(e,t){e.applyState(t)}function bZ(e,t){return w4(e.state,t)}function mZ(e,t){t=t||window.location.search;const n=x4(t);return w4(n,e,!0)}function yZ(e,t,n){n=n||vZ;const r=function(i){const o=mZ(t);n(e,o)};return window.addEventListener("popstate",r),e.trackExternalListener(window,"popstate",r),r}function _Z(e,t,n){n=n||bZ;const r=function(i){const o=x4(window.location.search),a=n(e,t,i),s=Object.assign({},o,a);if(Object.keys(s).some(function(u){return o[u]!=s[u]})){const u=gZ(s);Object.keys(o).length?history.pushState({},document.title,u):history.replaceState({},document.title,u)}};return e.on("state_changed",r),r}const xZ=ot("div",{id:"lz-plot",class:"h-100"},null,-1),wZ={key:0,class:"mt-4 p-3 border bg-red-100 text-red-700 text-sm text-center rounded"},Ex="#E30A17",CZ=1e7,Ax=40,SZ={__name:"Plugin",props:{datasetId:String,datasetUrl:String,root:String,settings:Object,specs:Object,tracks:Array},setup(e){Fi.use(_4);const t=e,n=ne("");function r(){var w;const i=(w=t.settings.tabix)==null?void 0:w.id,o=t.settings.chromosome,a=t.settings.start,s=t.settings.end,l=t.settings.chrom_col,u=t.settings.pos_col,c=t.settings.ref_col,f=t.settings.alt_col,d=t.settings.pvalue_col,h=t.settings.is_neg_log_pvalue,p=t.settings.beta_col,g=t.settings.stderr_beta_col;if(s-a>CZ){n.value="We cannot output more than 10Mb at a time!";return}if(s<=a){n.value="Invalid input: End position must be bigger than start position!";return}n.value="";const b=hZ({chrom_col:l,pos_col:u,ref_col:c,alt_col:f,pvalue_col:d,is_neg_log_pvalue:h,beta_col:p,stderr_beta_col:g});let v=new Fi.DataSources().add("assoc",["TabixUrlSource",{url_data:`${t.root}api/datasets/${t.datasetId}/display`,url_tbi:`${t.root}api/datasets/${i}/display`,parser_func:b,overfetch:0}]),x={chr:"chrom",start:"start",end:"end",ldrefvar:"ld_variant"},y={id:"associationpvalues_",name:"association",point_shape:"circle",point_size:Ax,color:Ex,legend:[{shape:"circle",color:Ex,size:Ax,label:"phen",class:"lz-data_layer-scatter"}],tooltip:{closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>phen</strong><br><strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2018
|
+
{{#if phewas:se|is_numeric}}<strong>SE (β):</strong> {{phewas:se|scinotation|htmlescape}}{{/if}}`},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},label:{text:"{{phewas:trait_label}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"phewas:log_pvalue",operator:">=",value:20}],style:{"font-size":"14px","font-weight":"bold",fill:"#333333"}}},a4={namespace:{gene:"gene",constraint:"constraint"},data_operations:[{type:"fetch",from:["gene","constraint(gene)"]},{name:"gene_constraint",type:"genes_to_gnomad_constraint",requires:["gene","constraint"]}],id:"genes",type:"genes",tag:"genes",id_field:"gene_id",behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(e4)},s4=qt({filters:[{field:"gene_type",operator:"in",value:["protein_coding","IG_C_gene","IG_D_gene","IG_J_gene","IG_V_gene","TR_C_gene","TR_D_gene","TR_J_gene","TR_V_gene","rRNA","Mt_rRNA","Mt_tRNA"]}]},at(a4)),l4={namespace:{assoc:"assoc",catalog:"catalog"},data_operations:[{type:"fetch",from:["assoc","catalog"]},{type:"assoc_to_gwas_catalog",name:"assoc_plus_ld",requires:["assoc","catalog"],params:["assoc:position","catalog:pos","catalog:log_pvalue"]}],id:"annotation_catalog",type:"annotation_track",tag:"gwascatalog",id_field:"assoc:variant",x_axis:{field:"assoc:position"},color:"#0000CC",filters:[{field:"catalog:rsid",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Xb}],behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(t4),tooltip_positioning:"top"},u4={type:"set_state",tag:"ld_population",position:"right",color:"blue",button_html:"LD Population: ",show_selected:!0,button_title:"Select LD Population: ",custom_event_name:"widget_set_ldpop",state_field:"ld_pop",options:[{display_name:"ALL (default)",value:"ALL"},{display_name:"AFR",value:"AFR"},{display_name:"AMR",value:"AMR"},{display_name:"EAS",value:"EAS"},{display_name:"EUR",value:"EUR"},{display_name:"SAS",value:"SAS"}]},c4={type:"display_options",tag:"gene_filter",custom_event_name:"widget_gene_filter_choice",position:"right",color:"blue",button_html:"Filter...",button_title:"Choose which genes to show",layer_name:"genes",default_config_display_name:"Coding genes & rRNA",options:[{display_name:"All features",display:{filters:null}}]},Ru={widgets:[{type:"remove_panel",position:"right",color:"red",group_position:"end"},{type:"move_panel_up",position:"right",group_position:"middle"},{type:"move_panel_down",position:"right",group_position:"start",style:{"margin-left":"0.75em"}}]},zu={widgets:[{type:"title",title:"LocusZoom",subtitle:`<a href="https://statgen.github.io/locuszoom/" target="_blank" rel="noopener">v${z5}</a>`,position:"left"},{type:"download",position:"right",group_position:"end"},{type:"download_png",position:"right",group_position:"start"}]},Qb=function(){const e=at(zu);return e.widgets.push(at(u4)),e}(),PK=function(){const e=at(zu);return e.widgets.push({type:"shift_region",step:5e5,button_html:">>",position:"right",group_position:"end"},{type:"shift_region",step:5e4,button_html:">",position:"right",group_position:"middle"},{type:"zoom_region",step:.2,position:"right",group_position:"middle"},{type:"zoom_region",step:-.2,position:"right",group_position:"middle"},{type:"shift_region",step:-5e4,button_html:"<",position:"right",group_position:"middle"},{type:"shift_region",step:-5e5,button_html:"<<",position:"right",group_position:"start"}),e}(),em={id:"association",tag:"association",min_height:200,height:300,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:function(){const e=at(Ru);return e.widgets.push({type:"toggle_legend",position:"right"}),e}(),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"-log10 p-value",label_offset:50},y2:{label:"Recombination Rate (cM/Mb)",label_offset:46}},legend:{orientation:"vertical",origin:{x:75,y:40},hidden:!0},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,drag_y2_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(fh),at(Zb),at(Jb)]},f4={id:"coaccessibility",tag:"coaccessibility",min_height:150,height:180,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"Score",label_offset:40,render:!1}},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(r4)]},d4=function(){let e=at(em);return e=qt({id:"associationcatalog"},e),e.toolbar.widgets.push({type:"display_options",position:"right",color:"blue",button_html:"Display options...",button_title:"Control how plot items are displayed",layer_name:"associationpvaluescatalog",default_config_display_name:"No catalog labels (default)",options:[{display_name:"Label catalog traits",display:{label:{text:"{{catalog:trait}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"catalog:trait",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Xb},{field:"ld:correlation",operator:">",value:.4}],style:{"font-size":"12px","font-weight":"bold",fill:"#333333"}}}}]}),e.data_layers=[at(fh),at(Zb),at(i4)],e}(),Fu={id:"genes",tag:"genes",min_height:150,height:225,margin:{top:20,right:55,bottom:20,left:70},axes:{},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},toolbar:function(){const e=at(Ru);return e.widgets.push({type:"resize_to_data",position:"right",button_html:"Resize"},at(c4)),e}(),data_layers:[at(s4)]},h4={id:"phewas",tag:"phewas",min_height:300,height:300,margin:{top:20,right:55,bottom:120,left:70},inner_border:"rgb(210, 210, 210)",axes:{x:{ticks:{style:{"font-weight":"bold","font-size":"11px","text-anchor":"start"},transform:"rotate(50)",position:"left"}},y1:{label:"-log10 p-value",label_offset:50}},data_layers:[at(fh),at(o4)]},p4={id:"annotationcatalog",tag:"gwascatalog",min_height:50,height:50,margin:{top:25,right:55,bottom:10,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{extent:"state",render:!1}},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(l4)]},RK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:Qb,panels:[at(em),at(Fu)]},zK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:Qb,panels:[p4,d4,Fu]},FK={width:800,responsive_resize:!0,toolbar:zu,panels:[at(h4),qt({height:300,margin:{bottom:40},axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"}}},at(Fu))],mouse_guide:!1},IK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:at(zu),panels:[at(f4),function(){const e=Object.assign({height:270},at(Fu)),t=e.data_layers[0];t.match={send:"gene_name",receive:"gene_name"};const n=[{field:"lz_is_match",scale_function:"if",parameters:{field_value:!0,then:"#4285f4"}},{field:"lz_is_match",scale_function:"if",parameters:{field_value:!1,then:"#EAE6E6"}},"#363696"];return t.color=n,t.stroke=n,e}()]},BK={standard_association:Kb,standard_association_with_label:AK,standard_genes:e4,catalog_variant:t4,coaccessibility:n4},OK={ldlz2_pop_selector:u4,gene_selector_menu:c4},NK={standard_panel:Ru,standard_plot:zu,standard_association:Qb,region_nav_plot:PK},LK={significance:fh,recomb_rate:Zb,association_pvalues:Jb,coaccessibility:r4,association_pvalues_catalog:i4,phewas_pvalues:o4,genes:a4,genes_filtered:s4,annotation_catalog:l4},DK={association:em,coaccessibility:f4,association_catalog:d4,genes:Fu,phewas:h4,annotation_catalog:p4},HK={standard_association:RK,association_catalog:zK,standard_phewas:FK,coaccessibility:IK},UK=Object.freeze(Object.defineProperty({__proto__:null,data_layer:LK,panel:DK,plot:HK,toolbar:NK,toolbar_widgets:OK,tooltip:BK},Symbol.toStringTag,{value:"Module"}));class jK extends Zi{get(t,n,r={}){if(!(t&&n))throw new Error("Must specify both the type and name for the layout desired. See .list() for available options");let i=super.get(t).get(n);const o=r.namespace;i.namespace||delete r.namespace;let a=qt(r,i);return o&&(a=q6(a,o)),at(a)}add(t,n,r,i=!1){if(!(t&&n&&r))throw new Error("To add a layout, type, name, and item must all be specified");if(typeof r!="object")throw new Error("The configuration to be added must be an object");this.has(t)||super.add(t,new Zi);const o=at(r);return t==="data_layer"&&o.namespace&&(o._auto_fields=[...Vb(o,Object.keys(o.namespace))].sort()),super.get(t).add(n,o,i)}list(t){if(!t){let n={};for(let[r,i]of this._items)n[r]=i.list();return n}return super.get(t).list()}merge(t,n){return qt(t,n)}renameField(){return kg(...arguments)}mutate_attrs(){return PX(...arguments)}query_attrs(){return RX(...arguments)}}const g4=new jK;for(let[e,t]of Object.entries(UK))for(let[n,r]of Object.entries(t))g4.add(e,n,r);const _a=new Zi;function Iu(e){return(t,n,...r)=>{if(n.length!==2)throw new Error("Join functions must receive exactly two recordsets");return e(...n,...r)}}function WK(e,t,n,r,i){if(!e.length)return e;const o=M0(t,r),a=[];for(let s of o.values()){let l=0,u;for(let c of s){const d=c[i];d>=l&&(u=c,l=d)}u.n_catalog_matches=s.length,a.push(u)}return F5(e,a,n,r)}function VK(e,t){return e.forEach(function(n){const r=`_${n.gene_name.replace(/[^A-Za-z0-9_]/g,"_")}`,i=t[r]&&t[r].gnomad_constraint;i&&Object.keys(i).forEach(function(o){let a=i[o];typeof n[o]>"u"&&(typeof a=="number"&&a.toString().includes(".")&&(a=parseFloat(a.toFixed(2))),n[o]=a)})}),e}_a.add("left_match",Iu(F5));_a.add("inner_match",Iu(dB));_a.add("full_outer_match",Iu(hB));_a.add("assoc_to_gwas_catalog",Iu(WK));_a.add("genes_to_gnomad_constraint",Iu(VK));class qK extends Zi{constructor(t){super(),this._registry=t||ns}add(t,n,r=!1){if(this._registry.has(t))throw new Error(`The namespace ${t} is already in use by another source`);if(t.match(/[^A-Za-z0-9_]/))throw new Error(`Data source namespace names can only contain alphanumeric characters or underscores. Invalid name: ${t}`);if(Array.isArray(n)){const[i,o]=n;n=this._registry.create(i,o)}return n.source_id=t,super.add(t,n,r),this}}const Fi={version:z5,populate:iK,DataSources:qK,Adapters:ns,DataLayers:Yb,DataFunctions:_a,Layouts:g4,MatchFunctions:pr,ScaleFunctions:ch,TransformationFunctions:Wb,Widgets:qb,get KnownDataSources(){return console.warn('Deprecation warning: KnownDataSources has been renamed to "Adapters"'),ns}},$x=[];Fi.use=function(e,...t){if(!$x.includes(e)){if(t.unshift(Fi),typeof e.install=="function")e.install.apply(e,t);else if(typeof e=="function")e.apply(null,t);else throw new Error("Plugin must export a function that receives the LocusZoom object as an argument");$x.push(e)}};var GK="";function v4(e){return XK(YK(KK(e)))}function YK(e){return JK(QK(ZK(e),e.length*8))}function XK(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=e.length,i=0;i<r;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<r?e.charCodeAt(i+1)<<8:0)|(i+2<r?e.charCodeAt(i+2):0),a=0;a<4;a++)i*8+a*6>e.length*8?n+=GK:n+=t.charAt(o>>>6*(3-a)&63);return n}function KK(e){for(var t="",n=-1,r,i;++n<e.length;)r=e.charCodeAt(n),i=n+1<e.length?e.charCodeAt(n+1):0,55296<=r&&r<=56319&&56320<=i&&i<=57343&&(r=65536+((r&1023)<<10)+(i&1023),n++),r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(192|r>>>6&31,128|r&63):r<=65535?t+=String.fromCharCode(224|r>>>12&15,128|r>>>6&63,128|r&63):r<=2097151&&(t+=String.fromCharCode(240|r>>>18&7,128|r>>>12&63,128|r>>>6&63,128|r&63));return t}function ZK(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(var n=0;n<e.length*8;n+=8)t[n>>5]|=(e.charCodeAt(n/8)&255)<<24-n%32;return t}function JK(e){for(var t="",n=0;n<e.length*32;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}function QK(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,s=-1009589776,l=0;l<e.length;l+=16){for(var u=r,c=i,d=o,f=a,h=s,p=0;p<80;p++){p<16?n[p]=e[l+p]:n[p]=Vp(n[p-3]^n[p-8]^n[p-14]^n[p-16],1);var g=ri(ri(Vp(r,5),eZ(p,i,o,a)),ri(ri(s,n[p]),tZ(p)));s=a,a=o,o=Vp(i,30),i=r,r=g}r=ri(r,u),i=ri(i,c),o=ri(o,d),a=ri(a,f),s=ri(s,h)}return Array(r,i,o,a,s)}function eZ(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function tZ(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function ri(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function Vp(e,t){return e<<t|e>>>32-t}function nZ(e){var t={};for(var n in e)t[n]=e[n];return t}"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")});function bi(e,t,n,r){r||(typeof t=="object"?(r=t,t=void 0):r={}),this.url=e,this.start=t||0,n&&(this.end=n),this.opts=r}bi.prototype.slice=function(e,t){if(e<0)throw"Bad slice "+e;var n=this.start,r=this.end;return n&&e?n=n+e:n=e||n,t&&n?r=n+t-1:r=r||t-1,new bi(this.url,n,r,this.opts)};var b4=0,m4=typeof navigator<"u"&&navigator.userAgent.indexOf("Safari")>=0&&navigator.userAgent.indexOf("Chrome")<0;bi.prototype.fetchAsText=function(e){var t=this;this.getURL().then(function(n){try{var r=new XMLHttpRequest,i;if((m4||t.opts.salt)&&n.indexOf("?")<0&&(n=n+"?salt="+v4(""+Date.now()+","+ ++b4)),r.open("GET",n,!0),t.end){if(t.end-t.start>1e8)throw"Monster fetch!";r.setRequestHeader("Range","bytes="+t.start+"-"+t.end),i=t.end-t.start+1}r.onreadystatechange=function(){if(r.readyState==4)return r.status==200||r.status==206?e(r.responseText):e(null)},t.opts.credentials&&(r.withCredentials=!0),r.send()}catch{return e(null)}}).catch(function(n){return console.log(n),e(null,n)})};bi.prototype.salted=function(){var e=nZ(this.opts);return e.salt=!0,new bi(this.url,this.start,this.end,e)};bi.prototype.getURL=function(){return this.opts.resolver?this.opts.resolver(this.url).then(function(e){return typeof e=="string"?e:e.url}):Promise.resolve(this.url)};bi.prototype.fetch=function(e,t){var n=this;t=t||{};var r=t.attempt||1,i=t.truncatedLength;if(r>3)return e(null);this.getURL().then(function(o){try{var a;t.timeout&&!n.opts.credentials&&(a=setTimeout(function(){return console.log("timing out "+o),s.abort(),e(null,"Timeout")},t.timeout));var s=new XMLHttpRequest,l;if((m4||n.opts.salt)&&o.indexOf("?")<0&&(o=o+"?salt="+v4(""+Date.now()+","+ ++b4)),s.open("GET",o,!0),s.overrideMimeType("text/plain; charset=x-user-defined"),n.end){if(n.end-n.start>1e8)throw"Monster fetch!";s.setRequestHeader("Range","bytes="+n.start+"-"+n.end),l=n.end-n.start+1}s.responseType="arraybuffer",s.onreadystatechange=function(){if(s.readyState==4)if(a&&clearTimeout(a),s.status==200||s.status==206)if(s.response){var u=s.response.byteLength;return l&&l!=u&&(!i||u!=i)?n.fetch(e,{attempt:r+1,truncatedLength:u}):e(s.response)}else{if(s.mozResponseArrayBuffer)return e(s.mozResponseArrayBuffer);var c=s.responseText;return l&&l!=c.length&&(!i||c.length!=i)?n.fetch(e,{attempt:r+1,truncatedLength:c.length}):e(rZ(s.responseText))}else return n.fetch(e,{attempt:r+1})},n.opts.credentials&&(s.withCredentials=!0),s.send()}catch{return e(null)}}).catch(function(o){return console.log(o),e(null,o)})};function rZ(e){if(!e)return null;for(var t=new Uint8Array(e.length),n=0;n<t.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function an(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}var qp={exports:{}},kx;function iZ(){return kx||(kx=1,function(e){var t=15,n=t,r=1440,i=15,o=32,a=0,s=4,l=8,u=0,c=1,d=2,f=-2,h=-3,p=-4,g=-5,b=0,v=1,x=2,y=3,_=4,S=5,$=6,w=7,T=8,M=9,P=10,R=11,C=12,E=13,F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],z=0,j=1,Z=2,J=3,ie=4,he=5,_e=6,oe=7,ve=8,we=9,Oe=9,xe=5,Xe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ve=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],fe=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ee=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Pe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function H(){}H.prototype.inflateInit=function(m,I){return m||(m=n),I&&(I=!1),this.istate=new Y,this.istate.inflateInit(this,I?-m:m)},H.prototype.inflate=function(m){return this.istate==null?f:this.istate.inflate(this,m)},H.prototype.inflateEnd=function(){if(this.istate==null)return f;var m=istate.inflateEnd(this);return this.istate=null,m},H.prototype.inflateSync=function(){return istate.inflateSync(this)},H.prototype.inflateSetDictionary=function(m,I){return istate.inflateSetDictionary(this,m,I)};function Y(){this.was=[0]}Y.prototype.inflateReset=function(m){return m==null||m.istate==null?f:(m.total_in=m.total_out=0,m.msg=null,m.istate.mode=m.istate.nowrap!=0?w:b,m.istate.blocks.reset(m,null),u)},Y.prototype.inflateEnd=function(m){return this.blocks!=null&&this.blocks.free(m),this.blocks=null,u},Y.prototype.inflateInit=function(m,I){return m.msg=null,this.blocks=null,nowrap=0,I<0&&(I=-I,nowrap=1),I<8||I>15?(this.inflateEnd(m),f):(this.wbits=I,m.istate.blocks=new q(m,m.istate.nowrap!=0?null:this,1<<I),this.inflateReset(m),u)},Y.prototype.inflate=function(m,I){var D,te;if(m==null||m.istate==null||m.next_in==null)return f;for(I=I==s?g:u,D=g;;)switch(m.istate.mode){case b:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,((m.istate.method=m.next_in[m.next_in_index++])&15)!=l){m.istate.mode=E,m.msg="unknown compression method",m.istate.marker=5;break}if((m.istate.method>>4)+8>m.istate.wbits){m.istate.mode=E,m.msg="invalid window size",m.istate.marker=5;break}m.istate.mode=v;case v:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,te=m.next_in[m.next_in_index++]&255,((m.istate.method<<8)+te)%31!=0){m.istate.mode=E,m.msg="incorrect header check",m.istate.marker=5;break}if((te&o)==0){m.istate.mode=w;break}m.istate.mode=x;case x:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=y;case y:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=_;case _:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=S;case S:return m.avail_in==0?D:(D=I,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.adler=m.istate.need,m.istate.mode=$,d);case $:return m.istate.mode=E,m.msg="need dictionary",m.istate.marker=0,f;case w:if(D=m.istate.blocks.proc(m,D),D==h){m.istate.mode=E,m.istate.marker=0;break}if(D==u&&(D=I),D!=c)return D;if(D=I,m.istate.blocks.reset(m,m.istate.was),m.istate.nowrap!=0){m.istate.mode=C;break}m.istate.mode=T;case T:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=M;case M:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=P;case P:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=R;case R:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.istate.was[0]!=m.istate.need){m.istate.mode=E,m.msg="incorrect data check",m.istate.marker=5;break}m.istate.mode=C;case C:return c;case E:return h;default:return f}},Y.prototype.inflateSetDictionary=function(m,I,D){var te=0,K=D;return m==null||m.istate==null||m.istate.mode!=$?f:m._adler.adler32(1,I,0,D)!=m.adler?h:(m.adler=m._adler.adler32(0,null,0,0),K>=1<<m.istate.wbits&&(K=(1<<m.istate.wbits)-1,te=D-K),m.istate.blocks.set_dictionary(I,te,K),m.istate.mode=w,u)};var de=[0,0,255,255];Y.prototype.inflateSync=function(m){var I,D,te,K,se;if(m==null||m.istate==null)return f;if(m.istate.mode!=E&&(m.istate.mode=E,m.istate.marker=0),(I=m.avail_in)==0)return g;for(D=m.next_in_index,te=m.istate.marker;I!=0&&te<4;)m.next_in[D]==de[te]?te++:m.next_in[D]!=0?te=0:te=4-te,D++,I--;return m.total_in+=D-m.next_in_index,m.next_in_index=D,m.avail_in=I,m.istate.marker=te,te!=4?h:(K=m.total_in,se=m.total_out,this.inflateReset(m),m.total_in=K,m.total_out=se,m.istate.mode=w,u)},Y.prototype.inflateSyncPoint=function(m){return m==null||m.istate==null||m.istate.blocks==null?f:m.istate.blocks.sync_point()};var le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function q(m,I,D){this.hufts=new Int32Array(r*3),this.window=new Uint8Array(D),this.end=D,this.checkfn=I,this.mode=z,this.reset(m,null),this.left=0,this.table=0,this.index=0,this.blens=null,this.bb=new Int32Array(1),this.tb=new Int32Array(1),this.codes=new Re,this.last=0,this.bitk=0,this.bitb=0,this.read=0,this.write=0,this.check=0,this.inftree=new rt}q.prototype.reset=function(m,I){I&&(I[0]=this.check),this.mode==_e&&this.codes.free(m),this.mode=z,this.bitk=0,this.bitb=0,this.read=this.write=0,this.checkfn&&(m.adler=this.check=m._adler.adler32(0,null,0,0))},q.prototype.proc=function(m,I){var D,te,K,se,ue,ae,ke;for(se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae;;)switch(this.mode){case z:for(;K<3;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}switch(D=te&7,this.last=D&1,D>>>1){case 0:te>>>=3,K-=3,D=K&7,te>>>=D,K-=D,this.mode=j;break;case 1:{var Me=new Int32Array(1),$e=new Int32Array(1),ze=[],Je=[];lt(Me,$e,ze,Je),this.codes.init(Me[0],$e[0],ze[0],0,Je[0],0,m)}te>>>=3,K-=3,this.mode=_e;break;case 2:te>>>=3,K-=3,this.mode=J;break;case 3:return te>>>=3,K-=3,this.mode=E,m.msg="invalid block type",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I)}break;case j:for(;K<32;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if((~te>>>16&65535)!=(te&65535))return this.mode=E,m.msg="invalid stored block lengths",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);this.left=te&65535,te=K=0,this.mode=this.left!=0?Z:this.last!=0?oe:z;break;case Z:if(ue==0)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,I);if(ke==0&&(ae==end&&read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0&&(this.write=ae,I=this.inflate_flush(m,I),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,ae==this.end&&this.read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0)))return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);if(I=u,D=this.left,D>ue&&(D=ue),D>ke&&(D=ke),yt(m.next_in,se,this.window,ae,D),se+=D,ue-=D,ae+=D,ke-=D,(this.left-=D)!=0)break;this.mode=this.last!=0?oe:z;break;case J:for(;K<14;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(this.table=D=te&16383,(D&31)>29||(D>>5&31)>29)return this.mode=we,m.msg="too many length or distance symbols",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);if(D=258+(D&31)+(D>>5&31),this.blens==null||this.blens.length<D)this.blens=new Int32Array(D);else for(var Ne=0;Ne<D;Ne++)this.blens[Ne]=0;te>>>=14,K-=14,this.index=0,mode=ie;case ie:for(;this.index<4+(this.table>>>10);){for(;K<3;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}this.blens[le[this.index++]]=te&7,te>>>=3,K-=3}for(;this.index<19;)this.blens[le[this.index++]]=0;if(this.bb[0]=7,D=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,m),D!=u)return I=D,I==h&&(this.blens=null,this.mode=we),this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,I);this.index=0,this.mode=he;case he:for(;D=this.table,this.index<258+(D&31)+(D>>5&31);){var Ne,ht,Le;for(D=this.bb[0];K<D;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(D=this.hufts[(this.tb[0]+(te&F[D]))*3+1],Le=this.hufts[(this.tb[0]+(te&F[D]))*3+2],Le<16)te>>>=D,K-=D,this.blens[this.index++]=Le;else{for(Ne=Le==18?7:Le-14,ht=Le==18?11:3;K<D+Ne;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(te>>>=D,K-=D,ht+=te&F[Ne],te>>>=Ne,K-=Ne,Ne=this.index,D=this.table,Ne+ht>258+(D&31)+(D>>5&31)||Le==16&&Ne<1)return this.blens=null,this.mode=we,m.msg="invalid bit length repeat",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);Le=Le==16?this.blens[Ne-1]:0;do this.blens[Ne++]=Le;while(--ht!=0);this.index=Ne}}this.tb[0]=-1;{var Me=new Int32Array(1),$e=new Int32Array(1),ze=new Int32Array(1),Je=new Int32Array(1);if(Me[0]=9,$e[0]=6,D=this.table,D=this.inftree.inflate_trees_dynamic(257+(D&31),1+(D>>5&31),this.blens,Me,$e,ze,Je,this.hufts,m),D!=u)return D==h&&(this.blens=null,this.mode=E),I=D,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);this.codes.init(Me[0],$e[0],this.hufts,ze[0],this.hufts,Je[0],m)}this.mode=_e;case _e:if(this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,(I=this.codes.proc(this,m,I))!=c)return this.inflate_flush(m,I);if(I=u,this.codes.free(m),se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.last==0){this.mode=z;break}this.mode=oe;case oe:if(this.write=ae,I=this.inflate_flush(m,I),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.read!=this.write)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);mode=C;case ve:return I=c,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);case we:return I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);default:return I=f,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I)}},q.prototype.free=function(m){this.reset(m,null),this.window=null,this.hufts=null},q.prototype.set_dictionary=function(m,I,D){yt(m,I,window,0,D),this.read=this.write=D},q.prototype.sync_point=function(){return this.mode==j},q.prototype.inflate_flush=function(m,I){var D,te,K;return te=m.next_out_index,K=this.read,D=(K<=this.write?this.write:this.end)-K,D>m.avail_out&&(D=m.avail_out),D!=0&&I==g&&(I=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D,K==this.end&&(K=0,this.write==this.end&&(this.write=0),D=this.write-K,D>m.avail_out&&(D=m.avail_out),D!=0&&I==g&&(I=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D),m.next_out_index=te,this.read=K,I};var N=0,re=1,L=2,O=3,ee=4,U=5,B=6,V=7,me=8,Ae=9;function Re(){}Re.prototype.init=function(m,I,D,te,K,se,ue){this.mode=N,this.lbits=m,this.dbits=I,this.ltree=D,this.ltree_index=te,this.dtree=K,this.dtree_index=se,this.tree=null},Re.prototype.proc=function(m,I,D){var te,K,se,ue=0,ae=0,ke=0,Me,$e,ze,Je;for(ke=I.next_in_index,Me=I.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e;;)switch(this.mode){case N:if(ze>=258&&Me>=10&&(m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,D=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,m,I),ke=I.next_in_index,Me=I.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,D!=u)){this.mode=D==c?V:Ae;break}this.need=this.lbits,this.tree=this.ltree,this.tree_index=this.ltree_index,this.mode=re;case re:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&F[te]))*3,ue>>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],se==0){this.lit=this.tree[K+2],this.mode=B;break}if((se&16)!=0){this.get=se&15,this.len=this.tree[K+2],this.mode=L;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}if((se&32)!=0){this.mode=V;break}return this.mode=Ae,I.msg="invalid literal/length code",D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case L:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}this.len+=ue&F[te],ue>>=te,ae-=te,this.need=this.dbits,this.tree=this.dtree,this.tree_index=this.dtree_index,this.mode=O;case O:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&F[te]))*3,ue>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],(se&16)!=0){this.get=se&15,this.dist=this.tree[K+2],this.mode=ee;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}return this.mode=Ae,I.msg="invalid distance code",D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case ee:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}this.dist+=ue&F[te],ue>>=te,ae-=te,this.mode=U;case U:for(Je=$e-this.dist;Je<0;)Je+=m.end;for(;this.len!=0;){if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);m.window[$e++]=m.window[Je++],ze--,Je==m.end&&(Je=0),this.len--}this.mode=N;break;case B:if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);D=u,m.window[$e++]=this.lit,ze--,this.mode=N;break;case V:if(ae>7&&(ae-=8,Me++,ke--),m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,m.read!=m.write)return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);this.mode=me;case me:return D=c,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case Ae:return D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);default:return D=f,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D)}},Re.prototype.free=function(m){},Re.prototype.inflate_fast=function(m,I,D,te,K,se,ue,ae){var ke,Me,$e,ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut;ht=ae.next_in_index,Le=ae.avail_in,Je=ue.bitb,Ne=ue.bitk,Be=ue.write,X=Be<ue.read?ue.read-Be-1:ue.end-Be,be=F[m],He=F[I];do{for(;Ne<20;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(ke=Je&be,Me=D,$e=te,ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;continue}do{if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15,Te=Me[ut+2]+(Je&F[ze]),Je>>=ze,Ne-=ze;Ne<15;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;ke=Je&He,Me=K,$e=se,ut=($e+ke)*3,ze=Me[ut];do if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15;Ne<ze;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(gt=Me[ut+2]+(Je&F[ze]),Je>>=ze,Ne-=ze,X-=Te,Be>=gt)De=Be-gt,Be-De>0&&2>Be-De,ue.window[Be++]=ue.window[De++],ue.window[Be++]=ue.window[De++],Te-=2;else{De=Be-gt;do De+=ue.end;while(De<0);if(ze=ue.end-De,Te>ze){if(Te-=ze,Be-De>0&&ze>Be-De)do ue.window[Be++]=ue.window[De++];while(--ze!=0);else yt(ue.window,De,ue.window,Be,ze),Be+=ze,De+=ze,ze=0;De=0}}do ue.window[Be++]=ue.window[De++];while(--Te!=0);break}else if((ze&64)==0)ke+=Me[ut+2],ke+=Je&F[ze],ut=($e+ke)*3,ze=Me[ut];else return ae.msg="invalid distance code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h;while(!0);break}if((ze&64)==0){if(ke+=Me[ut+2],ke+=Je&F[ze],ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;break}}else return(ze&32)!=0?(Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,c):(ae.msg="invalid literal/length code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h)}while(!0)}while(X>=258&&Le>=10);return Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,u};function rt(){}rt.prototype.huft_build=function(m,I,D,te,K,se,ue,ae,ke,Me,$e){var ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut,pn,Wt;Te=0,Le=D;do this.c[m[I+Te]]++,Te++,Le--;while(Le!=0);if(this.c[0]==D)return ue[0]=-1,ae[0]=0,u;for(be=ae[0],Be=1;Be<=i&&this.c[Be]==0;Be++);for(X=Be,be<Be&&(be=Be),Le=i;Le!=0&&this.c[Le]==0;Le--);for(Ne=Le,be>Le&&(be=Le),ae[0]=be,pn=1<<Be;Be<Le;Be++,pn<<=1)if((pn-=this.c[Be])<0)return h;if((pn-=this.c[Le])<0)return h;for(this.c[Le]+=pn,this.x[1]=Be=0,Te=1,ut=2;--Le!=0;)this.x[ut]=Be+=this.c[Te],ut++,Te++;Le=0,Te=0;do(Be=m[I+Te])!=0&&(this.v[this.x[Be]++]=Le),Te++;while(++Le<D);for(D=this.x[Ne],this.x[0]=Le=0,Te=0,ht=-1,De=-be,this.u[0]=0,gt=0,Wt=0;X<=Ne;X++)for(ze=this.c[X];ze--!=0;){for(;X>De+be;){if(ht++,De+=be,Wt=Ne-De,Wt=Wt>be?be:Wt,(Je=1<<(Be=X-De))>ze+1&&(Je-=ze+1,ut=X,Be<Wt))for(;++Be<Wt&&!((Je<<=1)<=this.c[++ut]);)Je-=this.c[ut];if(Wt=1<<Be,this.hn[0]+Wt>r)return h;this.u[ht]=gt=this.hn[0],this.hn[0]+=Wt,ht!=0?(this.x[ht]=Le,this.r[0]=Be,this.r[1]=be,Be=Le>>>De-be,this.r[2]=gt-this.u[ht-1]-Be,yt(this.r,0,ke,(this.u[ht-1]+Be)*3,3)):ue[0]=gt}for(this.r[1]=X-De,Te>=D?this.r[0]=192:$e[Te]<te?(this.r[0]=this.v[Te]<256?0:96,this.r[2]=this.v[Te++]):(this.r[0]=se[this.v[Te]-te]+16+64,this.r[2]=K[this.v[Te++]-te]),Je=1<<X-De,Be=Le>>>De;Be<Wt;Be+=Je)yt(this.r,0,ke,(gt+Be)*3,3);for(Be=1<<X-1;(Le&Be)!=0;Be>>>=1)Le^=Be;for(Le^=Be,He=(1<<De)-1;(Le&He)!=this.x[ht];)ht--,De-=be,He=(1<<De)-1}return pn!=0&&Ne!=1?g:u},rt.prototype.inflate_trees_bits=function(m,I,D,te,K){var se;return this.initWorkArea(19),this.hn[0]=0,se=this.huft_build(m,0,19,19,null,null,D,I,te,this.hn,this.v),se==h?K.msg="oversubscribed dynamic bit lengths tree":(se==g||I[0]==0)&&(K.msg="incomplete dynamic bit lengths tree",se=h),se},rt.prototype.inflate_trees_dynamic=function(m,I,D,te,K,se,ue,ae,ke){var Me;return this.initWorkArea(288),this.hn[0]=0,Me=this.huft_build(D,0,m,257,fe,Ee,se,te,ae,this.hn,this.v),Me!=u||te[0]==0?(Me==h?ke.msg="oversubscribed literal/length tree":Me!=p&&(ke.msg="incomplete literal/length tree",Me=h),Me):(this.initWorkArea(288),Me=this.huft_build(D,m,I,0,Pe,A,ue,K,ae,this.hn,this.v),Me!=u||K[0]==0&&m>257?(Me==h?ke.msg="oversubscribed distance tree":Me==g?(ke.msg="incomplete distance tree",Me=h):Me!=p&&(ke.msg="empty distance tree with lengths",Me=h),Me):u)};function lt(m,I,D,te,K){return m[0]=Oe,I[0]=xe,D[0]=Xe,te[0]=Ve,u}rt.prototype.initWorkArea=function(m){this.hn==null&&(this.hn=new Int32Array(1),this.v=new Int32Array(m),this.c=new Int32Array(i+1),this.r=new Int32Array(3),this.u=new Int32Array(i),this.x=new Int32Array(i+1)),this.v.length<m&&(this.v=new Int32Array(m));for(var I=0;I<m;I++)this.v[I]=0;for(var I=0;I<i+1;I++)this.c[I]=0;for(var I=0;I<3;I++)this.r[I]=0;yt(this.c,0,this.u,0,i),yt(this.c,0,this.x,0,i+1)};var ft=new Uint8Array(1),zt=typeof ft.subarray=="function";function yt(m,I,D,te,K){if(K!=0){if(m){if(!D)throw"Undef dest"}else throw"Undef src";I==0&&K==m.length?ye(m,D,te):zt?ye(m.subarray(I,I+K),D,te):m.BYTES_PER_ELEMENT==1&&K>100?ye(new Uint8Array(m.buffer,m.byteOffset+I,K),D,te):Lt(m,I,D,te,K)}}function Lt(m,I,D,te,K){for(var se=0;se<K;++se)D[te+se]=m[I+se]}function ye(m,I,D){I.set(m,D)}function G(m,I,D,te){I?D?m=new Uint8Array(m,I,D):m=new Uint8Array(m,I,m.byteLength-I):m=new Uint8Array(m);var K=new H;K.inflateInit(n,!0),K.next_in=m,K.next_in_index=0,K.avail_in=m.length;for(var se=[],ue=0;;){var ae=new Uint8Array(32e3);K.next_out=ae,K.next_out_index=0,K.avail_out=ae.length;var ke=K.inflate(a);if(ke!=u&&ke!=c&&ke!=g)throw K.msg;if(K.avail_out!=0){var Me=new Uint8Array(ae.length-K.avail_out);yt(ae,0,Me,0,ae.length-K.avail_out),ae=Me}if(se.push(ae),ue+=ae.length,ke==c||ke==g)break}if(te&&(te[0]=(I||0)+K.next_in_index),se.length==1)return se[0].buffer;for(var $e=new Uint8Array(ue),ze=0,Je=0;Je<se.length;++Je){var Ne=se[Je];yt(Ne,0,$e,ze,Ne.length),ze+=Ne.length}return $e.buffer}e.exports={inflateBuffer:G,arrayCopy:yt}}(qp)),qp.exports}var Mx=iZ();function y4(e,t){this.block=e,this.offset=t}y4.prototype.toString=function(){return""+this.block+":"+this.offset};function Wc(e,t,n){var r=(e[t+6]&255)*4294967296+(e[t+5]&255)*16777216+(e[t+4]&255)*65536+(e[t+3]&255)*256+(e[t+2]&255),i=e[t+1]<<8|e[t];return r==0&&i==0&&!n?null:new y4(r,i)}function tm(e,t){t=Math.min(t||1,e.byteLength-50);for(var n=[],r=[0],i=0;r[0]<t;){var o=new Uint8Array(e,r[0],12),a=o[11]<<8|o[10],s=Mx.inflateBuffer(e,12+a+r[0],Math.min(65536,e.byteLength-12-a-r[0]),r);r[0]+=8,i+=s.byteLength,n.push(s)}if(n.length==1)return n[0];for(var l=new Uint8Array(i),u=0,c=0;c<n.length;++c){var d=new Uint8Array(n[c]);Mx.arrayCopy(d,0,l,u,d.length),u+=d.length}return l.buffer}function Tx(e,t){this.minv=e,this.maxv=t}function oZ(e,t){var n,r=[];for(--t,r.push(0),n=1+(e>>26);n<=1+(t>>26);++n)r.push(n);for(n=9+(e>>23);n<=9+(t>>23);++n)r.push(n);for(n=73+(e>>20);n<=73+(t>>20);++n)r.push(n);for(n=585+(e>>17);n<=585+(t>>17);++n)r.push(n);for(n=4681+(e>>14);n<=4681+(t>>14);++n)r.push(n);return r}var aZ=21578324;function Bu(){}function sZ(e,t,n){var r=new Bu;r.data=e,r.tbi=t,r.tbi.fetch(function(i){if(!i)return n(null,"Couldn't access Tabix");var o=tm(i,i.byteLength),a=new Uint8Array(o),s=an(a,0);if(s!=aZ)return n(null,"Not a tabix index");var l=an(a,4);r.format=an(a,8),r.colSeq=an(a,12),r.colStart=an(a,16),r.colEnd=an(a,20),r.meta=an(a,24),r.skip=an(a,28),an(a,32),r.indices=[];var u=36;r.chrToIndex={},r.indexToChr=[];for(var c=0;c<l;++c){for(var d="";;){var f=a[u++];if(f==0)break;d+=String.fromCharCode(f)}r.chrToIndex[d]=c,d.indexOf("chr")==0?r.chrToIndex[d.substring(3)]=c:r.chrToIndex["chr"+d]=c,r.indexToChr.push(d)}for(var h=1e9,p=0;p<l;++p){var g=u,b=an(a,u);u+=4;for(var v=0;v<b;++v){an(a,u);var x=an(a,u+4);u+=8+x*16}var y=an(a,u);u+=4;for(var _=u,c=0;c<y;++c){var S=Wc(a,_);if(_+=8,S){var $=S.block;S.offset>0&&($+=65536),$<h&&(h=$);break}}u+=y*8,b>0&&(r.indices[p]=new Uint8Array(o,g,u-g))}r.headerMax=h,n(r)},{timeout:5e4})}Bu.prototype.blocksForRange=function(e,t,n){var r=this.indices[e];if(!r)return[];for(var i=oZ(t,n),o=[],a=0;a<i.length;++a)o[i[a]]=!0;for(var s=[],l=[],u=an(r,0),c=4,d=0;d<u;++d){var f=an(r,c),h=an(r,c+4);if(c+=8,o[f])for(var p=0;p<h;++p){var g=Wc(r,c,!0),b=Wc(r,c+8,!0);(f<4681?l:s).push(new Tx(g,b)),c+=16}else c+=h*16}for(var v=an(r,c),x=null,y=Math.min(t>>14,v-1),_=Math.min(n>>14,v-1),a=y;a<=_;++a){var S=Wc(r,c+4+a*8);S&&(!x||S.block<x.block||S.offset<x.offset)&&(x=S)}var $=[];if(x!=null)for(var a=0;a<l.length;++a){var w=l[a];w.maxv.block>=x.block&&w.maxv.offset>=x.offset&&$.push(w)}l=$;for(var T=[],a=0;a<l.length;++a)T.push(l[a]);for(var a=0;a<s.length;++a)T.push(s[a]);T.sort(function(C,E){var F=C.minv.block-E.minv.block;return F!=0?F:C.minv.offset-E.minv.offset});var M=[];if(T.length>0){for(var P=T[0],a=1;a<T.length;++a){var R=T[a];R.minv.block==P.maxv.block?P=new Tx(P.minv,R.maxv):(M.push(P),P=R)}M.push(P)}return M};Bu.prototype.fetch=function(e,t,n,r){var i=this,o=this.chrToIndex[e];if(o==null)return r([]);var a=this.indexToChr[o],s;o===void 0?s=[]:(s=this.blocksForRange(o,t,n),s||r(null,"Error in index fetch"));var l=[],u=0,c;function d(){if(u>=s.length)return r(l);if(c){var g=new Uint8Array(c);return i.readRecords(g,s[u].minv.offset,l,t,n,a),c=null,++u,d()}else{var f=s[u],h=f.minv.block,p=f.maxv.block+65536;i.data.slice(h,p-h).fetch(function(b){try{return c=tm(b,f.maxv.block-f.minv.block+1),d()}catch(v){return r(null,v)}})}}try{d()}catch(f){r(null,f)}};Bu.prototype.readRecords=function(e,t,n,r,i,o){e:for(;;){for(var a="";t<e.length;){var s=e[t++];if(s==10){var l=a.split(" ");if(l[this.colSeq-1]==o){var u=parseInt(l[this.colStart-1]),c=u;this.colEnd>0&&(c=parseInt(l[this.colEnd-1])),this.format&65536&&++u,u<=i&&c>=r&&n.push(a)}continue e}else a+=String.fromCharCode(s)}return}};Bu.prototype.fetchHeader=function(e,t){var n={metaOnly:!0,skipped:!1,nLines:0};t=t||n,Object.keys(n).forEach(function(i){t.hasOwnProperty(i)||(t[i]=n[i])});var r=this;r.data.slice(0,r.headerMax).fetch(function(i){if(!i)return e(null,"Fetch failed");for(var o=new Uint8Array(tm(i,i.byteLength)),a=0,s="",l=[];a<o.length;){var u=o[a++];if(u==10)if(t.metaOnly&&s.charCodeAt(0)==r.meta||t.skipped&&l.length<r.skip||t.nLines&&l.length<t.nLines)l.push(s),s="";else return e(l);else s+=String.fromCharCode(u)}e(l)})};function lZ(e,t){return new Promise(function(n,r){sZ(new bi(e),new bi(t),function(i,o){o?r(o):n(i)})})}function _4(e){const t=e.Adapters.get("BaseLZAdapter");class n extends t{constructor(i){if(super(i),!i.parser_func||!(i.url_data||i.reader))throw new Error("Tabix source is missing required configuration options");if(this.parser=i.parser_func,this.url_data=i.url_data,this.url_tbi=i.url_tbi||`${this.url_data}.tbi`,this._overfetch=i.overfetch||0,this._overfetch<0||this._overfetch>1)throw new Error("Overfetch must be specified as a fraction (0-1) of the requested region size");this.url_data?this._reader_promise=lZ(this.url_data,this.url_tbi).catch(function(){throw new Error("Failed to create a tabix reader from the provided URL")}):this._reader_promise=Promise.resolve(i.reader)}_performRequest(i){return new Promise((o,a)=>{const s=i.start,l=i.end,u=this._overfetch*(l-s),c=i.start-u,d=i.end+u;this._reader_promise.then(f=>{f.fetch(i.chr,c,d,function(h,p){p&&a(new Error("Could not read requested region. This may indicate an error with the .tbi index.")),o(h)})})})}_normalizeResponse(i){return i.map(this.parser)}}e.Adapters.add("TabixUrlSource",n)}typeof LocusZoom<"u"&&LocusZoom.use(_4);const Oi=new Set(["",".","NA","N/A","n/a","nan","-nan","NaN","-NaN","null","NULL","None",null]),uZ=/([\d.-]+)([\sxeE]*)([0-9-]*)/;function Yt(e){return Number.isInteger(e)}function cZ(e){return e.replace(/^chr/g,"").toUpperCase()}function fZ(e,t=!1){if(e===null)return e;const n=+e;if(t)return n;if(n<0||n>1)throw new Error("p value is not in the allowed range");if(n===0){if(e==="0")return 1/0;let[,r,,i]=e.match(uZ);return r=+r,i!==""?i=+i:i=0,r===0?1/0:-(Math.log10(+r)+ +i)}return-Math.log10(n)}function dZ({freq:e,allele_count:t,n_samples:n,is_alt_effect:r=!0}){if(e!==void 0&&t!==void 0)throw new Error("Frequency and allele count options are mutually exclusive");let i;if(e===void 0&&(Oi.has(t)||Oi.has(n)))return null;if(e===void 0&&t!==void 0)i=+t/+n/2;else{if(Oi.has(e))return null;i=+e}if(i<0||i>1)throw new Error("Allele frequency is not in the allowed range");return r?i:1-i}function hZ({marker_col:e,chrom_col:t,pos_col:n,ref_col:r,alt_col:i,pvalue_col:o,is_neg_log_pvalue:a=!1,rsid_col:s,beta_col:l,stderr_beta_col:u,allele_freq_col:c,allele_count_col:d,n_samples_col:f,is_alt_effect:h=!0,delimiter:p=" "}){if(Yt(e)&&Yt(t)&&Yt(n))throw new Error("Must specify either marker OR chr + pos");if(!(Yt(e)||Yt(t)&&Yt(n)))throw new Error("Must specify how to locate marker");if(Yt(d)&&Yt(c))throw new Error("Allele count and frequency options are mutually exclusive");if(Yt(d)&&!Yt(f))throw new Error("To calculate allele frequency from counts, you must also provide n_samples");return g=>{const b=g.split(p);let v,x,y,_,S=null,$,w=null,T=null,M=null,P,R;if(Yt(e))[v,x,y,_]=I5(b[e-1],!1);else if(Yt(t)&&Yt(n))v=b[t-1],x=b[n-1];else throw new Error("Must specify all fields required to identify the variant");if(v=cZ(v),v.startsWith("RS"))throw new Error(`Invalid chromosome specified: value "${v}" is an rsID`);Yt(r)&&(y=b[r-1]),Yt(i)&&(_=b[i-1]),Yt(s)&&(S=b[s-1]),Oi.has(y)&&(y=null),Oi.has(_)&&(_=null),Oi.has(S)?S=null:S&&(S=S.toLowerCase(),S.startsWith("rs")||(S=`rs${S}`));const C=fZ(b[o-1],a);y=y||null,_=_||null,Yt(c)&&($=b[c-1]),Yt(d)&&(P=b[d-1],R=b[f-1]),Yt(l)&&(w=b[l-1],w=Oi.has(w)?null:+w),Yt(u)&&(T=b[u-1],T=Oi.has(T)?null:+T),(c||d)&&(M=dZ({freq:$,allele_count:P,n_samples:R,is_alt_effect:h}));const E=y&&_?`_${y}/${_}`:"";return{chromosome:v,position:+x,ref_allele:y?y.toUpperCase():null,alt_allele:_?_.toUpperCase():null,variant:`${v}:${x}${E}`,rsid:S,log_pvalue:C,beta:w,stderr_beta:T,alt_allele_freq:M}}}function pZ(e){if(e.Adapters.has("TabixUrlSource")){const t=e.Adapters.get("TabixUrlSource"),n=e.Adapters.get("LDServer");class r extends t{constructor(o){o.limit_fields||(o.limit_fields=["variant2","position2","correlation"]),super(o)}_buildRequestOptions(o,a){if(!a)throw new Error("LD request must depend on association data");const s=super._buildRequestOptions(...arguments);return a.length?(s.ld_refvar=n.prototype.__find_ld_refvar(o,a),s):(s._skip_request=!0,s)}_performRequest(o){return o._skip_request?Promise.resolve([]):super._performRequest(o)}_annotateRecords(o,a){return o.filter(s=>s.variant1===a.ld_refvar)}}e.Adapters.add("UserTabixLD",r)}}typeof LocusZoom<"u"&&LocusZoom.use(pZ);function gZ(e){return`?${Object.keys(e).map(function(t){return`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`}).join("&")}`}function x4(e){const t={};if(e){const n=(e[0]==="?"?e.substr(1):e).split("&");for(let r=0;r<n.length;r++){const i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}}return t}function w4(e,t,n){n=n||!1;const r={};let i=t;return n&&(i={},Object.keys(t).forEach(function(o){i[t[o]]=o})),Object.keys(i).forEach(function(o){const a=i[o];Object.prototype.hasOwnProperty.call(e,o)&&(r[a]=e[o])}),r}function vZ(e,t){e.applyState(t)}function bZ(e,t){return w4(e.state,t)}function mZ(e,t){t=t||window.location.search;const n=x4(t);return w4(n,e,!0)}function yZ(e,t,n){n=n||vZ;const r=function(i){const o=mZ(t);n(e,o)};return window.addEventListener("popstate",r),e.trackExternalListener(window,"popstate",r),r}function _Z(e,t,n){n=n||bZ;const r=function(i){const o=x4(window.location.search),a=n(e,t,i),s=Object.assign({},o,a);if(Object.keys(s).some(function(u){return o[u]!=s[u]})){const u=gZ(s);Object.keys(o).length?history.pushState({},document.title,u):history.replaceState({},document.title,u)}};return e.on("state_changed",r),r}const xZ=ot("div",{id:"lz-plot",class:"h-100"},null,-1),wZ={key:0,class:"mt-4 p-3 border bg-red-100 text-red-700 text-sm text-center rounded"},Ex="#E30A17",CZ=1e7,Ax=40,SZ={__name:"Plugin",props:{datasetId:String,datasetUrl:String,root:String,settings:Object,specs:Object,tracks:Array},setup(e){Fi.use(_4),window.nowrap=!1,window.mode=!1;const t=e,n=ne("");function r(){var w;const i=(w=t.settings.tabix)==null?void 0:w.id,o=t.settings.chromosome,a=t.settings.start,s=t.settings.end,l=t.settings.chrom_col,u=t.settings.pos_col,c=t.settings.ref_col,d=t.settings.alt_col,f=t.settings.pvalue_col,h=t.settings.is_neg_log_pvalue,p=t.settings.beta_col,g=t.settings.stderr_beta_col;if(s-a>CZ){n.value="We cannot output more than 10Mb at a time!";return}if(s<=a){n.value="Invalid input: End position must be bigger than start position!";return}n.value="";const b=hZ({chrom_col:l,pos_col:u,ref_col:c,alt_col:d,pvalue_col:f,is_neg_log_pvalue:h,beta_col:p,stderr_beta_col:g});let v=new Fi.DataSources().add("assoc",["TabixUrlSource",{url_data:`${t.root}api/datasets/${t.datasetId}/display`,url_tbi:`${t.root}api/datasets/${i}/display`,parser_func:b,overfetch:0}]),x={chr:"chrom",start:"start",end:"end",ldrefvar:"ld_variant"},y={id:"associationpvalues_",name:"association",point_shape:"circle",point_size:Ax,color:Ex,legend:[{shape:"circle",color:Ex,size:Ax,label:"phen",class:"lz-data_layer-scatter"}],tooltip:{closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>phen</strong><br><strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2019
2019
|
P Value: <strong>{{assoc:log_pvalue|logtoscinotation|htmlescape}}</strong><br>
|
|
2020
|
-
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>`}};const _={...Fi.Layouts.get("data_layer","association_pvalues",y),namespace:{assoc:"assoc"},data_operations:[]},S=Fi.Layouts.get("panel","association",{data_layers:[_]});let $=Fi.populate("#lz-plot",v,{state:{chr:o,start:a,end:s},responsive_resize:!0,panels:[S],toolbar:Fi.Layouts.get("toolbar","standard_plot")});_Z($,x),yZ($,x),document.querySelector("#lz-plot_svg").style.height="calc(100vh - 50px)"}return
|
|
2020
|
+
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>`}};const _={...Fi.Layouts.get("data_layer","association_pvalues",y),namespace:{assoc:"assoc"},data_operations:[]},S=Fi.Layouts.get("panel","association",{data_layers:[_]});let $=Fi.populate("#lz-plot",v,{state:{chr:o,start:a,end:s},responsive_resize:!0,panels:[S],toolbar:Fi.Layouts.get("toolbar","standard_plot")});_Z($,x),yZ($,x),document.querySelector("#lz-plot_svg").style.height="calc(100vh - 50px)"}return dn(()=>{r()}),vt(()=>t,()=>{r()},{deep:!0}),(i,o)=>(We(),wt(kt,null,[xZ,n.value?(We(),wt("div",wZ,di(n.value),1)):Xn("",!0)],64))}},$Z=Fe({__name:"App",props:{container:{},credentials:{},incoming:{}},setup(e){return(t,n)=>(We(),It(qe(KI),{container:t.container,credentials:t.credentials,incoming:t.incoming},{default:mt(({datasetId:r,datasetUrl:i,root:o,settings:a,specs:s,tracks:l})=>[Ge(SZ,{"dataset-id":r,"dataset-url":i,root:o,settings:a,specs:s,tracks:l},null,8,["dataset-id","dataset-url","root","settings","specs","tracks"])]),_:1},8,["container","credentials","incoming"]))}});async function kZ(){const t=new URL(import.meta.url).searchParams.get("container")||"app";M7({render:()=>k($Z,{container:t,credentials:"include"})}).mount(`#${t}`)}kZ();
|