@moderneinc/react-charts 1.5.2-next.4074d0 → 1.5.2-next.51d7a2
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/components/parliament-chart/parliament-chart.constants.d.ts +17 -1
- package/dist/components/parliament-chart/utils/parliament-svg-enhanced.d.ts +5 -0
- package/dist/components/parliament-chart/utils/parliament-svg-patterns.d.ts +0 -18
- package/dist/index.cjs +12 -62
- package/dist/index.js +13559 -16757
- package/dist/theme/color-utils.d.ts +9 -0
- package/dist/theme/default-colors.d.ts +13 -5
- package/dist/theme/mono-font.d.ts +10 -0
- package/package.json +17 -18
package/dist/index.cjs
CHANGED
|
@@ -1,65 +1,15 @@
|
|
|
1
|
-
"use strict";var Hy=Object.defineProperty;var jy=(e,t,n)=>t in e?Hy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yi=(e,t,n)=>jy(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),q=require("@mui/material"),G=require("react"),Qg=require("@mui/icons-material");function Gy(e){return e}var Ss=1,Ts=2,Yu=3,Ai=4,Of=1e-6;function Yy(e){return"translate("+e+",0)"}function Wy(e){return"translate(0,"+e+")"}function Xy(e){return t=>+e(t)}function Ky(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Vy(){return!this.__axis}function Jg(e,t){var n=[],r=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===Ss||e===Ai?-1:1,c=e===Ai||e===Ts?"x":"y",f=e===Ss||e===Yu?Yy:Wy;function h(p){var g=r??(t.ticks?t.ticks.apply(t,n):t.domain()),d=i??(t.tickFormat?t.tickFormat.apply(t,n):Gy),m=Math.max(a,0)+o,x=t.range(),y=+x[0]+l,v=+x[x.length-1]+l,_=(t.bandwidth?Ky:Xy)(t.copy(),l),S=p.selection?p.selection():p,w=S.selectAll(".domain").data([null]),b=S.selectAll(".tick").data(g,t).order(),M=b.exit(),A=b.enter().append("g").attr("class","tick"),k=b.select("line"),C=b.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(A),k=k.merge(A.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),C=C.merge(A.append("text").attr("fill","currentColor").attr(c,u*m).attr("dy",e===Ss?"0em":e===Yu?"0.71em":"0.32em")),p!==S&&(w=w.transition(p),b=b.transition(p),k=k.transition(p),C=C.transition(p),M=M.transition(p).attr("opacity",Of).attr("transform",function(O){return isFinite(O=_(O))?f(O+l):this.getAttribute("transform")}),A.attr("opacity",Of).attr("transform",function(O){var P=this.parentNode.__axis;return f((P&&isFinite(P=P(O))?P:_(O))+l)})),M.remove(),w.attr("d",e===Ai||e===Ts?s?"M"+u*s+","+y+"H"+l+"V"+v+"H"+u*s:"M"+l+","+y+"V"+v:s?"M"+y+","+u*s+"V"+l+"H"+v+"V"+u*s:"M"+y+","+l+"H"+v),b.attr("opacity",1).attr("transform",function(O){return f(_(O)+l)}),k.attr(c+"2",u*a),C.attr(c,u*m).text(d),S.filter(Vy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ts?"start":e===Ai?"end":"middle"),S.each(function(){this.__axis=_})}return h.scale=function(p){return arguments.length?(t=p,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(a=s=+p,h):a},h.tickSizeInner=function(p){return arguments.length?(a=+p,h):a},h.tickSizeOuter=function(p){return arguments.length?(s=+p,h):s},h.tickPadding=function(p){return arguments.length?(o=+p,h):o},h.offset=function(p){return arguments.length?(l=+p,h):l},h}function qn(e){return Jg(Yu,e)}function In(e){return Jg(Ai,e)}var Zy={value:()=>{}};function Dc(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ta(n)}function Ta(e){this._=e}function Qy(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ta.prototype=Dc.prototype={constructor:Ta,on:function(e,t){var n=this._,r=Qy(e+"",n),i,a=-1,s=r.length;if(arguments.length<2){for(;++a<s;)if((i=(e=r[a]).type)&&(i=Jy(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=r[a]).type)n[i]=Pf(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Pf(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ta(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Jy(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Pf(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Zy,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Wu="http://www.w3.org/1999/xhtml";const Ff={svg:"http://www.w3.org/2000/svg",xhtml:Wu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ts(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ff.hasOwnProperty(t)?{space:Ff[t],local:e}:e}function t_(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Wu&&t.documentElement.namespaceURI===Wu?t.createElement(e):t.createElementNS(n,e)}}function e_(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tm(e){var t=ts(e);return(t.local?e_:t_)(t)}function n_(){}function Oc(e){return e==null?n_:function(){return this.querySelector(e)}}function r_(e){typeof e!="function"&&(e=Oc(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=new Array(s),l,u,c=0;c<s;++c)(l=a[c])&&(u=e.call(l,l.__data__,c,a))&&("__data__"in l&&(u.__data__=l.__data__),o[c]=u);return new nn(r,this._parents)}function i_(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function a_(){return[]}function em(e){return e==null?a_:function(){return this.querySelectorAll(e)}}function s_(e){return function(){return i_(e.apply(this,arguments))}}function o_(e){typeof e=="function"?e=s_(e):e=em(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var s=t[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&(r.push(e.call(l,l.__data__,u,s)),i.push(l));return new nn(r,i)}function nm(e){return function(){return this.matches(e)}}function rm(e){return function(t){return t.matches(e)}}var l_=Array.prototype.find;function u_(e){return function(){return l_.call(this.children,e)}}function c_(){return this.firstElementChild}function f_(e){return this.select(e==null?c_:u_(typeof e=="function"?e:rm(e)))}var h_=Array.prototype.filter;function p_(){return Array.from(this.children)}function d_(e){return function(){return h_.call(this.children,e)}}function g_(e){return this.selectAll(e==null?p_:d_(typeof e=="function"?e:rm(e)))}function m_(e){typeof e!="function"&&(e=nm(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=[],l,u=0;u<s;++u)(l=a[u])&&e.call(l,l.__data__,u,a)&&o.push(l);return new nn(r,this._parents)}function im(e){return new Array(e.length)}function y_(){return new nn(this._enter||this._groups.map(im),this._parents)}function Oa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Oa.prototype={constructor:Oa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function __(e){return function(){return e}}function x_(e,t,n,r,i,a){for(var s=0,o,l=t.length,u=a.length;s<u;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new Oa(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function v_(e,t,n,r,i,a,s){var o,l,u=new Map,c=t.length,f=a.length,h=new Array(c),p;for(o=0;o<c;++o)(l=t[o])&&(h[o]=p=s.call(l,l.__data__,o,t)+"",u.has(p)?i[o]=l:u.set(p,l));for(o=0;o<f;++o)p=s.call(e,a[o],o,a)+"",(l=u.get(p))?(r[o]=l,l.__data__=a[o],u.delete(p)):n[o]=new Oa(e,a[o]);for(o=0;o<c;++o)(l=t[o])&&u.get(h[o])===l&&(i[o]=l)}function b_(e){return e.__data__}function w_(e,t){if(!arguments.length)return Array.from(this,b_);var n=t?v_:x_,r=this._parents,i=this._groups;typeof e!="function"&&(e=__(e));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),u=0;u<a;++u){var c=r[u],f=i[u],h=f.length,p=S_(e.call(c,c&&c.__data__,u,r)),g=p.length,d=o[u]=new Array(g),m=s[u]=new Array(g),x=l[u]=new Array(h);n(c,f,d,m,x,p,t);for(var y=0,v=0,_,S;y<g;++y)if(_=d[y]){for(y>=v&&(v=y+1);!(S=m[v])&&++v<g;);_._next=S||null}}return s=new nn(s,r),s._enter=o,s._exit=l,s}function S_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function T_(){return new nn(this._exit||this._groups.map(im),this._parents)}function M_(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function A_(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var u=n[l],c=r[l],f=u.length,h=o[l]=new Array(f),p,g=0;g<f;++g)(p=u[g]||c[g])&&(h[g]=p);for(;l<i;++l)o[l]=n[l];return new nn(o,this._parents)}function k_(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],s;--i>=0;)(s=r[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function C_(e){e||(e=R_);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var s=n[a],o=s.length,l=i[a]=new Array(o),u,c=0;c<o;++c)(u=s[c])&&(l[c]=u);l.sort(t)}return new nn(i,this._parents).order()}function R_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function E_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function D_(){return Array.from(this)}function O_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var s=r[i];if(s)return s}return null}function P_(){let e=0;for(const t of this)++e;return e}function F_(){return!this.node()}function $_(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,s=i.length,o;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this}function L_(e){return function(){this.removeAttribute(e)}}function N_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function q_(e,t){return function(){this.setAttribute(e,t)}}function I_(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function z_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function B_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function U_(e,t){var n=ts(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?N_:L_:typeof t=="function"?n.local?B_:z_:n.local?I_:q_)(n,t))}function am(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function H_(e){return function(){this.style.removeProperty(e)}}function j_(e,t,n){return function(){this.style.setProperty(e,t,n)}}function G_(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Y_(e,t,n){return arguments.length>1?this.each((t==null?H_:typeof t=="function"?G_:j_)(e,t,n??"")):ti(this.node(),e)}function ti(e,t){return e.style.getPropertyValue(t)||am(e).getComputedStyle(e,null).getPropertyValue(t)}function W_(e){return function(){delete this[e]}}function X_(e,t){return function(){this[e]=t}}function K_(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function V_(e,t){return arguments.length>1?this.each((t==null?W_:typeof t=="function"?K_:X_)(e,t)):this.node()[e]}function sm(e){return e.trim().split(/^|\s+/)}function Pc(e){return e.classList||new om(e)}function om(e){this._node=e,this._names=sm(e.getAttribute("class")||"")}om.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function lm(e,t){for(var n=Pc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function um(e,t){for(var n=Pc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Z_(e){return function(){lm(this,e)}}function Q_(e){return function(){um(this,e)}}function J_(e,t){return function(){(t.apply(this,arguments)?lm:um)(this,e)}}function t1(e,t){var n=sm(e+"");if(arguments.length<2){for(var r=Pc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?J_:t?Z_:Q_)(n,t))}function e1(){this.textContent=""}function n1(e){return function(){this.textContent=e}}function r1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function i1(e){return arguments.length?this.each(e==null?e1:(typeof e=="function"?r1:n1)(e)):this.node().textContent}function a1(){this.innerHTML=""}function s1(e){return function(){this.innerHTML=e}}function o1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function l1(e){return arguments.length?this.each(e==null?a1:(typeof e=="function"?o1:s1)(e)):this.node().innerHTML}function u1(){this.nextSibling&&this.parentNode.appendChild(this)}function c1(){return this.each(u1)}function f1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function h1(){return this.each(f1)}function p1(e){var t=typeof e=="function"?e:tm(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function d1(){return null}function g1(e,t){var n=typeof e=="function"?e:tm(e),r=t==null?d1:typeof t=="function"?t:Oc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function m1(){var e=this.parentNode;e&&e.removeChild(this)}function y1(){return this.each(m1)}function _1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function x1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function v1(e){return this.select(e?x1:_1)}function b1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function w1(e){return function(t){e.call(this,t,this.__data__)}}function S1(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function T1(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function M1(e,t,n){return function(){var r=this.__on,i,a=w1(t);if(r){for(var s=0,o=r.length;s<o;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function A1(e,t,n){var r=S1(e+""),i,a=r.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,c;l<u;++l)for(i=0,c=o[l];i<a;++i)if((s=r[i]).type===c.type&&s.name===c.name)return c.value}return}for(o=t?M1:T1,i=0;i<a;++i)this.each(o(r[i],t,n));return this}function cm(e,t,n){var r=am(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function k1(e,t){return function(){return cm(this,e,t)}}function C1(e,t){return function(){return cm(this,e,t.apply(this,arguments))}}function R1(e,t){return this.each((typeof t=="function"?C1:k1)(e,t))}function*E1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,s;i<a;++i)(s=r[i])&&(yield s)}var fm=[null];function nn(e,t){this._groups=e,this._parents=t}function hi(){return new nn([[document.documentElement]],fm)}function D1(){return this}nn.prototype=hi.prototype={constructor:nn,select:r_,selectAll:o_,selectChild:f_,selectChildren:g_,filter:m_,data:w_,enter:y_,exit:T_,join:M_,merge:A_,selection:D1,order:k_,sort:C_,call:E_,nodes:D_,node:O_,size:P_,empty:F_,each:$_,attr:U_,style:Y_,property:V_,classed:t1,text:i1,html:l1,raise:c1,lower:h1,append:p1,insert:g1,remove:y1,clone:v1,datum:b1,on:A1,dispatch:R1,[Symbol.iterator]:E1};function Ot(e){return typeof e=="string"?new nn([[document.querySelector(e)]],[document.documentElement]):new nn([[e]],fm)}function O1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function er(e,t){if(e=O1(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Xu={capture:!0,passive:!1};function Ku(e){e.preventDefault(),e.stopImmediatePropagation()}function P1(e){var t=e.document.documentElement,n=Ot(e).on("dragstart.drag",Ku,Xu);"onselectstart"in t?n.on("selectstart.drag",Ku,Xu):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function F1(e,t){var n=e.document.documentElement,r=Ot(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ku,Xu),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Fc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ea(){}var Hi=.7,Pa=1/Hi,Yr="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$1=/^#([0-9a-f]{3,8})$/,L1=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),N1=new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`),q1=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${ji}\\)$`),I1=new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${ji}\\)$`),z1=new RegExp(`^hsl\\(${ji},${Mn},${Mn}\\)$`),B1=new RegExp(`^hsla\\(${ji},${Mn},${Mn},${ji}\\)$`),$f={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};Fc(ea,Tr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lf,formatHex:Lf,formatHex8:U1,formatHsl:H1,formatRgb:Nf,toString:Nf});function Lf(){return this.rgb().formatHex()}function U1(){return this.rgb().formatHex8()}function H1(){return pm(this).formatHsl()}function Nf(){return this.rgb().formatRgb()}function Tr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=$1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?qf(t):n===3?new Ne(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ga(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ga(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=L1.exec(e))?new Ne(t[1],t[2],t[3],1):(t=N1.exec(e))?new Ne(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=q1.exec(e))?ga(t[1],t[2],t[3],t[4]):(t=I1.exec(e))?ga(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=z1.exec(e))?Bf(t[1],t[2]/100,t[3]/100,1):(t=B1.exec(e))?Bf(t[1],t[2]/100,t[3]/100,t[4]):$f.hasOwnProperty(e)?qf($f[e]):e==="transparent"?new Ne(NaN,NaN,NaN,0):null}function qf(e){return new Ne(e>>16&255,e>>8&255,e&255,1)}function ga(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ne(e,t,n,r)}function j1(e){return e instanceof ea||(e=Tr(e)),e?(e=e.rgb(),new Ne(e.r,e.g,e.b,e.opacity)):new Ne}function Vu(e,t,n,r){return arguments.length===1?j1(e):new Ne(e,t,n,r??1)}function Ne(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fc(Ne,Vu,hm(ea,{brighter(e){return e=e==null?Pa:Math.pow(Pa,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Hi:Math.pow(Hi,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ne(xr(this.r),xr(this.g),xr(this.b),Fa(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:If,formatHex:If,formatHex8:G1,formatRgb:zf,toString:zf}));function If(){return`#${mr(this.r)}${mr(this.g)}${mr(this.b)}`}function G1(){return`#${mr(this.r)}${mr(this.g)}${mr(this.b)}${mr((isNaN(this.opacity)?1:this.opacity)*255)}`}function zf(){const e=Fa(this.opacity);return`${e===1?"rgb(":"rgba("}${xr(this.r)}, ${xr(this.g)}, ${xr(this.b)}${e===1?")":`, ${e})`}`}function Fa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mr(e){return e=xr(e),(e<16?"0":"")+e.toString(16)}function Bf(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yn(e,t,n,r)}function pm(e){if(e instanceof yn)return new yn(e.h,e.s,e.l,e.opacity);if(e instanceof ea||(e=Tr(e)),!e)return new yn;if(e instanceof yn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(n-r)/o+(n<r)*6:n===a?s=(r-t)/o+2:s=(t-n)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new yn(s,o,l,e.opacity)}function Y1(e,t,n,r){return arguments.length===1?pm(e):new yn(e,t,n,r??1)}function yn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fc(yn,Y1,hm(ea,{brighter(e){return e=e==null?Pa:Math.pow(Pa,e),new yn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Hi:Math.pow(Hi,e),new yn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ne(Ms(e>=240?e-240:e+120,i,r),Ms(e,i,r),Ms(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new yn(Uf(this.h),ma(this.s),ma(this.l),Fa(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 e=Fa(this.opacity);return`${e===1?"hsl(":"hsla("}${Uf(this.h)}, ${ma(this.s)*100}%, ${ma(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Uf(e){return e=(e||0)%360,e<0?e+360:e}function ma(e){return Math.max(0,Math.min(1,e||0))}function Ms(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const $c=e=>()=>e;function W1(e,t){return function(n){return e+n*t}}function X1(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function K1(e){return(e=+e)==1?dm:function(t,n){return n-t?X1(t,n,e):$c(isNaN(t)?n:t)}}function dm(e,t){var n=t-e;return n?W1(e,n):$c(isNaN(e)?t:e)}const $a=(function e(t){var n=K1(t);function r(i,a){var s=n((i=Vu(i)).r,(a=Vu(a)).r),o=n(i.g,a.g),l=n(i.b,a.b),u=dm(i.opacity,a.opacity);return function(c){return i.r=s(c),i.g=o(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r})(1);function V1(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Z1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Q1(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),s;for(s=0;s<r;++s)i[s]=es(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(o){for(s=0;s<r;++s)a[s]=i[s](o);return a}}function J1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function mn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tx(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=es(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Zu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,As=new RegExp(Zu.source,"g");function ex(e){return function(){return e}}function nx(e){return function(t){return e(t)+""}}function gm(e,t){var n=Zu.lastIndex=As.lastIndex=0,r,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(r=Zu.exec(e))&&(i=As.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:mn(r,i)})),n=As.lastIndex;return n<t.length&&(a=t.slice(n),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?nx(l[0].x):ex(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)o[(f=l[c]).i]=f.x(u);return o.join("")})}function es(e,t){var n=typeof t,r;return t==null||n==="boolean"?$c(t):(n==="number"?mn:n==="string"?(r=Tr(t))?(t=r,$a):gm:t instanceof Tr?$a:t instanceof Date?J1:Z1(t)?V1:Array.isArray(t)?Q1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tx:mn)(e,t)}function rx(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Hf=180/Math.PI,Qu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function mm(e,t,n,r,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Hf,skewX:Math.atan(l)*Hf,scaleX:s,scaleY:o}}var ya;function ix(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qu:mm(t.a,t.b,t.c,t.d,t.e,t.f)}function ax(e){return e==null||(ya||(ya=document.createElementNS("http://www.w3.org/2000/svg","g")),ya.setAttribute("transform",e),!(e=ya.transform.baseVal.consolidate()))?Qu:(e=e.matrix,mm(e.a,e.b,e.c,e.d,e.e,e.f))}function ym(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,p,g){if(u!==f||c!==h){var d=p.push("translate(",null,t,null,n);g.push({i:d-4,x:mn(u,f)},{i:d-2,x:mn(c,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function s(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:mn(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function o(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:mn(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function l(u,c,f,h,p,g){if(u!==f||c!==h){var d=p.push(i(p)+"scale(",null,",",null,")");g.push({i:d-4,x:mn(u,f)},{i:d-2,x:mn(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),o(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var g=-1,d=h.length,m;++g<d;)f[(m=h[g]).i]=m.x(p);return f.join("")}}}var sx=ym(ix,"px, ","px)","deg)"),ox=ym(ax,", ",")",")"),ei=0,ki=0,_i=0,_m=1e3,La,Ci,Na=0,Mr=0,ns=0,Gi=typeof performance=="object"&&performance.now?performance:Date,xm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Lc(){return Mr||(xm(lx),Mr=Gi.now()+ns)}function lx(){Mr=0}function qa(){this._call=this._time=this._next=null}qa.prototype=vm.prototype={constructor:qa,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Lc():+n)+(t==null?0:+t),!this._next&&Ci!==this&&(Ci?Ci._next=this:La=this,Ci=this),this._call=e,this._time=n,Ju()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ju())}};function vm(e,t,n){var r=new qa;return r.restart(e,t,n),r}function ux(){Lc(),++ei;for(var e=La,t;e;)(t=Mr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ei}function jf(){Mr=(Na=Gi.now())+ns,ei=ki=0;try{ux()}finally{ei=0,fx(),Mr=0}}function cx(){var e=Gi.now(),t=e-Na;t>_m&&(ns-=t,Na=e)}function fx(){for(var e,t=La,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:La=n);Ci=e,Ju(r)}function Ju(e){if(!ei){ki&&(ki=clearTimeout(ki));var t=e-Mr;t>24?(e<1/0&&(ki=setTimeout(jf,e-Gi.now()-ns)),_i&&(_i=clearInterval(_i))):(_i||(Na=Gi.now(),_i=setInterval(cx,_m)),ei=1,xm(jf))}}function Gf(e,t,n){var r=new qa;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var hx=Dc("start","end","cancel","interrupt"),px=[],bm=0,Yf=1,tc=2,Ma=3,Wf=4,ec=5,Aa=6;function rs(e,t,n,r,i,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;dx(e,n,{name:t,index:r,group:i,on:hx,tween:px,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:bm})}function Nc(e,t){var n=_n(e,t);if(n.state>bm)throw new Error("too late; already scheduled");return n}function kn(e,t){var n=_n(e,t);if(n.state>Ma)throw new Error("too late; already running");return n}function _n(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function dx(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=vm(a,0,n.time);function a(u){n.state=Yf,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,h,p;if(n.state!==Yf)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Ma)return Gf(s);p.state===Wf?(p.state=Aa,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c<t&&(p.state=Aa,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[c])}if(Gf(function(){n.state===Ma&&(n.state=Wf,n.timer.restart(o,n.delay,n.time),o(u))}),n.state=tc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===tc){for(n.state=Ma,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function o(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=ec,1),f=-1,h=i.length;++f<h;)i[f].call(e,c);n.state===ec&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Aa,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function nc(e,t){var n=e.__transition,r,i,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){a=!1;continue}i=r.state>tc&&r.state<ec,r.state=Aa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}a&&delete e.__transition}}function gx(e){return this.each(function(){nc(this,e)})}function mx(e,t){var n,r;return function(){var i=kn(this,e),a=i.tween;if(a!==n){r=n=a;for(var s=0,o=r.length;s<o;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function yx(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=kn(this,e),s=a.tween;if(s!==r){i=(r=s).slice();for(var o={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=o;break}l===u&&i.push(o)}a.tween=i}}function _x(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=_n(this.node(),n).tween,i=0,a=r.length,s;i<a;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?mx:yx)(n,e,t))}function qc(e,t,n){var r=e._id;return e.each(function(){var i=kn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return _n(i,r).value[t]}}function wm(e,t){var n;return(typeof t=="number"?mn:t instanceof Tr?$a:(n=Tr(t))?(t=n,$a):gm)(e,t)}function xx(e){return function(){this.removeAttribute(e)}}function vx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bx(e,t,n){var r,i=n+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===r?a:a=t(r=s,n)}}function wx(e,t,n){var r,i=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?a:a=t(r=s,n)}}function Sx(e,t,n){var r,i,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o)))}}function Tx(e,t,n){var r,i,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o)))}}function Mx(e,t){var n=ts(e),r=n==="transform"?ox:wm;return this.attrTween(e,typeof t=="function"?(n.local?Tx:Sx)(n,r,qc(this,"attr."+e,t)):t==null?(n.local?vx:xx)(n):(n.local?wx:bx)(n,r,t))}function Ax(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function kx(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Cx(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&kx(e,a)),n}return i._value=t,i}function Rx(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Ax(e,a)),n}return i._value=t,i}function Ex(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=ts(e);return this.tween(n,(r.local?Cx:Rx)(r,t))}function Dx(e,t){return function(){Nc(this,e).delay=+t.apply(this,arguments)}}function Ox(e,t){return t=+t,function(){Nc(this,e).delay=t}}function Px(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Dx:Ox)(t,e)):_n(this.node(),t).delay}function Fx(e,t){return function(){kn(this,e).duration=+t.apply(this,arguments)}}function $x(e,t){return t=+t,function(){kn(this,e).duration=t}}function Lx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fx:$x)(t,e)):_n(this.node(),t).duration}function Nx(e,t){if(typeof t!="function")throw new Error;return function(){kn(this,e).ease=t}}function qx(e){var t=this._id;return arguments.length?this.each(Nx(t,e)):_n(this.node(),t).ease}function Ix(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;kn(this,e).ease=n}}function zx(e){if(typeof e!="function")throw new Error;return this.each(Ix(this._id,e))}function Bx(e){typeof e!="function"&&(e=nm(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=[],l,u=0;u<s;++u)(l=a[u])&&e.call(l,l.__data__,u,a)&&o.push(l);return new zn(r,this._parents,this._name,this._id)}function Ux(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),s=new Array(r),o=0;o<a;++o)for(var l=t[o],u=n[o],c=l.length,f=s[o]=new Array(c),h,p=0;p<c;++p)(h=l[p]||u[p])&&(f[p]=h);for(;o<r;++o)s[o]=t[o];return new zn(s,this._parents,this._name,this._id)}function Hx(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function jx(e,t,n){var r,i,a=Hx(t)?Nc:kn;return function(){var s=a(this,e),o=s.on;o!==r&&(i=(r=o).copy()).on(t,n),s.on=i}}function Gx(e,t){var n=this._id;return arguments.length<2?_n(this.node(),n).on.on(e):this.each(jx(n,e,t))}function Yx(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Wx(){return this.on("end.remove",Yx(this._id))}function Xx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Oc(e));for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s)for(var o=r[s],l=o.length,u=a[s]=new Array(l),c,f,h=0;h<l;++h)(c=o[h])&&(f=e.call(c,c.__data__,h,o))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,rs(u[h],t,n,h,u,_n(c,n)));return new zn(a,this._parents,t,n)}function Kx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=em(e));for(var r=this._groups,i=r.length,a=[],s=[],o=0;o<i;++o)for(var l=r[o],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var h=e.call(c,c.__data__,f,l),p,g=_n(c,n),d=0,m=h.length;d<m;++d)(p=h[d])&&rs(p,t,n,d,h,g);a.push(h),s.push(c)}return new zn(a,s,t,n)}var Vx=hi.prototype.constructor;function Zx(){return new Vx(this._groups,this._parents)}function Qx(e,t){var n,r,i;return function(){var a=ti(this,e),s=(this.style.removeProperty(e),ti(this,e));return a===s?null:a===n&&s===r?i:i=t(n=a,r=s)}}function Sm(e){return function(){this.style.removeProperty(e)}}function Jx(e,t,n){var r,i=n+"",a;return function(){var s=ti(this,e);return s===i?null:s===r?a:a=t(r=s,n)}}function tv(e,t,n){var r,i,a;return function(){var s=ti(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),ti(this,e))),s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o))}}function ev(e,t){var n,r,i,a="style."+t,s="end."+a,o;return function(){var l=kn(this,e),u=l.on,c=l.value[a]==null?o||(o=Sm(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(s,i=c),l.on=r}}function nv(e,t,n){var r=(e+="")=="transform"?sx:wm;return t==null?this.styleTween(e,Qx(e,r)).on("end.style."+e,Sm(e)):typeof t=="function"?this.styleTween(e,tv(e,r,qc(this,"style."+e,t))).each(ev(this._id,e)):this.styleTween(e,Jx(e,r,t),n).on("end.style."+e,null)}function rv(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function iv(e,t,n){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&rv(e,s,n)),r}return a._value=t,a}function av(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,iv(e,t,n??""))}function sv(e){return function(){this.textContent=e}}function ov(e){return function(){var t=e(this);this.textContent=t??""}}function lv(e){return this.tween("text",typeof e=="function"?ov(qc(this,"text",e)):sv(e==null?"":e+""))}function uv(e){return function(t){this.textContent=e.call(this,t)}}function cv(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&uv(i)),t}return r._value=e,r}function fv(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,cv(e))}function hv(){for(var e=this._name,t=this._id,n=Tm(),r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,l,u=0;u<o;++u)if(l=s[u]){var c=_n(l,t);rs(l,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new zn(r,this._parents,e,n)}function pv(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};n.each(function(){var u=kn(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),u.on=t}),i===0&&a()})}var dv=0;function zn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ic(e){return hi().transition(e)}function Tm(){return++dv}var Dn=hi.prototype;zn.prototype=Ic.prototype={constructor:zn,select:Xx,selectAll:Kx,selectChild:Dn.selectChild,selectChildren:Dn.selectChildren,filter:Bx,merge:Ux,selection:Zx,transition:hv,call:Dn.call,nodes:Dn.nodes,node:Dn.node,size:Dn.size,empty:Dn.empty,each:Dn.each,on:Gx,attr:Mx,attrTween:Ex,style:nv,styleTween:av,text:lv,textTween:fv,remove:Wx,tween:_x,delay:Px,duration:Lx,ease:qx,easeVarying:zx,end:pv,[Symbol.iterator]:Dn[Symbol.iterator]};function gv(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var mv={time:null,delay:0,duration:250,ease:gv};function yv(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function _v(e){var t,n;e instanceof zn?(t=e._id,e=e._name):(t=Tm(),(n=mv).time=Lc(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&rs(l,e,t,u,s,n||yv(l,t));return new zn(r,this._parents,e,t)}hi.prototype.interrupt=gx;hi.prototype.transition=_v;const ks=e=>()=>e;function xv(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function vv(e){e.stopImmediatePropagation()}function Cs(e){e.preventDefault(),e.stopImmediatePropagation()}var Xf={name:"drag"},Rs={name:"space"},Lr={name:"handle"},Nr={name:"center"};const{abs:Kf,max:Te,min:Me}=Math;function Vf(e){return[+e[0],+e[1]]}function Zf(e){return[Vf(e[0]),Vf(e[1])]}var ka={name:"x",handles:["w","e"].map(rc),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Es={},On={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qf={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Jf={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},bv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},wv={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function rc(e){return{type:e}}function Sv(e){return!e.ctrlKey&&!e.button}function Tv(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Mv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ds(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Av(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function pi(){return kv(ka)}function kv(e){var t=Tv,n=Sv,r=Mv,i=!0,a=Dc("start","brush","end"),s=6,o;function l(m){var x=m.property("__brush",d).selectAll(".overlay").data([rc("overlay")]);x.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",On.overlay).merge(x).each(function(){var v=Ds(this).extent;Ot(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),m.selectAll(".selection").data([rc("selection")]).enter().append("rect").attr("class","selection").attr("cursor",On.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=m.selectAll(".handle").data(e.handles,function(v){return v.type});y.exit().remove(),y.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return On[v.type]}),m.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,x,y){m.tween?m.on("start.brush",function(v){c(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){c(this,arguments).end(v)}).tween("brush",function(){var v=this,_=v.__brush,S=c(v,arguments),w=_.selection,b=e.input(typeof x=="function"?x.apply(this,arguments):x,_.extent),M=es(w,b);function A(k){_.selection=k===1&&b===null?null:M(k),u.call(v),S.brush()}return w!==null&&b!==null?A:A(1)}):m.each(function(){var v=this,_=arguments,S=v.__brush,w=e.input(typeof x=="function"?x.apply(v,_):x,S.extent),b=c(v,_).beforestart();nc(v),S.selection=w===null?null:w,u.call(v),b.start(y).brush(y).end(y)})},l.clear=function(m,x){l.move(m,null,x)};function u(){var m=Ot(this),x=Ds(this).selection;x?(m.selectAll(".selection").style("display",null).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?x[1][0]-s/2:x[0][0]-s/2}).attr("y",function(y){return y.type[0]==="s"?x[1][1]-s/2:x[0][1]-s/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?x[1][0]-x[0][0]+s:s}).attr("height",function(y){return y.type==="e"||y.type==="w"?x[1][1]-x[0][1]+s:s})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(m,x,y){var v=m.__brush.emitter;return v&&(!y||!v.clean)?v:new f(m,x,y)}function f(m,x,y){this.that=m,this.args=x,this.state=m.__brush,this.active=0,this.clean=y}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,x){return this.starting?(this.starting=!1,this.emit("start",m,x)):this.emit("brush",m),this},brush:function(m,x){return this.emit("brush",m,x),this},end:function(m,x){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,x)),this},emit:function(m,x,y){var v=Ot(this.that).datum();a.call(m,this.that,new xv(m,{sourceEvent:x,target:l,selection:e.output(this.state.selection),mode:y,dispatch:a}),v)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var x=this,y=m.target.__data__.type,v=(i&&m.metaKey?y="overlay":y)==="selection"?Xf:i&&m.altKey?Nr:Lr,_=e===Es?null:bv[y],S=e===ka?null:wv[y],w=Ds(x),b=w.extent,M=w.selection,A=b[0][0],k,C,O=b[0][1],P,F,B=b[1][0],L,$,Y=b[1][1],I,et,K=0,J=0,st,lt=_&&S&&i&&m.shiftKey,N,j,nt=Array.from(m.touches||[m],H=>{const ot=H.identifier;return H=er(H,x),H.point0=H.slice(),H.identifier=ot,H});nc(x);var Z=c(x,arguments,!0).beforestart();if(y==="overlay"){M&&(st=!0);const H=[nt[0],nt[1]||nt[0]];w.selection=M=[[k=e===Es?A:Me(H[0][0],H[1][0]),P=e===ka?O:Me(H[0][1],H[1][1])],[L=e===Es?B:Te(H[0][0],H[1][0]),I=e===ka?Y:Te(H[0][1],H[1][1])]],nt.length>1&&X(m)}else k=M[0][0],P=M[0][1],L=M[1][0],I=M[1][1];C=k,F=P,$=L,et=I;var R=Ot(x).attr("pointer-events","none"),z=R.selectAll(".overlay").attr("cursor",On[y]);if(m.touches)Z.moved=T,Z.ended=Q;else{var D=Ot(m.view).on("mousemove.brush",T,!0).on("mouseup.brush",Q,!0);i&&D.on("keydown.brush",W,!0).on("keyup.brush",ut,!0),P1(m.view)}u.call(x),Z.start(m,v.name);function T(H){for(const ot of H.changedTouches||[H])for(const gt of nt)gt.identifier===ot.identifier&&(gt.cur=er(ot,x));if(lt&&!N&&!j&&nt.length===1){const ot=nt[0];Kf(ot.cur[0]-ot[0])>Kf(ot.cur[1]-ot[1])?j=!0:N=!0}for(const ot of nt)ot.cur&&(ot[0]=ot.cur[0],ot[1]=ot.cur[1]);st=!0,Cs(H),X(H)}function X(H){const ot=nt[0],gt=ot.point0;var yt;switch(K=ot[0]-gt[0],J=ot[1]-gt[1],v){case Rs:case Xf:{_&&(K=Te(A-k,Me(B-L,K)),C=k+K,$=L+K),S&&(J=Te(O-P,Me(Y-I,J)),F=P+J,et=I+J);break}case Lr:{nt[1]?(_&&(C=Te(A,Me(B,nt[0][0])),$=Te(A,Me(B,nt[1][0])),_=1),S&&(F=Te(O,Me(Y,nt[0][1])),et=Te(O,Me(Y,nt[1][1])),S=1)):(_<0?(K=Te(A-k,Me(B-k,K)),C=k+K,$=L):_>0&&(K=Te(A-L,Me(B-L,K)),C=k,$=L+K),S<0?(J=Te(O-P,Me(Y-P,J)),F=P+J,et=I):S>0&&(J=Te(O-I,Me(Y-I,J)),F=P,et=I+J));break}case Nr:{_&&(C=Te(A,Me(B,k-K*_)),$=Te(A,Me(B,L+K*_))),S&&(F=Te(O,Me(Y,P-J*S)),et=Te(O,Me(Y,I+J*S)));break}}$<C&&(_*=-1,yt=k,k=L,L=yt,yt=C,C=$,$=yt,y in Qf&&z.attr("cursor",On[y=Qf[y]])),et<F&&(S*=-1,yt=P,P=I,I=yt,yt=F,F=et,et=yt,y in Jf&&z.attr("cursor",On[y=Jf[y]])),w.selection&&(M=w.selection),N&&(C=M[0][0],$=M[1][0]),j&&(F=M[0][1],et=M[1][1]),(M[0][0]!==C||M[0][1]!==F||M[1][0]!==$||M[1][1]!==et)&&(w.selection=[[C,F],[$,et]],u.call(x),Z.brush(H,v.name))}function Q(H){if(vv(H),H.touches){if(H.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else F1(H.view,st),D.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),z.attr("cursor",On.overlay),w.selection&&(M=w.selection),Av(M)&&(w.selection=null,u.call(x)),Z.end(H,v.name)}function W(H){switch(H.keyCode){case 16:{lt=_&&S;break}case 18:{v===Lr&&(_&&(L=$-K*_,k=C+K*_),S&&(I=et-J*S,P=F+J*S),v=Nr,X(H));break}case 32:{(v===Lr||v===Nr)&&(_<0?L=$-K:_>0&&(k=C-K),S<0?I=et-J:S>0&&(P=F-J),v=Rs,z.attr("cursor",On.selection),X(H));break}default:return}Cs(H)}function ut(H){switch(H.keyCode){case 16:{lt&&(N=j=lt=!1,X(H));break}case 18:{v===Nr&&(_<0?L=$:_>0&&(k=C),S<0?I=et:S>0&&(P=F),v=Lr,X(H));break}case 32:{v===Rs&&(H.altKey?(_&&(L=$-K*_,k=C+K*_),S&&(I=et-J*S,P=F+J*S),v=Nr):(_<0?L=$:_>0&&(k=C),S<0?I=et:S>0&&(P=F),v=Lr),z.attr("cursor",On[y]),X(H));break}default:return}Cs(H)}}function p(m){c(this,arguments).moved(m)}function g(m){c(this,arguments).ended(m)}function d(){var m=this.__brush||{selection:null};return m.extent=Zf(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:ks(Zf(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:ks(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:ks(!!m),l):r},l.handleSize=function(m){return arguments.length?(s=+m,l):s},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=a.on.apply(a,arguments);return m===a?l:m},l}function Ca(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Cv(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zc(e){let t,n,r;e.length!==2?(t=Ca,n=(o,l)=>Ca(e(o),l),r=(o,l)=>e(o)-l):(t=e===Ca||e===Cv?e:Rv,n=e,r=e);function i(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<0?u=f+1:c=f}while(u<c)}return u}function a(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function s(o,l,u=0,c=o.length){const f=i(o,l,u,c-1);return f>u&&r(o[f-1],l)>-r(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function Rv(){return 0}function Ev(e){return e===null?NaN:+e}const Dv=zc(Ca),Ov=Dv.right;zc(Ev).center;const Pv=Math.sqrt(50),Fv=Math.sqrt(10),$v=Math.sqrt(2);function Ia(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=Pv?10:a>=Fv?5:a>=$v?2:1;let o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(e*u),l=Math.round(t*u),o/u<e&&++o,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(e/u),l=Math.round(t/u),o*u<e&&++o,l*u>t&&--l),l<o&&.5<=n&&n<2?Ia(e,t,n*2):[o,l,u]}function Lv(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,s]=r?Ia(t,e,n):Ia(e,t,n);if(!(a>=i))return[];const o=a-i+1,l=new Array(o);if(r)if(s<0)for(let u=0;u<o;++u)l[u]=(a-u)/-s;else for(let u=0;u<o;++u)l[u]=(a-u)*s;else if(s<0)for(let u=0;u<o;++u)l[u]=(i+u)/-s;else for(let u=0;u<o;++u)l[u]=(i+u)*s;return l}function ic(e,t,n){return t=+t,e=+e,n=+n,Ia(e,t,n)[2]}function ac(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?ic(t,e,n):ic(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Mm(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Nv(e){return function(){return e}}function qv(e){return+e}var th=[0,1];function Ur(e){return e}function sc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Nv(isNaN(t)?NaN:.5)}function Iv(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function zv(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i<r?(r=sc(i,r),a=n(s,a)):(r=sc(r,i),a=n(a,s)),function(o){return a(r(o))}}function Bv(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=sc(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(o){var l=Ov(e,o,1,r)-1;return a[l](i[l](o))}}function Am(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Uv(){var e=th,t=th,n=es,r,i,a,s=Ur,o,l,u;function c(){var h=Math.min(e.length,t.length);return s!==Ur&&(s=Iv(e[0],e[h-1])),o=h>2?Bv:zv,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(i((u||(u=o(t,e.map(r),mn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,qv),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=rx,c()},f.clamp=function(h){return arguments.length?(s=h?!0:Ur,c()):s!==Ur},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return r=h,i=p,c()}}function km(){return Uv()(Ur,Ur)}function Hv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function za(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ni(e){return e=za(Math.abs(e)),e?e[1]:NaN}function jv(e,t){return function(n,r){for(var i=n.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function Gv(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Yv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ba(e){if(!(t=Yv.exec(e)))throw new Error("invalid format: "+e);var t;return new Bc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ba.prototype=Bc.prototype;function Bc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Bc.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 Wv(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Cm;function Xv(e,t){var n=za(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Cm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+za(e,Math.max(0,t+a-1))[0]}function eh(e,t){var n=za(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const nh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Hv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>eh(e*100,t),r:eh,s:Xv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function rh(e){return e}var ih=Array.prototype.map,ah=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Kv(e){var t=e.grouping===void 0||e.thousands===void 0?rh:jv(ih.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?rh:Gv(ih.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Ba(f);var h=f.fill,p=f.align,g=f.sign,d=f.symbol,m=f.zero,x=f.width,y=f.comma,v=f.precision,_=f.trim,S=f.type;S==="n"?(y=!0,S="g"):nh[S]||(v===void 0&&(v=12),_=!0,S="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var w=d==="$"?n:d==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",b=d==="$"?r:/[%p]/.test(S)?s:"",M=nh[S],A=/[defgprs%]/.test(S);v=v===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function k(C){var O=w,P=b,F,B,L;if(S==="c")P=M(C)+P,C="";else{C=+C;var $=C<0||1/C<0;if(C=isNaN(C)?l:M(Math.abs(C),v),_&&(C=Wv(C)),$&&+C==0&&g!=="+"&&($=!1),O=($?g==="("?g:o:g==="-"||g==="("?"":g)+O,P=(S==="s"?ah[8+Cm/3]:"")+P+($&&g==="("?")":""),A){for(F=-1,B=C.length;++F<B;)if(L=C.charCodeAt(F),48>L||L>57){P=(L===46?i+C.slice(F+1):C.slice(F))+P,C=C.slice(0,F);break}}}y&&!m&&(C=t(C,1/0));var Y=O.length+C.length+P.length,I=Y<x?new Array(x-Y+1).join(h):"";switch(y&&m&&(C=t(I+C,I.length?x-P.length:1/0),I=""),p){case"<":C=O+C+P+I;break;case"=":C=O+I+C+P;break;case"^":C=I.slice(0,Y=I.length>>1)+O+C+P+I.slice(Y);break;default:C=I+O+C+P;break}return a(C)}return k.toString=function(){return f+""},k}function c(f,h){var p=u((f=Ba(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(ni(h)/3)))*3,d=Math.pow(10,-g),m=ah[8+g/3];return function(x){return p(d*x)+m}}return{format:u,formatPrefix:c}}var _a,Rm,Em;Vv({thousands:",",grouping:[3],currency:["$",""]});function Vv(e){return _a=Kv(e),Rm=_a.format,Em=_a.formatPrefix,_a}function Zv(e){return Math.max(0,-ni(Math.abs(e)))}function Qv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ni(t)/3)))*3-ni(Math.abs(e)))}function Jv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ni(t)-ni(e))+1}function tb(e,t,n,r){var i=ac(e,t,n),a;switch(r=Ba(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Qv(i,s))&&(r.precision=a),Em(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Jv(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Zv(i))&&(r.precision=a-(r.type==="%")*2);break}}return Rm(r)}function eb(e){var t=e.domain;return e.ticks=function(n){var r=t();return Lv(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return tb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,s=r[i],o=r[a],l,u,c=10;for(o<s&&(u=s,s=o,o=u,u=i,i=a,a=u);c-- >0;){if(u=ic(s,o,n),u===l)return r[i]=s,r[a]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function ri(){var e=km();return e.copy=function(){return Am(e,ri())},Mm.apply(e,arguments),eb(e)}function nb(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),e[n]=t.floor(i),e[r]=t.ceil(a),e}const Os=new Date,Ps=new Date;function fe(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let u;do l.push(u=new Date(+a)),t(a,o),e(a);while(u<a&&a<s);return l},i.filter=a=>fe(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(Os.setTime(+a),Ps.setTime(+s),e(Os),e(Ps),Math.floor(n(Os,Ps))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ua=fe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ua.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?fe(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ua);Ua.range;const Ln=1e3,cn=Ln*60,Nn=cn*60,Bn=Nn*24,Uc=Bn*7,sh=Bn*30,Fs=Bn*365,Hr=fe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ln)},(e,t)=>(t-e)/Ln,e=>e.getUTCSeconds());Hr.range;const Hc=fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ln)},(e,t)=>{e.setTime(+e+t*cn)},(e,t)=>(t-e)/cn,e=>e.getMinutes());Hc.range;const rb=fe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*cn)},(e,t)=>(t-e)/cn,e=>e.getUTCMinutes());rb.range;const jc=fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ln-e.getMinutes()*cn)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getHours());jc.range;const ib=fe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getUTCHours());ib.range;const na=fe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*cn)/Bn,e=>e.getDate()-1);na.range;const Gc=fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Bn,e=>e.getUTCDate()-1);Gc.range;const ab=fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Bn,e=>Math.floor(e/Bn));ab.range;function Cr(e){return fe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*cn)/Uc)}const is=Cr(0),Ha=Cr(1),sb=Cr(2),ob=Cr(3),ii=Cr(4),lb=Cr(5),ub=Cr(6);is.range;Ha.range;sb.range;ob.range;ii.range;lb.range;ub.range;function Rr(e){return fe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Uc)}const Dm=Rr(0),ja=Rr(1),cb=Rr(2),fb=Rr(3),ai=Rr(4),hb=Rr(5),pb=Rr(6);Dm.range;ja.range;cb.range;fb.range;ai.range;hb.range;pb.range;const Yc=fe(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Yc.range;const db=fe(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());db.range;const Un=fe(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Un.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:fe(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Un.range;const Ar=fe(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ar.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:fe(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ar.range;function gb(e,t,n,r,i,a){const s=[[Hr,1,Ln],[Hr,5,5*Ln],[Hr,15,15*Ln],[Hr,30,30*Ln],[a,1,cn],[a,5,5*cn],[a,15,15*cn],[a,30,30*cn],[i,1,Nn],[i,3,3*Nn],[i,6,6*Nn],[i,12,12*Nn],[r,1,Bn],[r,2,2*Bn],[n,1,Uc],[t,1,sh],[t,3,3*sh],[e,1,Fs]];function o(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),g=p?p.range(u,+c+1):[];return h?g.reverse():g}function l(u,c,f){const h=Math.abs(c-u)/f,p=zc(([,,m])=>m).right(s,h);if(p===s.length)return e.every(ac(u/Fs,c/Fs,f));if(p===0)return Ua.every(Math.max(ac(u,c,f),1));const[g,d]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(d)}return[o,l]}const[mb,yb]=gb(Un,Yc,is,na,jc,Hc);function $s(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ls(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function _b(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=vi(i),c=bi(i),f=vi(a),h=bi(a),p=vi(s),g=bi(s),d=vi(o),m=bi(o),x=vi(l),y=bi(l),v={a:$,A:Y,b:I,B:et,c:null,d:hh,e:hh,f:Bb,g:Zb,G:Jb,H:qb,I:Ib,j:zb,L:Om,m:Ub,M:Hb,p:K,q:J,Q:gh,s:mh,S:jb,u:Gb,U:Yb,V:Wb,w:Xb,W:Kb,x:null,X:null,y:Vb,Y:Qb,Z:tw,"%":dh},_={a:st,A:lt,b:N,B:j,c:null,d:ph,e:ph,f:iw,g:dw,G:mw,H:ew,I:nw,j:rw,L:Fm,m:aw,M:sw,p:nt,q:Z,Q:gh,s:mh,S:ow,u:lw,U:uw,V:cw,w:fw,W:hw,x:null,X:null,y:pw,Y:gw,Z:yw,"%":dh},S={a:k,A:C,b:O,B:P,c:F,d:ch,e:ch,f:Fb,g:uh,G:lh,H:fh,I:fh,j:Eb,L:Pb,m:Rb,M:Db,p:A,q:Cb,Q:Lb,s:Nb,S:Ob,u:Sb,U:Tb,V:Mb,w:wb,W:Ab,x:B,X:L,y:uh,Y:lh,Z:kb,"%":$b};v.x=w(n,v),v.X=w(r,v),v.c=w(t,v),_.x=w(n,_),_.X=w(r,_),_.c=w(t,_);function w(R,z){return function(D){var T=[],X=-1,Q=0,W=R.length,ut,H,ot;for(D instanceof Date||(D=new Date(+D));++X<W;)R.charCodeAt(X)===37&&(T.push(R.slice(Q,X)),(H=oh[ut=R.charAt(++X)])!=null?ut=R.charAt(++X):H=ut==="e"?" ":"0",(ot=z[ut])&&(ut=ot(D,H)),T.push(ut),Q=X+1);return T.push(R.slice(Q,X)),T.join("")}}function b(R,z){return function(D){var T=xi(1900,void 0,1),X=M(T,R,D+="",0),Q,W;if(X!=D.length)return null;if("Q"in T)return new Date(T.Q);if("s"in T)return new Date(T.s*1e3+("L"in T?T.L:0));if(z&&!("Z"in T)&&(T.Z=0),"p"in T&&(T.H=T.H%12+T.p*12),T.m===void 0&&(T.m="q"in T?T.q:0),"V"in T){if(T.V<1||T.V>53)return null;"w"in T||(T.w=1),"Z"in T?(Q=Ls(xi(T.y,0,1)),W=Q.getUTCDay(),Q=W>4||W===0?ja.ceil(Q):ja(Q),Q=Gc.offset(Q,(T.V-1)*7),T.y=Q.getUTCFullYear(),T.m=Q.getUTCMonth(),T.d=Q.getUTCDate()+(T.w+6)%7):(Q=$s(xi(T.y,0,1)),W=Q.getDay(),Q=W>4||W===0?Ha.ceil(Q):Ha(Q),Q=na.offset(Q,(T.V-1)*7),T.y=Q.getFullYear(),T.m=Q.getMonth(),T.d=Q.getDate()+(T.w+6)%7)}else("W"in T||"U"in T)&&("w"in T||(T.w="u"in T?T.u%7:"W"in T?1:0),W="Z"in T?Ls(xi(T.y,0,1)).getUTCDay():$s(xi(T.y,0,1)).getDay(),T.m=0,T.d="W"in T?(T.w+6)%7+T.W*7-(W+5)%7:T.w+T.U*7-(W+6)%7);return"Z"in T?(T.H+=T.Z/100|0,T.M+=T.Z%100,Ls(T)):$s(T)}}function M(R,z,D,T){for(var X=0,Q=z.length,W=D.length,ut,H;X<Q;){if(T>=W)return-1;if(ut=z.charCodeAt(X++),ut===37){if(ut=z.charAt(X++),H=S[ut in oh?z.charAt(X++):ut],!H||(T=H(R,D,T))<0)return-1}else if(ut!=D.charCodeAt(T++))return-1}return T}function A(R,z,D){var T=u.exec(z.slice(D));return T?(R.p=c.get(T[0].toLowerCase()),D+T[0].length):-1}function k(R,z,D){var T=p.exec(z.slice(D));return T?(R.w=g.get(T[0].toLowerCase()),D+T[0].length):-1}function C(R,z,D){var T=f.exec(z.slice(D));return T?(R.w=h.get(T[0].toLowerCase()),D+T[0].length):-1}function O(R,z,D){var T=x.exec(z.slice(D));return T?(R.m=y.get(T[0].toLowerCase()),D+T[0].length):-1}function P(R,z,D){var T=d.exec(z.slice(D));return T?(R.m=m.get(T[0].toLowerCase()),D+T[0].length):-1}function F(R,z,D){return M(R,t,z,D)}function B(R,z,D){return M(R,n,z,D)}function L(R,z,D){return M(R,r,z,D)}function $(R){return s[R.getDay()]}function Y(R){return a[R.getDay()]}function I(R){return l[R.getMonth()]}function et(R){return o[R.getMonth()]}function K(R){return i[+(R.getHours()>=12)]}function J(R){return 1+~~(R.getMonth()/3)}function st(R){return s[R.getUTCDay()]}function lt(R){return a[R.getUTCDay()]}function N(R){return l[R.getUTCMonth()]}function j(R){return o[R.getUTCMonth()]}function nt(R){return i[+(R.getUTCHours()>=12)]}function Z(R){return 1+~~(R.getUTCMonth()/3)}return{format:function(R){var z=w(R+="",v);return z.toString=function(){return R},z},parse:function(R){var z=b(R+="",!1);return z.toString=function(){return R},z},utcFormat:function(R){var z=w(R+="",_);return z.toString=function(){return R},z},utcParse:function(R){var z=b(R+="",!0);return z.toString=function(){return R},z}}}var oh={"-":"",_:" ",0:"0"},de=/^\s*\d+/,xb=/^%/,vb=/[\\^$*+?|[\]().{}]/g;function Ct(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function bb(e){return e.replace(vb,"\\$&")}function vi(e){return new RegExp("^(?:"+e.map(bb).join("|")+")","i")}function bi(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function wb(e,t,n){var r=de.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Sb(e,t,n){var r=de.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Tb(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Mb(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ab(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function lh(e,t,n){var r=de.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function uh(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function kb(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Cb(e,t,n){var r=de.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Rb(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ch(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Eb(e,t,n){var r=de.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function fh(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Db(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ob(e,t,n){var r=de.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Pb(e,t,n){var r=de.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Fb(e,t,n){var r=de.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $b(e,t,n){var r=xb.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Lb(e,t,n){var r=de.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Nb(e,t,n){var r=de.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function hh(e,t){return Ct(e.getDate(),t,2)}function qb(e,t){return Ct(e.getHours(),t,2)}function Ib(e,t){return Ct(e.getHours()%12||12,t,2)}function zb(e,t){return Ct(1+na.count(Un(e),e),t,3)}function Om(e,t){return Ct(e.getMilliseconds(),t,3)}function Bb(e,t){return Om(e,t)+"000"}function Ub(e,t){return Ct(e.getMonth()+1,t,2)}function Hb(e,t){return Ct(e.getMinutes(),t,2)}function jb(e,t){return Ct(e.getSeconds(),t,2)}function Gb(e){var t=e.getDay();return t===0?7:t}function Yb(e,t){return Ct(is.count(Un(e)-1,e),t,2)}function Pm(e){var t=e.getDay();return t>=4||t===0?ii(e):ii.ceil(e)}function Wb(e,t){return e=Pm(e),Ct(ii.count(Un(e),e)+(Un(e).getDay()===4),t,2)}function Xb(e){return e.getDay()}function Kb(e,t){return Ct(Ha.count(Un(e)-1,e),t,2)}function Vb(e,t){return Ct(e.getFullYear()%100,t,2)}function Zb(e,t){return e=Pm(e),Ct(e.getFullYear()%100,t,2)}function Qb(e,t){return Ct(e.getFullYear()%1e4,t,4)}function Jb(e,t){var n=e.getDay();return e=n>=4||n===0?ii(e):ii.ceil(e),Ct(e.getFullYear()%1e4,t,4)}function tw(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ct(t/60|0,"0",2)+Ct(t%60,"0",2)}function ph(e,t){return Ct(e.getUTCDate(),t,2)}function ew(e,t){return Ct(e.getUTCHours(),t,2)}function nw(e,t){return Ct(e.getUTCHours()%12||12,t,2)}function rw(e,t){return Ct(1+Gc.count(Ar(e),e),t,3)}function Fm(e,t){return Ct(e.getUTCMilliseconds(),t,3)}function iw(e,t){return Fm(e,t)+"000"}function aw(e,t){return Ct(e.getUTCMonth()+1,t,2)}function sw(e,t){return Ct(e.getUTCMinutes(),t,2)}function ow(e,t){return Ct(e.getUTCSeconds(),t,2)}function lw(e){var t=e.getUTCDay();return t===0?7:t}function uw(e,t){return Ct(Dm.count(Ar(e)-1,e),t,2)}function $m(e){var t=e.getUTCDay();return t>=4||t===0?ai(e):ai.ceil(e)}function cw(e,t){return e=$m(e),Ct(ai.count(Ar(e),e)+(Ar(e).getUTCDay()===4),t,2)}function fw(e){return e.getUTCDay()}function hw(e,t){return Ct(ja.count(Ar(e)-1,e),t,2)}function pw(e,t){return Ct(e.getUTCFullYear()%100,t,2)}function dw(e,t){return e=$m(e),Ct(e.getUTCFullYear()%100,t,2)}function gw(e,t){return Ct(e.getUTCFullYear()%1e4,t,4)}function mw(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ai(e):ai.ceil(e),Ct(e.getUTCFullYear()%1e4,t,4)}function yw(){return"+0000"}function dh(){return"%"}function gh(e){return+e}function mh(e){return Math.floor(+e/1e3)}var qr,Lm;_w({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 _w(e){return qr=_b(e),Lm=qr.format,qr.parse,qr.utcFormat,qr.utcParse,qr}function xw(e){return new Date(e)}function vw(e){return e instanceof Date?+e:+new Date(+e)}function Nm(e,t,n,r,i,a,s,o,l,u){var c=km(),f=c.invert,h=c.domain,p=u(".%L"),g=u(":%S"),d=u("%I:%M"),m=u("%I %p"),x=u("%a %d"),y=u("%b %d"),v=u("%B"),_=u("%Y");function S(w){return(l(w)<w?p:o(w)<w?g:s(w)<w?d:a(w)<w?m:r(w)<w?i(w)<w?x:y:n(w)<w?v:_)(w)}return c.invert=function(w){return new Date(f(w))},c.domain=function(w){return arguments.length?h(Array.from(w,vw)):h().map(xw)},c.ticks=function(w){var b=h();return e(b[0],b[b.length-1],w??10)},c.tickFormat=function(w,b){return b==null?S:u(b)},c.nice=function(w){var b=h();return(!w||typeof w.range!="function")&&(w=t(b[0],b[b.length-1],w??10)),w?h(nb(b,w)):c},c.copy=function(){return Am(c,Nm(e,t,n,r,i,a,s,o,l,u))},c}function Wr(){return Mm.apply(Nm(mb,yb,Un,Yc,is,na,jc,Hc,Hr,Lm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Xt(e){return function(){return e}}const oc=Math.PI,lc=2*oc,dr=1e-6,bw=lc-dr;function qm(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ww(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qm;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Sw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qm:ww(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=r-t,u=i-n,c=s-t,f=o-n,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>dr)if(!(Math.abs(f*l-u*c)>dr)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,g=i-o,d=l*l+u*u,m=p*p+g*g,x=Math.sqrt(d),y=Math.sqrt(h),v=a*Math.tan((oc-Math.acos((d+h-m)/(2*x*y)))/2),_=v/y,S=v/x;Math.abs(_-1)>dr&&this._append`L${t+_*c},${n+_*f}`,this._append`A${a},${a},0,0,${+(f*p>c*g)},${this._x1=t+S*l},${this._y1=n+S*u}`}}arc(t,n,r,i,a,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),u=t+o,c=n+l,f=1^s,h=s?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>dr||Math.abs(this._y1-c)>dr)&&this._append`L${u},${c}`,r&&(h<0&&(h=h%lc+lc),h>bw?this._append`A${r},${r},0,1,${f},${t-o},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:h>dr&&this._append`A${r},${r},0,${+(h>=oc)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Im(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Sw(t)}function Wc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function zm(e){this._context=e}zm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function kr(e){return new zm(e)}function Bm(e){return e[0]}function Um(e){return e[1]}function Hm(e,t){var n=Xt(!0),r=null,i=kr,a=null,s=Im(o);e=typeof e=="function"?e:e===void 0?Bm:Xt(e),t=typeof t=="function"?t:t===void 0?Um:Xt(t);function o(l){var u,c=(l=Wc(l)).length,f,h=!1,p;for(r==null&&(a=i(p=s())),u=0;u<=c;++u)!(u<c&&n(f=l[u],u,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,u,l),+t(f,u,l));if(p)return a=null,p+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Xt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Xt(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Xt(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),o):r},o}function as(e,t,n){var r=null,i=Xt(!0),a=null,s=kr,o=null,l=Im(u);e=typeof e=="function"?e:e===void 0?Bm:Xt(+e),t=typeof t=="function"?t:Xt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Um:Xt(+n);function u(f){var h,p,g,d=(f=Wc(f)).length,m,x=!1,y,v=new Array(d),_=new Array(d);for(a==null&&(o=s(y=l())),h=0;h<=d;++h){if(!(h<d&&i(m=f[h],h,f))===x)if(x=!x)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),g=h-1;g>=p;--g)o.point(v[g],_[g]);o.lineEnd(),o.areaEnd()}x&&(v[h]=+e(m,h,f),_[h]=+t(m,h,f),o.point(r?+r(m,h,f):v[h],n?+n(m,h,f):_[h]))}if(y)return o=null,y+""||null}function c(){return Hm().defined(i).curve(s).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Xt(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Xt(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Xt(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Xt(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Xt(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Xt(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Xt(!!f),u):i},u.curve=function(f){return arguments.length?(s=f,a!=null&&(o=s(a)),u):s},u.context=function(f){return arguments.length?(f==null?a=o=null:o=s(a=f),u):a},u}function yh(e,t){if((s=e.length)>1)for(var n=1,r,i,a=e[t[0]],s,o=a.length;n<s;++n)for(i=a,a=e[t[n]],r=0;r<o;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function _h(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Tw(e,t){return e[t]}function Mw(e){const t=[];return t.key=e,t}function Yi(){var e=Xt([]),t=_h,n=yh,r=Tw;function i(a){var s=Array.from(e.apply(this,arguments),Mw),o,l=s.length,u=-1,c;for(const f of a)for(o=0,++u;o<l;++o)(s[o][u]=[0,+r(f,s[o].key,u,a)]).data=f;for(o=0,c=Wc(t(s));o<l;++o)s[c[o]].index=o;return n(s,c),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Xt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Xt(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?_h:typeof a=="function"?a:Xt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??yh,i):n},i}function Fn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}/*!
|
|
2
|
-
* GSAP 3.14.2
|
|
3
|
-
* https://gsap.com
|
|
4
|
-
*
|
|
5
|
-
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
6
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
7
|
-
* @author: Jack Doyle, jack@greensock.com
|
|
8
|
-
*/var en={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},si={duration:.5,overwrite:!1,delay:0},Xc,be,Ut,fn=1e8,$t=1/fn,uc=Math.PI*2,Aw=uc/4,kw=0,Gm=Math.sqrt,Cw=Math.cos,Rw=Math.sin,pe=function(t){return typeof t=="string"},Kt=function(t){return typeof t=="function"},Hn=function(t){return typeof t=="number"},Kc=function(t){return typeof t>"u"},An=function(t){return typeof t=="object"},Ie=function(t){return t!==!1},Vc=function(){return typeof window<"u"},xa=function(t){return Kt(t)||pe(t)},Ym=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Ce=Array.isArray,Ew=/random\([^)]+\)/g,Dw=/,\s*/g,xh=/(?:-?\.?\d|\.)+/gi,Wm=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,jr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ns=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Xm=/[+-]=-?[.\d]+/,Ow=/[^,'"\[\]\s]+/gi,Pw=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,jt,wn,cc,Zc,rn={},Ga={},Km,Vm=function(t){return(Ga=oi(t,rn))&&He},Qc=function(t,n){return console.warn("Invalid property",t,"set to",n,"Missing plugin? gsap.registerPlugin()")},Wi=function(t,n){return!n&&console.warn(t)},Zm=function(t,n){return t&&(rn[t]=n)&&Ga&&(Ga[t]=n)||rn},Xi=function(){return 0},Fw={suppressEvents:!0,isStart:!0,kill:!1},Ra={suppressEvents:!0,kill:!1},$w={suppressEvents:!0},Jc={},Jn=[],fc={},Qm,Ze={},qs={},vh=30,Ea=[],tf="",ef=function(t){var n=t[0],r,i;if(An(n)||Kt(n)||(t=[t]),!(r=(n._gsap||{}).harness)){for(i=Ea.length;i--&&!Ea[i].targetTest(n););r=Ea[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new w0(t[i],r)))||t.splice(i,1);return t},vr=function(t){return t._gsap||ef(hn(t))[0]._gsap},Jm=function(t,n,r){return(r=t[n])&&Kt(r)?t[n]():Kc(r)&&t.getAttribute&&t.getAttribute(n)||r},ze=function(t,n){return(t=t.split(",")).forEach(n)||t},te=function(t){return Math.round(t*1e5)/1e5||0},Ht=function(t){return Math.round(t*1e7)/1e7||0},Xr=function(t,n){var r=n.charAt(0),i=parseFloat(n.substr(2));return t=parseFloat(t),r==="+"?t+i:r==="-"?t-i:r==="*"?t*i:t/i},Lw=function(t,n){for(var r=n.length,i=0;t.indexOf(n[i])<0&&++i<r;);return i<r},Ya=function(){var t=Jn.length,n=Jn.slice(0),r,i;for(fc={},Jn.length=0,r=0;r<t;r++)i=n[r],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},nf=function(t){return!!(t._initted||t._startAt||t.add)},t0=function(t,n,r,i){Jn.length&&!be&&Ya(),t.render(n,r,!!(be&&n<0&&nf(t))),Jn.length&&!be&&Ya()},e0=function(t){var n=parseFloat(t);return(n||n===0)&&(t+"").match(Ow).length<2?n:pe(t)?t.trim():t},n0=function(t){return t},an=function(t,n){for(var r in n)r in t||(t[r]=n[r]);return t},Nw=function(t){return function(n,r){for(var i in r)i in n||i==="duration"&&t||i==="ease"||(n[i]=r[i])}},oi=function(t,n){for(var r in n)t[r]=n[r];return t},bh=function e(t,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(t[r]=An(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},Wa=function(t,n){var r={},i;for(i in t)i in n||(r[i]=t[i]);return r},Pi=function(t){var n=t.parent||jt,r=t.keyframes?Nw(Ce(t.keyframes)):an;if(Ie(t.inherit))for(;n;)r(t,n.vars.defaults),n=n.parent||n._dp;return t},qw=function(t,n){for(var r=t.length,i=r===n.length;i&&r--&&t[r]===n[r];);return r<0},r0=function(t,n,r,i,a){var s=t[i],o;if(a)for(o=n[a];s&&s[a]>o;)s=s._prev;return s?(n._next=s._next,s._next=n):(n._next=t[r],t[r]=n),n._next?n._next._prev=n:t[i]=n,n._prev=s,n.parent=n._dp=t,n},ss=function(t,n,r,i){r===void 0&&(r="_first"),i===void 0&&(i="_last");var a=n._prev,s=n._next;a?a._next=s:t[r]===n&&(t[r]=s),s?s._prev=a:t[i]===n&&(t[i]=a),n._next=n._prev=n.parent=null},nr=function(t,n){t.parent&&(!n||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},br=function(t,n){if(t&&(!n||n._end>t._dur||n._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},Iw=function(t){for(var n=t.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return t},hc=function(t,n,r,i){return t._startAt&&(be?t._startAt.revert(Ra):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(n,!0,i))},zw=function e(t){return!t||t._ts&&e(t.parent)},wh=function(t){return t._repeat?li(t._tTime,t=t.duration()+t._rDelay)*t:0},li=function(t,n){var r=Math.floor(t=Ht(t/n));return t&&r===t?r-1:r},Xa=function(t,n){return(t-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},os=function(t){return t._end=Ht(t._start+(t._tDur/Math.abs(t._ts||t._rts||$t)||0))},ls=function(t,n){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=Ht(r._time-(t._ts>0?n/t._ts:((t._dirty?t.totalDuration():t._tDur)-n)/-t._ts)),os(t),r._dirty||br(r,t)),t},i0=function(t,n){var r;if((n._time||!n._dur&&n._initted||n._start<t._time&&(n._dur||!n.add))&&(r=Xa(t.rawTime(),n),(!n._dur||ra(0,n.totalDuration(),r)-n._tTime>$t)&&n.render(r,!0)),br(t,n)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-$t}},Sn=function(t,n,r,i){return n.parent&&nr(n),n._start=Ht((Hn(r)?r:r||t!==jt?un(t,r,n):t._time)+n._delay),n._end=Ht(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),r0(t,n,"_first","_last",t._sort?"_start":0),pc(n)||(t._recent=n),i||i0(t,n),t._ts<0&&ls(t,t._tTime),t},a0=function(t,n){return(rn.ScrollTrigger||Qc("scrollTrigger",n))&&rn.ScrollTrigger.create(n,t)},s0=function(t,n,r,i,a){if(af(t,n,a),!t._initted)return 1;if(!r&&t._pt&&!be&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Qm!==Qe.frame)return Jn.push(t),t._lazy=[a,i],1},Bw=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},pc=function(t){var n=t.data;return n==="isFromStart"||n==="isStart"},Uw=function(t,n,r,i){var a=t.ratio,s=n<0||!n&&(!t._start&&Bw(t)&&!(!t._initted&&pc(t))||(t._ts<0||t._dp._ts<0)&&!pc(t))?0:1,o=t._rDelay,l=0,u,c,f;if(o&&t._repeat&&(l=ra(0,t._tDur,n),c=li(l,o),t._yoyo&&c&1&&(s=1-s),c!==li(t._tTime,o)&&(a=1-s,t.vars.repeatRefresh&&t._initted&&t.invalidate())),s!==a||be||i||t._zTime===$t||!n&&t._zTime){if(!t._initted&&s0(t,n,i,r,l))return;for(f=t._zTime,t._zTime=n||(r?$t:0),r||(r=n&&!f),t.ratio=s,t._from&&(s=1-s),t._time=0,t._tTime=l,u=t._pt;u;)u.r(s,u.d),u=u._next;n<0&&hc(t,n,r,!0),t._onUpdate&&!r&&Je(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&Je(t,"onRepeat"),(n>=t._tDur||n<0)&&t.ratio===s&&(s&&nr(t,1),!r&&!be&&(Je(t,s?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=n)},Hw=function(t,n,r){var i;if(r>n)for(i=t._first;i&&i._start<=r;){if(i.data==="isPause"&&i._start>n)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if(i.data==="isPause"&&i._start<n)return i;i=i._prev}},ui=function(t,n,r,i){var a=t._repeat,s=Ht(n)||0,o=t._tTime/t._tDur;return o&&!i&&(t._time*=s/t._dur),t._dur=s,t._tDur=a?a<0?1e10:Ht(s*(a+1)+t._rDelay*a):s,o>0&&!i&&ls(t,t._tTime=t._tDur*o),t.parent&&os(t),r||br(t.parent,t),t},Sh=function(t){return t instanceof Oe?br(t):ui(t,t._dur)},jw={_start:0,endTime:Xi,totalDuration:Xi},un=function e(t,n,r){var i=t.labels,a=t._recent||jw,s=t.duration()>=fn?a.endTime(!1):t._dur,o,l,u;return pe(n)&&(isNaN(n)||n in i)?(l=n.charAt(0),u=n.substr(-1)==="%",o=n.indexOf("="),l==="<"||l===">"?(o>=0&&(n=n.replace(/=/,"")),(l==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(u?(o<0?a:r).totalDuration()/100:1)):o<0?(n in i||(i[n]=s),i[n]):(l=parseFloat(n.charAt(o-1)+n.substr(o+1)),u&&r&&(l=l/100*(Ce(r)?r[0]:r).totalDuration()),o>1?e(t,n.substr(0,o-1),r)+l:s+l)):n==null?s:+n},Fi=function(t,n,r){var i=Hn(n[1]),a=(i?2:1)+(t<2?0:1),s=n[a],o,l;if(i&&(s.duration=n[1]),s.parent=r,t){for(o=s,l=r;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=Ie(l.vars.inherit)&&l.parent;s.immediateRender=Ie(o.immediateRender),t<2?s.runBackwards=1:s.startAt=n[a-1]}return new se(n[0],s,n[a+1])},ar=function(t,n){return t||t===0?n(t):n},ra=function(t,n,r){return r<t?t:r>n?n:r},ke=function(t,n){return!pe(t)||!(n=Pw.exec(t))?"":n[1]},Gw=function(t,n,r){return ar(r,function(i){return ra(t,n,i)})},dc=[].slice,o0=function(t,n){return t&&An(t)&&"length"in t&&(!n&&!t.length||t.length-1 in t&&An(t[0]))&&!t.nodeType&&t!==wn},Yw=function(t,n,r){return r===void 0&&(r=[]),t.forEach(function(i){var a;return pe(i)&&!n||o0(i,1)?(a=r).push.apply(a,hn(i)):r.push(i)})||r},hn=function(t,n,r){return Ut&&!n&&Ut.selector?Ut.selector(t):pe(t)&&!r&&(cc||!ci())?dc.call((n||Zc).querySelectorAll(t),0):Ce(t)?Yw(t,r):o0(t)?dc.call(t,0):t?[t]:[]},gc=function(t){return t=hn(t)[0]||Wi("Invalid scope")||{},function(n){var r=t.current||t.nativeElement||t;return hn(n,r.querySelectorAll?r:r===t?Wi("Invalid scope")||Zc.createElement("div"):t)}},l0=function(t){return t.sort(function(){return .5-Math.random()})},u0=function(t){if(Kt(t))return t;var n=An(t)?t:{each:t},r=wr(n.ease),i=n.from||0,a=parseFloat(n.base)||0,s={},o=i>0&&i<1,l=isNaN(i)||o,u=n.axis,c=i,f=i;return pe(i)?c=f={center:.5,edges:.5,end:1}[i]||0:!o&&l&&(c=i[0],f=i[1]),function(h,p,g){var d=(g||n).length,m=s[d],x,y,v,_,S,w,b,M,A;if(!m){if(A=n.grid==="auto"?0:(n.grid||[1,fn])[1],!A){for(b=-fn;b<(b=g[A++].getBoundingClientRect().left)&&A<d;);A<d&&A--}for(m=s[d]=[],x=l?Math.min(A,d)*c-.5:i%A,y=A===fn?0:l?d*f/A-.5:i/A|0,b=0,M=fn,w=0;w<d;w++)v=w%A-x,_=y-(w/A|0),m[w]=S=u?Math.abs(u==="y"?_:v):Gm(v*v+_*_),S>b&&(b=S),S<M&&(M=S);i==="random"&&l0(m),m.max=b-M,m.min=M,m.v=d=(parseFloat(n.amount)||parseFloat(n.each)*(A>d?d-1:u?u==="y"?d/A:A:Math.max(A,d/A))||0)*(i==="edges"?-1:1),m.b=d<0?a-d:a,m.u=ke(n.amount||n.each)||0,r=r&&d<0?x0(r):r}return d=(m[h]-m.min)/m.max||0,Ht(m.b+(r?r(d):d)*m.v)+m.u}},mc=function(t){var n=Math.pow(10,((t+"").split(".")[1]||"").length);return function(r){var i=Ht(Math.round(parseFloat(r)/t)*t*n);return(i-i%1)/n+(Hn(r)?0:ke(r))}},c0=function(t,n){var r=Ce(t),i,a;return!r&&An(t)&&(i=r=t.radius||fn,t.values?(t=hn(t.values),(a=!Hn(t[0]))&&(i*=i)):t=mc(t.increment)),ar(n,r?Kt(t)?function(s){return a=t(s),Math.abs(a-s)<=i?a:s}:function(s){for(var o=parseFloat(a?s.x:s),l=parseFloat(a?s.y:0),u=fn,c=0,f=t.length,h,p;f--;)a?(h=t[f].x-o,p=t[f].y-l,h=h*h+p*p):h=Math.abs(t[f]-o),h<u&&(u=h,c=f);return c=!i||u<=i?t[c]:s,a||c===s||Hn(s)?c:c+ke(s)}:mc(t))},f0=function(t,n,r,i){return ar(Ce(t)?!n:r===!0?!!(r=0):!i,function(){return Ce(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(n-t+r*.99))/r)*r*i)/i})},Ww=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduce(function(a,s){return s(a)},i)}},Xw=function(t,n){return function(r){return t(parseFloat(r))+(n||ke(r))}},Kw=function(t,n,r){return p0(t,n,0,1,r)},h0=function(t,n,r){return ar(r,function(i){return t[~~n(i)]})},Vw=function e(t,n,r){var i=n-t;return Ce(t)?h0(t,e(0,t.length),n):ar(r,function(a){return(i+(a-t)%i)%i+t})},Zw=function e(t,n,r){var i=n-t,a=i*2;return Ce(t)?h0(t,e(0,t.length-1),n):ar(r,function(s){return s=(a+(s-t)%a)%a||0,t+(s>i?a-s:s)})},Ki=function(t){return t.replace(Ew,function(n){var r=n.indexOf("[")+1,i=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(Dw);return f0(r?i:+i[0],r?0:+i[1],+i[2]||1e-5)})},p0=function(t,n,r,i,a){var s=n-t,o=i-r;return ar(a,function(l){return r+((l-t)/s*o||0)})},Qw=function e(t,n,r,i){var a=isNaN(t+n)?0:function(p){return(1-p)*t+p*n};if(!a){var s=pe(t),o={},l,u,c,f,h;if(r===!0&&(i=1)&&(r=null),s)t={p:t},n={p:n};else if(Ce(t)&&!Ce(n)){for(c=[],f=t.length,h=f-2,u=1;u<f;u++)c.push(e(t[u-1],t[u]));f--,a=function(g){g*=f;var d=Math.min(h,~~g);return c[d](g-d)},r=n}else i||(t=oi(Ce(t)?[]:{},t));if(!c){for(l in n)rf.call(o,t,l,"get",n[l]);a=function(g){return lf(g,o)||(s?t.p:t)}}}return ar(r,a)},Th=function(t,n,r){var i=t.labels,a=fn,s,o,l;for(s in i)o=i[s]-n,o<0==!!r&&o&&a>(o=Math.abs(o))&&(l=s,a=o);return l},Je=function(t,n,r){var i=t.vars,a=i[n],s=Ut,o=t._ctx,l,u,c;if(a)return l=i[n+"Params"],u=i.callbackScope||t,r&&Jn.length&&Ya(),o&&(Ut=o),c=l?a.apply(u,l):a.call(u),Ut=s,c},Ri=function(t){return nr(t),t.scrollTrigger&&t.scrollTrigger.kill(!!be),t.progress()<1&&Je(t,"onInterrupt"),t},Gr,d0=[],g0=function(t){if(t)if(t=!t.name&&t.default||t,Vc()||t.headless){var n=t.name,r=Kt(t),i=n&&!r&&t.init?function(){this._props=[]}:t,a={init:Xi,render:lf,add:rf,kill:dS,modifier:pS,rawVars:0},s={targetTest:0,get:0,getSetter:of,aliases:{},register:0};if(ci(),t!==i){if(Ze[n])return;an(i,an(Wa(t,a),s)),oi(i.prototype,oi(a,Wa(t,s))),Ze[i.prop=n]=i,t.targetTest&&(Ea.push(i),Jc[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}Zm(n,i),t.register&&t.register(He,i,Be)}else d0.push(t)},Ft=255,Ei={aqua:[0,Ft,Ft],lime:[0,Ft,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ft],navy:[0,0,128],white:[Ft,Ft,Ft],olive:[128,128,0],yellow:[Ft,Ft,0],orange:[Ft,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ft,0,0],pink:[Ft,192,203],cyan:[0,Ft,Ft],transparent:[Ft,Ft,Ft,0]},Is=function(t,n,r){return t+=t<0?1:t>1?-1:0,(t*6<1?n+(r-n)*t*6:t<.5?r:t*3<2?n+(r-n)*(2/3-t)*6:n)*Ft+.5|0},m0=function(t,n,r){var i=t?Hn(t)?[t>>16,t>>8&Ft,t&Ft]:0:Ei.black,a,s,o,l,u,c,f,h,p,g;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),Ei[t])i=Ei[t];else if(t.charAt(0)==="#"){if(t.length<6&&(a=t.charAt(1),s=t.charAt(2),o=t.charAt(3),t="#"+a+a+s+s+o+o+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&Ft,i&Ft,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&Ft,t&Ft]}else if(t.substr(0,3)==="hsl"){if(i=g=t.match(xh),!n)l=+i[0]%360/360,u=+i[1]/100,c=+i[2]/100,s=c<=.5?c*(u+1):c+u-c*u,a=c*2-s,i.length>3&&(i[3]*=1),i[0]=Is(l+1/3,a,s),i[1]=Is(l,a,s),i[2]=Is(l-1/3,a,s);else if(~t.indexOf("="))return i=t.match(Wm),r&&i.length<4&&(i[3]=1),i}else i=t.match(xh)||Ei.transparent;i=i.map(Number)}return n&&!g&&(a=i[0]/Ft,s=i[1]/Ft,o=i[2]/Ft,f=Math.max(a,s,o),h=Math.min(a,s,o),c=(f+h)/2,f===h?l=u=0:(p=f-h,u=c>.5?p/(2-f-h):p/(f+h),l=f===a?(s-o)/p+(s<o?6:0):f===s?(o-a)/p+2:(a-s)/p+4,l*=60),i[0]=~~(l+.5),i[1]=~~(u*100+.5),i[2]=~~(c*100+.5)),r&&i.length<4&&(i[3]=1),i},y0=function(t){var n=[],r=[],i=-1;return t.split(tr).forEach(function(a){var s=a.match(jr)||[];n.push.apply(n,s),r.push(i+=s.length+1)}),n.c=r,n},Mh=function(t,n,r){var i="",a=(t+i).match(tr),s=n?"hsla(":"rgba(",o=0,l,u,c,f;if(!a)return t;if(a=a.map(function(h){return(h=m0(h,n,1))&&s+(n?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),r&&(c=y0(t),l=r.c,l.join(i)!==c.c.join(i)))for(u=t.replace(tr,"1").split(jr),f=u.length-1;o<f;o++)i+=u[o]+(~l.indexOf(o)?a.shift()||s+"0,0,0,0)":(c.length?c:a.length?a:r).shift());if(!u)for(u=t.split(tr),f=u.length-1;o<f;o++)i+=u[o]+a[o];return i+u[f]},tr=(function(){var e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in Ei)e+="|"+t+"\\b";return new RegExp(e+")","gi")})(),Jw=/hsl[a]?\(/,_0=function(t){var n=t.join(" "),r;if(tr.lastIndex=0,tr.test(n))return r=Jw.test(n),t[1]=Mh(t[1],r),t[0]=Mh(t[0],r,y0(t[1])),!0},Vi,Qe=(function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,s=a,o=[],l,u,c,f,h,p,g=function d(m){var x=e()-i,y=m===!0,v,_,S,w;if((x>t||x<0)&&(r+=x-n),i+=x,S=i-r,v=S-s,(v>0||y)&&(w=++f.frame,h=S-f.time*1e3,f.time=S=S/1e3,s+=v+(v>=a?4:a-v),_=1),y||(l=u(d)),_)for(p=0;p<o.length;p++)o[p](S,h,w,m)};return f={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(m){return h/(1e3/(m||60))},wake:function(){Km&&(!cc&&Vc()&&(wn=cc=window,Zc=wn.document||{},rn.gsap=He,(wn.gsapVersions||(wn.gsapVersions=[])).push(He.version),Vm(Ga||wn.GreenSockGlobals||!wn.gsap&&wn||{}),d0.forEach(g0)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),u=c||function(m){return setTimeout(m,s-f.time*1e3+1|0)},Vi=1,g(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),Vi=0,u=Xi},lagSmoothing:function(m,x){t=m||1/0,n=Math.min(x||33,t)},fps:function(m){a=1e3/(m||240),s=f.time*1e3+a},add:function(m,x,y){var v=x?function(_,S,w,b){m(_,S,w,b),f.remove(v)}:m;return f.remove(m),o[y?"unshift":"push"](v),ci(),v},remove:function(m,x){~(x=o.indexOf(m))&&o.splice(x,1)&&p>=x&&p--},_listeners:o},f})(),ci=function(){return!Vi&&Qe.wake()},Tt={},tS=/^[\d.\-M][\d.\-,\s]/,eS=/["']/g,nS=function(t){for(var n={},r=t.substr(1,t.length-3).split(":"),i=r[0],a=1,s=r.length,o,l,u;a<s;a++)l=r[a],o=a!==s-1?l.lastIndexOf(","):l.length,u=l.substr(0,o),n[i]=isNaN(u)?u.replace(eS,"").trim():+u,i=l.substr(o+1).trim();return n},rS=function(t){var n=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",n);return t.substring(n,~i&&i<r?t.indexOf(")",r+1):r)},iS=function(t){var n=(t+"").split("("),r=Tt[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~t.indexOf("{")?[nS(n[1])]:rS(t).split(",").map(e0)):Tt._CE&&tS.test(t)?Tt._CE("",t):r},x0=function(t){return function(n){return 1-t(1-n)}},v0=function e(t,n){for(var r=t._first,i;r;)r instanceof Oe?e(r,n):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==n&&(r.timeline?e(r.timeline,n):(i=r._ease,r._ease=r._yEase,r._yEase=i,r._yoyo=n)),r=r._next},wr=function(t,n){return t&&(Kt(t)?t:Tt[t]||iS(t))||n},Er=function(t,n,r,i){r===void 0&&(r=function(l){return 1-n(1-l)}),i===void 0&&(i=function(l){return l<.5?n(l*2)/2:1-n((1-l)*2)/2});var a={easeIn:n,easeOut:r,easeInOut:i},s;return ze(t,function(o){Tt[o]=rn[o]=a,Tt[s=o.toLowerCase()]=r;for(var l in a)Tt[s+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Tt[o+"."+l]=a[l]}),a},b0=function(t){return function(n){return n<.5?(1-t(1-n*2))/2:.5+t((n-.5)*2)/2}},zs=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),s=a/uc*(Math.asin(1/i)||0),o=function(c){return c===1?1:i*Math.pow(2,-10*c)*Rw((c-s)*a)+1},l=t==="out"?o:t==="in"?function(u){return 1-o(1-u)}:b0(o);return a=uc/a,l.config=function(u,c){return e(t,u,c)},l},Bs=function e(t,n){n===void 0&&(n=1.70158);var r=function(s){return s?--s*s*((n+1)*s+n)+1:0},i=t==="out"?r:t==="in"?function(a){return 1-r(1-a)}:b0(r);return i.config=function(a){return e(t,a)},i};ze("Linear,Quad,Cubic,Quart,Quint,Strong",function(e,t){var n=t<5?t+1:t;Er(e+",Power"+(n-1),t?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});Tt.Linear.easeNone=Tt.none=Tt.Linear.easeIn;Er("Elastic",zs("in"),zs("out"),zs());(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(o){return o<n?e*o*o:o<r?e*Math.pow(o-1.5/t,2)+.75:o<i?e*(o-=2.25/t)*o+.9375:e*Math.pow(o-2.625/t,2)+.984375};Er("Bounce",function(s){return 1-a(1-s)},a)})(7.5625,2.75);Er("Expo",function(e){return Math.pow(2,10*(e-1))*e+e*e*e*e*e*e*(1-e)});Er("Circ",function(e){return-(Gm(1-e*e)-1)});Er("Sine",function(e){return e===1?1:-Cw(e*Aw)+1});Er("Back",Bs("in"),Bs("out"),Bs());Tt.SteppedEase=Tt.steps=rn.SteppedEase={config:function(t,n){t===void 0&&(t=1);var r=1/t,i=t+(n?0:1),a=n?1:0,s=1-$t;return function(o){return((i*ra(0,s,o)|0)+a)*r}}};si.ease=Tt["quad.out"];ze("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(e){return tf+=e+","+e+"Params,"});var w0=function(t,n){this.id=kw++,t._gsap=this,this.target=t,this.harness=n,this.get=n?n.get:Jm,this.set=n?n.getSetter:of},Zi=(function(){function e(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,ui(this,+n.duration,1,1),this.data=n.data,Ut&&(this._ctx=Ut,Ut.data.push(this)),Vi||Qe.wake()}var t=e.prototype;return t.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},t.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},t.totalDuration=function(r){return arguments.length?(this._dirty=0,ui(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(r,i){if(ci(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(ls(this,r),!a._dp||a.parent||i0(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&Sn(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===$t||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),t0(this,r,i)),this},t.time=function(r,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+wh(this))%(this._dur+this._rDelay)||(r?this._dur:0),i):this._time},t.totalProgress=function(r,i){return arguments.length?this.totalTime(this.totalDuration()*r,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(r,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+wh(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(r,i){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*a,i):this._repeat?li(this._tTime,a)+1:1},t.timeScale=function(r,i){if(!arguments.length)return this._rts===-$t?0:this._rts;if(this._rts===r)return this;var a=this.parent&&this._ts?Xa(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-$t?0:this._rts,this.totalTime(ra(-Math.abs(this._delay),this.totalDuration(),a),i!==!1),os(this),Iw(this)},t.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ci(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==$t&&(this._tTime-=$t)))),this):this._ps},t.startTime=function(r){if(arguments.length){this._start=Ht(r);var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Sn(i,this,this._start-this._delay),this}return this._start},t.endTime=function(r){return this._start+(Ie(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(r){var i=this.parent||this._dp;return i?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Xa(i.rawTime(r),this):this._tTime:this._tTime},t.revert=function(r){r===void 0&&(r=$w);var i=be;return be=r,nf(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),be=i,this},t.globalTime=function(r){for(var i=this,a=arguments.length?r:i.rawTime();i;)a=i._start+a/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(r):a},t.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Sh(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(r){if(arguments.length){var i=this._time;return this._rDelay=r,Sh(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},t.seek=function(r,i){return this.totalTime(un(this,r),Ie(i))},t.restart=function(r,i){return this.play().totalTime(r?-this._delay:0,Ie(i)),this._dur||(this._zTime=-$t),this},t.play=function(r,i){return r!=null&&this.seek(r,i),this.reversed(!1).paused(!1)},t.reverse=function(r,i){return r!=null&&this.seek(r||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(r,i){return r!=null&&this.seek(r,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-$t:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-$t,this},t.isActive=function(){var r=this.parent||this._dp,i=this._start,a;return!!(!r||this._ts&&this._initted&&r.isActive()&&(a=r.rawTime(!0))>=i&&a<this.endTime(!0)-$t)},t.eventCallback=function(r,i,a){var s=this.vars;return arguments.length>1?(i?(s[r]=i,a&&(s[r+"Params"]=a),r==="onUpdate"&&(this._onUpdate=i)):delete s[r],this):s[r]},t.then=function(r){var i=this,a=i._prom;return new Promise(function(s){var o=Kt(r)?r:n0,l=function(){var c=i.then;i.then=null,a&&a(),Kt(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?l():i._prom=l})},t.kill=function(){Ri(this)},e})();an(Zi.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-$t,_prom:0,_ps:!1,_rts:1});var Oe=(function(e){jm(t,e);function t(r,i){var a;return r===void 0&&(r={}),a=e.call(this,r)||this,a.labels={},a.smoothChildTiming=!!r.smoothChildTiming,a.autoRemoveChildren=!!r.autoRemoveChildren,a._sort=Ie(r.sortChildren),jt&&Sn(r.parent||jt,Fn(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),r.scrollTrigger&&a0(Fn(a),r.scrollTrigger),a}var n=t.prototype;return n.to=function(i,a,s){return Fi(0,arguments,this),this},n.from=function(i,a,s){return Fi(1,arguments,this),this},n.fromTo=function(i,a,s,o){return Fi(2,arguments,this),this},n.set=function(i,a,s){return a.duration=0,a.parent=this,Pi(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new se(i,a,un(this,s),1),this},n.call=function(i,a,s){return Sn(this,se.delayedCall(0,i,a),s)},n.staggerTo=function(i,a,s,o,l,u,c){return s.duration=a,s.stagger=s.stagger||o,s.onComplete=u,s.onCompleteParams=c,s.parent=this,new se(i,s,un(this,l)),this},n.staggerFrom=function(i,a,s,o,l,u,c){return s.runBackwards=1,Pi(s).immediateRender=Ie(s.immediateRender),this.staggerTo(i,a,s,o,l,u,c)},n.staggerFromTo=function(i,a,s,o,l,u,c,f){return o.startAt=s,Pi(o).immediateRender=Ie(o.immediateRender),this.staggerTo(i,a,o,l,u,c,f)},n.render=function(i,a,s){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=i<=0?0:Ht(i),f=this._zTime<0!=i<0&&(this._initted||!u),h,p,g,d,m,x,y,v,_,S,w,b;if(this!==jt&&c>l&&i>=0&&(c=l),c!==this._tTime||s||f){if(o!==this._time&&u&&(c+=this._time-o,i+=this._time-o),h=c,_=this._start,v=this._ts,x=!v,f&&(u||(o=this._zTime),(i||!a)&&(this._zTime=i)),this._repeat){if(w=this._yoyo,m=u+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(m*100+i,a,s);if(h=Ht(c%m),c===l?(d=this._repeat,h=u):(S=Ht(c/m),d=~~S,d&&d===S&&(h=u,d--),h>u&&(h=u)),S=li(this._tTime,m),!o&&this._tTime&&S!==d&&this._tTime-S*m-this._dur<=0&&(S=d),w&&d&1&&(h=u-h,b=1),d!==S&&!this._lock){var M=w&&S&1,A=M===(w&&d&1);if(d<S&&(M=!M),o=M?0:c%u?u:c,this._lock=1,this.render(o||(b?0:Ht(d*m)),a,!u)._lock=0,this._tTime=c,!a&&this.parent&&Je(this,"onRepeat"),this.vars.repeatRefresh&&!b&&(this.invalidate()._lock=1,S=d),o&&o!==this._time||x!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,A&&(this._lock=2,o=M?u:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!b&&this.invalidate()),this._lock=0,!this._ts&&!x)return this;v0(this,b)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(y=Hw(this,Ht(o),Ht(h)),y&&(c-=h-(h=y._start))),this._tTime=c,this._time=h,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,o=0),!o&&c&&u&&!a&&!S&&(Je(this,"onStart"),this._tTime!==c))return this;if(h>=o&&i>=0)for(p=this._first;p;){if(g=p._next,(p._act||h>=p._start)&&p._ts&&y!==p){if(p.parent!==this)return this.render(i,a,s);if(p.render(p._ts>0?(h-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(h-p._start)*p._ts,a,s),h!==this._time||!this._ts&&!x){y=0,g&&(c+=this._zTime=-$t);break}}p=g}else{p=this._last;for(var k=i<0?i:h;p;){if(g=p._prev,(p._act||k<=p._end)&&p._ts&&y!==p){if(p.parent!==this)return this.render(i,a,s);if(p.render(p._ts>0?(k-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(k-p._start)*p._ts,a,s||be&&nf(p)),h!==this._time||!this._ts&&!x){y=0,g&&(c+=this._zTime=k?-$t:$t);break}}p=g}}if(y&&!a&&(this.pause(),y.render(h>=o?0:-$t)._zTime=h>=o?1:-1,this._ts))return this._start=_,os(this),this.render(i,a,s);this._onUpdate&&!a&&Je(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(_===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((i||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&nr(this,1),!a&&!(i<0&&!o)&&(c||o||!l)&&(Je(this,c===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(i,a){var s=this;if(Hn(a)||(a=un(this,a,i)),!(i instanceof Zi)){if(Ce(i))return i.forEach(function(o){return s.add(o,a)}),this;if(pe(i))return this.addLabel(i,a);if(Kt(i))i=se.delayedCall(0,i);else return this}return this!==i?Sn(this,i,a):this},n.getChildren=function(i,a,s,o){i===void 0&&(i=!0),a===void 0&&(a=!0),s===void 0&&(s=!0),o===void 0&&(o=-fn);for(var l=[],u=this._first;u;)u._start>=o&&(u instanceof se?a&&l.push(u):(s&&l.push(u),i&&l.push.apply(l,u.getChildren(!0,a,s)))),u=u._next;return l},n.getById=function(i){for(var a=this.getChildren(1,1,1),s=a.length;s--;)if(a[s].vars.id===i)return a[s]},n.remove=function(i){return pe(i)?this.removeLabel(i):Kt(i)?this.killTweensOf(i):(i.parent===this&&ss(this,i),i===this._recent&&(this._recent=this._last),br(this))},n.totalTime=function(i,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ht(Qe.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),e.prototype.totalTime.call(this,i,a),this._forcing=0,this):this._tTime},n.addLabel=function(i,a){return this.labels[i]=un(this,a),this},n.removeLabel=function(i){return delete this.labels[i],this},n.addPause=function(i,a,s){var o=se.delayedCall(0,a||Xi,s);return o.data="isPause",this._hasPause=1,Sn(this,o,un(this,i))},n.removePause=function(i){var a=this._first;for(i=un(this,i);a;)a._start===i&&a.data==="isPause"&&nr(a),a=a._next},n.killTweensOf=function(i,a,s){for(var o=this.getTweensOf(i,s),l=o.length;l--;)Vn!==o[l]&&o[l].kill(i,a);return this},n.getTweensOf=function(i,a){for(var s=[],o=hn(i),l=this._first,u=Hn(a),c;l;)l instanceof se?Lw(l._targets,o)&&(u?(!Vn||l._initted&&l._ts)&&l.globalTime(0)<=a&&l.globalTime(l.totalDuration())>a:!a||l.isActive())&&s.push(l):(c=l.getTweensOf(o,a)).length&&s.push.apply(s,c),l=l._next;return s},n.tweenTo=function(i,a){a=a||{};var s=this,o=un(s,i),l=a,u=l.startAt,c=l.onStart,f=l.onStartParams,h=l.immediateRender,p,g=se.to(s,an({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale())||$t,onStart:function(){if(s.pause(),!p){var m=a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale());g._dur!==m&&ui(g,m,0,1).render(g._time,!0,!0),p=1}c&&c.apply(g,f||[])}},a));return h?g.render(0):g},n.tweenFromTo=function(i,a,s){return this.tweenTo(a,an({startAt:{time:un(this,i)}},s))},n.recent=function(){return this._recent},n.nextLabel=function(i){return i===void 0&&(i=this._time),Th(this,un(this,i))},n.previousLabel=function(i){return i===void 0&&(i=this._time),Th(this,un(this,i),1)},n.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+$t)},n.shiftChildren=function(i,a,s){s===void 0&&(s=0);var o=this._first,l=this.labels,u;for(i=Ht(i);o;)o._start>=s&&(o._start+=i,o._end+=i),o=o._next;if(a)for(u in l)l[u]>=s&&(l[u]+=i);return br(this)},n.invalidate=function(i){var a=this._first;for(this._lock=0;a;)a.invalidate(i),a=a._next;return e.prototype.invalidate.call(this,i)},n.clear=function(i){i===void 0&&(i=!0);for(var a=this._first,s;a;)s=a._next,this.remove(a),a=s;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),br(this)},n.totalDuration=function(i){var a=0,s=this,o=s._last,l=fn,u,c,f;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-i:i));if(s._dirty){for(f=s.parent;o;)u=o._prev,o._dirty&&o.totalDuration(),c=o._start,c>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,Sn(s,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(a-=c,(!f&&!s._dp||f&&f.smoothChildTiming)&&(s._start+=Ht(c/s._ts),s._time-=c,s._tTime-=c),s.shiftChildren(-c,!1,-1/0),l=0),o._end>a&&o._ts&&(a=o._end),o=u;ui(s,s===jt&&s._time>a?s._time:a,1,1),s._dirty=0}return s._tDur},t.updateRoot=function(i){if(jt._ts&&(t0(jt,Xa(i,jt)),Qm=Qe.frame),Qe.frame>=vh){vh+=en.autoSleep||120;var a=jt._first;if((!a||!a._ts)&&en.autoSleep&&Qe._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||Qe.sleep()}}},t})(Zi);an(Oe.prototype,{_lock:0,_hasPause:0,_forcing:0});var aS=function(t,n,r,i,a,s,o){var l=new Be(this._pt,t,n,0,1,C0,null,a),u=0,c=0,f,h,p,g,d,m,x,y;for(l.b=r,l.e=i,r+="",i+="",(x=~i.indexOf("random("))&&(i=Ki(i)),s&&(y=[r,i],s(y,t,n),r=y[0],i=y[1]),h=r.match(Ns)||[];f=Ns.exec(i);)g=f[0],d=i.substring(u,f.index),p?p=(p+1)%5:d.substr(-5)==="rgba("&&(p=1),g!==h[c++]&&(m=parseFloat(h[c-1])||0,l._pt={_next:l._pt,p:d||c===1?d:",",s:m,c:g.charAt(1)==="="?Xr(m,g)-m:parseFloat(g)-m,m:p&&p<4?Math.round:0},u=Ns.lastIndex);return l.c=u<i.length?i.substring(u,i.length):"",l.fp=o,(Xm.test(i)||x)&&(l.e=0),this._pt=l,l},rf=function(t,n,r,i,a,s,o,l,u,c){Kt(i)&&(i=i(a||0,t,s));var f=t[n],h=r!=="get"?r:Kt(f)?u?t[n.indexOf("set")||!Kt(t["get"+n.substr(3)])?n:"get"+n.substr(3)](u):t[n]():f,p=Kt(f)?u?cS:A0:sf,g;if(pe(i)&&(~i.indexOf("random(")&&(i=Ki(i)),i.charAt(1)==="="&&(g=Xr(h,i)+(ke(h)||0),(g||g===0)&&(i=g))),!c||h!==i||yc)return!isNaN(h*i)&&i!==""?(g=new Be(this._pt,t,n,+h||0,i-(h||0),typeof f=="boolean"?hS:k0,0,p),u&&(g.fp=u),o&&g.modifier(o,this,t),this._pt=g):(!f&&!(n in t)&&Qc(n,i),aS.call(this,t,n,h,i,p,l||en.stringFilter,u))},sS=function(t,n,r,i,a){if(Kt(t)&&(t=$i(t,a,n,r,i)),!An(t)||t.style&&t.nodeType||Ce(t)||Ym(t))return pe(t)?$i(t,a,n,r,i):t;var s={},o;for(o in t)s[o]=$i(t[o],a,n,r,i);return s},S0=function(t,n,r,i,a,s){var o,l,u,c;if(Ze[t]&&(o=new Ze[t]).init(a,o.rawVars?n[t]:sS(n[t],i,a,s,r),r,i,s)!==!1&&(r._pt=l=new Be(r._pt,a,t,0,1,o.render,o,0,o.priority),r!==Gr))for(u=r._ptLookup[r._targets.indexOf(a)],c=o._props.length;c--;)u[o._props[c]]=l;return o},Vn,yc,af=function e(t,n,r){var i=t.vars,a=i.ease,s=i.startAt,o=i.immediateRender,l=i.lazy,u=i.onUpdate,c=i.runBackwards,f=i.yoyoEase,h=i.keyframes,p=i.autoRevert,g=t._dur,d=t._startAt,m=t._targets,x=t.parent,y=x&&x.data==="nested"?x.vars.targets:m,v=t._overwrite==="auto"&&!Xc,_=t.timeline,S,w,b,M,A,k,C,O,P,F,B,L,$;if(_&&(!h||!a)&&(a="none"),t._ease=wr(a,si.ease),t._yEase=f?x0(wr(f===!0?a:f,si.ease)):0,f&&t._yoyo&&!t._repeat&&(f=t._yEase,t._yEase=t._ease,t._ease=f),t._from=!_&&!!i.runBackwards,!_||h&&!i.stagger){if(O=m[0]?vr(m[0]).harness:0,L=O&&i[O.prop],S=Wa(i,Jc),d&&(d._zTime<0&&d.progress(1),n<0&&c&&o&&!p?d.render(-1,!0):d.revert(c&&g?Ra:Fw),d._lazy=0),s){if(nr(t._startAt=se.set(m,an({data:"isStart",overwrite:!1,parent:x,immediateRender:!0,lazy:!d&&Ie(l),startAt:null,delay:0,onUpdate:u&&function(){return Je(t,"onUpdate")},stagger:0},s))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(be||!o&&!p)&&t._startAt.revert(Ra),o&&g&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(c&&g&&!d){if(n&&(o=!1),b=an({overwrite:!1,data:"isFromStart",lazy:o&&!d&&Ie(l),immediateRender:o,stagger:0,parent:x},S),L&&(b[O.prop]=L),nr(t._startAt=se.set(m,b)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(be?t._startAt.revert(Ra):t._startAt.render(-1,!0)),t._zTime=n,!o)e(t._startAt,$t,$t);else if(!n)return}for(t._pt=t._ptCache=0,l=g&&Ie(l)||l&&!g,w=0;w<m.length;w++){if(A=m[w],C=A._gsap||ef(m)[w]._gsap,t._ptLookup[w]=F={},fc[C.id]&&Jn.length&&Ya(),B=y===m?w:y.indexOf(A),O&&(P=new O).init(A,L||S,t,B,y)!==!1&&(t._pt=M=new Be(t._pt,A,P.name,0,1,P.render,P,0,P.priority),P._props.forEach(function(Y){F[Y]=M}),P.priority&&(k=1)),!O||L)for(b in S)Ze[b]&&(P=S0(b,S,t,B,A,y))?P.priority&&(k=1):F[b]=M=rf.call(t,A,b,"get",S[b],B,y,0,i.stringFilter);t._op&&t._op[w]&&t.kill(A,t._op[w]),v&&t._pt&&(Vn=t,jt.killTweensOf(A,F,t.globalTime(n)),$=!t.parent,Vn=0),t._pt&&l&&(fc[C.id]=1)}k&&R0(t),t._onInit&&t._onInit(t)}t._onUpdate=u,t._initted=(!t._op||t._pt)&&!$,h&&n<=0&&_.render(fn,!0,!0)},oS=function(t,n,r,i,a,s,o,l){var u=(t._pt&&t._ptCache||(t._ptCache={}))[n],c,f,h,p;if(!u)for(u=t._ptCache[n]=[],h=t._ptLookup,p=t._targets.length;p--;){if(c=h[p][n],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==n&&c.fp!==n;)c=c._next;if(!c)return yc=1,t.vars[n]="+=0",af(t,o),yc=0,l?Wi(n+" not eligible for reset"):1;u.push(c)}for(p=u.length;p--;)f=u[p],c=f._pt||f,c.s=(i||i===0)&&!a?i:c.s+(i||0)+s*c.c,c.c=r-c.s,f.e&&(f.e=te(r)+ke(f.e)),f.b&&(f.b=c.s+ke(f.b))},lS=function(t,n){var r=t[0]?vr(t[0]).harness:0,i=r&&r.aliases,a,s,o,l;if(!i)return n;a=oi({},n);for(s in i)if(s in a)for(l=i[s].split(","),o=l.length;o--;)a[l[o]]=a[s];return a},uS=function(t,n,r,i){var a=n.ease||i||"power1.inOut",s,o;if(Ce(n))o=r[t]||(r[t]=[]),n.forEach(function(l,u){return o.push({t:u/(n.length-1)*100,v:l,e:a})});else for(s in n)o=r[s]||(r[s]=[]),s==="ease"||o.push({t:parseFloat(t),v:n[s],e:a})},$i=function(t,n,r,i,a){return Kt(t)?t.call(n,r,i,a):pe(t)&&~t.indexOf("random(")?Ki(t):t},T0=tf+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",M0={};ze(T0+",id,stagger,delay,duration,paused,scrollTrigger",function(e){return M0[e]=1});var se=(function(e){jm(t,e);function t(r,i,a,s){var o;typeof i=="number"&&(a.duration=i,i=a,a=null),o=e.call(this,s?i:Pi(i))||this;var l=o.vars,u=l.duration,c=l.delay,f=l.immediateRender,h=l.stagger,p=l.overwrite,g=l.keyframes,d=l.defaults,m=l.scrollTrigger,x=l.yoyoEase,y=i.parent||jt,v=(Ce(r)||Ym(r)?Hn(r[0]):"length"in i)?[r]:hn(r),_,S,w,b,M,A,k,C;if(o._targets=v.length?ef(v):Wi("GSAP target "+r+" not found. https://gsap.com",!en.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=p,g||h||xa(u)||xa(c)){if(i=o.vars,_=o.timeline=new Oe({data:"nested",defaults:d||{},targets:y&&y.data==="nested"?y.vars.targets:v}),_.kill(),_.parent=_._dp=Fn(o),_._start=0,h||xa(u)||xa(c)){if(b=v.length,k=h&&u0(h),An(h))for(M in h)~T0.indexOf(M)&&(C||(C={}),C[M]=h[M]);for(S=0;S<b;S++)w=Wa(i,M0),w.stagger=0,x&&(w.yoyoEase=x),C&&oi(w,C),A=v[S],w.duration=+$i(u,Fn(o),S,A,v),w.delay=(+$i(c,Fn(o),S,A,v)||0)-o._delay,!h&&b===1&&w.delay&&(o._delay=c=w.delay,o._start+=c,w.delay=0),_.to(A,w,k?k(S,A,v):0),_._ease=Tt.none;_.duration()?u=c=0:o.timeline=0}else if(g){Pi(an(_.vars.defaults,{ease:"none"})),_._ease=wr(g.ease||i.ease||"none");var O=0,P,F,B;if(Ce(g))g.forEach(function(L){return _.to(v,L,">")}),_.duration();else{w={};for(M in g)M==="ease"||M==="easeEach"||uS(M,g[M],w,g.easeEach);for(M in w)for(P=w[M].sort(function(L,$){return L.t-$.t}),O=0,S=0;S<P.length;S++)F=P[S],B={ease:F.e,duration:(F.t-(S?P[S-1].t:0))/100*u},B[M]=F.v,_.to(v,B,O),O+=B.duration;_.duration()<u&&_.to({},{duration:u-_.duration()})}}u||o.duration(u=_.duration())}else o.timeline=0;return p===!0&&!Xc&&(Vn=Fn(o),jt.killTweensOf(v),Vn=0),Sn(y,Fn(o),a),i.reversed&&o.reverse(),i.paused&&o.paused(!0),(f||!u&&!g&&o._start===Ht(y._time)&&Ie(f)&&zw(Fn(o))&&y.data!=="nested")&&(o._tTime=-$t,o.render(Math.max(0,-c)||0)),m&&a0(Fn(o),m),o}var n=t.prototype;return n.render=function(i,a,s){var o=this._time,l=this._tDur,u=this._dur,c=i<0,f=i>l-$t&&!c?l:i<$t?0:i,h,p,g,d,m,x,y,v,_;if(!u)Uw(this,i,a,s);else if(f!==this._tTime||!i||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(h=f,v=this.timeline,this._repeat){if(d=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(d*100+i,a,s);if(h=Ht(f%d),f===l?(g=this._repeat,h=u):(m=Ht(f/d),g=~~m,g&&g===m?(h=u,g--):h>u&&(h=u)),x=this._yoyo&&g&1,x&&(_=this._yEase,h=u-h),m=li(this._tTime,d),h===o&&!s&&this._initted&&g===m)return this._tTime=f,this;g!==m&&(v&&this._yEase&&v0(v,x),this.vars.repeatRefresh&&!x&&!this._lock&&h!==d&&this._initted&&(this._lock=s=1,this.render(Ht(d*g),!0).invalidate()._lock=0))}if(!this._initted){if(s0(this,c?i:h,s,a,f))return this._tTime=0,this;if(o!==this._time&&!(s&&this.vars.repeatRefresh&&g!==m))return this;if(u!==this._dur)return this.render(i,a,s)}if(this._tTime=f,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=y=(_||this._ease)(h/u),this._from&&(this.ratio=y=1-y),!o&&f&&!a&&!m&&(Je(this,"onStart"),this._tTime!==f))return this;for(p=this._pt;p;)p.r(y,p.d),p=p._next;v&&v.render(i<0?i:v._dur*v._ease(h/this._dur),a,s)||this._startAt&&(this._zTime=i),this._onUpdate&&!a&&(c&&hc(this,i,a,s),Je(this,"onUpdate")),this._repeat&&g!==m&&this.vars.onRepeat&&!a&&this.parent&&Je(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(c&&!this._onUpdate&&hc(this,i,!0,!0),(i||!u)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&nr(this,1),!a&&!(c&&!o)&&(f||o||x)&&(Je(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),e.prototype.invalidate.call(this,i)},n.resetTo=function(i,a,s,o,l){Vi||Qe.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||af(this,u),c=this._ease(u/this._dur),oS(this,i,a,s,o,c,u,l)?this.resetTo(i,a,s,o,1):(ls(this,0),this.parent||r0(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(i,a){if(a===void 0&&(a="all"),!i&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?Ri(this):this.scrollTrigger&&this.scrollTrigger.kill(!!be),this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(i,a,Vn&&Vn.vars.overwrite!==!0)._first||Ri(this),this.parent&&s!==this.timeline.totalDuration()&&ui(this,this._dur*this.timeline._tDur/s,0,1),this}var o=this._targets,l=i?hn(i):o,u=this._ptLookup,c=this._pt,f,h,p,g,d,m,x;if((!a||a==="all")&&qw(o,l))return a==="all"&&(this._pt=0),Ri(this);for(f=this._op=this._op||[],a!=="all"&&(pe(a)&&(d={},ze(a,function(y){return d[y]=1}),a=d),a=lS(o,a)),x=o.length;x--;)if(~l.indexOf(o[x])){h=u[x],a==="all"?(f[x]=a,g=h,p={}):(p=f[x]=f[x]||{},g=a);for(d in g)m=h&&h[d],m&&((!("kill"in m.d)||m.d.kill(d)===!0)&&ss(this,m,"_pt"),delete h[d]),p!=="all"&&(p[d]=1)}return this._initted&&!this._pt&&c&&Ri(this),this},t.to=function(i,a){return new t(i,a,arguments[2])},t.from=function(i,a){return Fi(1,arguments)},t.delayedCall=function(i,a,s,o){return new t(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:a,onReverseComplete:a,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:o})},t.fromTo=function(i,a,s){return Fi(2,arguments)},t.set=function(i,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new t(i,a)},t.killTweensOf=function(i,a,s){return jt.killTweensOf(i,a,s)},t})(Zi);an(se.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ze("staggerTo,staggerFrom,staggerFromTo",function(e){se[e]=function(){var t=new Oe,n=dc.call(arguments,0);return n.splice(e==="staggerFromTo"?5:4,0,0),t[e].apply(t,n)}});var sf=function(t,n,r){return t[n]=r},A0=function(t,n,r){return t[n](r)},cS=function(t,n,r,i){return t[n](i.fp,r)},fS=function(t,n,r){return t.setAttribute(n,r)},of=function(t,n){return Kt(t[n])?A0:Kc(t[n])&&t.setAttribute?fS:sf},k0=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e6)/1e6,n)},hS=function(t,n){return n.set(n.t,n.p,!!(n.s+n.c*t),n)},C0=function(t,n){var r=n._pt,i="";if(!t&&n.b)i=n.b;else if(t===1&&n.e)i=n.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round((r.s+r.c*t)*1e4)/1e4)+i,r=r._next;i+=n.c}n.set(n.t,n.p,i,n)},lf=function(t,n){for(var r=n._pt;r;)r.r(t,r.d),r=r._next},pS=function(t,n,r,i){for(var a=this._pt,s;a;)s=a._next,a.p===i&&a.modifier(t,n,r),a=s},dS=function(t){for(var n=this._pt,r,i;n;)i=n._next,n.p===t&&!n.op||n.op===t?ss(this,n,"_pt"):n.dep||(r=1),n=i;return!r},gS=function(t,n,r,i){i.mSet(t,n,i.m.call(i.tween,r,i.mt),i)},R0=function(t){for(var n=t._pt,r,i,a,s;n;){for(r=n._next,i=a;i&&i.pr>n.pr;)i=i._next;(n._prev=i?i._prev:s)?n._prev._next=n:a=n,(n._next=i)?i._prev=n:s=n,n=r}t._pt=a},Be=(function(){function e(n,r,i,a,s,o,l,u,c){this.t=r,this.s=a,this.c=s,this.p=i,this.r=o||k0,this.d=l||this,this.set=u||sf,this.pr=c||0,this._next=n,n&&(n._prev=this)}var t=e.prototype;return t.modifier=function(r,i,a){this.mSet=this.mSet||this.set,this.set=gS,this.m=r,this.mt=a,this.tween=i},e})();ze(tf+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(e){return Jc[e]=1});rn.TweenMax=rn.TweenLite=se;rn.TimelineLite=rn.TimelineMax=Oe;jt=new Oe({sortChildren:!1,defaults:si,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});en.stringFilter=_0;var Sr=[],Da={},mS=[],Ah=0,yS=0,Us=function(t){return(Da[t]||mS).map(function(n){return n()})},_c=function(){var t=Date.now(),n=[];t-Ah>2&&(Us("matchMediaInit"),Sr.forEach(function(r){var i=r.queries,a=r.conditions,s,o,l,u;for(o in i)s=wn.matchMedia(i[o]).matches,s&&(l=1),s!==a[o]&&(a[o]=s,u=1);u&&(r.revert(),l&&n.push(r))}),Us("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(i){return r.add(null,i)})}),Ah=t,Us("matchMedia"))},E0=(function(){function e(n,r){this.selector=r&&gc(r),this.data=[],this._r=[],this.isReverted=!1,this.id=yS++,n&&this.add(n)}var t=e.prototype;return t.add=function(r,i,a){Kt(r)&&(a=i,i=r,r=Kt);var s=this,o=function(){var u=Ut,c=s.selector,f;return u&&u!==s&&u.data.push(s),a&&(s.selector=gc(a)),Ut=s,f=i.apply(s,arguments),Kt(f)&&s._r.push(f),Ut=u,s.selector=c,s.isReverted=!1,f};return s.last=o,r===Kt?o(s,function(l){return s.add(null,l)}):r?s[r]=o:o},t.ignore=function(r){var i=Ut;Ut=null,r(this),Ut=i},t.getTweens=function(){var r=[];return this.data.forEach(function(i){return i instanceof e?r.push.apply(r,i.getTweens()):i instanceof se&&!(i.parent&&i.parent.data==="nested")&&r.push(i)}),r},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(r,i){var a=this;if(r?(function(){for(var o=a.getTweens(),l=a.data.length,u;l--;)u=a.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return o.splice(o.indexOf(c),1)}));for(o.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,f){return f.g-c.g||-1/0}).forEach(function(c){return c.t.revert(r)}),l=a.data.length;l--;)u=a.data[l],u instanceof Oe?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof se)&&u.revert&&u.revert(r);a._r.forEach(function(c){return c(r,a)}),a.isReverted=!0})():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),i)for(var s=Sr.length;s--;)Sr[s].id===this.id&&Sr.splice(s,1)},t.revert=function(r){this.kill(r||{})},e})(),_S=(function(){function e(n){this.contexts=[],this.scope=n,Ut&&Ut.data.push(this)}var t=e.prototype;return t.add=function(r,i,a){An(r)||(r={matches:r});var s=new E0(0,a||this.scope),o=s.conditions={},l,u,c;Ut&&!s.selector&&(s.selector=Ut.selector),this.contexts.push(s),i=s.add("onMatch",i),s.queries=r;for(u in r)u==="all"?c=1:(l=wn.matchMedia(r[u]),l&&(Sr.indexOf(s)<0&&Sr.push(s),(o[u]=l.matches)&&(c=1),l.addListener?l.addListener(_c):l.addEventListener("change",_c)));return c&&i(s,function(f){return s.add(null,f)}),this},t.revert=function(r){this.kill(r||{})},t.kill=function(r){this.contexts.forEach(function(i){return i.kill(r,!0)})},e})(),Ka={registerPlugin:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(i){return g0(i)})},timeline:function(t){return new Oe(t)},getTweensOf:function(t,n){return jt.getTweensOf(t,n)},getProperty:function(t,n,r,i){pe(t)&&(t=hn(t)[0]);var a=vr(t||{}).get,s=r?n0:e0;return r==="native"&&(r=""),t&&(n?s((Ze[n]&&Ze[n].get||a)(t,n,r,i)):function(o,l,u){return s((Ze[o]&&Ze[o].get||a)(t,o,l,u))})},quickSetter:function(t,n,r){if(t=hn(t),t.length>1){var i=t.map(function(c){return He.quickSetter(c,n,r)}),a=i.length;return function(c){for(var f=a;f--;)i[f](c)}}t=t[0]||{};var s=Ze[n],o=vr(t),l=o.harness&&(o.harness.aliases||{})[n]||n,u=s?function(c){var f=new s;Gr._pt=0,f.init(t,r?c+r:c,Gr,0,[t]),f.render(1,f),Gr._pt&&lf(1,Gr)}:o.set(t,l);return s?u:function(c){return u(t,l,r?c+r:c,o,1)}},quickTo:function(t,n,r){var i,a=He.to(t,an((i={},i[n]="+=0.1",i.paused=!0,i.stagger=0,i),r||{})),s=function(l,u,c){return a.resetTo(n,l,u,c)};return s.tween=a,s},isTweening:function(t){return jt.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=wr(t.ease,si.ease)),bh(si,t||{})},config:function(t){return bh(en,t||{})},registerEffect:function(t){var n=t.name,r=t.effect,i=t.plugins,a=t.defaults,s=t.extendTimeline;(i||"").split(",").forEach(function(o){return o&&!Ze[o]&&!rn[o]&&Wi(n+" effect requires "+o+" plugin.")}),qs[n]=function(o,l,u){return r(hn(o),an(l||{},a),u)},s&&(Oe.prototype[n]=function(o,l,u){return this.add(qs[n](o,An(l)?l:(u=l)&&{},this),u)})},registerEase:function(t,n){Tt[t]=wr(n)},parseEase:function(t,n){return arguments.length?wr(t,n):Tt},getById:function(t){return jt.getById(t)},exportRoot:function(t,n){t===void 0&&(t={});var r=new Oe(t),i,a;for(r.smoothChildTiming=Ie(t.smoothChildTiming),jt.remove(r),r._dp=0,r._time=r._tTime=jt._time,i=jt._first;i;)a=i._next,(n||!(!i._dur&&i instanceof se&&i.vars.onComplete===i._targets[0]))&&Sn(r,i,i._start-i._delay),i=a;return Sn(jt,r,0),r},context:function(t,n){return t?new E0(t,n):Ut},matchMedia:function(t){return new _S(t)},matchMediaRefresh:function(){return Sr.forEach(function(t){var n=t.conditions,r,i;for(i in n)n[i]&&(n[i]=!1,r=1);r&&t.revert()})||_c()},addEventListener:function(t,n){var r=Da[t]||(Da[t]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(t,n){var r=Da[t],i=r&&r.indexOf(n);i>=0&&r.splice(i,1)},utils:{wrap:Vw,wrapYoyo:Zw,distribute:u0,random:f0,snap:c0,normalize:Kw,getUnit:ke,clamp:Gw,splitColor:m0,toArray:hn,selector:gc,mapRange:p0,pipe:Ww,unitize:Xw,interpolate:Qw,shuffle:l0},install:Vm,effects:qs,ticker:Qe,updateRoot:Oe.updateRoot,plugins:Ze,globalTimeline:jt,core:{PropTween:Be,globals:Zm,Tween:se,Timeline:Oe,Animation:Zi,getCache:vr,_removeLinkedListItem:ss,reverting:function(){return be},context:function(t){return t&&Ut&&(Ut.data.push(t),t._ctx=Ut),Ut},suppressOverwrites:function(t){return Xc=t}}};ze("to,from,fromTo,delayedCall,set,killTweensOf",function(e){return Ka[e]=se[e]});Qe.add(Oe.updateRoot);Gr=Ka.to({},{duration:0});var xS=function(t,n){for(var r=t._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},vS=function(t,n){var r=t._targets,i,a,s;for(i in n)for(a=r.length;a--;)s=t._ptLookup[a][i],s&&(s=s.d)&&(s._pt&&(s=xS(s,i)),s&&s.modifier&&s.modifier(n[i],t,r[a],i))},Hs=function(t,n){return{name:t,headless:1,rawVars:1,init:function(i,a,s){s._onInit=function(o){var l,u;if(pe(a)&&(l={},ze(a,function(c){return l[c]=1}),a=l),n){l={};for(u in a)l[u]=n(a[u]);a=l}vS(o,a)}}}},He=Ka.registerPlugin({name:"attr",init:function(t,n,r,i,a){var s,o,l;this.tween=r;for(s in n)l=t.getAttribute(s)||"",o=this.add(t,"setAttribute",(l||0)+"",n[s],i,a,0,0,s),o.op=s,o.b=l,this._props.push(s)},render:function(t,n){for(var r=n._pt;r;)be?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function(t,n){for(var r=n.length;r--;)this.add(t,r,t[r]||0,n[r],0,0,0,0,0,1)}},Hs("roundProps",mc),Hs("modifiers"),Hs("snap",c0))||Ka;se.version=Oe.version=He.version="3.14.2";Km=1;Vc()&&ci();Tt.Power0;Tt.Power1;Tt.Power2;Tt.Power3;Tt.Power4;Tt.Linear;Tt.Quad;Tt.Cubic;Tt.Quart;Tt.Quint;Tt.Strong;Tt.Elastic;Tt.Back;Tt.SteppedEase;Tt.Bounce;Tt.Sine;Tt.Expo;Tt.Circ;/*!
|
|
9
|
-
* CSSPlugin 3.14.2
|
|
10
|
-
* https://gsap.com
|
|
11
|
-
*
|
|
12
|
-
* Copyright 2008-2025, GreenSock. All rights reserved.
|
|
13
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
14
|
-
* @author: Jack Doyle, jack@greensock.com
|
|
15
|
-
*/var kh,Zn,Kr,uf,yr,Ch,cf,bS=function(){return typeof window<"u"},jn={},gr=180/Math.PI,Vr=Math.PI/180,Ir=Math.atan2,Rh=1e8,ff=/([A-Z])/g,wS=/(left|right|width|margin|padding|x)/i,SS=/[\s,\(]\S/,Tn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},xc=function(t,n){return n.set(n.t,n.p,Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},TS=function(t,n){return n.set(n.t,n.p,t===1?n.e:Math.round((n.s+n.c*t)*1e4)/1e4+n.u,n)},MS=function(t,n){return n.set(n.t,n.p,t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},AS=function(t,n){return n.set(n.t,n.p,t===1?n.e:t?Math.round((n.s+n.c*t)*1e4)/1e4+n.u:n.b,n)},kS=function(t,n){var r=n.s+n.c*t;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},D0=function(t,n){return n.set(n.t,n.p,t?n.e:n.b,n)},O0=function(t,n){return n.set(n.t,n.p,t!==1?n.b:n.e,n)},CS=function(t,n,r){return t.style[n]=r},RS=function(t,n,r){return t.style.setProperty(n,r)},ES=function(t,n,r){return t._gsap[n]=r},DS=function(t,n,r){return t._gsap.scaleX=t._gsap.scaleY=r},OS=function(t,n,r,i,a){var s=t._gsap;s.scaleX=s.scaleY=r,s.renderTransform(a,s)},PS=function(t,n,r,i,a){var s=t._gsap;s[n]=r,s.renderTransform(a,s)},Gt="transform",Ue=Gt+"Origin",FS=function e(t,n){var r=this,i=this.target,a=i.style,s=i._gsap;if(t in jn&&a){if(this.tfm=this.tfm||{},t!=="transform")t=Tn[t]||t,~t.indexOf(",")?t.split(",").forEach(function(o){return r.tfm[o]=$n(i,o)}):this.tfm[t]=s.x?s[t]:$n(i,t),t===Ue&&(this.tfm.zOrigin=s.zOrigin);else return Tn.transform.split(",").forEach(function(o){return e.call(r,o,n)});if(this.props.indexOf(Gt)>=0)return;s.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Ue,n,"")),t=Gt}(a||n)&&this.props.push(t,n,a[t])},P0=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},$S=function(){var t=this.props,n=this.target,r=n.style,i=n._gsap,a,s;for(a=0;a<t.length;a+=3)t[a+1]?t[a+1]===2?n[t[a]](t[a+2]):n[t[a]]=t[a+2]:t[a+2]?r[t[a]]=t[a+2]:r.removeProperty(t[a].substr(0,2)==="--"?t[a]:t[a].replace(ff,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)i[s]=this.tfm[s];i.svg&&(i.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),a=cf(),(!a||!a.isStart)&&!r[Gt]&&(P0(r),i.zOrigin&&r[Ue]&&(r[Ue]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},F0=function(t,n){var r={target:t,props:[],revert:$S,save:FS};return t._gsap||He.core.getCache(t),n&&t.style&&t.nodeType&&n.split(",").forEach(function(i){return r.save(i)}),r},$0,vc=function(t,n){var r=Zn.createElementNS?Zn.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Zn.createElement(t);return r&&r.style?r:Zn.createElement(t)},tn=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(ff,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&e(t,fi(n)||n,1)||""},Eh="O,Moz,ms,Ms,Webkit".split(","),fi=function(t,n,r){var i=n||yr,a=i.style,s=5;if(t in a&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);s--&&!(Eh[s]+t in a););return s<0?null:(s===3?"ms":s>=0?Eh[s]:"")+t},bc=function(){bS()&&window.document&&(kh=window,Zn=kh.document,Kr=Zn.documentElement,yr=vc("div")||{style:{}},vc("div"),Gt=fi(Gt),Ue=Gt+"Origin",yr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",$0=!!fi("perspective"),cf=He.core.reverting,uf=1)},Dh=function(t){var n=t.ownerSVGElement,r=vc("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=t.cloneNode(!0),a;i.style.display="block",r.appendChild(i),Kr.appendChild(r);try{a=i.getBBox()}catch{}return r.removeChild(i),Kr.removeChild(r),a},Oh=function(t,n){for(var r=n.length;r--;)if(t.hasAttribute(n[r]))return t.getAttribute(n[r])},L0=function(t){var n,r;try{n=t.getBBox()}catch{n=Dh(t),r=1}return n&&(n.width||n.height)||r||(n=Dh(t)),n&&!n.width&&!n.x&&!n.y?{x:+Oh(t,["x","cx","x1"])||0,y:+Oh(t,["y","cy","y1"])||0,width:0,height:0}:n},N0=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&L0(t))},rr=function(t,n){if(n){var r=t.style,i;n in jn&&n!==Ue&&(n=Gt),r.removeProperty?(i=n.substr(0,2),(i==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(i==="--"?n:n.replace(ff,"-$1").toLowerCase())):r.removeAttribute(n)}},Qn=function(t,n,r,i,a,s){var o=new Be(t._pt,n,r,0,1,s?O0:D0);return t._pt=o,o.b=i,o.e=a,t._props.push(r),o},Ph={deg:1,rad:1,turn:1},LS={grid:1,flex:1},ir=function e(t,n,r,i){var a=parseFloat(r)||0,s=(r+"").trim().substr((a+"").length)||"px",o=yr.style,l=wS.test(n),u=t.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),f=100,h=i==="px",p=i==="%",g,d,m,x;if(i===s||!a||Ph[i]||Ph[s])return a;if(s!=="px"&&!h&&(a=e(t,n,r,"px")),x=t.getCTM&&N0(t),(p||s==="%")&&(jn[n]||~n.indexOf("adius")))return g=x?t.getBBox()[l?"width":"height"]:t[c],te(p?a/g*f:a/100*g);if(o[l?"width":"height"]=f+(h?s:i),d=i!=="rem"&&~n.indexOf("adius")||i==="em"&&t.appendChild&&!u?t:t.parentNode,x&&(d=(t.ownerSVGElement||{}).parentNode),(!d||d===Zn||!d.appendChild)&&(d=Zn.body),m=d._gsap,m&&p&&m.width&&l&&m.time===Qe.time&&!m.uncache)return te(a/m.width*f);if(p&&(n==="height"||n==="width")){var y=t.style[n];t.style[n]=f+i,g=t[c],y?t.style[n]=y:rr(t,n)}else(p||s==="%")&&!LS[tn(d,"display")]&&(o.position=tn(t,"position")),d===t&&(o.position="static"),d.appendChild(yr),g=yr[c],d.removeChild(yr),o.position="absolute";return l&&p&&(m=vr(d),m.time=Qe.time,m.width=d[c]),te(h?g*a/f:g&&a?f/g*a:0)},$n=function(t,n,r,i){var a;return uf||bc(),n in Tn&&n!=="transform"&&(n=Tn[n],~n.indexOf(",")&&(n=n.split(",")[0])),jn[n]&&n!=="transform"?(a=Ji(t,i),a=n!=="transformOrigin"?a[n]:a.svg?a.origin:Za(tn(t,Ue))+" "+a.zOrigin+"px"):(a=t.style[n],(!a||a==="auto"||i||~(a+"").indexOf("calc("))&&(a=Va[n]&&Va[n](t,n,r)||tn(t,n)||Jm(t,n)||(n==="opacity"?1:0))),r&&!~(a+"").trim().indexOf(" ")?ir(t,n,a,r)+r:a},NS=function(t,n,r,i){if(!r||r==="none"){var a=fi(n,t,1),s=a&&tn(t,a,1);s&&s!==r?(n=a,r=s):n==="borderColor"&&(r=tn(t,"borderTopColor"))}var o=new Be(this._pt,t.style,n,0,1,C0),l=0,u=0,c,f,h,p,g,d,m,x,y,v,_,S;if(o.b=r,o.e=i,r+="",i+="",i.substring(0,6)==="var(--"&&(i=tn(t,i.substring(4,i.indexOf(")")))),i==="auto"&&(d=t.style[n],t.style[n]=i,i=tn(t,n)||i,d?t.style[n]=d:rr(t,n)),c=[r,i],_0(c),r=c[0],i=c[1],h=r.match(jr)||[],S=i.match(jr)||[],S.length){for(;f=jr.exec(i);)m=f[0],y=i.substring(l,f.index),g?g=(g+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(g=1),m!==(d=h[u++]||"")&&(p=parseFloat(d)||0,_=d.substr((p+"").length),m.charAt(1)==="="&&(m=Xr(p,m)+_),x=parseFloat(m),v=m.substr((x+"").length),l=jr.lastIndex-v.length,v||(v=v||en.units[n]||_,l===i.length&&(i+=v,o.e+=v)),_!==v&&(p=ir(t,n,d,v)||0),o._pt={_next:o._pt,p:y||u===1?y:",",s:p,c:x-p,m:g&&g<4||n==="zIndex"?Math.round:0});o.c=l<i.length?i.substring(l,i.length):""}else o.r=n==="display"&&i==="none"?O0:D0;return Xm.test(i)&&(o.e=0),this._pt=o,o},Fh={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},qS=function(t){var n=t.split(" "),r=n[0],i=n[1]||"50%";return(r==="top"||r==="bottom"||i==="left"||i==="right")&&(t=r,r=i,i=t),n[0]=Fh[r]||r,n[1]=Fh[i]||i,n.join(" ")},IS=function(t,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,i=r.style,a=n.u,s=r._gsap,o,l,u;if(a==="all"||a===!0)i.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)o=a[u],jn[o]&&(l=1,o=o==="transformOrigin"?Ue:Gt),rr(r,o);l&&(rr(r,Gt),s&&(s.svg&&r.removeAttribute("transform"),i.scale=i.rotate=i.translate="none",Ji(r,1),s.uncache=1,P0(i)))}},Va={clearProps:function(t,n,r,i,a){if(a.data!=="isFromStart"){var s=t._pt=new Be(t._pt,n,r,0,0,IS);return s.u=i,s.pr=-10,s.tween=a,t._props.push(r),1}}},Qi=[1,0,0,1,0,0],q0={},I0=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},$h=function(t){var n=tn(t,Gt);return I0(n)?Qi:n.substr(7).match(Wm).map(te)},hf=function(t,n){var r=t._gsap||vr(t),i=t.style,a=$h(t),s,o,l,u;return r.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?Qi:a):(a===Qi&&!t.offsetParent&&t!==Kr&&!r.svg&&(l=i.display,i.display="block",s=t.parentNode,(!s||!t.offsetParent&&!t.getBoundingClientRect().width)&&(u=1,o=t.nextElementSibling,Kr.appendChild(t)),a=$h(t),l?i.display=l:rr(t,"display"),u&&(o?s.insertBefore(t,o):s?s.appendChild(t):Kr.removeChild(t))),n&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},wc=function(t,n,r,i,a,s){var o=t._gsap,l=a||hf(t,!0),u=o.xOrigin||0,c=o.yOrigin||0,f=o.xOffset||0,h=o.yOffset||0,p=l[0],g=l[1],d=l[2],m=l[3],x=l[4],y=l[5],v=n.split(" "),_=parseFloat(v[0])||0,S=parseFloat(v[1])||0,w,b,M,A;r?l!==Qi&&(b=p*m-g*d)&&(M=_*(m/b)+S*(-d/b)+(d*y-m*x)/b,A=_*(-g/b)+S*(p/b)-(p*y-g*x)/b,_=M,S=A):(w=L0(t),_=w.x+(~v[0].indexOf("%")?_/100*w.width:_),S=w.y+(~(v[1]||v[0]).indexOf("%")?S/100*w.height:S)),i||i!==!1&&o.smooth?(x=_-u,y=S-c,o.xOffset=f+(x*p+y*d)-x,o.yOffset=h+(x*g+y*m)-y):o.xOffset=o.yOffset=0,o.xOrigin=_,o.yOrigin=S,o.smooth=!!i,o.origin=n,o.originIsAbsolute=!!r,t.style[Ue]="0px 0px",s&&(Qn(s,o,"xOrigin",u,_),Qn(s,o,"yOrigin",c,S),Qn(s,o,"xOffset",f,o.xOffset),Qn(s,o,"yOffset",h,o.yOffset)),t.setAttribute("data-svg-origin",_+" "+S)},Ji=function(t,n){var r=t._gsap||new w0(t);if("x"in r&&!n&&!r.uncache)return r;var i=t.style,a=r.scaleX<0,s="px",o="deg",l=getComputedStyle(t),u=tn(t,Ue)||"0",c,f,h,p,g,d,m,x,y,v,_,S,w,b,M,A,k,C,O,P,F,B,L,$,Y,I,et,K,J,st,lt,N;return c=f=h=d=m=x=y=v=_=0,p=g=1,r.svg=!!(t.getCTM&&N0(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Gt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Gt]!=="none"?l[Gt]:"")),i.scale=i.rotate=i.translate="none"),b=hf(t,r.svg),r.svg&&(r.uncache?(Y=t.getBBox(),u=r.xOrigin-Y.x+"px "+(r.yOrigin-Y.y)+"px",$=""):$=!n&&t.getAttribute("data-svg-origin"),wc(t,$||u,!!$||r.originIsAbsolute,r.smooth!==!1,b)),S=r.xOrigin||0,w=r.yOrigin||0,b!==Qi&&(C=b[0],O=b[1],P=b[2],F=b[3],c=B=b[4],f=L=b[5],b.length===6?(p=Math.sqrt(C*C+O*O),g=Math.sqrt(F*F+P*P),d=C||O?Ir(O,C)*gr:0,y=P||F?Ir(P,F)*gr+d:0,y&&(g*=Math.abs(Math.cos(y*Vr))),r.svg&&(c-=S-(S*C+w*P),f-=w-(S*O+w*F))):(N=b[6],st=b[7],et=b[8],K=b[9],J=b[10],lt=b[11],c=b[12],f=b[13],h=b[14],M=Ir(N,J),m=M*gr,M&&(A=Math.cos(-M),k=Math.sin(-M),$=B*A+et*k,Y=L*A+K*k,I=N*A+J*k,et=B*-k+et*A,K=L*-k+K*A,J=N*-k+J*A,lt=st*-k+lt*A,B=$,L=Y,N=I),M=Ir(-P,J),x=M*gr,M&&(A=Math.cos(-M),k=Math.sin(-M),$=C*A-et*k,Y=O*A-K*k,I=P*A-J*k,lt=F*k+lt*A,C=$,O=Y,P=I),M=Ir(O,C),d=M*gr,M&&(A=Math.cos(M),k=Math.sin(M),$=C*A+O*k,Y=B*A+L*k,O=O*A-C*k,L=L*A-B*k,C=$,B=Y),m&&Math.abs(m)+Math.abs(d)>359.9&&(m=d=0,x=180-x),p=te(Math.sqrt(C*C+O*O+P*P)),g=te(Math.sqrt(L*L+N*N)),M=Ir(B,L),y=Math.abs(M)>2e-4?M*gr:0,_=lt?1/(lt<0?-lt:lt):0),r.svg&&($=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!I0(tn(t,Gt)),$&&t.setAttribute("transform",$))),Math.abs(y)>90&&Math.abs(y)<270&&(a?(p*=-1,y+=d<=0?180:-180,d+=d<=0?180:-180):(g*=-1,y+=y<=0?180:-180)),n=n||r.uncache,r.x=c-((r.xPercent=c&&(!n&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+s,r.y=f-((r.yPercent=f&&(!n&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-f)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+s,r.z=h+s,r.scaleX=te(p),r.scaleY=te(g),r.rotation=te(d)+o,r.rotationX=te(m)+o,r.rotationY=te(x)+o,r.skewX=y+o,r.skewY=v+o,r.transformPerspective=_+s,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(i[Ue]=Za(u)),r.xOffset=r.yOffset=0,r.force3D=en.force3D,r.renderTransform=r.svg?BS:$0?z0:zS,r.uncache=0,r},Za=function(t){return(t=t.split(" "))[0]+" "+t[1]},js=function(t,n,r){var i=ke(n);return te(parseFloat(n)+parseFloat(ir(t,"x",r+"px",i)))+i},zS=function(t,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,z0(t,n)},hr="0deg",wi="0px",pr=") ",z0=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.z,u=r.rotation,c=r.rotationY,f=r.rotationX,h=r.skewX,p=r.skewY,g=r.scaleX,d=r.scaleY,m=r.transformPerspective,x=r.force3D,y=r.target,v=r.zOrigin,_="",S=x==="auto"&&t&&t!==1||x===!0;if(v&&(f!==hr||c!==hr)){var w=parseFloat(c)*Vr,b=Math.sin(w),M=Math.cos(w),A;w=parseFloat(f)*Vr,A=Math.cos(w),s=js(y,s,b*A*-v),o=js(y,o,-Math.sin(w)*-v),l=js(y,l,M*A*-v+v)}m!==wi&&(_+="perspective("+m+pr),(i||a)&&(_+="translate("+i+"%, "+a+"%) "),(S||s!==wi||o!==wi||l!==wi)&&(_+=l!==wi||S?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+pr),u!==hr&&(_+="rotate("+u+pr),c!==hr&&(_+="rotateY("+c+pr),f!==hr&&(_+="rotateX("+f+pr),(h!==hr||p!==hr)&&(_+="skew("+h+", "+p+pr),(g!==1||d!==1)&&(_+="scale("+g+", "+d+pr),y.style[Gt]=_||"translate(0, 0)"},BS=function(t,n){var r=n||this,i=r.xPercent,a=r.yPercent,s=r.x,o=r.y,l=r.rotation,u=r.skewX,c=r.skewY,f=r.scaleX,h=r.scaleY,p=r.target,g=r.xOrigin,d=r.yOrigin,m=r.xOffset,x=r.yOffset,y=r.forceCSS,v=parseFloat(s),_=parseFloat(o),S,w,b,M,A;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Vr,u*=Vr,S=Math.cos(l)*f,w=Math.sin(l)*f,b=Math.sin(l-u)*-h,M=Math.cos(l-u)*h,u&&(c*=Vr,A=Math.tan(u-c),A=Math.sqrt(1+A*A),b*=A,M*=A,c&&(A=Math.tan(c),A=Math.sqrt(1+A*A),S*=A,w*=A)),S=te(S),w=te(w),b=te(b),M=te(M)):(S=f,M=h,w=b=0),(v&&!~(s+"").indexOf("px")||_&&!~(o+"").indexOf("px"))&&(v=ir(p,"x",s,"px"),_=ir(p,"y",o,"px")),(g||d||m||x)&&(v=te(v+g-(g*S+d*b)+m),_=te(_+d-(g*w+d*M)+x)),(i||a)&&(A=p.getBBox(),v=te(v+i/100*A.width),_=te(_+a/100*A.height)),A="matrix("+S+","+w+","+b+","+M+","+v+","+_+")",p.setAttribute("transform",A),y&&(p.style[Gt]=A)},US=function(t,n,r,i,a){var s=360,o=pe(a),l=parseFloat(a)*(o&&~a.indexOf("rad")?gr:1),u=l-i,c=i+u+"deg",f,h;return o&&(f=a.split("_")[1],f==="short"&&(u%=s,u!==u%(s/2)&&(u+=u<0?s:-s)),f==="cw"&&u<0?u=(u+s*Rh)%s-~~(u/s)*s:f==="ccw"&&u>0&&(u=(u-s*Rh)%s-~~(u/s)*s)),t._pt=h=new Be(t._pt,n,r,i,u,TS),h.e=c,h.u="deg",t._props.push(r),h},Lh=function(t,n){for(var r in n)t[r]=n[r];return t},HS=function(t,n,r){var i=Lh({},r._gsap),a="perspective,force3D,transformOrigin,svgOrigin",s=r.style,o,l,u,c,f,h,p,g;i.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),s[Gt]=n,o=Ji(r,1),rr(r,Gt),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Gt],s[Gt]=n,o=Ji(r,1),s[Gt]=u);for(l in jn)u=i[l],c=o[l],u!==c&&a.indexOf(l)<0&&(p=ke(u),g=ke(c),f=p!==g?ir(r,l,u,g):parseFloat(u),h=parseFloat(c),t._pt=new Be(t._pt,o,l,f,h-f,xc),t._pt.u=g||0,t._props.push(l));Lh(o,i)};ze("padding,margin,Width,Radius",function(e,t){var n="Top",r="Right",i="Bottom",a="Left",s=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(o){return t<2?e+o:"border"+o+e});Va[t>1?"border"+e:e]=function(o,l,u,c,f){var h,p;if(arguments.length<4)return h=s.map(function(g){return $n(o,g,u)}),p=h.join(" "),p.split(h[0]).length===5?h[0]:p;h=(c+"").split(" "),p={},s.forEach(function(g,d){return p[g]=h[d]=h[d]||h[(d-1)/2|0]}),o.init(l,p,f)}});var B0={name:"css",register:bc,targetTest:function(t){return t.style&&t.nodeType},init:function(t,n,r,i,a){var s=this._props,o=t.style,l=r.vars.startAt,u,c,f,h,p,g,d,m,x,y,v,_,S,w,b,M,A;uf||bc(),this.styles=this.styles||F0(t),M=this.styles.props,this.tween=r;for(d in n)if(d!=="autoRound"&&(c=n[d],!(Ze[d]&&S0(d,n,r,i,t,a)))){if(p=typeof c,g=Va[d],p==="function"&&(c=c.call(r,i,t,a),p=typeof c),p==="string"&&~c.indexOf("random(")&&(c=Ki(c)),g)g(this,t,d,c,r)&&(b=1);else if(d.substr(0,2)==="--")u=(getComputedStyle(t).getPropertyValue(d)+"").trim(),c+="",tr.lastIndex=0,tr.test(u)||(m=ke(u),x=ke(c),x?m!==x&&(u=ir(t,d,u,x)+x):m&&(c+=m)),this.add(o,"setProperty",u,c,i,a,0,0,d),s.push(d),M.push(d,0,o[d]);else if(p!=="undefined"){if(l&&d in l?(u=typeof l[d]=="function"?l[d].call(r,i,t,a):l[d],pe(u)&&~u.indexOf("random(")&&(u=Ki(u)),ke(u+"")||u==="auto"||(u+=en.units[d]||ke($n(t,d))||""),(u+"").charAt(1)==="="&&(u=$n(t,d))):u=$n(t,d),h=parseFloat(u),y=p==="string"&&c.charAt(1)==="="&&c.substr(0,2),y&&(c=c.substr(2)),f=parseFloat(c),d in Tn&&(d==="autoAlpha"&&(h===1&&$n(t,"visibility")==="hidden"&&f&&(h=0),M.push("visibility",0,o.visibility),Qn(this,o,"visibility",h?"inherit":"hidden",f?"inherit":"hidden",!f)),d!=="scale"&&d!=="transform"&&(d=Tn[d],~d.indexOf(",")&&(d=d.split(",")[0]))),v=d in jn,v){if(this.styles.save(d),A=c,p==="string"&&c.substring(0,6)==="var(--"){if(c=tn(t,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var k=t.style.perspective;t.style.perspective=c,c=tn(t,"perspective"),k?t.style.perspective=k:rr(t,"perspective")}f=parseFloat(c)}if(_||(S=t._gsap,S.renderTransform&&!n.parseTransform||Ji(t,n.parseTransform),w=n.smoothOrigin!==!1&&S.smooth,_=this._pt=new Be(this._pt,o,Gt,0,1,S.renderTransform,S,0,-1),_.dep=1),d==="scale")this._pt=new Be(this._pt,S,"scaleY",S.scaleY,(y?Xr(S.scaleY,y+f):f)-S.scaleY||0,xc),this._pt.u=0,s.push("scaleY",d),d+="X";else if(d==="transformOrigin"){M.push(Ue,0,o[Ue]),c=qS(c),S.svg?wc(t,c,0,w,0,this):(x=parseFloat(c.split(" ")[2])||0,x!==S.zOrigin&&Qn(this,S,"zOrigin",S.zOrigin,x),Qn(this,o,d,Za(u),Za(c)));continue}else if(d==="svgOrigin"){wc(t,c,1,w,0,this);continue}else if(d in q0){US(this,S,d,h,y?Xr(h,y+c):c);continue}else if(d==="smoothOrigin"){Qn(this,S,"smooth",S.smooth,c);continue}else if(d==="force3D"){S[d]=c;continue}else if(d==="transform"){HS(this,c,t);continue}}else d in o||(d=fi(d)||d);if(v||(f||f===0)&&(h||h===0)&&!SS.test(c)&&d in o)m=(u+"").substr((h+"").length),f||(f=0),x=ke(c)||(d in en.units?en.units[d]:m),m!==x&&(h=ir(t,d,u,x)),this._pt=new Be(this._pt,v?S:o,d,h,(y?Xr(h,y+f):f)-h,!v&&(x==="px"||d==="zIndex")&&n.autoRound!==!1?kS:xc),this._pt.u=x||0,v&&A!==c?(this._pt.b=u,this._pt.e=A,this._pt.r=AS):m!==x&&x!=="%"&&(this._pt.b=u,this._pt.r=MS);else if(d in o)NS.call(this,t,d,u,y?y+c:c);else if(d in t)this.add(t,d,u||t[d],y?y+c:c,i,a);else if(d!=="parseTransform"){Qc(d,c);continue}v||(d in o?M.push(d,0,o[d]):typeof t[d]=="function"?M.push(d,2,t[d]()):M.push(d,1,u||t[d])),s.push(d)}}b&&R0(this)},render:function(t,n){if(n.tween._time||!cf())for(var r=n._pt;r;)r.r(t,r.d),r=r._next;else n.styles.revert()},get:$n,aliases:Tn,getSetter:function(t,n,r){var i=Tn[n];return i&&i.indexOf(",")<0&&(n=i),n in jn&&n!==Ue&&(t._gsap.x||$n(t,"x"))?r&&Ch===r?n==="scale"?DS:ES:(Ch=r||{})&&(n==="scale"?OS:PS):t.style&&!Kc(t.style[n])?CS:~n.indexOf("-")?RS:of(t,n)},core:{_removeProperty:rr,_getMatrix:hf}};He.utils.checkPrefix=fi;He.core.getStyleSaver=F0;(function(e,t,n,r){var i=ze(e+","+t+","+n,function(a){jn[a]=1});ze(t,function(a){en.units[a]="deg",q0[a]=1}),Tn[i[13]]=e+","+t,ze(r,function(a){var s=a.split(":");Tn[s[1]]=i[s[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ze("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){en.units[e]="px"});He.registerPlugin(B0);var Sc=He.registerPlugin(B0)||He;Sc.core.Tween;const zr={IN_OUT:"power2.inOut",OUT:"power2.out"},Si={NO_STAGGER:0,RIPPLE_STAGGER_DELAY:.05};class U0{constructor(t,n={}){yi(this,"timeline");yi(this,"currentStage","");yi(this,"callbacks");yi(this,"durations");this.durations=t,this.callbacks=n,this.timeline=Sc.timeline({paused:!0,onUpdate:()=>this.handleProgress(),onComplete:()=>{var i,a,s,o;(a=(i=this.callbacks).onComplete)==null||a.call(i),(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"complete")}});let r=0;this.timeline.addLabel("seatsToRings",r),r+=t.seatsToRings/1e3,this.timeline.addLabel("ringsToBar",r),r+=t.ringsToBar/1e3,this.timeline.addLabel("axesReveal",r),r+=t.axesReveal/1e3,this.timeline.addLabel("barSlide",r),r+=t.barSlide/1e3,this.timeline.addLabel("barsGrow",r),r+=t.barsGrow/1e3,this.timeline.addLabel("barsToArea",r)}animateSeatsToRings(t,n){const r=this.durations.seatsToRings/1e3;return t.each(function(){const i=this;if(!i.getAttribute("data-orig-x")){const a=i.getAttribute("x"),s=i.getAttribute("y"),o=i.getAttribute("width"),l=i.getAttribute("height");i.setAttribute("data-orig-x",a||"0"),i.setAttribute("data-orig-y",s||"0"),i.setAttribute("data-orig-width",o||"0"),i.setAttribute("data-orig-height",l||"0")}}),this.timeline.to(t.nodes(),{width:2,y:(i,a)=>parseFloat(a.getAttribute("y")||"0"),height:(i,a)=>{const s=parseFloat(a.getAttribute("y")||"0");return n-s},duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="seatsToRings",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"seatsToRings")}},"seatsToRings"),this}animateRingsToBar(t,n){const r=this.durations.ringsToBar/1e3;return t.each(function(i,a){const s=this;if(!n[a])return;const l=s.getAttribute("x"),u=s.getAttribute("y"),c=s.getAttribute("width"),f=s.getAttribute("height");s.setAttribute("data-orig-x",l||"0"),s.setAttribute("data-orig-y",u||"0"),s.setAttribute("data-orig-width",c||"0"),s.setAttribute("data-orig-height",f||"0")}),this.timeline.to(t.nodes(),{x:i=>{var a;return((a=n[i])==null?void 0:a.x)??0},y:i=>{var a;return((a=n[i])==null?void 0:a.y)??0},width:i=>{var a;return((a=n[i])==null?void 0:a.width)??0},height:i=>{var a;return((a=n[i])==null?void 0:a.height)??0},duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="ringsToBar",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"ringsToBar")}},"ringsToBar"),this}animateAxesReveal(t,n){const r=this.durations.axesReveal/1e3;return this.timeline.to([t.node(),n.node()],{opacity:1,duration:r,ease:zr.IN_OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="axesReveal",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"axesReveal")}},"axesReveal"),this}animateBarSlide(t,n){const r=this.durations.barSlide/1e3;return this.timeline.to(t.nodes(),{x:n,duration:r,ease:zr.OUT,stagger:Si.NO_STAGGER,onStart:()=>{var i,a;this.currentStage="barSlide",(a=(i=this.callbacks).onStageComplete)==null||a.call(i,"barSlide")}},"barSlide"),this}animateBarsGrow(t,n,r=Si.RIPPLE_STAGGER_DELAY){const i=this.durations.barsGrow/1e3;return t.nodes().forEach((s,o)=>{const l=s,u=l.getAttribute("data-final-y")||"0",c=l.getAttribute("data-final-height")||"0",f=parseInt(l.getAttribute("data-timestamp-index")||"0"),p=Math.abs(f-n)*r;this.timeline.fromTo(l,{height:0,y:parseFloat(l.getAttribute("data-chart-baseline")||"400")},{y:parseFloat(u),height:parseFloat(c),duration:i,delay:p,ease:zr.OUT},"barsGrow")}),this.timeline.call(()=>{var s,o;this.currentStage="barsGrow",(o=(s=this.callbacks).onStageComplete)==null||o.call(s,"barsGrow")},[],"barsGrow"),this}animateBarsToArea(t,n,r,i){const a=this.durations.barsToArea/1e3,s=new Map;return t.each(function(){var c;const o=this,l=o.getAttribute("class");if(!l)return;const u=l.match(/category-([\w-]+)/);if(u&&u[1]){const f=u[1];s.has(f)||s.set(f,[]),(c=s.get(f))==null||c.push(o)}}),this.timeline.set(t.nodes(),{opacity:0},"barsToArea"),this.timeline.set(n.nodes(),{opacity:1},"barsToArea"),n.each(function(){const o=this,l=o.getAttribute("data-category");if(!l)return;const u=r.get(l);u&&Sc.to(o,{attr:{d:u},duration:a,ease:zr.IN_OUT})}),this.timeline.call(()=>{var o,l;this.currentStage="barsToArea",(l=(o=this.callbacks).onStageComplete)==null||l.call(o,"barsToArea")},[],"barsToArea"),this}handleProgress(){var n,r;const t=this.timeline.progress();(r=(n=this.callbacks).onProgress)==null||r.call(n,t)}getControls(){return{play:()=>this.timeline.play(),pause:()=>this.timeline.pause(),reverse:()=>this.timeline.reverse(),restart:()=>this.timeline.restart(),seek:t=>this.timeline.progress(t),seekToStage:t=>{const n=this.timeline.labels[t];n!==void 0&&this.timeline.seek(n)},kill:()=>this.timeline.kill(),getProgress:()=>this.timeline.progress(),getCurrentStage:()=>this.currentStage,getTimeline:()=>this.timeline}}play(){this.timeline.play()}destroy(){this.timeline.kill()}}function jS(e,t){const{arcAngle:n,arcAngleFlexibility:r=5,radius:i,seatSize:a,minSeatSize:s,maxSeatSize:o,spacing:l,innerRadiusRatio:u}=t,c=i*u,f=e.reduce((O,P)=>O+P.seats,0);let h={seatSize:a,arcAngle:n,score:-1};const p=n-r,g=n+r;for(let O=p;O<=g;O+=2.5){const P=O*Math.PI/180;for(let F=o;F>=s;F-=.1){const B=F*2,L=B*l,$=Math.floor((i-c)/L);for(let Y=1;Y<=Math.min($,10);Y++){let I=0;for(let et=0;et<Y;et++){const K=c+(et+.5)*L,J=B*l/K,st=Math.floor(P/J);I+=st}if(I>=f){const et=f/I,K=(F-s)/(o-s),J=(I-f)/f,st=J<.15?1:J<.3?.7:J<.5?.4:.1,lt=1-Math.abs(O-n)/r,N=st*.5+K*.3+et*.15+lt*.05;N>h.score&&(h={seatSize:F,arcAngle:O,rings:Y,score:N})}}}}const d=h.seatSize,m=h.arcAngle,x=m*Math.PI/180,y=d*2,v=y*l,_=Math.floor((i-c)/v),S=[],w=-x/2-Math.PI/2,b=[];let M=0,A=[];for(let O=1;O<=_;O++){let P=0;const F=[];for(let B=0;B<O;B++){const L=c+(B+.5)*v,$=y*l/L,Y=Math.floor(x/$);F.push(Y),P+=Y}if(P>=f){M=O,A=F;break}}if(M>0)b.push(...A);else for(let O=0;O<_;O++){const P=c+(O+.5)*v,F=y*l/P,B=Math.floor(x/F);b.push(B)}for(let O=0;O<b.length;O++){const P=c+(O+.5)*v,F=b[O]??0;if(F>0){const B=x/F;for(let L=0;L<F;L++){const $=w+(L+.5)*B,Y=Math.cos($)*P,I=Math.sin($)*P;S.push({ring:O,index:L,angle:$,x:Y,y:I})}}}S.sort((O,P)=>{const F=O.angle-P.angle;return Math.abs(F)>.001?F:O.ring-P.ring});const k=[];let C=0;return e.forEach((O,P)=>{const F=Math.min(O.seats,S.length-C);for(let B=0;B<F&&C<S.length;B++){const L=S[C++];L&&k.push({x:L.x,y:L.y,category:O.name,categoryIndex:P,seatIndex:B,ring:L.ring,angle:L.angle,radius:d})}}),{arcAngle:m,radius:i,innerRadius:c,centerX:i,centerY:i,seatSize:d,seats:k,totalSeats:f}}function GS(e,t,n){const r=t<=n?1:n/t;return e.filter(i=>i.value>0).map(i=>{const a=t<=n?i.value:Math.max(1,Math.floor(i.value*r));return{id:i.dataKey,name:i.label,seats:a,colour:i.color}})}function Qa({svg:e,events:t,xScale:n,chartHeight:r,chartWidth:i,timelineHeight:a,timelineOffset:s,instanceId:o,setHoveredTimelineEvent:l,enableBrush:u=!1,onTimeRangeChange:c,minAllowedTime:f,maxAllowedTime:h,brushColor:p="#69b3a2",mainGroupSelector:g}){const d=r+s,m=o?`.main-chart-group-${o}`:".main-chart-group",x=e.select(g??m),y=o?`timeline-track timeline-track-${o}`:"timeline-track",v=x.append("g").attr("class",y),_=6,S=o?`timeline-clip-${o}`:`timeline-clip-${Math.random().toString(36).substr(2,9)}`;e.append("defs").append("clipPath").attr("id",S).append("rect").attr("x",0).attr("y",d).attr("width",i+_).attr("height",a),v.append("rect").attr("class","timeline-background").attr("x",0).attr("y",d).attr("width",i).attr("height",a).attr("fill","#FFFFFF").attr("stroke","#9CA3AF").attr("stroke-width",1);const w=v.append("g").attr("clip-path",`url(#${S})`),b=3,M=w.selectAll(".timeline-event").data(t).enter().append("rect").attr("class","timeline-event").attr("x",k=>n(new Date(k.timestamp))-b/2).attr("y",d).attr("width",b).attr("height",a).attr("fill",k=>k.color||"#2F42FF").attr("stroke","none").attr("cursor","pointer").attr("data-timestamp",k=>k.timestamp).attr("data-event-name",k=>k.eventName),A=6;if(M.on("mouseenter",function(k,C){const O=Ot(this),P=n(new Date(C.timestamp));O.transition().duration(150).attr("x",P-A/2).attr("width",A),l&&l({timestamp:C.timestamp,eventName:C.eventName,x:P})}).on("mouseleave",function(k,C){const O=Ot(this),P=n(new Date(C.timestamp));O.transition().duration(150).attr("x",P-b/2).attr("width",b),l&&l(null)}),u&&c){const k=f,C=h,O=pi().extent([[0,d],[i,d+a]]).on("start",B=>{if(!B.selection&&k!==void 0&&C!==void 0){const L=B.sourceEvent;if(L){const $=L.offsetX,Y=+n.invert($);if(Y<k||Y>C){const I=o?`.timeline-brush-${o}`:".timeline-brush";e.select(I).call(O.move,null);return}}}}).on("brush",B=>{if(!B.selection)return;const[L,$]=B.selection;let Y=+n.invert(L),I=+n.invert($);k!==void 0&&(Y=Math.max(Y,k),I=Math.max(I,k)),C!==void 0&&(Y=Math.min(Y,C),I=Math.min(I,C));const et=n(new Date(Y)),K=n(new Date(I));if(et!==L||K!==$){const J=o?`.timeline-brush-${o}`:".timeline-brush";e.select(J).call(O.move,[et,K])}}).on("end",B=>{if(!B.selection)return;const[L,$]=B.selection,Y=[+n.invert(L),+n.invert($)];k!==void 0&&(Y[0]=Math.max(Y[0],k)),C!==void 0&&(Y[1]=Math.min(Y[1],C)),c(Y);const I=o?`.timeline-brush-${o}`:".timeline-brush";e.select(I).call(O.move,null)}),P=o?`timeline-brush timeline-brush-${o}`:"timeline-brush",F=x.append("g").attr("class",P).call(O);F.selectAll(".selection").attr("fill",p).attr("fill-opacity",.2).attr("stroke",p).attr("stroke-width",1),F.selectAll(".handle").attr("fill",p).attr("fill-opacity",.8),F.select(".overlay").style("cursor","default"),F.on("dblclick",()=>{const B=n.domain(),L=[+B[0],+B[1]];c(L)})}}const pn={neoGrey:{200:"#EDEFEF",400:"#ADB5BD"},neoDigitalGreen:{600:"#40c048"}},Li=["#4CA75A","#FDDA04","#FFC008","#FF9800","#F9A91B","#FF5C24","#ED4134","#CB3446"],qe={greyHatch:{background:pn.neoGrey[200],lines:pn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}};function YS(e,t){const n=e.append("pattern").attr("id",`${t}-greyHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.greyHatch.background),n.append("path").attr("d","M0,2 L8,2").attr("stroke",qe.greyHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M0,6 L8,6").attr("stroke",qe.greyHatch.lines).attr("stroke-width",.5)}function WS(e,t){const n=e.append("pattern").attr("id",`${t}-dataMissingHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.dataMissingHatch.background),n.append("path").attr("d","M0,8 L8,0").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,2 L2,-2").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,10 L10,6").attr("stroke",qe.dataMissingHatch.lines).attr("stroke-width",.5)}function XS(e,t){const n=e.append("pattern").attr("id",`${t}-noLstHatchPattern`).attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("patternUnits","userSpaceOnUse");n.append("rect").attr("x",0).attr("y",0).attr("width",8).attr("height",8).attr("fill",qe.noLstHatch.background),n.append("path").attr("d","M0,0 L8,8").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M-2,6 L2,10").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5),n.append("path").attr("d","M6,-2 L10,2").attr("stroke",qe.noLstHatch.lines).attr("stroke-width",.5)}function va(e,t){let n=e.select("defs");n.empty()&&(n=e.append("defs")),YS(n,t),WS(n,t),XS(n,t)}function Nh(e,t){if(e.startsWith("url(#")&&e.endsWith(")")){const n=e.slice(5,-1);return`url(#${t}-${n})`}return e}function pf(e){return e.includes("greyHatchPattern")?qe.greyHatch.lines:e.includes("dataMissingHatchPattern")?qe.dataMissingHatch.lines:e.includes("noLstHatchPattern")?qe.noLstHatch.lines:e}function Tc(e,t,n,r){const{xScale:i,yScale:a,addClasses:s=!0,instanceId:o}=r,l=as().x(h=>i(new Date(h.data.timestamp))).y0(h=>a(h[0])).y1(h=>a(h[1])).curve(kr),u=Hm().x(h=>i(new Date(h.data.timestamp))).y(h=>a(h[1])).curve(kr),c=o?`areas areas-${o}`:"areas";let f=e.select(o?`.areas-${o}`:".areas");f.empty()&&(f=e.append("g").attr("class",c)),t.forEach((h,p)=>{var x;const g=n[p];if(!g)return;const d=((x=g.parliamentMapping)==null?void 0:x.isSpecialCategory)??!1,m=pf(g.color);if(d){const y=f.append("path").datum(h).attr("fill","none").attr("stroke",m).attr("stroke-width",3).attr("stroke-dasharray","15 8").attr("d",u).style("pointer-events","none");if(s){const v=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",v)}}else{const y=f.append("path").datum(h).attr("fill",g.color).attr("fill-opacity",g.fillOpacity??.7).attr("stroke",m).attr("stroke-width",g.strokeWidth??1.5).attr("d",l).style("pointer-events","none");if(s){const v=o?`area area-${o} area-${g.dataKey}`:`area area-${g.dataKey}`;y.attr("class",v)}}})}function KS(e,t){var r;const n=[];for(const i of e){let a=0;for(const s of t){const o=i[s.dataKey]||0,l=a,u=a+o;n.push({timestamp:i.timestamp,category:s.label,dataKey:s.dataKey,y0:l,y1:u,value:o,color:s.color,isSpecialCategory:((r=s.parliamentMapping)==null?void 0:r.isSpecialCategory)??!1}),a+=o}}return n}function Ae(e){return e.replace(/[^a-zA-Z0-9-_]/g,"-")}function H0(e,t,n,r){const{centerX:i,centerY:a,addClasses:s=!0,instanceId:o,parliamentRadius:l=200}=r,u=o?`parliament parliament-${o}`:"parliament";let c=e.select(o?`.parliament-${o}`:".parliament");c.empty()&&(c=e.append("g").attr("class",u)),t.seats.forEach(p=>{const g=n.find(x=>x.label===p.category);if(!g)return;const d=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius).attr("fill",g.color).attr("stroke",g.color).attr("stroke-width",.5),m=c.append("circle").attr("cx",i+p.x).attr("cy",a+p.y).attr("r",p.radius*2.5).attr("fill","transparent").attr("stroke","none").attr("pointer-events","all");if(s){const x=o?`seat seat-${o} seat-${Ae(p.category)}`:`seat seat-${Ae(p.category)}`;d.attr("class",x),m.attr("class",x)}});const f=o?`parliament-label parliament-label-${o}`:"parliament-label";if(e.select(`.${f.split(" ")[0]}`).empty()){const p=e.append("g").attr("class",f).attr("transform",`translate(${i},${a-l*.15})`).style("opacity","0").style("pointer-events","none");p.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),p.append("text").attr("class","label-value").attr("text-anchor","middle").attr("dy","35").style("font-size","48px").style("font-weight","bold").style("font-family","system-ui, -apple-system, sans-serif");const g=p.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");g.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),g.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}}function VS(e,t,n,r,i,a,s=!1){var f;const o=new Map;let l=i;if(t.length>0&&((f=t[0])==null?void 0:f.timestamp)!==void 0){const h=t[0].timestamp;l=n(new Date(h))}const u=new Map;for(const h of e.seats)u.has(h.category)||u.set(h.category,[]),u.get(h.category).push(h);const c=new Map;for(const h of t)c.set(h.dataKey,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory}),h.label&&h.label!==h.dataKey&&c.set(h.label,{y0:h.y0,y1:h.y1,isSpecialCategory:h.isSpecialCategory});for(const h of e.seats){const p=c.get(h.category);if(!p){o.set(h,{x:l,y:a/2});continue}const g=r(p.y0),d=r(p.y1);let m;if(s){const x=u.get(h.category)??[],y=h.seatIndex,v=x.length;if(v===1)m=(g+d)/2;else{const _=y/(v-1);m=g+(d-g)*_}}else m=d;o.set(h,{x:l,y:m})}return o}function ZS(e,t,n){var s;if(e.length===0)return[];const r=e[e.length-1],i=[];let a=0;for(const o of t){const l=r[o.dataKey]||0,u=a,c=a+l;i.push({dataKey:o.dataKey,label:o.label,y0:u,y1:c,value:l,timestamp:r.timestamp,isSpecialCategory:((s=o.parliamentMapping)==null?void 0:s.isSpecialCategory)??!1}),a+=l}return i}function QS(e){const t=e;return{seatsToLines:t*.2,seatsToBar:t*.07,crossFadePause:t*.003,barSlideToTimeline:t*.22,axesAndBarsGrow:t*.22,barsToArea:t*.287}}const _r=new Map;Ot.prototype.transition=Ic;const JS=({containerRef:e,data:t,categories:n,mode:r,width:i,height:a,margin:s,timeRange:o,showGrid:l=!0,showAxes:u=!0,axisLabelColor:c,axisLabelSize:f=14,formatDate:h,formatValue:p,markers:g=[],arcAngle:d=200,parliamentRadius:m=200,seatSize:x=4.5,animationDuration:y=900,onMorphComplete:v,onAnimationStateChange:_,onTimelineReady:S,onAnimationProgress:w,onHoveredDataChange:b,hoveredCategory:M,maxSeats:A=2e3,parliamentTimestamp:k,enableBrush:C=!1,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,showScaleIndicator:B=!1,reposPerSeat:L=1,timelineEvents:$=[],showTimeline:Y=!1,timelineHeight:I=40,timelineOffset:et=35,brushColor:K="#69b3a2",showCrosshair:J=!1,onCrosshairMove:st})=>{const[lt,N]=G.useState("area"),[j,nt]=G.useState(!1),[Z,R]=G.useState(null),[z,D]=G.useState(0),[T,X]=G.useState(null),[Q,W]=G.useState(null),[ut,H]=G.useState([]),ot=G.useRef(null),gt=G.useRef(r),yt=G.useRef(!0),vt=G.useRef(!1),rt=G.useRef(`morph-${Math.random().toString(36).substr(2,9)}`),at=G.useRef(void 0),_t=G.useRef(o),dt=G.useRef(g),xt=G.useRef($),Et=G.useRef(v),At=G.useRef(_),ee=G.useRef(S),ne=G.useRef(w),Pt=G.useRef(b),ge=G.useRef(st);G.useEffect(()=>{Et.current=v,At.current=_,ee.current=S,ne.current=w,Pt.current=b,ge.current=st},[v,_,S,w,b,st]),G.useEffect(()=>{if(e.current&<==="parliament")if(M){const Rt=n.find(It=>It.dataKey===M);if(Rt){const It=Rt.label;if(R(It),Ii(e.current,It),t.length>0){const Re=t[t.length-1],Qt=Math.round(Re.values[Rt.dataKey]||0),oe={label:Rt.label,value:Qt,color:pf(Rt.color)};qi(e.current,oe,B,L,rt.current)}}}else R(null),Ii(e.current,null),qi(e.current,null,B,L,rt.current)},[M,lt,n,t,B,L]);const Vt=i-s.left-s.right,Zt=a-s.top-s.bottom;return G.useEffect(()=>{var le;if(!e.current||t.length===0||n.length===0||(at.current&&(at.current(),at.current=void 0),vt.current))return;const Rt=Ot(e.current),It=r!==gt.current;yt.current?(Rt.selectAll("*").remove(),va(Rt,rt.current),yt.current=!1):It||(Rt.selectAll("*").remove(),va(Rt,rt.current));const Re=t[t.length-1],Qt=n.reduce((ht,Nt)=>ht+(Re.values[Nt.dataKey]||0),0),oe=t.map(ht=>{const Nt={timestamp:ht.timestamp};for(const ue of n)Nt[ue.dataKey]=ht.values[ue.dataKey]||0;return Nt}),we=n.map(ht=>ht.dataKey),me=Yi().keys(we),Ge=me(oe),sn=t.map(ht=>ht.timestamp),Ye=It||!o?Math.min(...sn):o[0],Fe=It||!o?Math.max(...sn):o[1],on=[...sn].sort((ht,Nt)=>ht-Nt),ye=[];for(let ht=0;ht<on.length-1;ht++)ye.push(on[ht+1]-on[ht]);const kt=ye.length>0?ye.reduce((ht,Nt)=>ht+Nt,0)/ye.length:0,Lt=Fe+kt*1.15,Mt=Wr().domain([new Date(Ye),new Date(Lt)]).range([0,Vt]),Yt=oe.filter(ht=>ht.timestamp>=Ye&&ht.timestamp<=Fe),_e=me(Yt),Wt=_e.length>0?Math.max(..._e[_e.length-1].map(ht=>ht[1]??0)):0,U=ri().domain([0,Wt*1.15]).range([Zt,0]),ct=n.map(ht=>({...ht,color:Nh(ht.color,rt.current)})),ft=ct.map(ht=>({dataKey:ht.dataKey,label:ht.label,color:ht.color,value:Re.values[ht.dataKey]||0})),wt=GS(ft,Qt,A).reverse(),St=jS(wt,{arcAngle:d,radius:m,seatSize:x,minSeatSize:4,maxSeatSize:30,spacing:1.1,innerRadiusRatio:.4});ot.current=St;const zt=ZS(oe,n),re=VS(St,zt,Mt,U,Vt,Zt);if(It&&!vt.current){vt.current=!0,nt(!0),(le=At.current)==null||le.call(At,!0),X(null),H([]),D(0);let ht=Rt.select("g[transform]");if(ht.empty()&&(ht=Rt.select("g")),ht.empty()){Rt.selectAll("*").remove(),va(Rt,rt.current),Gs(Rt,r==="parliament"?"parliament":"area",Ge,ct,St,Mt,U,Vt,Zt,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),nt(!1),N(r==="parliament"?"parliament":"area"),D(r==="parliament"?1:0),gt.current=r;return}const Nt=setTimeout(()=>{vt.current=!1,nt(!1),gt.current=r},y*3);eT(Rt,r,Ge,ct,St,re,Mt,U,Vt,Zt,s,y,()=>{var ue,Ee,De;if(clearTimeout(Nt),vt.current=!1,nt(!1),N(r==="parliament"?"parliament":"area"),r==="parliament"&&D(1),(ue=At.current)==null||ue.call(At,!1),(Ee=Et.current)==null||Ee.call(Et),gt.current=r,r==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,ct,t,Z,R,Pt.current,B,L,rt.current)),r!=="parliament"&&e.current){R(null),(De=Pt.current)==null||De.call(Pt,null),qi(e.current,null,B,L,rt.current);const We=Ot(e.current),$e=We.select(rt.current?`.main-chart-group-${rt.current}`:".main-chart-group");if(Y){const Rn=rt.current?`.timeline-track-${rt.current}`:".timeline-track",Xe=rt.current?`.timeline-brush-${rt.current}`:".timeline-brush";$e.select(Rn).remove(),$e.select(Xe).remove(),Qa({svg:We,events:$,xScale:Mt,chartHeight:Zt,chartWidth:Vt,timelineHeight:I,timelineOffset:et,instanceId:rt.current,setHoveredTimelineEvent:W,enableBrush:C,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,brushColor:K})}if(C&&O){const Rn=$e.select(rt.current?`.chart-content-group-${rt.current}`:".chart-content-group");tT(Rn,Vt,Zt,Mt,O,rt.current,We,P,F,K)}if(g.length>0&&H&&X&&o){const Xe=g.filter(ln=>ln.timestamp>=(o[0]??0)-1&&ln.timestamp<=(o[1]??1/0)+1).map(ln=>({...ln,x:Mt(new Date(ln.timestamp))}));if(H(Xe),Xe.length>0){qh($e,Xe,Zt,Vt,C,X,rt.current);const ln=$e.select(rt.current?`.markers-${rt.current}`:".markers");if(!ln.empty()){$e.selectAll(".marker-hover-overlay").remove();const sr=$e.select(rt.current?`.chart-content-group-${rt.current}`:".chart-content-group");j0(sr.empty()?$e:sr,ln,Xe,Vt,Zt,C,X,s,J,st)}}}}},u,f,h,p,ee.current,(ue,Ee)=>{var De;if(r==="parliament"&&ue>=.95){const We=(ue-.95)/.05;D(Math.min(We,1))}(De=ne.current)==null||De.call(ne,ue,Ee)},k,rt.current)}else gt.current=r,r==="parliament"&&(X(null),H([])),Gs(Rt,r==="parliament"?"parliament":"area",Ge,ct,St,Mt,U,Vt,Zt,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),N(r==="parliament"?"parliament":"area"),D(r==="parliament"?1:0),r==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,ct,t,Z,R,Pt.current,B,L,rt.current));return()=>{at.current&&(at.current(),at.current=void 0)}},[r]),G.useEffect(()=>{var Yt,_e;if(!e.current||t.length===0||vt.current)return;if(yt.current){_t.current=o;return}if(!(o!==_t.current&&((o==null?void 0:o[0])!==((Yt=_t.current)==null?void 0:Yt[0])||(o==null?void 0:o[1])!==((_e=_t.current)==null?void 0:_e[1]))))return;_t.current=o;const It=Ot(e.current),Re=t.map(Wt=>{const U={timestamp:Wt.timestamp};for(const ct of n)U[ct.dataKey]=Wt.values[ct.dataKey]||0;return U}),Qt=n.map(Wt=>Wt.dataKey),we=Yi().keys(Qt)(Re),me=t.map(Wt=>Wt.timestamp),Ge=o?o[0]:Math.min(...me),sn=o?o[1]:Math.max(...me),Fe=(me.length>1?(me[me.length-1]-me[0])/(me.length-1):0)*.5,on=Wr().domain([new Date(Ge-Fe),new Date(sn+Fe)]).range([0,i-s.left-s.right]),ye=Math.max(...we[we.length-1].map(Wt=>Wt[1])),kt=ri().domain([0,ye*1.1]).range([a-s.top-s.bottom,0]);if(!ot.current)return;const Lt=ot.current,Mt=n.map(Wt=>({...Wt,color:Nh(Wt.color,rt.current)}));It.selectAll("*").remove(),va(It,rt.current),Gs(It,lt==="parliament"?"parliament":"area",we,Mt,Lt,on,kt,i-s.left-s.right,a-s.top-s.bottom,s,l,u,c,f,h,p,C,O,rt.current,g,o,H,X,$,Y,I,et,W,P,F,K,J,st),lt==="parliament"&&e.current&&Pt.current&&(at.current=Ys(e.current,Mt,t,Z,R,Pt.current,B,L,rt.current))},[o]),G.useEffect(()=>{if(!e.current||t.length===0||vt.current)return;if(yt.current){dt.current=g,xt.current=$;return}if(lt==="parliament"){dt.current=g,xt.current=$;return}const Rt=g.length!==dt.current.length||g.some((kt,Lt)=>{var Mt,Yt;return kt.timestamp!==((Mt=dt.current[Lt])==null?void 0:Mt.timestamp)||kt.label!==((Yt=dt.current[Lt])==null?void 0:Yt.label)}),It=$.length!==xt.current.length||$.some((kt,Lt)=>{var Mt,Yt;return kt.timestamp!==((Mt=xt.current[Lt])==null?void 0:Mt.timestamp)||kt.eventName!==((Yt=xt.current[Lt])==null?void 0:Yt.eventName)});if(!Rt&&!It)return;dt.current=g,xt.current=$;const Re=Ot(e.current),Qt=Re.select(rt.current?`.main-chart-group-${rt.current}`:".main-chart-group");if(Qt.empty())return;const oe=t.map(kt=>kt.timestamp),we=o?o[0]:Math.min(...oe),me=o?o[1]:Math.max(...oe),sn=(oe.length>1?(oe[oe.length-1]-oe[0])/(oe.length-1):0)*.5,Ye=i-s.left-s.right,Fe=a-s.top-s.bottom,on=Wr().domain([new Date(we-sn),new Date(me+sn)]).range([0,Ye]);if(It&&Y){const kt=rt.current?`.timeline-track-${rt.current}`:".timeline-track",Lt=rt.current?`.timeline-brush-${rt.current}`:".timeline-brush";Qt.select(kt).remove(),Qt.select(Lt).remove(),Qa({svg:Re,events:$,xScale:on,chartHeight:Fe,chartWidth:Ye,timelineHeight:I,timelineOffset:et,instanceId:rt.current,setHoveredTimelineEvent:W,enableBrush:C,onTimeRangeChange:O,minAllowedTime:P,maxAllowedTime:F,brushColor:K})}let ye=[];if(Rt&&g.length>0&&o){const kt=rt.current?`.markers-${rt.current}`:".markers";Qt.select(kt).remove();const Lt=1;ye=g.filter(Mt=>Mt.timestamp>=(o[0]??0)-Lt&&Mt.timestamp<=(o[1]??1/0)+Lt).map(Mt=>({...Mt,x:on(new Date(Mt.timestamp))})),H(ye),ye.length>0&&qh(Qt,ye,Fe,Ye,C,X,rt.current)}if(ye.length>0){const kt=Qt.select(rt.current?`.markers-${rt.current}`:".markers");if(!kt.empty()){Qt.selectAll(".marker-hover-overlay").remove();const Lt=Qt.append("rect").attr("class","marker-hover-overlay").attr("x",0).attr("y",0).attr("width",Ye).attr("height",Fe).attr("fill","none").attr("pointer-events","all");let Mt=null;Lt.on("mousemove",function(Yt){const[_e]=er(Yt,this);let Wt=null,U=1/0;if(ye.forEach(wt=>{const St=Math.abs(_e-wt.x);St<U&&(U=St,Wt=wt)}),!Wt||U>50){Mt!==null&&(Mt=null,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),X(null));return}const ft=Wt;Mt!==ft.timestamp&&(Mt=ft.timestamp,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),kt.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(ft.timestamp)}).attr("opacity",.6),kt.selectAll(".marker-label").filter(function(){return Ot(this).attr("data-timestamp")===String(ft.timestamp)}).attr("opacity",1),X(ft))}),Lt.on("mouseleave",function(){Mt=null,kt.selectAll(".marker-line").attr("opacity",0),kt.selectAll(".marker-label").attr("opacity",0),X(null)})}}},[g,$,j]),{isMorphing:j,currentMode:lt,hoveredCategory:Z,scaleIndicatorOpacity:z,visibleMarkers:ut,hoveredMarker:T,setHoveredMarker:X,hoveredTimelineEvent:Q,setHoveredTimelineEvent:W}};function tT(e,t,n,r,i,a,s,o,l,u){const c=o,f=l,h=pi().extent([[0,0],[t,n]]).on("start",g=>{if(!g.selection&&c!==void 0&&f!==void 0){const d=g.sourceEvent;if(d){const m=d.offsetX,x=+r.invert(m);if(x<c||x>f){s.select(".brush").call(h.move,null);return}}}}).on("brush",g=>{if(!g.selection)return;const[d,m]=g.selection;let x=+r.invert(d),y=+r.invert(m);c!==void 0&&(x=Math.max(x,c),y=Math.max(y,c)),f!==void 0&&(x=Math.min(x,f),y=Math.min(y,f));const v=r(new Date(x)),_=r(new Date(y));(v!==d||_!==m)&&s.select(".brush").call(h.move,[v,_])}).on("end",g=>{if(!g.selection)return;const[d,m]=g.selection,x=[+r.invert(d),+r.invert(m)];c!==void 0&&(x[0]=Math.max(x[0],c)),f!==void 0&&(x[1]=Math.min(x[1],f)),i(x),s.select(".brush").call(h.move,null)}),p=e.append("g").attr("class","brush").call(h);p.selectAll(".selection").attr("fill",u).attr("fill-opacity",.2).attr("stroke",u).attr("stroke-width",1),p.selectAll(".handle").attr("fill",u).attr("fill-opacity",.8),p.select(".overlay").style("cursor","default"),p.on("dblclick",()=>{const g=r.domain(),d=[+g[0],+g[1]];o!==void 0&&(d[0]=Math.max(d[0],o)),l!==void 0&&(d[1]=Math.min(d[1],l)),i(d)})}function qh(e,t,n,r,i,a,s){const o=s?`markers markers-${s}`:"markers",l=e.append("g").attr("class",o);t.forEach(u=>{l.append("line").attr("class","marker-line").attr("data-timestamp",u.timestamp).attr("x1",u.x).attr("x2",u.x).attr("y1",0).attr("y2",n).attr("stroke",u.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),u.label&&l.append("text").attr("class","marker-label").attr("data-timestamp",u.timestamp).attr("x",u.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",u.color??"#2F42FF").attr("opacity",0)})}function j0(e,t,n,r,i,a,s,o,l=!1,u){let c=null,f;a?f=e.select(".brush .overlay"):f=e.append("rect").attr("class","marker-hover-overlay").attr("width",r).attr("height",i).attr("fill","none").attr("pointer-events","all");const h=p=>{let g=null,d=1/0;if(n.forEach(y=>{const v=Math.abs(p-y.x);v<d&&(d=v,g=y)}),!g||d>50)return c!==null&&(c=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null)),!1;const x=g;return c===x.timestamp||(c=x.timestamp,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),t.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(x.timestamp)}).attr("opacity",.6),t.selectAll(".marker-label").filter(function(){return Ot(this).attr("data-timestamp")===String(x.timestamp)}).attr("opacity",1),s(x)),!0};f.on("mousemove",function(p){const[g,d]=er(p,this);h(g),l&&u&&u({x:g+o.left,y:d+o.top})}),f.on("mouseleave",function(){c=null,t.selectAll(".marker-line").attr("opacity",0),t.selectAll(".marker-label").attr("opacity",0),s(null),u&&u(null)})}function Gs(e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m=!1,x,y,v=[],_=[0,0],S,w,b=[],M=!1,A=40,k=15,C,O,P,F="#69b3a2",B=!1,L){const $=O,Y=P;let I=null;const et=y?`main-chart-group main-chart-group-${y}`:"main-chart-group",K=e.append("g").attr("class",et).attr("transform",`translate(${u.left},${u.top})`),J=y?`chart-clip-${y}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`;e.select("defs").append("clipPath").attr("id",J).append("rect").attr("x",0).attr("y",0).attr("width",o).attr("height",l);const st=y?`chart-content-group chart-content-group-${y}`:"chart-content-group",lt=K.append("g").attr("class",st).attr("clip-path",`url(#${J})`);if(c&&t!=="parliament"&&(lt.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(qn(a).ticks(6).tickSize(l).tickFormat(()=>"")),lt.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(In(s).ticks(5).tickSize(-o).tickFormat(()=>""))),t==="area"&&(Tc(lt,n,r,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),v.length>0)){const j=v.filter(nt=>nt.timestamp>=_[0]-1&&nt.timestamp<=_[1]+1).map(nt=>({...nt,x:a(new Date(nt.timestamp))}));I={markersGroup:null,visibleMarkers:j},S&&S(j)}if(t==="parliament"){const N=o/2,j=i.radius+10,nt=l-i.radius*.3,Z=Math.max(j,nt);H0(lt,i,r,{centerX:N,centerY:Z,addClasses:!0,instanceId:y,parliamentRadius:i.radius})}if(f&&t!=="parliament"){const j=qn(a).ticks(6).tickPadding(12);g&&j.tickFormat(T=>g(+T));const Z=K.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).call(j).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&Z.attr("fill",h);const R=In(s).ticks(5);R.tickFormat(T=>+T==0?"":d?d(+T):String(T));const D=K.append("g").attr("class","axis axis-y").call(R).selectAll("text").attr("font-size",p).attr("font-weight",500);h&&D.attr("fill",h)}if(m&&x&&t==="area"){const N=$,j=Y,nt=pi().extent([[0,0],[o,l]]).on("start",R=>{if(!R.selection&&N!==void 0&&j!==void 0){const z=R.sourceEvent;if(z){const D=z.offsetX-((u==null?void 0:u.left)||0),T=+a.invert(D);if(T<N||T>j){e.select(".brush").call(nt.move,null);return}}}}).on("brush",R=>{if(!R.selection)return;const[z,D]=R.selection;let T=+a.invert(z),X=+a.invert(D);N!==void 0&&(T=Math.max(T,N),X=Math.max(X,N)),j!==void 0&&(T=Math.min(T,j),X=Math.min(X,j));const Q=a(new Date(T)),W=a(new Date(X));(Q!==z||W!==D)&&e.select(".brush").call(nt.move,[Q,W])}).on("end",R=>{if(!R.selection)return;const[z,D]=R.selection,T=[+a.invert(z),+a.invert(D)];N!==void 0&&(T[0]=Math.max(T[0],N)),j!==void 0&&(T[1]=Math.min(T[1],j)),x(T),e.select(".brush").call(nt.move,null)}),Z=lt.append("g").attr("class","brush").call(nt);Z.selectAll(".selection").attr("fill",F).attr("fill-opacity",.2).attr("stroke",F).attr("stroke-width",1),Z.selectAll(".handle").attr("fill",F).attr("fill-opacity",.8),Z.select(".overlay").style("cursor","default"),Z.on("dblclick",()=>{const R=a.domain(),z=[+R[0],+R[1]];x(z)})}if(t==="area"&&I&&I.visibleMarkers.length>0){const N=K.append("g").attr("class","markers").attr("clip-path",`url(#${J})`);I.visibleMarkers.forEach(j=>{N.append("line").attr("class","marker-line").attr("data-timestamp",j.timestamp).attr("x1",j.x).attr("x2",j.x).attr("y1",0).attr("y2",l).attr("stroke",j.color??"#2F42FF").attr("stroke-width",2).attr("opacity",0),j.label&&N.append("text").attr("class","marker-label").attr("data-timestamp",j.timestamp).attr("x",j.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",j.color??"#2F42FF").attr("opacity",0)}),I.markersGroup=N}if(t==="area"&&M&&C&&Qa({svg:e,events:b,xScale:a,chartHeight:l,chartWidth:o,timelineHeight:A,timelineOffset:k,instanceId:y,setHoveredTimelineEvent:C,enableBrush:m,onTimeRangeChange:x,minAllowedTime:$,maxAllowedTime:Y,brushColor:F}),t==="area"){const N=(I==null?void 0:I.markersGroup)??lt.append("g").attr("class","empty-markers-group"),j=(I==null?void 0:I.visibleMarkers)??[];j0(lt,N,j,o,l,m,w??(()=>{}),u,B,L)}}function eT(e,t,n,r,i,a,s,o,l,u,c,f,h,p=!0,g=14,d,m,x,y,v,_){const S=e.select(_?`.main-chart-group-${_}`:".main-chart-group");S.selectAll(".markers").remove(),S.selectAll(".marker-hover-overlay").remove(),S.selectAll(".brush").remove(),t==="stacked-area"||t==="area"?nT(S,n,r,i,a,s,o,l,u,f,h,p,g,d,m,x,y,v,_):rT(S,n,r,i,a,s,o,l,u,f,h,p,g,d,m,x,y,v,_)}function Ni(e,t,n,r,i,a,s,o){const l=e[a];if(!l)return"";const u=l.find(w=>w.data.timestamp===s);if(!u)return"";const c=u.data,f=t[a];if(!f)return"";const h=f.dataKey,p=c[h];if(!p||p<=0)return"";const g=n.get(s);if(!g)return"";const d=g.x,m=g.width,x=u[0],y=u[1],v=o?i:r(x),_=o?i:r(y),S=[];return S.push(`M ${d} ${v}`),S.push(`L ${d} ${_}`),S.push(`L ${d+m} ${_}`),S.push(`L ${d+m} ${v}`),S.push("Z"),S.join(" ")}function nT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,x,y){var ha;const v=y?`.seat-${y}`:".seat",_=e.selectAll(v),S=y?`.chart-content-group-${y}`:".chart-content-group";let w=e.select(S);if(w.empty()){const V=e.attr("clip-path"),it=V?((ha=V.match(/url\(#(.+)\)/))==null?void 0:ha[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,pt=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";w=e.append("g").attr("class",pt).attr("clip-path",`url(#${it})`)}if(_.size()===0){Tc(e,t,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y}),c();return}const b=QS(u),M=y?_r.get(y):void 0;M&&(M.destroy(),y&&_r.delete(y));const A=V=>V<.2?"seatsToRings":V<.35?"ringsToBar":V<.464?"axesReveal":V<.6?"barSlide":V<.82?"barsGrow":"barsToArea",k=new U0({seatsToRings:b.seatsToLines,ringsToBar:b.seatsToBar,axesReveal:b.barSlideToTimeline*.3,barSlide:b.barSlideToTimeline*.7,barsGrow:b.axesAndBarsGrow,barsToArea:b.barsToArea},{onStageComplete:V=>{},onProgress:V=>{if(m){const it=A(V);m(V,it)}},onComplete:()=>{c()}});y&&_r.set(y,k),d&&d(k.getControls().getTimeline());const C=t[0].map(V=>V.data),O=KS(C,n),P=o/2,F=r.radius+10,B=l-r.radius*.3,L=Math.max(F,B),$=C.map(V=>V.timestamp),Y=x??Math.max(...$),I=new Map,et=[];$.forEach((V,it)=>{const pt=a(new Date(V)),bt=$[it+1];if(bt){const Bt=a(new Date(bt))-pt;et.push(Bt)}});const K=et.length>0?et.reduce((V,it)=>V+it,0)/et.length:30;$.forEach((V,it)=>{const pt=a(new Date(V)),bt=$[it+1],Bt=it===$.length-1?K:a(new Date(bt))-pt;I.set(V,{x:pt,width:Bt})});const J=O.filter(V=>V.timestamp===Y),st=I.get(Y),lt=666,N=y?`parliament-bar-path parliament-bar-path-${y}`:"parliament-bar-path",j=w.append("g").attr("class",N);J.sort((V,it)=>it.y0-V.y0),new Map().set(Y,{x:lt-st.width/2,width:st.width});const Z=[],R=(r.radius-r.innerRadius)*.6,D=l*.8,T=L,X=J.reduce((V,it)=>V+(it.y1-it.y0),0);let Q=0;n.forEach(V=>{const it=J.find(ve=>ve.dataKey===V.dataKey);if(!it)return;const Jt=(it.y1-it.y0)/X*D,Bt=T-Q,Se=T-Q-Jt,xe=lt-R/2,Le=`M ${xe} ${Bt} L ${xe} ${Se} L ${xe+R} ${Se} L ${xe+R} ${Bt} Z`;Q+=Jt;const Ke=j.append("path").attr("class",`parliament-bar-segment category-${Ae(it.dataKey)}`).attr("d",Le).attr("fill",it.color).style("opacity",0).node();Ke&&Z.push(Ke)}),y&&(window.orchestratorMap=_r);const W=k.getControls().getTimeline(),ut=b.seatsToLines/1e3,H=b.seatsToBar/1e3;W.call(()=>{m==null||m(W.progress(),"seatsToRings")},[],"seatsToRings");const ot=_.nodes(),gt=P,yt=L,vt=Math.max(...r.seats.map(V=>V.ring)),rt=r.seats.filter(V=>V.ring===vt),at=e.append("g").attr("class",`seat-lines-${y||"default"}`),_t=n.map(V=>{const it=_.filter(`.seat-${Ae(V.dataKey)}`).size();return it>0?{name:V.dataKey,seatCount:it,color:V.color}:null}).filter(V=>V!==null).reverse(),dt=_t.reduce((V,it)=>V+it.seatCount,0),xt=rt.length,Et=r.radius-r.innerRadius,At=Et*.6,ee=At/2,ne=Et*.6,Pt=[];let ge=0;_t.forEach(V=>{const it=Math.max(1,Math.round(V.seatCount/dt*xt));for(let pt=0;pt<it;pt++){const bt=(ge+pt)/xt,Jt=r.arcAngle*Math.PI/180,Se=-Jt/2-Math.PI/2+bt*Jt,xe=(r.innerRadius+r.radius)/2,Le=gt+Math.cos(Se)*xe,Ke=yt+Math.sin(Se)*xe,ve=Math.cos(Se),Gn=Math.sin(Se),lr=Le-ee*ve,Fr=Ke-ee*Gn,ce=Le+ee*ve,Yn=Ke+ee*Gn,Wn=at.append("line").attr("class","seat-line").attr("x1",lr).attr("y1",Fr).attr("x2",ce).attr("y2",Yn).attr("stroke",V.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").style("opacity",0).attr("data-angle",Se*180/Math.PI).attr("data-center-x",Le).attr("data-center-y",Ke).attr("data-initial-length",At).node();Pt.push({element:Wn,angle:Se})}ge+=it});const Vt=()=>{at.remove()},Zt=ut*.5,Rt=0,It=[];if(It.push(...ot),It.sort((V,it)=>{const pt=parseInt(V.getAttribute("data-layout-index")||"-1",10),bt=parseInt(it.getAttribute("data-layout-index")||"-1",10);return pt-bt}),It.length>0&&Pt.length>0){const V=Pt.map(it=>it.element);W.to(It,{attr:{r:1.5},duration:Zt*.3,ease:"power2.in"},`seatsToRings+=${Rt}`),V.forEach(it=>{const pt=it.getAttribute("x1")||"0",bt=it.getAttribute("y1")||"0",Jt=it.getAttribute("x2")||"0",Bt=it.getAttribute("y2")||"0";it.setAttribute("data-final-x1",pt),it.setAttribute("data-final-y1",bt),it.setAttribute("data-final-x2",Jt),it.setAttribute("data-final-y2",Bt),it.setAttribute("x1",pt),it.setAttribute("y1",bt),it.setAttribute("x2",pt),it.setAttribute("y2",bt)}),W.to(V,{attr:{x2:(it,pt)=>parseFloat(pt.getAttribute("data-final-x2")||"0"),y2:(it,pt)=>parseFloat(pt.getAttribute("data-final-y2")||"0")},opacity:.9,duration:Zt*.6,ease:"power2.out"},`seatsToRings+=${Rt+Zt*.2}`),W.to(It,{opacity:0,duration:Zt*.3,ease:"power2.out"},`seatsToRings+=${Rt+Zt*.3}`)}const Re=ut*.05,Qt=ut*.7,oe=Rt+Zt+Re;if(Pt.length>0){const V=lt,it=L,bt=l*.8/Pt.length,Jt=it,Bt=[...Pt].sort((Le,Ke)=>Ke.angle-Le.angle),xe=.6/Bt.length;Bt.forEach((Le,Ke)=>{const ve=V,lr=Jt-Ke*bt,Fr=xe*Ke*Qt,ce=Le.element,Yn=parseFloat(ce.getAttribute("data-final-x1")||"0"),Wn=parseFloat(ce.getAttribute("data-final-y1")||"0"),mi=parseFloat(ce.getAttribute("data-final-x2")||"0"),$r=parseFloat(ce.getAttribute("data-final-y2")||"0"),pa=(Yn+mi)/2,xn=(Wn+$r)/2,Xn=Math.atan2($r-Wn,mi-Yn),ur=Math.sqrt(Math.pow(mi-Yn,2)+Math.pow($r-Wn,2));W.to({progress:0},{progress:1,duration:Qt*.5,ease:"power2.inOut",delay:Fr,onUpdate:function(){const ie=this.progress(),xs=pa+(ve-pa)*ie,vs=xn+(lr-xn)*ie,vn=40*4*ie*(1-ie),cr=xs,fr=vs-vn,ws=0-Xn,En=Xn+ws*ie*ie,da=(ur+(ne-ur)*ie)/2,Iy=cr-da*Math.cos(En),zy=fr-da*Math.sin(En),By=cr+da*Math.cos(En),Uy=fr+da*Math.sin(En);ce.setAttribute("x1",Iy.toString()),ce.setAttribute("y1",zy.toString()),ce.setAttribute("x2",By.toString()),ce.setAttribute("y2",Uy.toString())},onComplete:function(){const ie=ne/2;ce.setAttribute("x1",(ve-ie).toString()),ce.setAttribute("y1",lr.toString()),ce.setAttribute("x2",(ve+ie).toString()),ce.setAttribute("y2",lr.toString())}},`seatsToRings+=${oe}`),W.to(Le.element,{opacity:.95,duration:Qt*.3,ease:"power2.out",delay:Fr},`seatsToRings+=${oe}`)})}const we=at,me=[];J.forEach((V,it)=>{const pt=_.filter(`.seat-${Ae(V.category)}`),bt=pt.size();if(bt===0)return;const Jt=s(V.y1),Bt=s(V.y0)-s(V.y1),Se=pt.nodes().sort((xn,Xn)=>{const ur=parseInt(xn.getAttribute("data-layout-index")||"-1",10),ie=parseInt(Xn.getAttribute("data-layout-index")||"-1",10);return ur-ie}),xe=Math.max(st.width,100),Le=Bt,Ke=xe/Math.max(Le,1),ve=Math.max(2,Math.ceil(Math.sqrt(bt*Ke))),Gn=Math.ceil(bt/ve),lr=xe*.8,Fr=Le*.8,ce=ve>1?lr/(ve-1):0,Yn=Gn>1?Fr/(Gn-1):0,Wn=ve>1?(ve-1)*ce:0,mi=Gn>1?(Gn-1)*Yn:0,$r=lt-xe/2+(xe-Wn)/2,pa=Jt+(Le-mi)/2;Se.forEach((xn,Xn)=>{const ur=parseInt(xn.getAttribute("data-layout-index")||"-1",10),ie=ur>=0?r.seats[ur]:void 0,xs=ie?P+ie.x:parseFloat(xn.getAttribute("cx")||"0"),vs=ie?L+ie.y:parseFloat(xn.getAttribute("cy")||"0"),Ef=(ie==null?void 0:ie.radius)||parseFloat(xn.getAttribute("r")||"4"),vn=bt%ve;let cr,fr;if(vn>0&&Xn<vn)fr=0,cr=Xn;else{const En=Xn-(vn>0?vn:0);cr=En%ve,fr=Math.floor(En/ve)+(vn>0?1:0)}let bs=$r+cr*ce;if(vn>0&&fr===0){const En=vn>1?(vn-1)*ce:0,Df=(Wn-En)/2;bs=$r+Df+cr*ce}const ws=pa+fr*Yn;me.push({element:xn,startX:xs,startY:vs,startRadius:Ef,category:V.dataKey,segmentIndex:it,endY:ws,endX:bs})})});const Ge=me.map(V=>{const it=V.startX-P,pt=V.startY-L,bt=Math.atan2(pt,it);return{...V,angle:bt}});Ge.sort((V,it)=>it.angle-V.angle);const sn=H*.8,Ye=.6,Fe=Ge.length,ye=sn/Math.max(Fe,1)*(Fe-1)+Ye,kt=H*.3,Lt=ye;W.to(Z,{opacity:1,duration:kt,ease:"power2.inOut"},`seatsToBar+=${Lt}`),we&&(W.to(we.selectAll(".seat-line").nodes(),{opacity:0,duration:kt,ease:"power2.inOut"},`seatsToBar+=${Lt}`),W.call(()=>{Vt()},[],`seatsToBar+=${Lt+kt}`));const Mt=b.barSlideToTimeline/1e3;let Yt=null,_e=null;if(f){const it=qn(a).ticks(6).tickPadding(12);p&&it.tickFormat(bt=>p(bt.getTime())),Yt=e.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${l})`).attr("opacity",0),Yt.call(it).selectAll("text").attr("font-size",h).attr("font-weight",500);const pt=In(s).ticks(5);pt.tickFormat(bt=>+bt==0?"":g?g(bt):String(bt)),_e=e.append("g").attr("class","axis axis-y").attr("opacity",0),_e.call(pt).selectAll("text").attr("font-size",h).attr("font-weight",500)}const Wt=b.crossFadePause/1e3,U=Lt+kt+Wt;Z.forEach(V=>{const it=Array.from(V.classList).find(Bt=>Bt.startsWith("category-"));if(!it||!J.find(Bt=>Ae(Bt.dataKey)===it.replace("category-","")))return;const bt=n.findIndex(Bt=>Ae(Bt.dataKey)===it.replace("category-",""));if(bt===-1)return;const Jt=Ni(t,n,I,s,l,bt,Y,!1);Jt&&W.to(V,{attr:{d:Jt},duration:Mt,ease:"power2.out"},`seatsToBar+=${U}`)});const ct=as().x(V=>a(V.data.timestamp)).y0(V=>s(V[0])).y1(V=>s(V[1])).curve(kr),ft=new Map;t.forEach((V,it)=>{const pt=n[it];if(pt){const bt=ct(V)||"";ft.set(pt.dataKey,bt)}});const wt=U+Mt;f&&Yt&&_e&&W.to([Yt.node(),_e.node()],{opacity:1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${U}`);const St=w.select(".grid-vertical"),zt=w.select(".grid-horizontal");if(!St.empty()||!zt.empty()){const it=[];St.empty()||it.push(St.node()),zt.empty()||it.push(zt.node()),W.to(it,{opacity:.1,duration:.6,ease:"power2.inOut"},`seatsToBar+=${U}`)}const re=b.axesAndBarsGrow/1e3,le=b.barsToArea/1e3,ht=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",Nt=w.append("g").attr("class",ht);$.forEach(V=>{if(V===Y)return;const it=I.get(V);it&&n.forEach((pt,bt)=>{const Jt=Ni(t,n,I,s,l,bt,V,!0),Bt=Ni(t,n,I,s,l,bt,V,!1);if(!Jt||!Bt)return;const Se=y?`histogram-path histogram-path-${y} category-${Ae(pt.dataKey)}`:`histogram-path category-${Ae(pt.dataKey)}`;Nt.append("path").attr("class",Se).attr("d",Jt).attr("fill",pt.color).attr("stroke",pt.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",pt.dataKey).attr("data-timestamp",V).attr("data-x-position",it.x).attr("data-full-height-path",Bt)})});const ue=y?`.histogram-path-${y}`:".histogram-path",Ee=Nt.selectAll(ue);W.to(Ee.nodes(),{opacity:1,duration:.3,ease:"power2.inOut"},`seatsToBar+=${wt}`);const De=st.x+st.width/2;Ee.each(function(){var xe;const V=this.getAttribute("data-full-height-path");if(!V)return;const it=parseFloat(this.getAttribute("data-x-position")||"0"),pt=parseFloat(this.getAttribute("data-timestamp")||"0"),bt=((xe=I.get(pt))==null?void 0:xe.width)||0,Jt=it+bt/2,Se=Math.abs(Jt-De)*8e-4;W.to(this,{attr:{d:V},duration:re,ease:"power2.out"},`seatsToBar+=${wt+Se}`)});const We=wt+re,$e=$[$.length-1],Xe=a(new Date($e))+K,sr=a.invert(Xe).getTime(),Pr=t.map(V=>{const it=V[V.length-1],pt={...it,data:{...it.data,timestamp:sr}};return[...V,pt]});Tc(e,Pr,n,{xScale:a,yScale:s,addClasses:!0,instanceId:y});const Rf=y?`.area-${y}`:".area",or=e.selectAll(Rf);or.attr("opacity",0),W.to(Ee.nodes(),{opacity:0,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`);const fa=j.selectAll("path").nodes();fa.length>0&&W.to(fa,{opacity:0,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`),W.to(or.nodes(),{opacity:1,duration:le,ease:"power2.inOut"},`seatsToBar+=${We}`);const _s=c;k.getControls().getTimeline().eventCallback("onComplete",()=>{const V=y?`.morph-bar-${y}`:".morph-bar";e.selectAll(V).remove();const it=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll(it).remove();const pt=y?`.seat-${y}`:".seat";e.selectAll(pt).style("pointer-events","none"),f&&(Yt&&Yt.attr("opacity",1),_e&&_e.attr("opacity",1)),_s()}),k.play()}function rT(e,t,n,r,i,a,s,o,l,u,c,f=!0,h=14,p,g,d,m,x,y){var Wt;const v=y?`.chart-content-group-${y}`:".chart-content-group";let _=e.select(v);if(_.empty()){const U=e.attr("clip-path"),ct=U?((Wt=U.match(/url\(#(.+)\)/))==null?void 0:Wt[1])||`chart-clip-${Math.random().toString(36).substr(2,9)}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`,ft=y?`chart-content-group chart-content-group-${y}`:"chart-content-group";_=e.append("g").attr("class",ft).attr("clip-path",`url(#${ct})`)}const S=y?`.area-${y}`:".area",w=e.selectAll(S);if(w.size()===0){iT(e,n,r,o,l,y),c();return}const b={areaToBar:u*.18,barsShrink:u*.22,barSlide:u*.22,axesHide:u*.03,barToRings:u*.07,ringsExpand:u*.18,ringsHold:u*.05,ringsToSeats:u*.07},M=y?_r.get(y):void 0;M&&(M.destroy(),y&&_r.delete(y));const A=U=>U<.18?"areaToBar":U<.4?"barsShrink":U<.62?"barSlide":U<.65?"axesHide":U<.72?"barToRings":U<.9?"ringsExpand":U<.95?"ringsHold":"ringsToSeats",k=new U0({seatsToRings:b.ringsToSeats,ringsHold:b.ringsHold,ringsToBar:b.barToRings,axesReveal:b.axesHide,barSlide:b.barSlide,barsGrow:b.barsShrink,barsToArea:b.areaToBar},{onStageComplete:U=>{},onProgress:U=>{if(m){const ct=A(U);m(U,ct)}},onComplete:()=>{c()}});y&&_r.set(y,k),d&&d(k.getControls().getTimeline());const O=t[0].map(U=>U.data).map(U=>U.timestamp),P=x??Math.max(...O),F=new Map,B=[];O.forEach((U,ct)=>{const ft=a(new Date(U)),wt=O[ct+1];if(wt){const zt=a(new Date(wt))-ft;B.push(zt)}});const L=B.length>0?B.reduce((U,ct)=>U+ct,0)/B.length:30;O.forEach((U,ct)=>{const ft=a(new Date(U)),wt=O[ct+1],zt=ct===O.length-1?L:a(new Date(wt))-ft;F.set(U,{x:ft,width:zt})});const $=k.getControls().getTimeline(),Y=b.areaToBar/1e3,I=y?`histogram-paths histogram-paths-${y}`:"histogram-paths",et=_.append("g").attr("class",I);O.forEach(U=>{const ct=F.get(U);ct&&n.forEach((ft,wt)=>{const St=Ni(t,n,F,s,l,wt,U,!1);if(!St)return;const zt=y?`histogram-path histogram-path-${y} category-${Ae(ft.dataKey)}`:`histogram-path category-${Ae(ft.dataKey)}`;et.append("path").attr("class",zt).attr("d",St).attr("fill",ft.color).attr("stroke",ft.color).attr("stroke-width",.5).attr("shape-rendering","crispEdges").attr("opacity",0).attr("data-category",ft.dataKey).attr("data-timestamp",U).attr("data-x-position",ct.x)})});const K=y?`.histogram-path-${y}`:".histogram-path",J=et.selectAll(K);$.to(w.nodes(),{opacity:0,duration:Y,ease:"power2.inOut"},"areaToBar"),$.to(J.nodes(),{opacity:1,duration:Y,ease:"power2.inOut"},"areaToBar");const st=b.barsShrink/1e3,lt=Y;J.each(function(){const U=parseFloat(this.getAttribute("data-timestamp")||"0");if(U===P)return;const ct=n.find(St=>this.classList.contains(`category-${Ae(St.dataKey)}`));if(!ct)return;const ft=n.indexOf(ct),wt=Ni(t,n,F,s,l,ft,U,!0);wt&&$.to(this,{attr:{d:wt},duration:st,ease:"power2.in"},lt)});const N=b.axesHide/1e3,j=lt+st;if(f){const U=e.select(".axis-x"),ct=e.select(".axis-y");U.empty()||$.to(U.node(),{opacity:0,duration:N,ease:"power2.inOut"},j),ct.empty()||$.to(ct.node(),{opacity:0,duration:N,ease:"power2.inOut"},j)}const nt=_.select(".grid-vertical"),Z=_.select(".grid-horizontal");nt.empty()||$.to(nt.node(),{opacity:0,duration:N,ease:"power2.inOut"},j),Z.empty()||$.to(Z.node(),{opacity:0,duration:N,ease:"power2.inOut"},j);const R=[];t.forEach((U,ct)=>{const ft=U.find(St=>St.data.timestamp===P);if(!ft)return;const wt=n[ct];wt&&R.push({category:wt.label,dataKey:wt.dataKey,color:wt.color,y0:ft[0],y1:ft[1]})}),R.sort((U,ct)=>ct.y0-U.y0);const z=R.reduce((U,ct)=>U+(ct.y1-ct.y0),0),D=r.radius-r.innerRadius,T=o/2,X=r.radius+10,Q=l-r.radius*.3,W=Math.max(X,Q),ut=D*.6,ot=l*.8,gt=W,yt=b.barSlide/1e3,vt=j+N,rt=666,at=J.nodes().filter(U=>parseFloat(U.getAttribute("data-timestamp")||"0")!==P);$.to(at,{opacity:0,duration:yt*.2,ease:"power2.out"},vt);const _t=J.nodes().filter(U=>parseFloat(U.getAttribute("data-timestamp")||"0")===P);_t.forEach(U=>{const ct=U.getAttribute("data-category");if(!ct)return;const ft=R.find(Ee=>Ee.dataKey===ct);if(!ft)return;const zt=(ft.y1-ft.y0)/z*ot;let re=0;for(const Ee of n){const De=R.find(Rn=>Rn.dataKey===Ee.dataKey);if(!De)continue;if(De.dataKey===ft.dataKey)break;const $e=(De.y1-De.y0)/z;re+=$e*ot}const le=gt-re,ht=gt-re-zt,Nt=rt-ut/2,ue=`M ${Nt} ${le} L ${Nt} ${ht} L ${Nt+ut} ${ht} L ${Nt+ut} ${le} Z`;$.to(U,{attr:{d:ue},duration:yt,ease:"power2.inOut"},vt)});const dt=b.barToRings/1e3,xt=vt+yt,Et=b.ringsExpand/1e3,At=xt+dt,ee=b.ringsHold/1e3,ne=At+Et,Pt=b.ringsToSeats/1e3,ge=ne+ee,Vt=Math.max(...r.seats.map(U=>U.ring)),Zt=r.seats.filter(U=>U.ring===Vt),Rt=_.append("g").attr("class",`slinky-${y||"h2p-default"}`),It=()=>{Rt.remove()};Zt.forEach((U,ct)=>{const ft=n.find(wt=>wt.label===U.category);ft&&Rt.append("line").attr("class","slinky-ring").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",0).attr("stroke",ft.color).attr("stroke-width",r.seatSize*2).attr("stroke-linecap","butt").attr("data-category",U.category).attr("data-category-index",U.categoryIndex).attr("data-ring-index",ct).attr("data-seat-x",T+U.x).attr("data-seat-y",W+U.y).attr("data-seat-angle",Math.atan2(U.y,U.x)).style("opacity",0)});const Re=Rt.selectAll(".slinky-ring").nodes(),Qt=rt,oe=ot/Re.length,we=[...Re].sort((U,ct)=>{const ft=parseFloat(U.getAttribute("data-seat-angle")||"0");return parseFloat(ct.getAttribute("data-seat-angle")||"0")-ft}),me=gt;we.forEach((U,ct)=>{const ft=me-ct*oe,St=ut/2,zt=Qt-St,re=Qt+St;U.setAttribute("x1",zt.toString()),U.setAttribute("y1",ft.toString()),U.setAttribute("x2",re.toString()),U.setAttribute("y2",ft.toString()),U.style.opacity="0"}),$.to(_t,{opacity:0,duration:dt*.7,ease:"power2.out"},xt+dt*.3),$.to(we,{opacity:1,duration:dt,ease:"power2.in",stagger:.005},xt);const Ge=D*.8;we.forEach((U,ct)=>{const ft=parseFloat(U.getAttribute("data-seat-x")||"0"),wt=parseFloat(U.getAttribute("data-seat-y")||"0"),St=parseFloat(U.getAttribute("data-seat-angle")||"0"),zt=(we.length-1-ct)/we.length*(Et*.4),re=parseFloat(U.getAttribute("x1")||"0"),le=parseFloat(U.getAttribute("y1")||"0"),ht=parseFloat(U.getAttribute("x2")||"0"),Nt=parseFloat(U.getAttribute("y2")||"0"),ue=(re+ht)/2,Ee=(le+Nt)/2,De=Math.atan2(Nt-le,ht-re),We=Math.sqrt(Math.pow(ht-re,2)+Math.pow(Nt-le,2)),$e=ft-Ge/2*Math.cos(St),Rn=wt-Ge/2*Math.sin(St);$.to({progress:0},{progress:1,duration:Et*.7,ease:"power2.out",onUpdate:function(){const Xe=this.progress(),ln=ue+($e-ue)*Xe,sr=Ee+(Rn-Ee)*Xe,Pr=De+(St-De)*Xe,or=(We+(Ge-We)*Xe)/2,fa=ln-or*Math.cos(Pr),_s=sr-or*Math.sin(Pr),ha=ln+or*Math.cos(Pr),V=sr+or*Math.sin(Pr);U.setAttribute("x1",fa.toString()),U.setAttribute("y1",_s.toString()),U.setAttribute("x2",ha.toString()),U.setAttribute("y2",V.toString())}},At+zt),$.to(U,{opacity:.9,duration:Et*.3,ease:"power2.in"},At+zt)}),$.call(()=>{m&&m($.progress(),"ringsHold")},[],ne);const sn=y?`parliament parliament-${y}`:"parliament",Ye=_.append("g").attr("class",sn);r.seats.forEach((U,ct)=>{const ft=n.find(ht=>ht.label===U.category);if(!ft)return;const wt=T+U.x,St=W+U.y;let zt,re,le;U.ring===Vt?(zt=wt,re=St,le=2):(zt=wt,re=St,le=U.radius),Ye.append("circle").attr("cx",zt).attr("cy",re).attr("r",le).attr("fill",ft.color).attr("stroke",ft.color).attr("stroke-width",.5).attr("opacity",0).attr("class",()=>y?`seat seat-${y} seat-${Ae(U.category)}`:`seat seat-${Ae(U.category)}`).attr("data-layout-index",ct).attr("data-ring",U.ring).attr("data-final-x",wt).attr("data-final-y",St).attr("data-final-r",U.radius)});const Fe=y?`.seat-${y}`:".seat",on=Ye.selectAll(Fe);$.to(Re,{opacity:0,duration:Pt*.2,ease:"power3.out"},ge),$.to(on.nodes(),{opacity:.8,duration:Pt*.3,ease:"power2.in"},ge+Pt*.25);const ye=on.nodes(),kt=[],Lt=[];ye.forEach(U=>{parseInt(U.getAttribute("data-ring")||"0")===Vt?kt.push(U):Lt.push(U)});const Mt=Pt*.2,Yt=Pt*.7;kt.forEach(U=>{const ct=parseFloat(U.getAttribute("data-final-r")||"4");$.to(U,{attr:{r:ct},opacity:1,duration:Yt*.6,ease:"power2.out"},ge+Mt)}),Lt.length>0&&$.to(Lt,{opacity:1,duration:Yt*.5,ease:"power2.in"},ge+Mt+Pt*.15);const _e=c;k.getControls().getTimeline().eventCallback("onComplete",()=>{const U=y?`.areas-${y}`:".areas",ct=y?`.histogram-paths-${y}`:".histogram-paths";e.selectAll(U).remove(),e.selectAll(ct).remove(),It(),e.selectAll(".axis-x").remove(),e.selectAll(".axis-y").remove(),_.selectAll(".grid-vertical").remove(),_.selectAll(".grid-horizontal").remove();const ft=y?`.parliament-label-${y}`:".parliament-label";if(e.select(ft).empty()){const St=o/2,zt=r.radius+10,re=l-r.radius*.3,le=Math.max(zt,re),ht=y?`parliament-label parliament-label-${y}`:"parliament-label",Nt=e.append("g").attr("class",ht).attr("transform",`translate(${St},${le-r.radius*.15})`).style("opacity","0").style("pointer-events","none");Nt.append("text").attr("class","label-category").attr("text-anchor","middle").attr("dy","-15").style("font-size","22px").style("fill","#666").style("font-family","system-ui, -apple-system, sans-serif"),Nt.append("text").attr("class","label-value").attr("text-anchor","middle").attr("dy","35").style("font-size","48px").style("font-weight","bold").style("font-family","system-ui, -apple-system, sans-serif");const ue=Nt.append("g").attr("class","scale-indicator").attr("transform","translate(0, 65)").style("opacity","0");ue.append("circle").attr("r",4).attr("cx",-30).attr("cy",0).style("fill","#888"),ue.append("text").attr("x",-20).attr("y",0).attr("dy","0.35em").attr("text-anchor","start").style("font-size","18px").style("fill","#666").style("font-style","italic").style("font-family","system-ui, -apple-system, sans-serif")}_e()}),k.play()}function iT(e,t,n,r,i,a){const s=r/2,o=n.radius+10,l=i-n.radius*.3,u=Math.max(o,l);H0(e,n,t,{centerX:s,centerY:u,addClasses:!0,instanceId:a,parliamentRadius:n.radius})}function qi(e,t,n,r,i){const a=i?`.parliament-label-${i}`:".parliament-label",s=Ot(e).select(a);if(!s.empty())if(t){s.style("opacity","1"),s.select(".label-category").text(t.label).style("fill","#666");const o=t.value>1?"repos":"repo";s.select(".label-value").text(`${t.value} ${o}`).style("fill",t.color);const l=s.select(".scale-indicator");n?l.style("opacity","1").select("text").text(`= ~${r} repos`):l.style("opacity","0")}else s.style("opacity","0")}function Ys(e,t,n,r,i,a,s,o,l){const u=e.querySelectorAll(".seat");if(!u||u.length===0)return;const c=n[n.length-1];if(!c)return;const f=[];u.forEach(p=>{const g=p;g.style.cursor="pointer",g.style.transition="fill-opacity 150ms ease, stroke-opacity 150ms ease"}),u.forEach(p=>{const m=(p.getAttribute("class")||"").split(/\s+/).filter(S=>S.startsWith("seat-")),x=m[m.length-1];if(!x)return;const y=x.substring(5),v=t.find(S=>Ae(S.label)===y);if(!v)return;const _=()=>{i(v.label);const S=Math.round(c.values[v.dataKey]||0),w=pf(v.color),b={label:v.label,value:S,color:w};a&&a(b),qi(e,b,s??!1,o??1,l),Ii(e,v.label)};p.addEventListener("mouseenter",_),f.push({element:p,handler:_})});const h=()=>{i(null),a&&a(null),qi(e,null,!1,1,l),Ii(e,null)};return e.addEventListener("mouseleave",h),r&&Ii(e,r),()=>{f.forEach(({element:p,handler:g})=>{p.removeEventListener("mouseenter",g)}),e.removeEventListener("mouseleave",h),u.forEach(p=>{const g=p;g.style.cursor="",g.style.transition=""})}}function Ii(e,t){const n=e.querySelectorAll(".seat"),r=t?Ae(t):null;n.forEach(i=>{const a=i,l=(i.getAttribute("class")||"").split(/\s+/).filter(f=>f.startsWith("seat-")),u=l[l.length-1];if(!u)return;const c=u.substring(5);r?c===r?(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1")):(a.setAttribute("fill-opacity","0.3"),a.setAttribute("stroke-opacity","0.2")):(a.setAttribute("fill-opacity","1"),a.setAttribute("stroke-opacity","1"))})}const G0=({data:e,categories:t,mode:n,width:r=900,height:i=400,margin:a={top:10,right:30,bottom:40,left:60},timeRange:s,showGrid:o=!0,showAxes:l=!0,axisLabelColor:u,axisLabelSize:c=14,formatDate:f,formatValue:h,markers:p=[],arcAngle:g=200,parliamentRadius:d=200,seatSize:m=4.5,animationDuration:x=900,onMorphComplete:y,onAnimationStateChange:v,onTimelineReady:_,onAnimationProgress:S,onHoveredDataChange:w,hoveredCategory:b,maxSeats:M=500,showTooltip:A=!0,showTable:k=!1,showScaledIndicator:C=!0,parliamentTimestamp:O,enableBrush:P=!1,onTimeRangeChange:F,minAllowedTime:B,maxAllowedTime:L,timelineEvents:$=[],showTimeline:Y=!1,timelineHeight:I=40,timelineOffset:et,brushColor:K="#69b3a2",showCrosshair:J=!1,crosshairColor:st="#666",crosshairDashArray:lt="4,4"})=>{const N=G.useRef(null),[j,nt]=G.useState(null),Z=G.useCallback(rt=>{w&&w(rt)},[w]),R=12,D=et??6+R+c+R,T=e[e.length-1],X=T?t.reduce((rt,at)=>rt+(T.values[at.dataKey]||0),0):0,Q=X>M,W=Q?Math.round(X/M):1,ut=Y&&n==="stacked-area"?i+I+D:i,{isMorphing:H,currentMode:ot,visibleMarkers:gt,hoveredMarker:yt,hoveredTimelineEvent:vt}=JS({containerRef:N,data:e,categories:t,mode:n,width:r,height:i,margin:a,timeRange:s,showGrid:o,showAxes:l,axisLabelColor:u,axisLabelSize:c,formatDate:f,formatValue:h,markers:p,arcAngle:g,parliamentRadius:d,seatSize:m,animationDuration:x,onMorphComplete:y,onAnimationStateChange:v,onTimelineReady:_,onAnimationProgress:S,onHoveredDataChange:Z,hoveredCategory:b,maxSeats:M,parliamentTimestamp:O,enableBrush:P,onTimeRangeChange:F,minAllowedTime:B,maxAllowedTime:L,showScaleIndicator:C&&Q,reposPerSeat:W,timelineEvents:$,showTimeline:Y,timelineHeight:I,timelineOffset:D,brushColor:K,showCrosshair:J,onCrosshairMove:J?nt:void 0});return E.jsxs(q.Box,{sx:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:[E.jsx("svg",{ref:N,viewBox:`0 0 ${r} ${ut}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"auto",display:"block"}}),J&&j&&ot==="area"&&!H&&E.jsxs("svg",{viewBox:`0 0 ${r} ${ut}`,preserveAspectRatio:"xMidYMid meet",style:{position:"absolute",top:0,left:0,width:"100%",height:"auto",pointerEvents:"none"},children:[E.jsx("line",{x1:j.x,y1:a.top,x2:j.x,y2:i-a.bottom,stroke:st,strokeDasharray:lt,strokeWidth:1}),E.jsx("line",{x1:a.left,y1:j.y,x2:r-a.right,y2:j.y,stroke:st,strokeDasharray:lt,strokeWidth:1})]}),ot==="area"&>.map(rt=>{const at=(rt.x+a.left)/r*100,_t=a.top/i*100,dt=new Date(rt.timestamp),xt=f?f(rt.timestamp):dt.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),Et=E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:rt.label?.5:0},children:xt}),rt.label&&E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:rt.label})]});return E.jsx(q.Tooltip,{title:Et,open:(yt==null?void 0:yt.timestamp)===rt.timestamp,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${at}%`,top:`${_t}%`,width:"1px",height:`${(i-a.top-a.bottom)/i*100}%`,pointerEvents:"none"}})},rt.timestamp)}),vt&&ot==="area"&&E.jsx(q.Tooltip,{title:E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:.5},children:f?f(vt.timestamp):new Date(vt.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}),E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:vt.eventName})]}),open:!0,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${(vt.x+a.left)/r*100}%`,top:`${(i+D+I/2)/ut*100}%`,width:"1px",height:"1px",pointerEvents:"none"}})}),H&&E.jsxs(q.Box,{sx:{position:"absolute",top:8,right:8,padding:"4px 8px",backgroundColor:"rgba(0,0,0,0.7)",color:"white",borderRadius:"4px",fontSize:"12px",pointerEvents:"none",display:"none"},children:["Morphing: ",ot," → ",n]})]})},Y0=[{minRepos:0,maxRepos:10,minArc:90,maxArc:90,minSeatSize:28,maxSeatSize:28},{minRepos:10,maxRepos:25,minArc:90,maxArc:110,minSeatSize:24,maxSeatSize:24},{minRepos:25,maxRepos:50,minArc:110,maxArc:120,minSeatSize:20,maxSeatSize:20},{minRepos:50,maxRepos:100,minArc:120,maxArc:150,minSeatSize:16.5,maxSeatSize:16.5},{minRepos:100,maxRepos:200,minArc:150,maxArc:180,minSeatSize:15,maxSeatSize:15},{minRepos:200,maxRepos:1/0,minArc:180,maxArc:180,minSeatSize:14.5,maxSeatSize:14.5}],df=({repositoryCount:e})=>{const t=Y0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxArc-t.minArc,s=t.minArc+a*i;return Math.round(s)},gf=({repositoryCount:e})=>{const t=Y0.find(o=>e>=o.minRepos&&e<o.maxRepos);if(!t)return 6.5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;const n=t.maxRepos-t.minRepos,i=(e-t.minRepos)/n,a=t.maxSeatSize-t.minSeatSize,s=t.minSeatSize+a*i;return Math.round(s*10)/10};class ia{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ia.prototype.normal={};ia.prototype.property={};ia.prototype.space=void 0;function W0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ia(n,r,t)}function ta(e){return e.toLowerCase()}class je{constructor(t,n){this.attribute=n,this.property=t}}je.prototype.attribute="";je.prototype.booleanish=!1;je.prototype.boolean=!1;je.prototype.commaOrSpaceSeparated=!1;je.prototype.commaSeparated=!1;je.prototype.defined=!1;je.prototype.mustUseProperty=!1;je.prototype.number=!1;je.prototype.overloadedBoolean=!1;je.prototype.property="";je.prototype.spaceSeparated=!1;je.prototype.space=void 0;let aT=0;const mt=Dr(),ae=Dr(),Mc=Dr(),tt=Dr(),qt=Dr(),Zr=Dr(),Ve=Dr();function Dr(){return 2**++aT}const Ac=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:ae,commaOrSpaceSeparated:Ve,commaSeparated:Zr,number:tt,overloadedBoolean:Mc,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),Ws=Object.keys(Ac);class mf extends je{constructor(t,n,r,i){let a=-1;if(super(t,n),Ih(this,"space",i),typeof r=="number")for(;++a<Ws.length;){const s=Ws[a];Ih(this,Ws[a],(r&Ac[s])===Ac[s])}}}mf.prototype.defined=!0;function Ih(e,t,n){n&&(e[t]=n)}function di(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new mf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ta(r)]=r,n[ta(a.attribute)]=r}return new ia(t,n,e.space)}const X0=di({properties:{ariaActiveDescendant:null,ariaAtomic:ae,ariaAutoComplete:null,ariaBusy:ae,ariaChecked:ae,ariaColCount:tt,ariaColIndex:tt,ariaColSpan:tt,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:ae,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:ae,ariaFlowTo:qt,ariaGrabbed:ae,ariaHasPopup:null,ariaHidden:ae,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:tt,ariaLive:null,ariaModal:ae,ariaMultiLine:ae,ariaMultiSelectable:ae,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:tt,ariaPressed:ae,ariaReadOnly:ae,ariaRelevant:null,ariaRequired:ae,ariaRoleDescription:qt,ariaRowCount:tt,ariaRowIndex:tt,ariaRowSpan:tt,ariaSelected:ae,ariaSetSize:tt,ariaSort:null,ariaValueMax:tt,ariaValueMin:tt,ariaValueNow:tt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function K0(e,t){return t in e?e[t]:t}function V0(e,t){return K0(e,t.toLowerCase())}const sT=di({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zr,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:qt,autoFocus:mt,autoPlay:mt,blocking:qt,capture:null,charSet:null,checked:mt,cite:null,className:qt,cols:tt,colSpan:null,content:null,contentEditable:ae,controls:mt,controlsList:qt,coords:tt|Zr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:Mc,draggable:ae,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:qt,height:tt,hidden:Mc,high:tt,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:qt,itemRef:qt,itemScope:mt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:tt,manifest:null,max:null,maxLength:tt,media:null,method:null,min:null,minLength:tt,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:tt,pattern:null,ping:qt,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:qt,required:mt,reversed:mt,rows:tt,rowSpan:tt,sandbox:qt,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:tt,sizes:null,slot:null,span:tt,spellCheck:ae,src:null,srcDoc:null,srcLang:null,srcSet:null,start:tt,step:null,style:null,tabIndex:tt,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:ae,width:tt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:tt,borderColor:null,bottomMargin:tt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:tt,leftMargin:tt,link:null,longDesc:null,lowSrc:null,marginHeight:tt,marginWidth:tt,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:tt,rules:null,scheme:null,scrolling:ae,standby:null,summary:null,text:null,topMargin:tt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:tt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:tt,security:null,unselectable:null},space:"html",transform:V0}),oT=di({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ve,accentHeight:tt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:tt,amplitude:tt,arabicForm:null,ascent:tt,attributeName:null,attributeType:null,azimuth:tt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:tt,by:null,calcMode:null,capHeight:tt,className:qt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:tt,diffuseConstant:tt,direction:null,display:null,dur:null,divisor:tt,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:tt,enableBackground:null,end:null,event:null,exponent:tt,externalResourcesRequired:null,fill:null,fillOpacity:tt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Zr,g2:Zr,glyphName:Zr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:tt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:tt,horizOriginX:tt,horizOriginY:tt,id:null,ideographic:tt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:tt,k:tt,k1:tt,k2:tt,k3:tt,k4:tt,kernelMatrix:Ve,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:tt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:tt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:tt,overlineThickness:tt,paintOrder:null,panose1:null,path:null,pathLength:tt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:tt,pointsAtY:tt,pointsAtZ:tt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ve,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ve,rev:Ve,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ve,requiredFeatures:Ve,requiredFonts:Ve,requiredFormats:Ve,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:tt,specularExponent:tt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:tt,strikethroughThickness:tt,string:null,stroke:null,strokeDashArray:Ve,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:tt,strokeOpacity:tt,strokeWidth:null,style:null,surfaceScale:tt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ve,tabIndex:tt,tableValues:null,target:null,targetX:tt,targetY:tt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ve,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:tt,underlineThickness:tt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:tt,values:null,vAlphabetic:tt,vMathematical:tt,vectorEffect:null,vHanging:tt,vIdeographic:tt,version:null,vertAdvY:tt,vertOriginX:tt,vertOriginY:tt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:tt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:K0}),Z0=di({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Q0=di({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:V0}),J0=di({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lT=/[A-Z]/g,zh=/-[a-z]/g,uT=/^data[-\w.:]+$/i;function ty(e,t){const n=ta(t);let r=t,i=je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(zh,fT);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!zh.test(a)){let s=a.replace(lT,cT);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=mf}return new i(r,t)}function cT(e){return"-"+e.toLowerCase()}function fT(e){return e.charAt(1).toUpperCase()}const ey=W0([X0,sT,Z0,Q0,J0],"html"),yf=W0([X0,oT,Z0,Q0,J0],"svg");function Bh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function hT(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uh=/[#.]/g;function pT(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Uh.lastIndex=i;const o=Uh.exec(n),l=n.slice(i,o?o.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Hh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function dT(e){return e.join(" ").trim()}function ny(e,t,n){const r=n?_T(n):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const u=s;o.unshift(u)}else{l=pT(a,t);const u=l.tagName.toLowerCase(),c=r?r.get(u):void 0;if(l.tagName=c||u,gT(s))o.unshift(s);else for(const[f,h]of Object.entries(s))mT(e,l.properties,f,h)}for(const u of o)kc(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function gT(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function mT(e,t,n,r){const i=ty(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Hh(r):i.commaSeparated?a=Bh(r):i.commaOrSpaceSeparated?a=Hh(Bh(r).join(" ")):a=jh(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?yT(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(jh(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function kc(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)kc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?kc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function jh(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ta(n)===ta(t)))return!0}return n}function yT(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _T(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const xT=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];ny(ey,"div");const aa=ny(yf,"g",xT),ry=(e=aa)=>e("pattern",{id:"greyHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:pn.neoGrey[200]}),e("path",{d:"M0,2 L8,2",stroke:pn.neoGrey[400],"stroke-width":.5}),e("path",{d:"M0,6 L8,6",stroke:pn.neoGrey[400],"stroke-width":.5})]),iy=(e=aa)=>e("pattern",{id:"dataMissingHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:"#FFF3CC"}),e("path",{d:"M0,8 L8,0",stroke:"#FFB800","stroke-width":.5}),e("path",{d:"M-2,2 L2,-2",stroke:"#FFB800","stroke-width":.5}),e("path",{d:"M6,10 L10,6",stroke:"#FFB800","stroke-width":.5})]),ay=(e=aa)=>e("pattern",{id:"noLstHatchPattern",x:0,y:0,width:8,height:8,patternUnits:"userSpaceOnUse"},[e("rect",{x:0,y:0,width:8,height:8,fill:"#FFE5E5"}),e("path",{d:"M0,0 L8,8",stroke:"#ED4134","stroke-width":.5}),e("path",{d:"M-2,6 L2,10",stroke:"#ED4134","stroke-width":.5}),e("path",{d:"M6,-2 L10,2",stroke:"#ED4134","stroke-width":.5})]),Dt={greyHatch:{background:pn.neoGrey[200],lines:pn.neoGrey[400]},dataMissingHatch:{background:"#FFF3CC",lines:"#FFB800"},noLstHatch:{background:"#FFE5E5",lines:"#ED4134"}},vT=({categories:e,activeCategory:t,onCategoryHover:n,mode:r,visible:i=!0})=>E.jsx(q.Box,{className:"category-table",sx:{width:"100%",display:"flex",justifyContent:"center",opacity:i?1:0,transition:"opacity 0.3s ease-in-out","@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:"auto",maxWidth:"100%"}},onMouseLeave:()=>n(null),children:E.jsxs(q.Table,{"aria-label":"Categories summary",className:"category-summary-table",size:"small",sx:{maxWidth:{xs:"clamp(360px, 90%, 400px)",sm:"clamp(360px, 90%, 400px)",md:"clamp(360px, 85%, 420px)",lg:"clamp(360px, 90%, 400px)"},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:"360px","& .MuiTableCell-root":{padding:"1px 4px",fontSize:"9.5px"}},"& .MuiTableCell-root":{paddingTop:"1px",paddingBottom:"1px",paddingLeft:0,paddingRight:"4px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 12px)"}},children:[E.jsx("thead",{children:E.jsxs(q.TableRow,{sx:{"& .MuiTableCell-root":{borderBottom:"1px solid",borderColor:"grey.300",pb:"2px"}},children:[E.jsx(q.TableCell,{colSpan:2,sx:{fontWeight:500},children:"Category"}),r==="point-in-time"?E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"# of repositories"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Percentage"})]}):E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Last"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Max"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Min"})]})]})}),E.jsx("tbody",{children:e.map(a=>{const s=a.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:a.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:a.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:a.color;return E.jsxs(q.TableRow,{onMouseEnter:()=>n(a.id),sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:t===a.id?`${s}15`:"transparent","&:hover":{backgroundColor:`${s}15`}},children:[E.jsx(q.TableCell,{align:"center",sx:{width:20},children:E.jsx(q.Box,{sx:{width:r==="historical"?4:12,height:12,backgroundColor:a.color==="url(#greyHatchPattern)"?Dt.greyHatch.background:a.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.background:a.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.background:a.color,borderRadius:r==="historical"?2:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:t===a.id?"scale(1.2)":"scale(1)",...a.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
16
|
-
0deg,
|
|
17
|
-
transparent,
|
|
18
|
-
transparent 3px,
|
|
19
|
-
${Dt.greyHatch.lines} 3px,
|
|
20
|
-
${Dt.greyHatch.lines} 4px
|
|
21
|
-
)`,borderRadius:r==="historical"?2:"50%"}},...a.label==="Data Missing"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
22
|
-
45deg,
|
|
23
|
-
transparent,
|
|
24
|
-
transparent 3px,
|
|
25
|
-
${Dt.dataMissingHatch.lines} 3px,
|
|
26
|
-
${Dt.dataMissingHatch.lines} 4px
|
|
27
|
-
)`,borderRadius:r==="historical"?2:"50%"}},...a.label==="No LST"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
28
|
-
-45deg,
|
|
29
|
-
transparent,
|
|
30
|
-
transparent 3px,
|
|
31
|
-
${Dt.noLstHatch.lines} 3px,
|
|
32
|
-
${Dt.noLstHatch.lines} 4px
|
|
33
|
-
)`,borderRadius:r==="historical"?2:"50%"}}}})}),E.jsx(q.TableCell,{children:E.jsxs(q.Stack,{direction:"row",alignItems:"center",gap:.5,children:[E.jsx("span",{children:a.label}),a.tooltip&&E.jsx(q.Tooltip,{title:a.tooltip,placement:"right",arrow:!0,children:E.jsx(Qg.InfoOutlined,{sx:{fontSize:".875rem",color:"text.secondary"}})})]})}),r==="point-in-time"?E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",children:a.value}),E.jsxs(q.TableCell,{align:"right",children:[a.percentage>0&&a.percentage<1?"< 1":Math.round(a.percentage),"%"]})]}):E.jsxs(E.Fragment,{children:[E.jsx(q.TableCell,{align:"right",children:a.value}),E.jsx(q.TableCell,{align:"right",children:a.max??"-"}),E.jsx(q.TableCell,{align:"right",children:a.min??"-"})]})]},a.id)})})]})}),Gh={"N/A":"Items that aren't applicable to this migration.","No LST":"There are no LSTs for these items.","Data Missing":"There is data missing in the LSTs."},bT=(e,t="point-in-time")=>{const n=e.timeSeries[e.timeSeries.length-1];if(!n)return[];const r=e.categories.filter(f=>{var h;return!((h=f.parliamentMapping)!=null&&h.isSpecialCategory)}),i=r.reduce((f,h)=>f+(n.values[h.id]??0),0),a=e.metadata.specialCounts,s=a?(a.notApplicable??0)+(a.noLst??0)+(a.unavailable??0):0,o=i+s,l=t==="historical"?new Map(r.map(f=>{const h=e.timeSeries.map(p=>Math.round(p.values[f.id]??0)).filter(p=>p!==void 0);return[f.id,{max:Math.max(...h),min:Math.min(...h)}]})):null,u=r.map(f=>{const h=Math.round(n.values[f.id]??0),p=o>0?h/o*100:0,g={id:f.id,label:f.label,value:h,percentage:p,color:f.color,tooltip:Gh[f.label]};if(l){const d=l.get(f.id);d&&(g.max=d.max,g.min=d.min)}return g}),c=[];if(a){const f=e.categories.filter(h=>{var p;return(p=h.parliamentMapping)==null?void 0:p.isSpecialCategory});for(const h of f){let p=0;if(h.label==="N/A"?p=Math.round(a.notApplicable??0):h.label==="No LST"?p=Math.round(a.noLst??0):h.label==="Data Missing"&&(p=Math.round(a.unavailable??0)),p>0){const g=o>0?p/o*100:0;c.push({id:h.id,label:h.label,value:p,percentage:g,color:h.color,tooltip:Gh[h.label]})}}}return[...u,...c]},wT=e=>{if(!e.timeSeries[e.timeSeries.length-1])throw new Error("ChronoChart: No data points available");const n=e.timeSeries.map(i=>({timestamp:i.timestamp,values:i.values})),r=e.categories.map(i=>{var a;return{dataKey:i.id,label:i.label,color:i.color,fillOpacity:.7,strokeWidth:(a=i.parliamentMapping)!=null&&a.isSpecialCategory?3:1.5,strokeDasharray:i.strokeDasharray,parliamentMapping:i.parliamentMapping}});return{data:n,categories:r}},ST=e=>{if(!e.timeSeries||e.timeSeries.length===0)throw new Error("ChronoChart: timeSeries must not be empty");if(!e.categories||e.categories.length===0)throw new Error("ChronoChart: categories must not be empty");if(!e.metadata||typeof e.metadata.total!="number")throw new Error("ChronoChart: metadata.total is required");if(!e.timeSeries.every((r,i)=>i===0||r.timestamp>=e.timeSeries[i-1].timestamp))throw new Error("ChronoChart: timeSeries must be sorted by timestamp (ascending)");const n=e.timeSeries[0];if(n){for(const r of e.categories.filter(i=>{var a;return!((a=i.parliamentMapping)!=null&&a.isSpecialCategory)}))if(!(r.id in n.values))throw new Error(`ChronoChart: Category "${r.id}" not found in timeSeries data`)}},sy=({data:e,selectedIndex:t,title:n,subtitle:r,showHeader:i=!0,width:a=960,height:s=400,timeRange:o,onTimeRangeChange:l,minAllowedTime:u,maxAllowedTime:c,enableBrush:f=!1,showLegend:h=!0,showTooltip:p=!0,showGrid:g=!0,axisLabelColor:d,axisLabelSize:m=14,enableAnimation:x=!0,animationDuration:y=5439,disableTimeline:v=!1,formatDate:_,formatValue:S,onAnimationStateChange:w,onTimelineReady:b,onAnimationProgress:M,brushColor:A="#69b3a2",showCrosshair:k=!0,crosshairColor:C="#666",crosshairDashArray:O="4,4"})=>{ST(e);const[P,F]=G.useState(null),[B,L]=G.useState(!0),$=G.useRef("historical"),Y=G.useRef(void 0),I=G.useMemo(()=>e.timeSeries.length===1||t!==void 0?"point-in-time":"historical",[t,e.timeSeries.length]),et=G.useMemo(()=>{var ot;let H;return t!==void 0&&e.timeSeries[t]?(H=e.timeSeries[t].timestamp,Y.current=H):$.current==="point-in-time"&&I==="historical"&&Y.current!==void 0?H=Y.current:H=(ot=e.timeSeries[e.timeSeries.length-1])==null?void 0:ot.timestamp,$.current=I,H},[t,e.timeSeries,I]),K=e.timeSeries[0].timestamp,J=e.timeSeries[e.timeSeries.length-1].timestamp,[st,lt]=G.useState([K,J]),N=o??st,j=G.useCallback(H=>{const ot=[u!==void 0?Math.max(H[0],u):H[0],c!==void 0?Math.min(H[1],c):H[1]];l?l(ot):lt(ot)},[l,u,c]);G.useEffect(()=>{F(null)},[I]);const nt=G.useMemo(()=>({top:10,right:30,left:60,bottom:30}),[]),Z=G.useMemo(()=>wT(e),[e]),R=G.useMemo(()=>bT(e,I),[e,I]),z=G.useMemo(()=>{const H=e.timeSeries[e.timeSeries.length-1];return H?Object.values(H.values).reduce((ot,gt)=>ot+gt,0):0},[e.timeSeries]),D=G.useMemo(()=>df({repositoryCount:z}),[z]),T=G.useMemo(()=>gf({repositoryCount:z}),[z]),X=G.useMemo(()=>{const H=s-nt.top-nt.bottom;return Math.round(H*.9)},[s,nt]),Q=G.useMemo(()=>e.events?e.events.map(H=>({timestamp:H.timestamp,label:H.eventName,color:typeof H.color=="string"?H.color:"#2F42FF"})):[],[e.events]),W=G.useCallback(H=>{if(H){const ot=e.categories.find(gt=>gt.label===H.label);F((ot==null?void 0:ot.id)??null)}else F(null)},[e.categories]),ut=G.useCallback(H=>{L(!H),w&&w(H)},[w]);return E.jsxs(q.Stack,{sx:{width:"100%",alignItems:"center",gap:2},children:[i&&(n||r)&&E.jsxs(q.Stack,{spacing:.5,sx:{mb:2,width:"100%",alignItems:"center"},children:[n&&E.jsx(q.Typography,{variant:"h5",sx:{fontWeight:500},children:n}),r&&E.jsx(q.Typography,{variant:"body2",sx:{color:"text.secondary"},children:r})]}),E.jsx(q.Box,{sx:{position:"relative",width:"100%"},children:E.jsx(G0,{data:Z.data,categories:Z.categories,mode:I==="point-in-time"?"parliament":"stacked-area",width:a,height:s,timeRange:N,onTimeRangeChange:j,minAllowedTime:u,maxAllowedTime:c,enableBrush:f,showGrid:g,showAxes:!0,axisLabelColor:d,axisLabelSize:m,margin:nt,markers:Q,formatDate:_,formatValue:S,animationDuration:y,onAnimationStateChange:ut,onTimelineReady:b,onAnimationProgress:M,onHoveredDataChange:W,hoveredCategory:P,arcAngle:D,parliamentRadius:X,seatSize:T,parliamentTimestamp:et,timelineEvents:e.events??[],showTimeline:I==="historical"&&!v,brushColor:A,showCrosshair:k,crosshairColor:C,crosshairDashArray:O})}),E.jsx(vT,{categories:R,activeCategory:P,onCategoryHover:F,mode:I,visible:B})]})},Kn=20,oy=({visible:e,x:t,y:n,containerRef:r,viewBoxWidth:i,viewBoxHeight:a,usePortal:s=!1,scale:o=1,flipThreshold:l,anchorPosition:u="cursor",chartTopMargin:c=20,children:f})=>{const h=G.useRef(null),[p,g]=G.useState(0),[d,m]=G.useState(null),x=G.useCallback(()=>{if(r.current){const k=r.current.getBoundingClientRect();m({width:k.width,height:k.height,left:k.left,top:k.top})}},[r]);if(G.useLayoutEffect(()=>{x();const k=()=>x();return window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[x]),G.useLayoutEffect(()=>{e&&x()},[e,x]),G.useLayoutEffect(()=>{h.current&&e&&g(h.current.offsetWidth)},[e]),!e||!d)return null;const y=d.width/i,v=d.height/a,_=t*y,S=n*v,w={pointerEvents:"none",zIndex:1e3,p:2*o,whiteSpace:"nowrap"};if(s){const k=d.left+_,C=d.top+S;if(u==="top"){const et=d.top+c*v,J=(p>0?p:400)/2,st=k+J>window.innerWidth-Kn,lt=k-J<Kn;let N="translateX(-50%)";return st&&!lt?N=`translateX(-50%) translateX(-${k+J-window.innerWidth+Kn}px)`:lt&&!st&&(N=`translateX(-50%) translateX(${Kn-(k-J)}px)`),E.jsx(q.Portal,{children:E.jsx(q.Paper,{ref:h,elevation:3,sx:{...w,position:"fixed",left:k,top:et,transform:`${N} translateY(-100%) translateY(-10px)`},children:f})})}if(u==="bottom-corner"){const et=p>0?p:400,K=10,J=k+K+et,st=k-K-et,lt=J>window.innerWidth-Kn,N=st<Kn;let j,nt;return lt?N?(j=window.innerWidth-Kn-et,nt="none"):(j=k-K,nt="translateX(-100%)"):(j=k+K,nt="none"),E.jsx(q.Portal,{children:E.jsx(q.Paper,{ref:h,elevation:3,sx:{...w,position:"fixed",left:j,top:C+K,transform:nt},children:f})})}const O=p>0?p:450,F=k+10+O>window.innerWidth-Kn,B=k>window.innerWidth-500,L=l!==void 0?l*y:void 0,$=L!==void 0&&_>L,I=F||B||$?"translateX(-100%) translateX(-20px)":"none";return E.jsx(q.Portal,{children:E.jsx(q.Paper,{ref:h,elevation:3,sx:{...w,position:"fixed",left:k+10,top:C-10,transform:I},children:f})})}if(u==="top"){const k=c*v;return E.jsx(q.Paper,{ref:h,elevation:3,sx:{...w,position:"absolute",left:_,top:k,transform:"translateX(-50%) translateY(-100%) translateY(-10px)"},children:f})}if(u==="bottom-corner"){const k=p>0?p:400,C=10,O=_+C+k,P=_-C-k,F=O>d.width,B=P<0;let L,$;return F?B?(L=d.width-k,$="none"):(L=_-C,$="translateX(-100%)"):(L=_+C,$="none"),E.jsx(q.Paper,{ref:h,elevation:3,sx:{...w,position:"absolute",left:L,top:S+C,transform:$},children:f})}const b=l!==void 0?l*y:void 0,A=b!==void 0&&_>b?"translateX(-100%) translateX(-20px)":"none";return E.jsx(q.Paper,{ref:h,elevation:3,sx:{...w,position:"absolute",left:_+10,top:S-10,transform:A},children:f})},TT=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:s,showGrid:o=!0,showXAxis:l=!0,showYAxis:u=!0,enableBrush:c=!1,zoomToSelection:f=!1,onTimeRangeChange:h,formatDate:p,formatValue:g,markers:d=[],markerVisibilityMode:m="hover",onMarkerHoverChange:x,brushColor:y="#69b3a2",showCrosshair:v=!1,onHoveredAreaChange:_,onCrosshairMove:S})=>{G.useEffect(()=>{if(!e.current||t.length===0||n.length===0)return;const w=Ot(e.current),b=r-a.left-a.right,M=i-a.top-a.bottom;w.selectAll("*").remove();const A=w.append("g").attr("transform",`translate(${a.left},${a.top})`),k=`d3-chart-clip-${Math.random().toString(36).substr(2,9)}`;w.append("defs").append("clipPath").attr("id",k).append("rect").attr("x",0).attr("y",0).attr("width",b).attr("height",M);const C=A.append("g").attr("clip-path",`url(#${k})`),O=[...t].sort((R,z)=>R.timestamp-z.timestamp),P=n.map(R=>R.dataKey),F=Yi().keys(P),B=F(O),L=t.map(R=>R.timestamp),$=s?s[0]:Math.min(...L),Y=s?s[1]:Math.max(...L),I=Wr().domain([new Date($),new Date(Y)]).range([0,b]),et=O.filter(R=>R.timestamp>=$&&R.timestamp<=Y),K=F(et),J=K.length>0?Math.max(...K[K.length-1].map(R=>R[1]??0)):0,st=ri().domain([0,J*1.1]).range([M,0]).nice();o&&(C.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(qn(I).ticks(6).tickSize(M).tickFormat(()=>"")),C.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(In(st).ticks(5).tickSize(-b).tickFormat(()=>"")));const lt=as().x(R=>I(new Date(R.data.timestamp))).y0(R=>st(R[0])).y1(R=>st(R[1])).curve(kr),N=C.append("g").attr("class","areas");if(B.forEach((R,z)=>{const D=n[z];if(!D)return;const T=N.append("path").datum(R).attr("class",`area area-${D.dataKey}`).attr("fill",D.color).attr("fill-opacity",D.fillOpacity??.7).attr("stroke",D.color).attr("stroke-width",D.strokeWidth??1.5).attr("d",lt).attr("pointer-events","none");D.strokeDasharray&&T.attr("stroke-dasharray",D.strokeDasharray)}),d.length>0){const R=C.append("g").attr("class","markers"),z=m==="hover"?0:.6,D=d.filter(T=>T.timestamp>=$&&T.timestamp<=Y).map(T=>({...T,x:I(new Date(T.timestamp))}));if(D.forEach(T=>{const X=R.append("line").attr("class","marker-line").attr("data-timestamp",T.timestamp).attr("x1",T.x).attr("x2",T.x).attr("y1",0).attr("y2",M).attr("stroke",T.color??"#131E7A").attr("stroke-width",2).attr("opacity",z);T.strokeDasharray&&X.attr("stroke-dasharray",T.strokeDasharray),T.label&&R.append("text").attr("class","marker-label").attr("data-timestamp",T.timestamp).attr("x",T.x).attr("y",-5).attr("text-anchor","middle").attr("font-size",10).attr("fill",T.color??"#131E7A").attr("opacity",z).text(T.label)}),m==="hover"&&D.length>0){const T=w.append("g").attr("class","marker-tooltip").attr("transform",`translate(${a.left},${a.top})`).style("pointer-events","none").style("display","none"),X=T.append("rect").attr("fill","#131E7A").attr("rx",4).attr("ry",4).attr("filter","drop-shadow(0px 2px 4px rgba(0,0,0,0.2))"),Q=T.append("text").attr("fill","white").attr("font-size",12).attr("font-weight",500).attr("text-anchor","middle");let W=null;const ut=C.append("rect").attr("class","marker-hover-overlay").attr("width",b).attr("height",M).attr("fill","none").attr("pointer-events","all"),H=ot=>{let gt=null,yt=1/0;if(D.forEach(ge=>{const Vt=Math.abs(ot-ge.x);Vt<yt&&(yt=Vt,gt=ge)}),!gt||yt>50)return W!==null&&(W=null,R.selectAll(".marker-line").attr("opacity",0),R.selectAll(".marker-label").attr("opacity",0),T.style("display","none"),x==null||x(!1)),!1;const rt=gt;if(W===null&&(x==null||x(!0)),W===rt.timestamp)return!0;W=rt.timestamp,R.selectAll(".marker-line").attr("opacity",0),R.selectAll(".marker-label").attr("opacity",0),R.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(rt.timestamp)}).attr("opacity",.6),R.selectAll(".marker-label").filter(function(){return Ot(this).attr("data-timestamp")===String(rt.timestamp)}).attr("opacity",1);const at=new Date(rt.timestamp),_t=p?p(rt.timestamp):at.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),dt=rt.label?`${rt.label}: ${_t}`:_t;Q.text(dt);const xt=Q.node().getBBox(),Et=8,At=xt.width+Et*2,ee=xt.height+Et*2;X.attr("width",At).attr("height",ee);let ne=rt.x-At/2;const Pt=10;return ne<0?ne=0:ne+At>b&&(ne=b-At),T.attr("transform",`translate(${a.left+ne},${a.top+Pt})`),Q.attr("x",At/2).attr("y",ee/2+4),T.style("display","block"),!0};ut.on("mousemove",function(ot){const[gt]=er(ot,this);H(gt)&&ot.stopPropagation()}),ut.on("mouseleave",function(){W=null,R.selectAll(".marker-line").attr("opacity",0),R.selectAll(".marker-label").attr("opacity",0),T.style("display","none"),x==null||x(!1)})}}if(l){const R=qn(I).ticks(6);p&&R.tickFormat(z=>p(+z)),A.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${M})`).call(R).selectAll("text").attr("font-size",11)}if(u){const R=In(st).ticks(5);g&&R.tickFormat(z=>g(+z)),A.append("g").attr("class","axis axis-y").call(R).selectAll("text").attr("font-size",11)}const j=(R,z)=>{const D=+I.invert(R);let T=-1;for(let H=0;H<O.length-1;H++)if(O[H].timestamp<=D&&O[H+1].timestamp>=D){T=H;break}T===-1&&(D<=O[0].timestamp?T=0:T=O.length-2);const X=O[T],Q=O[T+1];if(!X||!Q)return null;const W=Q.timestamp-X.timestamp,ut=W>0?(D-X.timestamp)/W:0;for(let H=B.length-1;H>=0;H--){const ot=B[H],gt=n[H];if(!ot||!gt)continue;const yt=ot[T],vt=ot[T+1];if(!yt||!vt)continue;const rt=yt[0]+ut*(vt[0]-yt[0]),at=yt[1]+ut*(vt[1]-yt[1]),_t=st(rt),dt=st(at);if(z>=dt&&z<=_t){const xt=at-rt;return{timestamp:D,category:{label:gt.label,color:gt.color},value:xt}}}return null},nt=(R,z)=>{const[D,T]=er(R,z);v&&(S==null||S({x:D+a.left,y:T+a.top}));const X=j(D,T);_==null||_(X)},Z=()=>{S==null||S(null),_==null||_(null)};if(!c){const R=C.append("rect").attr("class","mouse-overlay").attr("width",b).attr("height",M).attr("fill","none").attr("pointer-events","all");R.on("mousemove",function(z){nt(z,this)}),R.on("mouseleave",Z)}if(c&&h){const R=pi().extent([[0,0],[b,M]]).on("brush",()=>{}).on("end",D=>{if(!D.selection)return;const[T,X]=D.selection,Q=[+I.invert(T),+I.invert(X)];h(Q),f&&w.select(".brush").call(R.move,null)}),z=w.append("g").attr("class","brush").attr("transform",`translate(${a.left},${a.top})`).call(R);z.select(".selection").style("fill",y).style("fill-opacity","0.4").style("stroke",y).style("stroke-width","2px"),z.selectAll(".handle").style("fill",y).style("fill-opacity","0.9"),z.select(".overlay").style("cursor","default"),z.select(".overlay").on("mousemove",function(D){nt(D,this)}).on("mouseleave",Z)}return w.on("mouseleave",()=>{S==null||S(null),_==null||_(null)}),()=>{w.selectAll("*").remove()}},[e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m,x,y,v,_,S])},MT=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:s=!0,width:o=800,height:l=400,margin:u={top:20,right:30,bottom:40,left:60},timeRange:c,showGrid:f=!0,showAxes:h=!0,showXAxis:p,showYAxis:g,formatDate:d,formatValue:m,onTimeRangeChange:x,enableBrush:y=!1,zoomToSelection:v=!1,markers:_=[],markerVisibilityMode:S="hover",brushColor:w="#69b3a2",showCrosshair:b=!1,crosshairColor:M="#666",crosshairDashArray:A="4,4",tooltipScale:k=1,usePortalTooltip:C=!1})=>{const O=G.useRef(null),P=G.useRef(null),[F,B]=G.useState(null),[L,$]=G.useState(null),[Y,I]=G.useState(!1),et=G.useCallback(j=>{Y||B(j)},[Y]),K=G.useCallback(j=>{Y||$(j)},[Y]),J=G.useCallback(j=>{I(j),j&&(B(null),$(null))},[]);TT({containerRef:O,data:e,categories:t,width:o,height:l,margin:u,timeRange:c,showGrid:f,showXAxis:p!==void 0?p:h,showYAxis:g!==void 0?g:h,enableBrush:y,zoomToSelection:v,onTimeRangeChange:x,formatDate:d,formatValue:m,markers:_,markerVisibilityMode:S,onMarkerHoverChange:J,brushColor:w,showCrosshair:b,onHoveredAreaChange:et,onCrosshairMove:K});const N=j=>d?d(j):new Date(j).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0});return E.jsxs(q.Stack,{sx:{width:"100%",alignItems:"center",gap:2},children:[i&&(n||r)&&E.jsxs(q.Stack,{spacing:.5,sx:{mb:2,width:"100%",alignItems:"center"},children:[n&&E.jsx(q.Typography,{variant:"h5",sx:{fontWeight:500},children:n}),r&&E.jsx(q.Typography,{variant:"body2",sx:{color:"text.secondary"},children:r})]}),E.jsxs(q.Box,{ref:P,sx:{width:"100%",display:"flex",justifyContent:"center",alignItems:"flex-start",position:"relative"},children:[E.jsx("svg",{ref:O,viewBox:`0 0 ${o} ${l}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",maxWidth:"1200px",minWidth:"400px",height:"auto",display:"block"}}),b&&L&&E.jsxs("svg",{viewBox:`0 0 ${o} ${l}`,preserveAspectRatio:"xMidYMid meet",style:{position:"absolute",top:0,left:0,right:0,width:"100%",maxWidth:"1200px",minWidth:"400px",height:"auto",pointerEvents:"none",margin:"0 auto"},children:[E.jsx("line",{x1:L.x,y1:u.top,x2:L.x,y2:l-u.bottom,stroke:M,strokeDasharray:A,strokeWidth:1}),E.jsx("line",{x1:u.left,y1:L.y,x2:o-u.right,y2:L.y,stroke:M,strokeDasharray:A,strokeWidth:1})]}),s&&F&&L&&E.jsxs(oy,{visible:!0,x:L.x,y:L.y,containerRef:P,viewBoxWidth:o,viewBoxHeight:l,usePortal:C,scale:k,flipThreshold:o/2,children:[E.jsx(q.Typography,{sx:{fontFamily:"monospace",fontSize:`${.875*k}rem`,color:"text.secondary",mb:1.5*k},children:N(F.timestamp)}),E.jsxs(q.Stack,{direction:"row",spacing:1.5*k,children:[E.jsx(q.Box,{sx:{width:5*k,backgroundColor:F.category.color,borderRadius:1,flexShrink:0}}),E.jsxs(q.Stack,{children:[E.jsx(q.Typography,{sx:{fontWeight:700,fontSize:`${1.125*k}rem`,lineHeight:1.3},children:F.category.label}),E.jsx(q.Typography,{sx:{fontSize:`${1*k}rem`,color:"text.primary",textDecoration:"underline",textDecorationColor:"rgba(0,0,0,0.2)",textUnderlineOffset:"3px"},children:m?m(F.value):F.value.toLocaleString()})]})]})]})]}),a&&E.jsx(q.Stack,{direction:"row",spacing:3,sx:{flexWrap:"wrap",justifyContent:"center",gap:2},children:t.map(j=>E.jsxs(q.Stack,{direction:"row",spacing:1,alignItems:"center",sx:{cursor:"pointer","&:hover":{opacity:.7}},children:[E.jsx(q.Box,{sx:{width:16,height:16,backgroundColor:j.color,opacity:j.fillOpacity??.7,border:`2px solid ${j.color}`,borderRadius:"2px",...j.strokeDasharray&&{backgroundImage:`repeating-linear-gradient(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u=require("@mui/material"),d=require("react");d=l(d,1);let f=require("react/jsx-runtime"),p=require("@mui/icons-material");var m={neoGrey:{200:`#EDEFEF`,400:`#ADB5BD`},neoDigitalGreen:{600:`#40c048`}},h=[`#30F284`,`#FFD34D`,`#FFA83D`,`#FF8F52`,`#FF6F61`],g={"#30F284":`#1D5937`,"#FFD34D":`#806A00`,"#FFA83D":`#935B00`,"#FF8F52":`#A34E14`,"#FF6F61":`#A63325`,"#DEDBD0":`#82806F`},_=e=>{let t=e.replace(`#`,``);return t.length===3?t.split(``).map(e=>e+e).join(``):t},v=(e,t)=>{let n=_(e),r=Number.parseInt(n,16);if(Number.isNaN(r))return e;let i=1-t,a=e=>Math.max(0,Math.min(255,Math.round((r>>e&255)*i))).toString(16).padStart(2,`0`);return`#${a(16)}${a(8)}${a(0)}`},y=e=>g[e.toUpperCase()]??v(e,.28),b={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.5,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:`#f8f8f8`,emptySeatsBorder:`#d8d8d8`,seatBorder:`#fff`},seatBorderDarken:.28,animation:{transitionDuration:`0.2s`,hoverOpacity:{active:`1`,dimmed:`0.2`,empty:`0.3`}},scaling:{enableScaling:!0,scaleThreshold:200}},x={COMPLETED:m.neoDigitalGreen[600],NOT_APPLICABLE:`#DEDBD0`,NO_LST:`#A63325`,DATA_MISSING:`#FFD34D`},S=`rgba(166, 51, 37, 0.12)`,C=`rgba(166, 51, 37, 0.55)`,w=new Set([x.NO_LST]),T=.3,E=.24,D={dash:.48,gap:.38};function O(e,t){let n=w.has(e),r=n?S:e,i=n?C:y(e);if(t==null)return{fill:r,stroke:i,dashed:n};let a=e.startsWith(`#`);return{fill:r,stroke:i,dashed:n,strokeWidth:n?Math.max(.5,t*E):a?Math.max(.5,t*T):.5,dashArray:n?`${(t*D.dash).toFixed(2)} ${(t*D.gap).toFixed(2)}`:void 0}}var k=`N/A`,A=`No LST`,j=`Data Missing`;function M(e){return e}var N=1,P=2,F=3,I=4,L=1e-6;function R(e){return`translate(`+e+`,0)`}function z(e){return`translate(0,`+e+`)`}function B(e){return t=>+e(t)}function V(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function H(){return!this.__axis}function ee(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===N||e===I?-1:1,u=e===I||e===P?`x`:`y`,d=e===N||e===F?R:z;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):M),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?V:B)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===N?`0em`:e===F?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,L).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,L).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===I||e===P?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(H).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===P?`start`:e===I?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function te(e){return ee(F,e)}function ne(e){return ee(I,e)}var re={value:()=>{}};function ie(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new ae(n)}function ae(e){this._=e}function oe(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}ae.prototype=ie.prototype={constructor:ae,on:function(e,t){var n=this._,r=oe(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=U(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=W(n[i],e.name,t);else if(t==null)for(i in n)n[i]=W(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ae(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function U(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function W(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=re,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var se={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function ce(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),se.hasOwnProperty(t)?{space:se[t],local:e}:e}function le(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function ue(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function de(e){var t=ce(e);return(t.local?ue:le)(t)}function fe(){}function pe(e){return e==null?fe:function(){return this.querySelector(e)}}function me(e){typeof e!=`function`&&(e=pe(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new tn(r,this._parents)}function G(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function he(){return[]}function ge(e){return e==null?he:function(){return this.querySelectorAll(e)}}function _e(e){return function(){return G(e.apply(this,arguments))}}function ve(e){e=typeof e==`function`?_e(e):ge(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new tn(r,i)}function ye(e){return function(){return this.matches(e)}}function be(e){return function(t){return t.matches(e)}}var xe=Array.prototype.find;function Se(e){return function(){return xe.call(this.children,e)}}function Ce(){return this.firstElementChild}function we(e){return this.select(e==null?Ce:Se(typeof e==`function`?e:be(e)))}var Te=Array.prototype.filter;function Ee(){return Array.from(this.children)}function De(e){return function(){return Te.call(this.children,e)}}function Oe(e){return this.selectAll(e==null?Ee:De(typeof e==`function`?e:be(e)))}function ke(e){typeof e!=`function`&&(e=ye(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new tn(r,this._parents)}function Ae(e){return Array(e.length)}function je(){return new tn(this._enter||this._groups.map(Ae),this._parents)}function Me(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Me.prototype={constructor:Me,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ne(e){return function(){return e}}function Pe(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Me(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Fe(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Me(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Ie(e){return e.__data__}function Le(e,t){if(!arguments.length)return Array.from(this,Ie);var n=t?Fe:Pe,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Ne(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Re(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new tn(o,r),o._enter=s,o._exit=c,o}function Re(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ze(){return new tn(this._exit||this._groups.map(Ae),this._parents)}function Be(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ve(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new tn(s,this._parents)}function He(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ue(e){e||=We;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new tn(i,this._parents).order()}function We(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ge(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ke(){return Array.from(this)}function qe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Je(){let e=0;for(let t of this)++e;return e}function Ye(){return!this.node()}function Xe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Ze(e){return function(){this.removeAttribute(e)}}function Qe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $e(e,t){return function(){this.setAttribute(e,t)}}function et(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function tt(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function nt(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function rt(e,t){var n=ce(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Qe:Ze:typeof t==`function`?n.local?nt:tt:n.local?et:$e)(n,t))}function it(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function at(e){return function(){this.style.removeProperty(e)}}function ot(e,t,n){return function(){this.style.setProperty(e,t,n)}}function st(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ct(e,t,n){return arguments.length>1?this.each((t==null?at:typeof t==`function`?st:ot)(e,t,n??``)):lt(this.node(),e)}function lt(e,t){return e.style.getPropertyValue(t)||it(e).getComputedStyle(e,null).getPropertyValue(t)}function ut(e){return function(){delete this[e]}}function dt(e,t){return function(){this[e]=t}}function ft(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function pt(e,t){return arguments.length>1?this.each((t==null?ut:typeof t==`function`?ft:dt)(e,t)):this.node()[e]}function mt(e){return e.trim().split(/^|\s+/)}function ht(e){return e.classList||new gt(e)}function gt(e){this._node=e,this._names=mt(e.getAttribute(`class`)||``)}gt.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function _t(e,t){for(var n=ht(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function vt(e,t){for(var n=ht(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function yt(e){return function(){_t(this,e)}}function bt(e){return function(){vt(this,e)}}function xt(e,t){return function(){(t.apply(this,arguments)?_t:vt)(this,e)}}function St(e,t){var n=mt(e+``);if(arguments.length<2){for(var r=ht(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?xt:t?yt:bt)(n,t))}function Ct(){this.textContent=``}function wt(e){return function(){this.textContent=e}}function Tt(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Et(e){return arguments.length?this.each(e==null?Ct:(typeof e==`function`?Tt:wt)(e)):this.node().textContent}function Dt(){this.innerHTML=``}function Ot(e){return function(){this.innerHTML=e}}function kt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function At(e){return arguments.length?this.each(e==null?Dt:(typeof e==`function`?kt:Ot)(e)):this.node().innerHTML}function jt(){this.nextSibling&&this.parentNode.appendChild(this)}function Mt(){return this.each(jt)}function Nt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Pt(){return this.each(Nt)}function Ft(e){var t=typeof e==`function`?e:de(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function It(){return null}function Lt(e,t){var n=typeof e==`function`?e:de(e),r=t==null?It:typeof t==`function`?t:pe(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Rt(){var e=this.parentNode;e&&e.removeChild(this)}function zt(){return this.each(Rt)}function Bt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Vt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ht(e){return this.select(e?Vt:Bt)}function Ut(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Wt(e){return function(t){e.call(this,t,this.__data__)}}function Gt(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Kt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function qt(e,t,n){return function(){var r=this.__on,i,a=Wt(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Jt(e,t,n){var r=Gt(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?qt:Kt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Yt(e,t,n){var r=it(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Xt(e,t){return function(){return Yt(this,e,t)}}function Zt(e,t){return function(){return Yt(this,e,t.apply(this,arguments))}}function Qt(e,t){return this.each((typeof t==`function`?Zt:Xt)(e,t))}function*$t(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var en=[null];function tn(e,t){this._groups=e,this._parents=t}function nn(){return new tn([[document.documentElement]],en)}function rn(){return this}tn.prototype=nn.prototype={constructor:tn,select:me,selectAll:ve,selectChild:we,selectChildren:Oe,filter:ke,data:Le,enter:je,exit:ze,join:Be,merge:Ve,selection:rn,order:He,sort:Ue,call:Ge,nodes:Ke,node:qe,size:Je,empty:Ye,each:Xe,attr:rt,style:ct,property:pt,classed:St,text:Et,html:At,raise:Mt,lower:Pt,append:Ft,insert:Lt,remove:zt,clone:Ht,datum:Ut,on:Jt,dispatch:Qt,[Symbol.iterator]:$t};function K(e){return typeof e==`string`?new tn([[document.querySelector(e)]],[document.documentElement]):new tn([[e]],en)}function an(e){let t;for(;t=e.sourceEvent;)e=t;return e}function on(e,t){if(e=an(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var sn={capture:!0,passive:!1};function cn(e){e.preventDefault(),e.stopImmediatePropagation()}function ln(e){var t=e.document.documentElement,n=K(e).on(`dragstart.drag`,cn,sn);`onselectstart`in t?n.on(`selectstart.drag`,cn,sn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function un(e,t){var n=e.document.documentElement,r=K(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,cn,sn),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function dn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function pn(){}var mn=.7,hn=1/mn,gn=`\\s*([+-]?\\d+)\\s*`,_n=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,vn=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,yn=/^#([0-9a-f]{3,8})$/,bn=RegExp(`^rgb\\(${gn},${gn},${gn}\\)$`),xn=RegExp(`^rgb\\(${vn},${vn},${vn}\\)$`),Sn=RegExp(`^rgba\\(${gn},${gn},${gn},${_n}\\)$`),Cn=RegExp(`^rgba\\(${vn},${vn},${vn},${_n}\\)$`),wn=RegExp(`^hsl\\(${_n},${vn},${vn}\\)$`),Tn=RegExp(`^hsla\\(${_n},${vn},${vn},${_n}\\)$`),En={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};dn(pn,jn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dn,formatHex:Dn,formatHex8:On,formatHsl:kn,formatRgb:An,toString:An});function Dn(){return this.rgb().formatHex()}function On(){return this.rgb().formatHex8()}function kn(){return Wn(this).formatHsl()}function An(){return this.rgb().formatRgb()}function jn(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=yn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Mn(t):n===3?new In(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=bn.exec(e))?new In(t[1],t[2],t[3],1):(t=xn.exec(e))?new In(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Sn.exec(e))?Nn(t[1],t[2],t[3],t[4]):(t=Cn.exec(e))?Nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wn.exec(e))?Un(t[1],t[2]/100,t[3]/100,1):(t=Tn.exec(e))?Un(t[1],t[2]/100,t[3]/100,t[4]):En.hasOwnProperty(e)?Mn(En[e]):e===`transparent`?new In(NaN,NaN,NaN,0):null}function Mn(e){return new In(e>>16&255,e>>8&255,e&255,1)}function Nn(e,t,n,r){return r<=0&&(e=t=n=NaN),new In(e,t,n,r)}function Pn(e){return e instanceof pn||(e=jn(e)),e?(e=e.rgb(),new In(e.r,e.g,e.b,e.opacity)):new In}function Fn(e,t,n,r){return arguments.length===1?Pn(e):new In(e,t,n,r??1)}function In(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}dn(In,Fn,fn(pn,{brighter(e){return e=e==null?hn:hn**+e,new In(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mn:mn**+e,new In(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new In(Vn(this.r),Vn(this.g),Vn(this.b),Bn(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:Ln,formatHex:Ln,formatHex8:Rn,formatRgb:zn,toString:zn}));function Ln(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}`}function Rn(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}${Hn((isNaN(this.opacity)?1:this.opacity)*255)}`}function zn(){let e=Bn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Vn(this.r)}, ${Vn(this.g)}, ${Vn(this.b)}${e===1?`)`:`, ${e})`}`}function Bn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hn(e){return e=Vn(e),(e<16?`0`:``)+e.toString(16)}function Un(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kn(e,t,n,r)}function Wn(e){if(e instanceof Kn)return new Kn(e.h,e.s,e.l,e.opacity);if(e instanceof pn||(e=jn(e)),!e)return new Kn;if(e instanceof Kn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Kn(o,s,c,e.opacity)}function Gn(e,t,n,r){return arguments.length===1?Wn(e):new Kn(e,t,n,r??1)}function Kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}dn(Kn,Gn,fn(pn,{brighter(e){return e=e==null?hn:hn**+e,new Kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mn:mn**+e,new Kn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new In(Yn(e>=240?e-240:e+120,i,r),Yn(e,i,r),Yn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Kn(qn(this.h),Jn(this.s),Jn(this.l),Bn(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(){let e=Bn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${qn(this.h)}, ${Jn(this.s)*100}%, ${Jn(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function qn(e){return e=(e||0)%360,e<0?e+360:e}function Jn(e){return Math.max(0,Math.min(1,e||0))}function Yn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Xn=e=>()=>e;function Zn(e,t){return function(n){return e+n*t}}function Qn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function $n(e){return(e=+e)==1?er:function(t,n){return n-t?Qn(t,n,e):Xn(isNaN(t)?n:t)}}function er(e,t){var n=t-e;return n?Zn(e,n):Xn(isNaN(e)?t:e)}var tr=(function e(t){var n=$n(t);function r(e,t){var r=n((e=Fn(e)).r,(t=Fn(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=er(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function nr(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function rr(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ir(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=pr(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function ar(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function sr(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=pr(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var cr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lr=new RegExp(cr.source,`g`);function ur(e){return function(){return e}}function dr(e){return function(t){return e(t)+``}}function fr(e,t){var n=cr.lastIndex=lr.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=cr.exec(e))&&(i=lr.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:or(r,i)})),n=lr.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?dr(c[0].x):ur(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function pr(e,t){var n=typeof t,r;return t==null||n===`boolean`?Xn(t):(n===`number`?or:n===`string`?(r=jn(t))?(t=r,tr):fr:t instanceof jn?tr:t instanceof Date?ar:rr(t)?nr:Array.isArray(t)?ir:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?sr:or)(e,t)}function mr(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var hr=180/Math.PI,gr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _r(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*hr,skewX:Math.atan(c)*hr,scaleX:o,scaleY:s}}var vr;function yr(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?gr:_r(t.a,t.b,t.c,t.d,t.e,t.f)}function br(e){return e==null||(vr||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),vr.setAttribute(`transform`,e),!(e=vr.transform.baseVal.consolidate()))?gr:(e=e.matrix,_r(e.a,e.b,e.c,e.d,e.e,e.f))}function xr(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:or(e,i)},{i:c-2,x:or(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:or(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:or(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:or(e,n)},{i:s-2,x:or(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Sr=xr(yr,`px, `,`px)`,`deg)`),Cr=xr(br,`, `,`)`,`)`),wr=0,Tr=0,Er=0,Dr=1e3,Or,kr,Ar=0,jr=0,Mr=0,Nr=typeof performance==`object`&&performance.now?performance:Date,Pr=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Fr(){return jr||=(Pr(Ir),Nr.now()+Mr)}function Ir(){jr=0}function Lr(){this._call=this._time=this._next=null}Lr.prototype=Rr.prototype={constructor:Lr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Fr():+n)+(t==null?0:+t),!this._next&&kr!==this&&(kr?kr._next=this:Or=this,kr=this),this._call=e,this._time=n,Ur()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ur())}};function Rr(e,t,n){var r=new Lr;return r.restart(e,t,n),r}function zr(){Fr(),++wr;for(var e=Or,t;e;)(t=jr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--wr}function Br(){jr=(Ar=Nr.now())+Mr,wr=Tr=0;try{zr()}finally{wr=0,Hr(),jr=0}}function Vr(){var e=Nr.now(),t=e-Ar;t>Dr&&(Mr-=t,Ar=e)}function Hr(){for(var e,t=Or,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Or=n);kr=e,Ur(r)}function Ur(e){wr||(Tr&&=clearTimeout(Tr),e-jr>24?(e<1/0&&(Tr=setTimeout(Br,e-Nr.now()-Mr)),Er&&=clearInterval(Er)):(Er||=(Ar=Nr.now(),setInterval(Vr,Dr)),wr=1,Pr(Br)))}function Wr(e,t,n){var r=new Lr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Gr=ie(`start`,`end`,`cancel`,`interrupt`),Kr=[];function qr(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Zr(e,n,{name:t,index:r,group:i,on:Gr,tween:Kr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Jr(e,t){var n=Xr(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Yr(e,t){var n=Xr(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Xr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Zr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Rr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Wr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Wr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Qr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function $r(e){return this.each(function(){Qr(this,e)})}function ei(e,t){var n,r;return function(){var i=Yr(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function ti(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Yr(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function ni(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Xr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?ei:ti)(n,e,t))}function ri(e,t,n){var r=e._id;return e.each(function(){var e=Yr(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Xr(e,r).value[t]}}function ii(e,t){var n;return(typeof t==`number`?or:t instanceof jn?tr:(n=jn(t))?(t=n,tr):fr)(e,t)}function ai(e){return function(){this.removeAttribute(e)}}function oi(e){return function(){this.removeAttributeNS(e.space,e.local)}}function si(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function ci(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function li(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function ui(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function di(e,t){var n=ce(e),r=n===`transform`?Cr:ii;return this.attrTween(e,typeof t==`function`?(n.local?ui:li)(n,r,ri(this,`attr.`+e,t)):t==null?(n.local?oi:ai)(n):(n.local?ci:si)(n,r,t))}function fi(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function pi(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function mi(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&pi(e,i)),n}return i._value=t,i}function hi(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&fi(e,i)),n}return i._value=t,i}function gi(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=ce(e);return this.tween(n,(r.local?mi:hi)(r,t))}function _i(e,t){return function(){Jr(this,e).delay=+t.apply(this,arguments)}}function vi(e,t){return t=+t,function(){Jr(this,e).delay=t}}function yi(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?_i:vi)(t,e)):Xr(this.node(),t).delay}function bi(e,t){return function(){Yr(this,e).duration=+t.apply(this,arguments)}}function xi(e,t){return t=+t,function(){Yr(this,e).duration=t}}function Si(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?bi:xi)(t,e)):Xr(this.node(),t).duration}function Ci(e,t){if(typeof t!=`function`)throw Error();return function(){Yr(this,e).ease=t}}function wi(e){var t=this._id;return arguments.length?this.each(Ci(t,e)):Xr(this.node(),t).ease}function Ti(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Yr(this,e).ease=n}}function Ei(e){if(typeof e!=`function`)throw Error();return this.each(Ti(this._id,e))}function Di(e){typeof e!=`function`&&(e=ye(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new na(r,this._parents,this._name,this._id)}function Oi(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new na(o,this._parents,this._name,this._id)}function ki(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Ai(e,t,n){var r,i,a=ki(t)?Jr:Yr;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function ji(e,t){var n=this._id;return arguments.length<2?Xr(this.node(),n).on.on(e):this.each(Ai(n,e,t))}function Mi(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Ni(){return this.on(`end.remove`,Mi(this._id))}function Pi(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=pe(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,qr(l[f],t,n,f,l,Xr(u,n)));return new na(a,this._parents,t,n)}function Fi(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ge(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Xr(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&qr(p,t,n,h,f,m);a.push(f),o.push(u)}return new na(a,o,t,n)}var Ii=nn.prototype.constructor;function Li(){return new Ii(this._groups,this._parents)}function Ri(e,t){var n,r,i;return function(){var a=lt(this,e),o=(this.style.removeProperty(e),lt(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function zi(e){return function(){this.style.removeProperty(e)}}function Bi(e,t,n){var r,i=n+``,a;return function(){var o=lt(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Vi(e,t,n){var r,i,a;return function(){var o=lt(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),lt(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Hi(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Yr(this,e),l=c.on,u=c.value[a]==null?s||=zi(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Ui(e,t,n){var r=(e+=``)==`transform`?Sr:ii;return t==null?this.styleTween(e,Ri(e,r)).on(`end.style.`+e,zi(e)):typeof t==`function`?this.styleTween(e,Vi(e,r,ri(this,`style.`+e,t))).each(Hi(this._id,e)):this.styleTween(e,Bi(e,r,t),n).on(`end.style.`+e,null)}function Wi(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Gi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Wi(e,a,n)),r}return a._value=t,a}function Ki(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,Gi(e,t,n??``))}function qi(e){return function(){this.textContent=e}}function Ji(e){return function(){var t=e(this);this.textContent=t??``}}function Yi(e){return this.tween(`text`,typeof e==`function`?Ji(ri(this,`text`,e)):qi(e==null?``:e+``))}function Xi(e){return function(t){this.textContent=e.call(this,t)}}function Zi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Xi(r)),t}return r._value=e,r}function Qi(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Zi(e))}function $i(){for(var e=this._name,t=this._id,n=ia(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Xr(c,t);qr(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new na(r,this._parents,e,n)}function ea(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Yr(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var ta=0;function na(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ra(e){return nn().transition(e)}function ia(){return++ta}var aa=nn.prototype;na.prototype=ra.prototype={constructor:na,select:Pi,selectAll:Fi,selectChild:aa.selectChild,selectChildren:aa.selectChildren,filter:Di,merge:Oi,selection:Li,transition:$i,call:aa.call,nodes:aa.nodes,node:aa.node,size:aa.size,empty:aa.empty,each:aa.each,on:ji,attr:di,attrTween:gi,style:Ui,styleTween:Ki,text:Yi,textTween:Qi,remove:Ni,tween:ni,delay:yi,duration:Si,ease:wi,easeVarying:Ei,end:ea,[Symbol.iterator]:aa[Symbol.iterator]};function oa(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var sa={time:null,delay:0,duration:250,ease:oa};function ca(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function la(e){var t,n;e instanceof na?(t=e._id,e=e._name):(t=ia(),(n=sa).time=Fr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&qr(c,e,t,l,o,n||ca(c,t));return new na(r,this._parents,e,t)}nn.prototype.interrupt=$r,nn.prototype.transition=la;var ua=e=>()=>e;function da(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function fa(e){e.stopImmediatePropagation()}function pa(e){e.preventDefault(),e.stopImmediatePropagation()}var ma={name:`drag`},ha={name:`space`},ga={name:`handle`},_a={name:`center`},{abs:va,max:ya,min:ba}=Math;function xa(e){return[+e[0],+e[1]]}function Sa(e){return[xa(e[0]),xa(e[1])]}var Ca={name:`x`,handles:[`w`,`e`].map(Aa),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},wa={name:`y`,handles:[`n`,`s`].map(Aa),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}};[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Aa);var Ta={overlay:`crosshair`,selection:`move`,n:`ns-resize`,e:`ew-resize`,s:`ns-resize`,w:`ew-resize`,nw:`nwse-resize`,ne:`nesw-resize`,se:`nwse-resize`,sw:`nesw-resize`},Ea={e:`w`,w:`e`,nw:`ne`,ne:`nw`,se:`sw`,sw:`se`},Da={n:`s`,s:`n`,nw:`sw`,ne:`se`,se:`ne`,sw:`nw`},Oa={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ka={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Aa(e){return{type:e}}function ja(e){return!e.ctrlKey&&!e.button}function Ma(){var e=this.ownerSVGElement||this;return e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Na(){return navigator.maxTouchPoints||`ontouchstart`in this}function Pa(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Fa(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function Ia(){return La(Ca)}function La(e){var t=Ma,n=ja,r=Na,i=!0,a=ie(`start`,`brush`,`end`),o=6,s;function c(t){var n=t.property(`__brush`,h).selectAll(`.overlay`).data([Aa(`overlay`)]);n.enter().append(`rect`).attr(`class`,`overlay`).attr(`pointer-events`,`all`).attr(`cursor`,Ta.overlay).merge(n).each(function(){var e=Pa(this).extent;K(this).attr(`x`,e[0][0]).attr(`y`,e[0][1]).attr(`width`,e[1][0]-e[0][0]).attr(`height`,e[1][1]-e[0][1])}),t.selectAll(`.selection`).data([Aa(`selection`)]).enter().append(`rect`).attr(`class`,`selection`).attr(`cursor`,Ta.selection).attr(`fill`,`#777`).attr(`fill-opacity`,.3).attr(`stroke`,`#fff`).attr(`shape-rendering`,`crispEdges`);var i=t.selectAll(`.handle`).data(e.handles,function(e){return e.type});i.exit().remove(),i.enter().append(`rect`).attr(`class`,function(e){return`handle handle--`+e.type}).attr(`cursor`,function(e){return Ta[e.type]}),t.each(l).attr(`fill`,`none`).attr(`pointer-events`,`all`).on(`mousedown.brush`,f).filter(r).on(`touchstart.brush`,f).on(`touchmove.brush`,p).on(`touchend.brush touchcancel.brush`,m).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}c.move=function(t,n,r){t.tween?t.on(`start.brush`,function(e){u(this,arguments).beforestart().start(e)}).on(`interrupt.brush end.brush`,function(e){u(this,arguments).end(e)}).tween(`brush`,function(){var t=this,r=t.__brush,i=u(t,arguments),a=r.selection,o=e.input(typeof n==`function`?n.apply(this,arguments):n,r.extent),s=pr(a,o);function c(e){r.selection=e===1&&o===null?null:s(e),l.call(t),i.brush()}return a!==null&&o!==null?c:c(1)}):t.each(function(){var t=this,i=arguments,a=t.__brush,o=e.input(typeof n==`function`?n.apply(t,i):n,a.extent),s=u(t,i).beforestart();Qr(t),a.selection=o===null?null:o,l.call(t),s.start(r).brush(r).end(r)})},c.clear=function(e,t){c.move(e,null,t)};function l(){var e=K(this),t=Pa(this).selection;t?(e.selectAll(`.selection`).style(`display`,null).attr(`x`,t[0][0]).attr(`y`,t[0][1]).attr(`width`,t[1][0]-t[0][0]).attr(`height`,t[1][1]-t[0][1]),e.selectAll(`.handle`).style(`display`,null).attr(`x`,function(e){return e.type[e.type.length-1]===`e`?t[1][0]-o/2:t[0][0]-o/2}).attr(`y`,function(e){return e.type[0]===`s`?t[1][1]-o/2:t[0][1]-o/2}).attr(`width`,function(e){return e.type===`n`||e.type===`s`?t[1][0]-t[0][0]+o:o}).attr(`height`,function(e){return e.type===`e`||e.type===`w`?t[1][1]-t[0][1]+o:o})):e.selectAll(`.selection,.handle`).style(`display`,`none`).attr(`x`,null).attr(`y`,null).attr(`width`,null).attr(`height`,null)}function u(e,t,n){var r=e.__brush.emitter;return r&&(!n||!r.clean)?r:new d(e,t,n)}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit(`start`,e,t)):this.emit(`brush`,e),this},brush:function(e,t){return this.emit(`brush`,e,t),this},end:function(e,t){return--this.active===0&&(delete this.state.emitter,this.emit(`end`,e,t)),this},emit:function(t,n,r){var i=K(this.that).datum();a.call(t,this.that,new da(t,{sourceEvent:n,target:c,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}};function f(t){if(s&&!t.touches||!n.apply(this,arguments))return;var r=this,a=t.target.__data__.type,o=(i&&t.metaKey?a=`overlay`:a)===`selection`?ma:i&&t.altKey?_a:ga,c=e===wa?null:Oa[a],d=e===Ca?null:ka[a],f=Pa(r),p=f.extent,m=f.selection,h=p[0][0],g,_,v=p[0][1],y,b,x=p[1][0],S,C,w=p[1][1],T,E,D=0,O=0,k,A=c&&d&&i&&t.shiftKey,j,M,N=Array.from(t.touches||[t],e=>{let t=e.identifier;return e=on(e,r),e.point0=e.slice(),e.identifier=t,e});Qr(r);var P=u(r,arguments,!0).beforestart();if(a===`overlay`){m&&(k=!0);let n=[N[0],N[1]||N[0]];f.selection=m=[[g=e===wa?h:ba(n[0][0],n[1][0]),y=e===Ca?v:ba(n[0][1],n[1][1])],[S=e===wa?x:ya(n[0][0],n[1][0]),T=e===Ca?w:ya(n[0][1],n[1][1])]],N.length>1&&z(t)}else g=m[0][0],y=m[0][1],S=m[1][0],T=m[1][1];_=g,b=y,C=S,E=T;var F=K(r).attr(`pointer-events`,`none`),I=F.selectAll(`.overlay`).attr(`cursor`,Ta[a]);if(t.touches)P.moved=R,P.ended=B;else{var L=K(t.view).on(`mousemove.brush`,R,!0).on(`mouseup.brush`,B,!0);i&&L.on(`keydown.brush`,V,!0).on(`keyup.brush`,H,!0),ln(t.view)}l.call(r),P.start(t,o.name);function R(e){for(let t of e.changedTouches||[e])for(let e of N)e.identifier===t.identifier&&(e.cur=on(t,r));if(A&&!j&&!M&&N.length===1){let e=N[0];va(e.cur[0]-e[0])>va(e.cur[1]-e[1])?M=!0:j=!0}for(let e of N)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);k=!0,pa(e),z(e)}function z(e){let t=N[0],n=t.point0;var i;switch(D=t[0]-n[0],O=t[1]-n[1],o){case ha:case ma:c&&(D=ya(h-g,ba(x-S,D)),_=g+D,C=S+D),d&&(O=ya(v-y,ba(w-T,O)),b=y+O,E=T+O);break;case ga:N[1]?(c&&=(_=ya(h,ba(x,N[0][0])),C=ya(h,ba(x,N[1][0])),1),d&&=(b=ya(v,ba(w,N[0][1])),E=ya(v,ba(w,N[1][1])),1)):(c<0?(D=ya(h-g,ba(x-g,D)),_=g+D,C=S):c>0&&(D=ya(h-S,ba(x-S,D)),_=g,C=S+D),d<0?(O=ya(v-y,ba(w-y,O)),b=y+O,E=T):d>0&&(O=ya(v-T,ba(w-T,O)),b=y,E=T+O));break;case _a:c&&(_=ya(h,ba(x,g-D*c)),C=ya(h,ba(x,S+D*c))),d&&(b=ya(v,ba(w,y-O*d)),E=ya(v,ba(w,T+O*d)));break}C<_&&(c*=-1,i=g,g=S,S=i,i=_,_=C,C=i,a in Ea&&I.attr(`cursor`,Ta[a=Ea[a]])),E<b&&(d*=-1,i=y,y=T,T=i,i=b,b=E,E=i,a in Da&&I.attr(`cursor`,Ta[a=Da[a]])),f.selection&&(m=f.selection),j&&(_=m[0][0],C=m[1][0]),M&&(b=m[0][1],E=m[1][1]),(m[0][0]!==_||m[0][1]!==b||m[1][0]!==C||m[1][1]!==E)&&(f.selection=[[_,b],[C,E]],l.call(r),P.brush(e,o.name))}function B(e){if(fa(e),e.touches){if(e.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else un(e.view,k),L.on(`keydown.brush keyup.brush mousemove.brush mouseup.brush`,null);F.attr(`pointer-events`,`all`),I.attr(`cursor`,Ta.overlay),f.selection&&(m=f.selection),Fa(m)&&(f.selection=null,l.call(r)),P.end(e,o.name)}function V(e){switch(e.keyCode){case 16:A=c&&d;break;case 18:o===ga&&(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=_a,z(e));break;case 32:(o===ga||o===_a)&&(c<0?S=C-D:c>0&&(g=_-D),d<0?T=E-O:d>0&&(y=b-O),o=ha,I.attr(`cursor`,Ta.selection),z(e));break;default:return}pa(e)}function H(e){switch(e.keyCode){case 16:A&&(j=M=A=!1,z(e));break;case 18:o===_a&&(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=ga,z(e));break;case 32:o===ha&&(e.altKey?(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=_a):(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=ga),I.attr(`cursor`,Ta[a]),z(e));break;default:return}pa(e)}}function p(e){u(this,arguments).moved(e)}function m(e){u(this,arguments).ended(e)}function h(){var n=this.__brush||{selection:null};return n.extent=Sa(t.apply(this,arguments)),n.dim=e,n}return c.extent=function(e){return arguments.length?(t=typeof e==`function`?e:ua(Sa(e)),c):t},c.filter=function(e){return arguments.length?(n=typeof e==`function`?e:ua(!!e),c):n},c.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:ua(!!e),c):r},c.handleSize=function(e){return arguments.length?(o=+e,c):o},c.keyModifiers=function(e){return arguments.length?(i=!!e,c):i},c.on=function(){var e=a.on.apply(a,arguments);return e===a?c:e},c}function Ra(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function za(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ba(e){let t,n,r;e.length===2?(t=e===Ra||e===za?e:Va,n=e,r=e):(t=Ra,n=(t,n)=>Ra(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function Va(){return 0}function Ha(e){return e===null?NaN:+e}var Ua=Ba(Ra),Wa=Ua.right;Ua.left,Ba(Ha).center;var Ga=Math.sqrt(50),Ka=Math.sqrt(10),qa=Math.sqrt(2);function Ja(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Ga?10:a>=Ka?5:a>=qa?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Ja(e,t,n*2):[s,c,l]}function Ya(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Ja(t,e,n):Ja(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function Xa(e,t,n){return t=+t,e=+e,n=+n,Ja(e,t,n)[2]}function Za(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?Xa(t,e,n):Xa(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Qa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function $a(e){return function(){return e}}function eo(e){return+e}var to=[0,1];function no(e){return e}function ro(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:$a(isNaN(t)?NaN:.5)}function io(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function ao(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=ro(i,r),a=n(o,a)):(r=ro(r,i),a=n(a,o)),function(e){return a(r(e))}}function oo(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=ro(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=Wa(e,t,1,r)-1;return a[n](i[n](t))}}function so(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function co(){var e=to,t=to,n=pr,r,i,a,o=no,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==no&&(o=io(e[0],e[n-1])),s=n>2?oo:ao,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),or))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,eo),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=mr,u()},d.clamp=function(e){return arguments.length?(o=e?!0:no,u()):o!==no},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function lo(){return co()(no,no)}function uo(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function fo(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function po(e){return e=fo(Math.abs(e)),e?e[1]:NaN}function mo(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function ho(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var go=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _o(e){if(!(t=go.exec(e)))throw Error(`invalid format: `+e);var t;return new vo({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}_o.prototype=vo.prototype;function vo(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}vo.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 yo(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var bo;function xo(e,t){var n=fo(e,t);if(!n)return bo=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(bo=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+fo(e,Math.max(0,t+a-1))[0]}function So(e,t){var n=fo(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Co={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:uo,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>So(e*100,t),r:So,s:xo,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wo(e){return e}var To=Array.prototype.map,Eo=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Do(e){var t=e.grouping===void 0||e.thousands===void 0?wo:mo(To.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?wo:ho(To.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=_o(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):Co[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=Co[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=yo(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&bo!==void 0?Eo[8+bo/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(po(t)/3)))*3,r=10**-n,i=l((e=_o(e),e.type=`f`,e),{suffix:Eo[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Oo,ko,Ao;jo({thousands:`,`,grouping:[3],currency:[`$`,``]});function jo(e){return Oo=Do(e),ko=Oo.format,Ao=Oo.formatPrefix,Oo}function Mo(e){return Math.max(0,-po(Math.abs(e)))}function No(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(po(t)/3)))*3-po(Math.abs(e)))}function Po(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,po(t)-po(e))+1}function Fo(e,t,n,r){var i=Za(e,t,n),a;switch(r=_o(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=No(i,o))&&(r.precision=a),Ao(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Po(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Mo(i))&&(r.precision=a-(r.type===`%`)*2);break}return ko(r)}function Io(e){var t=e.domain;return e.ticks=function(e){var n=t();return Ya(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Fo(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=Xa(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Lo(){var e=lo();return e.copy=function(){return so(e,Lo())},Qa.apply(e,arguments),Io(e)}function Ro(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var zo=new Date,Bo=new Date;function Vo(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Vo(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(zo.setTime(+t),Bo.setTime(+r),e(zo),e(Bo),Math.floor(n(zo,Bo))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Ho=Vo(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ho.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Vo(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ho),Ho.range;var Uo=1e3,Wo=Uo*60,Go=Wo*60,Ko=Go*24,qo=Ko*7,Jo=Ko*30,Yo=Ko*365,Xo=Vo(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Uo)},(e,t)=>(t-e)/Uo,e=>e.getUTCSeconds());Xo.range;var Zo=Vo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uo)},(e,t)=>{e.setTime(+e+t*Wo)},(e,t)=>(t-e)/Wo,e=>e.getMinutes());Zo.range;var Qo=Vo(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Wo)},(e,t)=>(t-e)/Wo,e=>e.getUTCMinutes());Qo.range;var $o=Vo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uo-e.getMinutes()*Wo)},(e,t)=>{e.setTime(+e+t*Go)},(e,t)=>(t-e)/Go,e=>e.getHours());$o.range;var es=Vo(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Go)},(e,t)=>(t-e)/Go,e=>e.getUTCHours());es.range;var ts=Vo(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wo)/Ko,e=>e.getDate()-1);ts.range;var ns=Vo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ko,e=>e.getUTCDate()-1);ns.range;var rs=Vo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ko,e=>Math.floor(e/Ko));rs.range;function is(e){return Vo(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wo)/qo)}var as=is(0),os=is(1),ss=is(2),cs=is(3),ls=is(4),us=is(5),ds=is(6);as.range,os.range,ss.range,cs.range,ls.range,us.range,ds.range;function fs(e){return Vo(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/qo)}var ps=fs(0),ms=fs(1),hs=fs(2),gs=fs(3),_s=fs(4),vs=fs(5),ys=fs(6);ps.range,ms.range,hs.range,gs.range,_s.range,vs.range,ys.range;var bs=Vo(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());bs.range;var xs=Vo(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xs.range;var Ss=Vo(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vo(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Ss.range;var Cs=Vo(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Cs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vo(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Cs.range;function ws(e,t,n,r,i,a){let o=[[Xo,1,Uo],[Xo,5,5*Uo],[Xo,15,15*Uo],[Xo,30,30*Uo],[a,1,Wo],[a,5,5*Wo],[a,15,15*Wo],[a,30,30*Wo],[i,1,Go],[i,3,3*Go],[i,6,6*Go],[i,12,12*Go],[r,1,Ko],[r,2,2*Ko],[n,1,qo],[t,1,Jo],[t,3,3*Jo],[e,1,Yo]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=Ba(([,,e])=>e).right(o,i);if(a===o.length)return e.every(Za(t/Yo,n/Yo,r));if(a===0)return Ho.every(Math.max(Za(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[Ts,Es]=ws(Cs,xs,ps,rs,es,Qo),[Ds,Os]=ws(Ss,bs,as,ts,$o,Zo);function ks(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function As(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function js(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Ms(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Rs(i),u=zs(i),d=Rs(a),f=zs(a),p=Rs(o),m=zs(o),h=Rs(s),g=zs(s),_=Rs(c),v=zs(c),y={a:N,A:P,b:F,B:I,c:null,d:oc,e:oc,f:dc,g:Sc,G:wc,H:sc,I:cc,j:lc,L:uc,m:fc,M:pc,p:L,q:R,Q:qc,s:Jc,S:mc,u:hc,U:gc,V:vc,w:yc,W:bc,x:null,X:null,y:xc,Y:Cc,Z:Tc,"%":Kc},b={a:z,A:B,b:V,B:H,c:null,d:Ec,e:Ec,f:jc,g:Hc,G:Wc,H:Dc,I:Oc,j:kc,L:Ac,m:Mc,M:Nc,p:ee,q:te,Q:qc,s:Jc,S:Pc,u:Fc,U:Ic,V:Rc,w:zc,W:Bc,x:null,X:null,y:Vc,Y:Uc,Z:Gc,"%":Kc},x={a:E,A:D,b:O,B:k,c:A,d:Xs,e:Xs,f:nc,g:Ks,G:Gs,H:Qs,I:Qs,j:Zs,L:tc,m:Ys,M:$s,p:T,q:Js,Q:ic,s:ac,S:ec,u:Vs,U:Hs,V:Us,w:Bs,W:Ws,x:j,X:M,y:Ks,Y:Gs,Z:qs,"%":rc};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=Ns[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=js(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=As(js(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?ms.ceil(a):ms(a),a=ns.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=ks(js(r.y,0,1)),o=a.getDay(),a=o>4||o===0?os.ceil(a):os(a),a=ts.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?As(js(r.y,0,1)).getUTCDay():ks(js(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,As(r)):ks(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in Ns?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function ee(e){return i[+(e.getUTCHours()>=12)]}function te(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var Ns={"-":``,_:` `,0:`0`},Ps=/^\s*\d+/,Fs=/^%/,Is=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Ls(e){return e.replace(Is,`\\$&`)}function Rs(e){return RegExp(`^(?:`+e.map(Ls).join(`|`)+`)`,`i`)}function zs(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Bs(e,t,n){var r=Ps.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Vs(e,t,n){var r=Ps.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Hs(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Us(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ws(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Gs(e,t,n){var r=Ps.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ks(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qs(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Js(e,t,n){var r=Ps.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ys(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Xs(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zs(e,t,n){var r=Ps.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Qs(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function $s(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ec(e,t,n){var r=Ps.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tc(e,t,n){var r=Ps.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nc(e,t,n){var r=Ps.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rc(e,t,n){var r=Fs.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ic(e,t,n){var r=Ps.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ac(e,t,n){var r=Ps.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function oc(e,t){return q(e.getDate(),t,2)}function sc(e,t){return q(e.getHours(),t,2)}function cc(e,t){return q(e.getHours()%12||12,t,2)}function lc(e,t){return q(1+ts.count(Ss(e),e),t,3)}function uc(e,t){return q(e.getMilliseconds(),t,3)}function dc(e,t){return uc(e,t)+`000`}function fc(e,t){return q(e.getMonth()+1,t,2)}function pc(e,t){return q(e.getMinutes(),t,2)}function mc(e,t){return q(e.getSeconds(),t,2)}function hc(e){var t=e.getDay();return t===0?7:t}function gc(e,t){return q(as.count(Ss(e)-1,e),t,2)}function _c(e){var t=e.getDay();return t>=4||t===0?ls(e):ls.ceil(e)}function vc(e,t){return e=_c(e),q(ls.count(Ss(e),e)+(Ss(e).getDay()===4),t,2)}function yc(e){return e.getDay()}function bc(e,t){return q(os.count(Ss(e)-1,e),t,2)}function xc(e,t){return q(e.getFullYear()%100,t,2)}function Sc(e,t){return e=_c(e),q(e.getFullYear()%100,t,2)}function Cc(e,t){return q(e.getFullYear()%1e4,t,4)}function wc(e,t){var n=e.getDay();return e=n>=4||n===0?ls(e):ls.ceil(e),q(e.getFullYear()%1e4,t,4)}function Tc(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+q(t/60|0,`0`,2)+q(t%60,`0`,2)}function Ec(e,t){return q(e.getUTCDate(),t,2)}function Dc(e,t){return q(e.getUTCHours(),t,2)}function Oc(e,t){return q(e.getUTCHours()%12||12,t,2)}function kc(e,t){return q(1+ns.count(Cs(e),e),t,3)}function Ac(e,t){return q(e.getUTCMilliseconds(),t,3)}function jc(e,t){return Ac(e,t)+`000`}function Mc(e,t){return q(e.getUTCMonth()+1,t,2)}function Nc(e,t){return q(e.getUTCMinutes(),t,2)}function Pc(e,t){return q(e.getUTCSeconds(),t,2)}function Fc(e){var t=e.getUTCDay();return t===0?7:t}function Ic(e,t){return q(ps.count(Cs(e)-1,e),t,2)}function Lc(e){var t=e.getUTCDay();return t>=4||t===0?_s(e):_s.ceil(e)}function Rc(e,t){return e=Lc(e),q(_s.count(Cs(e),e)+(Cs(e).getUTCDay()===4),t,2)}function zc(e){return e.getUTCDay()}function Bc(e,t){return q(ms.count(Cs(e)-1,e),t,2)}function Vc(e,t){return q(e.getUTCFullYear()%100,t,2)}function Hc(e,t){return e=Lc(e),q(e.getUTCFullYear()%100,t,2)}function Uc(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function Wc(e,t){var n=e.getUTCDay();return e=n>=4||n===0?_s(e):_s.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function Gc(){return`+0000`}function Kc(){return`%`}function qc(e){return+e}function Jc(e){return Math.floor(e/1e3)}var Yc,Xc;Zc({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 Zc(e){return Yc=Ms(e),Xc=Yc.format,Yc.parse,Yc.utcFormat,Yc.utcParse,Yc}function Qc(e){return new Date(e)}function $c(e){return e instanceof Date?+e:+new Date(+e)}function el(e,t,n,r,i,a,o,s,c,l){var u=lo(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,$c)):f().map(Qc)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Ro(n,e)):u},u.copy=function(){return so(u,el(e,t,n,r,i,a,o,s,c,l))},u}function tl(){return Qa.apply(el(Ds,Os,Ss,bs,as,ts,$o,Zo,Xo,Xc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function nl(e){return function(){return e}}var rl=Math.PI,il=2*rl,al=1e-6,ol=il-al;function sl(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function cl(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return sl;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var ll=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?sl:cl(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>al)if(!(Math.abs(u*s-c*l)>al)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((rl-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>al&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>al||Math.abs(this._y1-l)>al)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%il+il),d>ol?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>al&&this._append`A${n},${n},0,${+(d>=rl)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function ul(){return new ll}ul.prototype=ll.prototype;function dl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new ll(t)}Array.prototype.slice;function fl(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function pl(e){this._context=e}pl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ml(e){return new pl(e)}function hl(e){return e[0]}function gl(e){return e[1]}function _l(e,t){var n=nl(!0),r=null,i=ml,a=null,o=dl(s);e=typeof e==`function`?e:e===void 0?hl:nl(e),t=typeof t==`function`?t:t===void 0?gl:nl(t);function s(s){var c,l=(s=fl(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:nl(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:nl(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:nl(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function vl(e,t,n){var r=null,i=nl(!0),a=null,o=ml,s=null,c=dl(l);e=typeof e==`function`?e:e===void 0?hl:nl(+e),t=typeof t==`function`?t:nl(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?gl:nl(+n);function l(l){var u,d,f,p=(l=fl(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return _l().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:nl(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:nl(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:nl(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:nl(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:nl(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:nl(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:nl(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function yl(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function bl(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function xl(e,t){return e[t]}function Sl(e){let t=[];return t.key=e,t}function Cl(){var e=nl([]),t=bl,n=yl,r=xl;function i(i){var a=Array.from(e.apply(this,arguments),Sl),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=fl(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:nl(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:nl(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?bl:typeof e==`function`?e:nl(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??yl,i):n},i}function wl(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Tl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var El={autoSleep:120,force3D:`auto`,nullTargetWarn:1,units:{lineHeight:``}},Dl={duration:.5,overwrite:!1,delay:0},Ol,kl,Al,jl=1e8,J=1/jl,Ml=Math.PI*2,Nl=Ml/4,Pl=0,Fl=Math.sqrt,Il=Math.cos,Ll=Math.sin,Rl=function(e){return typeof e==`string`},zl=function(e){return typeof e==`function`},Bl=function(e){return typeof e==`number`},Vl=function(e){return e===void 0},Hl=function(e){return typeof e==`object`},Ul=function(e){return e!==!1},Wl=function(){return typeof window<`u`},Gl=function(e){return zl(e)||Rl(e)},Kl=typeof ArrayBuffer==`function`&&ArrayBuffer.isView||function(){},ql=Array.isArray,Jl=/random\([^)]+\)/g,Yl=/,\s*/g,Xl=/(?:-?\.?\d|\.)+/gi,Zl=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ql=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,$l=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,eu=/[+-]=-?[.\d]+/,tu=/[^,'"\[\]\s]+/gi,nu=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ru,iu,au,ou,su={},cu={},lu,uu=function(e){return(cu=Hu(e,su))&&op},du=function(e,t){return console.warn(`Invalid property`,e,`set to`,t,`Missing plugin? gsap.registerPlugin()`)},fu=function(e,t){return!t&&console.warn(e)},pu=function(e,t){return e&&(su[e]=t)&&cu&&(cu[e]=t)||su},mu=function(){return 0},hu={suppressEvents:!0,isStart:!0,kill:!1},gu={suppressEvents:!0,kill:!1},_u={suppressEvents:!0},vu={},yu=[],bu={},xu,Su={},Cu={},wu=30,Tu=[],Eu=``,Du=function(e){var t=e[0],n,r;if(Hl(t)||zl(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=Tu.length;r--&&!Tu[r].targetTest(t););n=Tu[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new gf(e[r],n)))||e.splice(r,1);return e},Ou=function(e){return e._gsap||Du(Td(e))[0]._gsap},ku=function(e,t,n){return(n=e[t])&&zl(n)?e[t]():Vl(n)&&e.getAttribute&&e.getAttribute(t)||n},Au=function(e,t){return(e=e.split(`,`)).forEach(t)||e},ju=function(e){return Math.round(e*1e5)/1e5||0},Mu=function(e){return Math.round(e*1e7)/1e7||0},Nu=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n===`+`?e+r:n===`-`?e-r:n===`*`?e*r:e/r},Pu=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},Fu=function(){var e=yu.length,t=yu.slice(0),n,r;for(bu={},yu.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},Iu=function(e){return!!(e._initted||e._startAt||e.add)},Lu=function(e,t,n,r){yu.length&&!kl&&Fu(),e.render(t,n,r||!!(kl&&t<0&&Iu(e))),yu.length&&!kl&&Fu()},Ru=function(e){var t=parseFloat(e);return(t||t===0)&&(e+``).match(tu).length<2?t:Rl(e)?e.trim():e},zu=function(e){return e},Bu=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Vu=function(e){return function(t,n){for(var r in n)r in t||r===`duration`&&e||r===`ease`||(t[r]=n[r])}},Hu=function(e,t){for(var n in t)e[n]=t[n];return e},Uu=function e(t,n){for(var r in n)r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(t[r]=Hl(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},Wu=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},Gu=function(e){var t=e.parent||ru,n=e.keyframes?Vu(ql(e.keyframes)):Bu;if(Ul(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},Ku=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},qu=function(e,t,n,r,i){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var a=e[r],o;if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},Ju=function(e,t,n,r){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Yu=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Xu=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},Zu=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Qu=function(e,t,n,r){return e._startAt&&(kl?e._startAt.revert(gu):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},$u=function e(t){return!t||t._ts&&e(t.parent)},ed=function(e){return e._repeat?td(e._tTime,e=e.duration()+e._rDelay)*e:0},td=function(e,t){var n=Math.floor(e=Mu(e/t));return e&&n===e?n-1:n},nd=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},rd=function(e){return e._end=Mu(e._start+(e._tDur/Math.abs(e._ts||e._rts||J)||0))},id=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=Mu(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),rd(e),n._dirty||Xu(n,e)),e},ad=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=nd(e.rawTime(),t),(!t._dur||yd(0,t.totalDuration(),n)-t._tTime>J)&&t.render(n,!0)),Xu(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-J}},od=function(e,t,n,r){return t.parent&&Yu(t),t._start=Mu((Bl(n)?n:n||e!==ru?gd(e,n,t):e._time)+t._delay),t._end=Mu(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),qu(e,t,`_first`,`_last`,e._sort?`_start`:0),ud(t)||(e._recent=t),r||ad(e,t),e._ts<0&&id(e,e._tTime),e},sd=function(e,t){return(su.ScrollTrigger||du(`scrollTrigger`,t))&&su.ScrollTrigger.create(t,e)},cd=function(e,t,n,r,i){if(Tf(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!kl&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&xu!==nf.frame)return yu.push(e),e._lazy=[i,r],1},ld=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},ud=function(e){var t=e.data;return t===`isFromStart`||t===`isStart`},dd=function(e,t,n,r){var i=e.ratio,a=t<0||!t&&(!e._start&&ld(e)&&!(!e._initted&&ud(e))||(e._ts<0||e._dp._ts<0)&&!ud(e))?0:1,o=e._rDelay,s=0,c,l,u;if(o&&e._repeat&&(s=yd(0,e._tDur,t),l=td(s,o),e._yoyo&&l&1&&(a=1-a),l!==td(e._tTime,o)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||kl||r||e._zTime===J||!t&&e._zTime){if(!e._initted&&cd(e,t,r,n,s))return;for(u=e._zTime,e._zTime=t||(n?J:0),n||=t&&!u,e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=s,c=e._pt;c;)c.r(a,c.d),c=c._next;t<0&&Qu(e,t,n,!0),e._onUpdate&&!n&&Hd(e,`onUpdate`),s&&e._repeat&&!n&&e.parent&&Hd(e,`onRepeat`),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&Yu(e,1),!n&&!kl&&(Hd(e,a?`onComplete`:`onReverseComplete`,!0),e._prom&&e._prom()))}else e._zTime||=t},fd=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data===`isPause`&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data===`isPause`&&r._start<t)return r;r=r._prev}},pd=function(e,t,n,r){var i=e._repeat,a=Mu(t)||0,o=e._tTime/e._tDur;return o&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:Mu(a*(i+1)+e._rDelay*i):a,o>0&&!r&&id(e,e._tTime=e._tDur*o),e.parent&&rd(e),n||Xu(e.parent,e),e},md=function(e){return e instanceof vf?Xu(e):pd(e,e._dur)},hd={_start:0,endTime:mu,totalDuration:mu},gd=function e(t,n,r){var i=t.labels,a=t._recent||hd,o=t.duration()>=jl?a.endTime(!1):t._dur,s,c,l;return Rl(n)&&(isNaN(n)||n in i)?(c=n.charAt(0),l=n.substr(-1)===`%`,s=n.indexOf(`=`),c===`<`||c===`>`?(s>=0&&(n=n.replace(/=/,``)),(c===`<`?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(l?(s<0?a:r).totalDuration()/100:1)):s<0?(n in i||(i[n]=o),i[n]):(c=parseFloat(n.charAt(s-1)+n.substr(s+1)),l&&r&&(c=c/100*(ql(r)?r[0]:r).totalDuration()),s>1?e(t,n.substr(0,s-1),r)+c:o+c)):n==null?o:+n},_d=function(e,t,n){var r=Bl(t[1]),i=(r?2:1)+(e<2?0:1),a=t[i],o,s;if(r&&(a.duration=t[1]),a.parent=n,e){for(o=a,s=n;s&&!(`immediateRender`in o);)o=s.vars.defaults||{},s=Ul(s.vars.inherit)&&s.parent;a.immediateRender=Ul(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[i-1]}return new Mf(t[0],a,t[i+1])},vd=function(e,t){return e||e===0?t(e):t},yd=function(e,t,n){return n<e?e:n>t?t:n},bd=function(e,t){return!Rl(e)||!(t=nu.exec(e))?``:t[1]},xd=function(e,t,n){return vd(n,function(n){return yd(e,t,n)})},Sd=[].slice,Cd=function(e,t){return e&&Hl(e)&&`length`in e&&(!t&&!e.length||e.length-1 in e&&Hl(e[0]))&&!e.nodeType&&e!==iu},wd=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(e){var r;return Rl(e)&&!t||Cd(e,1)?(r=n).push.apply(r,Td(e)):n.push(e)})||n},Td=function(e,t,n){return Al&&!t&&Al.selector?Al.selector(e):Rl(e)&&!n&&(au||!rf())?Sd.call((t||ou).querySelectorAll(e),0):ql(e)?wd(e,n):Cd(e)?Sd.call(e,0):e?[e]:[]},Ed=function(e){return e=Td(e)[0]||fu(`Invalid scope`)||{},function(t){var n=e.current||e.nativeElement||e;return Td(t,n.querySelectorAll?n:n===e?fu(`Invalid scope`)||ou.createElement(`div`):e)}},Dd=function(e){return e.sort(function(){return .5-Math.random()})},Od=function(e){if(zl(e))return e;var t=Hl(e)?e:{each:e},n=df(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,c=t.axis,l=r,u=r;return Rl(r)?l=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(l=r[0],u=r[1]),function(e,o,d){var f=(d||t).length,p=a[f],m,h,g,_,v,y,b,x,S;if(!p){if(S=t.grid===`auto`?0:(t.grid||[1,jl])[1],!S){for(b=-jl;b<(b=d[S++].getBoundingClientRect().left)&&S<f;);S<f&&S--}for(p=a[f]=[],m=s?Math.min(S,f)*l-.5:r%S,h=S===jl?0:s?f*u/S-.5:r/S|0,b=0,x=jl,y=0;y<f;y++)g=y%S-m,_=h-(y/S|0),p[y]=v=c?Math.abs(c===`y`?_:g):Fl(g*g+_*_),v>b&&(b=v),v<x&&(x=v);r===`random`&&Dd(p),p.max=b-x,p.min=x,p.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(S>f?f-1:c?c===`y`?f/S:S:Math.max(S,f/S))||0)*(r===`edges`?-1:1),p.b=f<0?i-f:i,p.u=bd(t.amount||t.each)||0,n=n&&f<0?uf(n):n}return f=(p[e]-p.min)/p.max||0,Mu(p.b+(n?n(f):f)*p.v)+p.u}},kd=function(e){var t=10**((e+``).split(`.`)[1]||``).length;return function(n){var r=Mu(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(Bl(n)?0:bd(n))}},Ad=function(e,t){var n=ql(e),r,i;return!n&&Hl(e)&&(r=n=e.radius||jl,e.values?(e=Td(e.values),(i=!Bl(e[0]))&&(r*=r)):e=kd(e.increment)),vd(t,n?zl(e)?function(t){return i=e(t),Math.abs(i-t)<=r?i:t}:function(t){for(var n=parseFloat(i?t.x:t),a=parseFloat(i?t.y:0),o=jl,s=0,c=e.length,l,u;c--;)i?(l=e[c].x-n,u=e[c].y-a,l=l*l+u*u):l=Math.abs(e[c]-n),l<o&&(o=l,s=c);return s=!r||o<=r?e[s]:t,i||s===t||Bl(t)?s:s+bd(t)}:kd(e))},jd=function(e,t,n,r){return vd(ql(e)?!t:n===!0?!!(n=0):!r,function(){return ql(e)?e[~~(Math.random()*e.length)]:(n||=1e-5)&&(r=n<1?10**((n+``).length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},Md=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce(function(e,t){return t(e)},e)}},Nd=function(e,t){return function(n){return e(parseFloat(n))+(t||bd(n))}},Pd=function(e,t,n){return zd(e,t,0,1,n)},Fd=function(e,t,n){return vd(n,function(n){return e[~~t(n)]})},Id=function e(t,n,r){var i=n-t;return ql(t)?Fd(t,e(0,t.length),n):vd(r,function(e){return(i+(e-t)%i)%i+t})},Ld=function e(t,n,r){var i=n-t,a=i*2;return ql(t)?Fd(t,e(0,t.length-1),n):vd(r,function(e){return e=(a+(e-t)%a)%a||0,t+(e>i?a-e:e)})},Rd=function(e){return e.replace(Jl,function(e){var t=e.indexOf(`[`)+1,n=e.substring(t||7,t?e.indexOf(`]`):e.length-1).split(Yl);return jd(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)})},zd=function(e,t,n,r,i){var a=t-e,o=r-n;return vd(i,function(t){return n+((t-e)/a*o||0)})},Bd=function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o=Rl(t),s={},c,l,u,d,f;if(r===!0&&(i=1)&&(r=null),o)t={p:t},n={p:n};else if(ql(t)&&!ql(n)){for(u=[],d=t.length,f=d-2,l=1;l<d;l++)u.push(e(t[l-1],t[l]));d--,a=function(e){e*=d;var t=Math.min(f,~~e);return u[t](e-t)},r=n}else i||(t=Hu(ql(t)?[]:{},t));if(!u){for(c in n)bf.call(s,t,c,`get`,n[c]);a=function(e){return Vf(e,s)||(o?t.p:t)}}}return vd(r,a)},Vd=function(e,t,n){var r=e.labels,i=jl,a,o,s;for(a in r)o=r[a]-t,o<0==!!n&&o&&i>(o=Math.abs(o))&&(s=a,i=o);return s},Hd=function(e,t,n){var r=e.vars,i=r[t],a=Al,o=e._ctx,s,c,l;if(i)return s=r[t+`Params`],c=r.callbackScope||e,n&&yu.length&&Fu(),o&&(Al=o),l=s?i.apply(c,s):i.call(c),Al=a,l},Ud=function(e){return Yu(e),e.scrollTrigger&&e.scrollTrigger.kill(!!kl),e.progress()<1&&Hd(e,`onInterrupt`),e},Wd,Gd=[],Kd=function(e){if(e)if(e=!e.name&&e.default||e,Wl()||e.headless){var t=e.name,n=zl(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:mu,render:Vf,add:bf,kill:Uf,modifier:Hf,rawVars:0},a={targetTest:0,get:0,getSetter:Lf,aliases:{},register:0};if(rf(),e!==r){if(Su[t])return;Bu(r,Bu(Wu(e,i),a)),Hu(r.prototype,Hu(i,Wu(e,a))),Su[r.prop=t]=r,e.targetTest&&(Tu.push(r),vu[t]=1),t=(t===`css`?`CSS`:t.charAt(0).toUpperCase()+t.substr(1))+`Plugin`}pu(t,r),e.register&&e.register(op,r,Kf)}else Gd.push(e)},Y=255,qd={aqua:[0,Y,Y],lime:[0,Y,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Y],navy:[0,0,128],white:[Y,Y,Y],olive:[128,128,0],yellow:[Y,Y,0],orange:[Y,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Y,0,0],pink:[Y,192,203],cyan:[0,Y,Y],transparent:[Y,Y,Y,0]},Jd=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Y+.5|0},Yd=function(e,t,n){var r=e?Bl(e)?[e>>16,e>>8&Y,e&Y]:0:qd.black,i,a,o,s,c,l,u,d,f,p;if(!r){if(e.substr(-1)===`,`&&(e=e.substr(0,e.length-1)),qd[e])r=qd[e];else if(e.charAt(0)===`#`){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e=`#`+i+i+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):``)),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Y,r&Y,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Y,e&Y]}else if(e.substr(0,3)===`hsl`){if(r=p=e.match(Xl),!t)s=r[0]%360/360,c=r[1]/100,l=r[2]/100,a=l<=.5?l*(c+1):l+c-l*c,i=l*2-a,r.length>3&&(r[3]*=1),r[0]=Jd(s+1/3,i,a),r[1]=Jd(s,i,a),r[2]=Jd(s-1/3,i,a);else if(~e.indexOf(`=`))return r=e.match(Zl),n&&r.length<4&&(r[3]=1),r}else r=e.match(Xl)||qd.transparent;r=r.map(Number)}return t&&!p&&(i=r[0]/Y,a=r[1]/Y,o=r[2]/Y,u=Math.max(i,a,o),d=Math.min(i,a,o),l=(u+d)/2,u===d?s=c=0:(f=u-d,c=l>.5?f/(2-u-d):f/(u+d),s=u===i?(a-o)/f+(a<o?6:0):u===a?(o-i)/f+2:(i-a)/f+4,s*=60),r[0]=~~(s+.5),r[1]=~~(c*100+.5),r[2]=~~(l*100+.5)),n&&r.length<4&&(r[3]=1),r},Xd=function(e){var t=[],n=[],r=-1;return e.split(Qd).forEach(function(e){var i=e.match(Ql)||[];t.push.apply(t,i),n.push(r+=i.length+1)}),t.c=n,t},Zd=function(e,t,n){var r=``,i=(e+r).match(Qd),a=t?`hsla(`:`rgba(`,o=0,s,c,l,u;if(!i)return e;if(i=i.map(function(e){return(e=Yd(e,t,1))&&a+(t?e[0]+`,`+e[1]+`%,`+e[2]+`%,`+e[3]:e.join(`,`))+`)`}),n&&(l=Xd(e),s=n.c,s.join(r)!==l.c.join(r)))for(c=e.replace(Qd,`1`).split(Ql),u=c.length-1;o<u;o++)r+=c[o]+(~s.indexOf(o)?i.shift()||a+`0,0,0,0)`:(l.length?l:i.length?i:n).shift());if(!c)for(c=e.split(Qd),u=c.length-1;o<u;o++)r+=c[o]+i[o];return r+c[u]},Qd=function(){var e=`(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b`,t;for(t in qd)e+=`|`+t+`\\b`;return RegExp(e+`)`,`gi`)}(),$d=/hsl[a]?\(/,ef=function(e){var t=e.join(` `),n;if(Qd.lastIndex=0,Qd.test(t))return n=$d.test(t),e[1]=Zd(e[1],n),e[0]=Zd(e[0],n,Xd(e[1])),!0},tf,nf=function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,o=a,s=[],c,l,u,d,f,p,m=function u(m){var h=e()-i,g=m===!0,_,v,y,b;if((h>t||h<0)&&(r+=h-n),i+=h,y=i-r,_=y-o,(_>0||g)&&(b=++d.frame,f=y-d.time*1e3,d.time=y/=1e3,o+=_+(_>=a?4:a-_),v=1),g||(c=l(u)),v)for(p=0;p<s.length;p++)s[p](y,f,b,m)};return d={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(e){return f/(1e3/(e||60))},wake:function(){lu&&(!au&&Wl()&&(iu=au=window,ou=iu.document||{},su.gsap=op,(iu.gsapVersions||=[]).push(op.version),uu(cu||iu.GreenSockGlobals||!iu.gsap&&iu||{}),Gd.forEach(Kd)),u=typeof requestAnimationFrame<`u`&&requestAnimationFrame,c&&d.sleep(),l=u||function(e){return setTimeout(e,o-d.time*1e3+1|0)},tf=1,m(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(c),tf=0,l=mu},lagSmoothing:function(e,r){t=e||1/0,n=Math.min(r||33,t)},fps:function(e){a=1e3/(e||240),o=d.time*1e3+a},add:function(e,t,n){var r=t?function(t,n,i,a){e(t,n,i,a),d.remove(r)}:e;return d.remove(e),s[n?`unshift`:`push`](r),rf(),r},remove:function(e,t){~(t=s.indexOf(e))&&s.splice(t,1)&&p>=t&&p--},_listeners:s},d}(),rf=function(){return!tf&&nf.wake()},X={},af=/^[\d.\-M][\d.\-,\s]/,of=/["']/g,sf=function(e){for(var t={},n=e.substr(1,e.length-3).split(`:`),r=n[0],i=1,a=n.length,o,s,c;i<a;i++)s=n[i],o=i===a-1?s.length:s.lastIndexOf(`,`),c=s.substr(0,o),t[r]=isNaN(c)?c.replace(of,``).trim():+c,r=s.substr(o+1).trim();return t},cf=function(e){var t=e.indexOf(`(`)+1,n=e.indexOf(`)`),r=e.indexOf(`(`,t);return e.substring(t,~r&&r<n?e.indexOf(`)`,n+1):n)},lf=function(e){var t=(e+``).split(`(`),n=X[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf(`{`)?[sf(t[1])]:cf(e).split(`,`).map(Ru)):X._CE&&af.test(e)?X._CE(``,e):n},uf=function(e){return function(t){return 1-e(1-t)}},df=function(e,t){return e&&(zl(e)?e:X[e]||lf(e))||t},ff=function(e,t,n,r){n===void 0&&(n=function(e){return 1-t(1-e)}),r===void 0&&(r=function(e){return e<.5?t(e*2)/2:1-t((1-e)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},a;return Au(e,function(e){for(var t in X[e]=su[e]=i,X[a=e.toLowerCase()]=n,i)X[a+(t===`easeIn`?`.in`:t===`easeOut`?`.out`:`.inOut`)]=X[e+`.`+t]=i[t]}),i},pf=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},mf=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/Ml*(Math.asin(1/i)||0),s=function(e){return e===1?1:i*2**(-10*e)*Ll((e-o)*a)+1},c=t===`out`?s:t===`in`?function(e){return 1-s(1-e)}:pf(s);return a=Ml/a,c.config=function(n,r){return e(t,n,r)},c},hf=function e(t,n){n===void 0&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i=t===`out`?r:t===`in`?function(e){return 1-r(1-e)}:pf(r);return i.config=function(n){return e(t,n)},i};Au(`Linear,Quad,Cubic,Quart,Quint,Strong`,function(e,t){var n=t<5?t+1:t;ff(e+`,Power`+(n-1),t?function(e){return e**+n}:function(e){return e},function(e){return 1-(1-e)**n},function(e){return e<.5?(e*2)**n/2:1-((1-e)*2)**n/2})}),X.Linear.easeNone=X.none=X.Linear.easeIn,ff(`Elastic`,mf(`in`),mf(`out`),mf()),(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(a){return a<n?e*a*a:a<r?e*(a-1.5/t)**2+.75:a<i?e*(a-=2.25/t)*a+.9375:e*(a-2.625/t)**2+.984375};ff(`Bounce`,function(e){return 1-a(1-e)},a)})(7.5625,2.75),ff(`Expo`,function(e){return 2**(10*(e-1))*e+e*e*e*e*e*e*(1-e)}),ff(`Circ`,function(e){return-(Fl(1-e*e)-1)}),ff(`Sine`,function(e){return e===1?1:-Il(e*Nl)+1}),ff(`Back`,hf(`in`),hf(`out`),hf()),X.SteppedEase=X.steps=su.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+ +!t,i=+!!t,a=1-J;return function(e){return((r*yd(0,a,e)|0)+i)*n}}},Dl.ease=X[`quad.out`],Au(`onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt`,function(e){return Eu+=e+`,`+e+`Params,`});var gf=function(e,t){this.id=Pl++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:ku,this.set=t?t.getSetter:Lf},_f=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,pd(this,+e.duration,1,1),this.data=e.data,Al&&(this._ctx=Al,Al.data.push(this)),tf||nf.wake()}var t=e.prototype;return t.delay=function(e){return e||e===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,pd(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(rf(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(id(this,e),!n._dp||n.parent||ad(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&od(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===J||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),Lu(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+ed(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-e:e)+ed(this),t):this.duration()?Math.min(1,this._time/this._dur):+(this.rawTime()>0)},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?td(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-J?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?nd(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-J?0:this._rts,this.totalTime(yd(-Math.abs(this._delay),this.totalDuration(),n),t!==!1),rd(this),Zu(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(rf(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==J&&(this._tTime-=J)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=Mu(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&od(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(Ul(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?nd(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){e===void 0&&(e=_u);var t=kl;return kl=e,Iu(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),this.data!==`nested`&&e.kill!==!1&&this.kill(),kl=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,md(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,md(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(gd(this,e),Ul(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,Ul(t)),this._dur||(this._zTime=-J),this},t.play=function(e,t){return e!=null&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return e!=null&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return e!=null&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-J:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-J,this},t.isActive=function(){var e=this.parent||this._dp,t=this._start,n;return!!(!e||this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=t&&n<this.endTime(!0)-J)},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+`Params`]=n),e===`onUpdate`&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise(function(r){var i=zl(e)?e:zu,a=function(){var e=t.then;t.then=null,n&&n(),zl(i)&&(i=i(t))&&(i.then||i===t)&&(t.then=e),r(i),t.then=e};t._initted&&t.totalProgress()===1&&t._ts>=0||!t._tTime&&t._ts<0?a():t._prom=a})},t.kill=function(){Ud(this)},e}();Bu(_f.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-J,_prom:0,_ps:!1,_rts:1});var vf=function(e){Tl(t,e);function t(t,n){var r;return t===void 0&&(t={}),r=e.call(this,t)||this,r.labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=Ul(t.sortChildren),ru&&od(t.parent||ru,wl(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&sd(wl(r),t.scrollTrigger),r}var n=t.prototype;return n.to=function(e,t,n){return _d(0,arguments,this),this},n.from=function(e,t,n){return _d(1,arguments,this),this},n.fromTo=function(e,t,n,r){return _d(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,Gu(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Mf(e,t,gd(this,n),1),this},n.call=function(e,t,n){return od(this,Mf.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new Mf(e,n,gd(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,Gu(n).immediateRender=Ul(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,Gu(r).immediateRender=Ul(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r=this._time,i=this._dirty?this.totalDuration():this._tDur,a=this._dur,o=e<=0?0:Mu(e),s=this._zTime<0!=e<0&&(this._initted||!a),c,l,u,d,f,p,m,h,g,_,v,y;if(this!==ru&&o>i&&e>=0&&(o=i),o!==this._tTime||n||s){if(r!==this._time&&a&&(o+=this._time-r,e+=this._time-r),c=o,g=this._start,h=this._ts,p=!h,s&&(a||(r=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(v=this._yoyo,f=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(f*100+e,t,n);if(c=Mu(o%f),o===i?(d=this._repeat,c=a):(_=Mu(o/f),d=~~_,d&&d===_&&(c=a,d--),c>a&&(c=a)),_=td(this._tTime,f),!r&&this._tTime&&_!==d&&this._tTime-_*f-this._dur<=0&&(_=d),v&&d&1&&(c=a-c,y=1),d!==_&&!this._lock){var b=v&&_&1,x=b===(v&&d&1);if(d<_&&(b=!b),r=b?0:o%a?a:o,this._lock=1,this.render(r||(y?0:Mu(d*f)),t,!a)._lock=0,this._tTime=o,!t&&this.parent&&Hd(this,`onRepeat`),this.vars.repeatRefresh&&!y&&(this.invalidate()._lock=1,_=d),r&&r!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act||(a=this._dur,i=this._tDur,x&&(this._lock=2,r=b?a:-1e-4,this.render(r,!0),this.vars.repeatRefresh&&!y&&this.invalidate()),this._lock=0,!this._ts&&!p))return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(m=fd(this,Mu(r),Mu(c)),m&&(o-=c-(c=m._start))),this._tTime=o,this._time=c,this._act=!!h,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,r=0),!r&&o&&a&&!t&&!_&&(Hd(this,`onStart`),this._tTime!==o))return this;if(c>=r&&e>=0)for(l=this._first;l;){if(u=l._next,(l._act||c>=l._start)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(c-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(c-l._start)*l._ts,t,n),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=-J);break}}l=u}else{l=this._last;for(var S=e<0?e:c;l;){if(u=l._prev,(l._act||S<=l._end)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(S-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(S-l._start)*l._ts,t,n||kl&&Iu(l)),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=S?-J:J);break}}l=u}}if(m&&!t&&(this.pause(),m.render(c>=r?0:-J)._zTime=c>=r?1:-1,this._ts))return this._start=g,rd(this),this.render(e,t,n);this._onUpdate&&!t&&Hd(this,`onUpdate`,!0),(o===i&&this._tTime>=this.totalDuration()||!o&&r)&&(g===this._start||Math.abs(h)!==Math.abs(this._ts))&&(this._lock||((e||!a)&&(o===i&&this._ts>0||!o&&this._ts<0)&&Yu(this,1),!t&&!(e<0&&!r)&&(o||r||!i)&&(Hd(this,o===i&&e>=0?`onComplete`:`onReverseComplete`,!0),this._prom&&!(o<i&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(Bl(t)||(t=gd(this,t,e)),!(e instanceof _f)){if(ql(e))return e.forEach(function(e){return n.add(e,t)}),this;if(Rl(e))return this.addLabel(e,t);if(zl(e))e=Mf.delayedCall(0,e);else return this}return this===e?this:od(this,e,t)},n.getChildren=function(e,t,n,r){e===void 0&&(e=!0),t===void 0&&(t=!0),n===void 0&&(n=!0),r===void 0&&(r=-jl);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof Mf?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return Rl(e)?this.removeLabel(e):zl(e)?this.killTweensOf(e):(e.parent===this&&Ju(this,e),e===this._recent&&(this._recent=this._last),Xu(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Mu(nf.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=gd(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=Mf.delayedCall(0,t||mu,n);return r.data=`isPause`,this._hasPause=1,od(this,r,gd(this,e))},n.removePause=function(e){var t=this._first;for(e=gd(this,e);t;)t._start===e&&t.data===`isPause`&&Yu(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)Cf!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n=[],r=Td(e),i=this._first,a=Bl(t),o;i;)i instanceof Mf?Pu(i._targets,r)&&(a?(!Cf||i._initted&&i._ts)&&i.globalTime(0)<=t&&i.globalTime(i.totalDuration())>t:!t||i.isActive())&&n.push(i):(o=i.getTweensOf(r,t)).length&&n.push.apply(n,o),i=i._next;return n},n.tweenTo=function(e,t){t||={};var n=this,r=gd(n,e),i=t,a=i.startAt,o=i.onStart,s=i.onStartParams,c=i.immediateRender,l,u=Mf.to(n,Bu({ease:t.ease||`none`,lazy:!1,immediateRender:!1,time:r,overwrite:`auto`,duration:t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale())||J,onStart:function(){if(n.pause(),!l){var e=t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale());u._dur!==e&&pd(u,e,0,1).render(u._time,!0,!0),l=1}o&&o.apply(u,s||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,Bu({startAt:{time:gd(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return e===void 0&&(e=this._time),Vd(this,gd(this,e))},n.previousLabel=function(e){return e===void 0&&(e=this._time),Vd(this,gd(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+J)},n.shiftChildren=function(e,t,n){n===void 0&&(n=0);var r=this._first,i=this.labels,a;for(e=Mu(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(a in i)i[a]>=n&&(i[a]+=e);return Xu(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){e===void 0&&(e=!0);for(var t=this._first,n;t;)n=t._next,this.remove(t),t=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),Xu(this)},n.totalDuration=function(e){var t=0,n=this,r=n._last,i=jl,a,o,s;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(s=n.parent;r;)a=r._prev,r._dirty&&r.totalDuration(),o=r._start,o>i&&n._sort&&r._ts&&!n._lock?(n._lock=1,od(n,r,o-r._delay,1)._lock=0):i=o,o<0&&r._ts&&(t-=o,(!s&&!n._dp||s&&s.smoothChildTiming)&&(n._start+=Mu(o/n._ts),n._time-=o,n._tTime-=o),n.shiftChildren(-o,!1,-1/0),i=0),r._end>t&&r._ts&&(t=r._end),r=a;pd(n,n===ru&&n._time>t?n._time:t,1,1),n._dirty=0}return n._tDur},t.updateRoot=function(e){if(ru._ts&&(Lu(ru,nd(e,ru)),xu=nf.frame),nf.frame>=wu){wu+=El.autoSleep||120;var t=ru._first;if((!t||!t._ts)&&El.autoSleep&&nf._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||nf.sleep()}}},t}(_f);Bu(vf.prototype,{_lock:0,_hasPause:0,_forcing:0});var yf=function(e,t,n,r,i,a,o){var s=new Kf(this._pt,e,t,0,1,Bf,null,i),c=0,l=0,u,d,f,p,m,h,g,_;for(s.b=n,s.e=r,n+=``,r+=``,(g=~r.indexOf(`random(`))&&(r=Rd(r)),a&&(_=[n,r],a(_,e,t),n=_[0],r=_[1]),d=n.match($l)||[];u=$l.exec(r);)p=u[0],m=r.substring(c,u.index),f?f=(f+1)%5:m.substr(-5)===`rgba(`&&(f=1),p!==d[l++]&&(h=parseFloat(d[l-1])||0,s._pt={_next:s._pt,p:m||l===1?m:`,`,s:h,c:p.charAt(1)===`=`?Nu(h,p)-h:parseFloat(p)-h,m:f&&f<4?Math.round:0},c=$l.lastIndex);return s.c=c<r.length?r.substring(c,r.length):``,s.fp=o,(eu.test(r)||g)&&(s.e=0),this._pt=s,s},bf=function(e,t,n,r,i,a,o,s,c,l){zl(r)&&(r=r(i||0,e,a));var u=e[t],d=n===`get`?zl(u)?c?e[t.indexOf(`set`)||!zl(e[`get`+t.substr(3)])?t:`get`+t.substr(3)](c):e[t]():u:n,f=zl(u)?c?Ff:Pf:Nf,p;if(Rl(r)&&(~r.indexOf(`random(`)&&(r=Rd(r)),r.charAt(1)===`=`&&(p=Nu(d,r)+(bd(d)||0),(p||p===0)&&(r=p))),!l||d!==r||wf)return!isNaN(d*r)&&r!==``?(p=new Kf(this._pt,e,t,+d||0,r-(d||0),typeof u==`boolean`?zf:Rf,0,f),c&&(p.fp=c),o&&p.modifier(o,this,e),this._pt=p):(!u&&!(t in e)&&du(t,r),yf.call(this,e,t,d,r,f,s||El.stringFilter,c))},xf=function(e,t,n,r,i){if(zl(e)&&(e=kf(e,i,t,n,r)),!Hl(e)||e.style&&e.nodeType||ql(e)||Kl(e))return Rl(e)?kf(e,i,t,n,r):e;var a={},o;for(o in e)a[o]=kf(e[o],i,t,n,r);return a},Sf=function(e,t,n,r,i,a){var o,s,c,l;if(Su[e]&&(o=new Su[e]).init(i,o.rawVars?t[e]:xf(t[e],r,i,a,n),n,r,a)!==!1&&(n._pt=s=new Kf(n._pt,i,e,0,1,o.render,o,0,o.priority),n!==Wd))for(c=n._ptLookup[n._targets.indexOf(i)],l=o._props.length;l--;)c[o._props[l]]=s;return o},Cf,wf,Tf=function e(t,n,r){var i=t.vars,a=i.ease,o=i.startAt,s=i.immediateRender,c=i.lazy,l=i.onUpdate,u=i.runBackwards,d=i.yoyoEase,f=i.keyframes,p=i.autoRevert,m=t._dur,h=t._startAt,g=t._targets,_=t.parent,v=_&&_.data===`nested`?_.vars.targets:g,y=t._overwrite===`auto`&&!Ol,b=t.timeline,x=i.easeReverse||d,S,C,w,T,E,D,O,k,A,j,M,N,P;if(b&&(!f||!a)&&(a=`none`),t._ease=df(a,Dl.ease),t._rEase=x&&(df(x)||t._ease),t._from=!b&&!!i.runBackwards,t._from&&(t.ratio=1),!b||f&&!i.stagger){if(k=g[0]?Ou(g[0]).harness:0,N=k&&i[k.prop],S=Wu(i,vu),h&&(h._zTime<0&&h.progress(1),n<0&&u&&s&&!p?h.render(-1,!0):h.revert(u&&m?gu:hu),h._lazy=0),o){if(Yu(t._startAt=Mf.set(g,Bu({data:`isStart`,overwrite:!1,parent:_,immediateRender:!0,lazy:!h&&Ul(c),startAt:null,delay:0,onUpdate:l&&function(){return Hd(t,`onUpdate`)},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(kl||!s&&!p)&&t._startAt.revert(gu),s&&m&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(u&&m&&!h){if(n&&(s=!1),w=Bu({overwrite:!1,data:`isFromStart`,lazy:s&&!h&&Ul(c),immediateRender:s,stagger:0,parent:_},S),N&&(w[k.prop]=N),Yu(t._startAt=Mf.set(g,w)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(kl?t._startAt.revert(gu):t._startAt.render(-1,!0)),t._zTime=n,!s)e(t._startAt,J,J);else if(!n)return}for(t._pt=t._ptCache=0,c=m&&Ul(c)||c&&!m,C=0;C<g.length;C++){if(E=g[C],O=E._gsap||Du(g)[C]._gsap,t._ptLookup[C]=j={},bu[O.id]&&yu.length&&Fu(),M=v===g?C:v.indexOf(E),k&&(A=new k).init(E,N||S,t,M,v)!==!1&&(t._pt=T=new Kf(t._pt,E,A.name,0,1,A.render,A,0,A.priority),A._props.forEach(function(e){j[e]=T}),A.priority&&(D=1)),!k||N)for(w in S)Su[w]&&(A=Sf(w,S,t,M,E,v))?A.priority&&(D=1):j[w]=T=bf.call(t,E,w,`get`,S[w],M,v,0,i.stringFilter);t._op&&t._op[C]&&t.kill(E,t._op[C]),y&&t._pt&&(Cf=t,ru.killTweensOf(E,j,t.globalTime(n)),P=!t.parent,Cf=0),t._pt&&c&&(bu[O.id]=1)}D&&Gf(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!P,f&&n<=0&&b.render(jl,!0,!0)},Ef=function(e,t,n,r,i,a,o,s){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],l,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(l=d[f][t],l&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return wf=1,e.vars[t]=`+=0`,Tf(e,o),wf=0,s?fu(t+` not eligible for reset. Try splitting into individual properties`):1;c.push(l)}for(f=c.length;f--;)u=c[f],l=u._pt||u,l.s=(r||r===0)&&!i?r:l.s+(r||0)+a*l.c,l.c=n-l.s,u.e&&=ju(n)+bd(u.e),u.b&&=l.s+bd(u.b)},Df=function(e,t){var n=e[0]?Ou(e[0]).harness:0,r=n&&n.aliases,i,a,o,s;if(!r)return t;for(a in i=Hu({},t),r)if(a in i)for(s=r[a].split(`,`),o=s.length;o--;)i[s[o]]=i[a];return i},Of=function(e,t,n,r){var i=t.ease||r||`power1.inOut`,a,o;if(ql(t))o=n[e]||(n[e]=[]),t.forEach(function(e,n){return o.push({t:n/(t.length-1)*100,v:e,e:i})});else for(a in t)o=n[a]||(n[a]=[]),a===`ease`||o.push({t:parseFloat(e),v:t[a],e:i})},kf=function(e,t,n,r,i){return zl(e)?e.call(t,n,r,i):Rl(e)&&~e.indexOf(`random(`)?Rd(e):e},Af=Eu+`repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert`,jf={};Au(Af+`,id,stagger,delay,duration,paused,scrollTrigger`,function(e){return jf[e]=1});var Mf=function(e){Tl(t,e);function t(t,n,r,i){var a;typeof n==`number`&&(r.duration=n,n=r,r=null),a=e.call(this,i?n:Gu(n))||this;var o=a.vars,s=o.duration,c=o.delay,l=o.immediateRender,u=o.stagger,d=o.overwrite,f=o.keyframes,p=o.defaults,m=o.scrollTrigger,h=n.parent||ru,g=(ql(t)||Kl(t)?Bl(t[0]):`length`in n)?[t]:Td(t),_,v,y,b,x,S,C,w;if(a._targets=g.length?Du(g):fu(`GSAP target `+t+` not found. https://gsap.com`,!El.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,f||u||Gl(s)||Gl(c)){n=a.vars;var T=n.easeReverse||n.yoyoEase;if(_=a.timeline=new vf({data:`nested`,defaults:p||{},targets:h&&h.data===`nested`?h.vars.targets:g}),_.kill(),_.parent=_._dp=wl(a),_._start=0,u||Gl(s)||Gl(c)){if(b=g.length,C=u&&Od(u),Hl(u))for(x in u)~Af.indexOf(x)&&(w||={},w[x]=u[x]);for(v=0;v<b;v++)y=Wu(n,jf),y.stagger=0,T&&(y.easeReverse=T),w&&Hu(y,w),S=g[v],y.duration=+kf(s,wl(a),v,S,g),y.delay=(+kf(c,wl(a),v,S,g)||0)-a._delay,!u&&b===1&&y.delay&&(a._delay=c=y.delay,a._start+=c,y.delay=0),_.to(S,y,C?C(v,S,g):0),_._ease=X.none;_.duration()?s=c=0:a.timeline=0}else if(f){Gu(Bu(_.vars.defaults,{ease:`none`})),_._ease=df(f.ease||n.ease||`none`);var E=0,D,O,k;if(ql(f))f.forEach(function(e){return _.to(g,e,`>`)}),_.duration();else{for(x in y={},f)x===`ease`||x===`easeEach`||Of(x,f[x],y,f.easeEach);for(x in y)for(D=y[x].sort(function(e,t){return e.t-t.t}),E=0,v=0;v<D.length;v++)O=D[v],k={ease:O.e,duration:(O.t-(v?D[v-1].t:0))/100*s},k[x]=O.v,_.to(g,k,E),E+=k.duration;_.duration()<s&&_.to({},{duration:s-_.duration()})}}s||a.duration(s=_.duration())}else a.timeline=0;return d===!0&&!Ol&&(Cf=wl(a),ru.killTweensOf(g),Cf=0),od(h,wl(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(l||!s&&!f&&a._start===Mu(h._time)&&Ul(l)&&$u(wl(a))&&h.data!==`nested`)&&(a._tTime=-J,a.render(Math.max(0,-c)||0)),m&&sd(wl(a),m),a}var n=t.prototype;return n.render=function(e,t,n){var r=this._time,i=this._tDur,a=this._dur,o=e<0,s=e>i-J&&!o?i:e<J?0:e,c,l,u,d,f,p,m,h;if(!a)dd(this,e,t,n);else if(s!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==o||this._lazy){if(c=s,h=this.timeline,this._repeat){if(d=a+this._rDelay,this._repeat<-1&&o)return this.totalTime(d*100+e,t,n);if(c=Mu(s%d),s===i?(u=this._repeat,c=a):(f=Mu(s/d),u=~~f,u&&u===f?(c=a,u--):c>a&&(c=a)),p=this._yoyo&&u&1,p&&(c=a-c),f=td(this._tTime,d),c===r&&!n&&this._initted&&u===f)return this._tTime=s,this;u!==f&&this.vars.repeatRefresh&&!p&&!this._lock&&c!==d&&this._initted&&(this._lock=n=1,this.render(Mu(d*u),!0).invalidate()._lock=0)}if(!this._initted){if(cd(this,o?e:c,n,t,s))return this._tTime=0,this;if(r!==this._time&&!(n&&this.vars.repeatRefresh&&u!==f))return this;if(a!==this._dur)return this.render(e,t,n)}if(this._rEase){var g=c<r;if(g!==this._inv){var _=g?r:a-r;this._inv=g,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=r,this._invRecip=_?(g?-1:1)/_:0,this._invScale=g?-this.ratio:1-this.ratio,this._invEase=g?this._rEase:this._ease}this.ratio=m=this._invRatio+this._invScale*this._invEase((c-this._invTime)*this._invRecip)}else this.ratio=m=this._ease(c/a);if(this._from&&(this.ratio=m=1-m),this._tTime=s,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),!r&&s&&!t&&!f&&(Hd(this,`onStart`),this._tTime!==s))return this;for(l=this._pt;l;)l.r(m,l.d),l=l._next;h&&h.render(e<0?e:h._dur*h._ease(c/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(o&&Qu(this,e,t,n),Hd(this,`onUpdate`)),this._repeat&&u!==f&&this.vars.onRepeat&&!t&&this.parent&&Hd(this,`onRepeat`),(s===this._tDur||!s)&&this._tTime===s&&(o&&!this._onUpdate&&Qu(this,e,!0,!0),(e||!a)&&(s===this._tDur&&this._ts>0||!s&&this._ts<0)&&Yu(this,1),!t&&!(o&&!r)&&(s||r||p)&&(Hd(this,s===i?`onComplete`:`onReverseComplete`,!0),this._prom&&!(s<i&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,i){tf||nf.wake(),this._ts||this.play();var a=Math.min(this._dur,(this._dp._time-this._start)*this._ts),o;return this._initted||Tf(this,a),o=this._ease(a/this._dur),Ef(this,e,t,n,r,o,a,i)?this.resetTo(e,t,n,r,1):(id(this,0),this.parent||qu(this._dp,this,`_first`,`_last`,this._dp._sort?`_start`:0),this.render(0))},n.kill=function(e,t){if(t===void 0&&(t=`all`),!e&&(!t||t===`all`))return this._lazy=this._pt=0,this.parent?Ud(this):this.scrollTrigger&&this.scrollTrigger.kill(!!kl),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,Cf&&Cf.vars.overwrite!==!0)._first||Ud(this),this.parent&&n!==this.timeline.totalDuration()&&pd(this,this._dur*this.timeline._tDur/n,0,1),this}var r=this._targets,i=e?Td(e):r,a=this._ptLookup,o=this._pt,s,c,l,u,d,f,p;if((!t||t===`all`)&&Ku(r,i))return t===`all`&&(this._pt=0),Ud(this);for(s=this._op=this._op||[],t!==`all`&&(Rl(t)&&(d={},Au(t,function(e){return d[e]=1}),t=d),t=Df(r,t)),p=r.length;p--;)if(~i.indexOf(r[p]))for(d in c=a[p],t===`all`?(s[p]=t,u=c,l={}):(l=s[p]=s[p]||{},u=t),u)f=c&&c[d],f&&((!(`kill`in f.d)||f.d.kill(d)===!0)&&Ju(this,f,`_pt`),delete c[d]),l!==`all`&&(l[d]=1);return this._initted&&!this._pt&&o&&Ud(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return _d(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return _d(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return ru.killTweensOf(e,t,n)},t}(_f);Bu(Mf.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Au(`staggerTo,staggerFrom,staggerFromTo`,function(e){Mf[e]=function(){var t=new vf,n=Sd.call(arguments,0);return n.splice(e===`staggerFromTo`?5:4,0,0),t[e].apply(t,n)}});var Nf=function(e,t,n){return e[t]=n},Pf=function(e,t,n){return e[t](n)},Ff=function(e,t,n,r){return e[t](r.fp,n)},If=function(e,t,n){return e.setAttribute(t,n)},Lf=function(e,t){return zl(e[t])?Pf:Vl(e[t])&&e.setAttribute?If:Nf},Rf=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},zf=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Bf=function(e,t){var n=t._pt,r=``;if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},Vf=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},Hf=function(e,t,n,r){for(var i=this._pt,a;i;)a=i._next,i.p===r&&i.modifier(e,t,n),i=a},Uf=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Ju(this,t,`_pt`):t.dep||(n=1),t=r;return!n},Wf=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},Gf=function(e){for(var t=e._pt,n,r,i,a;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=i},Kf=function(){function e(e,t,n,r,i,a,o,s,c){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||Rf,this.d=o||this,this.set=s||Nf,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=e.prototype;return t.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=Wf,this.m=e,this.mt=n,this.tween=t},e}();Au(Eu+`parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse`,function(e){return vu[e]=1}),su.TweenMax=su.TweenLite=Mf,su.TimelineLite=su.TimelineMax=vf,ru=new vf({sortChildren:!1,defaults:Dl,autoRemoveChildren:!0,id:`root`,smoothChildTiming:!0}),El.stringFilter=ef;var qf=[],Jf={},Yf=[],Xf=0,Zf=0,Qf=function(e){return(Jf[e]||Yf).map(function(e){return e()})},$f=function(){var e=Date.now(),t=[];e-Xf>2&&(Qf(`matchMediaInit`),qf.forEach(function(e){var n=e.queries,r=e.conditions,i,a,o,s;for(a in n)i=iu.matchMedia(n[a]).matches,i&&(o=1),i!==r[a]&&(r[a]=i,s=1);s&&(e.revert(),o&&t.push(e))}),Qf(`matchMediaRevert`),t.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Xf=e,Qf(`matchMedia`))},ep=function(){function e(e,t){this.selector=t&&Ed(t),this.data=[],this._r=[],this.isReverted=!1,this.id=Zf++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){zl(e)&&(n=t,t=e,e=zl);var r=this,i=function(){var e=Al,i=r.selector,a;return e&&e!==r&&e.data.push(r),n&&(r.selector=Ed(n)),Al=r,a=t.apply(r,arguments),zl(a)&&r._r.push(a),Al=e,r.selector=i,r.isReverted=!1,a};return r.last=i,e===zl?i(r,function(e){return r.add(null,e)}):e?r[e]=i:i},t.ignore=function(e){var t=Al;Al=null,e(this),Al=t},t.getTweens=function(){var t=[];return this.data.forEach(function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof Mf&&!(n.parent&&n.parent.data===`nested`)&&t.push(n)}),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?(function(){for(var t=n.getTweens(),r=n.data.length,i;r--;)i=n.data[r],i.data===`isFlip`&&(i.revert(),i.getChildren(!0,!0,!1).forEach(function(e){return t.splice(t.indexOf(e),1)}));for(t.map(function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}}).sort(function(e,t){return t.g-e.g||-1/0}).forEach(function(t){return t.t.revert(e)}),r=n.data.length;r--;)i=n.data[r],i instanceof vf?i.data!==`nested`&&(i.scrollTrigger&&i.scrollTrigger.revert(),i.kill()):!(i instanceof Mf)&&i.revert&&i.revert(e);n._r.forEach(function(t){return t(e,n)}),n.isReverted=!0})():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear(),t)for(var r=qf.length;r--;)qf[r].id===this.id&&qf.splice(r,1)},t.revert=function(e){this.kill(e||{})},e}(),tp=function(){function e(e){this.contexts=[],this.scope=e,Al&&Al.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){Hl(e)||(e={matches:e});var r=new ep(0,n||this.scope),i=r.conditions={},a,o,s;for(o in Al&&!r.selector&&(r.selector=Al.selector),this.contexts.push(r),t=r.add(`onMatch`,t),r.queries=e,e)o===`all`?s=1:(a=iu.matchMedia(e[o]),a&&(qf.indexOf(r)<0&&qf.push(r),(i[o]=a.matches)&&(s=1),a.addListener?a.addListener($f):a.addEventListener(`change`,$f)));return s&&t(r,function(e){return r.add(null,e)}),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},e}(),np={registerPlugin:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(function(e){return Kd(e)})},timeline:function(e){return new vf(e)},getTweensOf:function(e,t){return ru.getTweensOf(e,t)},getProperty:function(e,t,n,r){Rl(e)&&(e=Td(e)[0]);var i=Ou(e||{}).get,a=n?zu:Ru;return n===`native`&&(n=``),e&&(t?a((Su[t]&&Su[t].get||i)(e,t,n,r)):function(t,n,r){return a((Su[t]&&Su[t].get||i)(e,t,n,r))})},quickSetter:function(e,t,n){if(e=Td(e),e.length>1){var r=e.map(function(e){return op.quickSetter(e,t,n)}),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=Su[t],o=Ou(e),s=o.harness&&(o.harness.aliases||{})[t]||t,c=a?function(t){var r=new a;Wd._pt=0,r.init(e,n?t+n:t,Wd,0,[e]),r.render(1,r),Wd._pt&&Vf(1,Wd)}:o.set(e,s);return a?c:function(t){return c(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=op.to(e,Bu((r={},r[t]=`+=0.1`,r.paused=!0,r.stagger=0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return ru.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=df(e.ease,Dl.ease)),Uu(Dl,e||{})},config:function(e){return Uu(El,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||``).split(`,`).forEach(function(e){return e&&!Su[e]&&!su[e]&&fu(t+` effect requires `+e+` plugin.`)}),Cu[t]=function(e,t,r){return n(Td(e),Bu(t||{},i),r)},a&&(vf.prototype[t]=function(e,n,r){return this.add(Cu[t](e,Hl(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){X[e]=df(t)},parseEase:function(e,t){return arguments.length?df(e,t):X},getById:function(e){return ru.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new vf(e),r,i;for(n.smoothChildTiming=Ul(e.smoothChildTiming),ru.remove(n),n._dp=0,n._time=n._tTime=ru._time,r=ru._first;r;)i=r._next,(t||!(!r._dur&&r instanceof Mf&&r.vars.onComplete===r._targets[0]))&&od(n,r,r._start-r._delay),r=i;return od(ru,n,0),n},context:function(e,t){return e?new ep(e,t):Al},matchMedia:function(e){return new tp(e)},matchMediaRefresh:function(){return qf.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||$f()},addEventListener:function(e,t){var n=Jf[e]||(Jf[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=Jf[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:Id,wrapYoyo:Ld,distribute:Od,random:jd,snap:Ad,normalize:Pd,getUnit:bd,clamp:xd,splitColor:Yd,toArray:Td,selector:Ed,mapRange:zd,pipe:Md,unitize:Nd,interpolate:Bd,shuffle:Dd},install:uu,effects:Cu,ticker:nf,updateRoot:vf.updateRoot,plugins:Su,globalTimeline:ru,core:{PropTween:Kf,globals:pu,Tween:Mf,Timeline:vf,Animation:_f,getCache:Ou,_removeLinkedListItem:Ju,reverting:function(){return kl},context:function(e){return e&&Al&&(Al.data.push(e),e._ctx=Al),Al},suppressOverwrites:function(e){return Ol=e}}};Au(`to,from,fromTo,delayedCall,set,killTweensOf`,function(e){return np[e]=Mf[e]}),nf.add(vf.updateRoot),Wd=np.to({},{duration:0});var rp=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},ip=function(e,t){var n=e._targets,r,i,a;for(r in t)for(i=n.length;i--;)a=e._ptLookup[i][r],(a&&=a.d)&&(a._pt&&(a=rp(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[i],r))},ap=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(Rl(n)&&(r={},Au(n,function(e){return r[e]=1}),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}ip(e,n)}}}},op=np.registerPlugin({name:`attr`,init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||``,o=this.add(e,`setAttribute`,(s||0)+``,t[a],r,i,0,0,a),o.op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)kl?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:`endArray`,headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},ap(`roundProps`,kd),ap(`modifiers`),ap(`snap`,Ad))||np;Mf.version=vf.version=op.version=`3.15.0`,lu=1,Wl()&&rf(),X.Power0,X.Power1,X.Power2,X.Power3,X.Power4,X.Linear,X.Quad,X.Cubic,X.Quart,X.Quint,X.Strong,X.Elastic,X.Back,X.SteppedEase,X.Bounce,X.Sine,X.Expo,X.Circ;var sp,cp,lp,up,dp,fp,pp,mp=function(){return typeof window<`u`},hp={},gp=180/Math.PI,_p=Math.PI/180,vp=Math.atan2,yp=1e8,bp=/([A-Z])/g,xp=/(left|right|width|margin|padding|x)/i,Sp=/[\s,\(]\S/,Cp={autoAlpha:`opacity,visibility`,scale:`scaleX,scaleY`,alpha:`opacity`},wp=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Tp=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Ep=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Dp=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Op=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},kp=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Ap=function(e,t){return t.set(t.t,t.p,e===1?t.e:t.b,t)},jp=function(e,t,n){return e.style[t]=n},Mp=function(e,t,n){return e.style.setProperty(t,n)},Np=function(e,t,n){return e._gsap[t]=n},Pp=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},Fp=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},Ip=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},Lp=`transform`,Rp=Lp+`Origin`,zp=function e(t,n){var r=this,i=this.target,a=i.style,o=i._gsap;if(t in hp&&a){if(this.tfm=this.tfm||{},t!==`transform`)t=Cp[t]||t,~t.indexOf(`,`)?t.split(`,`).forEach(function(e){return r.tfm[e]=im(i,e)}):this.tfm[t]=o.x?o[t]:im(i,t),t===Rp&&(this.tfm.zOrigin=o.zOrigin);else return Cp.transform.split(`,`).forEach(function(t){return e.call(r,t,n)});if(this.props.indexOf(Lp)>=0)return;o.svg&&(this.svgo=i.getAttribute(`data-svg-origin`),this.props.push(Rp,n,``)),t=Lp}(a||n)&&this.props.push(t,n,a[t])},Bp=function(e){e.translate&&(e.removeProperty(`translate`),e.removeProperty(`scale`),e.removeProperty(`rotate`))},Vp=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?n[e[i]]=e[i+2]:n.removeProperty(e[i].substr(0,2)===`--`?e[i]:e[i].replace(bp,`-$1`).toLowerCase());if(this.tfm){for(a in this.tfm)r[a]=this.tfm[a];r.svg&&(r.renderTransform(),t.setAttribute(`data-svg-origin`,this.svgo||``)),i=pp(),(!i||!i.isStart)&&!n[Lp]&&(Bp(n),r.zOrigin&&n[Rp]&&(n[Rp]+=` `+r.zOrigin+`px`,r.zOrigin=0,r.renderTransform()),r.uncache=1)}},Hp=function(e,t){var n={target:e,props:[],revert:Vp,save:zp};return e._gsap||op.core.getCache(e),t&&e.style&&e.nodeType&&t.split(`,`).forEach(function(e){return n.save(e)}),n},Up,Wp=function(e,t){var n=cp.createElementNS?cp.createElementNS((t||`http://www.w3.org/1999/xhtml`).replace(/^https/,`http`),e):cp.createElement(e);return n&&n.style?n:cp.createElement(e)},Gp=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(bp,`-$1`).toLowerCase())||i.getPropertyValue(n)||!r&&e(t,qp(n)||n,1)||``},Kp=`O,Moz,ms,Ms,Webkit`.split(`,`),qp=function(e,t,n){var r=(t||dp).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(Kp[i]+e in r););return i<0?null:(i===3?`ms`:i>=0?Kp[i]:``)+e},Jp=function(){mp()&&window.document&&(sp=window,cp=sp.document,lp=cp.documentElement,dp=Wp(`div`)||{style:{}},Wp(`div`),Lp=qp(Lp),Rp=Lp+`Origin`,dp.style.cssText=`border-width:0;line-height:0;position:absolute;padding:0`,Up=!!qp(`perspective`),pp=op.core.reverting,up=1)},Yp=function(e){var t=e.ownerSVGElement,n=Wp(`svg`,t&&t.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`),r=e.cloneNode(!0),i;r.style.display=`block`,n.appendChild(r),lp.appendChild(n);try{i=r.getBBox()}catch{}return n.removeChild(r),lp.removeChild(n),i},Xp=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},Zp=function(e){var t,n;try{t=e.getBBox()}catch{t=Yp(e),n=1}return t&&(t.width||t.height)||n||(t=Yp(e)),t&&!t.width&&!t.x&&!t.y?{x:+Xp(e,[`x`,`cx`,`x1`])||0,y:+Xp(e,[`y`,`cy`,`y1`])||0,width:0,height:0}:t},Qp=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Zp(e))},$p=function(e,t){if(t){var n=e.style,r;t in hp&&t!==Rp&&(t=Lp),n.removeProperty?(r=t.substr(0,2),(r===`ms`||t.substr(0,6)===`webkit`)&&(t=`-`+t),n.removeProperty(r===`--`?t:t.replace(bp,`-$1`).toLowerCase())):n.removeAttribute(t)}},em=function(e,t,n,r,i,a){var o=new Kf(e._pt,t,n,0,1,a?Ap:kp);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},tm={deg:1,rad:1,turn:1},nm={grid:1,flex:1},rm=function e(t,n,r,i){var a=parseFloat(r)||0,o=(r+``).trim().substr((a+``).length)||`px`,s=dp.style,c=xp.test(n),l=t.tagName.toLowerCase()===`svg`,u=(l?`client`:`offset`)+(c?`Width`:`Height`),d=100,f=i===`px`,p=i===`%`,m,h,g,_;if(i===o||!a||tm[i]||tm[o])return a;if(o!==`px`&&!f&&(a=e(t,n,r,`px`)),_=t.getCTM&&Qp(t),(p||o===`%`)&&(hp[n]||~n.indexOf(`adius`)))return m=_?t.getBBox()[c?`width`:`height`]:t[u],ju(p?a/m*d:a/100*m);if(s[c?`width`:`height`]=d+(f?o:i),h=i!==`rem`&&~n.indexOf(`adius`)||i===`em`&&t.appendChild&&!l?t:t.parentNode,_&&(h=(t.ownerSVGElement||{}).parentNode),(!h||h===cp||!h.appendChild)&&(h=cp.body),g=h._gsap,g&&p&&g.width&&c&&g.time===nf.time&&!g.uncache)return ju(a/g.width*d);if(p&&(n===`height`||n===`width`)){var v=t.style[n];t.style[n]=d+i,m=t[u],v?t.style[n]=v:$p(t,n)}else(p||o===`%`)&&!nm[Gp(h,`display`)]&&(s.position=Gp(t,`position`)),h===t&&(s.position=`static`),h.appendChild(dp),m=dp[u],h.removeChild(dp),s.position=`absolute`;return c&&p&&(g=Ou(h),g.time=nf.time,g.width=h[u]),ju(f?m*a/d:m&&a?d/m*a:0)},im=function(e,t,n,r){var i;return up||Jp(),t in Cp&&t!==`transform`&&(t=Cp[t],~t.indexOf(`,`)&&(t=t.split(`,`)[0])),hp[t]&&t!==`transform`?(i=gm(e,r),i=t===`transformOrigin`?i.svg?i.origin:_m(Gp(e,Rp))+` `+i.zOrigin+`px`:i[t]):(i=e.style[t],(!i||i===`auto`||r||~(i+``).indexOf(`calc(`))&&(i=lm[t]&&lm[t](e,t,n)||Gp(e,t)||ku(e,t)||+(t===`opacity`))),n&&!~(i+``).trim().indexOf(` `)?rm(e,t,i,n)+n:i},am=function(e,t,n,r){if(!n||n===`none`){var i=qp(t,e,1),a=i&&Gp(e,i,1);a&&a!==n?(t=i,n=a):t===`borderColor`&&(n=Gp(e,`borderTopColor`))}var o=new Kf(this._pt,e.style,t,0,1,Bf),s=0,c=0,l,u,d,f,p,m,h,g,_,v,y,b;if(o.b=n,o.e=r,n+=``,r+=``,r.substring(0,6)===`var(--`&&(r=Gp(e,r.substring(4,r.indexOf(`)`)))),r===`auto`&&(m=e.style[t],e.style[t]=r,r=Gp(e,t)||r,m?e.style[t]=m:$p(e,t)),l=[n,r],ef(l),n=l[0],r=l[1],d=n.match(Ql)||[],b=r.match(Ql)||[],b.length){for(;u=Ql.exec(r);)h=u[0],_=r.substring(s,u.index),p?p=(p+1)%5:(_.substr(-5)===`rgba(`||_.substr(-5)===`hsla(`)&&(p=1),h!==(m=d[c++]||``)&&(f=parseFloat(m)||0,y=m.substr((f+``).length),h.charAt(1)===`=`&&(h=Nu(f,h)+y),g=parseFloat(h),v=h.substr((g+``).length),s=Ql.lastIndex-v.length,v||(v=v||El.units[t]||y,s===r.length&&(r+=v,o.e+=v)),y!==v&&(f=rm(e,t,m,v)||0),o._pt={_next:o._pt,p:_||c===1?_:`,`,s:f,c:g-f,m:p&&p<4||t===`zIndex`?Math.round:0});o.c=s<r.length?r.substring(s,r.length):``}else o.r=t===`display`&&r===`none`?Ap:kp;return eu.test(r)&&(o.e=0),this._pt=o,o},om={top:`0%`,bottom:`100%`,left:`0%`,right:`100%`,center:`50%`},sm=function(e){var t=e.split(` `),n=t[0],r=t[1]||`50%`;return(n===`top`||n===`bottom`||r===`left`||r===`right`)&&(e=n,n=r,r=e),t[0]=om[n]||n,t[1]=om[r]||r,t.join(` `)},cm=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,i=t.u,a=n._gsap,o,s,c;if(i===`all`||i===!0)r.cssText=``,s=1;else for(i=i.split(`,`),c=i.length;--c>-1;)o=i[c],hp[o]&&(s=1,o=o===`transformOrigin`?Rp:Lp),$p(n,o);s&&($p(n,Lp),a&&(a.svg&&n.removeAttribute(`transform`),r.scale=r.rotate=r.translate=`none`,gm(n,1),a.uncache=1,Bp(r)))}},lm={clearProps:function(e,t,n,r,i){if(i.data!==`isFromStart`){var a=e._pt=new Kf(e._pt,t,n,0,0,cm);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},um=[1,0,0,1,0,0],dm={},fm=function(e){return e===`matrix(1, 0, 0, 1, 0, 0)`||e===`none`||!e},pm=function(e){var t=Gp(e,Lp);return fm(t)?um:t.substr(7).match(Zl).map(ju)},mm=function(e,t){var n=e._gsap||Ou(e),r=e.style,i=pm(e),a,o,s,c;return n.svg&&e.getAttribute(`transform`)?(s=e.transform.baseVal.consolidate().matrix,i=[s.a,s.b,s.c,s.d,s.e,s.f],i.join(`,`)===`1,0,0,1,0,0`?um:i):(i===um&&!e.offsetParent&&e!==lp&&!n.svg&&(s=r.display,r.display=`block`,a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,lp.appendChild(e)),i=pm(e),s?r.display=s:$p(e,`display`),c&&(o?a.insertBefore(e,o):a?a.appendChild(e):lp.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},hm=function(e,t,n,r,i,a){var o=e._gsap,s=i||mm(e,!0),c=o.xOrigin||0,l=o.yOrigin||0,u=o.xOffset||0,d=o.yOffset||0,f=s[0],p=s[1],m=s[2],h=s[3],g=s[4],_=s[5],v=t.split(` `),y=parseFloat(v[0])||0,b=parseFloat(v[1])||0,x,S,C,w;n?s!==um&&(S=f*h-p*m)&&(C=h/S*y+b*(-m/S)+(m*_-h*g)/S,w=y*(-p/S)+f/S*b-(f*_-p*g)/S,y=C,b=w):(x=Zp(e),y=x.x+(~v[0].indexOf(`%`)?y/100*x.width:y),b=x.y+(~(v[1]||v[0]).indexOf(`%`)?b/100*x.height:b)),r||r!==!1&&o.smooth?(g=y-c,_=b-l,o.xOffset=u+(g*f+_*m)-g,o.yOffset=d+(g*p+_*h)-_):o.xOffset=o.yOffset=0,o.xOrigin=y,o.yOrigin=b,o.smooth=!!r,o.origin=t,o.originIsAbsolute=!!n,e.style[Rp]=`0px 0px`,a&&(em(a,o,`xOrigin`,c,y),em(a,o,`yOrigin`,l,b),em(a,o,`xOffset`,u,o.xOffset),em(a,o,`yOffset`,d,o.yOffset)),e.setAttribute(`data-svg-origin`,y+` `+b)},gm=function(e,t){var n=e._gsap||new gf(e);if(`x`in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,a=`px`,o=`deg`,s=getComputedStyle(e),c=Gp(e,Rp)||`0`,l=u=d=m=h=g=_=v=y=0,u,d,f=p=1,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B;return n.svg=!!(e.getCTM&&Qp(e)),s.translate&&((s.translate!==`none`||s.scale!==`none`||s.rotate!==`none`)&&(r[Lp]=(s.translate===`none`?``:`translate3d(`+(s.translate+` 0 0`).split(` `).slice(0,3).join(`, `)+`) `)+(s.rotate===`none`?``:`rotate(`+s.rotate+`) `)+(s.scale===`none`?``:`scale(`+s.scale.split(` `).join(`,`)+`) `)+(s[Lp]===`none`?``:s[Lp])),r.scale=r.rotate=r.translate=`none`),S=mm(e,n.svg),n.svg&&(n.uncache?(N=e.getBBox(),c=n.xOrigin-N.x+`px `+(n.yOrigin-N.y)+`px`,M=``):M=!t&&e.getAttribute(`data-svg-origin`),hm(e,M||c,!!M||n.originIsAbsolute,n.smooth!==!1,S)),b=n.xOrigin||0,x=n.yOrigin||0,S!==um&&(E=S[0],D=S[1],O=S[2],k=S[3],l=A=S[4],u=j=S[5],S.length===6?(f=Math.sqrt(E*E+D*D),p=Math.sqrt(k*k+O*O),m=E||D?vp(D,E)*gp:0,_=O||k?vp(O,k)*gp+m:0,_&&(p*=Math.abs(Math.cos(_*_p))),n.svg&&(l-=b-(b*E+x*O),u-=x-(b*D+x*k))):(B=S[6],R=S[7],F=S[8],I=S[9],L=S[10],z=S[11],l=S[12],u=S[13],d=S[14],C=vp(B,L),h=C*gp,C&&(w=Math.cos(-C),T=Math.sin(-C),M=A*w+F*T,N=j*w+I*T,P=B*w+L*T,F=A*-T+F*w,I=j*-T+I*w,L=B*-T+L*w,z=R*-T+z*w,A=M,j=N,B=P),C=vp(-O,L),g=C*gp,C&&(w=Math.cos(-C),T=Math.sin(-C),M=E*w-F*T,N=D*w-I*T,P=O*w-L*T,z=k*T+z*w,E=M,D=N,O=P),C=vp(D,E),m=C*gp,C&&(w=Math.cos(C),T=Math.sin(C),M=E*w+D*T,N=A*w+j*T,D=D*w-E*T,j=j*w-A*T,E=M,A=N),h&&Math.abs(h)+Math.abs(m)>359.9&&(h=m=0,g=180-g),f=ju(Math.sqrt(E*E+D*D+O*O)),p=ju(Math.sqrt(j*j+B*B)),C=vp(A,j),_=Math.abs(C)>2e-4?C*gp:0,y=z?1/(z<0?-z:z):0),n.svg&&(M=e.getAttribute(`transform`),n.forceCSS=e.setAttribute(`transform`,``)||!fm(Gp(e,Lp)),M&&e.setAttribute(`transform`,M))),Math.abs(_)>90&&Math.abs(_)<270&&(i?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t||=n.uncache,n.x=l-((n.xPercent=l&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-l)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=u-((n.yPercent=u&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=d+a,n.scaleX=ju(f),n.scaleY=ju(p),n.rotation=ju(m)+o,n.rotationX=ju(h)+o,n.rotationY=ju(g)+o,n.skewX=_+o,n.skewY=v+o,n.transformPerspective=y+a,(n.zOrigin=parseFloat(c.split(` `)[2])||!t&&n.zOrigin||0)&&(r[Rp]=_m(c)),n.xOffset=n.yOffset=0,n.force3D=El.force3D,n.renderTransform=n.svg?wm:Up?Cm:ym,n.uncache=0,n},_m=function(e){return(e=e.split(` `))[0]+` `+e[1]},vm=function(e,t,n){var r=bd(t);return ju(parseFloat(t)+parseFloat(rm(e,`x`,n+`px`,r)))+r},ym=function(e,t){t.z=`0px`,t.rotationY=t.rotationX=`0deg`,t.force3D=0,Cm(e,t)},bm=`0deg`,xm=`0px`,Sm=`) `,Cm=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,c=n.rotation,l=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,m=n.scaleY,h=n.transformPerspective,g=n.force3D,_=n.target,v=n.zOrigin,y=``,b=g===`auto`&&e&&e!==1||g===!0;if(v&&(u!==bm||l!==bm)){var x=parseFloat(l)*_p,S=Math.sin(x),C=Math.cos(x),w;x=parseFloat(u)*_p,w=Math.cos(x),a=vm(_,a,S*w*-v),o=vm(_,o,-Math.sin(x)*-v),s=vm(_,s,C*w*-v+v)}h!==xm&&(y+=`perspective(`+h+Sm),(r||i)&&(y+=`translate(`+r+`%, `+i+`%) `),(b||a!==xm||o!==xm||s!==xm)&&(y+=s!==xm||b?`translate3d(`+a+`, `+o+`, `+s+`) `:`translate(`+a+`, `+o+Sm),c!==bm&&(y+=`rotate(`+c+Sm),l!==bm&&(y+=`rotateY(`+l+Sm),u!==bm&&(y+=`rotateX(`+u+Sm),(d!==bm||f!==bm)&&(y+=`skew(`+d+`, `+f+Sm),(p!==1||m!==1)&&(y+=`scale(`+p+`, `+m+Sm),_.style[Lp]=y||`translate(0, 0)`},wm=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.rotation,c=n.skewX,l=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,m=n.yOrigin,h=n.xOffset,g=n.yOffset,_=n.forceCSS,v=parseFloat(a),y=parseFloat(o),b,x,S,C,w;s=parseFloat(s),c=parseFloat(c),l=parseFloat(l),l&&(l=parseFloat(l),c+=l,s+=l),s||c?(s*=_p,c*=_p,b=Math.cos(s)*u,x=Math.sin(s)*u,S=Math.sin(s-c)*-d,C=Math.cos(s-c)*d,c&&(l*=_p,w=Math.tan(c-l),w=Math.sqrt(1+w*w),S*=w,C*=w,l&&(w=Math.tan(l),w=Math.sqrt(1+w*w),b*=w,x*=w)),b=ju(b),x=ju(x),S=ju(S),C=ju(C)):(b=u,C=d,x=S=0),(v&&!~(a+``).indexOf(`px`)||y&&!~(o+``).indexOf(`px`))&&(v=rm(f,`x`,a,`px`),y=rm(f,`y`,o,`px`)),(p||m||h||g)&&(v=ju(v+p-(p*b+m*S)+h),y=ju(y+m-(p*x+m*C)+g)),(r||i)&&(w=f.getBBox(),v=ju(v+r/100*w.width),y=ju(y+i/100*w.height)),w=`matrix(`+b+`,`+x+`,`+S+`,`+C+`,`+v+`,`+y+`)`,f.setAttribute(`transform`,w),_&&(f.style[Lp]=w)},Tm=function(e,t,n,r,i){var a=360,o=Rl(i),s=parseFloat(i)*(o&&~i.indexOf(`rad`)?gp:1)-r,c=r+s+`deg`,l,u;return o&&(l=i.split(`_`)[1],l===`short`&&(s%=a,s!==s%(a/2)&&(s+=s<0?a:-a)),l===`cw`&&s<0?s=(s+a*yp)%a-~~(s/a)*a:l===`ccw`&&s>0&&(s=(s-a*yp)%a-~~(s/a)*a)),e._pt=u=new Kf(e._pt,t,n,r,s,Tp),u.e=c,u.u=`deg`,e._props.push(n),u},Em=function(e,t){for(var n in t)e[n]=t[n];return e},Dm=function(e,t,n){var r=Em({},n._gsap),i=`perspective,force3D,transformOrigin,svgOrigin`,a=n.style,o,s,c,l,u,d,f,p;for(s in r.svg?(c=n.getAttribute(`transform`),n.setAttribute(`transform`,``),a[Lp]=t,o=gm(n,1),$p(n,Lp),n.setAttribute(`transform`,c)):(c=getComputedStyle(n)[Lp],a[Lp]=t,o=gm(n,1),a[Lp]=c),hp)c=r[s],l=o[s],c!==l&&i.indexOf(s)<0&&(f=bd(c),p=bd(l),u=f===p?parseFloat(c):rm(n,s,c,p),d=parseFloat(l),e._pt=new Kf(e._pt,o,s,u,d-u,wp),e._pt.u=p||0,e._props.push(s));Em(o,r)};Au(`padding,margin,Width,Radius`,function(e,t){var n=`Top`,r=`Right`,i=`Bottom`,a=`Left`,o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(n){return t<2?e+n:`border`+n+e});lm[t>1?`border`+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map(function(t){return im(e,t,n)}),s=a.join(` `),s.split(a[0]).length===5?a[0]:s;a=(r+``).split(` `),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),e.init(t,s,i)}});var Om={name:`css`,register:Jp,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a=this._props,o=e.style,s=n.vars.startAt,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;for(m in up||Jp(),this.styles=this.styles||Hp(e),C=this.styles.props,this.tween=n,t)if(m!==`autoRound`&&(l=t[m],!(Su[m]&&Sf(m,t,n,r,e,i)))){if(f=typeof l,p=lm[m],f===`function`&&(l=l.call(n,r,e,i),f=typeof l),f===`string`&&~l.indexOf(`random(`)&&(l=Rd(l)),p)p(this,e,m,l,n)&&(S=1);else if(m.substr(0,2)===`--`)c=(getComputedStyle(e).getPropertyValue(m)+``).trim(),l+=``,Qd.lastIndex=0,Qd.test(c)||(h=bd(c),g=bd(l),g?h!==g&&(c=rm(e,m,c,g)+g):h&&(l+=h)),this.add(o,`setProperty`,c,l,r,i,0,0,m),a.push(m),C.push(m,0,o[m]);else if(f!==`undefined`){if(s&&m in s?(c=typeof s[m]==`function`?s[m].call(n,r,e,i):s[m],Rl(c)&&~c.indexOf(`random(`)&&(c=Rd(c)),bd(c+``)||c===`auto`||(c+=El.units[m]||bd(im(e,m))||``),(c+``).charAt(1)===`=`&&(c=im(e,m))):c=im(e,m),d=parseFloat(c),_=f===`string`&&l.charAt(1)===`=`&&l.substr(0,2),_&&(l=l.substr(2)),u=parseFloat(l),m in Cp&&(m===`autoAlpha`&&(d===1&&im(e,`visibility`)===`hidden`&&u&&(d=0),C.push(`visibility`,0,o.visibility),em(this,o,`visibility`,d?`inherit`:`hidden`,u?`inherit`:`hidden`,!u)),m!==`scale`&&m!==`transform`&&(m=Cp[m],~m.indexOf(`,`)&&(m=m.split(`,`)[0]))),v=m in hp,v){if(this.styles.save(m),w=l,f===`string`&&l.substring(0,6)===`var(--`){if(l=Gp(e,l.substring(4,l.indexOf(`)`))),l.substring(0,5)===`calc(`){var T=e.style.perspective;e.style.perspective=l,l=Gp(e,`perspective`),T?e.style.perspective=T:$p(e,`perspective`)}u=parseFloat(l)}if(y||(b=e._gsap,b.renderTransform&&!t.parseTransform||gm(e,t.parseTransform),x=t.smoothOrigin!==!1&&b.smooth,y=this._pt=new Kf(this._pt,o,Lp,0,1,b.renderTransform,b,0,-1),y.dep=1),m===`scale`)this._pt=new Kf(this._pt,b,`scaleY`,b.scaleY,(_?Nu(b.scaleY,_+u):u)-b.scaleY||0,wp),this._pt.u=0,a.push(`scaleY`,m),m+=`X`;else if(m===`transformOrigin`){C.push(Rp,0,o[Rp]),l=sm(l),b.svg?hm(e,l,0,x,0,this):(g=parseFloat(l.split(` `)[2])||0,g!==b.zOrigin&&em(this,b,`zOrigin`,b.zOrigin,g),em(this,o,m,_m(c),_m(l)));continue}else if(m===`svgOrigin`){hm(e,l,1,x,0,this);continue}else if(m in dm){Tm(this,b,m,d,_?Nu(d,_+l):l);continue}else if(m===`smoothOrigin`){em(this,b,`smooth`,b.smooth,l);continue}else if(m===`force3D`){b[m]=l;continue}else if(m===`transform`){Dm(this,l,e);continue}}else m in o||(m=qp(m)||m);if(v||(u||u===0)&&(d||d===0)&&!Sp.test(l)&&m in o)h=(c+``).substr((d+``).length),u||=0,g=bd(l)||(m in El.units?El.units[m]:h),h!==g&&(d=rm(e,m,c,g)),this._pt=new Kf(this._pt,v?b:o,m,d,(_?Nu(d,_+u):u)-d,!v&&(g===`px`||m===`zIndex`)&&t.autoRound!==!1?Op:wp),this._pt.u=g||0,v&&w!==l?(this._pt.b=c,this._pt.e=w,this._pt.r=Dp):h!==g&&g!==`%`&&(this._pt.b=c,this._pt.r=Ep);else if(m in o)am.call(this,e,m,c,_?_+l:l);else if(m in e)this.add(e,m,c||e[m],_?_+l:l,r,i);else if(m!==`parseTransform`){du(m,l);continue}v||(m in o?C.push(m,0,o[m]):typeof e[m]==`function`?C.push(m,2,e[m]()):C.push(m,1,c||e[m])),a.push(m)}}S&&Gf(this)},render:function(e,t){if(t.tween._time||!pp())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:im,aliases:Cp,getSetter:function(e,t,n){var r=Cp[t];return r&&r.indexOf(`,`)<0&&(t=r),t in hp&&t!==Rp&&(e._gsap.x||im(e,`x`))?n&&fp===n?t===`scale`?Pp:Np:(fp=n||{})&&(t===`scale`?Fp:Ip):e.style&&!Vl(e.style[t])?jp:~t.indexOf(`-`)?Mp:Lf(e,t)},core:{_removeProperty:$p,_getMatrix:mm}};op.utils.checkPrefix=qp,op.core.getStyleSaver=Hp,(function(e,t,n,r){var i=Au(e+`,`+t+`,`+n,function(e){hp[e]=1});Au(t,function(e){El.units[e]=`deg`,dm[e]=1}),Cp[i[13]]=e+`,`+t,Au(r,function(e){var t=e.split(`:`);Cp[t[1]]=i[t[0]]})})(`x,y,z,scale,scaleX,scaleY,xPercent,yPercent`,`rotation,rotationX,rotationY,skewX,skewY`,`transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective`,`0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY`),Au(`x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective`,function(e){El.units[e]=`px`}),op.registerPlugin(Om);var km=op.registerPlugin(Om)||op;km.core.Tween;var Am={IN_OUT:`power2.inOut`,OUT:`power2.out`},jm={NO_STAGGER:0,RIPPLE_STAGGER_DELAY:.05},Mm=class{timeline;currentStage=``;callbacks;durations;constructor(e,t={}){this.durations=e,this.callbacks=t,this.timeline=km.timeline({paused:!0,onUpdate:()=>this.handleProgress(),onComplete:()=>{this.callbacks.onComplete?.(),this.callbacks.onStageComplete?.(`complete`)}});let n=0;this.timeline.addLabel(`seatsToRings`,n),n+=e.seatsToRings/1e3,this.timeline.addLabel(`ringsToBar`,n),n+=e.ringsToBar/1e3,this.timeline.addLabel(`axesReveal`,n),n+=e.axesReveal/1e3,this.timeline.addLabel(`barSlide`,n),n+=e.barSlide/1e3,this.timeline.addLabel(`barsGrow`,n),n+=e.barsGrow/1e3,this.timeline.addLabel(`barsToArea`,n)}animateSeatsToRings(e,t){let n=this.durations.seatsToRings/1e3;return e.each(function(){let e=this;if(!e.getAttribute(`data-orig-x`)){let t=e.getAttribute(`x`),n=e.getAttribute(`y`),r=e.getAttribute(`width`),i=e.getAttribute(`height`);e.setAttribute(`data-orig-x`,t||`0`),e.setAttribute(`data-orig-y`,n||`0`),e.setAttribute(`data-orig-width`,r||`0`),e.setAttribute(`data-orig-height`,i||`0`)}}),this.timeline.to(e.nodes(),{width:2,y:(e,t)=>parseFloat(t.getAttribute(`y`)||`0`),height:(e,n)=>t-parseFloat(n.getAttribute(`y`)||`0`),duration:n,ease:Am.IN_OUT,stagger:jm.NO_STAGGER,onStart:()=>{this.currentStage=`seatsToRings`,this.callbacks.onStageComplete?.(`seatsToRings`)}},`seatsToRings`),this}animateRingsToBar(e,t){let n=this.durations.ringsToBar/1e3;return e.each(function(e,n){let r=this;if(!t[n])return;let i=r.getAttribute(`x`),a=r.getAttribute(`y`),o=r.getAttribute(`width`),s=r.getAttribute(`height`);r.setAttribute(`data-orig-x`,i||`0`),r.setAttribute(`data-orig-y`,a||`0`),r.setAttribute(`data-orig-width`,o||`0`),r.setAttribute(`data-orig-height`,s||`0`)}),this.timeline.to(e.nodes(),{x:e=>t[e]?.x??0,y:e=>t[e]?.y??0,width:e=>t[e]?.width??0,height:e=>t[e]?.height??0,duration:n,ease:Am.IN_OUT,stagger:jm.NO_STAGGER,onStart:()=>{this.currentStage=`ringsToBar`,this.callbacks.onStageComplete?.(`ringsToBar`)}},`ringsToBar`),this}animateAxesReveal(e,t){let n=this.durations.axesReveal/1e3;return this.timeline.to([e.node(),t.node()],{opacity:1,duration:n,ease:Am.IN_OUT,stagger:jm.NO_STAGGER,onStart:()=>{this.currentStage=`axesReveal`,this.callbacks.onStageComplete?.(`axesReveal`)}},`axesReveal`),this}animateBarSlide(e,t){let n=this.durations.barSlide/1e3;return this.timeline.to(e.nodes(),{x:t,duration:n,ease:Am.OUT,stagger:jm.NO_STAGGER,onStart:()=>{this.currentStage=`barSlide`,this.callbacks.onStageComplete?.(`barSlide`)}},`barSlide`),this}animateBarsGrow(e,t,n=jm.RIPPLE_STAGGER_DELAY){let r=this.durations.barsGrow/1e3;return e.nodes().forEach((e,i)=>{let a=e,o=a.getAttribute(`data-final-y`)||`0`,s=a.getAttribute(`data-final-height`)||`0`,c=parseInt(a.getAttribute(`data-timestamp-index`)||`0`),l=Math.abs(c-t)*n;this.timeline.fromTo(a,{height:0,y:parseFloat(a.getAttribute(`data-chart-baseline`)||`400`)},{y:parseFloat(o),height:parseFloat(s),duration:r,delay:l,ease:Am.OUT},`barsGrow`)}),this.timeline.call(()=>{this.currentStage=`barsGrow`,this.callbacks.onStageComplete?.(`barsGrow`)},[],`barsGrow`),this}animateBarsToArea(e,t,n,r){let i=this.durations.barsToArea/1e3,a=new Map;return e.each(function(){let e=this,t=e.getAttribute(`class`);if(!t)return;let n=t.match(/category-([\w-]+)/);if(n&&n[1]){let t=n[1];a.has(t)||a.set(t,[]),a.get(t)?.push(e)}}),this.timeline.set(e.nodes(),{opacity:0},`barsToArea`),this.timeline.set(t.nodes(),{opacity:1},`barsToArea`),t.each(function(){let e=this,t=e.getAttribute(`data-category`);if(!t)return;let r=n.get(t);r&&km.to(e,{attr:{d:r},duration:i,ease:Am.IN_OUT})}),this.timeline.call(()=>{this.currentStage=`barsToArea`,this.callbacks.onStageComplete?.(`barsToArea`)},[],`barsToArea`),this}handleProgress(){let e=this.timeline.progress();this.callbacks.onProgress?.(e)}getControls(){return{play:()=>this.timeline.play(),pause:()=>this.timeline.pause(),reverse:()=>this.timeline.reverse(),restart:()=>this.timeline.restart(),seek:e=>this.timeline.progress(e),seekToStage:e=>{let t=this.timeline.labels[e];t!==void 0&&this.timeline.seek(t)},kill:()=>this.timeline.kill(),getProgress:()=>this.timeline.progress(),getCurrentStage:()=>this.currentStage,getTimeline:()=>this.timeline}}play(){this.timeline.play()}destroy(){this.timeline.kill()}};function Nm(e,t){let{arcAngle:n,arcAngleFlexibility:r=5,radius:i,seatSize:a,minSeatSize:o,maxSeatSize:s,spacing:c,innerRadiusRatio:l}=t,u=i*l,d=e.reduce((e,t)=>e+t.seats,0),f={seatSize:a,arcAngle:n,rings:0,score:-1},p=n-r,m=n+r;for(let e=p;e<=m;e+=2.5){let t=e*Math.PI/180;for(let a=s;a>=o;a-=.1){let l=a*2,p=l*c,m=Math.floor((i-u)/p);for(let i=1;i<=Math.min(m,10);i++){let m=0;for(let e=0;e<i;e++){let n=u+(e+.5)*p,r=l*c/n,i=Math.floor(t/r);m+=i}if(m>=d){let t=d/m,c=(a-o)/(s-o),l=(m-d)/d,u=l<.15?1:l<.3?.7:l<.5?.4:.1,p=1-Math.abs(e-n)/r,h=u*.5+c*.3+t*.15+p*.05;h>f.score&&(f={seatSize:a,arcAngle:e,rings:i,score:h})}}}}let h=f.seatSize,g=f.arcAngle,_=g*Math.PI/180,v=h*2,y=v*c,b=Math.floor((i-u)/y),x=[],S=-_/2-Math.PI/2,C=[],w=0,T=[];for(let e=1;e<=b;e++){let t=0,n=[];for(let r=0;r<e;r++){let e=u+(r+.5)*y,i=v*c/e,a=Math.floor(_/i);n.push(a),t+=a}if(t>=d){w=e,T=n;break}}if(w>0)C.push(...T);else for(let e=0;e<b;e++){let t=u+(e+.5)*y,n=v*c/t,r=Math.floor(_/n);C.push(r)}for(let e=0;e<C.length;e++){let t=u+(e+.5)*y,n=C[e]??0;if(n>0){let r=_/n;for(let i=0;i<n;i++){let n=S+(i+.5)*r,a=Math.cos(n)*t,o=Math.sin(n)*t;x.push({ring:e,index:i,angle:n,x:a,y:o})}}}x.sort((e,t)=>{let n=e.angle-t.angle;return Math.abs(n)>.001?n:e.ring-t.ring});let E=[],D=0;return e.forEach((e,t)=>{let n=Math.min(e.seats,x.length-D);for(let r=0;r<n&&D<x.length;r++){let n=x[D++];n&&E.push({x:n.x,y:n.y,category:e.name,categoryIndex:t,seatIndex:r,ring:n.ring,angle:n.angle,radius:h})}}),{arcAngle:g,radius:i,innerRadius:u,centerX:i,centerY:i,seatSize:h,seats:E,totalSeats:d}}function Pm(e,t,n){let r=t<=n?1:n/t;return e.filter(e=>e.value>0).map(e=>{let i=t<=n?e.value:Math.max(1,Math.floor(e.value*r));return{id:e.dataKey,name:e.label,seats:i,colour:e.color}})}function Fm({svg:e,events:t,xScale:n,chartHeight:r,chartWidth:i,timelineHeight:a,timelineOffset:o,instanceId:s,setHoveredTimelineEvent:c,enableBrush:l=!1,onTimeRangeChange:u,minAllowedTime:d,maxAllowedTime:f,brushColor:p=`#69b3a2`,mainGroupSelector:m}){let h=r+o,g=s?`.main-chart-group-${s}`:`.main-chart-group`,_=e.select(m??g),v=s?`timeline-track timeline-track-${s}`:`timeline-track`,y=_.append(`g`).attr(`class`,v),b=s?`timeline-clip-${s}`:`timeline-clip-${Math.random().toString(36).substr(2,9)}`;if(e.append(`defs`).append(`clipPath`).attr(`id`,b).append(`rect`).attr(`x`,0).attr(`y`,h).attr(`width`,i+6).attr(`height`,a),y.append(`rect`).attr(`class`,`timeline-background`).attr(`x`,0).attr(`y`,h).attr(`width`,i).attr(`height`,a).attr(`fill`,`var(--rc-timeline-surface, #FFFFFF)`).attr(`stroke`,`var(--rc-timeline-border, #9CA3AF)`).attr(`stroke-width`,1),y.append(`g`).attr(`clip-path`,`url(#${b})`).selectAll(`.timeline-event`).data(t).enter().append(`rect`).attr(`class`,`timeline-event`).attr(`x`,e=>n(new Date(e.timestamp))-3/2).attr(`y`,h).attr(`width`,3).attr(`height`,a).attr(`fill`,e=>e.color||`#2F42FF`).attr(`stroke`,`none`).attr(`cursor`,`pointer`).attr(`data-timestamp`,e=>e.timestamp).attr(`data-event-name`,e=>e.eventName).on(`mouseenter`,function(e,t){let r=K(this),i=n(new Date(t.timestamp));r.transition().duration(150).attr(`x`,i-6/2).attr(`width`,6),c&&c({timestamp:t.timestamp,eventName:t.eventName,x:i})}).on(`mouseleave`,function(e,t){let r=K(this),i=n(new Date(t.timestamp));r.transition().duration(150).attr(`x`,i-3/2).attr(`width`,3),c&&c(null)}),l&&u){let t=d,r=f,o=Ia().extent([[0,h],[i,h+a]]).on(`start`,i=>{if(!i.selection&&t!==void 0&&r!==void 0){let a=i.sourceEvent;if(a){let i=a.offsetX,c=+n.invert(i);if(c<t||c>r){let t=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(t).call(o.move,null);return}}}}).on(`brush`,i=>{if(!i.selection)return;let[a,c]=i.selection,l=+n.invert(a),u=+n.invert(c);t!==void 0&&(l=Math.max(l,t),u=Math.max(u,t)),r!==void 0&&(l=Math.min(l,r),u=Math.min(u,r));let d=n(new Date(l)),f=n(new Date(u));if(d!==a||f!==c){let t=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(t).call(o.move,[d,f])}}).on(`end`,i=>{if(!i.selection)return;let[a,c]=i.selection,l=[+n.invert(a),+n.invert(c)];t!==void 0&&(l[0]=Math.max(l[0],t)),r!==void 0&&(l[1]=Math.min(l[1],r)),u(l);let d=s?`.timeline-brush-${s}`:`.timeline-brush`;e.select(d).call(o.move,null)}),c=s?`timeline-brush timeline-brush-${s}`:`timeline-brush`,l=_.append(`g`).attr(`class`,c).call(o);l.selectAll(`.selection`).attr(`fill`,p).attr(`fill-opacity`,.2).attr(`stroke`,p).attr(`stroke-width`,1),l.selectAll(`.handle`).attr(`fill`,p).attr(`fill-opacity`,.8),l.select(`.overlay`).style(`cursor`,`default`),l.on(`dblclick`,()=>{let e=n.domain();u([+e[0],+e[1]])})}}var Im={greyHatch:{background:m.neoGrey[200],lines:m.neoGrey[400]},dataMissingHatch:{background:`#FFF3CC`,lines:`#FFB800`},noLstHatch:{background:`#FFE5E5`,lines:`#ED4134`}};function Lm(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-greyHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Im.greyHatch.background),n.append(`path`).attr(`d`,`M0,2 L8,2`).attr(`stroke`,Im.greyHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M0,6 L8,6`).attr(`stroke`,Im.greyHatch.lines).attr(`stroke-width`,.5)}function Rm(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-dataMissingHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Im.dataMissingHatch.background),n.append(`path`).attr(`d`,`M0,8 L8,0`).attr(`stroke`,Im.dataMissingHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M-2,2 L2,-2`).attr(`stroke`,Im.dataMissingHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M6,10 L10,6`).attr(`stroke`,Im.dataMissingHatch.lines).attr(`stroke-width`,.5)}function zm(e,t){let n=e.append(`pattern`).attr(`id`,`${t}-noLstHatchPattern`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`patternUnits`,`userSpaceOnUse`);n.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,8).attr(`height`,8).attr(`fill`,Im.noLstHatch.background),n.append(`path`).attr(`d`,`M0,0 L8,8`).attr(`stroke`,Im.noLstHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M-2,6 L2,10`).attr(`stroke`,Im.noLstHatch.lines).attr(`stroke-width`,.5),n.append(`path`).attr(`d`,`M6,-2 L10,2`).attr(`stroke`,Im.noLstHatch.lines).attr(`stroke-width`,.5)}function Bm(e,t){let n=e.select(`defs`);n.empty()&&(n=e.append(`defs`)),Lm(n,t),Rm(n,t),zm(n,t)}function Vm(e,t){return e.startsWith(`url(#`)&&e.endsWith(`)`)?`url(#${t}-${e.slice(5,-1)})`:e}function Hm(e){return e.includes(`greyHatchPattern`)?Im.greyHatch.lines:e.includes(`dataMissingHatchPattern`)?Im.dataMissingHatch.lines:e.includes(`noLstHatchPattern`)?Im.noLstHatch.lines:e}function Um(e,t,n,r){let{xScale:i,yScale:a,addClasses:o=!0,instanceId:s}=r,c=vl().x(e=>i(new Date(e.data.timestamp))).y0(e=>a(e[0])).y1(e=>a(e[1])).curve(ml),l=_l().x(e=>i(new Date(e.data.timestamp))).y(e=>a(e[1])).curve(ml),u=s?`areas areas-${s}`:`areas`,d=e.select(s?`.areas-${s}`:`.areas`);d.empty()&&(d=e.append(`g`).attr(`class`,u)),t.forEach((e,t)=>{let r=n[t];if(!r)return;let i=r.parliamentMapping?.isSpecialCategory??!1,a=Hm(r.color);if(i){let t=d.append(`path`).datum(e).attr(`fill`,`none`).attr(`stroke`,a).attr(`stroke-width`,3).attr(`stroke-dasharray`,`15 8`).attr(`d`,l).style(`pointer-events`,`none`);if(o){let e=s?`area area-${s} area-${r.dataKey}`:`area area-${r.dataKey}`;t.attr(`class`,e)}}else{let t=d.append(`path`).datum(e).attr(`fill`,r.color).attr(`fill-opacity`,r.fillOpacity??.7).attr(`stroke`,a).attr(`stroke-width`,r.strokeWidth??1.5).attr(`d`,c).style(`pointer-events`,`none`);if(o){let e=s?`area area-${s} area-${r.dataKey}`:`area area-${r.dataKey}`;t.attr(`class`,e)}}})}function Wm(e,t){let n=[];for(let r of e){let e=0;for(let i of t){let t=r[i.dataKey]||0,a=e,o=e+t;n.push({timestamp:r.timestamp,category:i.label,dataKey:i.dataKey,y0:a,y1:o,value:t,color:i.color,isSpecialCategory:i.parliamentMapping?.isSpecialCategory??!1}),e+=t}}return n}function Gm(e){return e.replace(/[^a-zA-Z0-9-_]/g,`-`)}function Km(e,t,n,r){let{centerX:i,centerY:a,addClasses:o=!0,instanceId:s,parliamentRadius:c=200}=r,l=s?`parliament parliament-${s}`:`parliament`,u=e.select(s?`.parliament-${s}`:`.parliament`);u.empty()&&(u=e.append(`g`).attr(`class`,l)),t.seats.forEach(e=>{let t=n.find(t=>t.label===e.category);if(!t)return;let r=O(t.color,e.radius),c=u.append(`circle`).attr(`cx`,i+e.x).attr(`cy`,a+e.y).attr(`r`,e.radius).attr(`fill`,r.fill).attr(`stroke`,r.stroke).attr(`stroke-width`,r.strokeWidth??.5);r.dashArray&&c.attr(`stroke-dasharray`,r.dashArray);let l=u.append(`circle`).attr(`cx`,i+e.x).attr(`cy`,a+e.y).attr(`r`,e.radius*2.5).attr(`fill`,`transparent`).attr(`stroke`,`none`).attr(`pointer-events`,`all`);if(o){let t=s?`seat seat-${s} seat-${Gm(e.category)}`:`seat seat-${Gm(e.category)}`;c.attr(`class`,t),l.attr(`class`,t)}});let d=s?`parliament-label parliament-label-${s}`:`parliament-label`;if(e.select(`.${d.split(` `)[0]}`).empty()){let t=e.append(`g`).attr(`class`,d).attr(`transform`,`translate(${i},${a-c*.15})`).style(`opacity`,`0`).style(`pointer-events`,`none`);t.append(`text`).attr(`class`,`label-category`).attr(`text-anchor`,`middle`).attr(`dy`,`-15`).style(`font-size`,`22px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-family`,`system-ui, -apple-system, sans-serif`),t.append(`text`).attr(`class`,`label-value`).attr(`text-anchor`,`middle`).attr(`dy`,`35`).style(`font-size`,`48px`).style(`font-weight`,`bold`).style(`font-family`,`system-ui, -apple-system, sans-serif`);let n=t.append(`g`).attr(`class`,`scale-indicator`).attr(`transform`,`translate(0, 65)`).style(`opacity`,`0`);n.append(`circle`).attr(`r`,4).attr(`cx`,-30).attr(`cy`,0).style(`fill`,`var(--rc-muted-text, #888)`),n.append(`text`).attr(`x`,-20).attr(`y`,0).attr(`dy`,`0.35em`).attr(`text-anchor`,`start`).style(`font-size`,`18px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-style`,`italic`).style(`font-family`,`system-ui, -apple-system, sans-serif`)}}function qm(e,t,n,r,i,a,o=!1){let s=new Map,c=i;if(t.length>0&&t[0]?.timestamp!==void 0){let e=t[0].timestamp;c=n(new Date(e))}let l=new Map;for(let t of e.seats)l.has(t.category)||l.set(t.category,[]),l.get(t.category).push(t);let u=new Map;for(let e of t)u.set(e.dataKey,{y0:e.y0,y1:e.y1,isSpecialCategory:e.isSpecialCategory}),e.label&&e.label!==e.dataKey&&u.set(e.label,{y0:e.y0,y1:e.y1,isSpecialCategory:e.isSpecialCategory});for(let t of e.seats){let e=u.get(t.category);if(!e){s.set(t,{x:c,y:a/2});continue}let n=r(e.y0),i=r(e.y1),d;if(o){let e=l.get(t.category)??[],r=t.seatIndex,a=e.length;if(a===1)d=(n+i)/2;else{let e=r/(a-1);d=n+(i-n)*e}}else d=i;s.set(t,{x:c,y:d})}return s}function Jm(e,t,n){if(e.length===0)return[];let r=e[e.length-1],i=[],a=0;for(let e of t){let t=r[e.dataKey]||0,n=a,o=a+t;i.push({dataKey:e.dataKey,label:e.label,y0:n,y1:o,value:t,timestamp:r.timestamp,isSpecialCategory:e.parliamentMapping?.isSpecialCategory??!1}),a+=t}return i}function Ym(e){let t=e;return{seatsToLines:t*.2,seatsToBar:t*.07,crossFadePause:t*.003,barSlideToTimeline:t*.22,axesAndBarsGrow:t*.22,barsToArea:t*.287}}var Xm=new Map;K.prototype.transition=ra;var Zm=({containerRef:e,data:t,categories:n,mode:r,width:i,height:a,margin:o,timeRange:s,showGrid:c=!0,showAxes:l=!0,axisLabelColor:u,axisLabelSize:f=14,formatDate:p,formatValue:m,markers:h=[],arcAngle:g=200,parliamentRadius:_=200,seatSize:v=4.5,animationDuration:y=900,onMorphComplete:x,onAnimationStateChange:S,onTimelineReady:C,onAnimationProgress:w,onHoveredDataChange:T,hoveredCategory:E,maxSeats:D=b.maxSeats,parliamentTimestamp:O,enableBrush:k=!1,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,showScaleIndicator:N=!1,reposPerSeat:P=1,timelineEvents:F=[],showTimeline:I=!1,timelineHeight:L=40,timelineOffset:R=35,brushColor:z=`#69b3a2`,showCrosshair:B=!1,onCrosshairMove:V})=>{let[H,ee]=(0,d.useState)(`area`),[te,ne]=(0,d.useState)(!1),[re,ie]=(0,d.useState)(null),[ae,oe]=(0,d.useState)(0),[U,W]=(0,d.useState)(null),[se,ce]=(0,d.useState)(null),[le,ue]=(0,d.useState)([]),de=(0,d.useRef)(null),fe=(0,d.useRef)(r),pe=(0,d.useRef)(!0),me=(0,d.useRef)(!1),G=(0,d.useRef)(`morph-${Math.random().toString(36).substr(2,9)}`),he=(0,d.useRef)(void 0),ge=(0,d.useRef)(s),_e=(0,d.useRef)(h),ve=(0,d.useRef)(F),ye=(0,d.useRef)(x),be=(0,d.useRef)(S),xe=(0,d.useRef)(C),Se=(0,d.useRef)(w),Ce=(0,d.useRef)(T),we=(0,d.useRef)(V);(0,d.useEffect)(()=>{ye.current=x,be.current=S,xe.current=C,Se.current=w,Ce.current=T,we.current=V},[x,S,C,w,T,V]),(0,d.useEffect)(()=>{if(e.current&&H===`parliament`)if(E){let r=n.find(e=>e.dataKey===E);if(r){let n=r.label;if(ie(n),lh(e.current,n),t.length>0){let n=t[t.length-1],i=Math.round(n.values[r.dataKey]||0),a={label:r.label,value:i,color:Hm(r.color)};sh(e.current,a,N,P,G.current)}}}else ie(null),lh(e.current,null),sh(e.current,null,N,P,G.current)},[E,H,n,t,N,P]);let Te=i-o.left-o.right,Ee=a-o.top-o.bottom;return(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0||(he.current&&=(he.current(),void 0),me.current))return;let i=K(e.current),a=r!==fe.current;pe.current?(i.selectAll(`*`).remove(),Bm(i,G.current),pe.current=!1):a||(i.selectAll(`*`).remove(),Bm(i,G.current));let d=t[t.length-1],x=n.reduce((e,t)=>e+(d.values[t.dataKey]||0),0),S=t.map(e=>{let t={timestamp:e.timestamp};for(let r of n)t[r.dataKey]=e.values[r.dataKey]||0;return t}),C=n.map(e=>e.dataKey),w=Cl().keys(C),T=w(S),E=t.map(e=>e.timestamp),H=a||!s?Math.min(...E):s[0],te=a||!s?Math.max(...E):s[1],ae=[...E].sort((e,t)=>e-t),U=[];for(let e=0;e<ae.length-1;e++)U.push(ae[e+1]-ae[e]);let se=te+(U.length>0?U.reduce((e,t)=>e+t,0)/U.length:0)*1.15,le=tl().domain([new Date(H),new Date(se)]).range([0,Te]),ge=w(S.filter(e=>e.timestamp>=H&&e.timestamp<=te)),_e=ge.length>0?Math.max(...ge[ge.length-1].map(e=>e[1]??0)):0,ve=Lo().domain([0,_e*1.15]).range([Ee,0]),we=n.map(e=>({...e,color:Vm(e.color,G.current)})),De=Nm(Pm(we.map(e=>({dataKey:e.dataKey,label:e.label,color:e.color,value:d.values[e.dataKey]||0})),x,D).reverse(),{arcAngle:g,radius:_,seatSize:v,minSeatSize:2,maxSeatSize:30,spacing:b.chartConfig.spacing,innerRadiusRatio:.4});de.current=De;let Oe=qm(De,Jm(S,n,ve),le,ve,Te,Ee);if(a&&!me.current){me.current=!0,ne(!0),be.current?.(!0),W(null),ue([]),oe(0);let n=i.select(`g[transform]`);if(n.empty()&&(n=i.select(`g`)),n.empty()){i.selectAll(`*`).remove(),Bm(i,G.current),th(i,r===`parliament`?`parliament`:`area`,T,we,De,le,ve,Te,Ee,o,c,l,u,f,p,m,k,A,G.current,h,s,ue,W,F,I,L,R,ce,j,M,z,B,V),ne(!1),ee(r===`parliament`?`parliament`:`area`),oe(+(r===`parliament`)),fe.current=r;return}let a=setTimeout(()=>{me.current=!1,ne(!1),fe.current=r},y*3);nh(i,r,T,we,De,Oe,le,ve,Te,Ee,o,y,()=>{if(clearTimeout(a),me.current=!1,ne(!1),ee(r===`parliament`?`parliament`:`area`),r===`parliament`&&oe(1),be.current?.(!1),ye.current?.(),fe.current=r,r===`parliament`&&e.current&&Ce.current&&(he.current=ch(e.current,we,t,re,ie,Ce.current,N,P,G.current)),r!==`parliament`&&e.current){ie(null),Ce.current?.(null),sh(e.current,null,N,P,G.current);let t=K(e.current),n=t.select(G.current?`.main-chart-group-${G.current}`:`.main-chart-group`);if(I){let e=G.current?`.timeline-track-${G.current}`:`.timeline-track`,r=G.current?`.timeline-brush-${G.current}`:`.timeline-brush`;n.select(e).remove(),n.select(r).remove(),Fm({svg:t,events:F,xScale:le,chartHeight:Ee,chartWidth:Te,timelineHeight:L,timelineOffset:R,instanceId:G.current,setHoveredTimelineEvent:ce,enableBrush:k,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,brushColor:z})}if(k&&A&&Qm(n.select(G.current?`.chart-content-group-${G.current}`:`.chart-content-group`),Te,Ee,le,A,G.current,t,j,M,z),h.length>0&&ue&&W&&s){let e=h.filter(e=>e.timestamp>=(s[0]??0)-1&&e.timestamp<=(s[1]??1/0)+1).map(e=>({...e,x:le(new Date(e.timestamp))}));if(ue(e),e.length>0){$m(n,e,Ee,Te,k,W,G.current);let t=n.select(G.current?`.markers-${G.current}`:`.markers`);if(!t.empty()){n.selectAll(`.marker-hover-overlay`).remove();let r=n.select(G.current?`.chart-content-group-${G.current}`:`.chart-content-group`);eh(r.empty()?n:r,t,e,Te,Ee,k,W,o,B,V)}}}}},l,f,p,m,xe.current,(e,t)=>{if(r===`parliament`&&e>=.95){let t=(e-.95)/.05;oe(Math.min(t,1))}Se.current?.(e,t)},O,G.current)}else fe.current=r,r===`parliament`&&(W(null),ue([])),th(i,r===`parliament`?`parliament`:`area`,T,we,De,le,ve,Te,Ee,o,c,l,u,f,p,m,k,A,G.current,h,s,ue,W,F,I,L,R,ce,j,M,z,B,V),ee(r===`parliament`?`parliament`:`area`),oe(+(r===`parliament`)),r===`parliament`&&e.current&&Ce.current&&(he.current=ch(e.current,we,t,re,ie,Ce.current,N,P,G.current));return()=>{he.current&&=(he.current(),void 0)}},[r]),(0,d.useEffect)(()=>{if(!e.current||t.length===0||me.current)return;if(pe.current){ge.current=s;return}if(!(s!==ge.current&&(s?.[0]!==ge.current?.[0]||s?.[1]!==ge.current?.[1])))return;ge.current=s;let r=K(e.current),d=t.map(e=>{let t={timestamp:e.timestamp};for(let r of n)t[r.dataKey]=e.values[r.dataKey]||0;return t}),g=n.map(e=>e.dataKey),_=Cl().keys(g)(d),v=t.map(e=>e.timestamp),y=s?s[0]:Math.min(...v),b=s?s[1]:Math.max(...v),x=(v.length>1?(v[v.length-1]-v[0])/(v.length-1):0)*.5,S=tl().domain([new Date(y-x),new Date(b+x)]).range([0,i-o.left-o.right]),C=Math.max(..._[_.length-1].map(e=>e[1])),w=Lo().domain([0,C*1.1]).range([a-o.top-o.bottom,0]);if(!de.current)return;let T=de.current,E=n.map(e=>({...e,color:Vm(e.color,G.current)}));r.selectAll(`*`).remove(),Bm(r,G.current),th(r,H===`parliament`?`parliament`:`area`,_,E,T,S,w,i-o.left-o.right,a-o.top-o.bottom,o,c,l,u,f,p,m,k,A,G.current,h,s,ue,W,F,I,L,R,ce,j,M,z,B,V),H===`parliament`&&e.current&&Ce.current&&(he.current=ch(e.current,E,t,re,ie,Ce.current,N,P,G.current))},[s]),(0,d.useEffect)(()=>{if(!e.current||t.length===0||me.current)return;if(pe.current){_e.current=h,ve.current=F;return}if(H===`parliament`){_e.current=h,ve.current=F;return}let n=h.length!==_e.current.length||h.some((e,t)=>e.timestamp!==_e.current[t]?.timestamp||e.label!==_e.current[t]?.label),r=F.length!==ve.current.length||F.some((e,t)=>e.timestamp!==ve.current[t]?.timestamp||e.eventName!==ve.current[t]?.eventName);if(!n&&!r)return;_e.current=h,ve.current=F;let c=K(e.current),l=c.select(G.current?`.main-chart-group-${G.current}`:`.main-chart-group`);if(l.empty())return;let u=t.map(e=>e.timestamp),d=s?s[0]:Math.min(...u),f=s?s[1]:Math.max(...u),p=(u.length>1?(u[u.length-1]-u[0])/(u.length-1):0)*.5,m=i-o.left-o.right,g=a-o.top-o.bottom,_=tl().domain([new Date(d-p),new Date(f+p)]).range([0,m]);if(r&&I){let e=G.current?`.timeline-track-${G.current}`:`.timeline-track`,t=G.current?`.timeline-brush-${G.current}`:`.timeline-brush`;l.select(e).remove(),l.select(t).remove(),Fm({svg:c,events:F,xScale:_,chartHeight:g,chartWidth:m,timelineHeight:L,timelineOffset:R,instanceId:G.current,setHoveredTimelineEvent:ce,enableBrush:k,onTimeRangeChange:A,minAllowedTime:j,maxAllowedTime:M,brushColor:z})}let v=[];if(n&&h.length>0&&s){let e=G.current?`.markers-${G.current}`:`.markers`;l.select(e).remove(),v=h.filter(e=>e.timestamp>=(s[0]??0)-1&&e.timestamp<=(s[1]??1/0)+1).map(e=>({...e,x:_(new Date(e.timestamp))})),ue(v),v.length>0&&$m(l,v,g,m,k,W,G.current)}if(v.length>0){let e=l.select(G.current?`.markers-${G.current}`:`.markers`);if(!e.empty()){l.selectAll(`.marker-hover-overlay`).remove();let t=l.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`x`,0).attr(`y`,0).attr(`width`,m).attr(`height`,g).attr(`fill`,`none`).attr(`pointer-events`,`all`),n=null;t.on(`mousemove`,function(t){let[r]=on(t,this),i=null,a=1/0;if(v.forEach(e=>{let t=Math.abs(r-e.x);t<a&&(a=t,i=e)}),!i||a>50){n!==null&&(n=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),W(null));return}let o=i;n!==o.timestamp&&(n=o.timestamp,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),e.selectAll(`.marker-line`).filter(function(){return K(this).attr(`data-timestamp`)===String(o.timestamp)}).attr(`opacity`,.6),e.selectAll(`.marker-label`).filter(function(){return K(this).attr(`data-timestamp`)===String(o.timestamp)}).attr(`opacity`,1),W(o))}),t.on(`mouseleave`,function(){n=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),W(null)})}}},[h,F,te]),{isMorphing:te,currentMode:H,hoveredCategory:re,scaleIndicatorOpacity:ae,visibleMarkers:le,hoveredMarker:U,setHoveredMarker:W,hoveredTimelineEvent:se,setHoveredTimelineEvent:ce}};function Qm(e,t,n,r,i,a,o,s,c,l){let u=s,d=c,f=Ia().extent([[0,0],[t,n]]).on(`start`,e=>{if(!e.selection&&u!==void 0&&d!==void 0){let t=e.sourceEvent;if(t){let e=t.offsetX,n=+r.invert(e);if(n<u||n>d){o.select(`.brush`).call(f.move,null);return}}}}).on(`brush`,e=>{if(!e.selection)return;let[t,n]=e.selection,i=+r.invert(t),a=+r.invert(n);u!==void 0&&(i=Math.max(i,u),a=Math.max(a,u)),d!==void 0&&(i=Math.min(i,d),a=Math.min(a,d));let s=r(new Date(i)),c=r(new Date(a));(s!==t||c!==n)&&o.select(`.brush`).call(f.move,[s,c])}).on(`end`,e=>{if(!e.selection)return;let[t,n]=e.selection,a=[+r.invert(t),+r.invert(n)];u!==void 0&&(a[0]=Math.max(a[0],u)),d!==void 0&&(a[1]=Math.min(a[1],d)),i(a),o.select(`.brush`).call(f.move,null)}),p=e.append(`g`).attr(`class`,`brush`).call(f);p.selectAll(`.selection`).attr(`fill`,l).attr(`fill-opacity`,.2).attr(`stroke`,l).attr(`stroke-width`,1),p.selectAll(`.handle`).attr(`fill`,l).attr(`fill-opacity`,.8),p.select(`.overlay`).style(`cursor`,`default`),p.on(`dblclick`,()=>{let e=r.domain(),t=[+e[0],+e[1]];s!==void 0&&(t[0]=Math.max(t[0],s)),c!==void 0&&(t[1]=Math.min(t[1],c)),i(t)})}function $m(e,t,n,r,i,a,o){let s=o?`markers markers-${o}`:`markers`,c=e.append(`g`).attr(`class`,s);t.forEach(e=>{c.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,e.timestamp).attr(`x1`,e.x).attr(`x2`,e.x).attr(`y1`,0).attr(`y2`,n).attr(`stroke`,e.color??`#2F42FF`).attr(`stroke-width`,2).attr(`opacity`,0),e.label&&c.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,e.timestamp).attr(`x`,e.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,e.color??`#2F42FF`).attr(`opacity`,0)})}function eh(e,t,n,r,i,a,o,s,c=!1,l){let u=null,d;d=a?e.select(`.brush .overlay`):e.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,r).attr(`height`,i).attr(`fill`,`none`).attr(`pointer-events`,`all`);let f=e=>{let r=null,i=1/0;if(n.forEach(t=>{let n=Math.abs(e-t.x);n<i&&(i=n,r=t)}),!r||i>50)return u!==null&&(u=null,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),o(null)),!1;let a=r;return u===a.timestamp?!0:(u=a.timestamp,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),t.selectAll(`.marker-line`).filter(function(){return K(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,.6),t.selectAll(`.marker-label`).filter(function(){return K(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,1),o(a),!0)};d.on(`mousemove`,function(e){let[t,n]=on(e,this);f(t),c&&l&&l({x:t+s.left,y:n+s.top})}),d.on(`mouseleave`,function(){u=null,t.selectAll(`.marker-line`).attr(`opacity`,0),t.selectAll(`.marker-label`).attr(`opacity`,0),o(null),l&&l(null)})}function th(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=!1,_,v,y=[],b=[0,0],x,S,C=[],w=!1,T=40,E=15,D,O,k,A=`#69b3a2`,j=!1,M){let N=O,P=k,F=null,I=v?`main-chart-group main-chart-group-${v}`:`main-chart-group`,L=e.append(`g`).attr(`class`,I).attr(`transform`,`translate(${l.left},${l.top})`),R=v?`chart-clip-${v}`:`chart-clip-${Math.random().toString(36).substr(2,9)}`;e.select(`defs`).append(`clipPath`).attr(`id`,R).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,s).attr(`height`,c);let z=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`,B=L.append(`g`).attr(`class`,z).attr(`clip-path`,`url(#${R})`);if(u&&t!==`parliament`&&(B.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(te(a).ticks(6).tickSize(c).tickFormat(()=>``)),B.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(ne(o).ticks(5).tickSize(-s).tickFormat(()=>``))),t===`area`&&(Um(B,n,r,{xScale:a,yScale:o,addClasses:!0,instanceId:v}),y.length>0)){let e=y.filter(e=>e.timestamp>=b[0]-1&&e.timestamp<=b[1]+1).map(e=>({...e,x:a(new Date(e.timestamp))}));F={markersGroup:null,visibleMarkers:e},x&&x(e)}if(t===`parliament`){let e=s/2,t=i.radius+10,n=c-i.radius*.3;Km(B,i,r,{centerX:e,centerY:Math.max(t,n),addClasses:!0,instanceId:v,parliamentRadius:i.radius})}if(d&&t!==`parliament`){let e=te(a).ticks(6).tickPadding(12);m&&e.tickFormat(e=>m(+e));let t=L.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${c})`).call(e).selectAll(`text`).attr(`font-size`,p).attr(`font-weight`,500);f&&t.attr(`fill`,f);let n=ne(o).ticks(5);n.tickFormat(e=>+e==0?``:h?h(+e):String(e));let r=L.append(`g`).attr(`class`,`axis axis-y`).call(n).selectAll(`text`).attr(`font-size`,p).attr(`font-weight`,500);f&&r.attr(`fill`,f)}if(g&&_&&t===`area`){let t=N,n=P,r=Ia().extent([[0,0],[s,c]]).on(`start`,i=>{if(!i.selection&&t!==void 0&&n!==void 0){let o=i.sourceEvent;if(o){let i=o.offsetX-(l?.left||0),s=+a.invert(i);if(s<t||s>n){e.select(`.brush`).call(r.move,null);return}}}}).on(`brush`,i=>{if(!i.selection)return;let[o,s]=i.selection,c=+a.invert(o),l=+a.invert(s);t!==void 0&&(c=Math.max(c,t),l=Math.max(l,t)),n!==void 0&&(c=Math.min(c,n),l=Math.min(l,n));let u=a(new Date(c)),d=a(new Date(l));(u!==o||d!==s)&&e.select(`.brush`).call(r.move,[u,d])}).on(`end`,i=>{if(!i.selection)return;let[o,s]=i.selection,c=[+a.invert(o),+a.invert(s)];t!==void 0&&(c[0]=Math.max(c[0],t)),n!==void 0&&(c[1]=Math.min(c[1],n)),_(c),e.select(`.brush`).call(r.move,null)}),i=B.append(`g`).attr(`class`,`brush`).call(r);i.selectAll(`.selection`).attr(`fill`,A).attr(`fill-opacity`,.2).attr(`stroke`,A).attr(`stroke-width`,1),i.selectAll(`.handle`).attr(`fill`,A).attr(`fill-opacity`,.8),i.select(`.overlay`).style(`cursor`,`default`),i.on(`dblclick`,()=>{let e=a.domain();_([+e[0],+e[1]])})}if(t===`area`&&F&&F.visibleMarkers.length>0){let e=L.append(`g`).attr(`class`,`markers`).attr(`clip-path`,`url(#${R})`);F.visibleMarkers.forEach(t=>{e.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,t.timestamp).attr(`x1`,t.x).attr(`x2`,t.x).attr(`y1`,0).attr(`y2`,c).attr(`stroke`,t.color??`#2F42FF`).attr(`stroke-width`,2).attr(`opacity`,0),t.label&&e.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,t.timestamp).attr(`x`,t.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,t.color??`#2F42FF`).attr(`opacity`,0)}),F.markersGroup=e}t===`area`&&w&&D&&Fm({svg:e,events:C,xScale:a,chartHeight:c,chartWidth:s,timelineHeight:T,timelineOffset:E,instanceId:v,setHoveredTimelineEvent:D,enableBrush:g,onTimeRangeChange:_,minAllowedTime:N,maxAllowedTime:P,brushColor:A}),t===`area`&&eh(B,F?.markersGroup??B.append(`g`).attr(`class`,`empty-markers-group`),F?.visibleMarkers??[],s,c,g,S??(()=>{}),l,j,M)}function nh(e,t,n,r,i,a,o,s,c,l,u,d,f,p=!0,m=14,h,g,_,v,y,b){let x=e.select(b?`.main-chart-group-${b}`:`.main-chart-group`);x.selectAll(`.markers`).remove(),x.selectAll(`.marker-hover-overlay`).remove(),x.selectAll(`.brush`).remove(),t===`stacked-area`||t===`area`?ih(x,n,r,i,a,o,s,c,l,d,f,p,m,h,g,_,v,y,b):ah(x,n,r,i,a,o,s,c,l,d,f,p,m,h,g,_,v,y,b)}function rh(e,t,n,r,i,a,o,s){let c=e[a];if(!c)return``;let l=c.find(e=>e.data.timestamp===o);if(!l)return``;let u=l.data,d=t[a];if(!d)return``;let f=u[d.dataKey];if(!f||f<=0)return``;let p=n.get(o);if(!p)return``;let m=p.x,h=p.width,g=l[0],_=l[1],v=s?i:r(g),y=s?i:r(_),b=[];return b.push(`M ${m} ${v}`),b.push(`L ${m} ${y}`),b.push(`L ${m+h} ${y}`),b.push(`L ${m+h} ${v}`),b.push(`Z`),b.join(` `)}function ih(e,t,n,r,i,a,o,s,c,l,u,d=!0,f=14,p,m,h,g,_,v){let y=v?`.seat-${v}`:`.seat`,b=e.selectAll(y),x=v?`.chart-content-group-${v}`:`.chart-content-group`,S=e.select(x);if(S.empty()){let t=e.attr(`clip-path`),n=t&&t.match(/url\(#(.+)\)/)?.[1]||`chart-clip-${Math.random().toString(36).substr(2,9)}`,r=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`;S=e.append(`g`).attr(`class`,r).attr(`clip-path`,`url(#${n})`)}if(b.size()===0){Um(e,t,n,{xScale:a,yScale:o,addClasses:!0,instanceId:v}),u();return}let C=Ym(l),w=v?Xm.get(v):void 0;w&&(w.destroy(),v&&Xm.delete(v));let T=e=>e<.2?`seatsToRings`:e<.35?`ringsToBar`:e<.464?`axesReveal`:e<.6?`barSlide`:e<.82?`barsGrow`:`barsToArea`,E=new Mm({seatsToRings:C.seatsToLines,ringsToBar:C.seatsToBar,axesReveal:C.barSlideToTimeline*.3,barSlide:C.barSlideToTimeline*.7,barsGrow:C.axesAndBarsGrow,barsToArea:C.barsToArea},{onStageComplete:e=>{},onProgress:e=>{g&&g(e,T(e))},onComplete:()=>{u()}});v&&Xm.set(v,E),h&&h(E.getControls().getTimeline());let D=t[0].map(e=>e.data),O=Wm(D,n),k=s/2,A=r.radius+10,j=c-r.radius*.3,M=Math.max(A,j),N=D.map(e=>e.timestamp),P=_??Math.max(...N),F=new Map,I=[];N.forEach((e,t)=>{let n=a(new Date(e)),r=N[t+1];if(r){let e=a(new Date(r))-n;I.push(e)}});let L=I.length>0?I.reduce((e,t)=>e+t,0)/I.length:30;N.forEach((e,t)=>{let n=a(new Date(e)),r=N[t+1],i=t===N.length-1?L:a(new Date(r))-n;F.set(e,{x:n,width:i})});let R=O.filter(e=>e.timestamp===P),z=F.get(P),B=v?`parliament-bar-path parliament-bar-path-${v}`:`parliament-bar-path`,V=S.append(`g`).attr(`class`,B);R.sort((e,t)=>t.y0-e.y0),new Map().set(P,{x:666-z.width/2,width:z.width});let H=[],ee=(r.radius-r.innerRadius)*.6,re=c*.8,ie=M,ae=R.reduce((e,t)=>e+(t.y1-t.y0),0),oe=0;n.forEach(e=>{let t=R.find(t=>t.dataKey===e.dataKey);if(!t)return;let n=(t.y1-t.y0)/ae*re,r=ie-oe,i=ie-oe-n,a=666-ee/2,o=`M ${a} ${r} L ${a} ${i} L ${a+ee} ${i} L ${a+ee} ${r} Z`;oe+=n;let s=V.append(`path`).attr(`class`,`parliament-bar-segment category-${Gm(t.dataKey)}`).attr(`d`,o).attr(`fill`,t.color).style(`opacity`,0).node();s&&H.push(s)}),v&&(window.orchestratorMap=Xm);let U=E.getControls().getTimeline(),W=C.seatsToLines/1e3,se=C.seatsToBar/1e3;U.call(()=>{g?.(U.progress(),`seatsToRings`)},[],`seatsToRings`);let ce=b.nodes(),le=k,ue=M,de=Math.max(...r.seats.map(e=>e.ring)),fe=r.seats.filter(e=>e.ring===de),pe=e.append(`g`).attr(`class`,`seat-lines-${v||`default`}`),me=n.map(e=>{let t=b.filter(`.seat-${Gm(e.dataKey)}`).size();return t>0?{name:e.dataKey,seatCount:t,color:e.color}:null}).filter(e=>e!==null).reverse(),G=me.reduce((e,t)=>e+t.seatCount,0),he=fe.length,ge=r.radius-r.innerRadius,_e=ge*.6,ve=_e/2,ye=ge*.6,be=[],xe=0;me.forEach(e=>{let t=Math.max(1,Math.round(e.seatCount/G*he));for(let n=0;n<t;n++){let t=(xe+n)/he,i=r.arcAngle*Math.PI/180,a=-i/2-Math.PI/2+t*i,o=(r.innerRadius+r.radius)/2,s=le+Math.cos(a)*o,c=ue+Math.sin(a)*o,l=Math.cos(a),u=Math.sin(a),d=s-ve*l,f=c-ve*u,p=s+ve*l,m=c+ve*u,h=pe.append(`line`).attr(`class`,`seat-line`).attr(`x1`,d).attr(`y1`,f).attr(`x2`,p).attr(`y2`,m).attr(`stroke`,e.color).attr(`stroke-width`,r.seatSize*2).attr(`stroke-linecap`,`butt`).style(`opacity`,0).attr(`data-angle`,a*180/Math.PI).attr(`data-center-x`,s).attr(`data-center-y`,c).attr(`data-initial-length`,_e).node();be.push({element:h,angle:a})}xe+=t});let Se=()=>{pe.remove()},Ce=W*.5,we=[];if(we.push(...ce),we.sort((e,t)=>parseInt(e.getAttribute(`data-layout-index`)||`-1`,10)-parseInt(t.getAttribute(`data-layout-index`)||`-1`,10)),we.length>0&&be.length>0){let e=be.map(e=>e.element);U.to(we,{attr:{r:1.5},duration:Ce*.3,ease:`power2.in`},`seatsToRings+=0`),e.forEach(e=>{let t=e.getAttribute(`x1`)||`0`,n=e.getAttribute(`y1`)||`0`,r=e.getAttribute(`x2`)||`0`,i=e.getAttribute(`y2`)||`0`;e.setAttribute(`data-final-x1`,t),e.setAttribute(`data-final-y1`,n),e.setAttribute(`data-final-x2`,r),e.setAttribute(`data-final-y2`,i),e.setAttribute(`x1`,t),e.setAttribute(`y1`,n),e.setAttribute(`x2`,t),e.setAttribute(`y2`,n)}),U.to(e,{attr:{x2:(e,t)=>parseFloat(t.getAttribute(`data-final-x2`)||`0`),y2:(e,t)=>parseFloat(t.getAttribute(`data-final-y2`)||`0`)},opacity:.9,duration:Ce*.6,ease:`power2.out`},`seatsToRings+=${0+Ce*.2}`),U.to(we,{opacity:0,duration:Ce*.3,ease:`power2.out`},`seatsToRings+=${0+Ce*.3}`)}let Te=W*.05,Ee=W*.7,De=0+Ce+Te;if(be.length>0){let e=M,t=c*.8/be.length,n=e,r=[...be].sort((e,t)=>t.angle-e.angle),i=.6/r.length;r.forEach((e,r)=>{let a=n-r*t,o=i*r*Ee,s=e.element,c=parseFloat(s.getAttribute(`data-final-x1`)||`0`),l=parseFloat(s.getAttribute(`data-final-y1`)||`0`),u=parseFloat(s.getAttribute(`data-final-x2`)||`0`),d=parseFloat(s.getAttribute(`data-final-y2`)||`0`),f=(c+u)/2,p=(l+d)/2,m=Math.atan2(d-l,u-c),h=Math.sqrt((u-c)**2+(d-l)**2);U.to({progress:0},{progress:1,duration:Ee*.5,ease:`power2.inOut`,delay:o,onUpdate:function(){let e=this.progress(),t=f+(666-f)*e,n=p+(a-p)*e,r=160*e*(1-e),i=t,o=n-r,c=0-m,l=m+c*e*e,u=(h+(ye-h)*e)/2,d=i-u*Math.cos(l),g=o-u*Math.sin(l),_=i+u*Math.cos(l),v=o+u*Math.sin(l);s.setAttribute(`x1`,d.toString()),s.setAttribute(`y1`,g.toString()),s.setAttribute(`x2`,_.toString()),s.setAttribute(`y2`,v.toString())},onComplete:function(){let e=ye/2;s.setAttribute(`x1`,(666-e).toString()),s.setAttribute(`y1`,a.toString()),s.setAttribute(`x2`,(666+e).toString()),s.setAttribute(`y2`,a.toString())}},`seatsToRings+=${De}`),U.to(e.element,{opacity:.95,duration:Ee*.3,ease:`power2.out`,delay:o},`seatsToRings+=${De}`)})}let Oe=pe,ke=[];R.forEach((e,t)=>{let n=b.filter(`.seat-${Gm(e.category)}`),i=n.size();if(i===0)return;let a=o(e.y1),s=o(e.y0)-o(e.y1),c=n.nodes().sort((e,t)=>parseInt(e.getAttribute(`data-layout-index`)||`-1`,10)-parseInt(t.getAttribute(`data-layout-index`)||`-1`,10)),l=Math.max(z.width,100),u=s,d=l/Math.max(u,1),f=Math.max(2,Math.ceil(Math.sqrt(i*d))),p=Math.ceil(i/f),m=l*.8,h=u*.8,g=f>1?m/(f-1):0,_=p>1?h/(p-1):0,v=f>1?(f-1)*g:0,y=p>1?(p-1)*_:0,x=666-l/2+(l-v)/2,S=a+(u-y)/2;c.forEach((n,a)=>{let o=parseInt(n.getAttribute(`data-layout-index`)||`-1`,10),s=o>=0?r.seats[o]:void 0,c=s?k+s.x:parseFloat(n.getAttribute(`cx`)||`0`),l=s?M+s.y:parseFloat(n.getAttribute(`cy`)||`0`),u=s?.radius||parseFloat(n.getAttribute(`r`)||`4`),d=i%f,p,m;if(d>0&&a<d)m=0,p=a;else{let e=a-(d>0?d:0);p=e%f,m=Math.floor(e/f)+ +(d>0)}let h=x+p*g;if(d>0&&m===0){let e=d>1?(d-1)*g:0,t=(v-e)/2;h=x+t+p*g}let y=S+m*_;ke.push({element:n,startX:c,startY:l,startRadius:u,category:e.dataKey,segmentIndex:t,endY:y,endX:h})})});let Ae=ke.map(e=>{let t=e.startX-k,n=e.startY-M,r=Math.atan2(n,t);return{...e,angle:r}});Ae.sort((e,t)=>t.angle-e.angle);let je=se*.8,Me=Ae.length,Ne=je/Math.max(Me,1)*(Me-1)+.6,Pe=se*.3,Fe=Ne;U.to(H,{opacity:1,duration:Pe,ease:`power2.inOut`},`seatsToBar+=${Fe}`),Oe&&(U.to(Oe.selectAll(`.seat-line`).nodes(),{opacity:0,duration:Pe,ease:`power2.inOut`},`seatsToBar+=${Fe}`),U.call(()=>{Se()},[],`seatsToBar+=${Fe+Pe}`));let Ie=C.barSlideToTimeline/1e3,Le=null,Re=null;if(d){let t=te(a).ticks(6).tickPadding(12);p&&t.tickFormat(e=>p(e.getTime())),Le=e.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${c})`).attr(`opacity`,0),Le.call(t).selectAll(`text`).attr(`font-size`,f).attr(`font-weight`,500);let n=ne(o).ticks(5);n.tickFormat(e=>+e==0?``:m?m(e):String(e)),Re=e.append(`g`).attr(`class`,`axis axis-y`).attr(`opacity`,0),Re.call(n).selectAll(`text`).attr(`font-size`,f).attr(`font-weight`,500)}let ze=C.crossFadePause/1e3,Be=Fe+Pe+ze;H.forEach(e=>{let r=Array.from(e.classList).find(e=>e.startsWith(`category-`));if(!r||!R.find(e=>Gm(e.dataKey)===r.replace(`category-`,``)))return;let i=n.findIndex(e=>Gm(e.dataKey)===r.replace(`category-`,``));if(i===-1)return;let a=rh(t,n,F,o,c,i,P,!1);a&&U.to(e,{attr:{d:a},duration:Ie,ease:`power2.out`},`seatsToBar+=${Be}`)});let Ve=vl().x(e=>a(e.data.timestamp)).y0(e=>o(e[0])).y1(e=>o(e[1])).curve(ml),He=new Map;t.forEach((e,t)=>{let r=n[t];if(r){let t=Ve(e)||``;He.set(r.dataKey,t)}});let Ue=Be+Ie;d&&Le&&Re&&U.to([Le.node(),Re.node()],{opacity:1,duration:.6,ease:`power2.inOut`},`seatsToBar+=${Be}`);let We=S.select(`.grid-vertical`),Ge=S.select(`.grid-horizontal`);if(!We.empty()||!Ge.empty()){let e=[];We.empty()||e.push(We.node()),Ge.empty()||e.push(Ge.node()),U.to(e,{opacity:.1,duration:.6,ease:`power2.inOut`},`seatsToBar+=${Be}`)}let Ke=C.axesAndBarsGrow/1e3,qe=C.barsToArea/1e3,Je=v?`histogram-paths histogram-paths-${v}`:`histogram-paths`,Ye=S.append(`g`).attr(`class`,Je);N.forEach(e=>{if(e===P)return;let r=F.get(e);r&&n.forEach((i,a)=>{let s=rh(t,n,F,o,c,a,e,!0),l=rh(t,n,F,o,c,a,e,!1);if(!s||!l)return;let u=v?`histogram-path histogram-path-${v} category-${Gm(i.dataKey)}`:`histogram-path category-${Gm(i.dataKey)}`;Ye.append(`path`).attr(`class`,u).attr(`d`,s).attr(`fill`,i.color).attr(`stroke`,i.color).attr(`stroke-width`,.5).attr(`shape-rendering`,`crispEdges`).attr(`opacity`,0).attr(`data-category`,i.dataKey).attr(`data-timestamp`,e).attr(`data-x-position`,r.x).attr(`data-full-height-path`,l)})});let Xe=v?`.histogram-path-${v}`:`.histogram-path`,Ze=Ye.selectAll(Xe);U.to(Ze.nodes(),{opacity:1,duration:.3,ease:`power2.inOut`},`seatsToBar+=${Ue}`);let Qe=z.x+z.width/2;Ze.each(function(){let e=this.getAttribute(`data-full-height-path`);if(!e)return;let t=parseFloat(this.getAttribute(`data-x-position`)||`0`),n=parseFloat(this.getAttribute(`data-timestamp`)||`0`),r=t+(F.get(n)?.width||0)/2,i=Math.abs(r-Qe)*8e-4;U.to(this,{attr:{d:e},duration:Ke,ease:`power2.out`},`seatsToBar+=${Ue+i}`)});let $e=Ue+Ke,et=N[N.length-1],tt=a(new Date(et))+L,nt=a.invert(tt).getTime();Um(e,t.map(e=>{let t=e[e.length-1],n={...t,data:{...t.data,timestamp:nt}};return[...e,n]}),n,{xScale:a,yScale:o,addClasses:!0,instanceId:v});let rt=v?`.area-${v}`:`.area`,it=e.selectAll(rt);it.attr(`opacity`,0),U.to(Ze.nodes(),{opacity:0,duration:qe,ease:`power2.inOut`},`seatsToBar+=${$e}`);let at=V.selectAll(`path`).nodes();at.length>0&&U.to(at,{opacity:0,duration:qe,ease:`power2.inOut`},`seatsToBar+=${$e}`),U.to(it.nodes(),{opacity:1,duration:qe,ease:`power2.inOut`},`seatsToBar+=${$e}`);let ot=u;E.getControls().getTimeline().eventCallback(`onComplete`,()=>{let t=v?`.morph-bar-${v}`:`.morph-bar`;e.selectAll(t).remove();let n=v?`.histogram-paths-${v}`:`.histogram-paths`;e.selectAll(n).remove();let r=v?`.seat-${v}`:`.seat`;e.selectAll(r).style(`pointer-events`,`none`),d&&(Le&&Le.attr(`opacity`,1),Re&&Re.attr(`opacity`,1)),ot()}),E.play()}function ah(e,t,n,r,i,a,o,s,c,l,u,d=!0,f=14,p,m,h,g,_,v){let y=v?`.chart-content-group-${v}`:`.chart-content-group`,b=e.select(y);if(b.empty()){let t=e.attr(`clip-path`),n=t&&t.match(/url\(#(.+)\)/)?.[1]||`chart-clip-${Math.random().toString(36).substr(2,9)}`,r=v?`chart-content-group chart-content-group-${v}`:`chart-content-group`;b=e.append(`g`).attr(`class`,r).attr(`clip-path`,`url(#${n})`)}let x=v?`.area-${v}`:`.area`,S=e.selectAll(x);if(S.size()===0){oh(e,n,r,s,c,v),u();return}let C={areaToBar:l*.18,barsShrink:l*.22,barSlide:l*.22,axesHide:l*.03,barToRings:l*.07,ringsExpand:l*.18,ringsHold:l*.05,ringsToSeats:l*.07},w=v?Xm.get(v):void 0;w&&(w.destroy(),v&&Xm.delete(v));let T=e=>e<.18?`areaToBar`:e<.4?`barsShrink`:e<.62?`barSlide`:e<.65?`axesHide`:e<.72?`barToRings`:e<.9?`ringsExpand`:e<.95?`ringsHold`:`ringsToSeats`,E=new Mm({seatsToRings:C.ringsToSeats,ringsHold:C.ringsHold,ringsToBar:C.barToRings,axesReveal:C.axesHide,barSlide:C.barSlide,barsGrow:C.barsShrink,barsToArea:C.areaToBar},{onStageComplete:e=>{},onProgress:e=>{g&&g(e,T(e))},onComplete:()=>{u()}});v&&Xm.set(v,E),h&&h(E.getControls().getTimeline());let D=t[0].map(e=>e.data).map(e=>e.timestamp),k=_??Math.max(...D),A=new Map,j=[];D.forEach((e,t)=>{let n=a(new Date(e)),r=D[t+1];if(r){let e=a(new Date(r))-n;j.push(e)}});let M=j.length>0?j.reduce((e,t)=>e+t,0)/j.length:30;D.forEach((e,t)=>{let n=a(new Date(e)),r=D[t+1],i=t===D.length-1?M:a(new Date(r))-n;A.set(e,{x:n,width:i})});let N=E.getControls().getTimeline(),P=C.areaToBar/1e3,F=v?`histogram-paths histogram-paths-${v}`:`histogram-paths`,I=b.append(`g`).attr(`class`,F);D.forEach(e=>{let r=A.get(e);r&&n.forEach((i,a)=>{let s=rh(t,n,A,o,c,a,e,!1);if(!s)return;let l=v?`histogram-path histogram-path-${v} category-${Gm(i.dataKey)}`:`histogram-path category-${Gm(i.dataKey)}`;I.append(`path`).attr(`class`,l).attr(`d`,s).attr(`fill`,i.color).attr(`stroke`,i.color).attr(`stroke-width`,.5).attr(`shape-rendering`,`crispEdges`).attr(`opacity`,0).attr(`data-category`,i.dataKey).attr(`data-timestamp`,e).attr(`data-x-position`,r.x)})});let L=v?`.histogram-path-${v}`:`.histogram-path`,R=I.selectAll(L);N.to(S.nodes(),{opacity:0,duration:P,ease:`power2.inOut`},`areaToBar`),N.to(R.nodes(),{opacity:1,duration:P,ease:`power2.inOut`},`areaToBar`);let z=C.barsShrink/1e3,B=P;R.each(function(){let e=parseFloat(this.getAttribute(`data-timestamp`)||`0`);if(e===k)return;let r=n.find(e=>this.classList.contains(`category-${Gm(e.dataKey)}`));if(!r)return;let i=n.indexOf(r),a=rh(t,n,A,o,c,i,e,!0);a&&N.to(this,{attr:{d:a},duration:z,ease:`power2.in`},B)});let V=C.axesHide/1e3,H=B+z;if(d){let t=e.select(`.axis-x`),n=e.select(`.axis-y`);t.empty()||N.to(t.node(),{opacity:0,duration:V,ease:`power2.inOut`},H),n.empty()||N.to(n.node(),{opacity:0,duration:V,ease:`power2.inOut`},H)}let ee=b.select(`.grid-vertical`),te=b.select(`.grid-horizontal`);ee.empty()||N.to(ee.node(),{opacity:0,duration:V,ease:`power2.inOut`},H),te.empty()||N.to(te.node(),{opacity:0,duration:V,ease:`power2.inOut`},H);let ne=[];t.forEach((e,t)=>{let r=e.find(e=>e.data.timestamp===k);if(!r)return;let i=n[t];i&&ne.push({category:i.label,dataKey:i.dataKey,color:i.color,y0:r[0],y1:r[1]})}),ne.sort((e,t)=>t.y0-e.y0);let re=ne.reduce((e,t)=>e+(t.y1-t.y0),0),ie=r.radius-r.innerRadius,ae=s/2,oe=r.radius+10,U=c-r.radius*.3,W=Math.max(oe,U),se=ie*.6,ce=c*.8,le=W,ue=C.barSlide/1e3,de=H+V,fe=R.nodes().filter(e=>parseFloat(e.getAttribute(`data-timestamp`)||`0`)!==k);N.to(fe,{opacity:0,duration:ue*.2,ease:`power2.out`},de);let pe=R.nodes().filter(e=>parseFloat(e.getAttribute(`data-timestamp`)||`0`)===k);pe.forEach(e=>{let t=e.getAttribute(`data-category`);if(!t)return;let r=ne.find(e=>e.dataKey===t);if(!r)return;let i=(r.y1-r.y0)/re*ce,a=0;for(let e of n){let t=ne.find(t=>t.dataKey===e.dataKey);if(!t)continue;if(t.dataKey===r.dataKey)break;let n=(t.y1-t.y0)/re;a+=n*ce}let o=le-a,s=le-a-i,c=666-se/2,l=`M ${c} ${o} L ${c} ${s} L ${c+se} ${s} L ${c+se} ${o} Z`;N.to(e,{attr:{d:l},duration:ue,ease:`power2.inOut`},de)});let me=C.barToRings/1e3,G=de+ue,he=C.ringsExpand/1e3,ge=G+me,_e=C.ringsHold/1e3,ve=ge+he,ye=C.ringsToSeats/1e3,be=ve+_e,xe=Math.max(...r.seats.map(e=>e.ring)),Se=r.seats.filter(e=>e.ring===xe),Ce=b.append(`g`).attr(`class`,`slinky-${v||`h2p-default`}`),we=()=>{Ce.remove()};Se.forEach((e,t)=>{let i=n.find(t=>t.label===e.category);i&&Ce.append(`line`).attr(`class`,`slinky-ring`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,0).attr(`y2`,0).attr(`stroke`,i.color).attr(`stroke-width`,r.seatSize*2).attr(`stroke-linecap`,`butt`).attr(`data-category`,e.category).attr(`data-category-index`,e.categoryIndex).attr(`data-ring-index`,t).attr(`data-seat-x`,ae+e.x).attr(`data-seat-y`,W+e.y).attr(`data-seat-angle`,Math.atan2(e.y,e.x)).style(`opacity`,0)});let Te=Ce.selectAll(`.slinky-ring`).nodes(),Ee=ce/Te.length,De=[...Te].sort((e,t)=>{let n=parseFloat(e.getAttribute(`data-seat-angle`)||`0`);return parseFloat(t.getAttribute(`data-seat-angle`)||`0`)-n}),Oe=le;De.forEach((e,t)=>{let n=Oe-t*Ee,r=se/2,i=666-r,a=666+r;e.setAttribute(`x1`,i.toString()),e.setAttribute(`y1`,n.toString()),e.setAttribute(`x2`,a.toString()),e.setAttribute(`y2`,n.toString()),e.style.opacity=`0`}),N.to(pe,{opacity:0,duration:me*.7,ease:`power2.out`},G+me*.3),N.to(De,{opacity:1,duration:me,ease:`power2.in`,stagger:.005},G);let ke=ie*.8;De.forEach((e,t)=>{let n=parseFloat(e.getAttribute(`data-seat-x`)||`0`),r=parseFloat(e.getAttribute(`data-seat-y`)||`0`),i=parseFloat(e.getAttribute(`data-seat-angle`)||`0`),a=(De.length-1-t)/De.length*(he*.4),o=parseFloat(e.getAttribute(`x1`)||`0`),s=parseFloat(e.getAttribute(`y1`)||`0`),c=parseFloat(e.getAttribute(`x2`)||`0`),l=parseFloat(e.getAttribute(`y2`)||`0`),u=(o+c)/2,d=(s+l)/2,f=Math.atan2(l-s,c-o),p=Math.sqrt((c-o)**2+(l-s)**2),m=n-ke/2*Math.cos(i),h=r-ke/2*Math.sin(i);N.to({progress:0},{progress:1,duration:he*.7,ease:`power2.out`,onUpdate:function(){let t=this.progress(),n=u+(m-u)*t,r=d+(h-d)*t,a=f+(i-f)*t,o=(p+(ke-p)*t)/2,s=n-o*Math.cos(a),c=r-o*Math.sin(a),l=n+o*Math.cos(a),g=r+o*Math.sin(a);e.setAttribute(`x1`,s.toString()),e.setAttribute(`y1`,c.toString()),e.setAttribute(`x2`,l.toString()),e.setAttribute(`y2`,g.toString())}},ge+a),N.to(e,{opacity:.9,duration:he*.3,ease:`power2.in`},ge+a)}),N.call(()=>{g&&g(N.progress(),`ringsHold`)},[],ve);let Ae=v?`parliament parliament-${v}`:`parliament`,je=b.append(`g`).attr(`class`,Ae);r.seats.forEach((e,t)=>{let r=n.find(t=>t.label===e.category);if(!r)return;let i=ae+e.x,a=W+e.y,o,s,c;e.ring===xe?(o=i,s=a,c=2):(o=i,s=a,c=e.radius);let l=O(r.color,e.radius),u=je.append(`circle`).attr(`cx`,o).attr(`cy`,s).attr(`r`,c).attr(`fill`,l.fill).attr(`stroke`,l.stroke).attr(`stroke-width`,l.strokeWidth??.5).attr(`opacity`,0).attr(`class`,()=>v?`seat seat-${v} seat-${Gm(e.category)}`:`seat seat-${Gm(e.category)}`).attr(`data-layout-index`,t).attr(`data-ring`,e.ring).attr(`data-final-x`,i).attr(`data-final-y`,a).attr(`data-final-r`,e.radius);l.dashArray&&u.attr(`stroke-dasharray`,l.dashArray)});let Me=v?`.seat-${v}`:`.seat`,Ne=je.selectAll(Me);N.to(Te,{opacity:0,duration:ye*.2,ease:`power3.out`},be),N.to(Ne.nodes(),{opacity:.8,duration:ye*.3,ease:`power2.in`},be+ye*.25);let Pe=Ne.nodes(),Fe=[],Ie=[];Pe.forEach(e=>{parseInt(e.getAttribute(`data-ring`)||`0`)===xe?Fe.push(e):Ie.push(e)});let Le=ye*.2,Re=ye*.7;Fe.forEach(e=>{let t=parseFloat(e.getAttribute(`data-final-r`)||`4`);N.to(e,{attr:{r:t},opacity:1,duration:Re*.6,ease:`power2.out`},be+Le)}),Ie.length>0&&N.to(Ie,{opacity:1,duration:Re*.5,ease:`power2.in`},be+Le+ye*.15);let ze=u;E.getControls().getTimeline().eventCallback(`onComplete`,()=>{let t=v?`.areas-${v}`:`.areas`,n=v?`.histogram-paths-${v}`:`.histogram-paths`;e.selectAll(t).remove(),e.selectAll(n).remove(),we(),e.selectAll(`.axis-x`).remove(),e.selectAll(`.axis-y`).remove(),b.selectAll(`.grid-vertical`).remove(),b.selectAll(`.grid-horizontal`).remove();let i=v?`.parliament-label-${v}`:`.parliament-label`;if(e.select(i).empty()){let t=s/2,n=r.radius+10,i=c-r.radius*.3,a=Math.max(n,i),o=v?`parliament-label parliament-label-${v}`:`parliament-label`,l=e.append(`g`).attr(`class`,o).attr(`transform`,`translate(${t},${a-r.radius*.15})`).style(`opacity`,`0`).style(`pointer-events`,`none`);l.append(`text`).attr(`class`,`label-category`).attr(`text-anchor`,`middle`).attr(`dy`,`-15`).style(`font-size`,`22px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-family`,`system-ui, -apple-system, sans-serif`),l.append(`text`).attr(`class`,`label-value`).attr(`text-anchor`,`middle`).attr(`dy`,`35`).style(`font-size`,`48px`).style(`font-weight`,`bold`).style(`font-family`,`system-ui, -apple-system, sans-serif`);let u=l.append(`g`).attr(`class`,`scale-indicator`).attr(`transform`,`translate(0, 65)`).style(`opacity`,`0`);u.append(`circle`).attr(`r`,4).attr(`cx`,-30).attr(`cy`,0).style(`fill`,`var(--rc-muted-text, #888)`),u.append(`text`).attr(`x`,-20).attr(`y`,0).attr(`dy`,`0.35em`).attr(`text-anchor`,`start`).style(`font-size`,`18px`).style(`fill`,`var(--rc-muted-text, #666)`).style(`font-style`,`italic`).style(`font-family`,`system-ui, -apple-system, sans-serif`)}ze()}),E.play()}function oh(e,t,n,r,i,a){let o=r/2,s=n.radius+10,c=i-n.radius*.3;Km(e,n,t,{centerX:o,centerY:Math.max(s,c),addClasses:!0,instanceId:a,parliamentRadius:n.radius})}function sh(e,t,n,r,i){let a=i?`.parliament-label-${i}`:`.parliament-label`,o=K(e).select(a);if(!o.empty())if(t){o.style(`opacity`,`1`),o.select(`.label-category`).text(t.label).style(`fill`,`var(--rc-muted-text, #666)`);let e=t.value>1?`repos`:`repo`;o.select(`.label-value`).text(`${t.value} ${e}`).style(`fill`,t.color);let i=o.select(`.scale-indicator`);n?i.style(`opacity`,`1`).select(`text`).text(`= ~${r} repos`):i.style(`opacity`,`0`)}else o.style(`opacity`,`0`)}function ch(e,t,n,r,i,a,o,s,c){let l=e.querySelectorAll(`.seat`);if(!l||l.length===0)return;let u=n[n.length-1];if(!u)return;let d=[];l.forEach(e=>{let t=e;t.style.cursor=`pointer`,t.style.transition=`fill-opacity 150ms ease, stroke-opacity 150ms ease`}),l.forEach(n=>{let r=(n.getAttribute(`class`)||``).split(/\s+/).filter(e=>e.startsWith(`seat-`)),l=r[r.length-1];if(!l)return;let f=l.substring(5),p=t.find(e=>Gm(e.label)===f);if(!p)return;let m=()=>{i(p.label);let t=Math.round(u.values[p.dataKey]||0),n=Hm(p.color),r={label:p.label,value:t,color:n};a&&a(r),sh(e,r,o??!1,s??1,c),lh(e,p.label)};n.addEventListener(`mouseenter`,m),d.push({element:n,handler:m})});let f=()=>{i(null),a&&a(null),sh(e,null,!1,1,c),lh(e,null)};return e.addEventListener(`mouseleave`,f),r&&lh(e,r),()=>{d.forEach(({element:e,handler:t})=>{e.removeEventListener(`mouseenter`,t)}),e.removeEventListener(`mouseleave`,f),l.forEach(e=>{let t=e;t.style.cursor=``,t.style.transition=``})}}function lh(e,t){let n=e.querySelectorAll(`.seat`),r=t?Gm(t):null;n.forEach(e=>{let t=e,n=(e.getAttribute(`class`)||``).split(/\s+/).filter(e=>e.startsWith(`seat-`)),i=n[n.length-1];if(!i)return;let a=i.substring(5);r?a===r?(t.setAttribute(`fill-opacity`,`1`),t.setAttribute(`stroke-opacity`,`1`)):(t.setAttribute(`fill-opacity`,`0.3`),t.setAttribute(`stroke-opacity`,`0.2`)):(t.setAttribute(`fill-opacity`,`1`),t.setAttribute(`stroke-opacity`,`1`))})}var uh=({data:e,categories:t,mode:n,width:r=900,height:i=400,margin:a={top:10,right:30,bottom:40,left:60},timeRange:o,showGrid:s=!0,showAxes:c=!0,axisLabelColor:l,axisLabelSize:p=14,formatDate:m,formatValue:h,markers:g=[],arcAngle:_=200,parliamentRadius:v=200,seatSize:y=4.5,animationDuration:x=900,onMorphComplete:S,onAnimationStateChange:C,onTimelineReady:w,onAnimationProgress:T,onHoveredDataChange:E,hoveredCategory:D,maxSeats:O=b.maxSeats,showTooltip:k=!0,showTable:A=!1,showScaledIndicator:j=!0,parliamentTimestamp:M,enableBrush:N=!1,onTimeRangeChange:P,minAllowedTime:F,maxAllowedTime:I,timelineEvents:L=[],showTimeline:R=!1,timelineHeight:z=40,timelineOffset:B,brushColor:V=`#69b3a2`,showCrosshair:H=!1,crosshairColor:ee=`#666`,crosshairDashArray:te=`4,4`})=>{let ne=(0,d.useRef)(null),[re,ie]=(0,d.useState)(null),ae=(0,d.useCallback)(e=>{E&&E(e)},[E]),oe=B??18+p+12,U=e[e.length-1],W=U?t.reduce((e,t)=>e+(U.values[t.dataKey]||0),0):0,se=W>O,ce=se?Math.round(W/O):1,le=R&&n===`stacked-area`?i+z+oe:i,{isMorphing:ue,currentMode:de,visibleMarkers:fe,hoveredMarker:pe,hoveredTimelineEvent:me}=Zm({containerRef:ne,data:e,categories:t,mode:n,width:r,height:i,margin:a,timeRange:o,showGrid:s,showAxes:c,axisLabelColor:l,axisLabelSize:p,formatDate:m,formatValue:h,markers:g,arcAngle:_,parliamentRadius:v,seatSize:y,animationDuration:x,onMorphComplete:S,onAnimationStateChange:C,onTimelineReady:w,onAnimationProgress:T,onHoveredDataChange:ae,hoveredCategory:D,maxSeats:O,parliamentTimestamp:M,enableBrush:N,onTimeRangeChange:P,minAllowedTime:F,maxAllowedTime:I,showScaleIndicator:j&&se,reposPerSeat:ce,timelineEvents:L,showTimeline:R,timelineHeight:z,timelineOffset:oe,brushColor:V,showCrosshair:H,onCrosshairMove:H?ie:void 0});return(0,f.jsxs)(u.Box,{sx:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:ne,viewBox:`0 0 ${r} ${le}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,height:`auto`,display:`block`}}),H&&re&&de===`area`&&!ue&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${r} ${le}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`auto`,pointerEvents:`none`},children:[(0,f.jsx)(`line`,{x1:re.x,y1:a.top,x2:re.x,y2:i-a.bottom,stroke:ee,strokeDasharray:te,strokeWidth:1}),(0,f.jsx)(`line`,{x1:a.left,y1:re.y,x2:r-a.right,y2:re.y,stroke:ee,strokeDasharray:te,strokeWidth:1})]}),de===`area`&&fe.map(e=>{let t=(e.x+a.left)/r*100,n=a.top/i*100,o=new Date(e.timestamp),s=m?m(e.timestamp):o.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0});return(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:e.label?.5:0},children:s}),e.label&&(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:e.label})]}),open:pe?.timestamp===e.timestamp,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${t}%`,top:`${n}%`,width:`1px`,height:`${(i-a.top-a.bottom)/i*100}%`,pointerEvents:`none`}})},e.timestamp)}),me&&de===`area`&&(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:.5},children:m?m(me.timestamp):new Date(me.timestamp).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}),(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:me.eventName})]}),open:!0,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${(me.x+a.left)/r*100}%`,top:`${(i+oe+z/2)/le*100}%`,width:`1px`,height:`1px`,pointerEvents:`none`}})}),ue&&(0,f.jsxs)(u.Box,{sx:{position:`absolute`,top:8,right:8,padding:`4px 8px`,backgroundColor:`rgba(0,0,0,0.7)`,color:`white`,borderRadius:`4px`,fontSize:`12px`,pointerEvents:`none`,display:`none`},children:[`Morphing: `,de,` → `,n]})]})},dh=[{minRepos:0,maxRepos:10,minArc:90,maxArc:90,minSeatSize:28,maxSeatSize:28},{minRepos:10,maxRepos:25,minArc:90,maxArc:110,minSeatSize:24,maxSeatSize:24},{minRepos:25,maxRepos:50,minArc:110,maxArc:120,minSeatSize:20,maxSeatSize:20},{minRepos:50,maxRepos:100,minArc:120,maxArc:150,minSeatSize:16.5,maxSeatSize:16.5},{minRepos:100,maxRepos:200,minArc:150,maxArc:180,minSeatSize:15,maxSeatSize:15},{minRepos:200,maxRepos:1/0,minArc:180,maxArc:180,minSeatSize:14.5,maxSeatSize:14.5}],fh=({repositoryCount:e})=>{let t=dh.find(t=>e>=t.minRepos&&e<t.maxRepos);if(!t)return 180;if(t.minArc===t.maxArc)return t.minArc;let n=t.maxRepos-t.minRepos,r=(e-t.minRepos)/n,i=t.maxArc-t.minArc,a=t.minArc+i*r;return Math.round(a)},ph=({repositoryCount:e})=>{let t=dh.find(t=>e>=t.minRepos&&e<t.maxRepos);if(!t)return 6.5;if(t.minSeatSize===t.maxSeatSize)return t.minSeatSize;let n=t.maxRepos-t.minRepos,r=(e-t.minRepos)/n,i=t.maxSeatSize-t.minSeatSize,a=t.minSeatSize+i*r;return Math.round(a*10)/10},mh=`ui-monospace, SFMono-Regular, Menlo, monospace`,hh=e=>{let{typography:t}=e;if(`fontFamilyMonospace`in t){let e=t.fontFamilyMonospace;if(typeof e==`string`)return e}return mh},gh=`category-table-num`,_h=({categories:e,activeCategory:t,onCategoryHover:n,mode:r,visible:i=!0})=>(0,f.jsx)(u.Box,{className:`category-table`,sx:{width:`100%`,display:`flex`,justifyContent:`center`,opacity:+!!i,transition:`opacity 0.3s ease-in-out`,"@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:`auto`,maxWidth:`100%`}},onMouseLeave:()=>n(null),children:(0,f.jsxs)(u.Table,{"aria-label":`Categories summary`,className:`category-summary-table`,size:`small`,sx:{maxWidth:{xs:`clamp(360px, 90%, 400px)`,sm:`clamp(360px, 90%, 400px)`,md:`clamp(360px, 85%, 420px)`,lg:`clamp(360px, 90%, 400px)`},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:`360px`},"& .MuiTableCell-root":{paddingTop:`4.5px`,paddingBottom:`4.5px`,paddingLeft:0,paddingRight:`4px`,lineHeight:`normal`,borderBottom:`1px solid`,borderColor:`grey.300`,fontSize:`clamp(10px, 1.8vw, 12px)`},"& thead .MuiTableCell-root":{paddingTop:`4px`,paddingBottom:`5px`,fontSize:`11px`,fontWeight:600,color:`text.secondary`},[`& .MuiTableCell-root.${gh}`]:{fontFamily:hh,fontSize:`11px`},"& tbody tr:last-of-type .MuiTableCell-root":{borderBottom:`none`}},children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(u.TableRow,{children:[(0,f.jsx)(u.TableCell,{colSpan:2,children:`Category`}),r===`point-in-time`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,children:`# of repositories`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Percentage`})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,children:`Last`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Max`}),(0,f.jsx)(u.TableCell,{align:`right`,children:`Min`})]})]})}),(0,f.jsx)(`tbody`,{children:e.map(e=>{let i=e.color,{fill:a,stroke:o,dashed:s}=O(e.color);return(0,f.jsxs)(u.TableRow,{onMouseEnter:()=>n(e.id),sx:{cursor:`pointer`,transition:`background-color 0.15s ease`,backgroundColor:t===e.id?`${i}15`:`transparent`,"&:hover":{backgroundColor:`${i}15`}},children:[(0,f.jsx)(u.TableCell,{align:`center`,sx:{width:20},children:(0,f.jsx)(u.Box,{sx:{width:r===`historical`?4:12,height:12,boxSizing:`border-box`,borderRadius:r===`historical`?1:`50%`,backgroundColor:r===`historical`?s?o:i:a,border:r===`historical`?`none`:`1.5px ${s?`dashed`:`solid`} ${o}`,transition:`transform 0.15s ease`,transform:t===e.id?`scale(1.2)`:`scale(1)`}})}),(0,f.jsx)(u.TableCell,{children:(0,f.jsxs)(u.Stack,{direction:`row`,alignItems:`center`,gap:.5,children:[(0,f.jsx)(`span`,{children:e.label}),e.tooltip&&(0,f.jsx)(u.Tooltip,{title:e.tooltip,placement:`right`,arrow:!0,children:(0,f.jsx)(p.InfoOutlined,{sx:{fontSize:`.875rem`,color:`text.secondary`}})})]})}),r===`point-in-time`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,className:gh,children:e.value}),(0,f.jsxs)(u.TableCell,{align:`right`,className:gh,children:[e.percentage>0&&e.percentage<1?`< 1`:Math.round(e.percentage),`%`]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.TableCell,{align:`right`,className:gh,children:e.value}),(0,f.jsx)(u.TableCell,{align:`right`,className:gh,children:e.max??`-`}),(0,f.jsx)(u.TableCell,{align:`right`,className:gh,children:e.min??`-`})]})]},e.id)})})]})}),vh={"N/A":`Items that aren't applicable to this migration.`,"No LST":`There are no LSTs for these items.`,"Data Missing":`There is data missing in the LSTs.`},yh=(e,t=`point-in-time`)=>{let n=e.timeSeries[e.timeSeries.length-1];if(!n)return[];let r=e.categories.filter(e=>!e.parliamentMapping?.isSpecialCategory),i=r.reduce((e,t)=>e+(n.values[t.id]??0),0),a=e.metadata.specialCounts,o=i+(a?(a.notApplicable??0)+(a.noLst??0)+(a.unavailable??0):0),s=t===`historical`?new Map(r.map(t=>{let n=e.timeSeries.map(e=>Math.round(e.values[t.id]??0)).filter(e=>e!==void 0);return[t.id,{max:Math.max(...n),min:Math.min(...n)}]})):null,c=r.map(e=>{let t=Math.round(n.values[e.id]??0),r=o>0?t/o*100:0,i={id:e.id,label:e.label,value:t,percentage:r,color:e.color,tooltip:vh[e.label]};if(s){let t=s.get(e.id);t&&(i.max=t.max,i.min=t.min)}return i}),l=[];if(a){let t=e.categories.filter(e=>e.parliamentMapping?.isSpecialCategory);for(let e of t){let t=0;if(e.label===`N/A`?t=Math.round(a.notApplicable??0):e.label===`No LST`?t=Math.round(a.noLst??0):e.label===`Data Missing`&&(t=Math.round(a.unavailable??0)),t>0){let n=o>0?t/o*100:0;l.push({id:e.id,label:e.label,value:t,percentage:n,color:e.color,tooltip:vh[e.label]})}}}return[...c,...l]},bh=e=>{if(!e.timeSeries[e.timeSeries.length-1])throw Error(`ChronoChart: No data points available`);return{data:e.timeSeries.map(e=>({timestamp:e.timestamp,values:e.values})),categories:e.categories.map(e=>({dataKey:e.id,label:e.label,color:e.color,fillOpacity:.7,strokeWidth:e.parliamentMapping?.isSpecialCategory?3:1.5,strokeDasharray:e.strokeDasharray,parliamentMapping:e.parliamentMapping}))}},xh=e=>{if(!e.timeSeries||e.timeSeries.length===0)throw Error(`ChronoChart: timeSeries must not be empty`);if(!e.categories||e.categories.length===0)throw Error(`ChronoChart: categories must not be empty`);if(!e.metadata||typeof e.metadata.total!=`number`)throw Error(`ChronoChart: metadata.total is required`);if(!e.timeSeries.every((t,n)=>n===0||t.timestamp>=e.timeSeries[n-1].timestamp))throw Error(`ChronoChart: timeSeries must be sorted by timestamp (ascending)`);let t=e.timeSeries[0];if(t){for(let n of e.categories.filter(e=>!e.parliamentMapping?.isSpecialCategory))if(!(n.id in t.values))throw Error(`ChronoChart: Category "${n.id}" not found in timeSeries data`)}},Sh=({data:e,selectedIndex:t,title:n,subtitle:r,showHeader:i=!0,width:a=960,height:o=400,timeRange:s,onTimeRangeChange:c,minAllowedTime:l,maxAllowedTime:p,enableBrush:m=!1,showLegend:h=!0,showTooltip:g=!0,showGrid:_=!0,axisLabelColor:v,axisLabelSize:y=14,enableAnimation:b=!0,animationDuration:x=5439,disableTimeline:S=!1,formatDate:C,formatValue:w,onAnimationStateChange:T,onTimelineReady:E,onAnimationProgress:D,brushColor:O=`#69b3a2`,showCrosshair:k=!0,crosshairColor:A=`#666`,crosshairDashArray:j=`4,4`})=>{xh(e);let[M,N]=(0,d.useState)(null),[P,F]=(0,d.useState)(!0),I=(0,d.useRef)(`historical`),L=(0,d.useRef)(void 0),R=(0,d.useMemo)(()=>e.timeSeries.length===1||t!==void 0?`point-in-time`:`historical`,[t,e.timeSeries.length]),z=(0,d.useMemo)(()=>{let n;return t!==void 0&&e.timeSeries[t]?(n=e.timeSeries[t].timestamp,L.current=n):n=I.current===`point-in-time`&&R===`historical`&&L.current!==void 0?L.current:e.timeSeries[e.timeSeries.length-1]?.timestamp,I.current=R,n},[t,e.timeSeries,R]),B=e.timeSeries[0].timestamp,V=e.timeSeries[e.timeSeries.length-1].timestamp,[H,ee]=(0,d.useState)([B,V]),te=s??H,ne=(0,d.useCallback)(e=>{let t=[l===void 0?e[0]:Math.max(e[0],l),p===void 0?e[1]:Math.min(e[1],p)];c?c(t):ee(t)},[c,l,p]);(0,d.useEffect)(()=>{N(null)},[R]);let re=(0,d.useMemo)(()=>({top:10,right:30,left:60,bottom:30}),[]),ie=(0,d.useMemo)(()=>bh(e),[e]),ae=(0,d.useMemo)(()=>yh(e,R),[e,R]),oe=(0,d.useMemo)(()=>{let t=e.timeSeries[e.timeSeries.length-1];return t?Object.values(t.values).reduce((e,t)=>e+t,0):0},[e.timeSeries]),U=(0,d.useMemo)(()=>fh({repositoryCount:oe}),[oe]),W=(0,d.useMemo)(()=>ph({repositoryCount:oe}),[oe]),se=(0,d.useMemo)(()=>{let e=o-re.top-re.bottom;return Math.round(e*.9)},[o,re]),ce=(0,d.useMemo)(()=>e.events?e.events.map(e=>({timestamp:e.timestamp,label:e.eventName,color:typeof e.color==`string`?e.color:`#2F42FF`})):[],[e.events]),le=(0,d.useCallback)(t=>{if(t){let n=e.categories.find(e=>e.label===t.label);N(n?.id??null)}else N(null)},[e.categories]),ue=(0,d.useCallback)(e=>{F(!e),T&&T(e)},[T]);return(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsx)(u.Box,{sx:{position:`relative`,width:`100%`},children:(0,f.jsx)(uh,{data:ie.data,categories:ie.categories,mode:R===`point-in-time`?`parliament`:`stacked-area`,width:a,height:o,timeRange:te,onTimeRangeChange:ne,minAllowedTime:l,maxAllowedTime:p,enableBrush:m,showGrid:_,showAxes:!0,axisLabelColor:v,axisLabelSize:y,margin:re,markers:ce,formatDate:C,formatValue:w,animationDuration:x,onAnimationStateChange:ue,onTimelineReady:E,onAnimationProgress:D,onHoveredDataChange:le,hoveredCategory:M,arcAngle:U,parliamentRadius:se,seatSize:W,parliamentTimestamp:z,timelineEvents:e.events??[],showTimeline:R===`historical`&&!S,brushColor:O,showCrosshair:k,crosshairColor:A,crosshairDashArray:j})}),(0,f.jsx)(_h,{categories:ae,activeCategory:M,onCategoryHover:N,mode:R,visible:P})]})},Ch=20,wh=({visible:e,x:t,y:n,containerRef:r,viewBoxWidth:i,viewBoxHeight:a,usePortal:o=!1,scale:s=1,flipThreshold:c,anchorPosition:l=`cursor`,chartTopMargin:p=20,children:m})=>{let h=(0,d.useRef)(null),[g,_]=(0,d.useState)(0),[v,y]=(0,d.useState)(null),b=(0,d.useCallback)(()=>{if(r.current){let e=r.current.getBoundingClientRect();y({width:e.width,height:e.height,left:e.left,top:e.top})}},[r]);if((0,d.useLayoutEffect)(()=>{b();let e=()=>b();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[b]),(0,d.useLayoutEffect)(()=>{e&&b()},[e,b]),(0,d.useLayoutEffect)(()=>{h.current&&e&&_(h.current.offsetWidth)},[e]),!e||!v)return null;let x=v.width/i,S=v.height/a,C=t*x,w=n*S,T={pointerEvents:`none`,zIndex:1e3,p:2*s,whiteSpace:`nowrap`};if(o){let e=v.left+C,t=v.top+w;if(l===`top`){let t=v.top+p*S,n=(g>0?g:400)/2,r=e+n>window.innerWidth-Ch,i=e-n<Ch,a=`translateX(-50%)`;return r&&!i?a=`translateX(-50%) translateX(-${e+n-window.innerWidth+Ch}px)`:i&&!r&&(a=`translateX(-50%) translateX(${Ch-(e-n)}px)`),(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:e,top:t,transform:`${a} translateY(-100%) translateY(-10px)`},children:m})})}if(l===`bottom-corner`){let n=g>0?g:400,r=e+10+n,i=e-10-n,a=r>window.innerWidth-Ch,o=i<Ch,s,c;return a?o?(s=window.innerWidth-Ch-n,c=`none`):(s=e-10,c=`translateX(-100%)`):(s=e+10,c=`none`),(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:s,top:t+10,transform:c},children:m})})}let n=g>0?g:450,r=e+10+n>window.innerWidth-Ch,i=e>window.innerWidth-500,a=c===void 0?void 0:c*x,o=r||i||a!==void 0&&C>a?`translateX(-100%) translateX(-20px)`:`none`;return(0,f.jsx)(u.Portal,{children:(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`fixed`,left:e+10,top:t-10,transform:o},children:m})})}if(l===`top`){let e=p*S;return(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:C,top:e,transform:`translateX(-50%) translateY(-100%) translateY(-10px)`},children:m})}if(l===`bottom-corner`){let e=g>0?g:400,t=C+10+e,n=C-10-e,r=t>v.width,i=n<0,a,o;return r?i?(a=v.width-e,o=`none`):(a=C-10,o=`translateX(-100%)`):(a=C+10,o=`none`),(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:a,top:w+10,transform:o},children:m})}let E=c===void 0?void 0:c*x,D=E!==void 0&&C>E?`translateX(-100%) translateX(-20px)`:`none`;return(0,f.jsx)(u.Paper,{ref:h,elevation:3,sx:{...T,position:`absolute`,left:C+10,top:w-10,transform:D},children:m})},Th=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:o,showGrid:s=!0,showXAxis:c=!0,showYAxis:l=!0,enableBrush:u=!1,zoomToSelection:f=!1,onTimeRangeChange:p,formatDate:m,formatValue:h,markers:g=[],markerVisibilityMode:_=`hover`,onMarkerHoverChange:v,brushColor:y=`#69b3a2`,showCrosshair:b=!1,onHoveredAreaChange:x,onCrosshairMove:S})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=K(e.current),C=r-a.left-a.right,w=i-a.top-a.bottom;d.selectAll(`*`).remove();let T=d.append(`g`).attr(`transform`,`translate(${a.left},${a.top})`),E=`d3-chart-clip-${Math.random().toString(36).substr(2,9)}`;d.append(`defs`).append(`clipPath`).attr(`id`,E).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,C).attr(`height`,w);let D=T.append(`g`).attr(`clip-path`,`url(#${E})`),O=[...t].sort((e,t)=>e.timestamp-t.timestamp),k=n.map(e=>e.dataKey),A=Cl().keys(k),j=A(O),M=t.map(e=>e.timestamp),N=o?o[0]:Math.min(...M),P=o?o[1]:Math.max(...M),F=tl().domain([new Date(N),new Date(P)]).range([0,C]),I=A(O.filter(e=>e.timestamp>=N&&e.timestamp<=P)),L=I.length>0?Math.max(...I[I.length-1].map(e=>e[1]??0)):0,R=Lo().domain([0,L*1.1]).range([w,0]).nice();s&&(D.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(te(F).ticks(6).tickSize(w).tickFormat(()=>``)),D.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(ne(R).ticks(5).tickSize(-C).tickFormat(()=>``)));let z=vl().x(e=>F(new Date(e.data.timestamp))).y0(e=>R(e[0])).y1(e=>R(e[1])).curve(ml),B=D.append(`g`).attr(`class`,`areas`);if(j.forEach((e,t)=>{let r=n[t];if(!r)return;let i=B.append(`path`).datum(e).attr(`class`,`area area-${r.dataKey}`).attr(`fill`,r.color).attr(`fill-opacity`,r.fillOpacity??.7).attr(`stroke`,r.color).attr(`stroke-width`,r.strokeWidth??1.5).attr(`d`,z).attr(`pointer-events`,`none`);r.strokeDasharray&&i.attr(`stroke-dasharray`,r.strokeDasharray)}),g.length>0){let e=D.append(`g`).attr(`class`,`markers`),t=_===`hover`?0:.6,n=g.filter(e=>e.timestamp>=N&&e.timestamp<=P).map(e=>({...e,x:F(new Date(e.timestamp))}));if(n.forEach(n=>{let r=e.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,n.timestamp).attr(`x1`,n.x).attr(`x2`,n.x).attr(`y1`,0).attr(`y2`,w).attr(`stroke`,n.color??`#131E7A`).attr(`stroke-width`,2).attr(`opacity`,t);n.strokeDasharray&&r.attr(`stroke-dasharray`,n.strokeDasharray),n.label&&e.append(`text`).attr(`class`,`marker-label`).attr(`data-timestamp`,n.timestamp).attr(`x`,n.x).attr(`y`,-5).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,n.color??`#131E7A`).attr(`opacity`,t).text(n.label)}),_===`hover`&&n.length>0){let t=d.append(`g`).attr(`class`,`marker-tooltip`).attr(`transform`,`translate(${a.left},${a.top})`).style(`pointer-events`,`none`).style(`display`,`none`),r=t.append(`rect`).attr(`fill`,`#131E7A`).attr(`rx`,4).attr(`ry`,4).attr(`filter`,`drop-shadow(0px 2px 4px rgba(0,0,0,0.2))`),i=t.append(`text`).attr(`fill`,`white`).attr(`font-size`,12).attr(`font-weight`,500).attr(`text-anchor`,`middle`),o=null,s=D.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,C).attr(`height`,w).attr(`fill`,`none`).attr(`pointer-events`,`all`),c=s=>{let c=null,l=1/0;if(n.forEach(e=>{let t=Math.abs(s-e.x);t<l&&(l=t,c=e)}),!c||l>50)return o!==null&&(o=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),t.style(`display`,`none`),v?.(!1)),!1;let u=c;if(o===null&&v?.(!0),o===u.timestamp)return!0;o=u.timestamp,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),e.selectAll(`.marker-line`).filter(function(){return K(this).attr(`data-timestamp`)===String(u.timestamp)}).attr(`opacity`,.6),e.selectAll(`.marker-label`).filter(function(){return K(this).attr(`data-timestamp`)===String(u.timestamp)}).attr(`opacity`,1);let d=new Date(u.timestamp),f=m?m(u.timestamp):d.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}),p=u.label?`${u.label}: ${f}`:f;i.text(p);let h=i.node().getBBox(),g=h.width+16,_=h.height+16;r.attr(`width`,g).attr(`height`,_);let y=u.x-g/2;return y<0?y=0:y+g>C&&(y=C-g),t.attr(`transform`,`translate(${a.left+y},${a.top+10})`),i.attr(`x`,g/2).attr(`y`,_/2+4),t.style(`display`,`block`),!0};s.on(`mousemove`,function(e){let[t]=on(e,this);c(t)&&e.stopPropagation()}),s.on(`mouseleave`,function(){o=null,e.selectAll(`.marker-line`).attr(`opacity`,0),e.selectAll(`.marker-label`).attr(`opacity`,0),t.style(`display`,`none`),v?.(!1)})}}if(c){let e=te(F).ticks(6);m&&e.tickFormat(e=>m(+e)),T.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${w})`).call(e).selectAll(`text`).attr(`font-size`,11)}if(l){let e=ne(R).ticks(5);h&&e.tickFormat(e=>h(+e)),T.append(`g`).attr(`class`,`axis axis-y`).call(e).selectAll(`text`).attr(`font-size`,11)}let V=(e,t)=>{let r=+F.invert(e),i=-1;for(let e=0;e<O.length-1;e++)if(O[e].timestamp<=r&&O[e+1].timestamp>=r){i=e;break}i===-1&&(i=r<=O[0].timestamp?0:O.length-2);let a=O[i],o=O[i+1];if(!a||!o)return null;let s=o.timestamp-a.timestamp,c=s>0?(r-a.timestamp)/s:0;for(let e=j.length-1;e>=0;e--){let a=j[e],o=n[e];if(!a||!o)continue;let s=a[i],l=a[i+1];if(!s||!l)continue;let u=s[0]+c*(l[0]-s[0]),d=s[1]+c*(l[1]-s[1]),f=R(u);if(t>=R(d)&&t<=f){let e=d-u;return{timestamp:r,category:{label:o.label,color:o.color},value:e}}}return null},H=(e,t)=>{let[n,r]=on(e,t);b&&S?.({x:n+a.left,y:r+a.top});let i=V(n,r);x?.(i)},ee=()=>{S?.(null),x?.(null)};if(!u){let e=D.append(`rect`).attr(`class`,`mouse-overlay`).attr(`width`,C).attr(`height`,w).attr(`fill`,`none`).attr(`pointer-events`,`all`);e.on(`mousemove`,function(e){H(e,this)}),e.on(`mouseleave`,ee)}if(u&&p){let e=Ia().extent([[0,0],[C,w]]).on(`brush`,()=>{}).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection;p([+F.invert(n),+F.invert(r)]),f&&d.select(`.brush`).call(e.move,null)}),t=d.append(`g`).attr(`class`,`brush`).attr(`transform`,`translate(${a.left},${a.top})`).call(e);t.select(`.selection`).style(`fill`,y).style(`fill-opacity`,`0.4`).style(`stroke`,y).style(`stroke-width`,`2px`),t.selectAll(`.handle`).style(`fill`,y).style(`fill-opacity`,`0.9`),t.select(`.overlay`).style(`cursor`,`default`),t.select(`.overlay`).on(`mousemove`,function(e){H(e,this)}).on(`mouseleave`,ee)}return d.on(`mouseleave`,()=>{S?.(null),x?.(null)}),()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S])},Eh=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:o=!0,width:s=800,height:c=400,margin:l={top:20,right:30,bottom:40,left:60},timeRange:p,showGrid:m=!0,showAxes:h=!0,showXAxis:g,showYAxis:_,formatDate:v,formatValue:y,onTimeRangeChange:b,enableBrush:x=!1,zoomToSelection:S=!1,markers:C=[],markerVisibilityMode:w=`hover`,brushColor:T=`#69b3a2`,showCrosshair:E=!1,crosshairColor:D=`#666`,crosshairDashArray:O=`4,4`,tooltipScale:k=1,usePortalTooltip:A=!1})=>{let j=(0,d.useRef)(null),M=(0,d.useRef)(null),[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(null),[L,R]=(0,d.useState)(!1),z=(0,d.useCallback)(e=>{L||P(e)},[L]),B=(0,d.useCallback)(e=>{L||I(e)},[L]),V=(0,d.useCallback)(e=>{R(e),e&&(P(null),I(null))},[]);return Th({containerRef:j,data:e,categories:t,width:s,height:c,margin:l,timeRange:p,showGrid:m,showXAxis:g===void 0?h:g,showYAxis:_===void 0?h:_,enableBrush:x,zoomToSelection:S,onTimeRangeChange:b,formatDate:v,formatValue:y,markers:C,markerVisibilityMode:w,onMarkerHoverChange:V,brushColor:T,showCrosshair:E,onHoveredAreaChange:z,onCrosshairMove:B}),(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsxs)(u.Box,{ref:M,sx:{width:`100%`,display:`flex`,justifyContent:`center`,alignItems:`flex-start`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:j,viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,display:`block`}}),E&&F&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,right:0,width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,pointerEvents:`none`,margin:`0 auto`},children:[(0,f.jsx)(`line`,{x1:F.x,y1:l.top,x2:F.x,y2:c-l.bottom,stroke:D,strokeDasharray:O,strokeWidth:1}),(0,f.jsx)(`line`,{x1:l.left,y1:F.y,x2:s-l.right,y2:F.y,stroke:D,strokeDasharray:O,strokeWidth:1})]}),o&&N&&F&&(0,f.jsxs)(wh,{visible:!0,x:F.x,y:F.y,containerRef:M,viewBoxWidth:s,viewBoxHeight:c,usePortal:A,scale:k,flipThreshold:s/2,children:[(0,f.jsx)(u.Typography,{sx:{fontFamily:`monospace`,fontSize:`${.875*k}rem`,color:`text.secondary`,mb:1.5*k},children:(e=>v?v(e):new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}))(N.timestamp)}),(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1.5*k,children:[(0,f.jsx)(u.Box,{sx:{width:5*k,backgroundColor:N.category.color,borderRadius:1,flexShrink:0}}),(0,f.jsxs)(u.Stack,{children:[(0,f.jsx)(u.Typography,{sx:{fontWeight:700,fontSize:`${1.125*k}rem`,lineHeight:1.3},children:N.category.label}),(0,f.jsx)(u.Typography,{sx:{fontSize:`${1*k}rem`,color:`text.primary`,textDecoration:`underline`,textDecorationColor:`rgba(0,0,0,0.2)`,textUnderlineOffset:`3px`},children:y?y(N.value):N.value.toLocaleString()})]})]})]})]}),a&&(0,f.jsx)(u.Stack,{direction:`row`,spacing:3,sx:{flexWrap:`wrap`,justifyContent:`center`,gap:2},children:t.map(e=>(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1,alignItems:`center`,sx:{cursor:`pointer`,"&:hover":{opacity:.7}},children:[(0,f.jsx)(u.Box,{sx:{width:16,height:16,backgroundColor:e.color,opacity:e.fillOpacity??.7,border:`2px solid ${e.color}`,borderRadius:`2px`,...e.strokeDasharray&&{backgroundImage:`repeating-linear-gradient(
|
|
34
2
|
45deg,
|
|
35
3
|
transparent,
|
|
36
4
|
transparent 4px,
|
|
37
|
-
${
|
|
38
|
-
${
|
|
39
|
-
)`}}}),E.jsx(q.Typography,{variant:"body2",children:j.label})]},j.dataKey))})]})},AT=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:s,showGrid:o=!0,showXAxis:l=!0,showYAxis:u=!0,enableBrush:c=!1,zoomToSelection:f=!1,onTimeRangeChange:h,formatDate:p,formatValue:g,showCrosshair:d=!0,brushColor:m="#69b3a2",onTooltipChange:x,minBarWidth:y,onCrosshairPositionChange:v})=>{G.useEffect(()=>{if(!e.current||t.length===0||n.length===0)return;const _=Ot(e.current),S=r-a.left-a.right,w=i-a.top-a.bottom;_.selectAll("*").remove();const b=_.append("g").attr("transform",`translate(${a.left},${a.top})`),M=`d3-bar-clip-${Math.random().toString(36).substr(2,9)}`;_.append("defs").append("clipPath").attr("id",M).append("rect").attr("x",0).attr("y",0).attr("width",S).attr("height",w);const A=b.append("g").attr("clip-path",`url(#${M})`),k=[...t].sort((D,T)=>D.timestamp-T.timestamp),C=n.map(D=>D.dataKey),O=Yi().keys(C),P=O(k),F=t.map(D=>D.timestamp),B=s?s[0]:Math.min(...F),L=s?s[1]:Math.max(...F),$=Wr().domain([new Date(B),new Date(L)]).range([0,S]),Y=k.filter(D=>D.timestamp>=B&&D.timestamp<=L),I=O(Y),et=I.length>0?Math.max(...I[I.length-1].map(D=>D[1]??0)):0,K=ri().domain([0,et*1.1]).range([w,0]).nice();o&&(A.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(qn($).ticks(6).tickSize(w).tickFormat(()=>"")),A.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(In(K).ticks(5).tickSize(-S).tickFormat(()=>"")));const J=A.append("g").attr("class","bars"),st=[];P.forEach((D,T)=>{const X=n[T];X&&D.forEach((Q,W)=>{const ut=k[W];if(!ut)return;const H=ut.timestamp,ot=k[W+1],gt=ot?ot.timestamp:L;if(gt<B||H>L)return;const yt=Math.max(H,B),vt=Math.min(gt,L),rt=$(new Date(yt)),at=$(new Date(vt))-rt;if(at<=0)return;const _t=K(Q[0]),dt=K(Q[1]),xt=_t-dt;if(xt<=0)return;const Et=Q[1]-Q[0];st.push({barIndex:W,categoryIndex:T,category:X,x:rt,width:at,y:dt,height:xt,value:Et,startTime:H,endTime:gt})})});const lt=1,N=2160*60*60*1e3,nt=L-B>N?2:0,Z=y!==void 0?y:nt;J.selectAll(".bar-segment").data(st).enter().append("rect").attr("class","bar-segment").attr("data-bar-index",D=>D.barIndex).attr("data-category-index",D=>D.categoryIndex).attr("x",D=>D.x).attr("y",D=>D.y).attr("width",D=>Math.max(Z,D.width-lt)).attr("height",D=>D.height).attr("fill",D=>D.category.color).attr("fill-opacity",D=>D.category.fillOpacity??.8).attr("pointer-events","none");const R=(D,T)=>{const[X,Q]=er(D,T);d&&v&&v({x:X+a.left,y:Q+a.top});const W=st.find(ut=>X>=ut.x&&X<=ut.x+ut.width&&Q>=ut.y&&Q<=ut.y+ut.height);W&&x?x({visible:!0,x:X+a.left,y:Q+a.top,category:{label:W.category.label,color:W.category.color},value:W.value,startTime:W.startTime,endTime:W.endTime}):x&&x(null)},z=()=>{v&&v(null),x&&x(null)};if(c&&h){const D=pi().extent([[0,0],[S,w]]).on("brush",()=>{}).on("end",X=>{if(!X.selection)return;const[Q,W]=X.selection,ut=[+$.invert(Q),+$.invert(W)];h(ut),f&&_.select(".brush").call(D.move,null)}),T=b.append("g").attr("class","brush").call(D);T.selectAll(".selection").attr("fill",m).attr("fill-opacity",.3).attr("stroke",m).attr("stroke-width",2),T.selectAll(".handle").attr("fill",m).attr("fill-opacity",.8),T.select(".overlay").style("cursor","default"),T.select(".overlay").on("mousemove",function(X){R(X,this)}).on("mouseleave",z)}else{const D=A.append("rect").attr("class","mouse-overlay").attr("width",S).attr("height",w).attr("fill","none").attr("pointer-events","all");D.on("mousemove",function(T){R(T,this)}),D.on("mouseleave",z)}if(_.on("mouseleave",()=>{v&&v(null),x&&x(null)}),l){const D=qn($).ticks(6);p&&D.tickFormat(T=>p(+T)),b.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${w})`).call(D).selectAll("text").attr("font-size",11)}if(u){const D=In(K).ticks(5);g&&D.tickFormat(T=>g(+T)),b.append("g").attr("class","axis axis-y").call(D).selectAll("text").attr("font-size",11)}return()=>{_.selectAll("*").remove()}},[e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m,x,y,v])},kT=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:s=!0,width:o=800,height:l=400,margin:u={top:20,right:30,bottom:40,left:60},timeRange:c,showGrid:f=!0,showAxes:h=!0,showXAxis:p,showYAxis:g,formatDate:d,formatValue:m,onTimeRangeChange:x,enableBrush:y=!1,zoomToSelection:v=!1,brushColor:_="#69b3a2",showCrosshair:S=!0,crosshairColor:w="#666",crosshairDashArray:b="4,4",minBarWidth:M,tooltipScale:A=1,usePortalTooltip:k=!1,tooltipAnchor:C="cursor"})=>{const O=G.useRef(null),P=G.useRef(null),[F,B]=G.useState(null),[L,$]=G.useState(null);AT({containerRef:O,data:e,categories:t,width:o,height:l,margin:u,timeRange:c,showGrid:f,showXAxis:p!==void 0?p:h,showYAxis:g!==void 0?g:h,enableBrush:y,zoomToSelection:v,onTimeRangeChange:x,formatDate:d,formatValue:m,showCrosshair:S,brushColor:_,onTooltipChange:s?B:void 0,minBarWidth:M,onCrosshairPositionChange:S?$:void 0});const et=K=>{if(d)return d(K);const J=new Date(K),st=J.getFullYear(),lt=String(J.getMonth()+1).padStart(2,"0"),N=String(J.getDate()).padStart(2,"0");return`${st}-${lt}-${N}`};return E.jsxs(q.Stack,{sx:{width:"100%",alignItems:"center",gap:2},children:[i&&(n||r)&&E.jsxs(q.Stack,{spacing:.5,sx:{mb:2,width:"100%",alignItems:"center"},children:[n&&E.jsx(q.Typography,{variant:"h5",sx:{fontWeight:500},children:n}),r&&E.jsx(q.Typography,{variant:"body2",sx:{color:"text.secondary"},children:r})]}),E.jsxs(q.Box,{ref:P,sx:{width:"100%",display:"flex",justifyContent:"center",alignItems:"flex-start",position:"relative"},children:[E.jsx("svg",{ref:O,viewBox:`0 0 ${o} ${l}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",maxWidth:"1200px",minWidth:"400px",height:"auto",display:"block"}}),S&&L&&E.jsxs("svg",{viewBox:`0 0 ${o} ${l}`,preserveAspectRatio:"xMidYMid meet",style:{position:"absolute",top:0,left:0,right:0,width:"100%",maxWidth:"1200px",minWidth:"400px",height:"auto",pointerEvents:"none",margin:"0 auto"},children:[E.jsx("line",{x1:L.x,y1:u.top,x2:L.x,y2:l-u.bottom,stroke:w,strokeDasharray:b,strokeWidth:1}),E.jsx("line",{x1:u.left,y1:L.y,x2:o-u.right,y2:L.y,stroke:w,strokeDasharray:b,strokeWidth:1})]}),s&&F&&E.jsxs(oy,{visible:F.visible,x:F.x,y:F.y,containerRef:P,viewBoxWidth:o,viewBoxHeight:l,usePortal:k,scale:A,flipThreshold:o/2,anchorPosition:C,chartTopMargin:u.top,children:[E.jsx(q.Typography,{sx:{fontFamily:"monospace",fontSize:`${.875*A}rem`,color:"text.secondary",mb:1.5*A},children:et(F.startTime)}),E.jsxs(q.Stack,{direction:"row",spacing:1.5*A,children:[E.jsx(q.Box,{sx:{width:5*A,backgroundColor:F.category.color,borderRadius:1,flexShrink:0}}),E.jsxs(q.Stack,{children:[E.jsx(q.Typography,{sx:{fontWeight:700,fontSize:`${1.125*A}rem`,lineHeight:1.3},children:F.category.label}),E.jsx(q.Typography,{sx:{fontSize:`${1*A}rem`,color:"text.primary",textDecoration:"underline",textDecorationColor:"rgba(0,0,0,0.2)",textUnderlineOffset:"3px"},children:m?m(F.value):F.value.toLocaleString()})]})]})]})]}),a&&E.jsx(q.Stack,{direction:"row",spacing:3,sx:{flexWrap:"wrap",justifyContent:"center",gap:2},children:t.map(K=>E.jsxs(q.Stack,{direction:"row",spacing:1,alignItems:"center",sx:{cursor:"pointer","&:hover":{opacity:.7}},children:[E.jsx(q.Box,{sx:{width:16,height:16,backgroundColor:K.color,opacity:K.fillOpacity??.8,border:`1px solid ${K.color}`,borderRadius:"2px"}}),E.jsx(q.Typography,{variant:"body2",children:K.label})]},K.dataKey))})]})},CT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Yh={}.hasOwnProperty;function RT(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Yh.call(i,e)){const l=String(i[e]);s=Yh.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const ET=/["&'<>`]/g,DT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,OT=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,PT=/[|\\{}()[\]^$+*?.]/g,Wh=new WeakMap;function FT(e,t){if(e=e.replace(t.subset?$T(t.subset):ET,r),t.subset||t.escapeOnly)return e;return e.replace(DT,n).replace(OT,r);function n(i,a,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(a+2),t)}function r(i,a,s){return t.format(i.charCodeAt(0),s.charCodeAt(a+1),t)}}function $T(e){let t=Wh.get(e);return t||(t=LT(e),Wh.set(e,t)),t}function LT(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(PT,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const NT=/[\dA-Fa-f]/;function qT(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!NT.test(String.fromCharCode(t))?r:r+";"}const IT=/\d/;function zT(e,t,n){const r="&#"+String(e);return n&&t&&!IT.test(String.fromCharCode(t))?r:r+";"}const BT=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Xs={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},UT=["cent","copy","divide","gt","lt","not","para","times"],ly={}.hasOwnProperty,Cc={};let ba;for(ba in Xs)ly.call(Xs,ba)&&(Cc[Xs[ba]]=ba);const HT=/[^\dA-Za-z]/;function jT(e,t,n,r){const i=String.fromCharCode(e);if(ly.call(Cc,i)){const a=Cc[i],s="&"+a;return n&&BT.includes(a)&&!UT.includes(a)&&(!r||t&&t!==61&&HT.test(String.fromCharCode(t)))?s:s+";"}return""}function GT(e,t,n){let r=qT(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=jT(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const a=zT(e,t,n.omitOptionalSemicolons);a.length<r.length&&(r=a)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Qr(e,t){return FT(e,Object.assign({format:GT},t))}const YT=/^>|^->|<!--|-->|--!>|<!-$/g,WT=[">"],XT=["<",">"];function KT(e,t,n,r){return r.settings.bogusComments?"<?"+Qr(e.value,Object.assign({},r.settings.characterReferences,{subset:WT}))+">":"<!--"+e.value.replace(YT,i)+"-->";function i(a){return Qr(a,Object.assign({},r.settings.characterReferences,{subset:XT}))}}function VT(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Xh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const ZT=/[ \t\n\f\r]/g;function _f(e){return typeof e=="object"?e.type==="text"?Kh(e.value):!1:Kh(e)}function Kh(e){return e.replace(ZT,"")===""}const he=cy(1),uy=cy(-1),QT=[];function cy(e){return t;function t(n,r,i){const a=n?n.children:QT;let s=(r||0)+e,o=a[s];if(!i)for(;o&&_f(o);)s+=e,o=a[s];return o}}const JT={}.hasOwnProperty;function fy(e){return t;function t(n,r,i){return JT.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const xf=fy({body:eM,caption:Ks,colgroup:Ks,dd:aM,dt:iM,head:Ks,html:tM,li:rM,optgroup:sM,option:oM,p:nM,rp:Vh,rt:Vh,tbody:uM,td:Zh,tfoot:cM,th:Zh,thead:lM,tr:fM});function Ks(e,t,n){const r=he(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&_f(r.value.charAt(0)))}function tM(e,t,n){const r=he(n,t);return!r||r.type!=="comment"}function eM(e,t,n){const r=he(n,t);return!r||r.type!=="comment"}function nM(e,t,n){const r=he(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function rM(e,t,n){const r=he(n,t);return!r||r.type==="element"&&r.tagName==="li"}function iM(e,t,n){const r=he(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function aM(e,t,n){const r=he(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Vh(e,t,n){const r=he(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function sM(e,t,n){const r=he(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function oM(e,t,n){const r=he(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function lM(e,t,n){const r=he(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function uM(e,t,n){const r=he(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function cM(e,t,n){return!he(n,t)}function fM(e,t,n){const r=he(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Zh(e,t,n){const r=he(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const hM=fy({body:gM,colgroup:mM,head:dM,html:pM,tbody:yM});function pM(e){const t=he(e,-1);return!t||t.type!=="comment"}function dM(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function gM(e){const t=he(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&_f(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function mM(e,t,n){const r=uy(n,t),i=he(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&xf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function yM(e,t,n){const r=uy(n,t),i=he(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&xf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const wa={name:[[`
|
|
40
|
-
\f\r &/=>`.split(
|
|
41
|
-
\f\r "&'/=>\``.split(
|
|
42
|
-
\f\r "&'/<=>`.split(
|
|
43
|
-
\f\r "&'/<=>\``.split(
|
|
44
|
-
\f\r &>`.split(
|
|
45
|
-
\f\r "&'<=>\``.split(
|
|
46
|
-
\f\r "&'<=>\``.split(
|
|
47
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _M(e,t,n,r){const i=r.schema,a=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=yf);const u=xM(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(s=!1),(u||!a||!hM(e,t,n))&&(o.push("<",e.tagName,u?" "+u:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(c),!s&&(!a||!xf(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function xM(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const a=vM(e,i,t[i]);a&&n.push(a)}}for(;++r<n.length;){const a=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&a!=='"'&&a!=="'"&&(n[r]+=" ")}return n.join("")}function vM(e,t,n){const r=ty(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let s=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=Qr(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wa.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?hT:dT)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(o=Qr(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wa.unquoted[i][a]}))),o!==n&&(e.settings.quoteSmart&&Xh(n,s)>Xh(n,e.alternative)&&(s=e.alternative),o=s+Qr(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?wa.single:wa.double)[i][a],attribute:!0}))+s),l+(o&&"="+o))}const bM=["<","&"];function hy(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Qr(e.value,Object.assign({},r.settings.characterReferences,{subset:bM}))}function wM(e,t,n,r){return r.settings.allowDangerousHtml?e.value:hy(e,t,n,r)}function SM(e,t,n,r){return r.all(e)}const TM=RT("type",{invalid:MM,unknown:AM,handlers:{comment:KT,doctype:VT,element:_M,raw:wM,root:SM,text:hy}});function MM(e){throw new Error("Expected node, not `"+e+"`")}function AM(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const kM={},CM={},RM=[];function EM(e,t){const n=kM,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:DM,all:OM,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||CT,characterReferences:n.characterReferences||CM,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yf:ey,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function DM(e,t,n){return TM(e,t,n,this)}function OM(e){const t=[],n=e&&e.children||RM;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const Pe={arcAngle:180,maxSeats:200,useEnhanced:!0,chartConfig:{radius:220,seatSize:5,minSeatSize:4,maxSeatSize:18,spacing:1.1,innerRadiusRatio:.4,arcAngleFlexibility:5},colors:{emptySeats:"#f8f8f8",emptySeatsBorder:"#d8d8d8",seatBorder:"#fff"},animation:{transitionDuration:"0.2s",hoverOpacity:{active:"1",dimmed:"0.2",empty:"0.3"}},scaling:{enableScaling:!0,scaleThreshold:200}},Jr={COMPLETED:pn.neoDigitalGreen[600],NOT_APPLICABLE:"url(#greyHatchPattern)",NO_LST:"url(#noLstHatchPattern)",DATA_MISSING:"url(#dataMissingHatchPattern)"},zi="N/A",Bi="No LST",Ui="Data Missing";function PM(e,t,n,r="left-to-right",i=900,a){Ot.prototype.transition=Ic;const s=t*Math.PI/180,o=-s/2-Math.PI/2,l=s/2-Math.PI/2;let u=e.querySelector("defs");u||(u=document.createElementNS("http://www.w3.org/2000/svg","defs"),e.appendChild(u));const c="arc-sweep-clip";let f=u.querySelector(`#${c}`);f||(f=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),f.setAttribute("id",c),u.appendChild(f));const h=document.createElementNS("http://www.w3.org/2000/svg","path");f.innerHTML="",f.appendChild(h);const p=e.querySelector(".arc-container"),g=e.querySelector(".points-container");if(g&&p)if(g.setAttribute("clip-path",`url(#${c})`),r==="left-to-right"){const m=y=>{const v=n*1.5,_=Math.cos(y)*v,S=Math.sin(y)*v,w=Math.cos(l)*v,b=Math.sin(l)*v,M=l-y>Math.PI?1:0;return`M 0,0 L ${_},${S} A ${v},${v} 0 ${M},1 ${w},${b} Z`};h.setAttribute("d",m(o)),Ot(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const v=o+(l-o)*y;h.setAttribute("d",m(v))}).on("end",()=>{a&&a(),setTimeout(()=>{g.removeAttribute("clip-path")},50)})}else{const m=y=>{const v=n*1.5,_=Math.cos(y)*v,S=Math.sin(y)*v,w=Math.cos(l)*v,b=Math.sin(l)*v,M=l-y>Math.PI?1:0;return`M 0,0 L ${_},${S} A ${v},${v} 0 ${M},1 ${w},${b} Z`};h.setAttribute("d",m(l)),Ot(h).transition().duration(i).ease(y=>1-Math.pow(1-y,3)).tween("arc-sweep",()=>y=>{const v=l-(l-o)*y;h.setAttribute("d",m(v))}).on("end",()=>{g.removeAttribute("clip-path"),a&&a()})}}var Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vs,Qh;function py(){if(Qh)return Vs;Qh=1;var e=typeof Sa=="object"&&Sa&&Sa.Object===Object&&Sa;return Vs=e,Vs}var Zs,Jh;function Cn(){if(Jh)return Zs;Jh=1;var e=py(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Zs=n,Zs}var Qs,tp;function FM(){if(tp)return Qs;tp=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qs=t,Qs}var Js,ep;function $M(){if(ep)return Js;ep=1;var e=FM(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Js=n,Js}var to,np;function sa(){if(np)return to;np=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return to=e,to}var eo,rp;function oa(){if(rp)return eo;rp=1;var e=Cn(),t=e.Symbol;return eo=t,eo}var no,ip;function LM(){if(ip)return no;ip=1;var e=oa(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(s){var o=n.call(s,i),l=s[i];try{s[i]=void 0;var u=!0}catch{}var c=r.call(s);return u&&(o?s[i]=l:delete s[i]),c}return no=a,no}var ro,ap;function NM(){if(ap)return ro;ap=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ro=n,ro}var io,sp;function la(){if(sp)return io;sp=1;var e=oa(),t=LM(),n=NM(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(o){return o==null?o===void 0?i:r:a&&a in Object(o)?t(o):n(o)}return io=s,io}var ao,op;function ua(){if(op)return ao;op=1;function e(t){return t!=null&&typeof t=="object"}return ao=e,ao}var so,lp;function ca(){if(lp)return so;lp=1;var e=la(),t=ua(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return so=r,so}var oo,up;function dy(){if(up)return oo;up=1;var e=$M(),t=sa(),n=ca(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):i.test(u)?r:+u}return oo=l,oo}var lo,cp;function gy(){if(cp)return lo;cp=1;var e=dy(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return lo=r,lo}var uo,fp;function my(){if(fp)return uo;fp=1;var e=gy();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return uo=t,uo}var co,hp;function us(){if(hp)return co;hp=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return co=e,co}var fo,pp;function dn(){if(pp)return fo;pp=1;var e=Array.isArray;return fo=e,fo}var ho,dp;function qM(){if(dp)return ho;dp=1;var e=oa(),t=us(),n=dn(),r=ca(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function s(o){if(typeof o=="string")return o;if(n(o))return t(o,s)+"";if(r(o))return a?a.call(o):"";var l=o+"";return l=="0"&&1/o==-1/0?"-0":l}return ho=s,ho}var po,gp;function yy(){if(gp)return po;gp=1;var e=qM();function t(n){return n==null?"":e(n)}return po=t,po}var go,mp;function IM(){if(mp)return go;mp=1;var e=Cn(),t=my(),n=dy(),r=yy(),i=e.isFinite,a=Math.min;function s(o){var l=Math[o];return function(u,c){if(u=n(u),c=c==null?0:a(t(c),292),c&&i(u)){var f=(r(u)+"e").split("e"),h=l(f[0]+"e"+(+f[1]+c));return f=(r(h)+"e").split("e"),+(f[0]+"e"+(+f[1]-c))}return l(u)}}return go=s,go}var mo,yp;function zM(){if(yp)return mo;yp=1;var e=IM(),t=e("round");return mo=t,mo}var BM=zM();const UM=gi(BM);var yo,_p;function _y(){if(_p)return yo;_p=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return yo=e,yo}var _o,xp;function HM(){if(xp)return _o;xp=1;var e=la(),t=ua(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return _o=r,_o}var xo,vp;function vf(){if(vp)return xo;vp=1;var e=HM(),t=ua(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(s){return t(s)&&r.call(s,"callee")&&!i.call(s,"callee")};return xo=a,xo}var vo,bp;function jM(){if(bp)return vo;bp=1;var e=oa(),t=vf(),n=dn(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return vo=i,vo}var bo,wp;function xy(){if(wp)return bo;wp=1;var e=_y(),t=jM();function n(r,i,a,s,o){var l=-1,u=r.length;for(a||(a=t),o||(o=[]);++l<u;){var c=r[l];i>0&&a(c)?i>1?n(c,i-1,a,s,o):e(o,c):s||(o[o.length]=c)}return o}return bo=n,bo}var wo,Sp;function bf(){if(Sp)return wo;Sp=1;var e=dn(),t=ca(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,s){if(e(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||s!=null&&a in Object(s)}return wo=i,wo}var So,Tp;function vy(){if(Tp)return So;Tp=1;var e=la(),t=sa(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(o){if(!t(o))return!1;var l=e(o);return l==r||l==i||l==n||l==a}return So=s,So}var To,Mp;function GM(){if(Mp)return To;Mp=1;var e=Cn(),t=e["__core-js_shared__"];return To=t,To}var Mo,Ap;function YM(){if(Ap)return Mo;Ap=1;var e=GM(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Mo=n,Mo}var Ao,kp;function by(){if(kp)return Ao;kp=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ao=n,Ao}var ko,Cp;function WM(){if(Cp)return ko;Cp=1;var e=vy(),t=YM(),n=sa(),r=by(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,l=s.toString,u=o.hasOwnProperty,c=RegExp("^"+l.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!n(h)||t(h))return!1;var p=e(h)?c:a;return p.test(r(h))}return ko=f,ko}var Co,Rp;function XM(){if(Rp)return Co;Rp=1;function e(t,n){return t==null?void 0:t[n]}return Co=e,Co}var Ro,Ep;function Or(){if(Ep)return Ro;Ep=1;var e=WM(),t=XM();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return Ro=n,Ro}var Eo,Dp;function cs(){if(Dp)return Eo;Dp=1;var e=Or(),t=e(Object,"create");return Eo=t,Eo}var Do,Op;function KM(){if(Op)return Do;Op=1;var e=cs();function t(){this.__data__=e?e(null):{},this.size=0}return Do=t,Do}var Oo,Pp;function VM(){if(Pp)return Oo;Pp=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Oo=e,Oo}var Po,Fp;function ZM(){if(Fp)return Po;Fp=1;var e=cs(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var s=this.__data__;if(e){var o=s[a];return o===t?void 0:o}return r.call(s,a)?s[a]:void 0}return Po=i,Po}var Fo,$p;function QM(){if($p)return Fo;$p=1;var e=cs(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return Fo=r,Fo}var $o,Lp;function JM(){if(Lp)return $o;Lp=1;var e=cs(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return $o=n,$o}var Lo,Np;function tA(){if(Np)return Lo;Np=1;var e=KM(),t=VM(),n=ZM(),r=QM(),i=JM();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Lo=a,Lo}var No,qp;function eA(){if(qp)return No;qp=1;function e(){this.__data__=[],this.size=0}return No=e,No}var qo,Ip;function wf(){if(Ip)return qo;Ip=1;function e(t,n){return t===n||t!==t&&n!==n}return qo=e,qo}var Io,zp;function fs(){if(zp)return Io;zp=1;var e=wf();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Io=t,Io}var zo,Bp;function nA(){if(Bp)return zo;Bp=1;var e=fs(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,s=e(a,i);if(s<0)return!1;var o=a.length-1;return s==o?a.pop():n.call(a,s,1),--this.size,!0}return zo=r,zo}var Bo,Up;function rA(){if(Up)return Bo;Up=1;var e=fs();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Bo=t,Bo}var Uo,Hp;function iA(){if(Hp)return Uo;Hp=1;var e=fs();function t(n){return e(this.__data__,n)>-1}return Uo=t,Uo}var Ho,jp;function aA(){if(jp)return Ho;jp=1;var e=fs();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return Ho=t,Ho}var jo,Gp;function hs(){if(Gp)return jo;Gp=1;var e=eA(),t=nA(),n=rA(),r=iA(),i=aA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,jo=a,jo}var Go,Yp;function Sf(){if(Yp)return Go;Yp=1;var e=Or(),t=Cn(),n=e(t,"Map");return Go=n,Go}var Yo,Wp;function sA(){if(Wp)return Yo;Wp=1;var e=tA(),t=hs(),n=Sf();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Yo=r,Yo}var Wo,Xp;function oA(){if(Xp)return Wo;Xp=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Wo=e,Wo}var Xo,Kp;function ps(){if(Kp)return Xo;Kp=1;var e=oA();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Xo=t,Xo}var Ko,Vp;function lA(){if(Vp)return Ko;Vp=1;var e=ps();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Ko=t,Ko}var Vo,Zp;function uA(){if(Zp)return Vo;Zp=1;var e=ps();function t(n){return e(this,n).get(n)}return Vo=t,Vo}var Zo,Qp;function cA(){if(Qp)return Zo;Qp=1;var e=ps();function t(n){return e(this,n).has(n)}return Zo=t,Zo}var Qo,Jp;function fA(){if(Jp)return Qo;Jp=1;var e=ps();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return Qo=t,Qo}var Jo,td;function Tf(){if(td)return Jo;td=1;var e=sA(),t=lA(),n=uA(),r=cA(),i=fA();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Jo=a,Jo}var tl,ed;function hA(){if(ed)return tl;ed=1;var e=Tf(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var s=arguments,o=i?i.apply(this,s):s[0],l=a.cache;if(l.has(o))return l.get(o);var u=r.apply(this,s);return a.cache=l.set(o,u)||l,u};return a.cache=new(n.Cache||e),a}return n.Cache=e,tl=n,tl}var el,nd;function pA(){if(nd)return el;nd=1;var e=hA(),t=500;function n(r){var i=e(r,function(s){return a.size===t&&a.clear(),s}),a=i.cache;return i}return el=n,el}var nl,rd;function dA(){if(rd)return nl;rd=1;var e=pA(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(s,o,l,u){a.push(l?u.replace(n,"$1"):o||s)}),a});return nl=r,nl}var rl,id;function wy(){if(id)return rl;id=1;var e=dn(),t=bf(),n=dA(),r=yy();function i(a,s){return e(a)?a:t(a,s)?[a]:n(r(a))}return rl=i,rl}var il,ad;function ds(){if(ad)return il;ad=1;var e=ca();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return il=t,il}var al,sd;function Mf(){if(sd)return al;sd=1;var e=wy(),t=ds();function n(r,i){i=e(i,r);for(var a=0,s=i.length;r!=null&&a<s;)r=r[t(i[a++])];return a&&a==s?r:void 0}return al=n,al}var sl,od;function gA(){if(od)return sl;od=1;var e=hs();function t(){this.__data__=new e,this.size=0}return sl=t,sl}var ol,ld;function mA(){if(ld)return ol;ld=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ol=e,ol}var ll,ud;function yA(){if(ud)return ll;ud=1;function e(t){return this.__data__.get(t)}return ll=e,ll}var ul,cd;function _A(){if(cd)return ul;cd=1;function e(t){return this.__data__.has(t)}return ul=e,ul}var cl,fd;function xA(){if(fd)return cl;fd=1;var e=hs(),t=Sf(),n=Tf(),r=200;function i(a,s){var o=this.__data__;if(o instanceof e){var l=o.__data__;if(!t||l.length<r-1)return l.push([a,s]),this.size=++o.size,this;o=this.__data__=new n(l)}return o.set(a,s),this.size=o.size,this}return cl=i,cl}var fl,hd;function Sy(){if(hd)return fl;hd=1;var e=hs(),t=gA(),n=mA(),r=yA(),i=_A(),a=xA();function s(o){var l=this.__data__=new e(o);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,fl=s,fl}var hl,pd;function vA(){if(pd)return hl;pd=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return hl=t,hl}var pl,dd;function bA(){if(dd)return pl;dd=1;function e(t){return this.__data__.has(t)}return pl=e,pl}var dl,gd;function wA(){if(gd)return dl;gd=1;var e=Tf(),t=vA(),n=bA();function r(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new e;++a<s;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,dl=r,dl}var gl,md;function SA(){if(md)return gl;md=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return gl=e,gl}var ml,yd;function TA(){if(yd)return ml;yd=1;function e(t,n){return t.has(n)}return ml=e,ml}var yl,_d;function Ty(){if(_d)return yl;_d=1;var e=wA(),t=SA(),n=TA(),r=1,i=2;function a(s,o,l,u,c,f){var h=l&r,p=s.length,g=o.length;if(p!=g&&!(h&&g>p))return!1;var d=f.get(s),m=f.get(o);if(d&&m)return d==o&&m==s;var x=-1,y=!0,v=l&i?new e:void 0;for(f.set(s,o),f.set(o,s);++x<p;){var _=s[x],S=o[x];if(u)var w=h?u(S,_,x,o,s,f):u(_,S,x,s,o,f);if(w!==void 0){if(w)continue;y=!1;break}if(v){if(!t(o,function(b,M){if(!n(v,M)&&(_===b||c(_,b,l,u,f)))return v.push(M)})){y=!1;break}}else if(!(_===S||c(_,S,l,u,f))){y=!1;break}}return f.delete(s),f.delete(o),y}return yl=a,yl}var _l,xd;function MA(){if(xd)return _l;xd=1;var e=Cn(),t=e.Uint8Array;return _l=t,_l}var xl,vd;function AA(){if(vd)return xl;vd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return xl=e,xl}var vl,bd;function kA(){if(bd)return vl;bd=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return vl=e,vl}var bl,wd;function CA(){if(wd)return bl;wd=1;var e=oa(),t=MA(),n=wf(),r=Ty(),i=AA(),a=kA(),s=1,o=2,l="[object Boolean]",u="[object Date]",c="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",d="[object String]",m="[object Symbol]",x="[object ArrayBuffer]",y="[object DataView]",v=e?e.prototype:void 0,_=v?v.valueOf:void 0;function S(w,b,M,A,k,C,O){switch(M){case y:if(w.byteLength!=b.byteLength||w.byteOffset!=b.byteOffset)return!1;w=w.buffer,b=b.buffer;case x:return!(w.byteLength!=b.byteLength||!C(new t(w),new t(b)));case l:case u:case h:return n(+w,+b);case c:return w.name==b.name&&w.message==b.message;case p:case d:return w==b+"";case f:var P=i;case g:var F=A&s;if(P||(P=a),w.size!=b.size&&!F)return!1;var B=O.get(w);if(B)return B==b;A|=o,O.set(w,b);var L=r(P(w),P(b),A,k,C,O);return O.delete(w),L;case m:if(_)return _.call(w)==_.call(b)}return!1}return bl=S,bl}var wl,Sd;function RA(){if(Sd)return wl;Sd=1;var e=_y(),t=dn();function n(r,i,a){var s=i(r);return t(r)?s:e(s,a(r))}return wl=n,wl}var Sl,Td;function EA(){if(Td)return Sl;Td=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,s=[];++r<i;){var o=t[r];n(o,r,t)&&(s[a++]=o)}return s}return Sl=e,Sl}var Tl,Md;function DA(){if(Md)return Tl;Md=1;function e(){return[]}return Tl=e,Tl}var Ml,Ad;function OA(){if(Ad)return Ml;Ad=1;var e=EA(),t=DA(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),e(i(s),function(o){return r.call(s,o)}))}:t;return Ml=a,Ml}var Al,kd;function PA(){if(kd)return Al;kd=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Al=e,Al}var Di={exports:{}},kl,Cd;function FA(){if(Cd)return kl;Cd=1;function e(){return!1}return kl=e,kl}Di.exports;var Rd;function My(){return Rd||(Rd=1,(function(e,t){var n=Cn(),r=FA(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?n.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||r;e.exports=u})(Di,Di.exports)),Di.exports}var Cl,Ed;function Af(){if(Ed)return Cl;Ed=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Cl=n,Cl}var Rl,Dd;function kf(){if(Dd)return Rl;Dd=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Rl=t,Rl}var El,Od;function $A(){if(Od)return El;Od=1;var e=la(),t=kf(),n=ua(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",g="[object String]",d="[object WeakMap]",m="[object ArrayBuffer]",x="[object DataView]",y="[object Float32Array]",v="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",w="[object Int32Array]",b="[object Uint8Array]",M="[object Uint8ClampedArray]",A="[object Uint16Array]",k="[object Uint32Array]",C={};C[y]=C[v]=C[_]=C[S]=C[w]=C[b]=C[M]=C[A]=C[k]=!0,C[r]=C[i]=C[m]=C[a]=C[x]=C[s]=C[o]=C[l]=C[u]=C[c]=C[f]=C[h]=C[p]=C[g]=C[d]=!1;function O(P){return n(P)&&t(P.length)&&!!C[e(P)]}return El=O,El}var Dl,Pd;function Ay(){if(Pd)return Dl;Pd=1;function e(t){return function(n){return t(n)}}return Dl=e,Dl}var Oi={exports:{}};Oi.exports;var Fd;function LA(){return Fd||(Fd=1,(function(e,t){var n=py(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,s=a&&n.process,o=(function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})(Oi,Oi.exports)),Oi.exports}var Ol,$d;function ky(){if($d)return Ol;$d=1;var e=$A(),t=Ay(),n=LA(),r=n&&n.isTypedArray,i=r?t(r):e;return Ol=i,Ol}var Pl,Ld;function NA(){if(Ld)return Pl;Ld=1;var e=PA(),t=vf(),n=dn(),r=My(),i=Af(),a=ky(),s=Object.prototype,o=s.hasOwnProperty;function l(u,c){var f=n(u),h=!f&&t(u),p=!f&&!h&&r(u),g=!f&&!h&&!p&&a(u),d=f||h||p||g,m=d?e(u.length,String):[],x=m.length;for(var y in u)(c||o.call(u,y))&&!(d&&(y=="length"||p&&(y=="offset"||y=="parent")||g&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,x)))&&m.push(y);return m}return Pl=l,Pl}var Fl,Nd;function qA(){if(Nd)return Fl;Nd=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Fl=t,Fl}var $l,qd;function IA(){if(qd)return $l;qd=1;function e(t,n){return function(r){return t(n(r))}}return $l=e,$l}var Ll,Id;function zA(){if(Id)return Ll;Id=1;var e=IA(),t=e(Object.keys,Object);return Ll=t,Ll}var Nl,zd;function BA(){if(zd)return Nl;zd=1;var e=qA(),t=zA(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var s=[];for(var o in Object(a))r.call(a,o)&&o!="constructor"&&s.push(o);return s}return Nl=i,Nl}var ql,Bd;function gs(){if(Bd)return ql;Bd=1;var e=vy(),t=kf();function n(r){return r!=null&&t(r.length)&&!e(r)}return ql=n,ql}var Il,Ud;function ms(){if(Ud)return Il;Ud=1;var e=NA(),t=BA(),n=gs();function r(i){return n(i)?e(i):t(i)}return Il=r,Il}var zl,Hd;function UA(){if(Hd)return zl;Hd=1;var e=RA(),t=OA(),n=ms();function r(i){return e(i,n,t)}return zl=r,zl}var Bl,jd;function HA(){if(jd)return Bl;jd=1;var e=UA(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,s,o,l,u,c){var f=o&t,h=e(a),p=h.length,g=e(s),d=g.length;if(p!=d&&!f)return!1;for(var m=p;m--;){var x=h[m];if(!(f?x in s:r.call(s,x)))return!1}var y=c.get(a),v=c.get(s);if(y&&v)return y==s&&v==a;var _=!0;c.set(a,s),c.set(s,a);for(var S=f;++m<p;){x=h[m];var w=a[x],b=s[x];if(l)var M=f?l(b,w,x,s,a,c):l(w,b,x,a,s,c);if(!(M===void 0?w===b||u(w,b,o,l,c):M)){_=!1;break}S||(S=x=="constructor")}if(_&&!S){var A=a.constructor,k=s.constructor;A!=k&&"constructor"in a&&"constructor"in s&&!(typeof A=="function"&&A instanceof A&&typeof k=="function"&&k instanceof k)&&(_=!1)}return c.delete(a),c.delete(s),_}return Bl=i,Bl}var Ul,Gd;function jA(){if(Gd)return Ul;Gd=1;var e=Or(),t=Cn(),n=e(t,"DataView");return Ul=n,Ul}var Hl,Yd;function GA(){if(Yd)return Hl;Yd=1;var e=Or(),t=Cn(),n=e(t,"Promise");return Hl=n,Hl}var jl,Wd;function YA(){if(Wd)return jl;Wd=1;var e=Or(),t=Cn(),n=e(t,"Set");return jl=n,jl}var Gl,Xd;function WA(){if(Xd)return Gl;Xd=1;var e=Or(),t=Cn(),n=e(t,"WeakMap");return Gl=n,Gl}var Yl,Kd;function XA(){if(Kd)return Yl;Kd=1;var e=jA(),t=Sf(),n=GA(),r=YA(),i=WA(),a=la(),s=by(),o="[object Map]",l="[object Object]",u="[object Promise]",c="[object Set]",f="[object WeakMap]",h="[object DataView]",p=s(e),g=s(t),d=s(n),m=s(r),x=s(i),y=a;return(e&&y(new e(new ArrayBuffer(1)))!=h||t&&y(new t)!=o||n&&y(n.resolve())!=u||r&&y(new r)!=c||i&&y(new i)!=f)&&(y=function(v){var _=a(v),S=_==l?v.constructor:void 0,w=S?s(S):"";if(w)switch(w){case p:return h;case g:return o;case d:return u;case m:return c;case x:return f}return _}),Yl=y,Yl}var Wl,Vd;function KA(){if(Vd)return Wl;Vd=1;var e=Sy(),t=Ty(),n=CA(),r=HA(),i=XA(),a=dn(),s=My(),o=ky(),l=1,u="[object Arguments]",c="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(d,m,x,y,v,_){var S=a(d),w=a(m),b=S?c:i(d),M=w?c:i(m);b=b==u?f:b,M=M==u?f:M;var A=b==f,k=M==f,C=b==M;if(C&&s(d)){if(!s(m))return!1;S=!0,A=!1}if(C&&!A)return _||(_=new e),S||o(d)?t(d,m,x,y,v,_):n(d,m,b,x,y,v,_);if(!(x&l)){var O=A&&p.call(d,"__wrapped__"),P=k&&p.call(m,"__wrapped__");if(O||P){var F=O?d.value():d,B=P?m.value():m;return _||(_=new e),v(F,B,x,y,_)}}return C?(_||(_=new e),r(d,m,x,y,v,_)):!1}return Wl=g,Wl}var Xl,Zd;function Cy(){if(Zd)return Xl;Zd=1;var e=KA(),t=ua();function n(r,i,a,s,o){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,s,n,o)}return Xl=n,Xl}var Kl,Qd;function VA(){if(Qd)return Kl;Qd=1;var e=Sy(),t=Cy(),n=1,r=2;function i(a,s,o,l){var u=o.length,c=u,f=!l;if(a==null)return!c;for(a=Object(a);u--;){var h=o[u];if(f&&h[2]?h[1]!==a[h[0]]:!(h[0]in a))return!1}for(;++u<c;){h=o[u];var p=h[0],g=a[p],d=h[1];if(f&&h[2]){if(g===void 0&&!(p in a))return!1}else{var m=new e;if(l)var x=l(g,d,p,a,s,m);if(!(x===void 0?t(d,g,n|r,l,m):x))return!1}}return!0}return Kl=i,Kl}var Vl,Jd;function Ry(){if(Jd)return Vl;Jd=1;var e=sa();function t(n){return n===n&&!e(n)}return Vl=t,Vl}var Zl,tg;function ZA(){if(tg)return Zl;tg=1;var e=Ry(),t=ms();function n(r){for(var i=t(r),a=i.length;a--;){var s=i[a],o=r[s];i[a]=[s,o,e(o)]}return i}return Zl=n,Zl}var Ql,eg;function Ey(){if(eg)return Ql;eg=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ql=e,Ql}var Jl,ng;function QA(){if(ng)return Jl;ng=1;var e=VA(),t=ZA(),n=Ey();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(s){return s===i||e(s,i,a)}}return Jl=r,Jl}var tu,rg;function JA(){if(rg)return tu;rg=1;var e=Mf();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return tu=t,tu}var eu,ig;function tk(){if(ig)return eu;ig=1;function e(t,n){return t!=null&&n in Object(t)}return eu=e,eu}var nu,ag;function ek(){if(ag)return nu;ag=1;var e=wy(),t=vf(),n=dn(),r=Af(),i=kf(),a=ds();function s(o,l,u){l=e(l,o);for(var c=-1,f=l.length,h=!1;++c<f;){var p=a(l[c]);if(!(h=o!=null&&u(o,p)))break;o=o[p]}return h||++c!=f?h:(f=o==null?0:o.length,!!f&&i(f)&&r(p,f)&&(n(o)||t(o)))}return nu=s,nu}var ru,sg;function nk(){if(sg)return ru;sg=1;var e=tk(),t=ek();function n(r,i){return r!=null&&t(r,i,e)}return ru=n,ru}var iu,og;function rk(){if(og)return iu;og=1;var e=Cy(),t=JA(),n=nk(),r=bf(),i=Ry(),a=Ey(),s=ds(),o=1,l=2;function u(c,f){return r(c)&&i(f)?a(s(c),f):function(h){var p=t(h,c);return p===void 0&&p===f?n(h,c):e(f,p,o|l)}}return iu=u,iu}var au,lg;function ys(){if(lg)return au;lg=1;function e(t){return t}return au=e,au}var su,ug;function ik(){if(ug)return su;ug=1;function e(t){return function(n){return n==null?void 0:n[t]}}return su=e,su}var ou,cg;function ak(){if(cg)return ou;cg=1;var e=Mf();function t(n){return function(r){return e(r,n)}}return ou=t,ou}var lu,fg;function sk(){if(fg)return lu;fg=1;var e=ik(),t=ak(),n=bf(),r=ds();function i(a){return n(a)?e(r(a)):t(a)}return lu=i,lu}var uu,hg;function Dy(){if(hg)return uu;hg=1;var e=QA(),t=rk(),n=ys(),r=dn(),i=sk();function a(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):i(s)}return uu=a,uu}var cu,pg;function ok(){if(pg)return cu;pg=1;function e(t){return function(n,r,i){for(var a=-1,s=Object(n),o=i(n),l=o.length;l--;){var u=o[t?l:++a];if(r(s[u],u,s)===!1)break}return n}}return cu=e,cu}var fu,dg;function lk(){if(dg)return fu;dg=1;var e=ok(),t=e();return fu=t,fu}var hu,gg;function uk(){if(gg)return hu;gg=1;var e=lk(),t=ms();function n(r,i){return r&&e(r,i,t)}return hu=n,hu}var pu,mg;function ck(){if(mg)return pu;mg=1;var e=gs();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var s=i.length,o=r?s:-1,l=Object(i);(r?o--:++o<s)&&a(l[o],o,l)!==!1;);return i}}return pu=t,pu}var du,yg;function fk(){if(yg)return du;yg=1;var e=uk(),t=ck(),n=t(e);return du=n,du}var gu,_g;function Oy(){if(_g)return gu;_g=1;var e=fk(),t=gs();function n(r,i){var a=-1,s=t(r)?Array(r.length):[];return e(r,function(o,l,u){s[++a]=i(o,l,u)}),s}return gu=n,gu}var mu,xg;function hk(){if(xg)return mu;xg=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return mu=e,mu}var yu,vg;function pk(){if(vg)return yu;vg=1;var e=ca();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,s=n===n,o=e(n),l=r!==void 0,u=r===null,c=r===r,f=e(r);if(!u&&!f&&!o&&n>r||o&&l&&c&&!u&&!f||a&&l&&c||!i&&c||!s)return 1;if(!a&&!o&&!f&&n<r||f&&i&&s&&!a&&!o||u&&i&&s||!l&&s||!c)return-1}return 0}return yu=t,yu}var _u,bg;function dk(){if(bg)return _u;bg=1;var e=pk();function t(n,r,i){for(var a=-1,s=n.criteria,o=r.criteria,l=s.length,u=i.length;++a<l;){var c=e(s[a],o[a]);if(c){if(a>=u)return c;var f=i[a];return c*(f=="desc"?-1:1)}}return n.index-r.index}return _u=t,_u}var xu,wg;function gk(){if(wg)return xu;wg=1;var e=us(),t=Mf(),n=Dy(),r=Oy(),i=hk(),a=Ay(),s=dk(),o=ys(),l=dn();function u(c,f,h){f.length?f=e(f,function(d){return l(d)?function(m){return t(m,d.length===1?d[0]:d)}:d}):f=[o];var p=-1;f=e(f,a(n));var g=r(c,function(d,m,x){var y=e(f,function(v){return v(d)});return{criteria:y,index:++p,value:d}});return i(g,function(d,m){return s(d,m,h)})}return xu=u,xu}var vu,Sg;function mk(){if(Sg)return vu;Sg=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return vu=e,vu}var bu,Tg;function yk(){if(Tg)return bu;Tg=1;var e=mk(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var s=arguments,o=-1,l=t(s.length-i,0),u=Array(l);++o<l;)u[o]=s[i+o];o=-1;for(var c=Array(i+1);++o<i;)c[o]=s[o];return c[i]=a(u),e(r,this,c)}}return bu=n,bu}var wu,Mg;function _k(){if(Mg)return wu;Mg=1;function e(t){return function(){return t}}return wu=e,wu}var Su,Ag;function xk(){if(Ag)return Su;Ag=1;var e=Or(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Su=t,Su}var Tu,kg;function vk(){if(kg)return Tu;kg=1;var e=_k(),t=xk(),n=ys(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return Tu=r,Tu}var Mu,Cg;function bk(){if(Cg)return Mu;Cg=1;var e=800,t=16,n=Date.now;function r(i){var a=0,s=0;return function(){var o=n(),l=t-(o-s);if(s=o,l>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Mu=r,Mu}var Au,Rg;function wk(){if(Rg)return Au;Rg=1;var e=vk(),t=bk(),n=t(e);return Au=n,Au}var ku,Eg;function Sk(){if(Eg)return ku;Eg=1;var e=ys(),t=yk(),n=wk();function r(i,a){return n(t(i,a,e),i+"")}return ku=r,ku}var Cu,Dg;function Cf(){if(Dg)return Cu;Dg=1;var e=wf(),t=gs(),n=Af(),r=sa();function i(a,s,o){if(!r(o))return!1;var l=typeof s;return(l=="number"?t(o)&&n(s,o.length):l=="string"&&s in o)?e(o[s],a):!1}return Cu=i,Cu}var Ru,Og;function Tk(){if(Og)return Ru;Og=1;var e=xy(),t=gk(),n=Sk(),r=Cf(),i=n(function(a,s){if(a==null)return[];var o=s.length;return o>1&&r(a,s[0],s[1])?s=[]:o>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(a,e(s,1),[])});return Ru=i,Ru}var Mk=Tk();const Ak=gi(Mk);var Eu,Pg;function kk(){if(Pg)return Eu;Pg=1;function e(t){for(var n=-1,r=t==null?0:t.length,i={};++n<r;){var a=t[n];i[a[0]]=a[1]}return i}return Eu=e,Eu}var Ck=kk();const Fg=gi(Ck);var Du,$g;function Rk(){if($g)return Du;$g=1;var e=Math.ceil,t=Math.max;function n(r,i,a,s){for(var o=-1,l=t(e((i-r)/(a||1)),0),u=Array(l);l--;)u[s?l:++o]=r,r+=a;return u}return Du=n,Du}var Ou,Lg;function Ek(){if(Lg)return Ou;Lg=1;var e=Rk(),t=Cf(),n=gy();function r(i){return function(a,s,o){return o&&typeof o!="number"&&t(a,s,o)&&(s=o=void 0),a=n(a),s===void 0?(s=a,a=0):s=n(s),o=o===void 0?a<s?1:-1:n(o),e(a,s,o,i)}}return Ou=r,Ou}var Pu,Ng;function Dk(){if(Ng)return Pu;Ng=1;var e=Ek(),t=e();return Pu=t,Pu}var Ok=Dk();const Pk=gi(Ok);var Fu,qg;function Fk(){if(qg)return Fu;qg=1;var e=us(),t=Dy(),n=Oy(),r=dn();function i(a,s){var o=r(a)?e:n;return o(a,t(s,3))}return Fu=i,Fu}var $u,Ig;function $k(){if(Ig)return $u;Ig=1;var e=xy(),t=Fk();function n(r,i){return e(t(r,i),1)}return $u=n,$u}var Lk=$k();const Nk=gi(Lk);var Lu,zg;function Py(){if(zg)return Lu;zg=1;function e(t,n,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),n!==void 0&&(t=t>=n?t:n)),t}return Lu=e,Lu}var Nu,Bg;function qk(){if(Bg)return Nu;Bg=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return Nu=e,Nu}var qu,Ug;function Ik(){if(Ug)return qu;Ug=1;var e=Math.floor,t=Math.random;function n(r,i){return r+e(t()*(i-r+1))}return qu=n,qu}var Iu,Hg;function Fy(){if(Hg)return Iu;Hg=1;var e=Ik();function t(n,r){var i=-1,a=n.length,s=a-1;for(r=r===void 0?a:r;++i<r;){var o=e(i,s),l=n[o];n[o]=n[i],n[i]=l}return n.length=r,n}return Iu=t,Iu}var zu,jg;function zk(){if(jg)return zu;jg=1;var e=Py(),t=qk(),n=Fy();function r(i,a){return n(t(i),e(a,0,i.length))}return zu=r,zu}var Bu,Gg;function Bk(){if(Gg)return Bu;Gg=1;var e=us();function t(n,r){return e(r,function(i){return n[i]})}return Bu=t,Bu}var Uu,Yg;function Uk(){if(Yg)return Uu;Yg=1;var e=Bk(),t=ms();function n(r){return r==null?[]:e(r,t(r))}return Uu=n,Uu}var Hu,Wg;function Hk(){if(Wg)return Hu;Wg=1;var e=Py(),t=Fy(),n=Uk();function r(i,a){var s=n(i);return t(s,e(a,0,s.length))}return Hu=r,Hu}var ju,Xg;function jk(){if(Xg)return ju;Xg=1;var e=zk(),t=Hk(),n=dn(),r=Cf(),i=my();function a(s,o,l){(l?r(s,o,l):o===void 0)?o=1:o=i(o);var u=n(s)?e:t;return u(s,o)}return ju=a,ju}var Gk=jk();const Yk=gi(Gk),Wk=e=>UM(e,14),Kg=e=>Object.values(e).reduce((t,n)=>t+n,0),Xk=(e,t,n={})=>{const r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw new Error("vote distribution must contain at least one party");if(!Object.values(e).every(g=>typeof g=="number"&&g>=0))throw new Error("party vote counts must be non-negative integers");if(!Number.isInteger(t)||t<=0)throw new Error("seats must be a positive integer");if(typeof r.draw!="boolean")throw new Error("opt.draw must be a boolean");const i=Kg(e),a=Fg(Object.entries(e).map(([g,d])=>{const m=Math.max(t-Object.keys(e).length,0),x=Math.round(m*d/i);return[g,x]})),s=Fg(Object.entries(e).map(([g,d])=>{const m=t+Object.keys(e).length,x=Math.min(Math.round(m*d/i),t);return[g,x]})),o=Nk(Object.entries(e).map(([g,d])=>{const m=a[g],x=s[g];return Pk(m,x).map(y=>{const v=Wk(d/(y+.5));return{party:g,quotient:v}})})),l=Kg(a),u=t-l,c=Ak(o,({quotient:g})=>-g),f=c[u-1].quotient,h=c.filter(({quotient:g})=>g>f),p=c.filter(({quotient:g})=>g===f);if(h.length+p.length===u)h.push(...p);else{if(!r.draw)throw new Error("result is ambiguous, a draw would need to be made, but opt.draw is disabled");h.push(...Yk(p,u-h.length))}return h.reduce((g,{party:d})=>(g[d]+=1,g),a)},Ja=e=>Math.round(e*1e10)/1e10,Kk=e=>e.reduce((t,n)=>t+n.seats,0),Vk=e=>e.flat(),Zk=(e,t,n)=>{const r=(Math.PI-n)/2,i=t/e+r-Math.PI;return{x:Ja(e*Math.cos(i)),y:Ja(e*Math.sin(i))}},$y=(e,t,n,r)=>{const i=r*t*n/(e-t),a=1+r*(t-1)*t/2/(e-t);return i/a},Ti=(e,t,n,r)=>{const i=r/Math.PI*.7142857142857143;return Math.abs($y(e,t,n,r)*t/n-i)},Qk=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,i=Ti(e,r,t,n),a=0;for(Ti(e,r+1,t,n)<i&&(a=1),Ti(e,r-1,t,n)<i&&r>1&&(a=-1);Ti(e,r+a,t,n)<i&&r>0;)i=Ti(e,r+a,t,n),r+=a;return r},Jk=(e,t)=>{var i,a;let n,r;for(let s=0;s<e.length;s++)r=Ja((t[s]||0)/(((i=e[s])==null?void 0:i.length)??1)),(!n||r<n)&&(n=r);for(let s=0;s<e.length;s++)if(r=Ja((t[s]||0)/(((a=e[s])==null?void 0:a.length)??1)),r===n)return s;return 0},t2=(e,t,n)=>{const r=Kk(e),i=Qk(r,t,n),a=$y(r,i,t,n);let s={};for(let h=1;h<=i;h++)s[h]=t-(h-1)*a;s=Xk(s,r);const o=[];let l,u,c;for(let h=1;h<=i;h++){const p=[];l=t-(h-1)*a,u=n*l/((s[h]??1)-1||1);for(let g=0;g<=(s[h]??1)-1;g++)c={...Zk(l,g*u,n),r:.4*a},p.push(c);o.push(p)}const f=Array(o.length).fill(0);for(const h of e)for(let p=0;p<h.seats;p++){const g=Jk(o,f),d=o[g],m=f[g]??0,x=d==null?void 0:d[m];x&&(x.fill=h.colour,x.party=String(h.id)),f[g]=m+1}return Vk(o)},e2=e=>t=>e("circle",{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),n2={seatCount:!1,arcAngle:180,hFunction:aa},r2=(e,t={})=>{var m;const{seatCount:n,arcAngle:r,hFunction:i}=Object.assign({},n2,t);if(typeof n!="boolean")throw new Error("`seatCount` option must be a boolean");if(typeof i!="function")throw new Error("`hFunction` option must be a function");if(typeof r!="number"||r<=0||r>360)throw new Error("`arcAngle` option must be a number between 0 and 360");const a=r*Math.PI/180,s=20,o=t2(e,s,a),l=(((m=o[0])==null?void 0:m.r)??0)/.4||0,u=o.map(e2(i));n&&u.push(i("text",{x:0,y:0,"text-anchor":"middle",style:{"font-family":"Helvetica","font-size":.25*s+"px"},class:"seatNumber"},String(u.length)));const c=r<=180?s+l:s*(1+Math.sin((a-Math.PI)/2))+l,f=s+l,h=Math.max(c,f),p=r<=180?-s-l/2:-s*(1+Math.sin((a-Math.PI)/2))-l/2,g=i("defs",[ry(i),iy(i),ay(i)]);return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:[-s-l/2,p,2*s+l,h].join(",")},[g,...u])},i2={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:aa},a2=(e,t={})=>{const n={...i2,...t},{arcAngle:r,arcAngleFlexibility:i,radius:a,seatSize:s,minSeatSize:o,maxSeatSize:l,spacing:u,innerRadiusRatio:c,showLabels:f,hFunction:h}=n,p=a*c,g=e.reduce((Z,R)=>Z+R.seats,0);let d={seatSize:s,arcAngle:r,score:-1};const m=r-i,x=r+i;for(let Z=m;Z<=x;Z+=2.5){const R=Z*Math.PI/180;for(let z=l;z>=o;z-=.1){const D=z*2,T=D*u,X=Math.floor((a-p)/T);for(let Q=1;Q<=Math.min(X,10);Q++){let W=0;for(let ut=0;ut<Q;ut++){const H=p+(ut+.5)*T,ot=D*u/H,gt=Math.floor(R/ot);W+=gt}if(W>=g){const ut=g/W,H=(z-o)/(l-o),ot=(W-g)/g,gt=ot<.15?1:ot<.3?.7:ot<.5?.4:.1,yt=1-Math.abs(Z-r)/i,vt=gt*.5+H*.3+ut*.15+yt*.05;vt>d.score&&(d={seatSize:z,arcAngle:Z,rings:Q,score:vt})}}}}const y=d.seatSize,v=d.arcAngle,_=v*Math.PI/180,S=y*2,w=S*u,b=Math.floor((a-p)/w),M=[],A=-_/2-Math.PI/2,k=[];let C=0,O=[];for(let Z=1;Z<=b;Z++){let R=0;const z=[];for(let D=0;D<Z;D++){const T=p+(D+.5)*w,X=S*u/T,Q=Math.floor(_/X);z.push(Q),R+=Q}if(R>=g){C=Z,O=z;break}}if(C>0)k.push(...O);else for(let Z=0;Z<b;Z++){const R=p+(Z+.5)*w,z=S*u/R,D=Math.floor(_/z);k.push(D)}for(let Z=0;Z<k.length;Z++){const R=p+(Z+.5)*w,z=k[Z]??0;if(z>0){const D=_/z;for(let T=0;T<z;T++){const X=A+(T+.5)*D,Q=Math.cos(X)*R,W=Math.sin(X)*R;M.push({ring:Z,index:T,angle:X,x:Q,y:W})}}}M.sort((Z,R)=>{const z=Z.angle-R.angle;return Math.abs(z)>.001?z:Z.ring-R.ring});const P=[];let F=0;e.forEach(Z=>{const R=[],z=Math.min(Z.seats,M.length-F);let D=1/0,T=-1/0;for(let Q=0;Q<z&&F<M.length;Q++){const W=M[F++];W&&(D=Math.min(D,W.angle),T=Math.max(T,W.angle),Math.sqrt(W.x*W.x+W.y*W.y),R.push(h("circle",{fill:Z.colour,stroke:Z.colour,className:"circle seat-visual seat-hover-zone",transform:`translate(${W.x}, ${W.y})`,r:y,"data-party":Z.name,"data-party-id":String(Z.id),style:"pointer-events: all; cursor: pointer;"})))}const X=R;P.push(h("g",{className:"party-group","data-party":Z.name,style:"opacity: 1; outline: none;"},X))});const B=h("g",{className:"arc-bg"},[h("circle",{className:"outer",cx:0,cy:0,fill:"#ffffff",r:a}),h("circle",{className:"inner",cx:0,cy:0,fill:"#ffffff",r:p})]),L=h("g",{className:"points-container"},P),$=f?h("g",{className:"label-container",mask:"url(#label-clip)",style:"pointer-events: none;"},[h("text",{className:"party_count",dy:"-0.05em",style:"font-size: 24vw; font-weight: bold; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);"}),h("text",{className:"party_name",y:0,dy:"1em",style:"font-size: 6vw; font-weight: normal; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);"})]):null,Y=h("defs",[h("radialGradient",{id:"label-gradient"},[h("stop",{offset:"0%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"80%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 1;"}),h("stop",{offset:"90%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"}),h("stop",{offset:"100%",style:"stop-color: rgb(255, 255, 255); stop-opacity: 0;"})]),h("mask",{id:"label-clip"},[h("circle",{fill:"url(#label-gradient)",r:p})]),ry(h),iy(h),ay(h)]),K=h("g",{className:"arc-container",transform:`translate(${a}, ${a})`},[B,L,$].filter(Boolean)),J=_/2;let st;if(v<=180)st=a*Math.sin(J)+y;else{const Z=J-Math.PI/2;st=a*(1+Math.sin(Z))+y}const lt=a+y,N=a*2,j=Math.max(st,lt);return h("svg",{id:"chart-container","font-family":"Canva Sans Variable",viewBox:`0 0 ${N} ${j}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},[K,Y])};function Ly(e){return!e||!e.color?"#cccccc":e.color==="url(#hatchPattern)"?Jr.COMPLETED:e.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:e.color}function Rc(e,t){if(!e)return;const n=e.querySelectorAll(".party-group");n&&n.length>0&&n.forEach(r=>{if(!r)return;const i=r,a=i.getAttribute("data-party");t?a===t?i.style.opacity=Pe.animation.hoverOpacity.active:i.style.opacity=Pe.animation.hoverOpacity.dimmed:i.style.opacity="1"})}function Ec(e,t){e.forEach(n=>{const r=n,i=n.getAttribute("class")||"";t?i===t?(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1")):(r.setAttribute("fill-opacity",Pe.animation.hoverOpacity.dimmed),r.setAttribute("stroke-opacity","0.2")):(r.setAttribute("fill-opacity","1"),r.setAttribute("stroke-opacity","1"))})}const s2=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:i,maxSeats:a,setHoveredData:s,activePartyName:o,setActivePartyName:l,chartConfig:u,seatSize:c,shouldAnimate:f=!1,animationDirection:h="left-to-right",onAnimationComplete:p})=>{G.useEffect(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);const g=n<=a?1:a/n,d=t.filter(w=>w.value>0).map(w=>{const b=n<=a?w.value:Math.max(1,Math.floor(w.value*g));return{id:String(w.id),name:w.label,seats:b,colour:w.color==="url(#hatchPattern)"?Jr.COMPLETED:w.color}}),m=i?a2(d,{arcAngle:r,arcAngleFlexibility:u.arcAngleFlexibility,radius:u.radius,seatSize:c,minSeatSize:u.minSeatSize,maxSeatSize:u.maxSeatSize,spacing:u.spacing,innerRadiusRatio:u.innerRadiusRatio,showLabels:!0}):r2(d,{arcAngle:r});m.properties&&(m.properties.width="100%",m.properties.height="100%",m.properties.style="display: block; width: 100%; max-width: 100%; height: auto;",m.properties.preserveAspectRatio="xMidYMid meet");const x=EM(m),_=new DOMParser().parseFromString(x,"image/svg+xml").documentElement;if(!_)return;_.setAttribute("width","100%"),_.setAttribute("height","100%"),_.style.width="100%",_.style.height="auto",_.style.display="block",i?o2(_,d,t,s,o,l):l2(_,d,t,s,o,l);const S=()=>{if(s(null),l(null),i)Rc(_,null);else{const w=_.querySelectorAll("circle");Ec(w,null)}};return _&&_.addEventListener("mouseleave",S),e.current.appendChild(_),f&&_&&PM(_,r,u.radius,h,900,p),()=>{if(_&&_.removeEventListener("mouseleave",S),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,i,a,s,o,l,e,u,c,f,h,p])};function o2(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll(".seat-hover-zone"),o=e.querySelectorAll(".party-group circle.seat-visual");o&&o.length>0&&o.forEach(l=>{if(l){const u=l;u.style.stroke=Pe.colors.seatBorder,u.style.strokeWidth="0.5",u.setAttribute("fill-opacity","1"),u.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s&&s.length>0&&s.forEach(l=>{if(!l)return;const u=l.getAttribute("data-party"),c=l.getAttribute("data-party-id"),f=()=>{if(u&&u!==i){const h=t.find(p=>p.name===u||String(p.id)===c);if(h){const p=n.find(g=>g.label===h.name||String(g.id)===h.id);if(p){const g=Ly(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h.name),Rc(e,h.name)}}}};l.addEventListener("mouseenter",f)}),i&&Rc(e,i)}function l2(e,t,n,r,i,a){if(!e)return;const s=e.querySelectorAll("circle");if(s&&s.length>0&&(s.forEach(o=>{if(o){const l=o;l.style.cursor="pointer",l.style.stroke=Pe.colors.seatBorder,l.style.strokeWidth="0.5",l.setAttribute("fill-opacity","1"),l.style.transition=`fill-opacity ${Pe.animation.transitionDuration} ease, stroke-opacity ${Pe.animation.transitionDuration} ease`}}),s.forEach(o=>{if(!o)return;const l=o.getAttribute("class")||"",u=parseInt(l,10),c=t[u],f=()=>{if(c){const h=c.name;if(h&&h!==i){const p=n.find(g=>g.label===c.name||String(g.id)===c.id);if(p){const g=Ly(p);r({label:p.label||"Unknown",value:p.value||0,color:g}),a(h),Ec(s,l)}}}};o.addEventListener("mouseenter",f)})),i){const o=t.find(l=>l.name===i);if(o){const l=t.indexOf(o);Ec(s,String(l))}}}const Gu=Li,Vg={[zi]:Jr.NOT_APPLICABLE,[Bi]:Jr.NO_LST,[Ui]:Jr.DATA_MISSING},Mi=(e,t,n)=>{if(e in Vg)return Vg[e];const r=n-1-t,i=Gu.length,a=Math.floor(r/Math.max(1,n-1)*(i-1)),s=Math.min(Math.max(0,a),i-1);return Gu[s]??Gu[0]??"#000000"},Ny=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{const{special:i,regular:a}=e.reduce((p,g,d)=>([zi,Bi,Ui].includes(g.label)?p.special.push({...g,originalIndex:d}):p.regular.push({...g,originalIndex:d}),p),{special:[],regular:[]}),s=a.reverse().map((p,g)=>({id:`measure-${g}`,label:p.label,value:p.value,color:Mi(p.label,a.length-1-g,a.length)})),o=i.map((p,g)=>({id:p.label.toLowerCase().replace(" ","-"),label:p.label,value:p.value,color:Mi(p.label,g,i.length)})),l=r,u={id:"no-lst",label:Bi,value:n,color:Mi(Bi,0,1)},c={id:"data-missing",label:Ui,value:l,color:Mi(Ui,0,1)},f={id:"n/a",label:zi,value:t,color:Mi(zi,0,1)},h=[];return f.value>0&&h.push(f),u.value>0&&h.push(u),c.value>0&&h.push(c),h.push(...o),h.push(...s),h},Zg={"N/A":"Repos that aren't applicable to this migration.","No LST":"There are no LSTs for these repos.","Data Missing":"There is data missing in the LSTs."},u2=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i,arcAngle:a,useEnhanced:s=Pe.useEnhanced,showTable:o=!0,shouldAnimate:l=!1,animationDirection:u="left-to-right",onAnimationComplete:c})=>{const f=G.useRef(null),[h,p]=G.useState(null),[g,d]=G.useState(null),x=Ny({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i}).map(b=>{const M=typeof b.color=="function"?b.color("arc"):b.color,A=typeof b.label=="function"?b.label("arc"):b.label;return{...b,color:M,label:A}}),y=a??df({repositoryCount:t}),v=gf({repositoryCount:t});s2({containerRef:f,processedData:x,totalRepositories:t,arcAngle:y,useEnhanced:s,maxSeats:Pe.maxSeats,setHoveredData:p,activePartyName:g,setActivePartyName:d,chartConfig:Pe.chartConfig,seatSize:v,shouldAnimate:l,animationDirection:u,onAnimationComplete:c});const _=x.map(b=>{const M=t>0?b.value/t*100:0,A=M>0&&M<1?"< 1":M.toFixed(0);return{id:String(b.id),label:b.label,value:b.value,percentage:A,color:b.color}}),S=t>Pe.maxSeats,w=S?Math.round(t/Pe.maxSeats):1;return E.jsxs(q.Stack,{sx:{width:"100%",alignItems:"center",gap:{xs:.5,sm:.75,md:1,lg:1},py:0,"@media (min-width: 1024px) and (max-width: 1225px)":{gap:.25}},children:[E.jsxs(q.Box,{className:"parliament-chart-container",sx:{position:"relative",width:"100%",minHeight:"200px",mb:{xs:.5,sm:.75,md:1},"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:"250px",mb:.25}},children:[E.jsx(q.Box,{className:"parliament-chart-svg-container",ref:f,sx:{width:"100%",height:"100%",position:"relative",display:"flex",justifyContent:"center",alignItems:"center","& svg":{width:"100%",height:"100%",maxWidth:"100%","@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:"230px"}}}}),E.jsxs(q.Box,{className:"parliament-chart-tooltip",sx:{position:"absolute",bottom:"0%",left:"50%",transform:"translate(-50%, 0%)",pointerEvents:"none",textAlign:"center",zIndex:10,"@media (min-width: 1024px) and (max-width: 1225px)":{bottom:"5%"}},children:[h&&E.jsxs(G.Fragment,{children:[E.jsx(q.Typography,{sx:{color:"text.secondary",mb:.3,fontSize:"clamp(0.75rem, 1.5vw, 0.85rem)",display:"block","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"0.7rem",mb:.2}},children:h.label}),E.jsxs(q.Typography,{sx:{fontWeight:"bold",color:h.color,lineHeight:1,fontSize:"clamp(1.1rem, 2.2vw, 1.3rem)","@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:"1rem"}},children:[h.value," ",h.value>1?"repos":"repo"]})]}),S&&E.jsxs(q.Box,{className:"parliament-chart-scaled-indicator",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,mt:h?.5:0,color:"text.secondary",fontSize:"clamp(0.65rem, 1.2vw, 0.72rem)"},children:[E.jsx(q.Box,{className:"parliament-chart-scaled-indicator-dot",sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"#888888",flexShrink:0}}),E.jsxs(q.Typography,{variant:"caption",sx:{fontSize:"inherit",fontStyle:"italic"},children:["= ~",w," repos"]})]})]})]}),o&&E.jsx(q.Box,{className:"parliament-chart-data-table",sx:{width:"100%",display:"flex",justifyContent:"center","@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:"auto",maxWidth:"100%"}},onMouseLeave:()=>{p(null),d(null)},children:E.jsxs(q.Table,{"aria-label":"Repository categories summary",className:"parliament-chart-table",size:"small",sx:{maxWidth:{xs:"clamp(360px, 90%, 400px)",sm:"clamp(360px, 90%, 400px)",md:"clamp(360px, 85%, 420px)",lg:"clamp(360px, 90%, 400px)"},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:"360px","& .MuiTableCell-root":{padding:"1px 4px",fontSize:"9.5px"}},"& .MuiTableCell-root":{paddingTop:"1px",paddingBottom:"1px",paddingLeft:0,paddingRight:"4px",borderBottom:"none",fontSize:"clamp(10px, 1.8vw, 12px)"},"& tbody .MuiTableRow-root:first-of-type .MuiTableCell-root":{paddingTop:"2px"}},children:[E.jsx("thead",{children:E.jsxs(q.TableRow,{sx:{"& .MuiTableCell-root":{borderBottom:"1px solid",borderColor:"grey.300",pb:"2px"}},children:[E.jsx(q.TableCell,{colSpan:2,sx:{fontWeight:500},children:"Category"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"# of repositories"}),E.jsx(q.TableCell,{align:"right",sx:{fontWeight:500},children:"Percentage"})]})}),E.jsx("tbody",{children:_.map(b=>{const M=b.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:b.color;return E.jsxs(q.TableRow,{onMouseEnter:()=>{d(b.label),p({label:b.label,value:b.value,color:b.color==="url(#greyHatchPattern)"?Dt.greyHatch.lines:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.lines:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.lines:b.color})},sx:{cursor:"pointer",transition:"background-color 0.15s ease",backgroundColor:g===b.label?`${M}15`:"transparent","&:hover":{backgroundColor:`${M}15`}},children:[E.jsx(q.TableCell,{align:"center",sx:{width:20},children:E.jsx(q.Box,{sx:{width:12,height:12,backgroundColor:b.color==="url(#greyHatchPattern)"?Dt.greyHatch.background:b.color==="url(#dataMissingHatchPattern)"?Dt.dataMissingHatch.background:b.color==="url(#noLstHatchPattern)"?Dt.noLstHatch.background:b.color,borderRadius:"50%",position:"relative",overflow:"hidden",transition:"transform 0.15s ease",transform:g===b.label?"scale(1.2)":"scale(1)",...b.label==="N/A"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
48
|
-
0deg,
|
|
49
|
-
transparent,
|
|
50
|
-
transparent 3px,
|
|
51
|
-
${Dt.greyHatch.lines} 3px,
|
|
52
|
-
${Dt.greyHatch.lines} 4px
|
|
53
|
-
)`,borderRadius:"50%"}},...b.label==="Data Missing"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
54
|
-
45deg,
|
|
55
|
-
transparent,
|
|
56
|
-
transparent 3px,
|
|
57
|
-
${Dt.dataMissingHatch.lines} 3px,
|
|
58
|
-
${Dt.dataMissingHatch.lines} 4px
|
|
59
|
-
)`,borderRadius:"50%"}},...b.label==="No LST"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`repeating-linear-gradient(
|
|
60
|
-
-45deg,
|
|
61
|
-
transparent,
|
|
62
|
-
transparent 3px,
|
|
63
|
-
${Dt.noLstHatch.lines} 3px,
|
|
64
|
-
${Dt.noLstHatch.lines} 4px
|
|
65
|
-
)`,borderRadius:"50%"}}}})}),E.jsx(q.TableCell,{children:E.jsxs(q.Stack,{direction:"row",alignItems:"center",gap:.5,children:[E.jsx("span",{children:b.label}),Zg[b.label]&&E.jsx(q.Tooltip,{title:Zg[b.label],placement:"right",arrow:!0,children:E.jsx(Qg.InfoOutlined,{sx:{fontSize:".875rem",color:"text.secondary"}})})]})}),E.jsx(q.TableCell,{align:"right",children:b.value}),E.jsxs(q.TableCell,{align:"right",children:[b.percentage,"%"]})]},b.id)})})]})})]})},c2=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timelineEvents:s=[],showTimeline:o=!0,timelineHeight:l=40,timelineOffset:u=35,timeRange:c,showGrid:f=!0,showAxes:h=!0,axisLabelColor:p,axisLabelSize:g=14,enableBrush:d=!1,onTimeRangeChange:m,minAllowedTime:x,maxAllowedTime:y,brushColor:v="#69b3a2",formatDate:_,formatValue:S,markers:w=[],onHoveredDataChange:b,hoveredCategory:M,onTimelineEventHover:A})=>{const[k,C]=G.useState(null),[O,P]=G.useState(null),[F,B]=G.useState([]),L=G.useRef(`sawt-${Math.random().toString(36).substr(2,9)}`),$=G.useCallback(Y=>{C(Y),A==null||A(Y)},[A]);return G.useEffect(()=>{if(!e.current||t.length===0||n.length===0)return;const Y=Ot(e.current),I=r-a.left-a.right,et=i-a.top-a.bottom,K=L.current;Y.selectAll("*").remove();const J=`main-chart-group main-chart-group-${K}`,st=Y.append("g").attr("class",J).attr("transform",`translate(${a.left},${a.top})`),lt=`sawt-clip-${K}`;Y.append("defs").append("clipPath").attr("id",lt).append("rect").attr("x",0).attr("y",0).attr("width",I).attr("height",et);const N=st.append("g").attr("clip-path",`url(#${lt})`),nt=[...t.map(at=>({timestamp:at.timestamp,...at.values}))].sort((at,_t)=>at.timestamp-_t.timestamp),Z=n.map(at=>at.dataKey),R=Yi().keys(Z),z=R(nt),D=t.map(at=>at.timestamp),T=c?c[0]:Math.min(...D),X=c?c[1]:Math.max(...D),Q=Wr().domain([new Date(T),new Date(X)]).range([0,I]),W=nt.filter(at=>at.timestamp>=T&&at.timestamp<=X),ut=R(W),H=ut.length>0?Math.max(...ut[ut.length-1].map(at=>at[1]??0)):0,ot=ri().domain([0,H*1.1]).range([et,0]).nice();f&&(N.append("g").attr("class","grid grid-vertical").attr("opacity",.1).call(qn(Q).ticks(6).tickSize(et).tickFormat(()=>"")),N.append("g").attr("class","grid grid-horizontal").attr("opacity",.1).call(In(ot).ticks(5).tickSize(-I).tickFormat(()=>"")));const gt=as().x(at=>Q(new Date(at.data.timestamp))).y0(at=>ot(at[0])).y1(at=>ot(at[1])).curve(kr),yt=N.append("g").attr("class","areas");z.forEach((at,_t)=>{const dt=n[_t];if(!dt)return;const xt=M===dt.dataKey,Et=M!=null;yt.append("path").datum(at).attr("class",`area area-${dt.dataKey}`).attr("fill",dt.color).attr("fill-opacity",Et?xt?.9:.3:.7).attr("stroke",dt.color).attr("stroke-width",xt?2:1.5).attr("d",gt).on("mouseenter",()=>{const At=W[W.length-1],ee=At?At[dt.dataKey]??0:0;b==null||b({label:dt.label,value:ee,color:dt.color})}).on("mouseleave",()=>{b==null||b(null)})});const vt=w.filter(at=>at.timestamp>=T&&at.timestamp<=X).map(at=>({...at,x:Q(new Date(at.timestamp))}));B(at=>at.length!==vt.length||at.some((_t,dt)=>{var xt,Et;return _t.timestamp!==((xt=vt[dt])==null?void 0:xt.timestamp)||_t.x!==((Et=vt[dt])==null?void 0:Et.x)})?vt:at);let rt=null;if(vt.length>0&&(rt=N.append("g").attr("class","markers"),vt.forEach(at=>{rt.append("line").attr("class","marker-line").attr("data-timestamp",at.timestamp).attr("x1",at.x).attr("x2",at.x).attr("y1",0).attr("y2",et).attr("stroke",at.color??"#131E7A").attr("stroke-width",2).attr("opacity",0)})),h){const _t=qn(Q).ticks(6).tickPadding(12);_&&_t.tickFormat(xt=>_(+xt)),st.append("g").attr("class","axis axis-x").attr("transform",`translate(0,${et})`).call(_t).selectAll("text").attr("font-size",g).attr("fill",p??null);const dt=In(ot).ticks(5);dt.tickFormat(xt=>+xt==0?"":S?S(+xt):String(xt)),st.append("g").attr("class","axis axis-y").call(dt).selectAll("text").attr("font-size",g).attr("fill",p??null)}if(d&&m){const at=pi().extent([[0,0],[I,et]]).on("end",dt=>{if(!dt.selection)return;const[xt,Et]=dt.selection,At=[+Q.invert(xt),+Q.invert(Et)];x!==void 0&&(At[0]=Math.max(At[0],x)),y!==void 0&&(At[1]=Math.min(At[1],y)),m(At),Y.select(".brush").call(at.move,null)}),_t=N.append("g").attr("class","brush").call(at);_t.selectAll(".selection").attr("fill",v).attr("fill-opacity",.2).attr("stroke",v).attr("stroke-width",1),_t.selectAll(".handle").attr("fill",v).attr("fill-opacity",.8),_t.select(".overlay").style("cursor","default")}if(o&&Qa({svg:Y,events:s,xScale:Q,chartHeight:et,chartWidth:I,timelineHeight:l,timelineOffset:u,instanceId:K,setHoveredTimelineEvent:$,enableBrush:d,onTimeRangeChange:m,minAllowedTime:x,maxAllowedTime:y,brushColor:v,mainGroupSelector:`.main-chart-group-${K}`}),vt.length>0&&rt){let at=null,_t;d?_t=N.select(".brush .overlay"):_t=st.append("rect").attr("class","marker-hover-overlay").attr("width",I).attr("height",et).attr("fill","none").attr("pointer-events","all");const dt=rt,xt=At=>{let ee=null,ne=1/0;if(vt.forEach(Vt=>{const Zt=Math.abs(At-Vt.x);Zt<ne&&(ne=Zt,ee=Vt)}),!ee||ne>50)return at!==null&&(at=null,dt.selectAll(".marker-line").attr("opacity",0),P(null)),!1;const ge=ee;return at===ge.timestamp||(at=ge.timestamp,dt.selectAll(".marker-line").attr("opacity",0),dt.selectAll(".marker-line").filter(function(){return Ot(this).attr("data-timestamp")===String(ge.timestamp)}).attr("opacity",.6),P(ge)),!0},Et=function(At){const[ee]=er(At,this);xt(ee)};_t.on("mouseenter",Et),_t.on("mousemove",Et),_t.on("mouseleave",function(){at=null,dt.selectAll(".marker-line").attr("opacity",0),P(null)})}return()=>{Y.selectAll("*").remove()}},[e,t,n,r,i,a,s,o,l,u,c,f,h,p,g,d,m,x,y,v,_,S,w,b,M,$]),{hoveredTimelineEvent:k,hoveredMarker:O,visibleMarkers:F}},f2=({data:e,categories:t,timelineEvents:n=[],showTimeline:r=!0,timelineHeight:i=40,timelineOffset:a,width:s=900,height:o=400,margin:l={top:10,right:30,bottom:40,left:60},showGrid:u=!0,showAxes:c=!0,axisLabelColor:f,axisLabelSize:h=14,formatDate:p,formatValue:g,timeRange:d,enableBrush:m=!1,onTimeRangeChange:x,minAllowedTime:y,maxAllowedTime:v,brushColor:_="#69b3a2",markers:S=[],onHoveredDataChange:w,hoveredCategory:b,onTimelineEventHover:M})=>{const A=G.useRef(null),k=12,O=a??6+k+h+k,P=r?o+i+O:o,{hoveredTimelineEvent:F,hoveredMarker:B,visibleMarkers:L}=c2({containerRef:A,data:e,categories:t,width:s,height:o,margin:l,timelineEvents:n,showTimeline:r,timelineHeight:i,timelineOffset:O,timeRange:d,showGrid:u,showAxes:c,axisLabelColor:f,axisLabelSize:h,enableBrush:m,onTimeRangeChange:x,minAllowedTime:y,maxAllowedTime:v,brushColor:_,formatDate:p,formatValue:g,markers:S,onHoveredDataChange:w,hoveredCategory:b,onTimelineEventHover:M});return E.jsxs(q.Box,{sx:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:[E.jsx("svg",{ref:A,viewBox:`0 0 ${s} ${P}`,preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"auto",display:"block"}}),L.map($=>{const Y=($.x+l.left)/s*100,I=l.top/P*100,et=new Date($.timestamp),K=p?p($.timestamp):et.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),J=E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:$.label?.5:0},children:K}),$.label&&E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:$.label})]});return E.jsx(q.Tooltip,{title:J,open:(B==null?void 0:B.timestamp)===$.timestamp,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${Y}%`,top:`${I}%`,width:"1px",height:`${(o-l.top-l.bottom)/P*100}%`,pointerEvents:"none"}})},$.timestamp)}),F&&r&&!B&&E.jsx(q.Tooltip,{title:E.jsxs(q.Box,{children:[E.jsx(q.Box,{sx:{color:"#B6BFFF",fontFamily:"monospace",fontSize:"0.8125rem",mb:.5},children:p?p(F.timestamp):new Date(F.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}),E.jsx(q.Box,{sx:{color:"white",fontWeight:500},children:F.eventName})]}),open:!0,placement:"top",arrow:!0,slotProps:{tooltip:{sx:{bgcolor:"#131E7A",fontSize:"0.875rem",px:2,py:1,borderRadius:1,boxShadow:"0px 2px 8px rgba(0,0,0,0.15)","& .MuiTooltip-arrow":{color:"#131E7A"}}},popper:{sx:{pointerEvents:"none"}}},children:E.jsx(q.Box,{sx:{position:"absolute",left:`${(F.x+l.left)/s*100}%`,top:`${(o+O+i/2)/P*100}%`,width:"1px",height:"1px",pointerEvents:"none"}})})]})},bn={colors:{primary:"#992FB9",background:"#FFFFFF",border:"#9CA3AF",highlightBackground:"rgba(31, 41, 55, 0.14)",monthLabel:"#9ca3af",tooltipText:"#6b7280"},dimensions:{height:32,eventWidth:2}},h2=(e="#4B5563")=>({startHandle:{sx:{position:"absolute",left:"-6px",top:"-10px",width:"14px",height:"calc(100% + 10px)",zIndex:3,display:"flex",justifyContent:"center",transition:"opacity 0.2s","&::before":{content:'""',position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:`8px solid ${e}`,transition:"border-top-color 0.2s",pointerEvents:"none"},"&::after":{content:'""',position:"absolute",top:"8px",left:"50%",transform:"translateX(-50%)",width:"2px",height:"calc(100% - 8px)",backgroundColor:e,transition:"background-color 0.2s",pointerEvents:"none"},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}},endHandle:{sx:{position:"absolute",right:"-6px",top:"-10px",width:"14px",height:"calc(100% + 10px)",zIndex:3,display:"flex",justifyContent:"center",transition:"opacity 0.2s","&::before":{content:'""',position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:`8px solid ${e}`,transition:"border-top-color 0.2s",pointerEvents:"none"},"&::after":{content:'""',position:"absolute",top:"8px",left:"50%",transform:"translateX(-50%)",width:"2px",height:"calc(100% - 8px)",backgroundColor:e,transition:"background-color 0.2s",pointerEvents:"none"},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}}}),gn={header:{sx:{}},title:{sx:{m:0}},instructions:{sx:{color:"text.secondary",minHeight:"40px",display:"flex",alignItems:"center"}},monthLabelsContainer:{sx:{justifyContent:"space-between",px:1.25,height:"20px",fontSize:"11px",color:bn.colors.monthLabel,mb:1}},monthLabel:{sx:{fontSize:"11px"}},timeline:{sx:{position:"relative",height:`${bn.dimensions.height}px`,backgroundColor:bn.colors.background,borderRadius:0,overflow:"visible",border:`1px solid ${bn.colors.border}`}},event:{sx:{position:"absolute",top:0,width:`${bn.dimensions.eventWidth}px`,height:"100%",backgroundColor:bn.colors.primary,cursor:"pointer",transition:"transform 0.2s",transformOrigin:"center"}},selection:{sx:{position:"absolute",top:0,height:"100%",backgroundColor:bn.colors.highlightBackground,pointerEvents:"none"}},tooltip:{sx:{position:"absolute",bottom:"-40px",backgroundColor:"white",p:"6px 10px",borderRadius:.5,boxShadow:"0 2px 8px rgba(0,0,0,0.15)",whiteSpace:"nowrap",pointerEvents:"none",zIndex:10,border:`1px solid ${bn.colors.border}`}},tooltipEventName:{sx:{fontWeight:600}},tooltipDate:{sx:{color:bn.colors.tooltipText,fontSize:"11px"}}},p2=(e="#9CA3AF")=>({startHandle:{sx:{position:"absolute",left:"-8px",top:0,width:"20px",height:"100%",zIndex:3,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 0.2s","&::before":{content:'""',position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",width:"1px",height:"100%",backgroundColor:e,transition:"background-color 0.2s",pointerEvents:"none"},"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"9px",height:"16px",backgroundColor:"#F9FAFB",border:`1px solid ${e}`,transition:"border-color 0.2s, background-color 0.2s",pointerEvents:"none",backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:"35% center, 65% center",backgroundSize:"1px 50%, 1px 50%",backgroundRepeat:"no-repeat"},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}},endHandle:{sx:{position:"absolute",right:"-8px",top:0,width:"20px",height:"100%",zIndex:3,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 0.2s","&::before":{content:'""',position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",width:"1px",height:"100%",backgroundColor:e,transition:"background-color 0.2s",pointerEvents:"none"},"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"9px",height:"16px",backgroundColor:"#F9FAFB",border:`1px solid ${e}`,transition:"border-color 0.2s, background-color 0.2s",pointerEvents:"none",backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:"35% center, 65% center",backgroundSize:"1px 50%, 1px 50%",backgroundRepeat:"no-repeat"},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}}}),d2=()=>{var e,t;try{return((t=(e=globalThis.process)==null?void 0:e.env)==null?void 0:t.NODE_ENV)==="development"}catch{return!1}},g2=({events:e,selectedRange:t,onSelectionChange:n,enableZoom:r,zoomToSelection:i,visibleRange:a,onVisibleRangeChange:s})=>{d2()&&e.length>1&&(e.every((j,nt)=>nt===0||j.timestamp>=e[nt-1].timestamp)||console.warn("TimelineChart: events array should be sorted by timestamp for optimal performance and correct behavior."));const[o,l]=G.useState(!1),[u,c]=G.useState(null),[f,h]=G.useState(null),[p,g]=G.useState({start:null,end:null}),[d,m]=G.useState({start:null,end:null}),[x,y]=G.useState(null),v=G.useRef(null),_=t??p,S=a??d,w=G.useMemo(()=>{var N;return e.length>0?((N=e[0])==null?void 0:N.timestamp)??0:0},[e]),b=G.useMemo(()=>{var N;return e.length>0?((N=e[e.length-1])==null?void 0:N.timestamp)??0:0},[e]),M=G.useMemo(()=>i&&S.start&&S.end?S.start:w,[i,S,w]),A=G.useMemo(()=>i&&S.start&&S.end?S.end:b,[i,S,b]),k=G.useMemo(()=>A-M,[A,M]),C=G.useMemo(()=>!r&&_.start!==null&&_.end!==null,[r,_]),O=G.useCallback(N=>k===0?0:(N-M)/k*100,[M,k]),P=G.useCallback((N,j)=>{const nt=N/j*100;return M+nt/100*k},[M,k]),F=G.useCallback(N=>{t===void 0&&g(N),n==null||n(N)},[t,n]),B=G.useCallback(N=>{const j=N.currentTarget.getBoundingClientRect(),nt=N.clientX-j.left,Z=P(nt,j.width);l(!0),c(Z),F({start:Z,end:Z})},[P,F]),L=G.useCallback(N=>{if(!o||u===null)return;const j=N.currentTarget.getBoundingClientRect(),nt=N.clientX-j.left,Z=P(nt,j.width);if(f==="start"){const R=Math.min(Z,_.end-k*.01);F({start:Math.max(R,M),end:_.end})}else if(f==="end"){const R=Math.max(Z,_.start+k*.01);F({start:_.start,end:Math.min(R,A)})}else if(f==="body"){const R=Z-u,z=_.end-_.start;let D=_.start+R,T=_.end+R;D<M&&(D=M,T=M+z),T>A&&(T=A,D=A-z),F({start:D,end:T}),c(Z)}else F({start:Math.min(u,Z),end:Math.max(u,Z)})},[o,u,f,_,k,M,A,P,F]),$=G.useCallback(()=>{const N=o;if(l(!1),h(null),N&&i&&_.start&&_.end&&_.start!==_.end){const j={start:_.start,end:_.end};a===void 0&&m(j),s==null||s(j)}},[o,i,_,a,s]);G.useEffect(()=>{if(!o||u===null||!v.current)return;const N=nt=>{const Z=v.current;if(!Z)return;const R=Z.getBoundingClientRect(),z=nt.clientX-R.left,D=P(z,R.width);if(f==="start"){const T=Math.min(D,_.end-k*.01);F({start:Math.max(T,M),end:_.end})}else if(f==="end"){const T=Math.max(D,_.start+k*.01);F({start:_.start,end:Math.min(T,A)})}else if(f==="body"){const T=D-u,X=_.end-_.start;let Q=_.start+T,W=_.end+T;Q<M&&(Q=M,W=M+X),W>A&&(W=A,Q=A-X),F({start:Q,end:W}),c(D)}else F({start:Math.min(u,D),end:Math.max(u,D)})},j=()=>{$()};return document.addEventListener("mousemove",N),document.addEventListener("mouseup",j),()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",j)}},[o,u,f,_,k,M,A,P,F,$]);const Y=G.useCallback(N=>{N.stopPropagation(),_.start!==null&&(l(!0),c(_.start),h("start"))},[_]),I=G.useCallback(N=>{N.stopPropagation(),_.end!==null&&(l(!0),c(_.end),h("end"))},[_]),et=G.useCallback(N=>{N.stopPropagation();const j=v.current;if(!j)return;const nt=j.getBoundingClientRect(),Z=N.clientX-nt.left,R=P(Z,nt.width);l(!0),c(R),h("body")},[P]),K=G.useCallback(N=>{if(N.cancelable&&r&&N.preventDefault(),!r||!_.start||!_.end||k===0)return;const j=(_.start+_.end)/2,nt=_.end-_.start,Z=N.deltaY>0?1.1:.9,R=Math.max(nt*Z,k*.01),z=k*1.5,D=Math.min(R,z);let T=j-D/2,X=j+D/2;T<M&&(T=M,X=Math.min(M+D,A)),X>A&&(X=A,T=Math.max(A-D,M)),F({start:T,end:X})},[r,_,k,M,A,F]),J=G.useCallback(()=>!_.start||!_.end?[]:e.filter(N=>N.timestamp>=_.start&&N.timestamp<=_.end),[e,_]),st=G.useCallback(()=>{const N={start:w,end:b};a===void 0&&m({start:null,end:null}),s==null||s(N)},[w,b,a,s]),lt=G.useCallback(()=>{i&&st()},[i,st]);return{isDragging:o,dragStart:u,dragHandleType:f,internalSelectedRange:_,internalVisibleRange:S,hoveredEvent:x,minDate:M,maxDate:A,timeSpan:k,timelineContainerRef:v,getPositionFromTimestamp:O,getTimestampFromPosition:P,handleMouseDown:B,handleMouseMove:L,handleMouseUp:$,handleWheel:K,handleDoubleClick:lt,handleStartHandleMouseDown:Y,handleEndHandleMouseDown:I,handleSelectionBodyMouseDown:et,setHoveredEvent:y,getEventsInRange:J,resetZoom:st,showHandles:C}},m2=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),y2=e=>new Date(e).toLocaleDateString("en-US",{month:"short",year:"numeric"}),_2=e=>{const t=e/864e5;return t>60?n=>new Date(n).toLocaleDateString("en-US",{month:"short",year:"numeric"}):t>7?n=>new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric"}):n=>new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",hour12:!0})},x2=()=>{var e,t;try{return((t=(e=globalThis.process)==null?void 0:e.env)==null?void 0:t.NODE_ENV)==="development"}catch{return!1}},v2=(e,t="arrow",n)=>{const r=t==="grip"?p2(n||"#9CA3AF"):h2(n||"#4B5563");return{header:{...gn.header,...e==null?void 0:e.header},title:{...gn.title,...e==null?void 0:e.title},instructions:{...gn.instructions,...e==null?void 0:e.instructions},monthLabelsContainer:{...gn.monthLabelsContainer,...e==null?void 0:e.monthLabelsContainer},monthLabel:{...gn.monthLabel,...e==null?void 0:e.monthLabel},timeline:{...gn.timeline,...e==null?void 0:e.timeline},event:{...gn.event,...e==null?void 0:e.event},selection:{...gn.selection,...e==null?void 0:e.selection},startHandle:{...r.startHandle,...e==null?void 0:e.startHandle},endHandle:{...r.endHandle,...e==null?void 0:e.endHandle},tooltip:{...gn.tooltip,...e==null?void 0:e.tooltip},tooltipEventName:{...gn.tooltipEventName,...e==null?void 0:e.tooltipEventName},tooltipDate:{...gn.tooltipDate,...e==null?void 0:e.tooltipDate}}},b2=({events:e,onSelectionChange:t,selectedRange:n,height:r=bn.dimensions.height,margin:i={top:0,right:0,bottom:0,left:0},formatDate:a=m2,formatMonthYear:s=y2,showMonthLabels:o=!0,monthLabelCount:l=6,enableZoom:u=!0,dragHandleVariant:c="arrow",dragHandleColor:f,showHeader:h=!0,title:p="Event Timeline Selector",zoomToSelection:g=!1,visibleRange:d,onVisibleRangeChange:m,timeRange:x,onTimeRangeChange:y,slotProps:v})=>{const _=x?{start:x[0],end:x[1]}:d,S=y?N=>{N.start!==null&&N.end!==null&&y([N.start,N.end])}:m;x2()&&e.length>500&&console.warn(`TimelineChart: Rendering ${e.length} events may impact performance. Consider implementing virtualization or canvas rendering for datasets larger than 500 events.`);const w=G.useMemo(()=>v2(v,c,f),[v,c,f]),{isDragging:b,dragHandleType:M,internalSelectedRange:A,hoveredEvent:k,minDate:C,timeSpan:O,timelineContainerRef:P,getPositionFromTimestamp:F,handleMouseDown:B,handleWheel:L,handleDoubleClick:$,handleStartHandleMouseDown:Y,handleEndHandleMouseDown:I,handleSelectionBodyMouseDown:et,setHoveredEvent:K,getEventsInRange:J,showHandles:st}=g2({events:e,selectedRange:n,onSelectionChange:t,enableZoom:u,zoomToSelection:g,visibleRange:_,onVisibleRangeChange:S}),lt=A.start&&A.end?`Selected: ${a(A.start)} - ${a(A.end)} (${J().length} events)`:"Click and drag on the timeline below to select a date range. Use mouse wheel to zoom in/out.";return E.jsxs(q.Stack,{sx:{width:"100%"},children:[h&&E.jsxs(q.Stack,{spacing:1,sx:{mb:3},...w.header,children:[E.jsx(q.Typography,{variant:"h5",...w.title,children:p}),E.jsx(q.Typography,{variant:"body2",...w.instructions,children:lt})]}),o&&E.jsx(q.Stack,{direction:"row",...w.monthLabelsContainer,sx:{...w.monthLabelsContainer.sx,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:Array.from({length:l},(N,j)=>{const nt=C+O/(l-1)*j,Z=_2(O);return E.jsx(q.Typography,{variant:"caption",...w.monthLabel,children:Z(nt)},j)})}),E.jsxs(q.Box,{...w.timeline,sx:{...w.timeline.sx,height:`${r}px`,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:[E.jsx(q.Box,{sx:{position:"absolute",top:i.top,left:0,right:0,bottom:i.bottom},children:e.map((N,j)=>{const nt=F(N.timestamp);return E.jsx(q.Box,{onMouseEnter:()=>K(N),onMouseLeave:()=>K(null),"aria-label":`Event: ${N.eventName} at ${a(N.timestamp)}`,...w.event,sx:{...w.event.sx,left:`${nt}%`,transform:(k==null?void 0:k.timestamp)===N.timestamp?"scaleX(2)":"scaleX(1)"}},`${N.timestamp}-${j}`)})}),A.start&&A.end&&(!g||b)&&E.jsx(q.Box,{...w.selection,onMouseDown:st&&!b?et:void 0,sx:{...w.selection.sx,left:`${F(A.start)}%`,width:`${F(A.end)-F(A.start)}%`,pointerEvents:st?"all":"none",zIndex:2,cursor:st&&!b?M==="body"?"grabbing":"grab":"default"},children:st&&!(b&&M===null)&&E.jsxs(E.Fragment,{children:[E.jsx(q.Box,{...w.startHandle,onMouseDown:Y,sx:{...w.startHandle.sx,cursor:"ew-resize",opacity:b&&M!=="start"?.5:1},"aria-label":"Drag to adjust start of selection"}),E.jsx(q.Box,{...w.endHandle,onMouseDown:I,sx:{...w.endHandle.sx,cursor:"ew-resize",opacity:b&&M!=="end"?.5:1},"aria-label":"Drag to adjust end of selection"})]})}),E.jsx(q.Box,{ref:P,role:"application","aria-label":"Interactive timeline - click and drag to select date range","aria-describedby":h?void 0:"timeline-instructions",tabIndex:0,sx:{position:"absolute",top:0,left:0,right:0,height:"100%",cursor:"crosshair",pointerEvents:"all",zIndex:1},onMouseDown:B,onWheel:L,onDoubleClick:$}),!h&&E.jsx("span",{id:"timeline-instructions",style:{display:"none"},children:lt}),k&&E.jsxs(q.Box,{role:"tooltip","aria-live":"polite",...w.tooltip,sx:{...w.tooltip.sx,left:`${F(k.timestamp)}%`,transform:"translateX(-50%)"},children:[E.jsx(q.Typography,{variant:"body2",...w.tooltipEventName,children:k.eventName}),E.jsx(q.Typography,{variant:"caption",...w.tooltipDate,children:a(k.timestamp)})]})]})]})},w2="#8b5cf6",S2=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),T2=({events:e,title:t="Events in Selected Range",maxHeight:n="200px",formatDate:r=S2,primaryColor:i=w2})=>e.length===0?null:E.jsxs("div",{style:{marginTop:"24px",padding:"20px",backgroundColor:"#f9fafb",borderRadius:"8px",border:"1px solid #e5e7eb"},children:[E.jsxs("h3",{style:{margin:"0 0 12px 0",fontSize:"16px",color:"#374151"},children:[t," (",e.length,")"]}),E.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:"8px",maxHeight:n,overflowY:"auto"},children:e.map((a,s)=>E.jsxs("div",{style:{padding:"8px 12px",backgroundColor:"white",borderRadius:"4px",fontSize:"13px",border:"1px solid #e5e7eb"},children:[E.jsx("div",{style:{fontWeight:500,color:i},children:a.eventName}),E.jsx("div",{style:{color:"#6b7280",fontSize:"12px",marginTop:"2px"},children:r(a.timestamp)})]},`${a.timestamp}-${s}`))})]});function M2(e,t){const n=t-1-e,r=Li.length,i=Math.floor(n/Math.max(1,t-1)*(r-1)),a=Math.min(Math.max(0,i),r-1);return Li[a]??Li[0]??"#000000"}function qy(e){return Array.from({length:e},(t,n)=>M2(n,e))}const Br=qy(5),Pn={critical:"#dc3545",high:"#fd7e14",medium:"#ffc107",low:"#17a2b8",complete:pn.neoDigitalGreen[600],inProgress:"#007bff",farthest:Br[0],far:Br[1],close:Br[2],closest:Br[3],completed:Br[4],primary:"#007bff",secondary:"#6c757d",success:pn.neoDigitalGreen[600],danger:"#dc3545",warning:"#ffc107",info:"#17a2b8",light:pn.neoGrey[200],dark:"#343a40"},A2={migration:Br,severity:[Pn.critical,Pn.high,Pn.medium,Pn.low,Pn.info],status:[Pn.danger,Pn.warning,Pn.success],extended:["#e74c3c","#e67e22","#f39c12","#2ecc71","#3498db","#9b59b6","#1abc9c","#95a5a6"],colorblindSafe:["#0173B2","#DE8F05","#029E73","#CC78BC","#CA9161","#FBAFE4","#949494","#ECE133"]},k2={FARTHEST:"Farthest",FAR:"Far",CLOSE:"Close",CLOSEST:"Closest",COMPLETE:"Complete",CRITICAL:"Critical",HIGH:"High",MEDIUM:"Medium",LOW:"Low",INFO:"Info",NOT_APPLICABLE:"N/A",NO_LST:"No LST",DATA_MISSING:"Data Missing"};exports.CAMPAIGN_DATA_MISSING=Ui;exports.CAMPAIGN_NOT_APPLICABLE=zi;exports.CAMPAIGN_NO_LST=Bi;exports.CATEGORY_LABELS=k2;exports.ChronoChart=sy;exports.ChronoPerspectiveChart=sy;exports.D3StackedAreaChart=MT;exports.D3StackedBarChart=kT;exports.DEFAULT_CHART_COLORS=pn;exports.DEFAULT_CHART_CONFIG=Pe;exports.DEFAULT_STACKED_AREA_COLORS=Pn;exports.MEASURE_GRADIENT_COLORS=Li;exports.MODERNE_VULNERABILITY_COLORS=Jr;exports.MorphChart=G0;exports.ParliamentChart=u2;exports.STACKED_AREA_PALETTES=A2;exports.StackedAreaWithTimeline=f2;exports.TimelineChart=b2;exports.TimelineSelectedEvents=T2;exports.calculateDataSeries=Ny;exports.calculateOptimalArcAngle=df;exports.calculateOptimalSeatSize=gf;exports.generateMeasureGradient=qy;
|
|
5
|
+
${e.color} 4px,
|
|
6
|
+
${e.color} 8px
|
|
7
|
+
)`}}}),(0,f.jsx)(u.Typography,{variant:`body2`,children:e.label})]},e.dataKey))})]})},Dh=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timeRange:o,showGrid:s=!0,showXAxis:c=!0,showYAxis:l=!0,enableBrush:u=!1,zoomToSelection:f=!1,onTimeRangeChange:p,formatDate:m,formatValue:h,showCrosshair:g=!0,brushColor:_=`#69b3a2`,onTooltipChange:v,minBarWidth:y,onCrosshairPositionChange:b})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=K(e.current),x=r-a.left-a.right,S=i-a.top-a.bottom;d.selectAll(`*`).remove();let C=d.append(`g`).attr(`transform`,`translate(${a.left},${a.top})`),w=`d3-bar-clip-${Math.random().toString(36).substr(2,9)}`;d.append(`defs`).append(`clipPath`).attr(`id`,w).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,x).attr(`height`,S);let T=C.append(`g`).attr(`clip-path`,`url(#${w})`),E=[...t].sort((e,t)=>e.timestamp-t.timestamp),D=n.map(e=>e.dataKey),O=Cl().keys(D),k=O(E),A=t.map(e=>e.timestamp),j=o?o[0]:Math.min(...A),M=o?o[1]:Math.max(...A),N=tl().domain([new Date(j),new Date(M)]).range([0,x]),P=O(E.filter(e=>e.timestamp>=j&&e.timestamp<=M)),F=P.length>0?Math.max(...P[P.length-1].map(e=>e[1]??0)):0,I=Lo().domain([0,F*1.1]).range([S,0]).nice();s&&(T.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(te(N).ticks(6).tickSize(S).tickFormat(()=>``)),T.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(ne(I).ticks(5).tickSize(-x).tickFormat(()=>``)));let L=T.append(`g`).attr(`class`,`bars`),R=[];k.forEach((e,t)=>{let r=n[t];r&&e.forEach((e,n)=>{let i=E[n];if(!i)return;let a=i.timestamp,o=E[n+1],s=o?o.timestamp:M;if(s<j||a>M)return;let c=Math.max(a,j),l=Math.min(s,M),u=N(new Date(c)),d=N(new Date(l))-u;if(d<=0)return;let f=I(e[0]),p=I(e[1]),m=f-p;if(m<=0)return;let h=e[1]-e[0];R.push({barIndex:n,categoryIndex:t,category:r,x:u,width:d,y:p,height:m,value:h,startTime:a,endTime:s})})});let z=M-j>2160*60*60*1e3?2:0,B=y===void 0?z:y;L.selectAll(`.bar-segment`).data(R).enter().append(`rect`).attr(`class`,`bar-segment`).attr(`data-bar-index`,e=>e.barIndex).attr(`data-category-index`,e=>e.categoryIndex).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>Math.max(B,e.width-1)).attr(`height`,e=>e.height).attr(`fill`,e=>e.category.color).attr(`fill-opacity`,e=>e.category.fillOpacity??.8).attr(`pointer-events`,`none`);let V=(e,t)=>{let[n,r]=on(e,t);g&&b&&b({x:n+a.left,y:r+a.top});let i=R.find(e=>n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height);i&&v?v({visible:!0,x:n+a.left,y:r+a.top,category:{label:i.category.label,color:i.category.color},value:i.value,startTime:i.startTime,endTime:i.endTime}):v&&v(null)},H=()=>{b&&b(null),v&&v(null)};if(u&&p){let e=Ia().extent([[0,0],[x,S]]).on(`brush`,()=>{}).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection;p([+N.invert(n),+N.invert(r)]),f&&d.select(`.brush`).call(e.move,null)}),t=C.append(`g`).attr(`class`,`brush`).call(e);t.selectAll(`.selection`).attr(`fill`,_).attr(`fill-opacity`,.3).attr(`stroke`,_).attr(`stroke-width`,2),t.selectAll(`.handle`).attr(`fill`,_).attr(`fill-opacity`,.8),t.select(`.overlay`).style(`cursor`,`default`),t.select(`.overlay`).on(`mousemove`,function(e){V(e,this)}).on(`mouseleave`,H)}else{let e=T.append(`rect`).attr(`class`,`mouse-overlay`).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`pointer-events`,`all`);e.on(`mousemove`,function(e){V(e,this)}),e.on(`mouseleave`,H)}if(d.on(`mouseleave`,()=>{b&&b(null),v&&v(null)}),c){let e=te(N).ticks(6);m&&e.tickFormat(e=>m(+e)),C.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${S})`).call(e).selectAll(`text`).attr(`font-size`,11)}if(l){let e=ne(I).ticks(5);h&&e.tickFormat(e=>h(+e)),C.append(`g`).attr(`class`,`axis axis-y`).call(e).selectAll(`text`).attr(`font-size`,11)}return()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b])},Oh=({data:e,categories:t,title:n,subtitle:r,showHeader:i=!0,showLegend:a=!0,showTooltip:o=!0,width:s=800,height:c=400,margin:l={top:20,right:30,bottom:40,left:60},timeRange:p,showGrid:m=!0,showAxes:h=!0,showXAxis:g,showYAxis:_,formatDate:v,formatValue:y,onTimeRangeChange:b,enableBrush:x=!1,zoomToSelection:S=!1,brushColor:C=`#69b3a2`,showCrosshair:w=!0,crosshairColor:T=`#666`,crosshairDashArray:E=`4,4`,minBarWidth:D,tooltipScale:O=1,usePortalTooltip:k=!1,tooltipAnchor:A=`cursor`})=>{let j=(0,d.useRef)(null),M=(0,d.useRef)(null),[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(null);return Dh({containerRef:j,data:e,categories:t,width:s,height:c,margin:l,timeRange:p,showGrid:m,showXAxis:g===void 0?h:g,showYAxis:_===void 0?h:_,enableBrush:x,zoomToSelection:S,onTimeRangeChange:b,formatDate:v,formatValue:y,showCrosshair:w,brushColor:C,onTooltipChange:o?P:void 0,minBarWidth:D,onCrosshairPositionChange:w?I:void 0}),(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:2},children:[i&&(n||r)&&(0,f.jsxs)(u.Stack,{spacing:.5,sx:{mb:2,width:`100%`,alignItems:`center`},children:[n&&(0,f.jsx)(u.Typography,{variant:`h5`,sx:{fontWeight:500},children:n}),r&&(0,f.jsx)(u.Typography,{variant:`body2`,sx:{color:`text.secondary`},children:r})]}),(0,f.jsxs)(u.Box,{ref:M,sx:{width:`100%`,display:`flex`,justifyContent:`center`,alignItems:`flex-start`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:j,viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,display:`block`}}),w&&F&&(0,f.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:`xMidYMid meet`,style:{position:`absolute`,top:0,left:0,right:0,width:`100%`,maxWidth:`1200px`,minWidth:`400px`,height:`auto`,pointerEvents:`none`,margin:`0 auto`},children:[(0,f.jsx)(`line`,{x1:F.x,y1:l.top,x2:F.x,y2:c-l.bottom,stroke:T,strokeDasharray:E,strokeWidth:1}),(0,f.jsx)(`line`,{x1:l.left,y1:F.y,x2:s-l.right,y2:F.y,stroke:T,strokeDasharray:E,strokeWidth:1})]}),o&&N&&(0,f.jsxs)(wh,{visible:N.visible,x:N.x,y:N.y,containerRef:M,viewBoxWidth:s,viewBoxHeight:c,usePortal:k,scale:O,flipThreshold:s/2,anchorPosition:A,chartTopMargin:l.top,children:[(0,f.jsx)(u.Typography,{sx:{fontFamily:`monospace`,fontSize:`${.875*O}rem`,color:`text.secondary`,mb:1.5*O},children:(e=>{if(v)return v(e);let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`})(N.startTime)}),(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1.5*O,children:[(0,f.jsx)(u.Box,{sx:{width:5*O,backgroundColor:N.category.color,borderRadius:1,flexShrink:0}}),(0,f.jsxs)(u.Stack,{children:[(0,f.jsx)(u.Typography,{sx:{fontWeight:700,fontSize:`${1.125*O}rem`,lineHeight:1.3},children:N.category.label}),(0,f.jsx)(u.Typography,{sx:{fontSize:`${1*O}rem`,color:`text.primary`,textDecoration:`underline`,textDecorationColor:`rgba(0,0,0,0.2)`,textUnderlineOffset:`3px`},children:y?y(N.value):N.value.toLocaleString()})]})]})]})]}),a&&(0,f.jsx)(u.Stack,{direction:`row`,spacing:3,sx:{flexWrap:`wrap`,justifyContent:`center`,gap:2},children:t.map(e=>(0,f.jsxs)(u.Stack,{direction:`row`,spacing:1,alignItems:`center`,sx:{cursor:`pointer`,"&:hover":{opacity:.7}},children:[(0,f.jsx)(u.Box,{sx:{width:16,height:16,backgroundColor:e.color,opacity:e.fillOpacity??.8,border:`1px solid ${e.color}`,borderRadius:`2px`}}),(0,f.jsx)(u.Typography,{variant:`body2`,children:e.label})]},e.dataKey))})]})},kh=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Ah=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ah.prototype.normal={},Ah.prototype.property={},Ah.prototype.space=void 0;function jh(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ah(n,r,t)}function Mh(e){return e.toLowerCase()}var Nh=class{constructor(e,t){this.attribute=t,this.property=e}};Nh.prototype.attribute=``,Nh.prototype.booleanish=!1,Nh.prototype.boolean=!1,Nh.prototype.commaOrSpaceSeparated=!1,Nh.prototype.commaSeparated=!1,Nh.prototype.defined=!1,Nh.prototype.mustUseProperty=!1,Nh.prototype.number=!1,Nh.prototype.overloadedBoolean=!1,Nh.prototype.property=``,Nh.prototype.spaceSeparated=!1,Nh.prototype.space=void 0;var Ph=s({boolean:()=>Z,booleanish:()=>Ih,commaOrSpaceSeparated:()=>zh,commaSeparated:()=>Rh,number:()=>Q,overloadedBoolean:()=>Lh,spaceSeparated:()=>$}),Fh=0,Z=Bh(),Ih=Bh(),Lh=Bh(),Q=Bh(),$=Bh(),Rh=Bh(),zh=Bh();function Bh(){return 2**++Fh}var Vh=Object.keys(Ph),Hh=class extends Nh{constructor(e,t,n,r){let i=-1;if(super(e,t),Uh(this,`space`,r),typeof n==`number`)for(;++i<Vh.length;){let e=Vh[i];Uh(this,Vh[i],(n&Ph[e])===Ph[e])}}};Hh.prototype.defined=!0;function Uh(e,t,n){n&&(e[t]=n)}function Wh(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Hh(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Mh(r)]=r,n[Mh(a.attribute)]=r}return new Ah(t,n,e.space)}var Gh=Wh({properties:{ariaActiveDescendant:null,ariaAtomic:Ih,ariaAutoComplete:null,ariaBusy:Ih,ariaChecked:Ih,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:Ih,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:Ih,ariaFlowTo:$,ariaGrabbed:Ih,ariaHasPopup:null,ariaHidden:Ih,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:Q,ariaLive:null,ariaModal:Ih,ariaMultiLine:Ih,ariaMultiSelectable:Ih,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Ih,ariaReadOnly:Ih,ariaRelevant:null,ariaRequired:Ih,ariaRoleDescription:$,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Ih,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Kh(e,t){return t in e?e[t]:t}function qh(e,t){return Kh(e,t.toLowerCase())}var Jh=Wh({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Rh,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:$,autoFocus:Z,autoPlay:Z,blocking:$,capture:null,charSet:null,checked:Z,cite:null,className:$,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:Ih,controls:Z,controlsList:$,coords:Q|Rh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Lh,draggable:Ih,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:$,height:Q,hidden:Lh,high:Q,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:$,itemRef:$,itemScope:Z,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:$,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:$,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:$,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Ih,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:Ih,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Ih,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:Rh,part:$,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:qh}),Yh=Wh({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:zh,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:$,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Rh,g2:Rh,glyphName:Rh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:zh,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zh,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zh,rev:zh,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zh,requiredFeatures:zh,requiredFonts:zh,requiredFormats:zh,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:zh,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zh,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zh,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Kh}),Xh=Wh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Zh=Wh({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:qh}),Qh=Wh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),$h=/[A-Z]/g,eg=/-[a-z]/g,tg=/^data[-\w.:]+$/i;function ng(e,t){let n=Mh(t),r=t,i=Nh;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&tg.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(eg,ig);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!eg.test(e)){let n=e.replace($h,rg);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Hh}return new i(r,t)}function rg(e){return`-`+e.toLowerCase()}function ig(e){return e.charAt(1).toUpperCase()}var ag=jh([Gh,Jh,Xh,Zh,Qh],`html`),og=jh([Gh,Yh,Xh,Zh,Qh],`svg`),sg={}.hasOwnProperty;function cg(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&sg.call(t,e)){let n=String(t[e]);i=sg.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var lg=/["&'<>`]/g,ug=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,dg=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,fg=/[|\\{}()[\]^$+*?.]/g,pg=new WeakMap;function mg(e,t){if(e=e.replace(t.subset?hg(t.subset):lg,r),t.subset||t.escapeOnly)return e;return e.replace(ug,n).replace(dg,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function hg(e){let t=pg.get(e);return t||(t=gg(e),pg.set(e,t)),t}function gg(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(fg,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var _g=/[\dA-Fa-f]/;function vg(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!_g.test(String.fromCharCode(t))?r:r+`;`}var yg=/\d/;function bg(e,t,n){let r=`&#`+String(e);return n&&t&&!yg.test(String.fromCharCode(t))?r:r+`;`}var xg=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Sg={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Cg=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],wg={}.hasOwnProperty,Tg={},Eg;for(Eg in Sg)wg.call(Sg,Eg)&&(Tg[Sg[Eg]]=Eg);var Dg=/[^\dA-Za-z]/;function Og(e,t,n,r){let i=String.fromCharCode(e);if(wg.call(Tg,i)){let e=Tg[i],a=`&`+e;return n&&xg.includes(e)&&!Cg.includes(e)&&(!r||t&&t!==61&&Dg.test(String.fromCharCode(t)))?a:a+`;`}return``}function kg(e,t,n){let r=vg(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Og(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=bg(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ag(e,t){return mg(e,Object.assign({format:kg},t))}var jg=/^>|^->|<!--|-->|--!>|<!-$/g,Mg=[`>`],Ng=[`<`,`>`];function Pg(e,t,n,r){return r.settings.bogusComments?`<?`+Ag(e.value,Object.assign({},r.settings.characterReferences,{subset:Mg}))+`>`:`<!--`+e.value.replace(jg,i)+`-->`;function i(e){return Ag(e,Object.assign({},r.settings.characterReferences,{subset:Ng}))}}function Fg(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ig(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Lg(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Rg(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function zg(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Bg(e){return e.join(` `).trim()}var Vg=/[ \t\n\f\r]/g;function Hg(e){return typeof e==`object`?e.type===`text`&&Ug(e.value):Ug(e)}function Ug(e){return e.replace(Vg,``)===``}var Wg=qg(1),Gg=qg(-1),Kg=[];function qg(e){return t;function t(t,n,r){let i=t?t.children:Kg,a=(n||0)+e,o=i[a];if(!r)for(;o&&Hg(o);)a+=e,o=i[a];return o}}var Jg={}.hasOwnProperty;function Yg(e){return t;function t(t,n,r){return Jg.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Xg=Yg({body:$g,caption:Zg,colgroup:Zg,dd:r_,dt:n_,head:Zg,html:Qg,li:t_,optgroup:a_,option:o_,p:e_,rp:i_,rt:i_,tbody:c_,td:d_,tfoot:l_,th:d_,thead:s_,tr:u_});function Zg(e,t,n){let r=Wg(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Hg(r.value.charAt(0)))}function Qg(e,t,n){let r=Wg(n,t);return!r||r.type!==`comment`}function $g(e,t,n){let r=Wg(n,t);return!r||r.type!==`comment`}function e_(e,t,n){let r=Wg(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function t_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&r.tagName===`li`}function n_(e,t,n){let r=Wg(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function r_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function i_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function a_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function o_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function s_(e,t,n){let r=Wg(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function c_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function l_(e,t,n){return!Wg(n,t)}function u_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function d_(e,t,n){let r=Wg(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var f_=Yg({body:h_,colgroup:g_,head:m_,html:p_,tbody:__});function p_(e){let t=Wg(e,-1);return!t||t.type!==`comment`}function m_(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function h_(e){let t=Wg(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Hg(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function g_(e,t,n){let r=Gg(n,t),i=Wg(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Xg(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function __(e,t,n){let r=Gg(n,t),i=Wg(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Xg(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var v_={name:[[`
|
|
8
|
+
\f\r &/=>`.split(``),`
|
|
9
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
10
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
11
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
12
|
+
\f\r &>`.split(``),`\0
|
|
13
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
14
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
15
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function y_(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=og);let l=b_(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!f_(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Xg(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function b_(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=x_(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function x_(e,t,n){let r=ng(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Ag(r.attribute,Object.assign({},e.settings.characterReferences,{subset:v_.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Rg:Bg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ag(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:v_.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ig(n,o)>Ig(n,e.alternative)&&(o=e.alternative),s=o+Ag(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?v_.single:v_.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var S_=[`<`,`&`];function C_(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ag(e.value,Object.assign({},r.settings.characterReferences,{subset:S_}))}function w_(e,t,n,r){return r.settings.allowDangerousHtml?e.value:C_(e,t,n,r)}function T_(e,t,n,r){return r.all(e)}var E_=cg(`type`,{invalid:D_,unknown:O_,handlers:{comment:Pg,doctype:Fg,element:y_,raw:w_,root:T_,text:C_}});function D_(e){throw Error("Expected node, not `"+e+"`")}function O_(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var k_={},A_={},j_=[];function M_(e,t){let n=t||k_,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:N_,all:P_,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||kh,characterReferences:n.characterReferences||A_,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?og:ag,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function N_(e,t,n){return E_(e,t,n,this)}function P_(e){let t=[],n=e&&e.children||j_,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function F_(e,t,n,r=`left-to-right`,i=900,a){K.prototype.transition=ra;let o=t*Math.PI/180,s=-o/2-Math.PI/2,c=o/2-Math.PI/2,l=e.querySelector(`defs`);l||(l=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`),e.appendChild(l));let u=`arc-sweep-clip`,d=l.querySelector(`#${u}`);d||(d=document.createElementNS(`http://www.w3.org/2000/svg`,`clipPath`),d.setAttribute(`id`,u),l.appendChild(d));let f=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);d.innerHTML=``,d.appendChild(f);let p=e.querySelector(`.arc-container`),m=e.querySelector(`.points-container`);if(m&&p)if(m.setAttribute(`clip-path`,`url(#${u})`),r===`left-to-right`){let e=e=>{let t=n*1.5,r=Math.cos(e)*t,i=Math.sin(e)*t,a=Math.cos(c)*t,o=Math.sin(c)*t;return`M 0,0 L ${r},${i} A ${t},${t} 0 ${+(c-e>Math.PI)},1 ${a},${o} Z`};f.setAttribute(`d`,e(s)),K(f).transition().duration(i).ease(e=>1-(1-e)**3).tween(`arc-sweep`,()=>t=>{let n=s+(c-s)*t;f.setAttribute(`d`,e(n))}).on(`end`,()=>{a&&a(),setTimeout(()=>{m.removeAttribute(`clip-path`)},50)})}else{let e=e=>{let t=n*1.5,r=Math.cos(e)*t,i=Math.sin(e)*t,a=Math.cos(c)*t,o=Math.sin(c)*t;return`M 0,0 L ${r},${i} A ${t},${t} 0 ${+(c-e>Math.PI)},1 ${a},${o} Z`};f.setAttribute(`d`,e(c)),K(f).transition().duration(i).ease(e=>1-(1-e)**3).tween(`arc-sweep`,()=>t=>{let n=c-(c-s)*t;f.setAttribute(`d`,e(n))}).on(`end`,()=>{m.removeAttribute(`clip-path`),a&&a()})}}var I_=/[#.]/g;function L_(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){I_.lastIndex=i;let e=I_.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function R_(e,t,n){let r=n?W_(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=L_(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,z_(i))a.unshift(i);else for(let[t,n]of Object.entries(i))B_(e,o.properties,t,n)}for(let e of a)V_(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function z_(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function B_(e,t,n,r){let i=ng(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?zg(r):i.commaSeparated?Lg(r):i.commaOrSpaceSeparated?zg(Lg(r).join(` `)):H_(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?U_(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(H_(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function V_(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)V_(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?V_(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function H_(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Mh(n)===Mh(t)))return!0}return n}function U_(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function W_(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var G_=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`);R_(ag,`div`);var K_=R_(og,`g`,G_),q_=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),J_=o(((e,t)=>{var n=q_(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),Y_=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),X_=o(((e,t)=>{var n=Y_(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),Z_=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Q_=o(((e,t)=>{t.exports=J_().Symbol})),$_=o(((e,t)=>{var n=Q_(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),ev=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),tv=o(((e,t)=>{var n=Q_(),r=$_(),i=ev(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),nv=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),rv=o(((e,t)=>{var n=tv(),r=nv(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),iv=o(((e,t)=>{var n=X_(),r=Z_(),i=rv(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),av=o(((e,t)=>{var n=iv(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),ov=o(((e,t)=>{var n=av();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),sv=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),cv=o(((e,t)=>{t.exports=Array.isArray})),lv=o(((e,t)=>{var n=Q_(),r=sv(),i=cv(),a=rv(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),uv=o(((e,t)=>{var n=lv();function r(e){return e==null?``:n(e)}t.exports=r})),dv=o(((e,t)=>{var n=J_(),r=ov(),i=iv(),a=uv(),o=n.isFinite,s=Math.min;function c(e){var t=Math[e];return function(e,n){if(e=i(e),n=n==null?0:s(r(n),292),n&&o(e)){var c=(a(e)+`e`).split(`e`);return c=(a(t(c[0]+`e`+(+c[1]+n)))+`e`).split(`e`),+(c[0]+`e`+(+c[1]-n))}return t(e)}}t.exports=c})),fv=o(((e,t)=>{t.exports=dv()(`round`)})),pv=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),mv=o(((e,t)=>{var n=tv(),r=nv(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),hv=o(((e,t)=>{var n=mv(),r=nv(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),gv=o(((e,t)=>{var n=Q_(),r=hv(),i=cv(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),_v=o(((e,t)=>{var n=pv(),r=gv();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),vv=o(((e,t)=>{var n=cv(),r=rv(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),yv=o(((e,t)=>{var n=tv(),r=Z_(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),bv=o(((e,t)=>{t.exports=J_()[`__core-js_shared__`]})),xv=o(((e,t)=>{var n=bv(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Sv=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),Cv=o(((e,t)=>{var n=yv(),r=xv(),i=Z_(),a=Sv(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),wv=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Tv=o(((e,t)=>{var n=Cv(),r=wv();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Ev=o(((e,t)=>{t.exports=Tv()(Object,`create`)})),Dv=o(((e,t)=>{var n=Ev();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Ov=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),kv=o(((e,t)=>{var n=Ev(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Av=o(((e,t)=>{var n=Ev(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),jv=o(((e,t)=>{var n=Ev(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),Mv=o(((e,t)=>{var n=Dv(),r=Ov(),i=kv(),a=Av(),o=jv();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Nv=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),Pv=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Fv=o(((e,t)=>{var n=Pv();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Iv=o(((e,t)=>{var n=Fv(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),Lv=o(((e,t)=>{var n=Fv();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Rv=o(((e,t)=>{var n=Fv();function r(e){return n(this.__data__,e)>-1}t.exports=r})),zv=o(((e,t)=>{var n=Fv();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),Bv=o(((e,t)=>{var n=Nv(),r=Iv(),i=Lv(),a=Rv(),o=zv();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Vv=o(((e,t)=>{t.exports=Tv()(J_(),`Map`)})),Hv=o(((e,t)=>{var n=Mv(),r=Bv(),i=Vv();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),Uv=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Wv=o(((e,t)=>{var n=Uv();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),Gv=o(((e,t)=>{var n=Wv();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),Kv=o(((e,t)=>{var n=Wv();function r(e){return n(this,e).get(e)}t.exports=r})),qv=o(((e,t)=>{var n=Wv();function r(e){return n(this,e).has(e)}t.exports=r})),Jv=o(((e,t)=>{var n=Wv();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),Yv=o(((e,t)=>{var n=Hv(),r=Gv(),i=Kv(),a=qv(),o=Jv();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Xv=o(((e,t)=>{var n=Yv(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),Zv=o(((e,t)=>{var n=Xv(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),Qv=o(((e,t)=>{var n=Zv(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),$v=o(((e,t)=>{var n=cv(),r=vv(),i=Qv(),a=uv();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),ey=o(((e,t)=>{var n=rv(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),ty=o(((e,t)=>{var n=$v(),r=ey();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),ny=o(((e,t)=>{var n=Bv();function r(){this.__data__=new n,this.size=0}t.exports=r})),ry=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),iy=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),ay=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),oy=o(((e,t)=>{var n=Bv(),r=Vv(),i=Yv(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),sy=o(((e,t)=>{var n=Bv(),r=ny(),i=ry(),a=iy(),o=ay(),s=oy();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),cy=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),ly=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),uy=o(((e,t)=>{var n=Yv(),r=cy(),i=ly();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),dy=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),fy=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),py=o(((e,t)=>{var n=uy(),r=dy(),i=fy(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),my=o(((e,t)=>{t.exports=J_().Uint8Array})),hy=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),gy=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),_y=o(((e,t)=>{var n=Q_(),r=my(),i=Pv(),a=py(),o=hy(),s=gy(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),vy=o(((e,t)=>{var n=pv(),r=cv();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),yy=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),by=o(((e,t)=>{function n(){return[]}t.exports=n})),xy=o(((e,t)=>{var n=yy(),r=by(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Sy=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Cy=o(((e,t)=>{function n(){return!1}t.exports=n})),wy=o(((e,t)=>{var n=J_(),r=Cy(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Ty=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Ey=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Dy=o(((e,t)=>{var n=tv(),r=Ey(),i=nv(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),Oy=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),ky=o(((e,t)=>{var n=q_(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Ay=o(((e,t)=>{var n=Dy(),r=Oy(),i=ky(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),jy=o(((e,t)=>{var n=Sy(),r=hv(),i=cv(),a=wy(),o=Ty(),s=Ay(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),My=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Ny=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Py=o(((e,t)=>{t.exports=Ny()(Object.keys,Object)})),Fy=o(((e,t)=>{var n=My(),r=Py(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),Iy=o(((e,t)=>{var n=yv(),r=Ey();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Ly=o(((e,t)=>{var n=jy(),r=Fy(),i=Iy();function a(e){return i(e)?n(e):r(e)}t.exports=a})),Ry=o(((e,t)=>{var n=vy(),r=xy(),i=Ly();function a(e){return n(e,i,r)}t.exports=a})),zy=o(((e,t)=>{var n=Ry(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),By=o(((e,t)=>{t.exports=Tv()(J_(),`DataView`)})),Vy=o(((e,t)=>{t.exports=Tv()(J_(),`Promise`)})),Hy=o(((e,t)=>{t.exports=Tv()(J_(),`Set`)})),Uy=o(((e,t)=>{t.exports=Tv()(J_(),`WeakMap`)})),Wy=o(((e,t)=>{var n=By(),r=Vv(),i=Vy(),a=Hy(),o=Uy(),s=tv(),c=Sv(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),Gy=o(((e,t)=>{var n=sy(),r=py(),i=_y(),a=zy(),o=Wy(),s=cv(),c=wy(),l=Ay(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),Ky=o(((e,t)=>{var n=Gy(),r=nv();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),qy=o(((e,t)=>{var n=sy(),r=Ky(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),Jy=o(((e,t)=>{var n=Z_();function r(e){return e===e&&!n(e)}t.exports=r})),Yy=o(((e,t)=>{var n=Jy(),r=Ly();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),Xy=o(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),Zy=o(((e,t)=>{var n=qy(),r=Yy(),i=Xy();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),Qy=o(((e,t)=>{var n=ty();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),$y=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),eb=o(((e,t)=>{var n=$v(),r=hv(),i=cv(),a=Ty(),o=Ey(),s=ey();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),tb=o(((e,t)=>{var n=$y(),r=eb();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),nb=o(((e,t)=>{var n=Ky(),r=Qy(),i=tb(),a=vv(),o=Jy(),s=Xy(),c=ey(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),rb=o(((e,t)=>{function n(e){return e}t.exports=n})),ib=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),ab=o(((e,t)=>{var n=ty();function r(e){return function(t){return n(t,e)}}t.exports=r})),ob=o(((e,t)=>{var n=ib(),r=ab(),i=vv(),a=ey();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),sb=o(((e,t)=>{var n=Zy(),r=nb(),i=rb(),a=cv(),o=ob();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),cb=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),lb=o(((e,t)=>{t.exports=cb()()})),ub=o(((e,t)=>{var n=lb(),r=Ly();function i(e,t){return e&&n(e,t,r)}t.exports=i})),db=o(((e,t)=>{var n=Iy();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),fb=o(((e,t)=>{var n=ub();t.exports=db()(n)})),pb=o(((e,t)=>{var n=fb(),r=Iy();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),mb=o(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),hb=o(((e,t)=>{var n=rv();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),gb=o(((e,t)=>{var n=hb();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),_b=o(((e,t)=>{var n=sv(),r=ty(),i=sb(),a=pb(),o=mb(),s=Oy(),c=gb(),l=rb(),u=cv();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),vb=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),yb=o(((e,t)=>{var n=vb(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),bb=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),xb=o(((e,t)=>{var n=Tv();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Sb=o(((e,t)=>{var n=bb(),r=xb(),i=rb();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),Cb=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),wb=o(((e,t)=>{var n=Sb();t.exports=Cb()(n)})),Tb=o(((e,t)=>{var n=rb(),r=yb(),i=wb();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),Eb=o(((e,t)=>{var n=Pv(),r=Iy(),i=Ty(),a=Z_();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),Db=o(((e,t)=>{var n=_v(),r=_b(),i=Tb(),a=Eb();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})})),Ob=o(((e,t)=>{var n=xb();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),kb=o(((e,t)=>{var n=Ob();function r(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var a=e[t];n(i,a[0],a[1])}return i}t.exports=r})),Ab=o(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),jb=o(((e,t)=>{var n=Ab(),r=Eb(),i=av();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),Mb=o(((e,t)=>{t.exports=jb()()})),Nb=o(((e,t)=>{var n=sv(),r=sb(),i=pb(),a=cv();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),Pb=o(((e,t)=>{var n=_v(),r=Nb();function i(e,t){return n(r(e,t),1)}t.exports=i})),Fb=o(((e,t)=>{function n(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}t.exports=n})),Ib=o(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),Lb=o(((e,t)=>{var n=Math.floor,r=Math.random;function i(e,t){return e+n(r()*(t-e+1))}t.exports=i})),Rb=o(((e,t)=>{var n=Lb();function r(e,t){var r=-1,i=e.length,a=i-1;for(t=t===void 0?i:t;++r<t;){var o=n(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}t.exports=r})),zb=o(((e,t)=>{var n=Fb(),r=Ib(),i=Rb();function a(e,t){return i(r(e),n(t,0,e.length))}t.exports=a})),Bb=o(((e,t)=>{var n=sv();function r(e,t){return n(t,function(t){return e[t]})}t.exports=r})),Vb=o(((e,t)=>{var n=Bb(),r=Ly();function i(e){return e==null?[]:n(e,r(e))}t.exports=i})),Hb=o(((e,t)=>{var n=Fb(),r=Rb(),i=Vb();function a(e,t){var a=i(e);return r(a,n(t,0,a.length))}t.exports=a})),Ub=o(((e,t)=>{var n=zb(),r=Hb(),i=cv(),a=Eb(),o=ov();function s(e,t,s){return t=(s?a(e,t,s):t===void 0)?1:o(t),(i(e)?n:r)(e,t)}t.exports=s})),Wb=l(fv(),1),Gb=l(Db(),1),Kb=l(kb(),1),qb=l(Mb(),1),Jb=l(Pb(),1),Yb=l(Ub(),1),Xb=e=>(0,Wb.default)(e,14),Zb=e=>Object.values(e).reduce((e,t)=>e+t,0),Qb=(e,t,n={})=>{let r=Object.assign({draw:!1},n);if(Object.values(e).length<1)throw Error(`vote distribution must contain at least one party`);if(!Object.values(e).every(e=>typeof e==`number`&&e>=0))throw Error(`party vote counts must be non-negative integers`);if(!Number.isInteger(t)||t<=0)throw Error(`seats must be a positive integer`);if(typeof r.draw!=`boolean`)throw Error(`opt.draw must be a boolean`);let i=Zb(e),a=(0,Kb.default)(Object.entries(e).map(([n,r])=>{let a=Math.max(t-Object.keys(e).length,0);return[n,Math.round(a*r/i)]})),o=(0,Kb.default)(Object.entries(e).map(([n,r])=>{let a=t+Object.keys(e).length;return[n,Math.min(Math.round(a*r/i),t)]})),s=(0,Jb.default)(Object.entries(e).map(([e,t])=>{let n=a[e],r=o[e];return(0,qb.default)(n,r).map(n=>({party:e,quotient:Xb(t/(n+.5))}))})),c=t-Zb(a),l=(0,Gb.default)(s,({quotient:e})=>-e),u=l[c-1].quotient,d=l.filter(({quotient:e})=>e>u),f=l.filter(({quotient:e})=>e===u);if(d.length+f.length===c)d.push(...f);else{if(!r.draw)throw Error(`result is ambiguous, a draw would need to be made, but opt.draw is disabled`);d.push(...(0,Yb.default)(f,c-d.length))}return d.reduce((e,{party:t})=>(e[t]+=1,e),a)},$b=(e=K_)=>e(`pattern`,{id:`greyHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:m.neoGrey[200]}),e(`path`,{d:`M0,2 L8,2`,stroke:m.neoGrey[400],"stroke-width":.5}),e(`path`,{d:`M0,6 L8,6`,stroke:m.neoGrey[400],"stroke-width":.5})]),ex=(e=K_)=>e(`pattern`,{id:`dataMissingHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:`#FFF3CC`}),e(`path`,{d:`M0,8 L8,0`,stroke:`#FFB800`,"stroke-width":.5}),e(`path`,{d:`M-2,2 L2,-2`,stroke:`#FFB800`,"stroke-width":.5}),e(`path`,{d:`M6,10 L10,6`,stroke:`#FFB800`,"stroke-width":.5})]),tx=(e=K_)=>e(`pattern`,{id:`noLstHatchPattern`,x:0,y:0,width:8,height:8,patternUnits:`userSpaceOnUse`},[e(`rect`,{x:0,y:0,width:8,height:8,fill:`#FFE5E5`}),e(`path`,{d:`M0,0 L8,8`,stroke:`#ED4134`,"stroke-width":.5}),e(`path`,{d:`M-2,6 L2,10`,stroke:`#ED4134`,"stroke-width":.5}),e(`path`,{d:`M6,-2 L10,2`,stroke:`#ED4134`,"stroke-width":.5})]),nx=e=>Math.round(e*1e10)/1e10,rx=e=>e.reduce((e,t)=>e+t.seats,0),ix=e=>e.flat(),ax=(e,t,n)=>{let r=(Math.PI-n)/2,i=t/e+r-Math.PI;return{x:nx(e*Math.cos(i)),y:nx(e*Math.sin(i))}},ox=(e,t,n,r)=>r*t*n/(e-t)/(1+r*(t-1)*t/2/(e-t)),sx=(e,t,n,r)=>{let i=r/Math.PI*(5/7);return Math.abs(ox(e,t,n,r)*t/n-i)},cx=(e,t,n)=>{let r=Math.floor(Math.log(e)/Math.log(2))||1,i=sx(e,r,t,n),a=0;for(sx(e,r+1,t,n)<i&&(a=1),sx(e,r-1,t,n)<i&&r>1&&(a=-1);sx(e,r+a,t,n)<i&&r>0;)i=sx(e,r+a,t,n),r+=a;return r},lx=(e,t)=>{let n,r;for(let i=0;i<e.length;i++)r=nx((t[i]||0)/(e[i]?.length??1)),(!n||r<n)&&(n=r);for(let i=0;i<e.length;i++)if(r=nx((t[i]||0)/(e[i]?.length??1)),r===n)return i;return 0},ux=(e,t,n)=>{let r=rx(e),i=cx(r,t,n),a=ox(r,i,t,n),o={};for(let e=1;e<=i;e++)o[e]=t-(e-1)*a;o=Qb(o,r);let s=[],c,l,u;for(let e=1;e<=i;e++){let r=[];c=t-(e-1)*a,l=n*c/((o[e]??1)-1||1);for(let t=0;t<=(o[e]??1)-1;t++)u={...ax(c,t*l,n),r:.4*a},r.push(u);s.push(r)}let d=Array(s.length).fill(0);for(let t of e)for(let e=0;e<t.seats;e++){let e=lx(s,d),n=s[e],r=d[e]??0,i=n?.[r];i&&(i.fill=t.colour,i.party=String(t.id)),d[e]=r+1}return ix(s)},dx=e=>t=>e(`circle`,{cx:t.x,cy:t.y,r:t.r,fill:t.fill,class:t.party}),fx={seatCount:!1,arcAngle:180,hFunction:K_},px=(e,t={})=>{let{seatCount:n,arcAngle:r,hFunction:i}=Object.assign({},fx,t);if(typeof n!=`boolean`)throw Error("`seatCount` option must be a boolean");if(typeof i!=`function`)throw Error("`hFunction` option must be a function");if(typeof r!=`number`||r<=0||r>360)throw Error("`arcAngle` option must be a number between 0 and 360");let a=r*Math.PI/180,o=ux(e,20,a),s=(o[0]?.r??0)/.4||0,c=o.map(dx(i));n&&c.push(i(`text`,{x:0,y:0,"text-anchor":`middle`,style:{"font-family":`Helvetica`,"font-size":`5px`},class:`seatNumber`},String(c.length)));let l=r<=180?20+s:20*(1+Math.sin((a-Math.PI)/2))+s,u=20+s,d=Math.max(l,u),f=r<=180?-20-s/2:-20*(1+Math.sin((a-Math.PI)/2))-s/2,p=i(`defs`,[$b(i),ex(i),tx(i)]);return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:[-20-s/2,f,40+s,d].join(`,`)},[p,...c])},mx={seatCount:!1,arcAngle:200,arcAngleFlexibility:5,radius:380,seatSize:4.5,minSeatSize:1.8,maxSeatSize:3,spacing:1.8,innerRadiusRatio:.6,showLabels:!0,hFunction:K_},hx=(e,t={})=>{let{arcAngle:n,arcAngleFlexibility:r,radius:i,seatSize:a,minSeatSize:o,maxSeatSize:s,spacing:c,innerRadiusRatio:l,showLabels:u,hFunction:d}={...mx,...t},f=i*l,p=e.reduce((e,t)=>e+t.seats,0),m={seatSize:a,arcAngle:n,rings:0,score:-1},h=n-r,g=n+r;for(let e=h;e<=g;e+=2.5){let t=e*Math.PI/180;for(let a=s;a>=o;a-=.1){let l=a*2,u=l*c,d=Math.floor((i-f)/u);for(let i=1;i<=Math.min(d,10);i++){let d=0,h=1/0;for(let e=0;e<i;e++){let n=f+(e+.5)*u,r=l*c/n,i=Math.floor(t/r);d+=i,h=Math.min(h,i)}if(d>=p){let t=p/d,c=(a-o)/(s-o),l=(d-p)/p,u=l<.15?1:l<.3?.7:l<.5?.4:.1,f=1-Math.abs(e-n)/r,h=u*.5+c*.3+t*.15+f*.05;h>m.score&&(m={seatSize:a,arcAngle:e,rings:i,score:h})}}}}let _=m.seatSize,v=m.arcAngle,y=v*Math.PI/180,b=_*2,x=b*c,S=Math.floor((i-f)/x),C=[],w=-y/2-Math.PI/2,T=0,E=[],D=0,O=[],k=0;for(let e=1;e<=S;e++){let t=0,n=[];for(let r=0;r<e;r++){let e=f+(r+.5)*x,i=b*c/e,a=Math.floor(y/i);n.push(a),t+=a}if(t>=p){D=e,O=n,k=t;break}}if(D>0)E.push(...O),T=k;else for(let e=0;e<S;e++){let t=f+(e+.5)*x,n=b*c/t,r=Math.floor(y/n);E.push(r),T+=r}for(let e=0;e<E.length;e++){let t=f+(e+.5)*x,n=E[e]??0;if(n>0){let r=y/n;for(let i=0;i<n;i++){let n=w+(i+.5)*r,a=Math.cos(n)*t,o=Math.sin(n)*t;C.push({ring:e,index:i,angle:n,x:a,y:o})}}}C.sort((e,t)=>{let n=e.angle-t.angle;return Math.abs(n)>.001?n:e.ring-t.ring});let A=[],j=0;e.forEach(e=>{let t=[],n=Math.min(e.seats,C.length-j),r=!!e.dashed,i=e.colour,a=e.borderColour??e.colour,o=Math.max(.5,_*(r?.24:.3)),s=r?`${(_*.48).toFixed(2)} ${(_*.38).toFixed(2)}`:void 0,c=1/0,l=-1/0,u=1/0,f=-1/0,p=[];for(let r=0;r<n&&j<C.length;r++){let n=C[j++];if(!n)continue;p.push(n),c=Math.min(c,n.angle),l=Math.max(l,n.angle);let r=Math.sqrt(n.x*n.x+n.y*n.y);u=Math.min(u,r),f=Math.max(f,r),t.push(d(`circle`,{fill:i,stroke:a,"stroke-width":o,...s?{"stroke-dasharray":s}:{},className:`circle seat-visual seat-hover-zone`,transform:`translate(${n.x}, ${n.y})`,r:_,"data-party":e.name,"data-party-id":String(e.id),style:`pointer-events: all; cursor: pointer;`}))}let m=t;A.push(d(`g`,{className:`party-group`,"data-party":e.name,style:`opacity: 1; outline: none;`},m))});let M=d(`g`,{className:`arc-bg`},[d(`circle`,{className:`outer`,cx:0,cy:0,fill:`transparent`,r:i}),d(`circle`,{className:`inner`,cx:0,cy:0,fill:`transparent`,r:f})]),N=d(`g`,{className:`points-container`},A),P=u?d(`g`,{className:`label-container`,mask:`url(#label-clip)`,style:`pointer-events: none;`},[d(`text`,{className:`party_count`,dy:`-0.05em`,style:`font-size: 24vw; font-weight: bold; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);`}),d(`text`,{className:`party_name`,y:0,dy:`1em`,style:`font-size: 6vw; font-weight: normal; text-anchor: middle; display: none; opacity: 0; fill: rgb(19, 90, 225); transform: scale(1);`})]):null,F=d(`defs`,[d(`radialGradient`,{id:`label-gradient`},[d(`stop`,{offset:`0%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 1;`}),d(`stop`,{offset:`80%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 1;`}),d(`stop`,{offset:`90%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 0.1;`}),d(`stop`,{offset:`100%`,style:`stop-color: rgb(255, 255, 255); stop-opacity: 0;`})]),d(`mask`,{id:`label-clip`},[d(`circle`,{fill:`url(#label-gradient)`,r:f})])]),I=d(`g`,{className:`arc-container`,transform:`translate(${i}, ${i})`},[M,N,P].filter(Boolean)),L=y/2,R;if(v<=180)R=i*Math.sin(L)+_;else{let e=L-Math.PI/2;R=i*(1+Math.sin(e))+_}let z=i+_;return d(`svg`,{id:`chart-container`,"font-family":`Canva Sans Variable`,viewBox:`0 0 ${i*2} ${Math.max(R,z)}`,preserveAspectRatio:`xMidYMid meet`,xmlns:`http://www.w3.org/2000/svg`},[I,F])};function gx(e){return!e||!e.color?`#cccccc`:e.color===`url(#hatchPattern)`?x.COMPLETED:e.color}function _x(e,t){if(!e)return;let n=e.querySelectorAll(`.party-group`);n&&n.length>0&&n.forEach(e=>{if(!e)return;let n=e,r=n.getAttribute(`data-party`);t?r===t?n.style.opacity=b.animation.hoverOpacity.active:n.style.opacity=b.animation.hoverOpacity.dimmed:n.style.opacity=`1`})}function vx(e,t){e.forEach(e=>{let n=e,r=e.getAttribute(`class`)||``;t?r===t?(n.setAttribute(`fill-opacity`,`1`),n.setAttribute(`stroke-opacity`,`1`)):(n.setAttribute(`fill-opacity`,b.animation.hoverOpacity.dimmed),n.setAttribute(`stroke-opacity`,`0.2`)):(n.setAttribute(`fill-opacity`,`1`),n.setAttribute(`stroke-opacity`,`1`))})}var yx=({containerRef:e,processedData:t,totalRepositories:n,arcAngle:r,useEnhanced:i,maxSeats:a,setHoveredData:o,activePartyName:s,setActivePartyName:c,chartConfig:l,seatSize:u,shouldAnimate:f=!1,animationDirection:p=`left-to-right`,onAnimationComplete:m})=>{(0,d.useEffect)(()=>{if(!e.current||t.length===0)return;for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);let d=n<=a?1:a/n,h=t.filter(e=>e.value>0).map(e=>{let t=n<=a?e.value:Math.max(1,Math.floor(e.value*d)),{fill:r,stroke:i,dashed:o}=O(e.color===`url(#hatchPattern)`?x.COMPLETED:e.color);return{id:String(e.id),name:e.label,seats:t,colour:r,borderColour:i,dashed:o}}),g=i?hx(h,{arcAngle:r,arcAngleFlexibility:l.arcAngleFlexibility,radius:l.radius,seatSize:u,minSeatSize:l.minSeatSize,maxSeatSize:l.maxSeatSize,spacing:l.spacing,innerRadiusRatio:l.innerRadiusRatio,showLabels:!0}):px(h,{arcAngle:r});g.properties&&(g.properties.width=`100%`,g.properties.height=`100%`,g.properties.style=`display: block; width: 100%; max-width: 100%; height: auto;`,g.properties.preserveAspectRatio=`xMidYMid meet`);let _=M_(g),v=new DOMParser().parseFromString(_,`image/svg+xml`).documentElement;if(!v)return;v.setAttribute(`width`,`100%`),v.setAttribute(`height`,`100%`),v.style.width=`100%`,v.style.height=`auto`,v.style.display=`block`,i?bx(v,h,t,o,s,c):xx(v,h,t,o,s,c);let y=()=>{o(null),c(null),i?_x(v,null):vx(v.querySelectorAll(`circle`),null)};return v&&v.addEventListener(`mouseleave`,y),e.current.appendChild(v),f&&v&&F_(v,r,l.radius,p,900,m),()=>{if(v&&v.removeEventListener(`mouseleave`,y),e.current)for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild)}},[t,n,r,i,a,o,s,c,e,l,u,f,p,m])};function bx(e,t,n,r,i,a){if(!e)return;let o=e.querySelectorAll(`.seat-hover-zone`),s=e.querySelectorAll(`.party-group circle.seat-visual`);s&&s.length>0&&s.forEach(e=>{if(e){let t=e;t.setAttribute(`fill-opacity`,`1`),t.style.transition=`fill-opacity ${b.animation.transitionDuration} ease, stroke-opacity ${b.animation.transitionDuration} ease`}}),o&&o.length>0&&o.forEach(o=>{if(!o)return;let s=o.getAttribute(`data-party`),c=o.getAttribute(`data-party-id`);o.addEventListener(`mouseenter`,()=>{if(s&&s!==i){let i=t.find(e=>e.name===s||String(e.id)===c);if(i){let t=n.find(e=>e.label===i.name||String(e.id)===i.id);if(t){let n=gx(t);r({label:t.label||`Unknown`,value:t.value||0,color:n}),a(i.name),_x(e,i.name)}}}})}),i&&_x(e,i)}function xx(e,t,n,r,i,a){if(!e)return;let o=e.querySelectorAll(`circle`);if(o&&o.length>0&&(o.forEach(e=>{if(e){let t=e;t.style.cursor=`pointer`,t.setAttribute(`fill-opacity`,`1`),t.style.transition=`fill-opacity ${b.animation.transitionDuration} ease, stroke-opacity ${b.animation.transitionDuration} ease`}}),o.forEach(e=>{if(!e)return;let s=e.getAttribute(`class`)||``,c=t[parseInt(s,10)];e.addEventListener(`mouseenter`,()=>{if(c){let e=c.name;if(e&&e!==i){let t=n.find(e=>e.label===c.name||String(e.id)===c.id);if(t){let n=gx(t);r({label:t.label||`Unknown`,value:t.value||0,color:n}),a(e),vx(o,s)}}}})})),i){let e=t.find(e=>e.name===i);if(e){let n=t.indexOf(e);vx(o,String(n))}}}var Sx=h,Cx={"N/A":x.NOT_APPLICABLE,[A]:x.NO_LST,[j]:x.DATA_MISSING},wx=(e,t,n)=>{if(e in Cx)return Cx[e];let r=n-1-t,i=Sx.length,a=Math.floor(r/Math.max(1,n-1)*(i-1));return Sx[Math.min(Math.max(0,a),i-1)]??Sx[0]??`#000000`},Tx=({dataSeries:e,notApplicableRepositories:t,noLstRepositories:n,unavailableRepositories:r})=>{let{special:i,regular:a}=e.reduce((e,t,n)=>([`N/A`,`No LST`,`Data Missing`].includes(t.label)?e.special.push({...t,originalIndex:n}):e.regular.push({...t,originalIndex:n}),e),{special:[],regular:[]}),o=a.reverse().map((e,t)=>({id:`measure-${t}`,label:e.label,value:e.value,color:wx(e.label,a.length-1-t,a.length)})),s=i.map((e,t)=>({id:e.label.toLowerCase().replace(` `,`-`),label:e.label,value:e.value,color:wx(e.label,t,i.length)})),c=r,l={id:`no-lst`,label:A,value:n,color:wx(A,0,1)},u={id:`data-missing`,label:j,value:c,color:wx(j,0,1)},d={id:`n/a`,label:`N/A`,value:t,color:wx(`N/A`,0,1)},f=[];return d.value>0&&f.push(d),l.value>0&&f.push(l),u.value>0&&f.push(u),f.push(...s),f.push(...o),f},Ex={"N/A":`Repos that aren't applicable to this migration.`,"No LST":`There are no LSTs for these repos.`,"Data Missing":`There is data missing in the LSTs.`},Dx=({dataSeries:e,totalRepositories:t,notApplicableRepositories:n,noLstRepositories:r,unavailableRepositories:i,arcAngle:a,useEnhanced:o=b.useEnhanced,showTable:s=!0,shouldAnimate:c=!1,animationDirection:l=`left-to-right`,onAnimationComplete:m})=>{let h=(0,d.useRef)(null),[g,_]=(0,d.useState)(null),[v,y]=(0,d.useState)(null),x=Tx({dataSeries:e,notApplicableRepositories:n,noLstRepositories:r,totalRepositories:t,unavailableRepositories:i}).map(e=>{let t=typeof e.color==`function`?e.color(`arc`):e.color,n=typeof e.label==`function`?e.label(`arc`):e.label;return{...e,color:t,label:n}}),S=a??fh({repositoryCount:t}),C=ph({repositoryCount:t});yx({containerRef:h,processedData:x,totalRepositories:t,arcAngle:S,useEnhanced:o,maxSeats:b.maxSeats,setHoveredData:_,activePartyName:v,setActivePartyName:y,chartConfig:b.chartConfig,seatSize:C,shouldAnimate:c,animationDirection:l,onAnimationComplete:m});let w=x.map(e=>{let n=t>0?e.value/t*100:0,r=n>0&&n<1?`< 1`:n.toFixed(0);return{id:String(e.id),label:e.label,value:e.value,percentage:r,color:e.color}}),T=t>b.maxSeats,E=T?Math.round(t/b.maxSeats):1;return(0,f.jsxs)(u.Stack,{sx:{width:`100%`,alignItems:`center`,gap:{xs:.5,sm:.75,md:1,lg:1},py:0,"@media (min-width: 1024px) and (max-width: 1225px)":{gap:.25}},children:[(0,f.jsxs)(u.Box,{className:`parliament-chart-container`,sx:{position:`relative`,width:`100%`,minHeight:`200px`,mb:{xs:.5,sm:.75,md:1},"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:`250px`,mb:.25}},children:[(0,f.jsx)(u.Box,{className:`parliament-chart-svg-container`,ref:h,sx:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,justifyContent:`center`,alignItems:`center`,"& svg":{width:`100%`,height:`100%`,maxWidth:`100%`,"@media (min-width: 1024px) and (max-width: 1225px)":{maxHeight:`230px`}}}}),(0,f.jsxs)(u.Box,{className:`parliament-chart-tooltip`,sx:{position:`absolute`,bottom:`0%`,left:`50%`,transform:`translate(-50%, 0%)`,pointerEvents:`none`,textAlign:`center`,zIndex:10,"@media (min-width: 1024px) and (max-width: 1225px)":{bottom:`5%`}},children:[g&&(0,f.jsxs)(d.default.Fragment,{children:[(0,f.jsx)(u.Typography,{sx:{color:`var(--rc-muted-text, #6b7280)`,mb:.3,fontSize:`clamp(0.75rem, 1.5vw, 0.85rem)`,display:`block`,"@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:`0.7rem`,mb:.2}},children:g.label}),(0,f.jsxs)(u.Typography,{sx:{fontWeight:`bold`,color:g.color,lineHeight:1,fontSize:`clamp(1.1rem, 2.2vw, 1.3rem)`,"@media (min-width: 1024px) and (max-width: 1225px)":{fontSize:`1rem`}},children:[g.value,` `,g.value>1?`repos`:`repo`]})]}),T&&(0,f.jsxs)(u.Box,{className:`parliament-chart-scaled-indicator`,sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:.5,mt:g?.5:0,color:`var(--rc-muted-text, #6b7280)`,fontSize:`clamp(0.65rem, 1.2vw, 0.72rem)`},children:[(0,f.jsx)(u.Box,{className:`parliament-chart-scaled-indicator-dot`,sx:{width:8,height:8,borderRadius:`50%`,backgroundColor:`#888888`,flexShrink:0}}),(0,f.jsxs)(u.Typography,{variant:`caption`,sx:{fontSize:`inherit`,fontStyle:`italic`},children:[`= ~`,E,` repos`]})]})]})]}),s&&(0,f.jsx)(u.Box,{className:`parliament-chart-data-table`,sx:{width:`100%`,display:`flex`,justifyContent:`center`,"@media (min-width: 1024px) and (max-width: 1225px)":{overflowX:`auto`,maxWidth:`100%`}},onMouseLeave:()=>{_(null),y(null)},children:(0,f.jsxs)(u.Table,{"aria-label":`Repository categories summary`,className:`parliament-chart-table`,size:`small`,sx:{maxWidth:{xs:`clamp(360px, 90%, 400px)`,sm:`clamp(360px, 90%, 400px)`,md:`clamp(360px, 85%, 420px)`,lg:`clamp(360px, 90%, 400px)`},"@media (min-width: 1024px) and (max-width: 1225px)":{maxWidth:`360px`,"& .MuiTableCell-root":{padding:`1px 4px`,fontSize:`9.5px`}},"& .MuiTableCell-root":{paddingTop:`1px`,paddingBottom:`1px`,paddingLeft:0,paddingRight:`4px`,borderBottom:`none`,fontSize:`clamp(10px, 1.8vw, 12px)`},"& tbody .MuiTableRow-root:first-of-type .MuiTableCell-root":{paddingTop:`2px`}},children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(u.TableRow,{sx:{"& .MuiTableCell-root":{borderBottom:`1px solid`,borderColor:`grey.300`,pb:`2px`}},children:[(0,f.jsx)(u.TableCell,{colSpan:2,sx:{fontWeight:500},children:`Category`}),(0,f.jsx)(u.TableCell,{align:`right`,sx:{fontWeight:500},children:`# of repositories`}),(0,f.jsx)(u.TableCell,{align:`right`,sx:{fontWeight:500},children:`Percentage`})]})}),(0,f.jsx)(`tbody`,{children:w.map(e=>{let t=e.color,{fill:n,stroke:r,dashed:i}=O(e.color);return(0,f.jsxs)(u.TableRow,{onMouseEnter:()=>{y(e.label),_({label:e.label,value:e.value,color:e.color})},sx:{cursor:`pointer`,transition:`background-color 0.15s ease`,backgroundColor:v===e.label?`${t}15`:`transparent`,"&:hover":{backgroundColor:`${t}15`}},children:[(0,f.jsx)(u.TableCell,{align:`center`,sx:{width:20},children:(0,f.jsx)(u.Box,{sx:{width:12,height:12,boxSizing:`border-box`,borderRadius:`50%`,backgroundColor:n,border:`1.5px ${i?`dashed`:`solid`} ${r}`,transition:`transform 0.15s ease`,transform:v===e.label?`scale(1.2)`:`scale(1)`}})}),(0,f.jsx)(u.TableCell,{children:(0,f.jsxs)(u.Stack,{direction:`row`,alignItems:`center`,gap:.5,children:[(0,f.jsx)(`span`,{children:e.label}),Ex[e.label]&&(0,f.jsx)(u.Tooltip,{title:Ex[e.label],placement:`right`,arrow:!0,children:(0,f.jsx)(p.InfoOutlined,{sx:{fontSize:`.875rem`,color:`var(--rc-muted-text, #6b7280)`}})})]})}),(0,f.jsx)(u.TableCell,{align:`right`,children:e.value}),(0,f.jsxs)(u.TableCell,{align:`right`,children:[e.percentage,`%`]})]},e.id)})})]})})]})},Ox=({containerRef:e,data:t,categories:n,width:r,height:i,margin:a,timelineEvents:o=[],showTimeline:s=!0,timelineHeight:c=40,timelineOffset:l=35,timeRange:u,showGrid:f=!0,showAxes:p=!0,axisLabelColor:m,axisLabelSize:h=14,enableBrush:g=!1,onTimeRangeChange:_,minAllowedTime:v,maxAllowedTime:y,brushColor:b=`#69b3a2`,formatDate:x,formatValue:S,markers:C=[],onHoveredDataChange:w,hoveredCategory:T,onTimelineEventHover:E})=>{let[D,O]=(0,d.useState)(null),[k,A]=(0,d.useState)(null),[j,M]=(0,d.useState)([]),N=(0,d.useRef)(`sawt-${Math.random().toString(36).substr(2,9)}`),P=(0,d.useCallback)(e=>{O(e),E?.(e)},[E]);return(0,d.useEffect)(()=>{if(!e.current||t.length===0||n.length===0)return;let d=K(e.current),E=r-a.left-a.right,D=i-a.top-a.bottom,O=N.current;d.selectAll(`*`).remove();let k=`main-chart-group main-chart-group-${O}`,j=d.append(`g`).attr(`class`,k).attr(`transform`,`translate(${a.left},${a.top})`),F=`sawt-clip-${O}`;d.append(`defs`).append(`clipPath`).attr(`id`,F).append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,E).attr(`height`,D);let I=j.append(`g`).attr(`clip-path`,`url(#${F})`),L=[...t.map(e=>({timestamp:e.timestamp,...e.values}))].sort((e,t)=>e.timestamp-t.timestamp),R=n.map(e=>e.dataKey),z=Cl().keys(R),B=z(L),V=t.map(e=>e.timestamp),H=u?u[0]:Math.min(...V),ee=u?u[1]:Math.max(...V),re=tl().domain([new Date(H),new Date(ee)]).range([0,E]),ie=L.filter(e=>e.timestamp>=H&&e.timestamp<=ee),ae=z(ie),oe=ae.length>0?Math.max(...ae[ae.length-1].map(e=>e[1]??0)):0,U=Lo().domain([0,oe*1.1]).range([D,0]).nice();f&&(I.append(`g`).attr(`class`,`grid grid-vertical`).attr(`opacity`,.1).call(te(re).ticks(6).tickSize(D).tickFormat(()=>``)),I.append(`g`).attr(`class`,`grid grid-horizontal`).attr(`opacity`,.1).call(ne(U).ticks(5).tickSize(-E).tickFormat(()=>``)));let W=vl().x(e=>re(new Date(e.data.timestamp))).y0(e=>U(e[0])).y1(e=>U(e[1])).curve(ml),se=I.append(`g`).attr(`class`,`areas`);B.forEach((e,t)=>{let r=n[t];if(!r)return;let i=T===r.dataKey,a=T!=null;se.append(`path`).datum(e).attr(`class`,`area area-${r.dataKey}`).attr(`fill`,r.color).attr(`fill-opacity`,a?i?.9:.3:.7).attr(`stroke`,r.color).attr(`stroke-width`,i?2:1.5).attr(`d`,W).on(`mouseenter`,()=>{let e=ie[ie.length-1],t=e?e[r.dataKey]??0:0;w?.({label:r.label,value:t,color:r.color})}).on(`mouseleave`,()=>{w?.(null)})});let ce=C.filter(e=>e.timestamp>=H&&e.timestamp<=ee).map(e=>({...e,x:re(new Date(e.timestamp))}));M(e=>e.length!==ce.length||e.some((e,t)=>e.timestamp!==ce[t]?.timestamp||e.x!==ce[t]?.x)?ce:e);let le=null;if(ce.length>0&&(le=I.append(`g`).attr(`class`,`markers`),ce.forEach(e=>{le.append(`line`).attr(`class`,`marker-line`).attr(`data-timestamp`,e.timestamp).attr(`x1`,e.x).attr(`x2`,e.x).attr(`y1`,0).attr(`y2`,D).attr(`stroke`,e.color??`#131E7A`).attr(`stroke-width`,2).attr(`opacity`,0)})),p){let e=te(re).ticks(6).tickPadding(12);x&&e.tickFormat(e=>x(+e)),j.append(`g`).attr(`class`,`axis axis-x`).attr(`transform`,`translate(0,${D})`).call(e).selectAll(`text`).attr(`font-size`,h).attr(`fill`,m??null);let t=ne(U).ticks(5);t.tickFormat(e=>+e==0?``:S?S(+e):String(e)),j.append(`g`).attr(`class`,`axis axis-y`).call(t).selectAll(`text`).attr(`font-size`,h).attr(`fill`,m??null)}if(g&&_){let e=Ia().extent([[0,0],[E,D]]).on(`end`,t=>{if(!t.selection)return;let[n,r]=t.selection,i=[+re.invert(n),+re.invert(r)];v!==void 0&&(i[0]=Math.max(i[0],v)),y!==void 0&&(i[1]=Math.min(i[1],y)),_(i),d.select(`.brush`).call(e.move,null)}),t=I.append(`g`).attr(`class`,`brush`).call(e);t.selectAll(`.selection`).attr(`fill`,b).attr(`fill-opacity`,.2).attr(`stroke`,b).attr(`stroke-width`,1),t.selectAll(`.handle`).attr(`fill`,b).attr(`fill-opacity`,.8),t.select(`.overlay`).style(`cursor`,`default`)}if(s&&Fm({svg:d,events:o,xScale:re,chartHeight:D,chartWidth:E,timelineHeight:c,timelineOffset:l,instanceId:O,setHoveredTimelineEvent:P,enableBrush:g,onTimeRangeChange:_,minAllowedTime:v,maxAllowedTime:y,brushColor:b,mainGroupSelector:`.main-chart-group-${O}`}),ce.length>0&&le){let e=null,t;t=g?I.select(`.brush .overlay`):j.append(`rect`).attr(`class`,`marker-hover-overlay`).attr(`width`,E).attr(`height`,D).attr(`fill`,`none`).attr(`pointer-events`,`all`);let n=le,r=t=>{let r=null,i=1/0;if(ce.forEach(e=>{let n=Math.abs(t-e.x);n<i&&(i=n,r=e)}),!r||i>50)return e!==null&&(e=null,n.selectAll(`.marker-line`).attr(`opacity`,0),A(null)),!1;let a=r;return e===a.timestamp?!0:(e=a.timestamp,n.selectAll(`.marker-line`).attr(`opacity`,0),n.selectAll(`.marker-line`).filter(function(){return K(this).attr(`data-timestamp`)===String(a.timestamp)}).attr(`opacity`,.6),A(a),!0)},i=function(e){let[t]=on(e,this);r(t)};t.on(`mouseenter`,i),t.on(`mousemove`,i),t.on(`mouseleave`,function(){e=null,n.selectAll(`.marker-line`).attr(`opacity`,0),A(null)})}return()=>{d.selectAll(`*`).remove()}},[e,t,n,r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,P]),{hoveredTimelineEvent:D,hoveredMarker:k,visibleMarkers:j}},kx=({data:e,categories:t,timelineEvents:n=[],showTimeline:r=!0,timelineHeight:i=40,timelineOffset:a,width:o=900,height:s=400,margin:c={top:10,right:30,bottom:40,left:60},showGrid:l=!0,showAxes:p=!0,axisLabelColor:m,axisLabelSize:h=14,formatDate:g,formatValue:_,timeRange:v,enableBrush:y=!1,onTimeRangeChange:b,minAllowedTime:x,maxAllowedTime:S,brushColor:C=`#69b3a2`,markers:w=[],onHoveredDataChange:T,hoveredCategory:E,onTimelineEventHover:D})=>{let O=(0,d.useRef)(null),k=a??18+h+12,A=r?s+i+k:s,{hoveredTimelineEvent:j,hoveredMarker:M,visibleMarkers:N}=Ox({containerRef:O,data:e,categories:t,width:o,height:s,margin:c,timelineEvents:n,showTimeline:r,timelineHeight:i,timelineOffset:k,timeRange:v,showGrid:l,showAxes:p,axisLabelColor:m,axisLabelSize:h,enableBrush:y,onTimeRangeChange:b,minAllowedTime:x,maxAllowedTime:S,brushColor:C,formatDate:g,formatValue:_,markers:w,onHoveredDataChange:T,hoveredCategory:E,onTimelineEventHover:D});return(0,f.jsxs)(u.Box,{sx:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,position:`relative`},children:[(0,f.jsx)(`svg`,{ref:O,viewBox:`0 0 ${o} ${A}`,preserveAspectRatio:`xMidYMid meet`,style:{width:`100%`,height:`auto`,display:`block`}}),N.map(e=>{let t=(e.x+c.left)/o*100,n=c.top/A*100,r=new Date(e.timestamp),i=g?g(e.timestamp):r.toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0});return(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:e.label?.5:0},children:i}),e.label&&(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:e.label})]}),open:M?.timestamp===e.timestamp,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${t}%`,top:`${n}%`,width:`1px`,height:`${(s-c.top-c.bottom)/A*100}%`,pointerEvents:`none`}})},e.timestamp)}),j&&r&&!M&&(0,f.jsx)(u.Tooltip,{title:(0,f.jsxs)(u.Box,{children:[(0,f.jsx)(u.Box,{sx:{color:`#B6BFFF`,fontFamily:`monospace`,fontSize:`0.8125rem`,mb:.5},children:g?g(j.timestamp):new Date(j.timestamp).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}),(0,f.jsx)(u.Box,{sx:{color:`white`,fontWeight:500},children:j.eventName})]}),open:!0,placement:`top`,arrow:!0,slotProps:{tooltip:{sx:{bgcolor:`#131E7A`,fontSize:`0.875rem`,px:2,py:1,borderRadius:1,boxShadow:`0px 2px 8px rgba(0,0,0,0.15)`,"& .MuiTooltip-arrow":{color:`#131E7A`}}},popper:{sx:{pointerEvents:`none`}}},children:(0,f.jsx)(u.Box,{sx:{position:`absolute`,left:`${(j.x+c.left)/o*100}%`,top:`${(s+k+i/2)/A*100}%`,width:`1px`,height:`1px`,pointerEvents:`none`}})})]})},Ax={colors:{primary:`#992FB9`,background:`#FFFFFF`,border:`#9CA3AF`,highlightBackground:`rgba(31, 41, 55, 0.14)`,monthLabel:`#9ca3af`,tooltipText:`#6b7280`},dimensions:{height:32,eventWidth:2}},jx=(e=`#4B5563`)=>({startHandle:{sx:{position:`absolute`,left:`-6px`,top:`-10px`,width:`14px`,height:`calc(100% + 10px)`,zIndex:3,display:`flex`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`,borderTop:`8px solid ${e}`,transition:`border-top-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`8px`,left:`50%`,transform:`translateX(-50%)`,width:`2px`,height:`calc(100% - 8px)`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}},endHandle:{sx:{position:`absolute`,right:`-6px`,top:`-10px`,width:`14px`,height:`calc(100% + 10px)`,zIndex:3,display:`flex`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`,borderTop:`8px solid ${e}`,transition:`border-top-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`8px`,left:`50%`,transform:`translateX(-50%)`,width:`2px`,height:`calc(100% - 8px)`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&:hover::before":{borderTopColor:e},"&:hover::after":{backgroundColor:e},"&:active::before":{borderTopColor:e},"&:active::after":{backgroundColor:e}}}}),Mx={header:{sx:{}},title:{sx:{m:0}},instructions:{sx:{color:`text.secondary`,minHeight:`40px`,display:`flex`,alignItems:`center`}},monthLabelsContainer:{sx:{justifyContent:`space-between`,px:1.25,height:`20px`,fontSize:`11px`,color:Ax.colors.monthLabel,mb:1}},monthLabel:{sx:{fontSize:`11px`}},timeline:{sx:{position:`relative`,height:`${Ax.dimensions.height}px`,backgroundColor:Ax.colors.background,borderRadius:0,overflow:`visible`,border:`1px solid ${Ax.colors.border}`}},event:{sx:{position:`absolute`,top:0,width:`${Ax.dimensions.eventWidth}px`,height:`100%`,backgroundColor:Ax.colors.primary,cursor:`pointer`,transition:`transform 0.2s`,transformOrigin:`center`}},selection:{sx:{position:`absolute`,top:0,height:`100%`,backgroundColor:Ax.colors.highlightBackground,pointerEvents:`none`}},startHandle:{},endHandle:{},tooltip:{sx:{position:`absolute`,bottom:`-40px`,backgroundColor:`white`,p:`6px 10px`,borderRadius:.5,boxShadow:`0 2px 8px rgba(0,0,0,0.15)`,whiteSpace:`nowrap`,pointerEvents:`none`,zIndex:10,border:`1px solid ${Ax.colors.border}`}},tooltipEventName:{sx:{fontWeight:600}},tooltipDate:{sx:{color:Ax.colors.tooltipText,fontSize:`11px`}}},Nx=(e=`#9CA3AF`)=>({startHandle:{sx:{position:`absolute`,left:`-8px`,top:0,width:`20px`,height:`100%`,zIndex:3,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:`1px`,height:`100%`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:`9px`,height:`16px`,backgroundColor:`#F9FAFB`,border:`1px solid ${e}`,transition:`border-color 0.2s, background-color 0.2s`,pointerEvents:`none`,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:`35% center, 65% center`,backgroundSize:`1px 50%, 1px 50%`,backgroundRepeat:`no-repeat`},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}},endHandle:{sx:{position:`absolute`,right:`-8px`,top:0,width:`20px`,height:`100%`,zIndex:3,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`opacity 0.2s`,"&::before":{content:`""`,position:`absolute`,top:0,left:`50%`,transform:`translateX(-50%)`,width:`1px`,height:`100%`,backgroundColor:e,transition:`background-color 0.2s`,pointerEvents:`none`},"&::after":{content:`""`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:`9px`,height:`16px`,backgroundColor:`#F9FAFB`,border:`1px solid ${e}`,transition:`border-color 0.2s, background-color 0.2s`,pointerEvents:`none`,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`,backgroundPosition:`35% center, 65% center`,backgroundSize:`1px 50%, 1px 50%`,backgroundRepeat:`no-repeat`},"&:hover::before":{backgroundColor:e},"&:hover::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`},"&:active::before":{backgroundColor:e},"&:active::after":{borderColor:e,backgroundImage:`linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%), linear-gradient(to bottom, transparent 0%, transparent 25%, ${e} 25%, ${e} 75%, transparent 75%)`}}}}),Px=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}},Fx=({events:e,selectedRange:t,onSelectionChange:n,enableZoom:r,zoomToSelection:i,visibleRange:a,onVisibleRangeChange:o})=>{Px()&&e.length>1&&(e.every((t,n)=>n===0||t.timestamp>=e[n-1].timestamp)||console.warn(`TimelineChart: events array should be sorted by timestamp for optimal performance and correct behavior.`));let[s,c]=(0,d.useState)(!1),[l,u]=(0,d.useState)(null),[f,p]=(0,d.useState)(null),[m,h]=(0,d.useState)({start:null,end:null}),[g,_]=(0,d.useState)({start:null,end:null}),[v,y]=(0,d.useState)(null),b=(0,d.useRef)(null),x=t??m,S=a??g,C=(0,d.useMemo)(()=>e.length>0?e[0]?.timestamp??0:0,[e]),w=(0,d.useMemo)(()=>e.length>0?e[e.length-1]?.timestamp??0:0,[e]),T=(0,d.useMemo)(()=>i&&S.start&&S.end?S.start:C,[i,S,C]),E=(0,d.useMemo)(()=>i&&S.start&&S.end?S.end:w,[i,S,w]),D=(0,d.useMemo)(()=>E-T,[E,T]),O=(0,d.useMemo)(()=>!r&&x.start!==null&&x.end!==null,[r,x]),k=(0,d.useCallback)(e=>D===0?0:(e-T)/D*100,[T,D]),A=(0,d.useCallback)((e,t)=>{let n=e/t*100;return T+n/100*D},[T,D]),j=(0,d.useCallback)(e=>{t===void 0&&h(e),n?.(e)},[t,n]),M=(0,d.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=A(n,t.width);c(!0),u(r),j({start:r,end:r})},[A,j]),N=(0,d.useCallback)(e=>{if(!s||l===null)return;let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=A(n,t.width);if(f===`start`){let e=Math.min(r,x.end-D*.01);j({start:Math.max(e,T),end:x.end})}else if(f===`end`){let e=Math.max(r,x.start+D*.01);j({start:x.start,end:Math.min(e,E)})}else if(f===`body`){let e=r-l,t=x.end-x.start,n=x.start+e,i=x.end+e;n<T&&(n=T,i=T+t),i>E&&(i=E,n=E-t),j({start:n,end:i}),u(r)}else j({start:Math.min(l,r),end:Math.max(l,r)})},[s,l,f,x,D,T,E,A,j]),P=(0,d.useCallback)(()=>{let e=s;if(c(!1),p(null),e&&i&&x.start&&x.end&&x.start!==x.end){let e={start:x.start,end:x.end};a===void 0&&_(e),o?.(e)}},[s,i,x,a,o]);(0,d.useEffect)(()=>{if(!s||l===null||!b.current)return;let e=e=>{let t=b.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=A(r,n.width);if(f===`start`){let e=Math.min(i,x.end-D*.01);j({start:Math.max(e,T),end:x.end})}else if(f===`end`){let e=Math.max(i,x.start+D*.01);j({start:x.start,end:Math.min(e,E)})}else if(f===`body`){let e=i-l,t=x.end-x.start,n=x.start+e,r=x.end+e;n<T&&(n=T,r=T+t),r>E&&(r=E,n=E-t),j({start:n,end:r}),u(i)}else j({start:Math.min(l,i),end:Math.max(l,i)})},t=()=>{P()};return document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)}},[s,l,f,x,D,T,E,A,j,P]);let F=(0,d.useCallback)(e=>{e.stopPropagation(),x.start!==null&&(c(!0),u(x.start),p(`start`))},[x]),I=(0,d.useCallback)(e=>{e.stopPropagation(),x.end!==null&&(c(!0),u(x.end),p(`end`))},[x]),L=(0,d.useCallback)(e=>{e.stopPropagation();let t=b.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=A(r,n.width);c(!0),u(i),p(`body`)},[A]),R=(0,d.useCallback)(e=>{if(e.cancelable&&r&&e.preventDefault(),!r||!x.start||!x.end||D===0)return;let t=(x.start+x.end)/2,n=x.end-x.start,i=e.deltaY>0?1.1:.9,a=Math.max(n*i,D*.01),o=D*1.5,s=Math.min(a,o),c=t-s/2,l=t+s/2;c<T&&(c=T,l=Math.min(T+s,E)),l>E&&(l=E,c=Math.max(E-s,T)),j({start:c,end:l})},[r,x,D,T,E,j]),z=(0,d.useCallback)(()=>!x.start||!x.end?[]:e.filter(e=>e.timestamp>=x.start&&e.timestamp<=x.end),[e,x]),B=(0,d.useCallback)(()=>{let e={start:C,end:w};a===void 0&&_({start:null,end:null}),o?.(e)},[C,w,a,o]);return{isDragging:s,dragStart:l,dragHandleType:f,internalSelectedRange:x,internalVisibleRange:S,hoveredEvent:v,minDate:T,maxDate:E,timeSpan:D,timelineContainerRef:b,getPositionFromTimestamp:k,getTimestampFromPosition:A,handleMouseDown:M,handleMouseMove:N,handleMouseUp:P,handleWheel:R,handleDoubleClick:(0,d.useCallback)(()=>{i&&B()},[i,B]),handleStartHandleMouseDown:F,handleEndHandleMouseDown:I,handleSelectionBodyMouseDown:L,setHoveredEvent:y,getEventsInRange:z,resetZoom:B,showHandles:O}},Ix=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),Lx=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`}),Rx=e=>{let t=e/(1e3*60*60*24);return t>60?e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`}):t>7?e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,hour:`numeric`,hour12:!0})},zx=()=>{try{return globalThis.process?.env?.NODE_ENV===`development`}catch{return!1}},Bx=(e,t=`arrow`,n)=>{let r=t===`grip`?Nx(n||`#9CA3AF`):jx(n||`#4B5563`);return{header:{...Mx.header,...e?.header},title:{...Mx.title,...e?.title},instructions:{...Mx.instructions,...e?.instructions},monthLabelsContainer:{...Mx.monthLabelsContainer,...e?.monthLabelsContainer},monthLabel:{...Mx.monthLabel,...e?.monthLabel},timeline:{...Mx.timeline,...e?.timeline},event:{...Mx.event,...e?.event},selection:{...Mx.selection,...e?.selection},startHandle:{...r.startHandle,...e?.startHandle},endHandle:{...r.endHandle,...e?.endHandle},tooltip:{...Mx.tooltip,...e?.tooltip},tooltipEventName:{...Mx.tooltipEventName,...e?.tooltipEventName},tooltipDate:{...Mx.tooltipDate,...e?.tooltipDate}}},Vx=({events:e,onSelectionChange:t,selectedRange:n,height:r=Ax.dimensions.height,margin:i={top:0,right:0,bottom:0,left:0},formatDate:a=Ix,formatMonthYear:o=Lx,showMonthLabels:s=!0,monthLabelCount:c=6,enableZoom:l=!0,dragHandleVariant:p=`arrow`,dragHandleColor:m,showHeader:h=!0,title:g=`Event Timeline Selector`,zoomToSelection:_=!1,visibleRange:v,onVisibleRangeChange:y,timeRange:b,onTimeRangeChange:x,slotProps:S})=>{let C=b?{start:b[0],end:b[1]}:v,w=x?e=>{e.start!==null&&e.end!==null&&x([e.start,e.end])}:y;zx()&&e.length>500&&console.warn(`TimelineChart: Rendering ${e.length} events may impact performance. Consider implementing virtualization or canvas rendering for datasets larger than 500 events.`);let T=(0,d.useMemo)(()=>Bx(S,p,m),[S,p,m]),{isDragging:E,dragHandleType:D,internalSelectedRange:O,hoveredEvent:k,minDate:A,timeSpan:j,timelineContainerRef:M,getPositionFromTimestamp:N,handleMouseDown:P,handleWheel:F,handleDoubleClick:I,handleStartHandleMouseDown:L,handleEndHandleMouseDown:R,handleSelectionBodyMouseDown:z,setHoveredEvent:B,getEventsInRange:V,showHandles:H}=Fx({events:e,selectedRange:n,onSelectionChange:t,enableZoom:l,zoomToSelection:_,visibleRange:C,onVisibleRangeChange:w}),ee=O.start&&O.end?`Selected: ${a(O.start)} - ${a(O.end)} (${V().length} events)`:`Click and drag on the timeline below to select a date range. Use mouse wheel to zoom in/out.`;return(0,f.jsxs)(u.Stack,{sx:{width:`100%`},children:[h&&(0,f.jsxs)(u.Stack,{spacing:1,sx:{mb:3},...T.header,children:[(0,f.jsx)(u.Typography,{variant:`h5`,...T.title,children:g}),(0,f.jsx)(u.Typography,{variant:`body2`,...T.instructions,children:ee})]}),s&&(0,f.jsx)(u.Stack,{direction:`row`,...T.monthLabelsContainer,sx:{...T.monthLabelsContainer.sx,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:Array.from({length:c},(e,t)=>{let n=A+j/(c-1)*t,r=Rx(j);return(0,f.jsx)(u.Typography,{variant:`caption`,...T.monthLabel,children:r(n)},t)})}),(0,f.jsxs)(u.Box,{...T.timeline,sx:{...T.timeline.sx,height:`${r}px`,paddingLeft:`${i.left}px`,paddingRight:`${i.right}px`},children:[(0,f.jsx)(u.Box,{sx:{position:`absolute`,top:i.top,left:0,right:0,bottom:i.bottom},children:e.map((e,t)=>{let n=N(e.timestamp);return(0,f.jsx)(u.Box,{onMouseEnter:()=>B(e),onMouseLeave:()=>B(null),"aria-label":`Event: ${e.eventName} at ${a(e.timestamp)}`,...T.event,sx:{...T.event.sx,left:`${n}%`,transform:k?.timestamp===e.timestamp?`scaleX(2)`:`scaleX(1)`}},`${e.timestamp}-${t}`)})}),O.start&&O.end&&(!_||E)&&(0,f.jsx)(u.Box,{...T.selection,onMouseDown:H&&!E?z:void 0,sx:{...T.selection.sx,left:`${N(O.start)}%`,width:`${N(O.end)-N(O.start)}%`,pointerEvents:H?`all`:`none`,zIndex:2,cursor:H&&!E?D===`body`?`grabbing`:`grab`:`default`},children:H&&!(E&&D===null)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Box,{...T.startHandle,onMouseDown:L,sx:{...T.startHandle.sx,cursor:`ew-resize`,opacity:E&&D!==`start`?.5:1},"aria-label":`Drag to adjust start of selection`}),(0,f.jsx)(u.Box,{...T.endHandle,onMouseDown:R,sx:{...T.endHandle.sx,cursor:`ew-resize`,opacity:E&&D!==`end`?.5:1},"aria-label":`Drag to adjust end of selection`})]})}),(0,f.jsx)(u.Box,{ref:M,role:`application`,"aria-label":`Interactive timeline - click and drag to select date range`,"aria-describedby":h?void 0:`timeline-instructions`,tabIndex:0,sx:{position:`absolute`,top:0,left:0,right:0,height:`100%`,cursor:`crosshair`,pointerEvents:`all`,zIndex:1},onMouseDown:P,onWheel:F,onDoubleClick:I}),!h&&(0,f.jsx)(`span`,{id:`timeline-instructions`,style:{display:`none`},children:ee}),k&&(0,f.jsxs)(u.Box,{role:`tooltip`,"aria-live":`polite`,...T.tooltip,sx:{...T.tooltip.sx,left:`${N(k.timestamp)}%`,transform:`translateX(-50%)`},children:[(0,f.jsx)(u.Typography,{variant:`body2`,...T.tooltipEventName,children:k.eventName}),(0,f.jsx)(u.Typography,{variant:`caption`,...T.tooltipDate,children:a(k.timestamp)})]})]})]})},Hx=`#8b5cf6`,Ux=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),Wx=({events:e,title:t=`Events in Selected Range`,maxHeight:n=`200px`,formatDate:r=Ux,primaryColor:i=Hx})=>e.length===0?null:(0,f.jsxs)(`div`,{style:{marginTop:`24px`,padding:`20px`,backgroundColor:`#f9fafb`,borderRadius:`8px`,border:`1px solid #e5e7eb`},children:[(0,f.jsxs)(`h3`,{style:{margin:`0 0 12px 0`,fontSize:`16px`,color:`#374151`},children:[t,` (`,e.length,`)`]}),(0,f.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,gap:`8px`,maxHeight:n,overflowY:`auto`},children:e.map((e,t)=>(0,f.jsxs)(`div`,{style:{padding:`8px 12px`,backgroundColor:`white`,borderRadius:`4px`,fontSize:`13px`,border:`1px solid #e5e7eb`},children:[(0,f.jsx)(`div`,{style:{fontWeight:500,color:i},children:e.eventName}),(0,f.jsx)(`div`,{style:{color:`#6b7280`,fontSize:`12px`,marginTop:`2px`},children:r(e.timestamp)})]},`${e.timestamp}-${t}`))})]});function Gx(e,t){let n=t-1-e,r=h.length,i=Math.floor(n/Math.max(1,t-1)*(r-1));return h[Math.min(Math.max(0,i),r-1)]??h[0]??`#000000`}function Kx(e){return Array.from({length:e},(t,n)=>Gx(n,e))}var qx=Kx(5),Jx={critical:`#dc3545`,high:`#fd7e14`,medium:`#ffc107`,low:`#17a2b8`,complete:m.neoDigitalGreen[600],inProgress:`#007bff`,farthest:qx[0],far:qx[1],close:qx[2],closest:qx[3],completed:qx[4],primary:`#007bff`,secondary:`#6c757d`,success:m.neoDigitalGreen[600],danger:`#dc3545`,warning:`#ffc107`,info:`#17a2b8`,light:m.neoGrey[200],dark:`#343a40`},Yx={migration:qx,severity:[Jx.critical,Jx.high,Jx.medium,Jx.low,Jx.info],status:[Jx.danger,Jx.warning,Jx.success],extended:[`#e74c3c`,`#e67e22`,`#f39c12`,`#2ecc71`,`#3498db`,`#9b59b6`,`#1abc9c`,`#95a5a6`],colorblindSafe:[`#0173B2`,`#DE8F05`,`#029E73`,`#CC78BC`,`#CA9161`,`#FBAFE4`,`#949494`,`#ECE133`]},Xx={FARTHEST:`Farthest`,FAR:`Far`,CLOSE:`Close`,CLOSEST:`Closest`,COMPLETE:`Complete`,CRITICAL:`Critical`,HIGH:`High`,MEDIUM:`Medium`,LOW:`Low`,INFO:`Info`,NOT_APPLICABLE:`N/A`,NO_LST:`No LST`,DATA_MISSING:`Data Missing`};exports.CAMPAIGN_DATA_MISSING=j,exports.CAMPAIGN_NOT_APPLICABLE=k,exports.CAMPAIGN_NO_LST=A,exports.CATEGORY_LABELS=Xx,exports.ChronoChart=Sh,exports.ChronoPerspectiveChart=Sh,exports.D3StackedAreaChart=Eh,exports.D3StackedBarChart=Oh,exports.DEFAULT_CHART_COLORS=m,exports.DEFAULT_CHART_CONFIG=b,exports.DEFAULT_STACKED_AREA_COLORS=Jx,exports.MEASURE_GRADIENT_COLORS=h,exports.MODERNE_VULNERABILITY_COLORS=x,exports.MorphChart=uh,exports.ParliamentChart=Dx,exports.STACKED_AREA_PALETTES=Yx,exports.StackedAreaWithTimeline=kx,exports.TimelineChart=Vx,exports.TimelineSelectedEvents=Wx,exports.calculateDataSeries=Tx,exports.calculateOptimalArcAngle=fh,exports.calculateOptimalSeatSize=ph,exports.generateMeasureGradient=Kx;
|