@oneclick.dev/cms-core-modules 0.0.65 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContentEditor-DKFCmfOs.js → ContentEditor-BhWqzASE.js} +25 -25
- package/dist/{ContentEditor-owdOIage.mjs → ContentEditor-Co4Qh5nc.mjs} +1575 -1542
- package/dist/{Create-Cf7pvh5G.mjs → Create-Lnus48i-.mjs} +1 -1
- package/dist/{Create-Bh4g6QW4.js → Create-Up0iauPG.js} +1 -1
- package/dist/{DateFormatter-DsmlAuYV.mjs → DateFormatter-CxPCk9KT.mjs} +268 -400
- package/dist/DateFormatter-DKlDa1Jq.js +1 -0
- package/dist/{Detail-CtbWzq-R.js → Detail-BPSuxN2J.js} +1 -1
- package/dist/{Detail-D10shmpK.mjs → Detail-Bz2rvLw7.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-DkgDWC2i.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-CZmLnut_.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-DRVxQswt.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-DMnulmdl.js} +1 -1
- package/dist/TableView-BGvNdnpI.js +329 -0
- package/dist/{TableView-DNJ2VrSj.mjs → TableView-DSVM0B47.mjs} +36846 -35345
- package/dist/{agenda-DFNJ8C1N.mjs → agenda-By_hEZ4I.mjs} +2 -2
- package/dist/{agenda-MjkwV63A.js → agenda-D4jdNRbI.js} +1 -1
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-BFchkR06.mjs → exceptions-B0kOmB-_.mjs} +1 -1
- package/dist/{exceptions-C-DPRNQa.js → exceptions-DGnziH-3.js} +1 -1
- package/dist/{index-X0L4AHBR.mjs → index--0-qy_7x.mjs} +1924 -1953
- package/dist/{index-CgfL8UKf-DUUg9HDA.mjs → index-CzoYAqKd-iAfM7ky8.mjs} +1178 -1239
- package/dist/index-CzoYAqKd-rheC_QgC.js +88 -0
- package/dist/index-DIg9ePkI.js +245 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +7 -7
- package/dist/src/content-manager/components/content-editor/tiptap-menus/element-editor-views/DividerMenu.vue.d.ts +13 -0
- package/dist/src/content-manager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +14 -0
- package/package.json +2 -2
- package/dist/DateFormatter-BPPBZp1j.js +0 -1
- package/dist/TableView-D4wKUDTd.js +0 -312
- package/dist/index-CgfL8UKf-DAN7RkzR.js +0 -88
- package/dist/index-DBDq-h4j.js +0 -245
package/dist/index-DBDq-h4j.js
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),Tt=require("@oneclick.dev/cms-kit"),dt=require("lucide-vue-next"),Hs=require("./EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js"),tn=require("./index-CgfL8UKf-DAN7RkzR.js"),Ws=require("./index-CxETuRsG.js"),Mi=require("./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js"),Ys=require("./NewReservationDialog.vue_vue_type_script_setup_true_lang-DRVxQswt.js");var kr="http://www.w3.org/1999/xhtml";const Di={svg:"http://www.w3.org/2000/svg",xhtml:kr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Di.hasOwnProperty(e)?{space:Di[e],local:t}:t}function Xs(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kr&&e.documentElement.namespaceURI===kr?e.createElement(t):e.createElementNS(n,t)}}function qs(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Qo(t){var e=jn(t);return(e.local?qs:Xs)(e)}function Gs(){}function qr(t){return t==null?Gs:function(){return this.querySelector(t)}}function js(t){typeof t!="function"&&(t=qr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),l,u,f=0;f<a;++f)(l=o[f])&&(u=t.call(l,l.__data__,f,o))&&("__data__"in l&&(u.__data__=l.__data__),s[f]=u);return new gt(r,this._parents)}function Zs(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Qs(){return[]}function Ko(t){return t==null?Qs:function(){return this.querySelectorAll(t)}}function Ks(t){return function(){return Zs(t.apply(this,arguments))}}function Js(t){typeof t=="function"?t=Ks(t):t=Ko(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(t.call(l,l.__data__,u,a)),i.push(l));return new gt(r,i)}function Jo(t){return function(){return this.matches(t)}}function ta(t){return function(e){return e.matches(t)}}var tc=Array.prototype.find;function ec(t){return function(){return tc.call(this.children,t)}}function nc(){return this.firstElementChild}function rc(t){return this.select(t==null?nc:ec(typeof t=="function"?t:ta(t)))}var ic=Array.prototype.filter;function oc(){return Array.from(this.children)}function ac(t){return function(){return ic.call(this.children,t)}}function sc(t){return this.selectAll(t==null?oc:ac(typeof t=="function"?t:ta(t)))}function cc(t){typeof t!="function"&&(t=Jo(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new gt(r,this._parents)}function ea(t){return new Array(t.length)}function lc(){return new gt(this._enter||this._groups.map(ea),this._parents)}function Mn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Mn.prototype={constructor:Mn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function uc(t){return function(){return t}}function fc(t,e,n,r,i,o){for(var a=0,s,l=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Mn(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function dc(t,e,n,r,i,o,a){var s,l,u=new Map,f=e.length,d=o.length,h=new Array(f),g;for(s=0;s<f;++s)(l=e[s])&&(h[s]=g=a.call(l,l.__data__,s,e)+"",u.has(g)?i[s]=l:u.set(g,l));for(s=0;s<d;++s)g=a.call(t,o[s],s,o)+"",(l=u.get(g))?(r[s]=l,l.__data__=o[s],u.delete(g)):n[s]=new Mn(t,o[s]);for(s=0;s<f;++s)(l=e[s])&&u.get(h[s])===l&&(i[s]=l)}function hc(t){return t.__data__}function gc(t,e){if(!arguments.length)return Array.from(this,hc);var n=e?dc:fc,r=this._parents,i=this._groups;typeof t!="function"&&(t=uc(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var f=r[u],d=i[u],h=d.length,g=pc(t.call(f,f&&f.__data__,u,r)),m=g.length,p=s[u]=new Array(m),_=a[u]=new Array(m),k=l[u]=new Array(h);n(f,d,p,_,k,g,e);for(var x=0,C=0,w,b;x<m;++x)if(w=p[x]){for(x>=C&&(C=x+1);!(b=_[C])&&++C<m;);w._next=b||null}}return a=new gt(a,r),a._enter=s,a._exit=l,a}function pc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function mc(){return new gt(this._exit||this._groups.map(ea),this._parents)}function vc(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function yc(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],f=r[l],d=u.length,h=s[l]=new Array(d),g,m=0;m<d;++m)(g=u[m]||f[m])&&(h[m]=g);for(;l<i;++l)s[l]=n[l];return new gt(s,this._parents)}function xc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],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 _c(t){t||(t=wc);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}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,f=0;f<s;++f)(u=a[f])&&(l[f]=u);l.sort(e)}return new gt(i,this._parents).order()}function wc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function bc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function kc(){return Array.from(this)}function Cc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Sc(){let t=0;for(const e of this)++t;return t}function Tc(){return!this.node()}function Mc(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Dc(t){return function(){this.removeAttribute(t)}}function Ac(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ec(t,e){return function(){this.setAttribute(t,e)}}function Nc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function $c(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Rc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Bc(t,e){var n=jn(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Ac:Dc:typeof e=="function"?n.local?Rc:$c:n.local?Nc:Ec)(n,e))}function na(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Vc(t){return function(){this.style.removeProperty(t)}}function Oc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Fc(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ic(t,e,n){return arguments.length>1?this.each((e==null?Vc:typeof e=="function"?Fc:Oc)(t,e,n??"")):de(this.node(),t)}function de(t,e){return t.style.getPropertyValue(e)||na(t).getComputedStyle(t,null).getPropertyValue(e)}function zc(t){return function(){delete this[t]}}function Pc(t,e){return function(){this[t]=e}}function Lc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Uc(t,e){return arguments.length>1?this.each((e==null?zc:typeof e=="function"?Lc:Pc)(t,e)):this.node()[t]}function ra(t){return t.trim().split(/^|\s+/)}function Gr(t){return t.classList||new ia(t)}function ia(t){this._node=t,this._names=ra(t.getAttribute("class")||"")}ia.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function oa(t,e){for(var n=Gr(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function aa(t,e){for(var n=Gr(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Hc(t){return function(){oa(this,t)}}function Wc(t){return function(){aa(this,t)}}function Yc(t,e){return function(){(e.apply(this,arguments)?oa:aa)(this,t)}}function Xc(t,e){var n=ra(t+"");if(arguments.length<2){for(var r=Gr(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Yc:e?Hc:Wc)(n,e))}function qc(){this.textContent=""}function Gc(t){return function(){this.textContent=t}}function jc(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Zc(t){return arguments.length?this.each(t==null?qc:(typeof t=="function"?jc:Gc)(t)):this.node().textContent}function Qc(){this.innerHTML=""}function Kc(t){return function(){this.innerHTML=t}}function Jc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function tl(t){return arguments.length?this.each(t==null?Qc:(typeof t=="function"?Jc:Kc)(t)):this.node().innerHTML}function el(){this.nextSibling&&this.parentNode.appendChild(this)}function nl(){return this.each(el)}function rl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function il(){return this.each(rl)}function ol(t){var e=typeof t=="function"?t:Qo(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function al(){return null}function sl(t,e){var n=typeof t=="function"?t:Qo(t),r=e==null?al:typeof e=="function"?e:qr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function cl(){var t=this.parentNode;t&&t.removeChild(this)}function ll(){return this.each(cl)}function ul(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fl(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function dl(t){return this.select(t?fl:ul)}function hl(t){return arguments.length?this.property("__data__",t):this.node().__data__}function gl(t){return function(e){t.call(this,e,this.__data__)}}function pl(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function ml(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function vl(t,e,n){return function(){var r=this.__on,i,o=gl(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function yl(t,e,n){var r=pl(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,f;l<u;++l)for(i=0,f=s[l];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?vl:ml,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function sa(t,e,n){var r=na(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function xl(t,e){return function(){return sa(this,t,e)}}function _l(t,e){return function(){return sa(this,t,e.apply(this,arguments))}}function wl(t,e){return this.each((typeof e=="function"?_l:xl)(t,e))}function*bl(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var ca=[null];function gt(t,e){this._groups=t,this._parents=e}function Ye(){return new gt([[document.documentElement]],ca)}function kl(){return this}gt.prototype=Ye.prototype={constructor:gt,select:js,selectAll:Js,selectChild:rc,selectChildren:sc,filter:cc,data:gc,enter:lc,exit:mc,join:vc,merge:yc,selection:kl,order:xc,sort:_c,call:bc,nodes:kc,node:Cc,size:Sc,empty:Tc,each:Mc,attr:Bc,style:Ic,property:Uc,classed:Xc,text:Zc,html:tl,raise:nl,lower:il,append:ol,insert:sl,remove:ll,clone:dl,datum:hl,on:yl,dispatch:wl,[Symbol.iterator]:bl};function Ot(t){return typeof t=="string"?new gt([[document.querySelector(t)]],[document.documentElement]):new gt([[t]],ca)}function Cl(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Dn(t,e){if(t=Cl(t),e===void 0&&(e=t.currentTarget),e){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]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var $e;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})($e||($e={}));var he;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(he||(he={}));function Re(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Sl(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jr(t){let e,n,r;t.length!==2?(e=Re,n=(s,l)=>Re(t(s),l),r=(s,l)=>t(s)-l):(e=t===Re||t===Sl?t:Tl,n=t,r=t);function i(s,l,u=0,f=s.length){if(u<f){if(e(l,l)!==0)return f;do{const d=u+f>>>1;n(s[d],l)<0?u=d+1:f=d}while(u<f)}return u}function o(s,l,u=0,f=s.length){if(u<f){if(e(l,l)!==0)return f;do{const d=u+f>>>1;n(s[d],l)<=0?u=d+1:f=d}while(u<f)}return u}function a(s,l,u=0,f=s.length){const d=i(s,l,u,f-1);return d>u&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function Tl(){return 0}function la(t){return t===null?NaN:+t}const ua=jr(Re),Xe=ua.right,Ml=ua.left;jr(la).center;function Dl(t,e){let n,r;for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class Ai extends Map{constructor(e,n=Nl){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Ei(this,e))}has(e){return super.has(Ei(this,e))}set(e,n){return super.set(Al(this,e),n)}delete(e){return super.delete(El(this,e))}}function Ei({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Al({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function El({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Nl(t){return t!==null&&typeof t=="object"?t.valueOf():t}const $l=Math.sqrt(50),Rl=Math.sqrt(10),Bl=Math.sqrt(2);function An(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=$l?10:o>=Rl?5:o>=Bl?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/u<t&&++s,l/u>e&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*u<t&&++s,l*u>e&&--l),l<s&&.5<=n&&n<2?An(t,e,n*2):[s,l,u]}function Cr(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?An(e,t,n):An(t,e,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function Sr(t,e,n){return e=+e,t=+t,n=+n,An(t,e,n)[2]}function Tr(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Sr(e,t,n):Sr(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Mr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Be(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Vl(t,e,n=la){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function*Ol(t){for(const e of t)yield*e}function Fl(t){return Array.from(Ol(t))}function fa(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Il(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function zl(t,e,n){var r={},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,l=r.debounceMode,u=l===void 0?void 0:l,f,d=!1,h=0;function g(){f&&clearTimeout(f)}function m(_){var k=_||{},x=k.upcomingOnly,C=x===void 0?!1:x;g(),d=!C}function p(){for(var _=arguments.length,k=new Array(_),x=0;x<_;x++)k[x]=arguments[x];var C=this,w=Date.now()-h;if(d)return;function b(){h=Date.now(),e.apply(C,k)}function v(){f=void 0}!s&&u&&!f&&b(),g(),u===void 0&&w>t?s?(h=Date.now(),o||(f=setTimeout(u?v:b,t))):b():o!==!0&&(f=setTimeout(u?v:b,u===void 0?t-w:t))}return p.cancel=m,p}var $t;(function(t){t.Left="left",t.Right="right",t.Auto="auto"})($t||($t={}));const Yt=t=>typeof t=="number",Zr=t=>typeof t=="function",qe=t=>Array.isArray(t),Pl=t=>t instanceof Object,En=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",Ni=t=>Pl(t)&&!qe(t)&&!Zr(t)&&!En(t),Ll=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,te=(t,e,n=[],r=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(r.has(t))return!0;r.add(t);for(let i=0;i<t.length;i++)if(!te(t[i],e[i],n,r))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const i=Object.keys(t).filter(a=>!n.includes(a)),o=Object.keys(e).filter(a=>!n.includes(a));if(i.length!==o.length)return!1;if(r.has(t))return!0;r.add(t);for(const a of i)if(!te(t[a],e[a],n,r))return!1;return!0}return t===e},Dr=t=>t.flat(),Nn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const r of t)n.push(e.has(r)?e.get(r):Nn(r,e));return n}if(En(t))return t;if(t instanceof Object){const n={};e.set(t,n);const r=t;return Object.keys(t).reduce((i,o)=>(i[o]=e.has(r[o])?e.get(r[o]):Nn(r[o],e),i),n),n}return t},ge=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const r=En(t)?t:Nn(t);return n.has(e)?n.get(e):(n.set(e,r),Object.keys(e).forEach(i=>{i==="__proto__"||i==="constructor"||(Ni(t[i])&&Ni(e[i])?r[i]=ge(t[i],e[i],n):En(e)?r[i]=e:r[i]=Nn(e[i]))}),r)},$n=(t,e,n)=>zl(e,t);function da(t,e,n){return Zr(e)?e(t,n):e}function Ar(t,e,n){return da(t,e,n)}function et(t,e,n){return da(t,e,n)}function be(t){return t.filter(e=>e&&!Yt(e))}function Rt(t,e,n){return Math.min(Math.max(t,e),n)}function Ul(t,e,...n){const r=[];let i=0,o=0;for(const a of n){const s=et(t,a,e)||0;s>=0?r.push(i+=s):r.push(o+=s)}return r}function ha(t,...e){return t?Be(t,(r,i)=>Be(e,o=>et(r,o,i))):void 0}function ga(t,...e){return t?Mr(t,(r,i)=>Mr(e,o=>et(r,o,i))):void 0}function fn(t,...e){return[ha(t,...e),ga(t,...e)]}function Rn(t,e,n,r=$t.Auto){if(t.length<=1)return t[0];const o=t.map((l,u)=>[l,u]).sort(([l,u],[f,d])=>et(l,n,u)-et(f,n,d)),a=o.map(([l,u])=>et(l,n,u)),s=r===$t.Right?Ml(a,e,0,t.length-1):Xe(a,e,1,t.length);return r===$t.Right?o[s][0]:r===$t.Left?o[s-1][0]:e-a[s-1]>a[s]-e?o[s][0]:o[s-1][0]}function Hl(t,e,n,r=!1){if(!n)return[];const i=t.filter((o,a)=>{const s=et(o,n,a);return s>=e[0]&&s<=e[1]});if(r){if(i.length===0){const d=Rn(t,e[0],n,$t.Left),h=Rn(t,e[1],n,$t.Right);return[d,h].filter(Boolean)}const o=i[0],a=i[i.length-1],s=t.findIndex(d=>d===o),l=t.findIndex(d=>d===a),u=Math.max(0,s-1),f=Math.min(t.length-1,l+1);return t.slice(u,f+1)}return i}var Zt=[],Wl=function(){return Zt.some(function(t){return t.activeTargets.length>0})},Yl=function(){return Zt.some(function(t){return t.skippedTargets.length>0})},$i="ResizeObserver loop completed with undelivered notifications.",Xl=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:$i}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=$i),window.dispatchEvent(t)},Fe;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Fe||(Fe={}));var Qt=function(t){return Object.freeze(t)},ql=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Qt(this)}return t})(),pa=(function(){function t(e,n,r,i){return this.x=e,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,Qt(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,a=e.bottom,s=e.left,l=e.width,u=e.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:l,height:u}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),Qr=function(t){return t instanceof SVGElement&&"getBBox"in t},ma=function(t){if(Qr(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||t.getClientRects().length)},Ri=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Gl=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ve=typeof window<"u"?window:{},en=new WeakMap,Bi=/auto|scroll/,jl=/^tb|vertical/,Zl=/msie|trident/i.test(Ve.navigator&&Ve.navigator.userAgent),Ct=function(t){return parseFloat(t||"0")},le=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new ql((n?e:t)||0,(n?t:e)||0)},Vi=Qt({devicePixelContentBoxSize:le(),borderBoxSize:le(),contentBoxSize:le(),contentRect:new pa(0,0,0,0)}),va=function(t,e){if(e===void 0&&(e=!1),en.has(t)&&!e)return en.get(t);if(ma(t))return en.set(t,Vi),Vi;var n=getComputedStyle(t),r=Qr(t)&&t.ownerSVGElement&&t.getBBox(),i=!Zl&&n.boxSizing==="border-box",o=jl.test(n.writingMode||""),a=!r&&Bi.test(n.overflowY||""),s=!r&&Bi.test(n.overflowX||""),l=r?0:Ct(n.paddingTop),u=r?0:Ct(n.paddingRight),f=r?0:Ct(n.paddingBottom),d=r?0:Ct(n.paddingLeft),h=r?0:Ct(n.borderTopWidth),g=r?0:Ct(n.borderRightWidth),m=r?0:Ct(n.borderBottomWidth),p=r?0:Ct(n.borderLeftWidth),_=d+u,k=l+f,x=p+g,C=h+m,w=s?t.offsetHeight-C-t.clientHeight:0,b=a?t.offsetWidth-x-t.clientWidth:0,v=i?_+x:0,y=i?k+C:0,N=r?r.width:Ct(n.width)-v-b,E=r?r.height:Ct(n.height)-y-w,R=N+_+b+x,V=E+k+w+C,M=Qt({devicePixelContentBoxSize:le(Math.round(N*devicePixelRatio),Math.round(E*devicePixelRatio),o),borderBoxSize:le(R,V,o),contentBoxSize:le(N,E,o),contentRect:new pa(d,l,N,E)});return en.set(t,M),M},ya=function(t,e,n){var r=va(t,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(e){case Fe.DEVICE_PIXEL_CONTENT_BOX:return a;case Fe.BORDER_BOX:return i;default:return o}},Ql=(function(){function t(e){var n=va(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Qt([n.borderBoxSize]),this.contentBoxSize=Qt([n.contentBoxSize]),this.devicePixelContentBoxSize=Qt([n.devicePixelContentBoxSize])}return t})(),xa=function(t){if(ma(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Kl=function(){var t=1/0,e=[];Zt.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var f=new Ql(u.target),d=xa(u.target);s.push(f),u.lastReportedSize=ya(u.target,u.observedBox),d<t&&(t=d)}),e.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Oi=function(t){Zt.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(xa(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Jl=function(){var t=0;for(Oi(t);Wl();)t=Kl(),Oi(t);return Yl()&&Xl(),t>0},ur,_a=[],tu=function(){return _a.splice(0).forEach(function(t){return t()})},eu=function(t){if(!ur){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return tu()}).observe(n,r),ur=function(){n.textContent="".concat(e?e--:e++)}}_a.push(t),ur()},nu=function(t){eu(function(){requestAnimationFrame(t)})},dn=0,ru=function(){return!!dn},iu=250,ou={attributes:!0,characterData:!0,childList:!0,subtree:!0},Fi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ii=function(t){return t===void 0&&(t=0),Date.now()+t},fr=!1,au=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=iu),!fr){fr=!0;var r=Ii(e);nu(function(){var i=!1;try{i=Jl()}finally{if(fr=!1,e=r-Ii(),!ru())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,ou)};document.body?n():Ve.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Fi.forEach(function(n){return Ve.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Fi.forEach(function(n){return Ve.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),Er=new au,zi=function(t){!dn&&t>0&&Er.start(),dn+=t,!dn&&Er.stop()},su=function(t){return!Qr(t)&&!Gl(t)&&getComputedStyle(t).display==="inline"},cu=(function(){function t(e,n){this.target=e,this.observedBox=n||Fe.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=ya(this.target,this.observedBox,!0);return su(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),lu=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),nn=new WeakMap,Pi=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},rn=(function(){function t(){}return t.connect=function(e,n){var r=new lu(e,n);nn.set(e,r)},t.observe=function(e,n,r){var i=nn.get(e),o=i.observationTargets.length===0;Pi(i.observationTargets,n)<0&&(o&&Zt.push(i),i.observationTargets.push(new cu(n,r&&r.box)),zi(1),Er.schedule())},t.unobserve=function(e,n){var r=nn.get(e),i=Pi(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Zt.splice(Zt.indexOf(r),1),r.observationTargets.splice(i,1),zi(-1))},t.disconnect=function(e){var n=this,r=nn.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t})(),uu=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");rn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ri(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");rn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ri(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");rn.unobserve(this,e)},t.prototype.disconnect=function(){rn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const fu=globalThis.ResizeObserver||uu,wa={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:he.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class Ie{constructor(e){this._defaultConfig=wa,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=Ot(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Ie.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=ge(this._defaultConfig,e),e?.svgDefs!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;Ot(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,r=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",r),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||Ie.DEFAULT_CONTAINER_HEIGHT}get width(){return Rt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return Rt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===he.Fit||e.sizing===he.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new fu((n,r)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const i=this._container.getBoundingClientRect(),o={width:i.width,height:i.height};!te(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}Ie.DEFAULT_CONTAINER_HEIGHT=300;function du(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function hu(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var gu=(function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(hu(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=du(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},t})(),it="-ms-",Bn="-moz-",W="-webkit-",ba="comm",Kr="rule",Jr="decl",pu="@import",ka="@keyframes",mu="@layer",vu=Math.abs,Zn=String.fromCharCode,yu=Object.assign;function xu(t,e){return rt(t,0)^45?(((e<<2^rt(t,0))<<2^rt(t,1))<<2^rt(t,2))<<2^rt(t,3):0}function Ca(t){return t.trim()}function _u(t,e){return(t=e.exec(t))?t[0]:t}function Y(t,e,n){return t.replace(e,n)}function Nr(t,e){return t.indexOf(e)}function rt(t,e){return t.charCodeAt(e)|0}function ze(t,e,n){return t.slice(e,n)}function St(t){return t.length}function ti(t){return t.length}function on(t,e){return e.push(t),t}function wu(t,e){return t.map(e).join("")}var Qn=1,pe=1,Sa=0,lt=0,K=0,_e="";function Kn(t,e,n,r,i,o,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Qn,column:pe,length:a,return:""}}function ke(t,e){return yu(Kn("",null,null,"",null,null,0),t,{length:-t.length},e)}function bu(){return K}function ku(){return K=lt>0?rt(_e,--lt):0,pe--,K===10&&(pe=1,Qn--),K}function ht(){return K=lt<Sa?rt(_e,lt++):0,pe++,K===10&&(pe=1,Qn++),K}function Mt(){return rt(_e,lt)}function hn(){return lt}function Ge(t,e){return ze(_e,t,e)}function Pe(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ta(t){return Qn=pe=1,Sa=St(_e=t),lt=0,[]}function Ma(t){return _e="",t}function gn(t){return Ca(Ge(lt-1,$r(t===91?t+2:t===40?t+1:t)))}function Cu(t){for(;(K=Mt())&&K<33;)ht();return Pe(t)>2||Pe(K)>3?"":" "}function Su(t,e){for(;--e&&ht()&&!(K<48||K>102||K>57&&K<65||K>70&&K<97););return Ge(t,hn()+(e<6&&Mt()==32&&ht()==32))}function $r(t){for(;ht();)switch(K){case t:return lt;case 34:case 39:t!==34&&t!==39&&$r(K);break;case 40:t===41&&$r(t);break;case 92:ht();break}return lt}function Tu(t,e){for(;ht()&&t+K!==57;)if(t+K===84&&Mt()===47)break;return"/*"+Ge(e,lt-1)+"*"+Zn(t===47?t:ht())}function Mu(t){for(;!Pe(Mt());)ht();return Ge(t,lt)}function Du(t){return Ma(pn("",null,null,null,[""],t=Ta(t),0,[0],t))}function pn(t,e,n,r,i,o,a,s,l){for(var u=0,f=0,d=a,h=0,g=0,m=0,p=1,_=1,k=1,x=0,C="",w=i,b=o,v=r,y=C;_;)switch(m=x,x=ht()){case 40:if(m!=108&&rt(y,d-1)==58){Nr(y+=Y(gn(x),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:y+=gn(x);break;case 9:case 10:case 13:case 32:y+=Cu(m);break;case 92:y+=Su(hn()-1,7);continue;case 47:switch(Mt()){case 42:case 47:on(Au(Tu(ht(),hn()),e,n),l);break;default:y+="/"}break;case 123*p:s[u++]=St(y)*k;case 125*p:case 59:case 0:switch(x){case 0:case 125:_=0;case 59+f:k==-1&&(y=Y(y,/\f/g,"")),g>0&&St(y)-d&&on(g>32?Ui(y+";",r,n,d-1):Ui(Y(y," ","")+";",r,n,d-2),l);break;case 59:y+=";";default:if(on(v=Li(y,e,n,u,f,i,s,C,w=[],b=[],d),o),x===123)if(f===0)pn(y,e,v,v,w,o,d,s,b);else switch(h===99&&rt(y,3)===110?100:h){case 100:case 108:case 109:case 115:pn(t,v,v,r&&on(Li(t,v,v,0,0,i,s,C,i,w=[],d),b),i,b,d,s,r?w:b);break;default:pn(y,v,v,v,[""],b,0,s,b)}}u=f=g=0,p=k=1,C=y="",d=a;break;case 58:d=1+St(y),g=m;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&ku()==125)continue}switch(y+=Zn(x),x*p){case 38:k=f>0?1:(y+="\f",-1);break;case 44:s[u++]=(St(y)-1)*k,k=1;break;case 64:Mt()===45&&(y+=gn(ht())),h=Mt(),f=d=St(C=y+=Mu(hn())),x++;break;case 45:m===45&&St(y)==2&&(p=0)}}return o}function Li(t,e,n,r,i,o,a,s,l,u,f){for(var d=i-1,h=i===0?o:[""],g=ti(h),m=0,p=0,_=0;m<r;++m)for(var k=0,x=ze(t,d+1,d=vu(p=a[m])),C=t;k<g;++k)(C=Ca(p>0?h[k]+" "+x:Y(x,/&\f/g,h[k])))&&(l[_++]=C);return Kn(t,e,n,i===0?Kr:s,l,u,f)}function Au(t,e,n){return Kn(t,e,n,ba,Zn(bu()),ze(t,2,-2),0)}function Ui(t,e,n,r){return Kn(t,e,n,Jr,ze(t,0,r),ze(t,r+1,-1),r)}function ue(t,e){for(var n="",r=ti(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function Eu(t,e,n,r){switch(t.type){case mu:if(t.children.length)break;case pu:case Jr:return t.return=t.return||t.value;case ba:return"";case ka:return t.return=t.value+"{"+ue(t.children,r)+"}";case Kr:t.value=t.props.join(",")}return St(n=ue(t.children,r))?t.return=t.value+"{"+n+"}":""}function Nu(t){var e=ti(t);return function(n,r,i,o){for(var a="",s=0;s<e;s++)a+=t[s](n,r,i,o)||"";return a}}function $u(t){return function(e){e.root||(e=e.return)&&t(e)}}function Ru(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Bu=function(e,n,r){for(var i=0,o=0;i=o,o=Mt(),i===38&&o===12&&(n[r]=1),!Pe(o);)ht();return Ge(e,lt)},Vu=function(e,n){var r=-1,i=44;do switch(Pe(i)){case 0:i===38&&Mt()===12&&(n[r]=1),e[r]+=Bu(lt-1,n,r);break;case 2:e[r]+=gn(i);break;case 4:if(i===44){e[++r]=Mt()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Zn(i)}while(i=ht());return e},Ou=function(e,n){return Ma(Vu(Ta(e),n))},Hi=new WeakMap,Fu=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Hi.get(r))&&!i){Hi.set(e,!0);for(var o=[],a=Ou(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var f=0;f<s.length;f++,u++)e.props[u]=o[l]?a[l].replace(/&\f/g,s[f]):s[f]+" "+a[l]}}},Iu=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function Da(t,e){switch(xu(t,e)){case 5103:return W+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return W+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return W+t+Bn+t+it+t+t;case 6828:case 4268:return W+t+it+t+t;case 6165:return W+t+it+"flex-"+t+t;case 5187:return W+t+Y(t,/(\w+).+(:[^]+)/,W+"box-$1$2"+it+"flex-$1$2")+t;case 5443:return W+t+it+"flex-item-"+Y(t,/flex-|-self/,"")+t;case 4675:return W+t+it+"flex-line-pack"+Y(t,/align-content|flex-|-self/,"")+t;case 5548:return W+t+it+Y(t,"shrink","negative")+t;case 5292:return W+t+it+Y(t,"basis","preferred-size")+t;case 6060:return W+"box-"+Y(t,"-grow","")+W+t+it+Y(t,"grow","positive")+t;case 4554:return W+Y(t,/([^-])(transform)/g,"$1"+W+"$2")+t;case 6187:return Y(Y(Y(t,/(zoom-|grab)/,W+"$1"),/(image-set)/,W+"$1"),t,"")+t;case 5495:case 3959:return Y(t,/(image-set\([^]*)/,W+"$1$`$1");case 4968:return Y(Y(t,/(.+:)(flex-)?(.*)/,W+"box-pack:$3"+it+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+W+t+t;case 4095:case 3583:case 4068:case 2532:return Y(t,/(.+)-inline(.+)/,W+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(St(t)-1-e>6)switch(rt(t,e+1)){case 109:if(rt(t,e+4)!==45)break;case 102:return Y(t,/(.+:)(.+)-([^]+)/,"$1"+W+"$2-$3$1"+Bn+(rt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Nr(t,"stretch")?Da(Y(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(rt(t,e+1)!==115)break;case 6444:switch(rt(t,St(t)-3-(~Nr(t,"!important")&&10))){case 107:return Y(t,":",":"+W)+t;case 101:return Y(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+W+(rt(t,14)===45?"inline-":"")+"box$3$1"+W+"$2$3$1"+it+"$2box$3")+t}break;case 5936:switch(rt(t,e+11)){case 114:return W+t+it+Y(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return W+t+it+Y(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return W+t+it+Y(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return W+t+it+t+t}return t}var zu=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case Jr:e.return=Da(e.value,e.length);break;case ka:return ue([ke(e,{value:Y(e.value,"@","@"+W)})],i);case Kr:if(e.length)return wu(e.props,function(o){switch(_u(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ue([ke(e,{props:[Y(o,/:(read-\w+)/,":"+Bn+"$1")]})],i);case"::placeholder":return ue([ke(e,{props:[Y(o,/:(plac\w+)/,":"+W+"input-$1")]}),ke(e,{props:[Y(o,/:(plac\w+)/,":"+Bn+"$1")]}),ke(e,{props:[Y(o,/:(plac\w+)/,it+"input-$1")]})],i)}return""})}},Pu=[zu],Lu=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var _=p.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var i=e.stylisPlugins||Pu,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var _=p.getAttribute("data-emotion").split(" "),k=1;k<_.length;k++)o[_[k]]=!0;s.push(p)});var l,u=[Fu,Iu];{var f,d=[Eu,$u(function(p){f.insert(p)})],h=Nu(u.concat(i,d)),g=function(_){return ue(Du(_),h)};l=function(_,k,x,C){f=x,g(_?_+"{"+k.styles+"}":k.styles),C&&(m.inserted[k.name]=!0)}}var m={key:n,sheet:new gu({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function Uu(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Hu={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Wu=/[A-Z]|^ms/g,Yu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Aa=function(e){return e.charCodeAt(1)===45},Wi=function(e){return e!=null&&typeof e!="boolean"},dr=Ru(function(t){return Aa(t)?t:t.replace(Wu,"-$&").toLowerCase()}),Yi=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Yu,function(r,i,o){return Ht={name:i,styles:o,next:Ht},i})}return Hu[e]!==1&&!Aa(e)&&typeof n=="number"&&n!==0?n+"px":n};function Vn(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Ht={name:i.name,styles:i.styles,next:Ht},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Ht={name:a.name,styles:a.styles,next:Ht},a=a.next;var s=o.styles+";";return s}return Xu(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function Xu(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Vn(t,e,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;e!=null&&e[s]!==void 0?r+=o+"{"+e[s]+"}":Wi(s)&&(r+=dr(o)+":"+Yi(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var l=0;l<a.length;l++)Wi(a[l])&&(r+=dr(o)+":"+Yi(o,a[l])+";");else{var u=Vn(t,e,a);switch(o){case"animation":case"animationName":{r+=dr(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}return r}var Xi=/label:\s*([^\s;{]+)\s*(;|$)/g,Ht;function hr(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,i="";Ht=void 0;var o=t[0];if(o==null||o.raw===void 0)r=!1,i+=Vn(n,e,o);else{var a=o;i+=a[0]}for(var s=1;s<t.length;s++)if(i+=Vn(n,e,t[s]),r){var l=o;i+=l[s]}Xi.lastIndex=0;for(var u="",f;(f=Xi.exec(i))!==null;)u+="-"+f[1];var d=Uu(i)+u;return{name:d,styles:i,next:Ht}}function Ea(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(r+=i+" ")}),r}var qu=function(e,n,r){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},Gu=function(e,n,r){qu(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function qi(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Gi(t,e,n){var r=[],i=Ea(t,r,n);return r.length<2?n:i+e(r)}var ju=function(e){var n=Lu(e);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var d=hr(u,n.registered,void 0);return Gu(n,d),n.key+"-"+d.name},i=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var d=hr(u,n.registered),h="animation-"+d.name;return qi(n,{name:d.name,styles:"@keyframes "+h+"{"+d.styles+"}"}),h},o=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var d=hr(u,n.registered);qi(n,d)},a=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];return Gi(n.registered,r,Zu(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Ea.bind(null,n.registered),merge:Gi.bind(null,n.registered,r)}},Zu=function t(e){for(var n="",r=0;r<e.length;r++){var i=e[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=t(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},Na=ju({key:"css"}),je=Na.injectGlobal,G=Na.css;function Qu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gr,ji;function Ku(){return ji||(ji=1,gr=function(e,n){n||(n=[0,""]),e=String(e);var r=parseFloat(e,10);return n[0]=r,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),gr}var pr,Zi;function Ju(){if(Zi)return pr;Zi=1;var t=Ku();pr=i;var e=r("in",document.body);function n(o,a){var s=t(getComputedStyle(o).getPropertyValue(a));return s[0]*i(s[1],o)}function r(o,a){var s=document.createElement("div");s.style.height="128"+o,a.appendChild(s);var l=n(s,"height")/128;return a.removeChild(s),l}function i(o,a){if(!o)return null;switch(a=a||document.body,o=(o+""||"px").trim().toLowerCase(),(a===window||a===document)&&(a=document.body),o){case"%":return a.clientHeight/100;case"ch":case"ex":return r(o,a);case"em":return n(a,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var s=t(o);if(!isNaN(s[0])&&s[1]){var l=i(s[1],a);return typeof l=="number"?s[0]*l:null}return null}return pr}Ju();function $a(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function tf(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function ef(t,e,n=0){const[r,i,o,a]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[s,l,u,f]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(i<f||l<a||o<s||u<r)}function ei(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ra(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ze(){}var Le=.7,On=1/Le,fe="\\s*([+-]?\\d+)\\s*",Ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nf=/^#([0-9a-f]{3,8})$/,rf=new RegExp(`^rgb\\(${fe},${fe},${fe}\\)$`),of=new RegExp(`^rgb\\(${Dt},${Dt},${Dt}\\)$`),af=new RegExp(`^rgba\\(${fe},${fe},${fe},${Ue}\\)$`),sf=new RegExp(`^rgba\\(${Dt},${Dt},${Dt},${Ue}\\)$`),cf=new RegExp(`^hsl\\(${Ue},${Dt},${Dt}\\)$`),lf=new RegExp(`^hsla\\(${Ue},${Dt},${Dt},${Ue}\\)$`),Qi={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};ei(Ze,ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ki,formatHex:Ki,formatHex8:uf,formatHsl:ff,formatRgb:Ji,toString:Ji});function Ki(){return this.rgb().formatHex()}function uf(){return this.rgb().formatHex8()}function ff(){return Ba(this).formatHsl()}function Ji(){return this.rgb().formatRgb()}function ee(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=nf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?to(e):n===3?new st(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?an(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?an(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=rf.exec(t))?new st(e[1],e[2],e[3],1):(e=of.exec(t))?new st(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=af.exec(t))?an(e[1],e[2],e[3],e[4]):(e=sf.exec(t))?an(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=cf.exec(t))?ro(e[1],e[2]/100,e[3]/100,1):(e=lf.exec(t))?ro(e[1],e[2]/100,e[3]/100,e[4]):Qi.hasOwnProperty(t)?to(Qi[t]):t==="transparent"?new st(NaN,NaN,NaN,0):null}function to(t){return new st(t>>16&255,t>>8&255,t&255,1)}function an(t,e,n,r){return r<=0&&(t=e=n=NaN),new st(t,e,n,r)}function df(t){return t instanceof Ze||(t=ee(t)),t?(t=t.rgb(),new st(t.r,t.g,t.b,t.opacity)):new st}function Rr(t,e,n,r){return arguments.length===1?df(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ei(st,Rr,Ra(Ze,{brighter(t){return t=t==null?On:Math.pow(On,t),new st(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Le:Math.pow(Le,t),new st(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new st(Kt(this.r),Kt(this.g),Kt(this.b),Fn(this.opacity))},displayable(){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:eo,formatHex:eo,formatHex8:hf,formatRgb:no,toString:no}));function eo(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}`}function hf(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}${Gt((isNaN(this.opacity)?1:this.opacity)*255)}`}function no(){const t=Fn(this.opacity);return`${t===1?"rgb(":"rgba("}${Kt(this.r)}, ${Kt(this.g)}, ${Kt(this.b)}${t===1?")":`, ${t})`}`}function Fn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Kt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Gt(t){return t=Kt(t),(t<16?"0":"")+t.toString(16)}function ro(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _t(t,e,n,r)}function Ba(t){if(t instanceof _t)return new _t(t.h,t.s,t.l,t.opacity);if(t instanceof Ze||(t=ee(t)),!t)return new _t;if(t instanceof _t)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new _t(a,s,l,t.opacity)}function ni(t,e,n,r){return arguments.length===1?Ba(t):new _t(t,e,n,r??1)}function _t(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ei(_t,ni,Ra(Ze,{brighter(t){return t=t==null?On:Math.pow(On,t),new _t(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Le:Math.pow(Le,t),new _t(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new st(mr(t>=240?t-240:t+120,i,r),mr(t,i,r),mr(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new _t(io(this.h),sn(this.s),sn(this.l),Fn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Fn(this.opacity);return`${t===1?"hsl(":"hsla("}${io(this.h)}, ${sn(this.s)*100}%, ${sn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function io(t){return t=(t||0)%360,t<0?t+360:t}function sn(t){return Math.max(0,Math.min(1,t||0))}function mr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const De=globalThis?.UNOVIS_COLORS||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],gf=globalThis?.UNOVIS_COLORS_DARK||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Lt=t=>`--vis-${Yt(t)?`color${t%De.length}`:t}`;function pf(t,e=.4){const n=ni(t);return n.l=n.l*(1+e),n.formatHex()}function mf(t,e=.4,n=.6){const r=ni(t);return r.s=r.s*(1-n),r.l=r.l*(1-e),r.formatHex()}const In=10,Br=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Vr=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function Ut(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const vf=t=>`<mask id="${Ut(t)}">
|
|
2
|
-
<pattern id="${t.id}" viewBox="0 0 10 10" width="${In}" height="${In}" patternUnits="userSpaceOnUse">
|
|
3
|
-
<rect width="100%" height="100%" fill="#fff"/>
|
|
4
|
-
${t.svg}
|
|
5
|
-
</pattern>
|
|
6
|
-
<rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${t.id})"/>
|
|
7
|
-
</mask>`,yf=(t,e)=>`<marker id="${Ut(t)}"
|
|
8
|
-
fill="var(${Lt(e)})"
|
|
9
|
-
markerUnits="userSpaceOnUse"
|
|
10
|
-
refX="5"
|
|
11
|
-
refY="5"
|
|
12
|
-
markerWidth="${In}"
|
|
13
|
-
markerHeight="${In}">
|
|
14
|
-
${t.marker}
|
|
15
|
-
</marker>`;function xf(){const t=Br.map(vf).concat(Vr.map(yf)).join(""),e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.style.position="fixed",e.style.zIndex="-99999999",e.innerHTML=`<defs>${t}</defs>`,document.body.appendChild(e)}typeof window<"u"&&xf();const Va=globalThis?.UNOVIS_FONT_W2H_RATIO_DEFAULT||.5,Oa=globalThis?.UNOVIS_TEXT_SEPARATOR_DEFAULT||[" ","-",".",","],Fa=globalThis?.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT||"-",Oe=globalThis?.UNOVIS_TEXT_DEFAULT||{text:"",fontSize:12,fontFamily:"var(--vis-font-family)",lineHeight:1.25,marginTop:0,marginBottom:0};je`
|
|
16
|
-
:root {
|
|
17
|
-
label: vis-root-styles;
|
|
18
|
-
--vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
|
|
19
|
-
--vis-font-wh-ratio: ${Va};
|
|
20
|
-
--vis-color-main: var(${Lt(0)});
|
|
21
|
-
--vis-color-main-light: ${pf(De[0])};
|
|
22
|
-
--vis-color-main-dark: ${mf(De[0])};
|
|
23
|
-
--vis-color-grey: #2a2a2a;
|
|
24
|
-
${De.map((t,e)=>`${Lt(e)}: ${t};`)}
|
|
25
|
-
${gf.map((t,e)=>`--vis-dark-color${e}: ${t};`)}
|
|
26
|
-
${Br.map((t,e)=>`
|
|
27
|
-
--${Ut(t)}: url(#${Ut(t)});
|
|
28
|
-
--vis-pattern-fill${e}: var(--${Ut(t)});
|
|
29
|
-
`)}
|
|
30
|
-
${Vr.map((t,e)=>{var n;return`
|
|
31
|
-
--${Ut(t)}: url(#${Ut(t)});
|
|
32
|
-
--vis-pattern-marker${e}: var(--${Ut(t)});
|
|
33
|
-
--vis-pattern-dasharray${e}: ${(n=t.dashArray)===null||n===void 0?void 0:n.join(" ")};
|
|
34
|
-
`})}
|
|
35
|
-
|
|
36
|
-
body.theme-dark {
|
|
37
|
-
${De.map((t,e)=>`${Lt(e)}: var(--vis-dark-color${e});`)}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
body.theme-patterns {
|
|
41
|
-
${Br.map((t,e)=>`path[style*="fill: var(${Lt(e)})"] {
|
|
42
|
-
mask: var(--vis-pattern-fill${e});
|
|
43
|
-
}`)}
|
|
44
|
-
${Vr.map((t,e)=>`
|
|
45
|
-
path[stroke="var(${Lt(e)})"]:not([style*="fill"]),
|
|
46
|
-
path[style*="stroke: var(${Lt(e)})"]:not([style*="fill"]) {
|
|
47
|
-
marker: var(--vis-pattern-marker${e});
|
|
48
|
-
stroke-dasharray: var(--vis-pattern-dasharray${e});
|
|
49
|
-
}
|
|
50
|
-
`)}
|
|
51
|
-
}
|
|
52
|
-
`;function Ia(t=window?.document.body){return t?+tf("var(--vis-font-wh-ratio)",t):Va}var _f={value:()=>{}};function za(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new mn(n)}function mn(t){this._=t}function wf(t,e){return t.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&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}mn.prototype=za.prototype={constructor:mn,on:function(t,e){var n=this._,r=wf(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=bf(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=oo(n[i],t.name,e);else if(e==null)for(i in n)n[i]=oo(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new mn(t)},call:function(t,e){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(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function bf(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function oo(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=_f,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var me=0,Ae=0,Ce=0,Pa=1e3,zn,Ee,Pn=0,ne=0,Jn=0,He=typeof performance=="object"&&performance.now?performance:Date,La=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ri(){return ne||(La(kf),ne=He.now()+Jn)}function kf(){ne=0}function Ln(){this._call=this._time=this._next=null}Ln.prototype=Ua.prototype={constructor:Ln,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ri():+n)+(e==null?0:+e),!this._next&&Ee!==this&&(Ee?Ee._next=this:zn=this,Ee=this),this._call=t,this._time=n,Or()},stop:function(){this._call&&(this._call=null,this._time=1/0,Or())}};function Ua(t,e,n){var r=new Ln;return r.restart(t,e,n),r}function Cf(){ri(),++me;for(var t=zn,e;t;)(e=ne-t._time)>=0&&t._call.call(void 0,e),t=t._next;--me}function ao(){ne=(Pn=He.now())+Jn,me=Ae=0;try{Cf()}finally{me=0,Tf(),ne=0}}function Sf(){var t=He.now(),e=t-Pn;e>Pa&&(Jn-=e,Pn=t)}function Tf(){for(var t,e=zn,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:zn=n);Ee=t,Or(r)}function Or(t){if(!me){Ae&&(Ae=clearTimeout(Ae));var e=t-ne;e>24?(t<1/0&&(Ae=setTimeout(ao,t-He.now()-Jn)),Ce&&(Ce=clearInterval(Ce))):(Ce||(Pn=He.now(),Ce=setInterval(Sf,Pa)),me=1,La(ao))}}function so(t,e,n){var r=new Ln;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Mf=za("start","end","cancel","interrupt"),Df=[],Ha=0,co=1,Fr=2,vn=3,lo=4,Ir=5,yn=6;function tr(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Af(t,n,{name:e,index:r,group:i,on:Mf,tween:Df,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ha})}function ii(t,e){var n=bt(t,e);if(n.state>Ha)throw new Error("too late; already scheduled");return n}function At(t,e){var n=bt(t,e);if(n.state>vn)throw new Error("too late; already running");return n}function bt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Af(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Ua(o,0,n.time);function o(u){n.state=co,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var f,d,h,g;if(n.state!==co)return l();for(f in r)if(g=r[f],g.name===n.name){if(g.state===vn)return so(a);g.state===lo?(g.state=yn,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete r[f]):+f<e&&(g.state=yn,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete r[f])}if(so(function(){n.state===vn&&(n.state=lo,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Fr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Fr){for(n.state=vn,i=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(g=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=g);i.length=d+1}}function s(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Ir,1),d=-1,h=i.length;++d<h;)i[d].call(t,f);n.state===Ir&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=yn,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function oi(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Fr&&r.state<Ir,r.state=yn,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function Ef(t){return this.each(function(){oi(this,t)})}const ai=t=>()=>t;function Nf(t,e){return function(n){return t+n*e}}function $f(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Rf(t){return(t=+t)==1?Wa:function(e,n){return n-e?$f(e,n,t):ai(isNaN(e)?n:e)}}function Wa(t,e){var n=e-t;return n?Nf(t,n):ai(isNaN(t)?e:t)}const Un=(function t(e){var n=Rf(e);function r(i,o){var a=n((i=Rr(i)).r,(o=Rr(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=Wa(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function Bf(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Vf(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Of(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=we(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Ff(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function xt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function If(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=we(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var zr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vr=new RegExp(zr.source,"g");function zf(t){return function(){return t}}function Pf(t){return function(e){return t(e)+""}}function Ya(t,e){var n=zr.lastIndex=vr.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(r=zr.exec(t))&&(i=vr.exec(e));)(o=i.index)>n&&(o=e.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:xt(r,i)})),n=vr.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?Pf(l[0].x):zf(e):(e=l.length,function(u){for(var f=0,d;f<e;++f)s[(d=l[f]).i]=d.x(u);return s.join("")})}function we(t,e){var n=typeof e,r;return e==null||n==="boolean"?ai(e):(n==="number"?xt:n==="string"?(r=ee(e))?(e=r,Un):Ya:e instanceof ee?Un:e instanceof Date?Ff:Vf(e)?Bf:Array.isArray(e)?Of:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?If:xt)(t,e)}function si(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var uo=180/Math.PI,Pr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xa(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*uo,skewX:Math.atan(l)*uo,scaleX:a,scaleY:s}}var cn;function Lf(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Pr:Xa(e.a,e.b,e.c,e.d,e.e,e.f)}function Uf(t){return t==null||(cn||(cn=document.createElementNS("http://www.w3.org/2000/svg","g")),cn.setAttribute("transform",t),!(t=cn.transform.baseVal.consolidate()))?Pr:(t=t.matrix,Xa(t.a,t.b,t.c,t.d,t.e,t.f))}function qa(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,d,h,g,m){if(u!==d||f!==h){var p=g.push("translate(",null,e,null,n);m.push({i:p-4,x:xt(u,d)},{i:p-2,x:xt(f,h)})}else(d||h)&&g.push("translate("+d+e+h+n)}function a(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:xt(u,f)})):f&&d.push(i(d)+"rotate("+f+r)}function s(u,f,d,h){u!==f?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:xt(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function l(u,f,d,h,g,m){if(u!==d||f!==h){var p=g.push(i(g)+"scale(",null,",",null,")");m.push({i:p-4,x:xt(u,d)},{i:p-2,x:xt(f,h)})}else(d!==1||h!==1)&&g.push(i(g)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,d,h),a(u.rotate,f.rotate,d,h),s(u.skewX,f.skewX,d,h),l(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(g){for(var m=-1,p=h.length,_;++m<p;)d[(_=h[m]).i]=_.x(g);return d.join("")}}}var Hf=qa(Lf,"px, ","px)","deg)"),Wf=qa(Uf,", ",")",")");function Yf(t,e){e===void 0&&(e=t,t=we);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 function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function Xf(t,e){var n,r;return function(){var i=At(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function qf(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=At(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function Gf(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=bt(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?Xf:qf)(n,t,e))}function ci(t,e,n){var r=t._id;return t.each(function(){var i=At(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return bt(i,r).value[e]}}function Ga(t,e){var n;return(typeof e=="number"?xt:e instanceof ee?Un:(n=ee(e))?(e=n,Un):Ya)(t,e)}function jf(t){return function(){this.removeAttribute(t)}}function Zf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qf(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function Kf(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Jf(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function td(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function ed(t,e){var n=jn(t),r=n==="transform"?Wf:Ga;return this.attrTween(t,typeof e=="function"?(n.local?td:Jf)(n,r,ci(this,"attr."+t,e)):e==null?(n.local?Zf:jf)(n):(n.local?Kf:Qf)(n,r,e))}function nd(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function rd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function id(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&rd(t,o)),n}return i._value=e,i}function od(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&nd(t,o)),n}return i._value=e,i}function ad(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=jn(t);return this.tween(n,(r.local?id:od)(r,e))}function sd(t,e){return function(){ii(this,t).delay=+e.apply(this,arguments)}}function cd(t,e){return e=+e,function(){ii(this,t).delay=e}}function ld(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?sd:cd)(e,t)):bt(this.node(),e).delay}function ud(t,e){return function(){At(this,t).duration=+e.apply(this,arguments)}}function fd(t,e){return e=+e,function(){At(this,t).duration=e}}function dd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ud:fd)(e,t)):bt(this.node(),e).duration}function hd(t,e){if(typeof e!="function")throw new Error;return function(){At(this,t).ease=e}}function gd(t){var e=this._id;return arguments.length?this.each(hd(e,t)):bt(this.node(),e).ease}function pd(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;At(this,t).ease=n}}function md(t){if(typeof t!="function")throw new Error;return this.each(pd(this._id,t))}function vd(t){typeof t!="function"&&(t=Jo(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new Ft(r,this._parents,this._name,this._id)}function yd(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=e[s],u=n[s],f=l.length,d=a[s]=new Array(f),h,g=0;g<f;++g)(h=l[g]||u[g])&&(d[g]=h);for(;s<r;++s)a[s]=e[s];return new Ft(a,this._parents,this._name,this._id)}function xd(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function _d(t,e,n){var r,i,o=xd(e)?ii:At;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function wd(t,e){var n=this._id;return arguments.length<2?bt(this.node(),n).on.on(t):this.each(_d(n,t,e))}function bd(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function kd(){return this.on("end.remove",bd(this._id))}function Cd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=qr(t));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),f,d,h=0;h<l;++h)(f=s[h])&&(d=t.call(f,f.__data__,h,s))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,tr(u[h],e,n,h,u,bt(f,n)));return new Ft(o,this._parents,e,n)}function Sd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ko(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,f,d=0;d<u;++d)if(f=l[d]){for(var h=t.call(f,f.__data__,d,l),g,m=bt(f,n),p=0,_=h.length;p<_;++p)(g=h[p])&&tr(g,e,n,p,h,m);o.push(h),a.push(f)}return new Ft(o,a,e,n)}var Td=Ye.prototype.constructor;function Md(){return new Td(this._groups,this._parents)}function Dd(t,e){var n,r,i;return function(){var o=de(this,t),a=(this.style.removeProperty(t),de(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function ja(t){return function(){this.style.removeProperty(t)}}function Ad(t,e,n){var r,i=n+"",o;return function(){var a=de(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function Ed(t,e,n){var r,i,o;return function(){var a=de(this,t),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),de(this,t))),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}function Nd(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var l=At(this,t),u=l.on,f=l.value[o]==null?s||(s=ja(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(a,i=f),l.on=r}}function $d(t,e,n){var r=(t+="")=="transform"?Hf:Ga;return e==null?this.styleTween(t,Dd(t,r)).on("end.style."+t,ja(t)):typeof e=="function"?this.styleTween(t,Ed(t,r,ci(this,"style."+t,e))).each(Nd(this._id,t)):this.styleTween(t,Ad(t,r,e),n).on("end.style."+t,null)}function Rd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Bd(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Rd(t,a,n)),r}return o._value=e,o}function Vd(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Bd(t,e,n??""))}function Od(t){return function(){this.textContent=t}}function Fd(t){return function(){var e=t(this);this.textContent=e??""}}function Id(t){return this.tween("text",typeof t=="function"?Fd(ci(this,"text",t)):Od(t==null?"":t+""))}function zd(t){return function(e){this.textContent=t.call(this,e)}}function Pd(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&zd(i)),e}return r._value=t,r}function Ld(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Pd(t))}function Ud(){for(var t=this._name,e=this._id,n=Za(),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 f=bt(l,e);tr(l,t,n,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ft(r,this._parents,t,n)}function Hd(){var t,e,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=At(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),u.on=e}),i===0&&o()})}var Wd=0;function Ft(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Za(){return++Wd}var Et=Ye.prototype;Ft.prototype={constructor:Ft,select:Cd,selectAll:Sd,selectChild:Et.selectChild,selectChildren:Et.selectChildren,filter:vd,merge:yd,selection:Md,transition:Ud,call:Et.call,nodes:Et.nodes,node:Et.node,size:Et.size,empty:Et.empty,each:Et.each,on:wd,attr:ed,attrTween:ad,style:$d,styleTween:Vd,text:Id,textTween:Ld,remove:kd,tween:Gf,delay:ld,duration:dd,ease:gd,easeVarying:md,end:Hd,[Symbol.iterator]:Et[Symbol.iterator]};const fo=t=>+t;function Yd(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Xd={time:null,delay:0,duration:250,ease:Yd};function qd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Gd(t){var e,n;t instanceof Ft?(e=t._id,t=t._name):(e=Za(),(n=Xd).time=ri(),t=t==null?null:t+"");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])&&tr(l,t,e,u,a,n||qd(l,e));return new Ft(r,this._parents,t,e)}Ye.prototype.interrupt=Ef;Ye.prototype.transition=Gd;function mt(t,e,n){if(t.nodes().forEach(r=>oi(r)),e){const r=t.transition().duration(e);return n&&r.ease(n),r}else return t}class li{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}}var z;(function(t){t.X="x",t.Y="y"})(z||(z={}));function kt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Qa(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const ho=Symbol("implicit");function ui(){var t=new Ai,e=[],n=[],r=ho;function i(o){let a=t.get(o);if(a===void 0){if(r!==ho)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ai;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ui(e,n).unknown(r)},kt.apply(i,arguments),i}function er(){var t=ui().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,l=0,u=0,f=.5;delete t.unknown;function d(){var h=e().length,g=i<r,m=g?i:r,p=g?r:i;o=(p-m)/Math.max(1,h-l+u*2),s&&(o=Math.floor(o)),m+=(p-m-o*(h-l))*f,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var _=fa(h).map(function(k){return m+o*k});return n(g?_.reverse():_)}return t.domain=function(h){return arguments.length?(e(h),d()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,d()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,d()):s},t.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),d()):l},t.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},t.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},t.copy=function(){return er(e(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(f)},kt.apply(d(),arguments)}function Ka(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ka(e())},t}function jd(){return Ka(er.apply(null,arguments).paddingInner(1))}function Zd(t){return function(){return t}}function Lr(t){return+t}var go=[0,1];function ct(t){return t}function Ur(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Zd(isNaN(e)?NaN:.5)}function Qd(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Kd(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ur(i,r),o=n(a,o)):(r=Ur(r,i),o=n(o,a)),function(s){return o(r(s))}}function Jd(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ur(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var l=Xe(t,s,1,r)-1;return o[l](i[l](s))}}function Qe(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function nr(){var t=go,e=go,n=we,r,i,o,a=ct,s,l,u;function f(){var h=Math.min(t.length,e.length);return a!==ct&&(a=Qd(t[0],t[h-1])),s=h>2?Jd:Kd,l=u=null,d}function d(h){return h==null||isNaN(h=+h)?o:(l||(l=s(t.map(r),e,n)))(r(a(h)))}return d.invert=function(h){return a(i((u||(u=s(e,t.map(r),xt)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,Lr),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=si,f()},d.clamp=function(h){return arguments.length?(a=h?!0:ct,f()):a!==ct},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,g){return r=h,i=g,f()}}function Ja(){return nr()(ct,ct)}function th(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Hn(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ve(t){return t=Hn(Math.abs(t)),t?t[1]:NaN}function eh(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[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=t[a=(a+1)%t.length];return o.reverse().join(e)}}function nh(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var rh=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function We(t){if(!(e=rh.exec(t)))throw new Error("invalid format: "+t);var e;return new fi({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}We.prototype=fi.prototype;function fi(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}fi.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 ih(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Wn;function oh(t,e){var n=Hn(t,e);if(!n)return Wn=void 0,t.toPrecision(e);var r=n[0],i=n[1],o=i-(Wn=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")+Hn(t,Math.max(0,e+o-1))[0]}function po(t,e){var n=Hn(t,e);if(!n)return t+"";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 mo={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:th,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>po(t*100,e),r:po,s:oh,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function vo(t){return t}var yo=Array.prototype.map,xo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ah(t){var e=t.grouping===void 0||t.thousands===void 0?vo:eh(yo.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?vo:nh(yo.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=We(d);var g=d.fill,m=d.align,p=d.sign,_=d.symbol,k=d.zero,x=d.width,C=d.comma,w=d.precision,b=d.trim,v=d.type;v==="n"?(C=!0,v="g"):mo[v]||(w===void 0&&(w=12),b=!0,v="g"),(k||g==="0"&&m==="=")&&(k=!0,g="0",m="=");var y=(h&&h.prefix!==void 0?h.prefix:"")+(_==="$"?n:_==="#"&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),N=(_==="$"?r:/[%p]/.test(v)?a:"")+(h&&h.suffix!==void 0?h.suffix:""),E=mo[v],R=/[defgprs%]/.test(v);w=w===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(M){var q=y,$=N,T,B,I;if(v==="c")$=E(M)+$,M="";else{M=+M;var H=M<0||1/M<0;if(M=isNaN(M)?l:E(Math.abs(M),w),b&&(M=ih(M)),H&&+M==0&&p!=="+"&&(H=!1),q=(H?p==="("?p:s:p==="-"||p==="("?"":p)+q,$=(v==="s"&&!isNaN(M)&&Wn!==void 0?xo[8+Wn/3]:"")+$+(H&&p==="("?")":""),R){for(T=-1,B=M.length;++T<B;)if(I=M.charCodeAt(T),48>I||I>57){$=(I===46?i+M.slice(T+1):M.slice(T))+$,M=M.slice(0,T);break}}}C&&!k&&(M=e(M,1/0));var j=q.length+M.length+$.length,Q=j<x?new Array(x-j+1).join(g):"";switch(C&&k&&(M=e(Q+M,Q.length?x-$.length:1/0),Q=""),m){case"<":M=q+M+$+Q;break;case"=":M=q+Q+M+$;break;case"^":M=Q.slice(0,j=Q.length>>1)+q+M+$+Q.slice(j);break;default:M=Q+q+M+$;break}return o(M)}return V.toString=function(){return d+""},V}function f(d,h){var g=Math.max(-8,Math.min(8,Math.floor(ve(h)/3)))*3,m=Math.pow(10,-g),p=u((d=We(d),d.type="f",d),{suffix:xo[8+g/3]});return function(_){return p(m*_)}}return{format:u,formatPrefix:f}}var ln,di,ts;sh({thousands:",",grouping:[3],currency:["$",""]});function sh(t){return ln=ah(t),di=ln.format,ts=ln.formatPrefix,ln}function ch(t){return Math.max(0,-ve(Math.abs(t)))}function lh(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ve(e)/3)))*3-ve(Math.abs(t)))}function uh(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ve(e)-ve(t))+1}function fh(t,e,n,r){var i=Tr(t,e,n),o;switch(r=We(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=lh(i,a))&&(r.precision=o),ts(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=uh(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=ch(i))&&(r.precision=o-(r.type==="%")*2);break}}return di(r)}function re(t){var e=t.domain;return t.ticks=function(n){var r=e();return Cr(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return fh(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,f=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);f-- >0;){if(u=Sr(a,s,n),u===l)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function es(){var t=Ja();return t.copy=function(){return Qe(t,es())},kt.apply(t,arguments),re(t)}function ns(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Lr),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return ns(t).unknown(e)},t=arguments.length?Array.from(t,Lr):[0,1],re(n)}function rs(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function _o(t){return Math.log(t)}function wo(t){return Math.exp(t)}function dh(t){return-Math.log(-t)}function hh(t){return-Math.exp(-t)}function gh(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ph(t){return t===10?gh:t===Math.E?Math.exp:e=>Math.pow(t,e)}function mh(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function bo(t){return(e,n)=>-t(-e,n)}function vh(t){const e=t(_o,wo),n=e.domain;let r=10,i,o;function a(){return i=mh(r),o=ph(r),n()[0]<0?(i=bo(i),o=bo(o),t(dh,hh)):t(_o,wo),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),g=i(f),m,p;const _=s==null?10:+s;let k=[];if(!(r%1)&&g-h<_){if(h=Math.floor(h),g=Math.ceil(g),u>0){for(;h<=g;++h)for(m=1;m<r;++m)if(p=h<0?m/o(-h):m*o(h),!(p<u)){if(p>f)break;k.push(p)}}else for(;h<=g;++h)for(m=r-1;m>=1;--m)if(p=h>0?m/o(-h):m*o(h),!(p<u)){if(p>f)break;k.push(p)}k.length*2<_&&(k=Cr(u,f,_))}else k=Cr(h,g,Math.min(g-h,_)).map(o);return d?k.reverse():k},e.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=We(l)).precision==null&&(l.trim=!0),l=di(l)),s===1/0)return l;const u=Math.max(1,r*s/e.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?l(f):""}},e.nice=()=>n(rs(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function is(){const t=vh(nr()).domain([1,10]);return t.copy=()=>Qe(t,is()).base(t.base()),kt.apply(t,arguments),t}function ko(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Co(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function yh(t){var e=1,n=t(ko(e),Co(e));return n.constant=function(r){return arguments.length?t(ko(e=+r),Co(e)):e},re(n)}function os(){var t=yh(nr());return t.copy=function(){return Qe(t,os()).constant(t.constant())},kt.apply(t,arguments)}function So(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function xh(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function _h(t){return t<0?-t*t:t*t}function wh(t){var e=t(ct,ct),n=1;function r(){return n===1?t(ct,ct):n===.5?t(xh,_h):t(So(n),So(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},re(e)}function hi(){var t=wh(nr());return t.copy=function(){return Qe(t,hi()).exponent(t.exponent())},kt.apply(t,arguments),t}function bh(){return hi.apply(null,arguments).exponent(.5)}function as(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=Vl(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[Xe(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(Re),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return as().domain(t).range(e).unknown(r)},kt.apply(o,arguments)}function ss(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[Xe(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*e-(l-n)*t)/(n+1);return a}return a.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,s()):[t,e]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[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 ss().domain([t,e]).range(i).unknown(o)},kt.apply(re(a),arguments)}function cs(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[Xe(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return cs().domain(t).range(e).unknown(n)},kt.apply(i,arguments)}const yr=new Date,xr=new Date;function tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let u;do l.push(u=new Date(+o)),e(o,s),t(o);while(u<o&&o<a);return l},i.filter=o=>tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(yr.setTime(+o),xr.setTime(+a),t(yr),t(xr),Math.floor(n(yr,xr))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Yn=tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Yn.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Yn);Yn.range;const Bt=1e3,vt=Bt*60,Vt=vt*60,It=Vt*24,gi=It*7,To=It*30,_r=It*365,jt=tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Bt)},(t,e)=>(e-t)/Bt,t=>t.getUTCSeconds());jt.range;const pi=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Bt)},(t,e)=>{t.setTime(+t+e*vt)},(t,e)=>(e-t)/vt,t=>t.getMinutes());pi.range;const mi=tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*vt)},(t,e)=>(e-t)/vt,t=>t.getUTCMinutes());mi.range;const vi=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Bt-t.getMinutes()*vt)},(t,e)=>{t.setTime(+t+e*Vt)},(t,e)=>(e-t)/Vt,t=>t.getHours());vi.range;const yi=tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Vt)},(t,e)=>(e-t)/Vt,t=>t.getUTCHours());yi.range;const Ke=tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*vt)/It,t=>t.getDate()-1);Ke.range;const rr=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/It,t=>t.getUTCDate()-1);rr.range;const ls=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/It,t=>Math.floor(t/It));ls.range;function ie(t){return tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*vt)/gi)}const ir=ie(0),Xn=ie(1),kh=ie(2),Ch=ie(3),ye=ie(4),Sh=ie(5),Th=ie(6);ir.range;Xn.range;kh.range;Ch.range;ye.range;Sh.range;Th.range;function oe(t){return tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/gi)}const or=oe(0),qn=oe(1),Mh=oe(2),Dh=oe(3),xe=oe(4),Ah=oe(5),Eh=oe(6);or.range;qn.range;Mh.range;Dh.range;xe.range;Ah.range;Eh.range;const xi=tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());xi.range;const _i=tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());_i.range;const zt=tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});zt.range;const Pt=tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Pt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Pt.range;function us(t,e,n,r,i,o){const a=[[jt,1,Bt],[jt,5,5*Bt],[jt,15,15*Bt],[jt,30,30*Bt],[o,1,vt],[o,5,5*vt],[o,15,15*vt],[o,30,30*vt],[i,1,Vt],[i,3,3*Vt],[i,6,6*Vt],[i,12,12*Vt],[r,1,It],[r,2,2*It],[n,1,gi],[e,1,To],[e,3,3*To],[t,1,_r]];function s(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const g=d&&typeof d.range=="function"?d:l(u,f,d),m=g?g.range(u,+f+1):[];return h?m.reverse():m}function l(u,f,d){const h=Math.abs(f-u)/d,g=jr(([,,_])=>_).right(a,h);if(g===a.length)return t.every(Tr(u/_r,f/_r,d));if(g===0)return Yn.every(Math.max(Tr(u,f,d),1));const[m,p]=a[h/a[g-1][2]<a[g][2]/h?g-1:g];return m.every(p)}return[s,l]}const[Nh,$h]=us(Pt,_i,or,ls,yi,mi),[Rh,Bh]=us(zt,xi,ir,Ke,vi,pi);function wr(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function br(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Se(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Vh(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,u=Te(i),f=Me(i),d=Te(o),h=Me(o),g=Te(a),m=Me(a),p=Te(s),_=Me(s),k=Te(l),x=Me(l),C={a:I,A:H,b:j,B:Q,c:null,d:$o,e:$o,f:ig,g:gg,G:mg,H:eg,I:ng,j:rg,L:fs,m:og,M:ag,p:yt,q:J,Q:Vo,s:Oo,S:sg,u:cg,U:lg,V:ug,w:fg,W:dg,x:null,X:null,y:hg,Y:pg,Z:vg,"%":Bo},w={a:ot,A:O,b:P,B:pt,c:null,d:Ro,e:Ro,f:wg,g:Ng,G:Rg,H:yg,I:xg,j:_g,L:hs,m:bg,M:kg,p:ae,q:Us,Q:Vo,s:Oo,S:Cg,u:Sg,U:Tg,V:Mg,w:Dg,W:Ag,x:null,X:null,y:Eg,Y:$g,Z:Bg,"%":Bo},b={a:R,A:V,b:M,B:q,c:$,d:Eo,e:Eo,f:Qh,g:Ao,G:Do,H:No,I:No,j:qh,L:Zh,m:Xh,M:Gh,p:E,q:Yh,Q:Jh,s:tg,S:jh,u:Ph,U:Lh,V:Uh,w:zh,W:Hh,x:T,X:B,y:Ao,Y:Do,Z:Wh,"%":Kh};C.x=v(n,C),C.X=v(r,C),C.c=v(e,C),w.x=v(n,w),w.X=v(r,w),w.c=v(e,w);function v(A,F){return function(L){var S=[],at=-1,X=0,ut=A.length,ft,qt,Ti;for(L instanceof Date||(L=new Date(+L));++at<ut;)A.charCodeAt(at)===37&&(S.push(A.slice(X,at)),(qt=Mo[ft=A.charAt(++at)])!=null?ft=A.charAt(++at):qt=ft==="e"?" ":"0",(Ti=F[ft])&&(ft=Ti(L,qt)),S.push(ft),X=at+1);return S.push(A.slice(X,at)),S.join("")}}function y(A,F){return function(L){var S=Se(1900,void 0,1),at=N(S,A,L+="",0),X,ut;if(at!=L.length)return null;if("Q"in S)return new Date(S.Q);if("s"in S)return new Date(S.s*1e3+("L"in S?S.L:0));if(F&&!("Z"in S)&&(S.Z=0),"p"in S&&(S.H=S.H%12+S.p*12),S.m===void 0&&(S.m="q"in S?S.q:0),"V"in S){if(S.V<1||S.V>53)return null;"w"in S||(S.w=1),"Z"in S?(X=br(Se(S.y,0,1)),ut=X.getUTCDay(),X=ut>4||ut===0?qn.ceil(X):qn(X),X=rr.offset(X,(S.V-1)*7),S.y=X.getUTCFullYear(),S.m=X.getUTCMonth(),S.d=X.getUTCDate()+(S.w+6)%7):(X=wr(Se(S.y,0,1)),ut=X.getDay(),X=ut>4||ut===0?Xn.ceil(X):Xn(X),X=Ke.offset(X,(S.V-1)*7),S.y=X.getFullYear(),S.m=X.getMonth(),S.d=X.getDate()+(S.w+6)%7)}else("W"in S||"U"in S)&&("w"in S||(S.w="u"in S?S.u%7:"W"in S?1:0),ut="Z"in S?br(Se(S.y,0,1)).getUTCDay():wr(Se(S.y,0,1)).getDay(),S.m=0,S.d="W"in S?(S.w+6)%7+S.W*7-(ut+5)%7:S.w+S.U*7-(ut+6)%7);return"Z"in S?(S.H+=S.Z/100|0,S.M+=S.Z%100,br(S)):wr(S)}}function N(A,F,L,S){for(var at=0,X=F.length,ut=L.length,ft,qt;at<X;){if(S>=ut)return-1;if(ft=F.charCodeAt(at++),ft===37){if(ft=F.charAt(at++),qt=b[ft in Mo?F.charAt(at++):ft],!qt||(S=qt(A,L,S))<0)return-1}else if(ft!=L.charCodeAt(S++))return-1}return S}function E(A,F,L){var S=u.exec(F.slice(L));return S?(A.p=f.get(S[0].toLowerCase()),L+S[0].length):-1}function R(A,F,L){var S=g.exec(F.slice(L));return S?(A.w=m.get(S[0].toLowerCase()),L+S[0].length):-1}function V(A,F,L){var S=d.exec(F.slice(L));return S?(A.w=h.get(S[0].toLowerCase()),L+S[0].length):-1}function M(A,F,L){var S=k.exec(F.slice(L));return S?(A.m=x.get(S[0].toLowerCase()),L+S[0].length):-1}function q(A,F,L){var S=p.exec(F.slice(L));return S?(A.m=_.get(S[0].toLowerCase()),L+S[0].length):-1}function $(A,F,L){return N(A,e,F,L)}function T(A,F,L){return N(A,n,F,L)}function B(A,F,L){return N(A,r,F,L)}function I(A){return a[A.getDay()]}function H(A){return o[A.getDay()]}function j(A){return l[A.getMonth()]}function Q(A){return s[A.getMonth()]}function yt(A){return i[+(A.getHours()>=12)]}function J(A){return 1+~~(A.getMonth()/3)}function ot(A){return a[A.getUTCDay()]}function O(A){return o[A.getUTCDay()]}function P(A){return l[A.getUTCMonth()]}function pt(A){return s[A.getUTCMonth()]}function ae(A){return i[+(A.getUTCHours()>=12)]}function Us(A){return 1+~~(A.getUTCMonth()/3)}return{format:function(A){var F=v(A+="",C);return F.toString=function(){return A},F},parse:function(A){var F=y(A+="",!1);return F.toString=function(){return A},F},utcFormat:function(A){var F=v(A+="",w);return F.toString=function(){return A},F},utcParse:function(A){var F=y(A+="",!0);return F.toString=function(){return A},F}}}var Mo={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Oh=/^%/,Fh=/[\\^$*+?|[\]().{}]/g;function U(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Ih(t){return t.replace(Fh,"\\$&")}function Te(t){return new RegExp("^(?:"+t.map(Ih).join("|")+")","i")}function Me(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function zh(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ph(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Lh(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Uh(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hh(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Do(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ao(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Wh(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yh(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Xh(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Eo(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function qh(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function No(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Gh(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function jh(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Zh(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Qh(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Kh(t,e,n){var r=Oh.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Jh(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function tg(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function $o(t,e){return U(t.getDate(),e,2)}function eg(t,e){return U(t.getHours(),e,2)}function ng(t,e){return U(t.getHours()%12||12,e,2)}function rg(t,e){return U(1+Ke.count(zt(t),t),e,3)}function fs(t,e){return U(t.getMilliseconds(),e,3)}function ig(t,e){return fs(t,e)+"000"}function og(t,e){return U(t.getMonth()+1,e,2)}function ag(t,e){return U(t.getMinutes(),e,2)}function sg(t,e){return U(t.getSeconds(),e,2)}function cg(t){var e=t.getDay();return e===0?7:e}function lg(t,e){return U(ir.count(zt(t)-1,t),e,2)}function ds(t){var e=t.getDay();return e>=4||e===0?ye(t):ye.ceil(t)}function ug(t,e){return t=ds(t),U(ye.count(zt(t),t)+(zt(t).getDay()===4),e,2)}function fg(t){return t.getDay()}function dg(t,e){return U(Xn.count(zt(t)-1,t),e,2)}function hg(t,e){return U(t.getFullYear()%100,e,2)}function gg(t,e){return t=ds(t),U(t.getFullYear()%100,e,2)}function pg(t,e){return U(t.getFullYear()%1e4,e,4)}function mg(t,e){var n=t.getDay();return t=n>=4||n===0?ye(t):ye.ceil(t),U(t.getFullYear()%1e4,e,4)}function vg(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+U(e/60|0,"0",2)+U(e%60,"0",2)}function Ro(t,e){return U(t.getUTCDate(),e,2)}function yg(t,e){return U(t.getUTCHours(),e,2)}function xg(t,e){return U(t.getUTCHours()%12||12,e,2)}function _g(t,e){return U(1+rr.count(Pt(t),t),e,3)}function hs(t,e){return U(t.getUTCMilliseconds(),e,3)}function wg(t,e){return hs(t,e)+"000"}function bg(t,e){return U(t.getUTCMonth()+1,e,2)}function kg(t,e){return U(t.getUTCMinutes(),e,2)}function Cg(t,e){return U(t.getUTCSeconds(),e,2)}function Sg(t){var e=t.getUTCDay();return e===0?7:e}function Tg(t,e){return U(or.count(Pt(t)-1,t),e,2)}function gs(t){var e=t.getUTCDay();return e>=4||e===0?xe(t):xe.ceil(t)}function Mg(t,e){return t=gs(t),U(xe.count(Pt(t),t)+(Pt(t).getUTCDay()===4),e,2)}function Dg(t){return t.getUTCDay()}function Ag(t,e){return U(qn.count(Pt(t)-1,t),e,2)}function Eg(t,e){return U(t.getUTCFullYear()%100,e,2)}function Ng(t,e){return t=gs(t),U(t.getUTCFullYear()%100,e,2)}function $g(t,e){return U(t.getUTCFullYear()%1e4,e,4)}function Rg(t,e){var n=t.getUTCDay();return t=n>=4||n===0?xe(t):xe.ceil(t),U(t.getUTCFullYear()%1e4,e,4)}function Bg(){return"+0000"}function Bo(){return"%"}function Vo(t){return+t}function Oo(t){return Math.floor(+t/1e3)}var se,ps,ms;Vg({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 Vg(t){return se=Vh(t),ps=se.format,se.parse,ms=se.utcFormat,se.utcParse,se}function Og(t){return new Date(t)}function Fg(t){return t instanceof Date?+t:+new Date(+t)}function wi(t,e,n,r,i,o,a,s,l,u){var f=Ja(),d=f.invert,h=f.domain,g=u(".%L"),m=u(":%S"),p=u("%I:%M"),_=u("%I %p"),k=u("%a %d"),x=u("%b %d"),C=u("%B"),w=u("%Y");function b(v){return(l(v)<v?g:s(v)<v?m:a(v)<v?p:o(v)<v?_:r(v)<v?i(v)<v?k:x:n(v)<v?C:w)(v)}return f.invert=function(v){return new Date(d(v))},f.domain=function(v){return arguments.length?h(Array.from(v,Fg)):h().map(Og)},f.ticks=function(v){var y=h();return t(y[0],y[y.length-1],v??10)},f.tickFormat=function(v,y){return y==null?b:u(y)},f.nice=function(v){var y=h();return(!v||typeof v.range!="function")&&(v=e(y[0],y[y.length-1],v??10)),v?h(rs(y,v)):f},f.copy=function(){return Qe(f,wi(t,e,n,r,i,o,a,s,l,u))},f}function Ig(){return kt.apply(wi(Rh,Bh,zt,xi,ir,Ke,vi,pi,jt,ps).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zg(){return kt.apply(wi(Nh,$h,Pt,_i,or,rr,yi,mi,jt,ms).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Pg(){var t=0,e=1,n,r,i,o,a=ct,s=!1,l;function u(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([t,e]=d,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),u):[t,e]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(a=d,u):a};function f(d){return function(h){var g,m;return arguments.length?([g,m]=h,a=d(g,m),u):[a(0),a(1)]}}return u.range=f(we),u.rangeRound=f(si),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return o=d,n=d(t),r=d(e),i=n===r?0:1/(r-n),u}}function vs(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function ys(){var t=re(Pg()(ct));return t.copy=function(){return vs(t,ys())},Qa.apply(t,arguments)}function Lg(){var t=0,e=.5,n=1,r=1,i,o,a,s,l,u=ct,f,d=!1,h;function g(p){return isNaN(p=+p)?h:(p=.5+((p=+f(p))-o)*(r*p<r*o?s:l),u(d?Math.max(0,Math.min(1,p)):p))}g.domain=function(p){return arguments.length?([t,e,n]=p,i=f(t=+t),o=f(e=+e),a=f(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,g):[t,e,n]},g.clamp=function(p){return arguments.length?(d=!!p,g):d},g.interpolator=function(p){return arguments.length?(u=p,g):u};function m(p){return function(_){var k,x,C;return arguments.length?([k,x,C]=_,u=Yf(p,[k,x,C]),g):[u(0),u(.5),u(1)]}}return g.range=m(we),g.rangeRound=m(si),g.unknown=function(p){return arguments.length?(h=p,g):h},function(p){return f=p,i=p(t),o=p(e),a=p(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,g}}function xs(){var t=re(Lg()(ct));return t.copy=function(){return vs(t,xs())},Qa.apply(t,arguments)}const Fo={scaleLinear:es,scalePow:hi,scaleSqrt:bh,scaleLog:is,scaleSymlog:os,scaleIdentity:ns,scaleTime:Ig,scaleUtc:zg,scaleSequential:ys,scaleDiverging:xs,scaleQuantize:ss,scaleQuantile:as,scaleThreshold:cs,scaleOrdinal:ui,scaleBand:er,scalePoint:jd};var Z;(function(t){t.X="x",t.Y="y"})(Z||(Z={}));var Wt;(function(t){t.West="west",t.East="east",t.North="north",t.South="south"})(Wt||(Wt={}));const Ug=Object.assign(Object.assign({},wa),{components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:Wt.North,preventEmptyDomain:null,scaleByDomain:!1,clipPathExtend:2});class Hg extends Ie{constructor(e,n,r){var i,o;super(e),this._defaultConfig=Ug,this.datamodel=new li,this.config=this._defaultConfig,this._clipPathId=$a(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append("clipPath").attr("id",this._clipPathId),this._clipPath.append("rect");const a="saturate",s=window.location.href.replace(window.location.hash,"");this.svg.attr("class",G`
|
|
53
|
-
--highlight-filter-id: url(${s}#${a}); // defining a css variable
|
|
54
|
-
`),this._svgDefs.append("filter").attr("id",a).attr("filterUnits","objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'),n&&this.updateContainer(n,!0),r&&this.setData(r,!0),(this.config.xAxis||this.config.yAxis||!((i=this.components)===null||i===void 0)&&i.some(l=>l.datamodel.data))&&this.render(),(o=document.fonts)===null||o===void 0||o.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return Rt(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return Rt(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){var r,i,o,a,s;const{components:l,config:u}=this;if(!e)return;this.datamodel.data=e,l.forEach(d=>{d.setData(e)}),(r=u.crosshair)===null||r===void 0||r.setData(e),(i=u.xAxis)===null||i===void 0||i.setData(e),(o=u.yAxis)===null||o===void 0||o.setData(e),!te(this.datamodel.data,e)&&((a=u.tooltip)===null||a===void 0||a.hide(),(s=u.crosshair)===null||s===void 0||s.hide()),n||this.render()}updateContainer(e,n){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=z.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=z.Y,this.element.appendChild(e.yAxis.element));for(const a of this.components)this.element.appendChild(a.element);const r=e.tooltip;r&&(r.hasContainer()||r.setContainer(this._container),r.setComponents(this.components));const i=e.crosshair;i&&(i.setContainer(this.svg),i.tooltip=r,this.element.appendChild(i.element));const o=e.annotations;o&&this.element.appendChild(o.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),n||this.render()}updateComponents(e,n){const{config:r}=this;this.components.forEach((i,o)=>{e[o]&&i.setConfig(e[o])}),this._updateScales(...this.components,r.xAxis,r.yAxis,r.crosshair),n||this.render()}update(e,n,r){r&&(this.datamodel.data=r),e&&this.updateContainer(e,!0),n&&this.updateComponents(n,!0),this.render()}_preRender(){const{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();const n=be([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]),r=this._getMargin();for(const i of n)i.setSize(this.width,this.height,this.containerWidth,this.containerHeight),i.setContainerMargin(r);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var n,r,i,o,a;const{config:s}=this;super._render();const l=this._getMargin();for(const d of this.components)d.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",d.clippable?`url(#${this._clipPathId})`:null).style("-webkit-clip-path",d.clippable?`url(#${this._clipPathId})`:null),d.render(e);this._renderAxes(this._firstRender?0:e);const u=s.clipPathExtend;this._clipPath.select("rect").attr("x",-u).attr("y",-u).attr("width",this.width+2*u).attr("height",this.height+2*u),(n=s.tooltip)===null||n===void 0||n.update();const f=s.crosshair;if(f){const d=this.components.filter(p=>!p.stacked).map(p=>p.config.y),h=this.components.filter(p=>p.stacked).map(p=>p.config.y),g=(r=this.components.find(p=>p.config.baseline))===null||r===void 0?void 0:r.config,m=g?.baseline;f.accessors={x:(i=this.components[0])===null||i===void 0?void 0:i.config.x,y:Dr(d),yStacked:Dr(h),baseline:m},f.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),f.render()}(o=s.annotations)===null||o===void 0||o.g.attr("transform",`translate(${l.left},${l.top})`),(a=s.annotations)===null||a===void 0||a.render(),this._firstRender=!1}_updateScales(...e){const n=be(e||this.components);this._setScales(...n),this._updateScalesDomain(...n),this._updateScalesRange(...n)}_setScales(...e){const{config:n}=this;e&&(n.xScale&&e.forEach(r=>r.setScale(Z.X,n.xScale)),n.yScale&&e.forEach(r=>r.setScale(Z.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const r=e.filter(i=>!i.config.excludeFromDomainCalculation);Object.values(Z).forEach(i=>{var o,a,s,l,u,f,d,h;const[g,m]=Dl(Fl(r.map(b=>b.getDataExtent(i,n.scaleByDomain)))),p=i===Z.Y?n.yDomain:n.xDomain,_=i===Z.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,k=i===Z.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,x=(a=(o=p?.[0])!==null&&o!==void 0?o:g)!==null&&a!==void 0?a:0,C=(l=(s=p?.[1])!==null&&s!==void 0?s:m)!==null&&l!==void 0?l:1,w=[Rt(x,(u=_?.[0])!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY,(f=_?.[1])!==null&&f!==void 0?f:Number.POSITIVE_INFINITY),Rt(C,(d=k?.[0])!==null&&d!==void 0?d:Number.NEGATIVE_INFINITY,(h=k?.[1])!==null&&h!==void 0?h:Number.POSITIVE_INFINITY)];if(w[0]===w[1]){const b=r.some(v=>{var y;return((y=v.datamodel.data)===null||y===void 0?void 0:y.length)>0});(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!b||i===Z.Y))&&(w[1]=w[0]+1)}e.forEach(b=>b.setScaleDomain(i,w))})}_updateScalesRange(...e){var n,r,i,o,a,s;const{config:l}=this;if(!e)return;const u=l.yDirection===Wt.South,f=[(n=l.padding.left)!==null&&n!==void 0?n:0,this.width-((r=l.padding.right)!==null&&r!==void 0?r:0)],d=[this.height-((i=l.padding.bottom)!==null&&i!==void 0?i:0),(o=l.padding.top)!==null&&o!==void 0?o:0];u&&d.reverse();for(const g of e)g.setSize(this.width,this.height,this.containerWidth,this.containerHeight),g.setScaleRange(Z.X,(a=l.xRange)!==null&&a!==void 0?a:f),g.setScaleRange(Z.Y,(s=l.yRange)!==null&&s!==void 0?s:d);const h=e.map(g=>g.bleed).reduce((g,m)=>{for(const p of Object.keys(g)){const _=p;g[_]<m[_]&&(g[_]=m[_])}return g},{top:0,bottom:0,left:0,right:0});for(const g of e)g.setScaleRange(Z.X,[f[0]+h.left,f[1]-h.right]),g.setScaleRange(Z.Y,u?[d[0]+h.top,d[1]-h.bottom]:[d[0]-h.bottom,d[1]+h.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:r}}=this,i=this._getMargin();be([n,r]).forEach(a=>{const s=a.getOffset(i);a.g.attr("transform",`translate(${s.left},${s.top})`),a.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,r=be([...this.components,e,n]);this._setScales(...r),this._updateScalesDomain(...r);const i=this._firstRender?2:1;for(let o=0;o<i;o+=1){const a={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...r),be([e,n]).forEach(l=>{l.preRender();const u=l.getRequiredMargin();a.top<u.top&&(a.top=u.top),a.bottom<u.bottom&&(a.bottom=u.bottom),a.left<u.left&&(a.left=u.left),a.right<u.right&&(a.right=u.right)}),this._axisMargin=a}}_getMargin(){const{config:{margin:e}}=this;return{top:e.top+this._axisMargin.top,bottom:e.bottom+this._axisMargin.bottom,left:e.left+this._axisMargin.left,right:e.right+this._axisMargin.right}}destroy(){const{components:e,config:{tooltip:n,crosshair:r,annotations:i,xAxis:o,yAxis:a}}=this;super.destroy();for(const s of e)s?.destroy();n?.destroy(),r?.destroy(),i?.destroy(),o?.destroy(),a?.destroy()}}const _s={duration:600,events:{},attributes:{}};class Wg{constructor(e=$e.SVG){var n,r;this.type=$e.SVG,this.datamodel=new li,this.sizing=he.Fit,this.events={},this._defaultConfig=_s,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._containerMargin={top:0,bottom:0,left:0,right:0},this._setUpComponentEventsThrottled=$n(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=$n(this._setCustomAttributes,500),e===$e.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=$a(),this.g=Ot(this.element);const i=(r=(n=this.constructor)===null||n===void 0?void 0:n.selectors)===null||r===void 0?void 0:r.root;i&&this.g.attr("class",i)}setContainerMargin(e){this._containerMargin=e}setConfig(e){this.prevConfig=this.config,this.config=ge(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,n,r,i){isFinite(e)&&(this._width=e),isFinite(n)&&(this._height=n),isFinite(r)&&(this._containerWidth=r),isFinite(i)&&(this._containerHeight=i)}render(e=this.config.duration){this._render(e);const n="animating";e&&(this.g.attr(n,""),this.g.transition(n).duration(e).on("end interrupt",()=>{this.g.attr(n,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){const e=this.config.attributes;Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(r=>{this.g.selectAll(`.${n}`).attr(r,e[n][r])})})}_setUpComponentEvents(){this._bindEvents(this.events),this._bindEvents(this.config.events,".user")}_bindEvents(e=this.events,n=""){Object.keys(e).forEach(r=>{Object.keys(e[r]).forEach(i=>{const o=this.g.selectAll(`.${r}`);o.on(i+n,(a,s)=>{const l=o.nodes(),u=l.indexOf(a.currentTarget),f=e[r][i];return f?.(s,a,u,l)})})})}destroy(){var e;(e=this.g)===null||e===void 0||e.remove(),this.element=void 0}isDestroyed(){return!this.element}}class Yg extends li{constructor(e){super(e)}get data(){var e;return(e=this._data)!==null&&e!==void 0?e:[]}set data(e){Array.isArray(e)&&(this._data=e)}}const ar=Object.assign(Object.assign({},_s),{x:void 0,y:void 0,id:(t,e)=>{var n;return(n=t.id)!==null&&n!==void 0?n:`${e}`},color:t=>t.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1});class bi extends Wg{constructor(){super(...arguments),this.datamodel=new Yg,this.clippable=!0,this.stacked=!1,this._defaultConfig=ar,this._xScale=Fo.scaleLinear(),this._yScale=Fo.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){var n,r;!((n=this.config)===null||n===void 0)&&n.xScale&&(e.xScale=this.config.xScale),!((r=this.config)===null||r===void 0)&&r.yScale&&(e.yScale=this.config.yScale),super.setConfig(e)}setScaleDomain(e,n){var r,i;e===Z.X&&((r=this._xScale)===null||r===void 0||r.domain(n)),e===Z.Y&&((i=this._yScale)===null||i===void 0||i.domain(n))}setScaleRange(e,n){var r,i;e===Z.X&&((r=this._xScale)===null||r===void 0||r.range(n)),e===Z.Y&&((i=this._yScale)===null||i===void 0||i.range(n))}setScale(e,n){n&&e===Z.X&&(this._xScale=n),n&&e===Z.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:r,datamodel:i}=this;switch(e){case Z.X:return this.getXDataExtent();case Z.Y:return this.getYDataExtent(n);default:return fn(i.data,r[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return fn(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:r}=this,i=this.xScale.domain(),o=e?Hl(r.data,i,n.x,!0):r.data,a=qe(n.y)?n.y:[n.y];return fn(o,...a)}}var D;(function(t){t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto"})(D||(D={}));var Io;(function(t){t.Absolute="absolute",t.Fixed="fixed"})(Io||(Io={}));var zo;(function(t){t.Inside="inside",t.Outside="outside",t.Center="center"})(zo||(zo={}));var Gn;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(Gn||(Gn={}));const Xg={components:[],container:void 0,followCursor:!0,allowHover:!1,horizontalPlacement:D.Auto,horizontalShift:0,verticalPlacement:D.Top,verticalShift:0,attributes:{},triggers:{},className:void 0,showDelay:void 0,hideDelay:void 0},sr=G`
|
|
55
|
-
label: tooltip;
|
|
56
|
-
display: inline-block;
|
|
57
|
-
left: 0;
|
|
58
|
-
bottom: 0;
|
|
59
|
-
min-width: max-content;
|
|
60
|
-
position: absolute;
|
|
61
|
-
opacity: 0;
|
|
62
|
-
transition: opacity;
|
|
63
|
-
transition-duration: var(--vis-tooltip-transition-duration);
|
|
64
|
-
z-index: 999999;
|
|
65
|
-
padding: var(--vis-tooltip-padding);
|
|
66
|
-
color: var(--vis-tooltip-text-color);
|
|
67
|
-
border-radius: var(--vis-tooltip-border-radius);
|
|
68
|
-
box-shadow: var(--vis-tooltip-box-shadow);
|
|
69
|
-
border: solid 1px var(--vis-tooltip-border-color);
|
|
70
|
-
background-color: var(--vis-tooltip-background-color);
|
|
71
|
-
backdrop-filter: var(--vis-tooltip-backdrop-filter);
|
|
72
|
-
`,qg=sr,Gg=je`
|
|
73
|
-
:root {
|
|
74
|
-
--vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
|
|
75
|
-
--vis-tooltip-border-color: #e5e9f7;
|
|
76
|
-
--vis-tooltip-text-color: #000;
|
|
77
|
-
--vis-tooltip-shadow-color: rgba(172, 179, 184, 0.35);
|
|
78
|
-
--vis-tooltip-backdrop-filter: none;
|
|
79
|
-
--vis-tooltip-padding: 10px 15px;
|
|
80
|
-
--vis-tooltip-border-radius: 5px;
|
|
81
|
-
--vis-tooltip-transition-duration: 300ms;
|
|
82
|
-
--vis-tooltip-box-shadow: none;
|
|
83
|
-
|
|
84
|
-
--vis-dark-tooltip-background-color: rgba(30,30,30, 0.95);
|
|
85
|
-
--vis-dark-tooltip-text-color: #e5e9f7;
|
|
86
|
-
--vis-dark-tooltip-border-color: var(--vis-color-grey);
|
|
87
|
-
--vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
body.theme-dark ${`.${sr}`} {
|
|
91
|
-
--vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
|
|
92
|
-
--vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
|
|
93
|
-
--vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
|
|
94
|
-
--vis-tooltip-shadow-color: var(--vis-dark-tooltip-shadow-color);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
body.theme-dark {
|
|
98
|
-
--vis-tooltip-background-color: rgba(30,30,30, 0.95);
|
|
99
|
-
--vis-tooltip-text-color: #e5e9f7;
|
|
100
|
-
--vis-tooltip-border-color: var(--vis-color-grey);
|
|
101
|
-
--vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
102
|
-
}
|
|
103
|
-
`,ws=G`
|
|
104
|
-
bottom: unset;
|
|
105
|
-
position: fixed;
|
|
106
|
-
`,xn=G`
|
|
107
|
-
opacity: 1;
|
|
108
|
-
`,_n=G`
|
|
109
|
-
display: none;
|
|
110
|
-
`,bs=G`
|
|
111
|
-
label: non-interactive;
|
|
112
|
-
pointer-events: none;
|
|
113
|
-
user-select: none;
|
|
114
|
-
`,jg=Object.freeze(Object.defineProperty({__proto__:null,hidden:_n,nonInteractive:bs,positionFixed:ws,root:sr,show:xn,tooltip:qg,variables:Gg},Symbol.toStringTag,{value:"Module"}));class ks{constructor(e={}){this._defaultConfig=Xg,this.config=this._defaultConfig,this._setUpEventsThrottled=$n(this._setUpEvents,500),this._setContainerPositionThrottled=$n(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=Ot(this.element).attr("class",sr).classed(xn,!1).classed(_n,!0),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){var n;this.prevConfig=this.config,this.config=ge(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==((n=this.prevConfig)===null||n===void 0?void 0:n.container)&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var n;(n=this.element.parentNode)===null||n===void 0||n.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,n){this.render(e),this.place(n)}_hide(){this.div.classed(xn,!1).on("transitionend",()=>{this.div.classed(_n,!this._isShown)}),this._isShown=!1}hide(){window.clearTimeout(this._showDelayTimeoutId),this.config.hideDelay?(window.clearTimeout(this._hideDelayTimeoutId),this._hideDelayTimeoutId=setTimeout(()=>this._hide(),this.config.hideDelay)):this._hide()}_display(){window.clearTimeout(this._hideDelayTimeoutId),this.div.classed(_n,!1).classed(xn,!0),this._isShown=!0}display(){this._isShown||(this.config.showDelay?(window.clearTimeout(this._showDelayTimeoutId),this._showDelayTimeoutId=setTimeout(()=>{this._display(),this.place({x:this._position[0],y:this._position[1]})},this.config.showDelay)):this._display())}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");return}const{config:n}=this,r=this.element.offsetWidth,i=this.element.offsetHeight,o=this._overriddenHorizontalPlacement||(n.horizontalPlacement===D.Auto?D.Center:n.horizontalPlacement),a=n.verticalPlacement===D.Auto?e.y-i<0?D.Bottom:D.Top:n.verticalPlacement,s=5,l=o===D.Left?-r-s-n.horizontalShift:o===D.Center?-r/2:s+n.horizontalShift,u=a===D.Bottom?s+n.verticalShift:a===D.Center?-i/2:-s-n.verticalShift-i,[f,d]=this._constraintPosToContainer(e.x+l,e.y+u,r,i);this._applyPosition(f,d,i)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const r=5,i=this.element.offsetWidth,o=this.element.offsetHeight,a=this.isContainerBody(),s=a?window.innerWidth:this._container.scrollWidth,l=e.getBoundingClientRect(),u=a?[l.x,l.y]:Dn({clientX:l.x,clientY:l.y,pageX:l.x,pageY:l.y},this._container),f=this._overriddenHorizontalPlacement||(n.horizontalPlacement===D.Auto?u[0]-i<0?D.Right:u[0]+i>s?D.Left:D.Center:n.horizontalPlacement);let d=0;switch(f){case D.Left:d=-i-r-n.horizontalShift;break;case D.Right:d=l.width+r+n.horizontalShift;break;case D.Center:default:d=(-i+l.width)/2;break}const h=n.verticalPlacement===D.Auto?f!==D.Center?D.Center:u[1]-o<0?D.Bottom:D.Top:n.verticalPlacement;let g=-o;switch(h){case D.Center:g+=(o+l.height)/2;break;case D.Bottom:g+=o+l.height+r+n.verticalShift;break;case D.Top:default:g+=-r-n.verticalShift;break}const[m,p]=this._constraintPosToContainer(u[0]+d,u[1]+g,i,o);this._applyPosition(m,p,o)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){var n;const{config:r,prevConfig:i}=this;e instanceof HTMLElement?this.div.select(":first-child").node()!==e&&this.div.html("").append(()=>e):e!==null&&this.div.html(e||""),this.div.classed((n=r.className)!==null&&n!==void 0?n:"",!!r.className).classed(bs,!r.allowHover),i?.className&&i.className!==r.className&&this.div.classed(i.className,!1),this.display()}_applyPosition(e,n,r){const i=this.isContainerBody(),o=i?window.innerHeight:this._container.scrollHeight;this.div.classed(ws,i).style("top",i?`${n}px`:"unset").style("bottom",i?"unset":`${o-n-r}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,r,i){const o=this.isContainerBody(),a=o?window.innerHeight:this._container.scrollHeight,s=o?window.innerWidth:this._container.scrollWidth,l=10,u=e>s-r-l,f=e<l,d=u?s-r-l:f?l:e,h=10,g=n>a-i-h,m=n<h,p=g?a-i-h:m?h:n;return[s<r?0:d,a<i?0:p]}_setContainerPosition(){var e;this._container!==document.body&&((e=getComputedStyle(this._container))===null||e===void 0?void 0:e.position)==="static"&&(this._container.style.position="relative")}_setUpEvents(){const{config:e}=this;this.components.forEach(n=>{const r=Ot(n.element);r.on("mousemove.tooltip",i=>{const{config:o}=this,a=i.composedPath&&i.composedPath()||i.path||[i.target];for(const s of Object.keys(o.triggers)){const l=o.triggers[s];if(!l)continue;const u=r.selectAll(`.${s}`).nodes();for(const f of a){if(f===r.node())break;if(f.classList.contains(s)){const d=u.indexOf(f),h=Ot(f).datum(),g=l(h,d,u),[m,p]=this.isContainerBody()?[i.clientX,i.clientY]:Dn(i,this._container);g===null?this.hide():(this.render(g),o.followCursor?this.place({x:m,y:p}):this.placeByElement(f)),i.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",i=>{i.stopPropagation(),this.hide()})}),e.allowHover?this.div.on("mouseenter.tooltip",this._display.bind(this)).on("mouseleave.tooltip",this.hide.bind(this)):this.div.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null)}_setUpAttributes(){const e=this.config.attributes;e&&Object.keys(e).forEach(n=>{this.div.attr(n,e[n])})}destroy(){var e;this._mutationObserver.disconnect(),window.clearTimeout(this._hideDelayTimeoutId),window.clearTimeout(this._showDelayTimeoutId),(e=this.div)===null||e===void 0||e.remove()}}ks.selectors=jg;function ce(t,e,n,r){return Array.isArray(e)&&isFinite(n)?e[n%e.length]:Ar(t,e,n)||(Yt(n)?`var(${Lt(n)})`:null)}function Zg({x:t,y:e,w:n,h:r,tl:i=!1,tr:o=!1,bl:a=!1,br:s=!1,r:l=0}){let u;u=`M${t+l},${e}h${n-2*l}`;let f=o?l:0,d=o?0:l;return u+=`a${f},${f} 0 0 1 ${f},${f}`,u+=`h${d}v${d}`,u+=`v${r-2*l}`,f=s?l:0,d=s?0:l,u+=`a${f},${f} 0 0 1 ${-f},${f}`,u+=`v${d}h${-d}`,u+=`h${2*l-n}`,f=a?l:0,d=a?0:l,u+=`a${f},${f} 0 0 1 ${-f},${-f}`,u+=`h${-d}v${-d}`,u+=`v${2*l-r}`,f=i?l:0,d=i?0:l,u+=`a${f},${f} 0 0 1 ${f},${-f}`,u+=`v${-d}h${d}`,u+="z",u}const Qg=Object.assign(Object.assign({},ar),{color:void 0,groupMaxWidth:void 0,groupWidth:void 0,dataStep:void 0,groupPadding:.05,barPadding:0,roundedCorners:2,barMinHeight:2,cursor:null,orientation:Gn.Vertical}),Cs=G`
|
|
115
|
-
label: grouped-bar-component;
|
|
116
|
-
`,Kg=je`
|
|
117
|
-
:root {
|
|
118
|
-
--vis-grouped-bar-cursor: default;
|
|
119
|
-
--vis-grouped-bar-fill-color: var(--vis-color-main);
|
|
120
|
-
--vis-grouped-bar-stroke-color: none;
|
|
121
|
-
--vis-grouped-bar-stroke-width: 0px;
|
|
122
|
-
--vis-grouped-bar-hover-stroke-width: 1px;
|
|
123
|
-
--vis-grouped-bar-hover-stroke-color: none;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/* Dark Theme */
|
|
127
|
-
--vis-dark-grouped-bar-stroke-color: none;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
body.theme-dark ${`.${Cs}`} {
|
|
131
|
-
--vis-grouped-bar-stroke-color: var(--vis-dark-grouped-bar-stroke-color);
|
|
132
|
-
}
|
|
133
|
-
`,wn=G`
|
|
134
|
-
label: bar;
|
|
135
|
-
fill: var(--vis-grouped-bar-fill-color);
|
|
136
|
-
stroke: var(--vis-grouped-bar-stroke-color);
|
|
137
|
-
stroke-width: var(--vis-grouped-bar-stroke-width);
|
|
138
|
-
cursor: var(--vis-grouped-bar-cursor);
|
|
139
|
-
|
|
140
|
-
&:hover {
|
|
141
|
-
stroke-width: var(--vis-grouped-bar-hover-stroke-width);
|
|
142
|
-
stroke: var(--vis-grouped-bar-hover-stroke-color);
|
|
143
|
-
}
|
|
144
|
-
`,Hr=G`
|
|
145
|
-
label: barGroup;
|
|
146
|
-
`,Ss=G`
|
|
147
|
-
label: barGroupExit;
|
|
148
|
-
`,Jg=Object.freeze(Object.defineProperty({__proto__:null,bar:wn,barGroup:Hr,barGroupExit:Ss,globalStyles:Kg,root:Cs},Symbol.toStringTag,{value:"Module"}));class Ts extends bi{constructor(e){super(),this._defaultConfig=Qg,this.config=this._defaultConfig,this.getAccessors=()=>qe(this.config.y)?this.config.y:[this.config.y],this.events={},this._barData=[],e&&this.setConfig(e)}get bleed(){if(this._barData=this._getVisibleData(),this._barData.length===0)return{top:0,bottom:0,left:0,right:0};const e=!this.isVertical()&&this.dataScale.range()[0]>this.dataScale.range()[1],n=this.dataScale.domain(),r=this._getGroupWidth()/2,i=this._barData.map((g,m)=>et(g,this.config.x,m)),o=Be(i),a=Mr(i),s=this.dataScale(o),l=this.dataScale(a),u=this.dataScale.invert(s+(e?r:-r)),f=this.dataScale.invert(l+(e?-r:r)),d=u<=n[0]?this.dataScale(n[0])-this.dataScale(u):0,h=f>n[1]?this.dataScale(f)-this.dataScale(n[1]):0;return{top:this.isVertical()?0:e?-h:d,bottom:this.isVertical()?0:e?-d:h,left:this.isVertical()?d:0,right:this.isVertical()?h:0}}get dataScale(){return this.isVertical()?this.xScale:this.yScale}get valueScale(){return this.isVertical()?this.yScale:this.xScale}isVertical(){return this.config.orientation===Gn.Vertical}_render(e){const{config:n}=this,r=Yt(e)?e:n.duration,i=this._getGroupWidth(),o=this.getAccessors(),a=[-i/2,i/2],s=er().domain(fa(o.length)).range(a).paddingInner(n.barPadding).paddingOuter(n.barPadding),l=this.g.selectAll(`.${Hr}`).data(this._barData,(x,C)=>{var w;return`${(w=Ar(x,n.id,C))!==null&&w!==void 0?w:C}`}),u=(x,C)=>{const w=this.dataScale(et(x,n.x,C)),b=this.isVertical()?w:0,v=this.isVertical()?0:w;return`translate(${b},${v})`},d=l.enter().append("g").attr("class",Hr).attr("transform",u).style("opacity",1).merge(l);mt(d,r).attr("transform",u).style("opacity",1);const h=l.exit().attr("class",Ss);mt(h,r).style("opacity",0).remove(),mt(h.selectAll(`.${wn}`),r).attr("transform",(x,C,w)=>this.isVertical()?`translate(0,${this.yScale(0)}) scale(1,0)`:`translate(${this.xScale(0)},0) scale(0,1)`);const g=s.bandwidth(),m=d.selectAll(`.${wn}`).data(x=>o.map(()=>x)),p=this._getValueAxisDirection(),k=m.enter().append("path").attr("class",wn).attr("d",(x,C)=>{const w=s(C),b=this.valueScale(0),v=g;return this._getBarPath(w,b,v,0,!1,p)}).style("fill",(x,C)=>ce(x,n.color,C)).merge(m);mt(k,r).attr("d",(x,C)=>{const w=s(C),b=g,v=et(x,o[C]),y=v<0;let N=y?this.valueScale(0):this.valueScale(v||0),E=Math.abs(this.valueScale(0)-this.valueScale(v))||0;if(E<n.barMinHeight){const R=p===Wt.North?-1:1;N=this.valueScale(0)+R*n.barMinHeight,E=n.barMinHeight}return this._getBarPath(w,N,b,E,y,p)}).style("fill",(x,C)=>ce(x,n.color,C)).style("cursor",(x,C)=>Ar(x,n.cursor,C)),mt(m.exit(),r).remove()}_getValueAxisDirection(){return this.valueScale.range()[0]>this.valueScale.range()[1]?Wt.North:Wt.South}_getVisibleData(){const{config:e,datamodel:{data:n}}=this,r=this._getGroupWidth(),i=n.length<2?0:r/2,o=this.dataScale,a=Math.abs(o.invert(i)-o.invert(0));return n?.filter((l,u)=>{const f=et(l,e.x,u),d=o.domain(),h=+d[0],g=+d[1];return f>=h-a&&f<=g+a})}_getBarPath(e,n,r,i,o,a){const{config:s}=this,l=s.roundedCorners?Yt(s.roundedCorners)?+s.roundedCorners:r/2:0,u=Rt(l,0,Math.min(i,r)/2),f=a===Wt.North,d=this.isVertical()&&o!==f,h=this.isVertical()&&o===f,g=!this.isVertical()&&o,m=!this.isVertical()&&!o;return Zg({x:this.isVertical()?e:n+(f?0:-i),y:this.isVertical()?n+(f?0:-i):e,w:this.isVertical()?r:i,h:this.isVertical()?i:r,tl:d||g,tr:d||m,bl:h||g,br:h||m,r:u})}_getGroupWidth(){const{config:e,datamodel:{data:n}}=this;if(Ll(n))return 0;if(e.groupWidth)return Be([e.groupWidth,e.groupMaxWidth]);const r=this.dataScale.bandwidth,i=this.dataScale.domain?this.dataScale.domain():[];let a=1+(r?i.length:i[1]-i[0])/e.dataStep||!r&&n.filter((u,f)=>{const d=et(u,e.x,f);return d>=i[0]&&d<=i[1]}).length||n.length;!r&&a>=2&&(a+=1);const l=(a<2?1:1-e.groupPadding)*(this.isVertical()?this._width:this._height)/a;return Be([l,e.groupMaxWidth])}getValueScaleExtent(e){const{datamodel:n}=this,r=this.getAccessors(),i=e?this._getVisibleData():n.data,o=ha(i,...r),a=ga(i,...r);return[o>0?0:o,a<0?0:a]}getDataScaleExtent(){const{config:e,datamodel:n}=this;return fn(n.data,e.x)}getYDataExtent(e){return this.isVertical()?this.getValueScaleExtent(e):this.getDataScaleExtent()}getXDataExtent(){return this.isVertical()?this.getDataScaleExtent():this.getValueScaleExtent(!1)}}Ts.selectors=Jg;function tp(t){return t}var bn=1,kn=2,Wr=3,Ne=4,Po=1e-6;function ep(t){return"translate("+t+",0)"}function np(t){return"translate(0,"+t+")"}function rp(t){return e=>+t(e)}function ip(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function op(){return!this.__axis}function cr(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===bn||t===Ne?-1:1,f=t===Ne||t===kn?"x":"y",d=t===bn||t===Wr?ep:np;function h(g){var m=r??(e.ticks?e.ticks.apply(e,n):e.domain()),p=i??(e.tickFormat?e.tickFormat.apply(e,n):tp),_=Math.max(o,0)+s,k=e.range(),x=+k[0]+l,C=+k[k.length-1]+l,w=(e.bandwidth?ip:rp)(e.copy(),l),b=g.selection?g.selection():g,v=b.selectAll(".domain").data([null]),y=b.selectAll(".tick").data(m,e).order(),N=y.exit(),E=y.enter().append("g").attr("class","tick"),R=y.select("line"),V=y.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),y=y.merge(E),R=R.merge(E.append("line").attr("stroke","currentColor").attr(f+"2",u*o)),V=V.merge(E.append("text").attr("fill","currentColor").attr(f,u*_).attr("dy",t===bn?"0em":t===Wr?"0.71em":"0.32em")),g!==b&&(v=v.transition(g),y=y.transition(g),R=R.transition(g),V=V.transition(g),N=N.transition(g).attr("opacity",Po).attr("transform",function(M){return isFinite(M=w(M))?d(M+l):this.getAttribute("transform")}),E.attr("opacity",Po).attr("transform",function(M){var q=this.parentNode.__axis;return d((q&&isFinite(q=q(M))?q:w(M))+l)})),N.remove(),v.attr("d",t===Ne||t===kn?a?"M"+u*a+","+x+"H"+l+"V"+C+"H"+u*a:"M"+l+","+x+"V"+C:a?"M"+x+","+u*a+"V"+l+"H"+C+"V"+u*a:"M"+x+","+l+"H"+C),y.attr("opacity",1).attr("transform",function(M){return d(w(M)+l)}),R.attr(f+"2",u*o),V.attr(f,u*_).text(p),b.filter(op).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===kn?"start":t===Ne?"end":"middle"),b.each(function(){this.__axis=w})}return h.scale=function(g){return arguments.length?(e=g,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(g){return arguments.length?(n=g==null?[]:Array.from(g),h):n.slice()},h.tickValues=function(g){return arguments.length?(r=g==null?null:Array.from(g),h):r&&r.slice()},h.tickFormat=function(g){return arguments.length?(i=g,h):i},h.tickSize=function(g){return arguments.length?(o=a=+g,h):o},h.tickSizeInner=function(g){return arguments.length?(o=+g,h):o},h.tickSizeOuter=function(g){return arguments.length?(a=+g,h):a},h.tickPadding=function(g){return arguments.length?(s=+g,h):s},h.offset=function(g){return arguments.length?(l=+g,h):l},h}function Lo(t){return cr(bn,t)}function Uo(t){return cr(kn,t)}function Ho(t){return cr(Wr,t)}function Wo(t){return cr(Ne,t)}var Xt;(function(t){t.Start="start",t.Middle="middle",t.End="end"})(Xt||(Xt={}));var Jt;(function(t){t.Top="top",t.Middle="middle",t.Bottom="bottom"})(Jt||(Jt={}));var Nt;(function(t){t.Wrap="wrap",t.Trim="trim"})(Nt||(Nt={}));var wt;(function(t){t.Left="left",t.Center="center",t.Right="right"})(wt||(wt={}));var Cn={exports:{}},ap=Cn.exports,Yo;function sp(){return Yo||(Yo=1,(function(t){(function(e){if(typeof n!="function"){var n=function(m){return m};n.nonNative=!0}const r=n("plaintext"),i=n("html"),o=n("comment"),a=/<(\w*)>/g,s=/<\/?([^\s\/>]+)/;function l(m,p,_){m=m||"",p=p||[],_=_||"";let k=f(p,_);return d(m,k)}function u(m,p){m=m||[],p=p||"";let _=f(m,p);return function(x){return d(x||"",_)}}l.init_streaming_mode=u;function f(m,p){return m=h(m),{allowable_tags:m,tag_replacement:p,state:r,tag_buffer:"",depth:0,in_quote_char:""}}function d(m,p){if(typeof m!="string")throw new TypeError("'html' parameter must be a string");let _=p.allowable_tags,k=p.tag_replacement,x=p.state,C=p.tag_buffer,w=p.depth,b=p.in_quote_char,v="";for(let y=0,N=m.length;y<N;y++){let E=m[y];if(x===r)E==="<"?(x=i,C+=E):v+=E;else if(x===i)switch(E){case"<":if(b)break;w++;break;case">":if(b)break;if(w){w--;break}b="",x=r,C+=">",_.has(g(C))?v+=C:v+=k,C="";break;case'"':case"'":E===b?b="":b=b||E,C+=E;break;case"-":C==="<!-"&&(x=o),C+=E;break;case" ":case`
|
|
149
|
-
`:if(C==="<"){x=r,v+="< ",C="";break}C+=E;break;default:C+=E;break}else x===o&&(E===">"?(C.slice(-2)=="--"&&(x=r),C=""):C+=E)}return p.state=x,p.tag_buffer=C,p.depth=w,p.in_quote_char=b,v}function h(m){let p=new Set;if(typeof m=="string"){let _;for(;_=a.exec(m);)p.add(_[1])}else!n.nonNative&&typeof m[n.iterator]=="function"?p=new Set(m):typeof m.forEach=="function"&&m.forEach(p.add,p);return p}function g(m){let p=s.exec(m);return p?p[1].toLowerCase():null}t.exports?t.exports=l:e.striptags=l})(ap)})(Cn)),Cn.exports}var cp=sp();const lp=Qu(cp);function up(t){switch(t){case wt.Center:return"middle";case wt.Right:return"end";case wt.Left:default:return"start"}}const fp=t=>{switch(t){case wt.Left:return"start";case wt.Right:return"end";case wt.Center:return"middle";default:return null}};function dp(t){return t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function hp(t){var e;return(e=t.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g))===null||e===void 0?void 0:e.filter(Boolean).map(n=>n.toLowerCase()).join("-")}function gp(t){return t.replace(/['"]/g,"'").replace(/\u0000/g,"\\0").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\t/g,"\\t").replace(/\f/g,"\\f")}function pp(t,e=15){return t?t.length>e?`…${t.substr(t.length-e,e)}`:t:""}function mp(t,e=15){if(!t)return"";const n=Math.floor((e-3)/2);return t.length>e?`${t.substr(0,n)}…${t.substr(-n,n)}`:t}function vp(t,e=15){return t?t.length>e?`${t.substr(0,e)}…`:t:""}function yp(t,e=15,n=Xt.Middle){if(!t)return"";let r=vp(t,e);return n===Xt.Start?r=pp(t,e):n===Xt.Middle&&(r=mp(t,e)),r}function Ms(t,e=[" "]){let n=[t];for(let r=0;r<e.length;r++){const i=e[r];n.forEach((o,a)=>{const s=o.split(i),l=s.map((u,f)=>`${u}${f===s.length-1?"":i}`);n[a]=l}),n=Dr(n)}return n}function xp(t,e,n=[" ","-",".",","]){const r=t.text();if(!r)return;const i=qe(n)?n:[n],o=Ms(r,i),a=parseFloat(t.attr("x"))||0;t.text("");let s=t.append("tspan").attr("x",a),l=`${o[0]}`;s.text(l),o.forEach((u,f)=>{if(f===0)return;const d=`${l}${u}`;s.text(d),s.node().getComputedTextLength()>e?(s.text(l.trim()),s=t.append("tspan").attr("x",a).attr("dy","1.2em").text(u),l=u):l+=u})}function Xo(t,e,n,r,i,o){var a;e===void 0&&(e=50),n===void 0&&(n=Xt.Middle),i===void 0&&(i=+((a=window.getComputedStyle(t.node()))===null||a===void 0?void 0:a.fontSize)||0),o===void 0&&(o=Ia());const s=t.text()||"",l=s.length,u=i*l*o,d=Math.ceil(l*e/(1.1*u));return d<l?(t.text(yp(s,d,n)),!0):!1}function Sn(t,e,n=Ia()){return t.length*e*n||0}function Tn(t,e,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),o=document.createElementNS(r,"text");o.textContent=t,o.setAttribute("font-size",`${n}`),o.setAttribute("font-family",e),i.appendChild(o),document.body.appendChild(i);const a=o.getComputedTextLength();return document.body.removeChild(i),a}function _p(t,e=void 0,n=!0,r=Oa,i=!1){var o,a,s;const l=`${t.text}`;if(!l)return[];const u=(o=t.fontSize)!==null&&o!==void 0?o:Oe.fontSize,f=(a=t.fontFamily)!==null&&a!==void 0?a:Oe.fontFamily,d=(s=t.fontWidthToHeightRatio)!==null&&s!==void 0?s:Oe.fontWidthToHeightRatio,h=Array.isArray(r)?r:[r];return l.split(`
|
|
150
|
-
`).map(m=>{const p=[];if(!e)return[m];const _=Ms(m,h);let k="";for(let x=0;x<_.length;x+=1){(n?Sn(k+_[x],u,d):Tn(k+_[x],f,u))<e||x===0?k+=_[x]:(p.push(k.trim()),k=_[x]);const w=2;if(i)for(;k.trim().length>w&&(n?Sn(k,u,d):Tn(k,f,u))>e;){let v=k.trim().length-w;for(;v>0;){const y=`${k.substring(0,v)}${Fa}`;if((n?Sn(y,u,d):Tn(y,f,u))<=e||v===1){p.push(y.trim()),k=k.substring(v);break}v--}}}return k&&p.push(k.trim()),p}).flat()}function wp(t,e=void 0,n=void 0,r=!0,i=Oa,o=!1){const a=Array.isArray(t)?t.map(d=>ge(Oe,d)):[ge(Oe,t)],s=a.map(d=>_p(d,e,r,i,o)),l=a[0];let u=-l.fontSize*(l.lineHeight-1);const f=[];return a.forEach((d,h)=>{var g;let m=s[h];const p=h>0?f[h-1]:void 0,_=p?p.marginBottom:0,k=d.marginTop,x=Math.max(_,k);u+=x;const C=d.fontSize*d.lineHeight;let w=0;for(let b=0;b<m.length;b+=1){let v=m[b];u+=C;const y=`${v} …`,N=r?Sn(y,d.fontSize,d.fontWidthToHeightRatio):Tn(y,d.fontFamily,d.fontSize);if(w=Math.max(N,w),n&&u+C>n&&b!==m.length-1){v.charAt(v.length-1)===Fa&&(v=v.substr(0,m[b].length-1)),N<e?m[b]=y:m[b]=`${m[b].substr(0,m[b].length-2)}…`,m=m.slice(0,b+1);break}}f.push(Object.assign(Object.assign({},d),{_lines:m,_estimatedHeight:u-(p?._estimatedHeight||0),_maxWidth:Math.max(w,(g=p?._maxWidth)!==null&&g!==void 0?g:0)}))}),f}function bp(t,e=0,n){return t.map((r,i)=>{const o=i>0?t[i-1]:void 0,a=o?o.marginBottom/o.fontSize:0,s=r.marginTop/r.fontSize,l=Math.max(a,s),u={fontSize:r.fontSize,fontFamily:r.fontFamily,fontWeight:r.fontWeight,fill:r.color,y:i===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(u).filter(([d,h])=>h).map(([d,h])=>`${hp(d)}="${gp(h.toString())}"`).join(" ")}>${r._lines.map((d,h)=>{let g;return i===0&&h===0?g=.8+l:h===0?g=l+r.lineHeight:g=r.lineHeight,`<tspan x="${e}" dy="${g}em">${d.length?d:" "}</tspan>`}).join("")}</tspan>`})}function kp(t){return Il(t,e=>e._estimatedHeight)}const Cp=["text","tspan","textPath","altGlyph","altGlyphDef","altGlyphItem","glyphRef","textRef","textArea"];function Sp(t,e,n,r){var i,o;const a=wp(e,n.width,void 0,n.fastMode,n.separator,n.wordBreak),s=(i=n.x)!==null&&i!==void 0?i:+t.getAttribute("x"),l=(o=n.y)!==null&&o!==void 0?o:+t.getAttribute("y"),u=s??0;let f=l??0;if(n.textAlign&&t.setAttribute("text-anchor",up(n.textAlign)),n.verticalAlign&&n.verticalAlign!==Jt.Top){const d=kp(a),h=n.verticalAlign===Jt.Middle?-d/2:n.verticalAlign===Jt.Bottom?-d:0;f+=h}n.textRotationAngle?t.setAttribute("transform",`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${u} ${f})`):t.removeAttribute("transform");{const d=new DOMParser;t.textContent="",a.forEach(h=>{const g=bp([h],u,f).join(""),m=lp(g,Cp),p=d.parseFromString(m,"image/svg+xml").firstChild;t.appendChild(p)})}}const Tp=Object.assign(Object.assign({},ar),{position:void 0,type:void 0,label:void 0,labelFontSize:null,labelTextFitMode:Nt.Wrap,labelTextTrimType:Xt.Middle,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,minMaxTicksOnlyShowGridLines:!1,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:Xt.Middle,tickTextFitMode:Nt.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickTextHideOverlapping:void 0});function Mp(t,e){const n="--vis-",r=Object.entries(t);return Object.fromEntries(r.map(([i])=>[dp(i.replace(n,"")),i]))}function Dp(t,e){je({":root":t,[`body.theme-dark .${e}`]:Object.keys(t).filter(n=>n.includes("--vis-dark")).map(n=>({[n.replace("--vis-dark","--vis")]:`var(${n})`}))})}const Ds=G`
|
|
151
|
-
label: axis-component;
|
|
152
|
-
`,ki={"--vis-axis-tick-color":"#e8e9ef","--vis-axis-grid-color":"#e8e9ef","--vis-axis-grid-line-width":"1px","--vis-axis-grid-line-dasharray":"none","--vis-axis-label-font-size":"14px","--vis-axis-label-color":"#6c778c","--vis-axis-label-weight":"500","--vis-axis-tick-label-color":"#6c778c","--vis-axis-tick-label-font-size":"12px","--vis-axis-tick-label-weight":"500","--vis-axis-tick-label-cursor":"default","--vis-axis-tick-label-text-decoration":"none","--vis-axis-tick-line-width":"1px","--vis-axis-tick-label-hide-transition":"opacity 400ms ease-in-out","--vis-dark-axis-tick-color":"#6c778c","--vis-dark-axis-tick-label-color":"#e8e9ef","--vis-dark-axis-grid-color":"#6c778c","--vis-dark-axis-label-color":"#fefefe"},Ap=Mp(ki);Dp(ki,Ds);const Ci=G`
|
|
153
|
-
label: hide-tick-line;
|
|
154
|
-
`,Si=G`
|
|
155
|
-
label: hide-domain;
|
|
156
|
-
`,As=G`
|
|
157
|
-
label: axis;
|
|
158
|
-
|
|
159
|
-
user-select: none;
|
|
160
|
-
|
|
161
|
-
.domain {
|
|
162
|
-
stroke: var(--vis-axis-domain-color, var(--vis-axis-tick-color));
|
|
163
|
-
stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
|
|
164
|
-
stroke-dasharray: var(--vis-axis-domain-line-dasharray, var(--vis-axis-grid-line-dasharray));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&${`.${Ci}`} {
|
|
168
|
-
.tick > line {
|
|
169
|
-
opacity: 0;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&${`.${Si}`} {
|
|
174
|
-
.domain {
|
|
175
|
-
opacity: 0;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
`,Es=G`
|
|
179
|
-
label: grid;
|
|
180
|
-
|
|
181
|
-
.domain {
|
|
182
|
-
opacity: 0;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
line {
|
|
186
|
-
stroke: var(--vis-axis-grid-color);
|
|
187
|
-
stroke-width: var(--vis-axis-grid-line-width);
|
|
188
|
-
stroke-dasharray: var(--vis-axis-grid-line-dasharray);
|
|
189
|
-
}
|
|
190
|
-
`,Ns=G`
|
|
191
|
-
label: tick;
|
|
192
|
-
|
|
193
|
-
stroke: none;
|
|
194
|
-
font-size: var(--vis-axis-tick-label-font-size);
|
|
195
|
-
font-weight: var(--vis-axis-tick-label-weight);
|
|
196
|
-
|
|
197
|
-
line {
|
|
198
|
-
stroke: var(--vis-axis-tick-color);
|
|
199
|
-
stroke-width: var(--vis-axis-tick-line-width);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
text {
|
|
203
|
-
fill: var(--vis-axis-tick-label-color);
|
|
204
|
-
cursor: var(--vis-axis-tick-label-cursor);
|
|
205
|
-
font-family: var(--vis-axis-font-family, var(--vis-font-family));
|
|
206
|
-
text-decoration: var(--vis-axis-tick-label-text-decoration);
|
|
207
|
-
stroke: none;
|
|
208
|
-
}
|
|
209
|
-
`,Yr=G`
|
|
210
|
-
label: tick-text-exiting;
|
|
211
|
-
`,Xr=G`
|
|
212
|
-
label: label;
|
|
213
|
-
fill: var(--vis-axis-label-color);
|
|
214
|
-
font-size: var(--vis-axis-label-font-size);
|
|
215
|
-
font-weight: var(--vis-axis-label-weight);
|
|
216
|
-
font-family: var(--vis-axis-font-family, var(--vis-font-family));
|
|
217
|
-
text-anchor: middle;
|
|
218
|
-
`,$s=G`
|
|
219
|
-
label: tick-label;
|
|
220
|
-
`,Rs=G`
|
|
221
|
-
label: tick-label-hideable;
|
|
222
|
-
opacity: 0;
|
|
223
|
-
transition: var(--vis-axis-tick-label-hide-transition);
|
|
224
|
-
`,Ep=Object.freeze(Object.defineProperty({__proto__:null,axis:As,cssVarDefaults:ki,grid:Es,hideDomain:Si,hideTickLine:Ci,label:Xr,root:Ds,tick:Ns,tickLabel:$s,tickLabelHideable:Rs,tickTextExiting:Yr,variables:Ap},Symbol.toStringTag,{value:"Module"}));class Bs extends bi{constructor(e){super(),this._defaultConfig=Tp,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},e&&this.setConfig(e),this.axisGroup=this.g.append("g"),this.gridGroup=this.g.append("g").attr("class",Es)}preRender(){const{config:e}=this,n=this.g.append("g").attr("opacity",0);this._renderAxis(n,0),this._axisRawBBox=n.node().getBBox(),e.tickTextAlign&&this._alignTickLabels(),this._renderAxisLabel(n),this._axisSizeBBox=this._getAxisSize(n),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),n.remove()}getPosition(){const{config:{type:e,position:n}}=this;return n??(e===z.X?D.Bottom:D.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){const{config:{type:n,position:r}}=this;switch(n){case z.X:{const o=this._axisSizeBBox.x+this._axisSizeBBox.width,a=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,s=o-this._width>1?o-this._width:0;switch(r){case D.Top:return{top:e.height,left:a,right:s};case D.Bottom:default:return{bottom:e.height,left:a,right:s}}}case z.Y:{const i=e.height>this._height?(e.height-this._height)/2:0,o=i,a=i;switch(r){case D.Right:return{right:e.width,top:o,bottom:a};case D.Left:default:return{left:e.width,top:o,bottom:a}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){const{config:{type:n,position:r}}=this;switch(n){case z.X:switch(r){case D.Top:return{top:e.top,left:e.left};case D.Bottom:default:return{top:e.top+this._height,left:e.left}}case z.Y:switch(r){case D.Right:return{top:e.top,left:e.left+this._width};case D.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,n=this.axisGroup){const{config:r}=this;if(this._renderAxis(n,e),this._renderAxisLabel(n),r.gridLine){const i=this._buildGrid();this.gridGroup.selectAll("*").interrupt(),mt(this.gridGroup,e).call(i).style("opacity",1)}else mt(this.gridGroup,e).style("opacity",0);r.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(n)}_buildAxis(){const{config:{type:e,position:n,tickPadding:r}}=this,i=this._getNumTicks();switch(e){case z.X:switch(n){case D.Top:return Lo(this.xScale).ticks(i).tickPadding(r);case D.Bottom:default:return Ho(this.xScale).ticks(i).tickPadding(r)}case z.Y:switch(n){case D.Right:return Uo(this.yScale).ticks(i).tickPadding(r);case D.Left:default:return Wo(this.yScale).ticks(i).tickPadding(r)}}}_buildGrid(){const{config:e}=this;let n;switch(e.type){case z.X:switch(e.position){case D.Top:{n=Lo(this.xScale);break}case D.Bottom:default:{n=Ho(this.xScale);break}}n.tickSize(-this._height);break;case z.Y:switch(e.position){case D.Right:{n=Uo(this.yScale);break}case D.Left:default:{n=Wo(this.yScale);break}}n.tickSize(-this._width)}n.tickSizeOuter(0).tickFormat(()=>"");const r=this._getNumTicks()*2,i=n.scale(),o=i.domain(),a=()=>{if(!e.minMaxTicksOnlyShowGridLines)return o;const l=i.ticks(r);if(l.length<2)return o;const u=+l[1]-+l[0],f=o[1];return+f-+l[l.length-1]>u/2?[...l,f]:l},s=e.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?a():i.ticks(r);return n.tickValues(s),n}_renderAxis(e=this.axisGroup,n=this.config.duration){const{config:r}=this,i=this._buildAxis(),o=i.scale(),a=r.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?o.domain():o.ticks(this._getNumTicks()),s=a.length;i.tickValues(a),e.selectAll("*").interrupt(),mt(e,n).call(i).on("end",()=>{this._resolveTickLabelOverlap(e)}),e.selectAll("g.tick").classed(Ns,!0).style("font-size",r.tickTextFontSize);const f=e.selectAll("g.tick > text").filter(d=>a.some(h=>te(d,h))).classed($s,!0).classed(Rs,!!r.tickTextHideOverlapping).style("fill",r.tickTextColor);if(e.selectAll("g.tick > text").filter(d=>!a.some(h=>te(d,h))).classed(Yr,!0),f.nodes().forEach(d=>oi(d)),f.each((d,h,g)=>{var m,p;let _=(p=(m=r.tickFormat)===null||m===void 0?void 0:m.call(r,d,h,a))!==null&&p!==void 0?p:`${d}`;const k=g[h],x=r.tickTextWidth||(r.type===z.X?this._containerWidth/(s+1):this._containerWidth/5),C=getComputedStyle(k),w=Number.parseFloat(C.fontSize),b=C.fontFamily,v={verticalAlign:r.type===z.X?Jt.Top:Jt.Middle,width:x,textRotationAngle:r.tickTextAngle,separator:r.tickTextSeparator,wordBreak:r.tickTextForceWordBreak};if(r.tickTextFitMode===Nt.Trim){const N=Ot(k).text(_);Xo(N,x,r.tickTextTrimType,!0,w,.58),_=Ot(k).text()}Sp(k,{text:_,fontFamily:b,fontSize:w},v)}),e.classed(As,!0).classed(Ci,!r.tickLine).classed(Si,!r.domainLine),r.fullSize){const d=this._getFullDomainPath(0);mt(e.select(".domain"),n).attr("d",d)}}_resolveTickLabelOverlap(e=this.axisGroup){const{config:n}=this,r=e.selectAll(`g.tick > text:not(.${Yr})`);if(!n.tickTextHideOverlapping){r.style("opacity",null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{this._collideTickLabels(r)})}_collideTickLabels(e){e.each((r,i,o)=>{const a=o[i];a._visible=!0});const n=3;for(let r=0;r<n;r+=1)e.each((i,o,a)=>{const s=a[o];if(!s._visible)return;const u=s.getBoundingClientRect();for(let f=o+1;f<a.length;f+=1){if(o===f)continue;const d=a[f];if(d._visible){const g=d.getBoundingClientRect();if(ef(u,g,-5)){d._visible=!1;break}}}});e.each((r,i,o)=>{const a=o[i];Ot(a).style("opacity",a._visible?1:0)})}_getNumTicks(){const{config:{type:e,numTicks:n}}=this;if(n)return n;if(e===z.X){const r=this.xScale.range(),i=r[1]-r[0];return Math.floor(i/175)}if(e===z.Y){const r=this.yScale.range(),i=Math.abs(r[0]-r[1]);return Math.pow(i,.85)/25}return this._defaultNumTicks}_getConfiguredTickValues(){const{config:e}=this,n=e.type===z.X?this.xScale:this.yScale,r=n?.domain();return e.tickValues?e.tickValues.filter(i=>i>=r[0]&&i<=r[1]):null}_shouldRenderMinMaxTicksOnly(){const{config:e}=this;return e.minMaxTicksOnly||e.type===z.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess}_getFullDomainPath(e=0){const{config:{type:n}}=this;switch(n){case z.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case z.Y:return`M${-e}, ${this._height+.5} H0.5 V0.5 H${-e}`}}_renderAxisLabel(e=this.axisGroup){var n;const{type:r,label:i,labelMargin:o,labelFontSize:a,labelTextFitMode:s}=this.config;if(e.selectAll(`.${Xr}`).remove(),!i)return;const l=this.getPosition(),{width:u,height:f}=(n=this._axisRawBBox)!==null&&n!==void 0?n:e.node().getBBox(),d=r===z.Y?-90:0,h=e.append("text").attr("class",Xr).attr("dy",`${this._getLabelDY()}em`).style("font-size",a).style("fill",this.config.labelColor);h.text(i);let g=!1;if(s===Nt.Wrap){const w=r===z.Y?this._height:this._width;h.node().getComputedTextLength()>w&&(xp(h,w),g=!0)}let m=u,p=f;if(s===Nt.Wrap){const w=h.node().getBBox();m=w.width,p=w.height}else{const w=r===z.X?m:p,b=getComputedStyle(h.node()),v=Number.parseFloat(b.fontSize);Xo(h,w,this.config.labelTextTrimType,!0,v);const y=h.node().getBBox();m=y.width,p=y.height}const _=r===z.X?this._width/2:r===z.Y&&s===Nt.Wrap&&g?l===D.Left?-u-p/2-10:u:Math.pow(-1,+(l===D.Left))*u,k=r===z.Y?this._height/2:r===z.X&&s===Nt.Wrap?l===D.Top?-f-p/2:f:Math.pow(-1,+(l===D.Top))*f,x=r===z.X?0:Math.pow(-1,+(l===D.Left))*o,C=r===z.X?Math.pow(-1,+(l===D.Top))*o:0;h.attr("transform",`translate(${_+x},${k+C}) rotate(${d})`)}_getLabelDY(){const{type:e,position:n}=this.config;switch(e){case z.X:switch(n){case D.Top:return 0;case D.Bottom:default:return .75}case z.Y:switch(n){case D.Right:return .75;case D.Left:default:return-.25}}}_alignTickLabels(){const{config:{type:e,tickTextAlign:n,tickTextAngle:r,position:i}}=this,o=this.g.selectAll("g.tick > text"),a=fp(n),s=e===z.X?0:this._getYTickTextTranslate(n,i),l=r?`translate(${s},0) rotate(${r})`:`translate(${s},0)`;o.attr("transform",l).attr("text-anchor",a)}_getYTickTextTranslate(e,n=D.Left){var r,i,o,a;const s=this.config.tickPadding+1,l=((a=(i=(r=this._axisRawBBox)===null||r===void 0?void 0:r.width)!==null&&i!==void 0?i:(o=this.axisGroup.node())===null||o===void 0?void 0:o.getBBox().width)!==null&&a!==void 0?a:0)-s;switch(e){case wt.Left:return n===D.Left?l*-1:0;case wt.Right:return n===D.Left?0:l;case wt.Center:return n===D.Left?l*-.5:l*.5;default:return 0}}}Bs.selectors=Ep;const Np=Object.assign(Object.assign({},ar),{yStacked:void 0,baseline:null,duration:100,tooltip:void 0,template:(t,e,n,r)=>"",hideWhenFarFromPointer:!0,hideWhenFarFromPointerDistance:100,snapToData:!0,getCircles:void 0,color:void 0,strokeColor:void 0,strokeWidth:void 0,onCrosshairMove:void 0,forceShowAt:void 0,skipRangeCheck:!1}),$p=je`
|
|
225
|
-
:root {
|
|
226
|
-
--vis-crosshair-line-stroke-color: #888;
|
|
227
|
-
--vis-crosshair-line-stroke-width: 1px;
|
|
228
|
-
--vis-crosshair-line-stroke-opacity: 1;
|
|
229
|
-
--vis-crosshair-circle-stroke-color: #fff;
|
|
230
|
-
--vis-crosshair-circle-stroke-width: 1px;
|
|
231
|
-
--vis-crosshair-circle-stroke-opacity: 0.75;
|
|
232
|
-
}
|
|
233
|
-
`,Rp=G`
|
|
234
|
-
label: crosshair-component;
|
|
235
|
-
`,Vs=G`
|
|
236
|
-
stroke: var(--vis-crosshair-line-stroke-color);
|
|
237
|
-
stroke-width: var(--vis-crosshair-line-stroke-width);
|
|
238
|
-
stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
|
|
239
|
-
pointer-events: none;
|
|
240
|
-
`,Os=G`
|
|
241
|
-
stroke: var(--vis-crosshair-circle-stroke-color);
|
|
242
|
-
stroke-width: var(--vis-crosshair-circle-stroke-width);
|
|
243
|
-
stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
|
|
244
|
-
pointer-events: none;
|
|
245
|
-
`,Bp=Object.freeze(Object.defineProperty({__proto__:null,circle:Os,globalStyles:$p,line:Vs,root:Rp},Symbol.toStringTag,{value:"Module"}));class Fs extends bi{constructor(e){super(),this.clippable=!0,this._defaultConfig=Np,this.config=this._defaultConfig,this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,this._animFrameId=null,this._accessors={x:void 0,y:void 0,yStacked:void 0,baseline:void 0},e&&this.setConfig(e),this.g.style("opacity",0),this.line=this.g.append("line").attr("class",Vs)}set accessors(e){this._accessors=e}get accessors(){var e;const{config:n}=this,r=!!(n.x||n.y||n.yStacked),i=r?n.x:this._accessors.x,o=r?n.y:this._accessors.y,a=o?qe(o)?o:[o]:void 0,s=r?n.yStacked:this._accessors.yStacked,l=(e=n.baseline)!==null&&e!==void 0?e:this._accessors.baseline;return{x:i,y:a,yStacked:s,baseline:l}}_isContainerInViewport(){var e;if(!(!((e=this.container)===null||e===void 0)&&e.node()))return!1;const n=this.container.node().getBoundingClientRect(),r=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=Math.max(0,Math.min(n.right,r)-Math.max(n.left,0)),a=Math.max(0,Math.min(n.bottom,i)-Math.max(n.top,0)),s=n.width*n.height,l=o*a;return s>0&&l/s>=.35}setContainer(e){this.container!==e&&(this.container=e,this.container.on("mousemove.crosshair",this._onMouseMove.bind(this)),this.container.on("mouseout.crosshair",this._onMouseOut.bind(this)),this.container.on("wheel.crosshair",this._onWheel.bind(this)))}_render(e){var n,r,i,o,a;const{config:s,datamodel:l}=this,u=Yt(e)?e:s.duration,f=s.forceShowAt!==void 0,d=f?this.xScale(s.forceShowAt):this._xPx,h=this.xScale.invert(d),g=!((n=l.data)===null||n===void 0)&&n.length&&this.accessors.x?l.data.indexOf(Rn(l.data,h,this.accessors.x,$t.Left)):void 0;let m,p;s.snapToData&&(!this.accessors.y&&!this.accessors.yStacked&&(!((r=l.data)===null||r===void 0)&&r.length)&&console.warn("Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object"),!(!((i=l.data)===null||i===void 0)&&i.length)&&this._mouseEvent&&console.warn("Unovis | Crosshair: No data to snap to. Make sure the data has been passed to the container or to the crosshair itself"),m=Rn(l.data,h,this.accessors.x),p=l.data.indexOf(m));const _=this.xScale.range(),k=this.yScale.range(),x=s.snapToData&&m?Rt(Math.round(this.xScale(et(m,this.accessors.x,p))),0,this._width):Rt(d,_[0],_[1]),C=d>=_[0]&&d<=_[1],w=this._yPx>=Math.min(k[0],k[1])&&this._yPx<=Math.max(k[0],k[1]);let b=s.skipRangeCheck?!!this._xPx:this._xPx?C&&w:C;s.hideWhenFarFromPointer&&Math.abs(x-+d)>=s.hideWhenFarFromPointerDistance&&(b=!1);const v=(o=s.tooltip)!==null&&o!==void 0?o:this.tooltip;if(b&&v&&this._isContainerInViewport()){const R=v.getContainer()||this.container.node(),V=v.isContainerBody();if(f){const M=this.container.node().getBoundingClientRect(),q=(V?d+M.left:d)+this._containerMargin.left,$=this._height/2+(V?M.top:0),T=[q,$];this._showTooltip(m,h,T,g)}else if(this._mouseEvent){const M=V?[this._mouseEvent.clientX,this._mouseEvent.clientY]:Dn(this._mouseEvent,R);this._showTooltip(m,h,M,g)}}else this._hideTooltip();if(this._mouseEvent&&((a=s.onCrosshairMove)===null||a===void 0||a.call(s,b?this.xScale.invert(this._xPx):void 0,m,p,this._mouseEvent),this._mouseEvent=void 0),mt(this.g,u).style("opacity",b?1:0),!isFinite(d))return;this.line.attr("y1",0).attr("y2",this._height),mt(this.line,u,fo).attr("x1",x).attr("x2",x);const y=Zr(s.getCircles)?s.getCircles(h,l.data,this.yScale,g):this.getCircleData(m,p),N=this.g.selectAll("circle").data(y,(R,V)=>{var M;return(M=R.id)!==null&&M!==void 0?M:V}),E=N.enter().append("circle").attr("class",Os).attr("r",0).attr("cx",x).attr("cy",R=>R.y).style("fill",R=>R.color).style("stroke",R=>R.strokeColor).style("stroke-width",R=>R.strokeWidth);mt(E.merge(N),u,fo).attr("cx",x).attr("cy",R=>R.y).attr("r",4).style("opacity",R=>R.opacity).style("fill",R=>R.color).style("stroke",R=>R.strokeColor).style("stroke-width",R=>R.strokeWidth),N.exit().remove()}hide(e){window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{var n,r;this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,(r=(n=this.config).onCrosshairMove)===null||r===void 0||r.call(n,void 0,void 0,void 0,e),this._render()})}_onMouseMove(e){var n;const{datamodel:r,element:i}=this;!this.accessors.x&&(!((n=r.data)===null||n===void 0)&&n.length)&&console.warn("Unovis | Crosshair: X accessor function has not been configured. Please check if it's present in the configuration object");const[o,a]=Dn(e,i);this._xPx=o,this._yPx=a,this._mouseEvent=e,window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()})}_onMouseOut(e){var n;(!e||!(!((n=this.container)===null||n===void 0)&&n.node().contains(e.relatedTarget)))&&this.hide(e)}_onWheel(e){this.hide(e)}_showTooltip(e,n,r,i){var o;const{config:a,datamodel:s}=this,l=(o=a.tooltip)!==null&&o!==void 0?o:this.tooltip;if(!l||!r)return;const[u,f]=r,d=a.template(e,n,s.data,i);if(l.config.followCursor=!0,!l.config.horizontalPlacement||l.config.horizontalPlacement===D.Auto){const h=l.isContainerBody()?u-this.container.node().getBoundingClientRect().left:u;l.overrideHorizontalPlacement(h>this._containerWidth/2?D.Left:D.Right)}d&&l.show(d,{x:u,y:f})}_hideTooltip(){var e;const{config:n}=this,r=(e=n.tooltip)!==null&&e!==void 0?e:this.tooltip;r?.hide()}getYDataExtent(){return[void 0,void 0]}getCircleData(e,n){var r,i;const{config:o}=this;if(o.snapToData&&e){const a=(r=this.accessors.y)!==null&&r!==void 0?r:[],s=(i=this.accessors.yStacked)!==null&&i!==void 0?i:[],l=et(e,this.accessors.baseline,n)||0,u=Ul(e,n,...s).map((d,h)=>({y:this.yScale(d+l),opacity:Yt(et(e,s[h],h))?1:0,color:ce(e,o.color,h),strokeColor:o.strokeColor?ce(e,o.strokeColor,h):void 0,strokeWidth:o.strokeWidth?et(e,o.strokeWidth,h):void 0})),f=a.map((d,h)=>{const g=et(e,d,n);return{y:this.yScale(g),opacity:Yt(g)?1:0,color:ce(e,o.color,u.length+h),strokeColor:o.strokeColor?ce(e,o.strokeColor,h):void 0,strokeWidth:o.strokeWidth?et(e,o.strokeWidth,h):void 0}});return u.concat(f)}return[]}}Fs.selectors=Bp;const Is=Symbol("componentAccessorKey"),zs=Symbol("tooltipAccessorKey"),Ps=Symbol("crosshairAccessorKey"),Ls=Symbol("axisAccessorKey"),Vp=Symbol("annotationsAccessorKey");function lr(t,e){return te(t,e)}function Je(t){const e=c.getCurrentInstance(),n=e.attrs;return c.computed(()=>{const r={},i=e?.vnode.props??{};return Object.keys(i).forEach(o=>{r[c.camelize(o)]=t[c.camelize(o)]}),{...r,...n}})}const qo=c.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},clipPathExtend:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:r}=c.toRefs(n),i=Je(n),o=c.ref(),a=c.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),s=c.ref();return c.watch(r,()=>{o.value&&o.value.setData(r.value,!0)}),c.watchEffect(()=>{var l;a.components.map(u=>u.config),(l=o.value)==null||l.updateContainer({...c.toRaw(i.value),...c.toRaw(a)})}),c.onMounted(()=>{s.value&&(o.value=new Hg(s.value,{...c.toRaw(a)},r.value))}),c.onUnmounted(()=>{var l;return(l=o.value)==null?void 0:l.destroy()}),c.provide(Is,{data:r,update:l=>a.components=[...a.components,l],destroy:()=>{var l;return a.components=(l=a.components)==null?void 0:l.filter(u=>!u.isDestroyed())}}),c.provide(Ls,{data:r,update:l=>a[`${l.config.type}Axis`]=l,destroy:l=>{a[`${l}Axis`]=void 0}}),c.provide(Ps,{data:r,update:l=>a.crosshair=l,destroy:()=>{a.crosshair=void 0}}),c.provide(zs,{data:r,update:l=>a.tooltip=l,destroy:()=>{a.tooltip=void 0}}),c.provide(Vp,{data:r,update:l=>a.annotations=l,destroy:()=>{a.annotations=void 0}}),e({component:o}),(l,u)=>(c.openBlock(),c.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:s,class:"unovis-xy-container"},[c.renderSlot(l.$slots,"default")],512))}}),Op={"data-vis-axis":""},un=c.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=c.inject(Ls),r=t,i=c.computed(()=>n.data.value??r.data),o=Je(r),a=c.ref();return c.onMounted(()=>{c.nextTick(()=>{var s;a.value=new Bs(o.value),(s=a.value)==null||s.setData(i.value),n.update(a.value)})}),c.onUnmounted(()=>{var s;(s=a.value)==null||s.destroy(),n.destroy(r.type)}),c.watch(o,(s,l)=>{var u;lr(s,l)||(u=a.value)==null||u.setConfig(o.value)}),c.watch(i,()=>{var s;(s=a.value)==null||s.setData(i.value)}),e({component:a}),(s,l)=>(c.openBlock(),c.createElementBlock("div",Op))}}),Fp={"data-vis-crosshair":""},Go=c.defineComponent({__name:"index",props:{data:{}},setup(t,{expose:e}){const n=c.inject(Ps),r=t,i=c.computed(()=>n.data.value??r.data),o=Je(r),a=c.ref();return c.onMounted(()=>{c.nextTick(()=>{var s;a.value=new Fs(o.value),(s=a.value)==null||s.setData(i.value),n.update(a.value)})}),c.onUnmounted(()=>{var s;(s=a.value)==null||s.destroy(),n.destroy()}),c.watch(o,(s,l)=>{var u;lr(s,l)||(u=a.value)==null||u.setConfig(o.value)}),c.watch(i,()=>{var s;(s=a.value)==null||s.setData(i.value)}),e({component:a}),(s,l)=>(c.openBlock(),c.createElementBlock("div",Fp))}}),Ip={"data-vis-component":""},jo=c.defineComponent({__name:"index",props:{color:{},groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{},orientation:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=c.inject(Is),r=t,i=c.computed(()=>n.data.value??r.data),o=Je(r),a=c.ref();return c.onMounted(()=>{c.nextTick(()=>{var s;a.value=new Ts(o.value),(s=a.value)==null||s.setData(i.value),n.update(a.value)})}),c.onUnmounted(()=>{var s;(s=a.value)==null||s.destroy(),n.destroy()}),c.watch(o,(s,l)=>{var u;lr(s,l)||(u=a.value)==null||u.setConfig(o.value)}),c.watch(i,()=>{var s;(s=a.value)==null||s.setData(i.value)}),e({component:a}),(s,l)=>(c.openBlock(),c.createElementBlock("div",Ip))}}),zp={"data-vis-tooltip":""},Zo=c.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},hideDelay:{},showDelay:{},data:{}},setup(t,{expose:e}){const n=c.inject(zs),r=Je(t),i=c.ref();return c.onMounted(()=>{c.nextTick(()=>{i.value=new ks(r.value),n.update(i.value)})}),c.onUnmounted(()=>{var o;(o=i.value)==null||o.destroy(),n.destroy()}),c.watch(r,(o,a)=>{var s;lr(o,a)||(s=i.value)==null||s.setConfig(r.value)}),e({component:i}),(o,a)=>(c.openBlock(),c.createElementBlock("div",zp))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend],[data-vis-rolling-pin-legend]{display:block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const Pp={class:"flex flex-col sm:flex-row"},Lp=["data-active"],Up={class:"flex items-center gap-2"},Hp={class:"block text-muted-foreground text-xs mr-2 max-w-[120px] truncate"},Wp={class:"block text-lg leading-none font-bold sm:text-3xl"},Yp={class:"mx-auto w-full max-w-sm mt-2 mb-8"},Xp={class:"text-muted-foreground"},qp={class:"text-muted-foreground"},Gp={class:"grid"},jp={class:"flex gap-1 overflow-hidden max-w-80"},Zp={class:"truncate"},Qp=c.defineComponent({__name:"ResourceSelector",props:{resources:{type:Array,required:!0},totals:{type:Object,required:!0},viewMode:{type:String,required:!0},activeChart:{type:String,required:!1}},emits:["update:viewMode","update:activeChart"],setup(t,{emit:e}){const n=t,r=e,i=c.computed({get:()=>n.viewMode,set:u=>{r("update:viewMode",u)}}),o=c.computed({get:()=>n.activeChart,set:u=>{r("update:activeChart",u)}}),{width:a}=Ws.useWindowSize(),s=c.computed(()=>a.value<640),l=c.ref(!1);return(u,f)=>{const d=c.resolveComponent("DrawerTitle"),h=c.resolveComponent("DrawerDescription"),g=c.resolveComponent("DrawerHeader"),m=c.resolveComponent("Button"),p=c.resolveComponent("DrawerFooter"),_=c.resolveComponent("DrawerContent"),k=c.resolveComponent("Drawer"),x=c.resolveComponent("DropdownMenuTrigger"),C=c.resolveComponent("DropdownMenuLabel"),w=c.resolveComponent("DropdownMenuItem"),b=c.resolveComponent("DropdownMenuContent"),v=c.resolveComponent("DropdownMenu");return c.openBlock(),c.createElementBlock("div",Pp,[t.resources.length>1?(c.openBlock(),c.createElementBlock("button",{key:0,"data-active":t.viewMode==="stacked",class:"hover:bg-muted/50 flex flex-1 flex-col justify-center gap-2 border-t px-4 py-3 text-left sm:border-t-0 sm:border-l sm:px-6 sm:py-6 cursor-pointer",onClick:f[0]||(f[0]=y=>l.value=!0)},[c.createElementVNode("div",Up,[t.viewMode==="stacked"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(c.unref(dt.Layers),{class:"size-3 text-muted-foreground"}),f[5]||(f[5]=c.createElementVNode("span",{class:"block text-muted-foreground text-xs mr-2 max-w-[120px] truncate"},"All Resources",-1))],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",{class:"size-3 rounded-full mr-2",style:c.normalizeStyle({backgroundColor:t.resources.find(y=>y.id===t.activeChart)?.color||"#6b7280"})},null,4),c.createElementVNode("span",Hp,c.toDisplayString(t.resources.find(y=>y.id===t.activeChart)?.name||"Select Resource"),1)],64)),c.createVNode(c.unref(dt.ChevronDown),{class:"ml-auto size-4"})]),c.createElementVNode("span",Wp,c.toDisplayString(t.viewMode==="stacked"?Object.values(t.totals).reduce((y,N)=>y+N,0).toLocaleString():(t.totals[t.activeChart]||0).toLocaleString()),1)],8,Lp)):c.createCommentVNode("",!0),c.unref(s)?(c.openBlock(),c.createBlock(k,{key:1,open:c.unref(l),"onUpdate:open":f[2]||(f[2]=y=>c.isRef(l)?l.value=y:null)},{default:c.withCtx(()=>[c.createVNode(_,null,{default:c.withCtx(()=>[c.createElementVNode("div",Yp,[c.createVNode(g,null,{default:c.withCtx(()=>[c.createVNode(d,null,{default:c.withCtx(()=>[...f[6]||(f[6]=[c.createTextVNode("Resources",-1)])]),_:1}),c.createVNode(h,null,{default:c.withCtx(()=>[...f[7]||(f[7]=[c.createTextVNode("Select the resources to display on the timeline.",-1)])]),_:1})]),_:1}),c.createVNode(p,null,{default:c.withCtx(()=>[c.createVNode(m,{onClick:f[1]||(f[1]=y=>{i.value="stacked",o.value="",l.value=!1}),variant:t.viewMode==="stacked"?"secondary":"outline"},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.Layers),{class:"size-3 text-muted-foreground"}),c.createElementVNode("span",Xp," All Resources ("+c.toDisplayString(Object.values(t.totals).reduce((y,N)=>y+N,0).toLocaleString())+") ",1)]),_:1},8,["variant"]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.resources,y=>(c.openBlock(),c.createBlock(m,{key:y.id,onClick:N=>{i.value="single",o.value=y.id,l.value=!1},variant:t.viewMode==="single"&&t.activeChart===y.id?"secondary":"outline"},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"size-3 rounded-full",style:c.normalizeStyle({backgroundColor:y.color||"#6b7280"})},null,4),c.createElementVNode("span",qp,c.toDisplayString(y.name)+" ("+c.toDisplayString((t.totals[y.id]||0).toLocaleString())+") ",1)]),_:2},1032,["onClick","variant"]))),128))]),_:1})])]),_:1})]),_:1},8,["open"])):(c.openBlock(),c.createBlock(v,{key:2,open:c.unref(l),"onUpdate:open":f[4]||(f[4]=y=>c.isRef(l)?l.value=y:null)},{default:c.withCtx(()=>[c.createVNode(x,{"as-child":""},{default:c.withCtx(()=>[...f[8]||(f[8]=[c.createElementVNode("button",{tabindex:"-1",class:"size-0 opacity-0 self-end"},null,-1)])]),_:1}),c.createVNode(b,{align:"start"},{default:c.withCtx(()=>[c.createVNode(C,null,{default:c.withCtx(()=>[...f[9]||(f[9]=[c.createTextVNode("Resources",-1)])]),_:1}),c.createElementVNode("div",Gp,[c.createVNode(w,{onClick:f[3]||(f[3]=y=>{i.value="stacked",o.value="",l.value=!1}),class:c.normalizeClass(t.viewMode==="stacked"?"bg-input":"")},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.Layers),{class:"size-3 text-muted-foreground"}),c.createElementVNode("span",null," All Resources ("+c.toDisplayString(Object.values(t.totals).reduce((y,N)=>y+N,0).toLocaleString())+") ",1)]),_:1},8,["class"]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.resources,y=>(c.openBlock(),c.createBlock(w,{key:y.id,onClick:N=>{i.value="single",o.value=y.id,l.value=!1},class:c.normalizeClass(t.viewMode==="single"&&t.activeChart===y.id?"bg-input":"")},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"size-3 rounded-full",style:c.normalizeStyle({backgroundColor:y.color||"#6b7280"})},null,4),c.createElementVNode("span",jp,[c.createElementVNode("span",Zp,c.toDisplayString(y.name),1),c.createElementVNode("span",null,"("+c.toDisplayString((t.totals[y.id]||0).toLocaleString())+")",1)])]),_:2},1032,["onClick","class"]))),128))])]),_:1})]),_:1},8,["open"]))])}}}),Kp={class:"flex flex-1 flex-col justify-center gap-1 px-6 py-5 sm:py-6"},Jp={class:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3"},tm={class:"flex items-center gap-1"},em={key:1,class:"flex items-center justify-center px-6 py-4 text-muted-foreground text-sm"},nm={key:0,class:"flex items-center justify-center h-[250px]"},rm={key:1,class:"flex items-center justify-center h-[250px]"},im=c.defineComponent({__name:"Timeline",props:{modelValue:{},selectedResource:{},viewMode:{},agendaData:{},resources:{}},emits:["update:modelValue","update:selectedResource","update:viewMode"],setup(t,{emit:e}){const n=t,r=e,{params:i}=Tt.useModuleRoute(),{config:o}=Tt.useModule(),a=Tt.useFirebaseIntegration(o.project),s=c.ref([]),l=c.ref([]),u=c.ref(!0),f=c.ref(n.viewMode||"stacked"),d=c.ref(n.selectedResource||"");c.watch(f,T=>{r("update:viewMode",T)},{immediate:!0}),c.watch(d,T=>{r("update:selectedResource",f.value==="single"?T:null)}),c.watch(f,T=>{r("update:selectedResource",T==="single"?d.value:null)});const h=new Date,g=c.ref(n.modelValue||new Date);c.watch(()=>n.modelValue,T=>{T&&T.getTime()!==g.value.getTime()&&(g.value=T)}),c.watch(g,T=>{r("update:modelValue",T)},{immediate:!0});const m=c.computed(()=>{const T=new Date(h);T.setDate(h.getDate()-1);const B=new Date(h);return B.setDate(h.getDate()+1),g.value.toDateString()===h.toDateString()?"Today":g.value.toDateString()===T.toDateString()?"Yesterday":g.value.toDateString()===B.toDateString()?"Tomorrow":g.value.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),p=()=>{const T=new Date(g.value);T.setDate(T.getDate()-1),g.value=T},_=()=>{const T=new Date(g.value);T.setDate(T.getDate()+1),g.value=T},k=()=>{g.value=new Date},x=c.computed(()=>n.resources?.length===0?10:Math.max(...(n.resources||[]).map(T=>T.capacity||10))),C=c.computed(()=>(n.resources?.length||0)===0?60:Math.min(...(n.resources||[]).map(T=>T.interval||60))),w=c.computed(()=>{const T={total:{label:"Total Reservations",color:void 0}};return(n.resources||[]).forEach((B,I)=>{T[B.id]={label:B.name,color:B.color||`var(--chart-${I%5+1})`}}),T});c.watch(()=>n.resources,T=>{(T?.length||0)>0&&!d.value&&(d.value=T[0].id)},{immediate:!0});const b=c.computed(()=>[...n.resources||[]].sort((T,B)=>{const I=y.value[T.id]||0;return(y.value[B.id]||0)-I})),v=c.computed(()=>{const T=[];return C.value,s.value.forEach((B,I)=>{B.time.endsWith(":00")&&T.push(I)}),T}),y=c.computed(()=>{const T={};return n.resources?.forEach(B=>{T[B.id]=l.value.filter(I=>I.resourceId===B.id).reduce((I,H)=>I+(H.reserved||0),0)}),T}),N=T=>{const B=T.getFullYear(),I=String(T.getMonth()+1).padStart(2,"0"),H=String(T.getDate()).padStart(2,"0");return`${B}-${I}-${H}`},E=T=>{const[B,I]=T.split(":").map(Number);return B*60+I},R=(T,B)=>(n.agendaData?.exceptions||[]).find(H=>B>=H.startDate&&B<=H.endDate?H.resourceIds===null?!0:H.resourceIds?.includes(T):!1)||null,V=c.computed(()=>{const T=N(g.value),B=g.value.getDay();let I=1440,H=0;if((n.resources||[]).forEach(yt=>{const J=R(yt.id,T);if(J){if(J.isClosed)return;J.timeslots.forEach(ot=>{const O=E(ot.startTime),P=E(ot.endTime);I=Math.min(I,O),H=Math.max(H,P)})}else(yt.openingHours?.[B]||[]).forEach(O=>{const P=E(O.start),pt=E(O.end);I=Math.min(I,P),H=Math.max(H,pt)})}),I>=H)return{startMinutes:540,endMinutes:1020};const j=Math.floor(I/60)*60,Q=Math.ceil(H/60)*60;return{startMinutes:j,endMinutes:Q}}),M=()=>{const T=[],B=C.value,{startMinutes:I,endMinutes:H}=V.value;for(let j=I;j<H;j+=B){const Q=Math.floor(j/60),yt=j%60,J=`${String(Q).padStart(2,"0")}:${String(yt).padStart(2,"0")}`,ot={time:J,label:J};n.resources?.forEach(O=>{ot[O.id]=0}),T.push(ot)}return T},q=async()=>{u.value=!0;try{const T=i.value.id,B=N(g.value),I=`${T}_${B}`,H=await a.get(o.reservedSpotsCollection,I);l.value=[];for(const J of n.resources||[]){const ot=H?.[J.id]||{};Object.entries(ot).forEach(([O,P])=>{const[pt,ae]=O.split("-");l.value.push({resourceId:J.id,startTime:pt,endTime:ae,reserved:P})})}const j=M(),Q=C.value,{startMinutes:yt}=V.value;l.value.forEach(J=>{const ot=E(J.startTime),O=E(J.endTime);for(let P=ot;P<O;P+=Q){const pt=Math.floor((P-yt)/Q);if(pt>=0&&pt<j.length){const ae=j[pt][J.resourceId];typeof ae=="number"&&(j[pt][J.resourceId]=ae+(J.reserved||0))}}}),s.value=j}catch(T){console.error("Error loading reservation data:",T),s.value=M(),l.value=[]}finally{u.value=!1}};return(async()=>await q())(),c.watch(g,()=>{q()}),c.watch(()=>n.resources,()=>{(n.resources?.length||0)>0&&q()}),(T,B)=>{const I=c.resolveComponent("CardTitle"),H=c.resolveComponent("Button"),j=c.resolveComponent("CardDescription"),Q=c.resolveComponent("CardHeader"),yt=c.resolveComponent("ChartContainer"),J=c.resolveComponent("CardContent"),ot=c.resolveComponent("Card");return c.openBlock(),c.createBlock(ot,{class:"py-4 sm:py-0"},{default:c.withCtx(()=>[c.createVNode(Q,{class:"flex flex-col items-stretch border-b !p-0 sm:flex-row"},{default:c.withCtx(()=>[c.createElementVNode("div",Kp,[c.createElementVNode("div",Jp,[c.createVNode(I,null,{default:c.withCtx(()=>[...B[2]||(B[2]=[c.createTextVNode("Reservations",-1)])]),_:1}),c.createElementVNode("div",tm,[c.createVNode(H,{variant:"ghost",size:"icon",class:"size-8",onClick:p},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.ChevronLeft),{size:16})]),_:1}),c.createVNode(H,{variant:"ghost",size:"sm",class:"h-8 px-3 text-xs",onClick:k},{default:c.withCtx(()=>[...B[3]||(B[3]=[c.createTextVNode(" Today ",-1)])]),_:1}),c.createVNode(H,{variant:"ghost",size:"icon",class:"size-8",onClick:_},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.ChevronRight),{size:16})]),_:1})])]),c.createVNode(j,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(m)),1)]),_:1})]),t.resources.length>0?(c.openBlock(),c.createBlock(Qp,{key:0,resources:t.resources,totals:c.unref(y),viewMode:c.unref(f),"onUpdate:viewMode":B[0]||(B[0]=O=>c.isRef(f)?f.value=O:null),activeChart:c.unref(d),"onUpdate:activeChart":B[1]||(B[1]=O=>c.isRef(d)?d.value=O:null)},null,8,["resources","totals","viewMode","activeChart"])):(c.openBlock(),c.createElementBlock("div",em," No resources configured "))]),_:1}),c.createVNode(J,{class:"px-2 sm:p-6"},{default:c.withCtx(()=>[c.unref(u)?(c.openBlock(),c.createElementBlock("div",nm,[...B[4]||(B[4]=[c.createElementVNode("div",{class:"text-muted-foreground"},"Loading...",-1)])])):t.resources.length===0?(c.openBlock(),c.createElementBlock("div",rm,[...B[5]||(B[5]=[c.createElementVNode("div",{class:"text-muted-foreground"},"No resources to display",-1)])])):c.unref(f)==="stacked"?(c.openBlock(),c.createBlock(yt,{key:2,config:c.unref(w),class:"aspect-auto h-[250px] w-full",cursor:""},{default:c.withCtx(()=>[c.createVNode(c.unref(qo),{data:c.unref(s),margin:{left:-24},"y-domain":[0,c.unref(x)]},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(b),O=>(c.openBlock(),c.createBlock(c.unref(jo),{key:O.id,x:(P,pt)=>pt,y:P=>P[O.id]||0,color:P=>P[O.id]>0?c.unref(w)[O.id]?.color:"#61616180","bar-padding":.1,"rounded-corners":2},null,8,["x","y","color"]))),128)),c.createVNode(c.unref(un),{type:"x",x:(O,P)=>P,"tick-line":!1,"domain-line":!1,"grid-line":!1,"tick-values":c.unref(v),"tick-format":O=>c.unref(s)[O]?.time||""},null,8,["x","tick-values","tick-format"]),c.createVNode(c.unref(un),{type:"y","num-ticks":3,"tick-line":!1,"domain-line":!1}),c.createVNode(c.unref(Zo)),c.createVNode(c.unref(Go),{template:c.unref(tn.st)(c.unref(w),c.unref(tn.Pe),{labelFormatter(O){const P=Math.round(O);return P>=0&&P<c.unref(s).length&&c.unref(s)[P]?.time||""}}),color:"#0000"},null,8,["template"])]),_:1},8,["data","y-domain"])]),_:1},8,["config"])):(c.openBlock(),c.createBlock(yt,{key:3,config:c.unref(w),class:"aspect-auto h-[250px] w-full",cursor:""},{default:c.withCtx(()=>[c.createVNode(c.unref(qo),{data:c.unref(s),margin:{left:-24},"y-domain":[0,c.unref(x)]},{default:c.withCtx(()=>[c.createVNode(c.unref(jo),{x:(O,P)=>P,y:O=>O[c.unref(d)]||0,color:O=>O[c.unref(d)]>0?c.unref(w)[c.unref(d)]?.color:"hsl(var(--muted))","bar-padding":.1,"rounded-corners":!1},null,8,["x","y","color"]),c.createVNode(c.unref(un),{type:"x",x:(O,P)=>P,"tick-line":!1,"domain-line":!1,"grid-line":!1,"tick-values":c.unref(v),"tick-format":O=>c.unref(s)[O]?.time||""},null,8,["x","tick-values","tick-format"]),c.createVNode(c.unref(un),{type:"y","num-ticks":3,"tick-line":!1,"domain-line":!1}),c.createVNode(c.unref(Zo)),c.createVNode(c.unref(Go),{template:c.unref(tn.st)(c.unref(w),c.unref(tn.Pe),{labelFormatter(O){const P=Math.round(O);return P>=0&&P<c.unref(s).length&&c.unref(s)[P]?.time||""}}),color:"#0000"},null,8,["template"])]),_:1},8,["data","y-domain"])]),_:1},8,["config"]))]),_:1})]),_:1})}}}),om={class:"flex flex-row items-center justify-between gap-2"},am={class:"relative mb-4"},sm={class:"flex gap-1 mb-4 flex-wrap"},cm={key:0,class:"mb-3 text-sm text-muted-foreground"},lm={key:1,class:"flex items-center justify-center py-8"},um={key:2,class:"flex flex-col items-center gap-2 text-center py-8 text-muted-foreground"},fm={key:3,class:"text-center py-8 text-muted-foreground"},dm={key:4,class:"space-y-2"},hm=["onClick"],gm={class:"flex items-start justify-between"},pm={class:"flex-1"},mm={class:"font-medium"},vm={class:"text-sm text-muted-foreground"},ym={class:"text-sm text-muted-foreground"},xm={class:"flex items-center gap-4 flex-wrap"},_m={class:"flex items-center gap-2 mt-1 text-xs text-muted-foreground"},wm={class:"flex items-center gap-2 mt-1 text-xs text-muted-foreground"},bm={key:0,class:"flex items-center gap-1 mt-1 text-xs text-muted-foreground"},km={class:"text-right"},Cm={key:0,class:"inline-block px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"},Sm={key:1,class:"inline-block px-2 py-1 text-xs rounded-full bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"},Tm={key:2,class:"inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"},Mm={key:3,class:"inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"},Dm={key:4,class:"inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"},Am={key:5,class:"text-sm font-medium mt-1"},Em=c.defineComponent({__name:"BookingsList",props:{activeDate:{},selectedResource:{},resources:{}},setup(t){const e=t,{params:n}=Tt.useModuleRoute(),{config:r}=Tt.useModule(),i=Tt.useFirebaseIntegration(r.project),o=c.ref([]),a=c.ref(!0),s=c.ref(""),l=c.ref(null),u=c.computed(()=>({date:f(e.activeDate),resource:null}));c.provide("event",u);const f=w=>{const b=w.getFullYear(),v=String(w.getMonth()+1).padStart(2,"0"),y=String(w.getDate()).padStart(2,"0");return`${b}-${v}-${y}`},d=c.computed(()=>{let w=o.value;return e.selectedResource&&(w=w.filter(b=>b.resourceId===e.selectedResource)),s.value.trim()&&(w=new Mi.Fuse(w,{keys:["customerInfo.firstName","customerInfo.lastName","customerInfo.email","customerInfo.phone","resourceName"],threshold:.3,ignoreLocation:!0}).search(s.value).map(v=>v.item)),w}),h=c.computed(()=>d.value.filter(w=>_.value.includes(w.reservationStatus))),g=c.computed(()=>o.value.some(w=>w.reservationStatus==="approved"||w.reservationStatus==="needs_approval")),m=c.computed(()=>({spots:o.value.reduce((w,b)=>w+(b.spots||0),0),bookings:o.value.length})),p=()=>{s.value=""},_=c.ref(["needs_approval","approved"]),k=w=>{_.value.includes(w)?_.value=_.value.filter(b=>b!==w):_.value.push(w)},x=async()=>{a.value=!0,o.value=[];try{const w=n.value.id,b=f(e.activeDate),v=new Set;e.resources?.forEach(E=>{const R=`${E.id}_${b}`;v.add(R)});const y=await i.find(r.reservationsCollection,{filters:[{field:"agendaId",operator:"==",value:w},{field:"status",operator:"==",value:"confirmed"},{field:"flattenedReservationDates",operator:"array-contains-any",value:Array.from(v)}]});let N=[];y.forEach(E=>{(E.reservations?.filter(V=>V.date===b)||[]).forEach(V=>{const M=e.resources.find(q=>q.id===V.resourceId);N.push({customerInfo:E.customerInfo,amountDue:E.amountDue,amountPaid:E.amountPaid,status:E.status,reservationStatus:V.status,subtotal:E.subtotal,total:E.total,discount:E.discount,id:E.id,res_id:V.id,resourceId:V.resourceId,spots:V.spots,date:b,startTime:V.timeslot?.startTime,endTime:V.timeslot?.endTime,reservationPrice:V.totalPrice,reservationBasePrice:V.basePrice,reservationAddOnsPrice:V.addOnsPrice,pricingOptionId:V.pricingOptionId,pricingOption:V.pricingOption,resourceName:M?.name||"Unknown",resourceColor:M?.color})})}),o.value=N.sort((E,R)=>E.startTime?.localeCompare(R.startTime||"")||0)}catch(w){console.error("Error loading orders:",w),o.value=[]}finally{a.value=!1}};return(async()=>await x())(),c.watch(()=>e.activeDate,()=>{x()}),(w,b)=>{const v=c.resolveComponent("Badge"),y=c.resolveComponent("CardTitle"),N=c.resolveComponent("CardDescription"),E=c.resolveComponent("Button"),R=c.resolveComponent("CardHeader"),V=c.resolveComponent("Input"),M=c.resolveComponent("CardContent"),q=c.resolveComponent("Card");return c.openBlock(),c.createBlock(q,null,{default:c.withCtx(()=>[c.createVNode(R,null,{default:c.withCtx(()=>[c.createElementVNode("div",om,[c.createElementVNode("div",null,[c.createVNode(y,{class:"flex items-center gap-2"},{default:c.withCtx(()=>[b[6]||(b[6]=c.createTextVNode(" Bookings ",-1)),c.unref(m).bookings>0?(c.openBlock(),c.createBlock(v,{key:0,variant:"secondary"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(m).bookings),1)]),_:1})):c.createCommentVNode("",!0)]),_:1}),c.createVNode(N,{class:"flex items-center gap-2 mt-1"},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.Users),{size:14}),c.createElementVNode("span",null,c.toDisplayString(c.unref(m).spots)+" total spots",1)]),_:1})]),c.createVNode(E,{variant:"ghost",size:"icon",onClick:x,disabled:c.unref(a)},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.RefreshCw),{size:16,class:c.normalizeClass({"animate-spin":c.unref(a)})},null,8,["class"])]),_:1},8,["disabled"])])]),_:1}),c.createVNode(M,null,{default:c.withCtx(()=>[c.createElementVNode("div",am,[c.createVNode(c.unref(dt.Search),{size:16,class:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),c.createVNode(V,{modelValue:c.unref(s),"onUpdate:modelValue":b[0]||(b[0]=$=>c.isRef(s)?s.value=$:null),placeholder:"Search by name, email, or phone...",class:"pl-9 pr-9"},null,8,["modelValue"]),c.unref(s)?(c.openBlock(),c.createBlock(E,{key:0,variant:"ghost",size:"icon",class:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",onClick:p},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.X),{size:14})]),_:1})):c.createCommentVNode("",!0)]),c.createElementVNode("div",sm,[c.createElementVNode("button",{onClick:b[1]||(b[1]=$=>k("needs_approval")),class:c.normalizeClass(["px-3 py-1.5 rounded-full text-sm bg-muted",{"opacity-50 hover:opacity-75":!c.unref(_).includes("needs_approval")}])}," Needs Approval ",2),c.createElementVNode("button",{onClick:b[2]||(b[2]=$=>k("approved")),class:c.normalizeClass(["px-3 py-1.5 rounded-full text-sm bg-muted",{"opacity-50 hover:opacity-75":!c.unref(_).includes("approved")}])}," Approved ",2),c.createElementVNode("button",{onClick:b[3]||(b[3]=$=>k("rejected")),class:c.normalizeClass(["px-3 py-1.5 rounded-full text-sm bg-muted",{"opacity-50 hover:opacity-75":!c.unref(_).includes("rejected")}])}," Rejected ",2),c.createElementVNode("button",{onClick:b[4]||(b[4]=$=>k("cancelled")),class:c.normalizeClass(["px-3 py-1.5 rounded-full text-sm bg-muted",{"opacity-50 hover:opacity-75":!c.unref(_).includes("cancelled")}])}," Cancelled ",2)]),c.unref(s)?(c.openBlock(),c.createElementBlock("div",cm," Showing "+c.toDisplayString(c.unref(d).length)+" of "+c.toDisplayString(c.unref(o).length)+" bookings ",1)):c.createCommentVNode("",!0),c.unref(a)?(c.openBlock(),c.createElementBlock("div",lm,[...b[7]||(b[7]=[c.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):c.unref(h).length===0?(c.openBlock(),c.createElementBlock("div",um,[b[9]||(b[9]=c.createTextVNode(" No bookings for this day ",-1)),c.unref(g)?(c.openBlock(),c.createBlock(E,{key:0,onClick:b[5]||(b[5]=$=>_.value=["needs_approval","approved"])},{default:c.withCtx(()=>[...b[8]||(b[8]=[c.createTextVNode("Reset filters",-1)])]),_:1})):c.createCommentVNode("",!0)])):c.unref(d).length===0?(c.openBlock(),c.createElementBlock("div",fm," No bookings match your search ")):(c.openBlock(),c.createElementBlock("div",dm,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(d),$=>(c.openBlock(),c.createElementBlock("div",{key:$.res_id||$.id,class:"p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",onClick:T=>c.unref(l)?.openDialog($)},[c.createElementVNode("div",gm,[c.createElementVNode("div",pm,[c.createElementVNode("div",mm,c.toDisplayString($.customerInfo?.firstName)+" "+c.toDisplayString($.customerInfo?.lastName||"Unknown Customer"),1),c.createElementVNode("div",vm,c.toDisplayString($.customerInfo?.email),1),c.createElementVNode("div",ym,c.toDisplayString($.customerInfo?.phone),1),c.createElementVNode("div",xm,[c.createElementVNode("div",_m,[c.createVNode(c.unref(dt.Clock),{size:12}),c.createElementVNode("span",null,c.toDisplayString($.startTime)+" - "+c.toDisplayString($.endTime),1)]),c.createElementVNode("div",wm,[c.createVNode(c.unref(dt.Users),{size:12}),c.createElementVNode("span",null,c.toDisplayString($.spots)+" spots",1)]),$.resourceName?(c.openBlock(),c.createElementBlock("div",bm,[c.createElementVNode("div",{class:"w-3 h-3 rounded-full",style:c.normalizeStyle({backgroundColor:$.resourceColor||"#6b7280"})},null,4),c.createElementVNode("span",null,c.toDisplayString($.resourceName),1)])):c.createCommentVNode("",!0)])]),c.createElementVNode("div",km,[$.reservationStatus==="needs_approval"?(c.openBlock(),c.createElementBlock("span",Cm,"Needs Approval")):$.reservationStatus==="approved"?(c.openBlock(),c.createElementBlock("span",Sm,"Approved")):$.reservationStatus==="rejected"?(c.openBlock(),c.createElementBlock("span",Tm,"Rejected")):$.reservationStatus==="cancelled"?(c.openBlock(),c.createElementBlock("span",Mm,"Cancelled")):(c.openBlock(),c.createElementBlock("span",Dm,"Pending")),$.reservationPrice||$.reservationPrice===0?(c.openBlock(),c.createElementBlock("div",Am," €"+c.toDisplayString($.reservationPrice.toFixed(2)),1)):c.createCommentVNode("",!0)])])],8,hm))),128))]))]),_:1}),c.createVNode(Mi._sfc_main,{ref_key:"reservationDetailDialog",ref:l,onCancelled:x,onConfirmed:x,onRejected:x},null,512)]),_:1})}}}),Nm={class:"space-y-6"},$m={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},Rm={class:"text-2xl font-semibold tracking-tight"},Bm={class:"flex flex-col md:flex-row gap-2"},Vm={class:"grid gap-6 md:grid-cols-2 lg:grid-cols-3"},Om={class:"md:col-span-2 lg:col-span-3"},Fm=c.defineComponent({__name:"index",setup(t){const{hasPermission:e}=Tt.useModulePermissions(),{params:n,resolvePath:r}=Tt.useModuleRoute(),{config:i}=Tt.useModule(),o=Tt.useFirebaseIntegration(i.project),a=c.ref(""),s=c.ref(!0),l=c.ref(new Date),u=c.ref(null),f=c.ref("stacked"),d=c.ref(null),h=c.ref([]);return(async()=>{try{const m=await o.get(i.agendaCollection,n.value.id);a.value=m?.serviceName||"",d.value=m,h.value=m?.resources?.filter(p=>p.isActive)||[]}catch(m){console.error("Error loading data:",m)}finally{s.value=!1}})(),c.provide("agendaData",d),(m,p)=>{const _=c.resolveComponent("Button"),k=c.resolveComponent("NuxtLink");return c.openBlock(),c.createBlock(Hs._sfc_main,null,{default:c.withCtx(()=>[c.createElementVNode("div",Nm,[c.createElementVNode("div",$m,[c.createElementVNode("div",null,[c.createElementVNode("h1",Rm,c.toDisplayString(c.unref(a)||"Dashboard"),1),p[3]||(p[3]=c.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"}," Overview and analytics for your booking service ",-1))]),c.createElementVNode("div",Bm,[c.unref(e)("manage-reservations")?(c.openBlock(),c.createBlock(Ys._sfc_main,{key:0})):c.createCommentVNode("",!0),c.createVNode(k,{to:c.unref(r)(`/edit/${c.unref(n).id}/agenda`)},{default:c.withCtx(()=>[c.createVNode(_,{class:"w-full"},{default:c.withCtx(()=>[c.createVNode(c.unref(dt.Calendar),{class:"size-4"}),p[4]||(p[4]=c.createTextVNode(" View Agenda ",-1))]),_:1})]),_:1},8,["to"])])]),c.createVNode(im,{modelValue:c.unref(l),"onUpdate:modelValue":p[0]||(p[0]=x=>c.isRef(l)?l.value=x:null),"view-mode":c.unref(f),"onUpdate:viewMode":p[1]||(p[1]=x=>c.isRef(f)?f.value=x:null),"onUpdate:selectedResource":p[2]||(p[2]=x=>u.value=x),"agenda-data":c.unref(d),resources:c.unref(h)},null,8,["modelValue","view-mode","agenda-data","resources"]),c.createElementVNode("div",Vm,[c.createElementVNode("div",Om,[c.unref(h).length>0?(c.openBlock(),c.createBlock(Em,{key:0,"active-date":c.unref(l),"selected-resource":c.unref(u),resources:c.unref(h)},null,8,["active-date","selected-resource","resources"])):c.createCommentVNode("",!0)])])])]),_:1})}}});exports.default=Fm;
|