@decidables/accumulable-elements 0.3.4 → 0.3.5
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/CHANGELOG.md +9 -0
- package/lib/accumulableElements.esm.js +89 -41
- package/lib/accumulableElements.esm.js.map +1 -1
- package/lib/accumulableElements.esm.min.js +53 -35
- package/lib/accumulableElements.esm.min.js.map +1 -1
- package/lib/accumulableElements.umd.js +89 -41
- package/lib/accumulableElements.umd.js.map +1 -1
- package/lib/accumulableElements.umd.min.js +48 -30
- package/lib/accumulableElements.umd.min.js.map +1 -1
- package/package.json +2 -2
- package/src/components/ddm-model.js +137 -60
|
@@ -14,12 +14,12 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const f=globalThis,C=f.trustedTypes,v=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,A="$lit$",x=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+x,R=`<${E}>`,S=document,N=()=>S.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,w=Array.isArray,D="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,T=/>/g,V=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),$=/'/g,H=/"/g,z=/^(?:script|style|textarea|title)$/i,G=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),Y=G(1),X=G(2),J=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),_=new WeakMap,K=S.createTreeWalker(S,129);function
|
|
17
|
+
const f=globalThis,C=f.trustedTypes,v=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,A="$lit$",x=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+x,R=`<${E}>`,S=document,N=()=>S.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,w=Array.isArray,D="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,T=/>/g,V=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),$=/'/g,H=/"/g,z=/^(?:script|style|textarea|title)$/i,G=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),Y=G(1),X=G(2),J=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),_=new WeakMap,K=S.createTreeWalker(S,129);function P(t,e){if(!w(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==v?v.createHTML(e):e}const Z=(t,e)=>{const i=t.length-1,s=[];let r,a=2===e?"<svg>":3===e?"<math>":"",n=M;for(let e=0;e<i;e++){const i=t[e];let o,l,c=-1,d=0;for(;d<i.length&&(n.lastIndex=d,l=n.exec(i),null!==l);)d=n.lastIndex,n===M?"!--"===l[1]?n=k:void 0!==l[1]?n=T:void 0!==l[2]?(z.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=V):void 0!==l[3]&&(n=V):n===V?">"===l[0]?(n=r??M,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,o=l[1],n=void 0===l[3]?V:'"'===l[3]?H:$):n===H||n===$?n=V:n===k||n===T?n=M:(n=V,r=void 0);const u=n===V&&t[e+1].startsWith("/>")?" ":"";a+=n===M?i+R:c>=0?(s.push(o),i.slice(0,c)+A+i.slice(c)+x+u):i+x+(-2===c?e:u)}return[P(t,a+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class O{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,a=0;const n=t.length-1,o=this.parts,[l,c]=Z(t,e);if(this.el=O.createElement(l,i),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=K.nextNode())&&o.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(A)){const e=c[a++],i=s.getAttribute(t).split(x),n=/([.?@])?(.*)/.exec(e);o.push({type:1,index:r,name:n[2],strings:i,ctor:"."===n[1]?it:"?"===n[1]?st:"@"===n[1]?rt:et}),s.removeAttribute(t)}else t.startsWith(x)&&(o.push({type:6,index:r}),s.removeAttribute(t));if(z.test(s.tagName)){const t=s.textContent.split(x),e=t.length-1;if(e>0){s.textContent=C?C.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],N()),K.nextNode(),o.push({type:2,index:++r});s.append(t[e],N())}}}else if(8===s.nodeType)if(s.data===E)o.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(x,t+1));)o.push({type:7,index:r}),t+=x.length-1}r++}}static createElement(t,e){const i=S.createElement("template");return i.innerHTML=t,i}}function j(t,e,i=t,s){if(e===J)return e;let r=void 0!==s?i._$Co?.[s]:i._$Cl;const a=L(e)?void 0:e._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(t),r._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(e=j(t,r._$AS(t,e.values),r,s)),e}class q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??S).importNode(e,!0);K.currentNode=s;let r=K.nextNode(),a=0,n=0,o=i[0];for(;void 0!==o;){if(a===o.index){let e;2===o.type?e=new tt(r,r.nextSibling,this,t):1===o.type?e=new o.ctor(r,o.name,o.strings,this,t):6===o.type&&(e=new at(r,this,t)),this._$AV.push(e),o=i[++n]}a!==o?.index&&(r=K.nextNode(),a++)}return K.currentNode=S,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=j(this,t,e),L(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>w(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==W&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=O.createElement(P(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new q(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=_.get(t.strings);return void 0===e&&_.set(t.strings,e=new O(t)),e}k(t){w(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new tt(this.O(N()),this.O(N()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}_$AI(t,e=this,i,s){const r=this.strings;let a=!1;if(void 0===r)t=j(this,t,e,0),a=!L(t)||t!==this._$AH&&t!==J,a&&(this._$AH=t);else{const s=t;let n,o;for(t=r[0],n=0;n<r.length-1;n++)o=j(this,s[i+n],e,n),o===J&&(o=this._$AH[n]),a||=!L(o)||o!==this._$AH[n],o===W?t=W:t!==W&&(t+=(o??"")+r[n+1]),this._$AH[n]=o}a&&!s&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class it extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}class st extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==W)}}class rt extends et{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){if((t=j(this,t,e,0)??W)===J)return;const i=this._$AH,s=t===W&&i!==W||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==W&&(i===W||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){j(this,t)}}const nt=f.litHtmlPolyfillSupport;nt?.(O,tt),(f.litHtmlVersions??=[]).push("3.3.1");const ot=globalThis;
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/class lt extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new tt(e.insertBefore(N(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return J}}lt._$litElement$=!0,lt.finalized=!0,ot.litElementHydrateSupport?.({LitElement:lt});const ct=ot.litElementPolyfillSupport;function dt(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ut(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ht(t){let e,i,s;function r(t,s,r=0,a=t.length){if(r<a){if(0!==e(s,s))return a;do{const e=r+a>>>1;i(t[e],s)<0?r=e+1:a=e}while(r<a)}return r}return 2!==t.length?(e=dt,i=(e,i)=>dt(t(e),i),s=(e,i)=>t(e)-i):(e=t===dt||t===ut?t:gt,i=t,s=t),{left:r,center:function(t,e,i=0,a=t.length){const n=r(t,e,i,a-1);return n>i&&s(t[n-1],e)>-s(t[n],e)?n-1:n},right:function(t,s,r=0,a=t.length){if(r<a){if(0!==e(s,s))return a;do{const e=r+a>>>1;i(t[e],s)<=0?r=e+1:a=e}while(r<a)}return r}}}function gt(){return 0}ct?.({LitElement:lt}),(ot.litElementVersions??=[]).push("4.2.1");const pt=ht(dt).right;ht(function(t){return null===t?NaN:+t}).center;const mt=Math.sqrt(50),bt=Math.sqrt(10),yt=Math.sqrt(2);function Qt(t,e,i){const s=(e-t)/Math.max(0,i),r=Math.floor(Math.log10(s)),a=s/Math.pow(10,r),n=a>=mt?10:a>=bt?5:a>=yt?2:1;let o,l,c;return r<0?(c=Math.pow(10,-r)/n,o=Math.round(t*c),l=Math.round(e*c),o/c<t&&++o,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*n,o=Math.round(t/c),l=Math.round(e/c),o*c<t&&++o,l*c>e&&--l),l<o&&.5<=i&&i<2?Qt(t,e,2*i):[o,l,c]}function Bt(t,e,i){return Qt(t=+t,e=+e,i=+i)[2]}function Ut(t){return t}var Ft=1e-6;function It(t){return"translate("+t+",0)"}function ft(t){return"translate(0,"+t+")"}function Ct(t){return e=>+t(e)}function vt(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),i=>+t(i)+e}function At(){return!this.__axis}function xt(t,e){var i=[],s=null,r=null,a=6,n=6,o=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,d=4===t||2===t?"x":"y",u=1===t||3===t?It:ft;function h(h){var g=null==s?e.ticks?e.ticks.apply(e,i):e.domain():s,p=null==r?e.tickFormat?e.tickFormat.apply(e,i):Ut:r,m=Math.max(a,0)+o,b=e.range(),y=+b[0]+l,Q=+b[b.length-1]+l,B=(e.bandwidth?vt:Ct)(e.copy(),l),U=h.selection?h.selection():h,F=U.selectAll(".domain").data([null]),I=U.selectAll(".tick").data(g,e).order(),f=I.exit(),C=I.enter().append("g").attr("class","tick"),v=I.select("line"),A=I.select("text");F=F.merge(F.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(C),v=v.merge(C.append("line").attr("stroke","currentColor").attr(d+"2",c*a)),A=A.merge(C.append("text").attr("fill","currentColor").attr(d,c*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==U&&(F=F.transition(h),I=I.transition(h),v=v.transition(h),A=A.transition(h),f=f.transition(h).attr("opacity",Ft).attr("transform",function(t){return isFinite(t=B(t))?u(t+l):this.getAttribute("transform")}),C.attr("opacity",Ft).attr("transform",function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:B(t))+l)})),f.remove(),F.attr("d",4===t||2===t?n?"M"+c*n+","+y+"H"+l+"V"+Q+"H"+c*n:"M"+l+","+y+"V"+Q:n?"M"+y+","+c*n+"V"+l+"H"+Q+"V"+c*n:"M"+y+","+l+"H"+Q),I.attr("opacity",1).attr("transform",function(t){return u(B(t)+l)}),v.attr(d+"2",c*a),A.attr(d,c*m).text(p),U.filter(At).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),U.each(function(){this.__axis=B})}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return i=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),h):i.slice()},h.tickValues=function(t){return arguments.length?(s=null==t?null:Array.from(t),h):s&&s.slice()},h.tickFormat=function(t){return arguments.length?(r=t,h):r},h.tickSize=function(t){return arguments.length?(a=n=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(n=+t,h):n},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(l=+t,h):l},h}function Et(t){return xt(4,t)}var Rt={value:()=>{}};function St(){for(var t,e=0,i=arguments.length,s={};e<i;++e){if(!(t=arguments[e]+"")||t in s||/[\s.]/.test(t))throw new Error("illegal type: "+t);s[t]=[]}return new Nt(s)}function Nt(t){this._=t}function Lt(t,e){for(var i,s=0,r=t.length;s<r;++s)if((i=t[s]).name===e)return i.value}function wt(t,e,i){for(var s=0,r=t.length;s<r;++s)if(t[s].name===e){t[s]=Rt,t=t.slice(0,s).concat(t.slice(s+1));break}return null!=i&&t.push({name:e,value:i}),t}Nt.prototype=St.prototype={constructor:Nt,on:function(t,e){var i,s,r=this._,a=(s=r,(t+"").trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!s.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),n=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++n<o;)if(i=(t=a[n]).type)r[i]=wt(r[i],t.name,e);else if(null==e)for(i in r)r[i]=wt(r[i],t.name,null);return this}for(;++n<o;)if((i=(t=a[n]).type)&&(i=Lt(r[i],t.name)))return i},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new Nt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var i,s,r=new Array(i),a=0;a<i;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,i=(s=this._[t]).length;a<i;++a)s[a].value.apply(e,r)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var s=this._[t],r=0,a=s.length;r<a;++r)s[r].value.apply(e,i)}};var Dt="http://www.w3.org/1999/xhtml",Mt={svg:"http://www.w3.org/2000/svg",xhtml:Dt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function kt(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),Mt.hasOwnProperty(e)?{space:Mt[e],local:t}:t}function Tt(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Dt&&e.documentElement.namespaceURI===Dt?e.createElement(t):e.createElementNS(i,t)}}function Vt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function $t(t){var e=kt(t);return(e.local?Vt:Tt)(e)}function Ht(){}function zt(t){return null==t?Ht:function(){return this.querySelector(t)}}function Gt(){return[]}function Yt(t){return null==t?Gt:function(){return this.querySelectorAll(t)}}function Xt(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function Jt(t){return function(){return this.matches(t)}}function Wt(t){return function(e){return e.matches(t)}}var _t=Array.prototype.find;function Kt(){return this.firstElementChild}var Zt=Array.prototype.filter;function Pt(){return Array.from(this.children)}function Ot(t){return new Array(t.length)}function jt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function qt(t,e,i,s,r,a){for(var n,o=0,l=e.length,c=a.length;o<c;++o)(n=e[o])?(n.__data__=a[o],s[o]=n):i[o]=new jt(t,a[o]);for(;o<l;++o)(n=e[o])&&(r[o]=n)}function te(t,e,i,s,r,a,n){var o,l,c,d=new Map,u=e.length,h=a.length,g=new Array(u);for(o=0;o<u;++o)(l=e[o])&&(g[o]=c=n.call(l,l.__data__,o,e)+"",d.has(c)?r[o]=l:d.set(c,l));for(o=0;o<h;++o)c=n.call(t,a[o],o,a)+"",(l=d.get(c))?(s[o]=l,l.__data__=a[o],d.delete(c)):i[o]=new jt(t,a[o]);for(o=0;o<u;++o)(l=e[o])&&d.get(g[o])===l&&(r[o]=l)}function ee(t){return t.__data__}function ie(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function se(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function re(t){return function(){this.removeAttribute(t)}}function ae(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ne(t,e){return function(){this.setAttribute(t,e)}}function oe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function le(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function ce(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function de(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ue(t){return function(){this.style.removeProperty(t)}}function he(t,e,i){return function(){this.style.setProperty(t,e,i)}}function ge(t,e,i){return function(){var s=e.apply(this,arguments);null==s?this.style.removeProperty(t):this.style.setProperty(t,s,i)}}function pe(t,e){return t.style.getPropertyValue(e)||de(t).getComputedStyle(t,null).getPropertyValue(e)}function me(t){return function(){delete this[t]}}function be(t,e){return function(){this[t]=e}}function ye(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Qe(t){return t.trim().split(/^|\s+/)}function Be(t){return t.classList||new Ue(t)}function Ue(t){this._node=t,this._names=Qe(t.getAttribute("class")||"")}function Fe(t,e){for(var i=Be(t),s=-1,r=e.length;++s<r;)i.add(e[s])}function Ie(t,e){for(var i=Be(t),s=-1,r=e.length;++s<r;)i.remove(e[s])}function fe(t){return function(){Fe(this,t)}}function Ce(t){return function(){Ie(this,t)}}function ve(t,e){return function(){(e.apply(this,arguments)?Fe:Ie)(this,t)}}function Ae(){this.textContent=""}function xe(t){return function(){this.textContent=t}}function Ee(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Re(){this.innerHTML=""}function Se(t){return function(){this.innerHTML=t}}function Ne(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Le(){this.nextSibling&&this.parentNode.appendChild(this)}function we(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function De(){return null}function Me(){var t=this.parentNode;t&&t.removeChild(this)}function ke(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Te(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ve(t){return function(){var e=this.__on;if(e){for(var i,s=0,r=-1,a=e.length;s<a;++s)i=e[s],t.type&&i.type!==t.type||i.name!==t.name?e[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?e.length=r:delete this.__on}}}function $e(t,e,i){return function(){var s,r=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var n=0,o=r.length;n<o;++n)if((s=r[n]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=i),void(s.value=e);this.addEventListener(t.type,a,i),s={type:t.type,name:t.name,value:e,listener:a,options:i},r?r.push(s):this.__on=[s]}}function He(t,e,i){var s=de(t),r=s.CustomEvent;"function"==typeof r?r=new r(e,i):(r=s.document.createEvent("Event"),i?(r.initEvent(e,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function ze(t,e){return function(){return He(this,t,e)}}function Ge(t,e){return function(){return He(this,t,e.apply(this,arguments))}}jt.prototype={constructor:jt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Ue.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ye=[null];function Xe(t,e){this._groups=t,this._parents=e}function Je(){return new Xe([[document.documentElement]],Ye)}function We(t){return"string"==typeof t?new Xe([[document.querySelector(t)]],[document.documentElement]):new Xe([[t]],Ye)}Xe.prototype=Je.prototype={constructor:Xe,select:function(t){"function"!=typeof t&&(t=zt(t));for(var e=this._groups,i=e.length,s=new Array(i),r=0;r<i;++r)for(var a,n,o=e[r],l=o.length,c=s[r]=new Array(l),d=0;d<l;++d)(a=o[d])&&(n=t.call(a,a.__data__,d,o))&&("__data__"in a&&(n.__data__=a.__data__),c[d]=n);return new Xe(s,this._parents)},selectAll:function(t){t="function"==typeof t?Xt(t):Yt(t);for(var e=this._groups,i=e.length,s=[],r=[],a=0;a<i;++a)for(var n,o=e[a],l=o.length,c=0;c<l;++c)(n=o[c])&&(s.push(t.call(n,n.__data__,c,o)),r.push(n));return new Xe(s,r)},selectChild:function(t){return this.select(null==t?Kt:function(t){return function(){return _t.call(this.children,t)}}("function"==typeof t?t:Wt(t)))},selectChildren:function(t){return this.selectAll(null==t?Pt:function(t){return function(){return Zt.call(this.children,t)}}("function"==typeof t?t:Wt(t)))},filter:function(t){"function"!=typeof t&&(t=Jt(t));for(var e=this._groups,i=e.length,s=new Array(i),r=0;r<i;++r)for(var a,n=e[r],o=n.length,l=s[r]=[],c=0;c<o;++c)(a=n[c])&&t.call(a,a.__data__,c,n)&&l.push(a);return new Xe(s,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,ee);var i=e?te:qt,s=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,n=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var d=s[c],u=r[c],h=u.length,g=ie(t.call(d,d&&d.__data__,c,s)),p=g.length,m=o[c]=new Array(p),b=n[c]=new Array(p);i(d,u,m,b,l[c]=new Array(h),g,e);for(var y,Q,B=0,U=0;B<p;++B)if(y=m[B]){for(B>=U&&(U=B+1);!(Q=b[U])&&++U<p;);y._next=Q||null}}return(n=new Xe(n,s))._enter=o,n._exit=l,n},enter:function(){return new Xe(this._enter||this._groups.map(Ot),this._parents)},exit:function(){return new Xe(this._exit||this._groups.map(Ot),this._parents)},join:function(t,e,i){var s=this.enter(),r=this,a=this.exit();return"function"==typeof t?(s=t(s))&&(s=s.selection()):s=s.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==i?a.remove():i(a),s&&r?s.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,i=this._groups,s=e._groups,r=i.length,a=s.length,n=Math.min(r,a),o=new Array(r),l=0;l<n;++l)for(var c,d=i[l],u=s[l],h=d.length,g=o[l]=new Array(h),p=0;p<h;++p)(c=d[p]||u[p])&&(g[p]=c);for(;l<r;++l)o[l]=i[l];return new Xe(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var s,r=t[e],a=r.length-1,n=r[a];--a>=0;)(s=r[a])&&(n&&4^s.compareDocumentPosition(n)&&n.parentNode.insertBefore(s,n),n=s);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=se);for(var i=this._groups,s=i.length,r=new Array(s),a=0;a<s;++a){for(var n,o=i[a],l=o.length,c=r[a]=new Array(l),d=0;d<l;++d)(n=o[d])&&(c[d]=n);c.sort(e)}return new Xe(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var s=t[e],r=0,a=s.length;r<a;++r){var n=s[r];if(n)return n}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var r,a=e[i],n=0,o=a.length;n<o;++n)(r=a[n])&&t.call(r,r.__data__,n,a);return this},attr:function(t,e){var i=kt(t);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((null==e?i.local?ae:re:"function"==typeof e?i.local?ce:le:i.local?oe:ne)(i,e))},style:function(t,e,i){return arguments.length>1?this.each((null==e?ue:"function"==typeof e?ge:he)(t,e,null==i?"":i)):pe(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?me:"function"==typeof e?ye:be)(t,e)):this.node()[t]},classed:function(t,e){var i=Qe(t+"");if(arguments.length<2){for(var s=Be(this.node()),r=-1,a=i.length;++r<a;)if(!s.contains(i[r]))return!1;return!0}return this.each(("function"==typeof e?ve:e?fe:Ce)(i,e))},text:function(t){return arguments.length?this.each(null==t?Ae:("function"==typeof t?Ee:xe)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Re:("function"==typeof t?Ne:Se)(t)):this.node().innerHTML},raise:function(){return this.each(Le)},lower:function(){return this.each(we)},append:function(t){var e="function"==typeof t?t:$t(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var i="function"==typeof t?t:$t(t),s=null==e?De:"function"==typeof e?e:zt(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})},remove:function(){return this.each(Me)},clone:function(t){return this.select(t?Te:ke)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,i){var s,r,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}(t+""),n=a.length;if(!(arguments.length<2)){for(o=e?$e:Ve,s=0;s<n;++s)this.each(o(a[s],e,i));return this}var o=this.node().__on;if(o)for(var l,c=0,d=o.length;c<d;++c)for(s=0,l=o[c];s<n;++s)if((r=a[s]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ge:ze)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var s,r=t[e],a=0,n=r.length;a<n;++a)(s=r[a])&&(yield s)}};var _e=0;function Ke(){return new Ze}function Ze(){this._="@"+(++_e).toString(36)}function Pe(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var i=e.ownerSVGElement||e;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=t.clientX,s.y=t.clientY,[(s=s.matrixTransform(e.getScreenCTM().inverse())).x,s.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}Ze.prototype=Ke.prototype={constructor:Ze,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const Oe={passive:!1},je={capture:!0,passive:!1};function qe(t){t.stopImmediatePropagation()}function ti(t){t.preventDefault(),t.stopImmediatePropagation()}var ei=t=>()=>t;function ii(t,{sourceEvent:e,subject:i,target:s,identifier:r,active:a,x:n,y:o,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:n,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}function si(t){return!t.ctrlKey&&!t.button}function ri(){return this.parentNode}function ai(t,e){return null==e?{x:t.x,y:t.y}:e}function ni(){return navigator.maxTouchPoints||"ontouchstart"in this}function oi(){var t,e,i,s,r=si,a=ri,n=ai,o=ni,l={},c=St("start","drag","end"),d=0,u=0;function h(t){t.on("mousedown.drag",g).filter(o).on("touchstart.drag",b).on("touchmove.drag",y,Oe).on("touchend.drag touchcancel.drag",Q).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(n,o){if(!s&&r.call(this,n,o)){var l=B(this,a.call(this,n,o),n,o,"mouse");l&&(We(n.view).on("mousemove.drag",p,je).on("mouseup.drag",m,je),function(t){var e=t.document.documentElement,i=We(t).on("dragstart.drag",ti,je);"onselectstart"in e?i.on("selectstart.drag",ti,je):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(n.view),qe(n),i=!1,t=n.clientX,e=n.clientY,l("start",n))}}function p(s){if(ti(s),!i){var r=s.clientX-t,a=s.clientY-e;i=r*r+a*a>u}l.mouse("drag",s)}function m(t){We(t.view).on("mousemove.drag mouseup.drag",null),function(t,e){var i=t.document.documentElement,s=We(t).on("dragstart.drag",null);e&&(s.on("click.drag",ti,je),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}(t.view,i),ti(t),l.mouse("end",t)}function b(t,e){if(r.call(this,t,e)){var i,s,n=t.changedTouches,o=a.call(this,t,e),l=n.length;for(i=0;i<l;++i)(s=B(this,o,t,e,n[i].identifier,n[i]))&&(qe(t),s("start",t,n[i]))}}function y(t){var e,i,s=t.changedTouches,r=s.length;for(e=0;e<r;++e)(i=l[s[e].identifier])&&(ti(t),i("drag",t,s[e]))}function Q(t){var e,i,r=t.changedTouches,a=r.length;for(s&&clearTimeout(s),s=setTimeout(function(){s=null},500),e=0;e<a;++e)(i=l[r[e].identifier])&&(qe(t),i("end",t,r[e]))}function B(t,e,i,s,r,a){var o,u,g,p=c.copy(),m=Pe(a||i,e);if(null!=(g=n.call(t,new ii("beforestart",{sourceEvent:i,target:h,identifier:r,active:d,x:m[0],y:m[1],dx:0,dy:0,dispatch:p}),s)))return o=g.x-m[0]||0,u=g.y-m[1]||0,function i(a,n,c){var b,y=m;switch(a){case"start":l[r]=i,b=d++;break;case"end":delete l[r],--d;case"drag":m=Pe(c||n,e),b=d}p.call(a,t,new ii(a,{sourceEvent:n,subject:g,target:h,identifier:r,active:b,x:m[0]+o,y:m[1]+u,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:p}),s)}}return h.filter=function(t){return arguments.length?(r="function"==typeof t?t:ei(!!t),h):r},h.container=function(t){return arguments.length?(a="function"==typeof t?t:ei(t),h):a},h.subject=function(t){return arguments.length?(n="function"==typeof t?t:ei(t),h):n},h.touchable=function(t){return arguments.length?(o="function"==typeof t?t:ei(!!t),h):o},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(u=(t=+t)*t,h):Math.sqrt(u)},h}function li(t,e,i){t.prototype=e.prototype=i,i.constructor=t}function ci(t,e){var i=Object.create(t.prototype);for(var s in e)i[s]=e[s];return i}function di(){}ii.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ui=.7,hi=1/ui,gi="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bi=/^#([0-9a-f]{3,8})$/,yi=new RegExp(`^rgb\\(${gi},${gi},${gi}\\)$`),Qi=new RegExp(`^rgb\\(${mi},${mi},${mi}\\)$`),Bi=new RegExp(`^rgba\\(${gi},${gi},${gi},${pi}\\)$`),Ui=new RegExp(`^rgba\\(${mi},${mi},${mi},${pi}\\)$`),Fi=new RegExp(`^hsl\\(${pi},${mi},${mi}\\)$`),Ii=new RegExp(`^hsla\\(${pi},${mi},${mi},${pi}\\)$`),fi={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};function Ci(){return this.rgb().formatHex()}function vi(){return this.rgb().formatRgb()}function Ai(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=bi.exec(t))?(i=e[1].length,e=parseInt(e[1],16),6===i?xi(e):3===i?new Si(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?Ei(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?Ei(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yi.exec(t))?new Si(e[1],e[2],e[3],1):(e=Qi.exec(t))?new Si(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Bi.exec(t))?Ei(e[1],e[2],e[3],e[4]):(e=Ui.exec(t))?Ei(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Fi.exec(t))?ki(e[1],e[2]/100,e[3]/100,1):(e=Ii.exec(t))?ki(e[1],e[2]/100,e[3]/100,e[4]):fi.hasOwnProperty(t)?xi(fi[t]):"transparent"===t?new Si(NaN,NaN,NaN,0):null}function xi(t){return new Si(t>>16&255,t>>8&255,255&t,1)}function Ei(t,e,i,s){return s<=0&&(t=e=i=NaN),new Si(t,e,i,s)}function Ri(t,e,i,s){return 1===arguments.length?function(t){return t instanceof di||(t=Ai(t)),t?new Si((t=t.rgb()).r,t.g,t.b,t.opacity):new Si}(t):new Si(t,e,i,null==s?1:s)}function Si(t,e,i,s){this.r=+t,this.g=+e,this.b=+i,this.opacity=+s}function Ni(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}`}function Li(){const t=wi(this.opacity);return`${1===t?"rgb(":"rgba("}${Di(this.r)}, ${Di(this.g)}, ${Di(this.b)}${1===t?")":`, ${t})`}`}function wi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Di(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mi(t){return((t=Di(t))<16?"0":"")+t.toString(16)}function ki(t,e,i,s){return s<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new Vi(t,e,i,s)}function Ti(t){if(t instanceof Vi)return new Vi(t.h,t.s,t.l,t.opacity);if(t instanceof di||(t=Ai(t)),!t)return new Vi;if(t instanceof Vi)return t;var e=(t=t.rgb()).r/255,i=t.g/255,s=t.b/255,r=Math.min(e,i,s),a=Math.max(e,i,s),n=NaN,o=a-r,l=(a+r)/2;return o?(n=e===a?(i-s)/o+6*(i<s):i===a?(s-e)/o+2:(e-i)/o+4,o/=l<.5?a+r:2-a-r,n*=60):o=l>0&&l<1?0:n,new Vi(n,o,l,t.opacity)}function Vi(t,e,i,s){this.h=+t,this.s=+e,this.l=+i,this.opacity=+s}function $i(t){return(t=(t||0)%360)<0?t+360:t}function Hi(t){return Math.max(0,Math.min(1,t||0))}function zi(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}li(di,Ai,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ci,formatHex:Ci,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ti(this).formatHsl()},formatRgb:vi,toString:vi}),li(Si,Ri,ci(di,{brighter(t){return t=null==t?hi:Math.pow(hi,t),new Si(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ui:Math.pow(ui,t),new Si(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Si(Di(this.r),Di(this.g),Di(this.b),wi(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:Ni,formatHex:Ni,formatHex8:function(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}${Mi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Li,toString:Li})),li(Vi,function(t,e,i,s){return 1===arguments.length?Ti(t):new Vi(t,e,i,null==s?1:s)},ci(di,{brighter(t){return t=null==t?hi:Math.pow(hi,t),new Vi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ui:Math.pow(ui,t),new Vi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*e,r=2*i-s;return new Si(zi(t>=240?t-240:t+120,r,s),zi(t,r,s),zi(t<120?t+240:t-120,r,s),this.opacity)},clamp(){return new Vi($i(this.h),Hi(this.s),Hi(this.l),wi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=wi(this.opacity);return`${1===t?"hsl(":"hsla("}${$i(this.h)}, ${100*Hi(this.s)}%, ${100*Hi(this.l)}%${1===t?")":`, ${t})`}`}}));var Gi=t=>()=>t;function Yi(t){return 1===(t=+t)?Xi:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(s){return Math.pow(t+s*e,i)}}(e,i,t):Gi(isNaN(e)?i:e)}}function Xi(t,e){var i=e-t;return i?function(t,e){return function(i){return t+i*e}}(t,i):Gi(isNaN(t)?e:t)}var Ji=function t(e){var i=Yi(e);function s(t,e){var s=i((t=Ri(t)).r,(e=Ri(e)).r),r=i(t.g,e.g),a=i(t.b,e.b),n=Xi(t.opacity,e.opacity);return function(e){return t.r=s(e),t.g=r(e),t.b=a(e),t.opacity=n(e),t+""}}return s.gamma=t,s}(1);function Wi(t,e){e||(e=[]);var i,s=t?Math.min(e.length,t.length):0,r=e.slice();return function(a){for(i=0;i<s;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function _i(t,e){var i,s=e?e.length:0,r=t?Math.min(s,t.length):0,a=new Array(r),n=new Array(s);for(i=0;i<r;++i)a[i]=ts(t[i],e[i]);for(;i<s;++i)n[i]=e[i];return function(t){for(i=0;i<r;++i)n[i]=a[i](t);return n}}function Ki(t,e){var i=new Date;return t=+t,e=+e,function(s){return i.setTime(t*(1-s)+e*s),i}}function Zi(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}function Pi(t,e){var i,s={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)i in t?s[i]=ts(t[i],e[i]):r[i]=e[i];return function(t){for(i in s)r[i]=s[i](t);return r}}var Oi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ji=new RegExp(Oi.source,"g");function qi(t,e){var i,s,r,a=Oi.lastIndex=ji.lastIndex=0,n=-1,o=[],l=[];for(t+="",e+="";(i=Oi.exec(t))&&(s=ji.exec(e));)(r=s.index)>a&&(r=e.slice(a,r),o[n]?o[n]+=r:o[++n]=r),(i=i[0])===(s=s[0])?o[n]?o[n]+=s:o[++n]=s:(o[++n]=null,l.push({i:n,x:Zi(i,s)})),a=ji.lastIndex;return a<e.length&&(r=e.slice(a),o[n]?o[n]+=r:o[++n]=r),o.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var i,s=0;s<e;++s)o[(i=l[s]).i]=i.x(t);return o.join("")})}function ts(t,e){var i,s=typeof e;return null==e||"boolean"===s?Gi(e):("number"===s?Zi:"string"===s?(i=Ai(e))?(e=i,Ji):qi:e instanceof Ai?Ji:e instanceof Date?Ki:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Wi:Array.isArray(e)?_i:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Pi:Zi)(t,e)}function es(t,e){return t=+t,e=+e,function(i){return Math.round(t*(1-i)+e*i)}}var is,ss=180/Math.PI,rs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function as(t,e,i,s,r,a){var n,o,l;return(n=Math.sqrt(t*t+e*e))&&(t/=n,e/=n),(l=t*i+e*s)&&(i-=t*l,s-=e*l),(o=Math.sqrt(i*i+s*s))&&(i/=o,s/=o,l/=o),t*s<e*i&&(t=-t,e=-e,l=-l,n=-n),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*ss,skewX:Math.atan(l)*ss,scaleX:n,scaleY:o}}function ns(t,e,i,s){function r(t){return t.length?t.pop()+" ":""}return function(a,n){var o=[],l=[];return a=t(a),n=t(n),function(t,s,r,a,n,o){if(t!==r||s!==a){var l=n.push("translate(",null,e,null,i);o.push({i:l-4,x:Zi(t,r)},{i:l-2,x:Zi(s,a)})}else(r||a)&&n.push("translate("+r+e+a+i)}(a.translateX,a.translateY,n.translateX,n.translateY,o,l),function(t,e,i,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:i.push(r(i)+"rotate(",null,s)-2,x:Zi(t,e)})):e&&i.push(r(i)+"rotate("+e+s)}(a.rotate,n.rotate,o,l),function(t,e,i,a){t!==e?a.push({i:i.push(r(i)+"skewX(",null,s)-2,x:Zi(t,e)}):e&&i.push(r(i)+"skewX("+e+s)}(a.skewX,n.skewX,o,l),function(t,e,i,s,a,n){if(t!==i||e!==s){var o=a.push(r(a)+"scale(",null,",",null,")");n.push({i:o-4,x:Zi(t,i)},{i:o-2,x:Zi(e,s)})}else 1===i&&1===s||a.push(r(a)+"scale("+i+","+s+")")}(a.scaleX,a.scaleY,n.scaleX,n.scaleY,o,l),a=n=null,function(t){for(var e,i=-1,s=l.length;++i<s;)o[(e=l[i]).i]=e.x(t);return o.join("")}}}var os,ls,cs=ns(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?rs:as(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),ds=ns(function(t){return null==t?rs:(is||(is=document.createElementNS("http://www.w3.org/2000/svg","g")),is.setAttribute("transform",t),(t=is.transform.baseVal.consolidate())?as((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):rs)},", ",")",")"),us=0,hs=0,gs=0,ps=0,ms=0,bs=0,ys="object"==typeof performance&&performance.now?performance:Date,Qs="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bs(){return ms||(Qs(Us),ms=ys.now()+bs)}function Us(){ms=0}function Fs(){this._call=this._time=this._next=null}function Is(t,e,i){var s=new Fs;return s.restart(t,e,i),s}function fs(){ms=(ps=ys.now())+bs,us=hs=0;try{!function(){Bs(),++us;for(var t,e=os;e;)(t=ms-e._time)>=0&&e._call.call(void 0,t),e=e._next;--us}()}finally{us=0,function(){var t,e,i=os,s=1/0;for(;i;)i._call?(s>i._time&&(s=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:os=e);ls=t,vs(s)}(),ms=0}}function Cs(){var t=ys.now(),e=t-ps;e>1e3&&(bs-=e,ps=t)}function vs(t){us||(hs&&(hs=clearTimeout(hs)),t-ms>24?(t<1/0&&(hs=setTimeout(fs,t-ys.now()-bs)),gs&&(gs=clearInterval(gs))):(gs||(ps=ys.now(),gs=setInterval(Cs,1e3)),us=1,Qs(fs)))}function As(t,e,i){var s=new Fs;return e=null==e?0:+e,s.restart(i=>{s.stop(),t(i+e)},e,i),s}Fs.prototype=Is.prototype={constructor:Fs,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?Bs():+i)+(null==e?0:+e),this._next||ls===this||(ls?ls._next=this:os=this,ls=this),this._call=t,this._time=i,vs()},stop:function(){this._call&&(this._call=null,this._time=1/0,vs())}};var xs=St("start","end","cancel","interrupt"),Es=[];function Rs(t,e,i,s,r,a){var n=t.__transition;if(n){if(i in n)return}else t.__transition={};!function(t,e,i){var s,r=t.__transition;function a(t){i.state=1,i.timer.restart(n,i.delay,i.time),i.delay<=t&&n(t-i.delay)}function n(a){var c,d,u,h;if(1!==i.state)return l();for(c in r)if((h=r[c]).name===i.name){if(3===h.state)return As(n);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete r[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete r[c])}if(As(function(){3===i.state&&(i.state=4,i.timer.restart(o,i.delay,i.time),o(a))}),i.state=2,i.on.call("start",t,t.__data__,i.index,i.group),2===i.state){for(i.state=3,s=new Array(u=i.tween.length),c=0,d=-1;c<u;++c)(h=i.tween[c].value.call(t,t.__data__,i.index,i.group))&&(s[++d]=h);s.length=d+1}}function o(e){for(var r=e<i.duration?i.ease.call(null,e/i.duration):(i.timer.restart(l),i.state=5,1),a=-1,n=s.length;++a<n;)s[a].call(t,r);5===i.state&&(i.on.call("end",t,t.__data__,i.index,i.group),l())}function l(){for(var s in i.state=6,i.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=i,i.timer=Is(a,0,i.time)}(t,i,{name:e,index:s,group:r,on:xs,tween:Es,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Ss(t,e){var i=Ls(t,e);if(i.state>0)throw new Error("too late; already scheduled");return i}function Ns(t,e){var i=Ls(t,e);if(i.state>3)throw new Error("too late; already running");return i}function Ls(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function ws(t,e){var i,s;return function(){var r=Ns(this,t),a=r.tween;if(a!==i)for(var n=0,o=(s=i=a).length;n<o;++n)if(s[n].name===e){(s=s.slice()).splice(n,1);break}r.tween=s}}function Ds(t,e,i){var s,r;if("function"!=typeof i)throw new Error;return function(){var a=Ns(this,t),n=a.tween;if(n!==s){r=(s=n).slice();for(var o={name:e,value:i},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=o;break}l===c&&r.push(o)}a.tween=r}}function Ms(t,e,i){var s=t._id;return t.each(function(){var t=Ns(this,s);(t.value||(t.value={}))[e]=i.apply(this,arguments)}),function(t){return Ls(t,s).value[e]}}function ks(t,e){var i;return("number"==typeof e?Zi:e instanceof Ai?Ji:(i=Ai(e))?(e=i,Ji):qi)(t,e)}function Ts(t){return function(){this.removeAttribute(t)}}function Vs(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $s(t,e,i){var s,r,a=i+"";return function(){var n=this.getAttribute(t);return n===a?null:n===s?r:r=e(s=n,i)}}function Hs(t,e,i){var s,r,a=i+"";return function(){var n=this.getAttributeNS(t.space,t.local);return n===a?null:n===s?r:r=e(s=n,i)}}function zs(t,e,i){var s,r,a;return function(){var n,o,l=i(this);if(null!=l)return(n=this.getAttribute(t))===(o=l+"")?null:n===s&&o===r?a:(r=o,a=e(s=n,l));this.removeAttribute(t)}}function Gs(t,e,i){var s,r,a;return function(){var n,o,l=i(this);if(null!=l)return(n=this.getAttributeNS(t.space,t.local))===(o=l+"")?null:n===s&&o===r?a:(r=o,a=e(s=n,l));this.removeAttributeNS(t.space,t.local)}}function Ys(t,e){var i,s;function r(){var r=e.apply(this,arguments);return r!==s&&(i=(s=r)&&function(t,e){return function(i){this.setAttributeNS(t.space,t.local,e.call(this,i))}}(t,r)),i}return r._value=e,r}function Xs(t,e){var i,s;function r(){var r=e.apply(this,arguments);return r!==s&&(i=(s=r)&&function(t,e){return function(i){this.setAttribute(t,e.call(this,i))}}(t,r)),i}return r._value=e,r}function Js(t,e){return function(){Ss(this,t).delay=+e.apply(this,arguments)}}function Ws(t,e){return e=+e,function(){Ss(this,t).delay=e}}function _s(t,e){return function(){Ns(this,t).duration=+e.apply(this,arguments)}}function Ks(t,e){return e=+e,function(){Ns(this,t).duration=e}}var Zs=Je.prototype.constructor;function Ps(t){return function(){this.style.removeProperty(t)}}var Os=0;function js(t,e,i,s){this._groups=t,this._parents=e,this._name=i,this._id=s}function qs(){return++Os}var tr=Je.prototype;js.prototype={constructor:js,select:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=zt(t));for(var s=this._groups,r=s.length,a=new Array(r),n=0;n<r;++n)for(var o,l,c=s[n],d=c.length,u=a[n]=new Array(d),h=0;h<d;++h)(o=c[h])&&(l=t.call(o,o.__data__,h,c))&&("__data__"in o&&(l.__data__=o.__data__),u[h]=l,Rs(u[h],e,i,h,u,Ls(o,i)));return new js(a,this._parents,e,i)},selectAll:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=Yt(t));for(var s=this._groups,r=s.length,a=[],n=[],o=0;o<r;++o)for(var l,c=s[o],d=c.length,u=0;u<d;++u)if(l=c[u]){for(var h,g=t.call(l,l.__data__,u,c),p=Ls(l,i),m=0,b=g.length;m<b;++m)(h=g[m])&&Rs(h,e,i,m,g,p);a.push(g),n.push(l)}return new js(a,n,e,i)},selectChild:tr.selectChild,selectChildren:tr.selectChildren,filter:function(t){"function"!=typeof t&&(t=Jt(t));for(var e=this._groups,i=e.length,s=new Array(i),r=0;r<i;++r)for(var a,n=e[r],o=n.length,l=s[r]=[],c=0;c<o;++c)(a=n[c])&&t.call(a,a.__data__,c,n)&&l.push(a);return new js(s,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,i=t._groups,s=e.length,r=i.length,a=Math.min(s,r),n=new Array(s),o=0;o<a;++o)for(var l,c=e[o],d=i[o],u=c.length,h=n[o]=new Array(u),g=0;g<u;++g)(l=c[g]||d[g])&&(h[g]=l);for(;o<s;++o)n[o]=e[o];return new js(n,this._parents,this._name,this._id)},selection:function(){return new Zs(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,i=qs(),s=this._groups,r=s.length,a=0;a<r;++a)for(var n,o=s[a],l=o.length,c=0;c<l;++c)if(n=o[c]){var d=Ls(n,e);Rs(n,t,i,c,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new js(s,this._parents,t,i)},call:tr.call,nodes:tr.nodes,node:tr.node,size:tr.size,empty:tr.empty,each:tr.each,on:function(t,e){var i=this._id;return arguments.length<2?Ls(this.node(),i).on.on(t):this.each(function(t,e,i){var s,r,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?Ss:Ns;return function(){var n=a(this,t),o=n.on;o!==s&&(r=(s=o).copy()).on(e,i),n.on=r}}(i,t,e))},attr:function(t,e){var i=kt(t),s="transform"===i?ds:ks;return this.attrTween(t,"function"==typeof e?(i.local?Gs:zs)(i,s,Ms(this,"attr."+t,e)):null==e?(i.local?Vs:Ts)(i):(i.local?Hs:$s)(i,s,e))},attrTween:function(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var s=kt(t);return this.tween(i,(s.local?Ys:Xs)(s,e))},style:function(t,e,i){var s="transform"==(t+="")?cs:ks;return null==e?this.styleTween(t,function(t,e){var i,s,r;return function(){var a=pe(this,t),n=(this.style.removeProperty(t),pe(this,t));return a===n?null:a===i&&n===s?r:r=e(i=a,s=n)}}(t,s)).on("end.style."+t,Ps(t)):"function"==typeof e?this.styleTween(t,function(t,e,i){var s,r,a;return function(){var n=pe(this,t),o=i(this),l=o+"";return null==o&&(this.style.removeProperty(t),l=o=pe(this,t)),n===l?null:n===s&&l===r?a:(r=l,a=e(s=n,o))}}(t,s,Ms(this,"style."+t,e))).each(function(t,e){var i,s,r,a,n="style."+e,o="end."+n;return function(){var l=Ns(this,t),c=l.on,d=null==l.value[n]?a||(a=Ps(e)):void 0;c===i&&r===d||(s=(i=c).copy()).on(o,r=d),l.on=s}}(this._id,t)):this.styleTween(t,function(t,e,i){var s,r,a=i+"";return function(){var n=pe(this,t);return n===a?null:n===s?r:r=e(s=n,i)}}(t,s,e),i).on("end.style."+t,null)},styleTween:function(t,e,i){var s="style."+(t+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(null==e)return this.tween(s,null);if("function"!=typeof e)throw new Error;return this.tween(s,function(t,e,i){var s,r;function a(){var a=e.apply(this,arguments);return a!==r&&(s=(r=a)&&function(t,e,i){return function(s){this.style.setProperty(t,e.call(this,s),i)}}(t,a,i)),s}return a._value=e,a}(t,e,null==i?"":i))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ms(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,i;function s(){var s=t.apply(this,arguments);return s!==i&&(e=(i=s)&&function(t){return function(e){this.textContent=t.call(this,e)}}(s)),e}return s._value=t,s}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var i=this._id;if(t+="",arguments.length<2){for(var s,r=Ls(this.node(),i).tween,a=0,n=r.length;a<n;++a)if((s=r[a]).name===t)return s.value;return null}return this.each((null==e?ws:Ds)(i,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Js:Ws)(e,t)):Ls(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?_s:Ks)(e,t)):Ls(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Ns(this,t).ease=e}}(e,t)):Ls(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var i=e.apply(this,arguments);if("function"!=typeof i)throw new Error;Ns(this,t).ease=i}}(this._id,t))},end:function(){var t,e,i=this,s=i._id,r=i.size();return new Promise(function(a,n){var o={value:n},l={value:function(){0===--r&&a()}};i.each(function(){var i=Ns(this,s),r=i.on;r!==t&&((e=(t=r).copy())._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),i.on=e}),0===r&&a()})},[Symbol.iterator]:tr[Symbol.iterator]};const er=t=>+t;function ir(t){return--t*t*t+1}var sr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function rr(t,e){for(var i;!(i=t.__transition)||!(i=i[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return i}Je.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var i,s,r,a=t.__transition,n=!0;if(a){for(r in e=null==e?null:e+"",a)(i=a[r]).name===e?(s=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(s?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete a[r]):n=!1;n&&delete t.__transition}}(this,t)})},Je.prototype.transition=function(t){var e,i;t instanceof js?(e=t._id,t=t._name):(e=qs(),(i=sr).time=Bs(),t=null==t?null:t+"");for(var s=this._groups,r=s.length,a=0;a<r;++a)for(var n,o=s[a],l=o.length,c=0;c<l;++c)(n=o[c])&&Rs(n,t,e,c,o,i||rr(n,e));return new js(s,this._parents,t,e)};const ar=Math.PI,nr=2*ar,or=1e-6,lr=nr-or;function cr(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=arguments[e]+t[e]}class dr{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?cr:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return cr;const i=10**e;return function(t){this._+=t[0];for(let e=1,s=t.length;e<s;++e)this._+=Math.round(arguments[e]*i)/i+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,i,s){this._append`Q${+t},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,e,i,s,r,a){this._append`C${+t},${+e},${+i},${+s},${this._x1=+r},${this._y1=+a}`}arcTo(t,e,i,s,r){if(t=+t,e=+e,i=+i,s=+s,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=this._x1,n=this._y1,o=i-t,l=s-e,c=a-t,d=n-e,u=c*c+d*d;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>or)if(Math.abs(d*o-l*c)>or&&r){let h=i-a,g=s-n,p=o*o+l*l,m=h*h+g*g,b=Math.sqrt(p),y=Math.sqrt(u),Q=r*Math.tan((ar-Math.acos((p+u-m)/(2*b*y)))/2),B=Q/y,U=Q/b;Math.abs(B-1)>or&&this._append`L${t+B*c},${e+B*d}`,this._append`A${r},${r},0,0,${+(d*h>c*g)},${this._x1=t+U*o},${this._y1=e+U*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,i,s,r,a){if(t=+t,e=+e,a=!!a,(i=+i)<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),o=i*Math.sin(s),l=t+n,c=e+o,d=1^a,u=a?s-r:r-s;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>or||Math.abs(this._y1-c)>or)&&this._append`L${l},${c}`,i&&(u<0&&(u=u%nr+nr),u>lr?this._append`A${i},${i},0,1,${d},${t-n},${e-o}A${i},${i},0,1,${d},${this._x1=l},${this._y1=c}`:u>or&&this._append`A${i},${i},0,${+(u>=ar)},${d},${this._x1=t+i*Math.cos(r)},${this._y1=e+i*Math.sin(r)}`)}rect(t,e,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function ur(t,e){if((i=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var i,s=t.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+t.slice(i+1)]}function hr(t){return(t=ur(Math.abs(t)))?t[1]:NaN}var gr,pr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mr(t){if(!(e=pr.exec(t)))throw new Error("invalid format: "+t);var e;return new br({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function br(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yr(t,e){var i=ur(t,e);if(!i)return t+"";var s=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}mr.prototype=br.prototype,br.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Qr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>yr(100*t,e),r:yr,s:function(t,e){var i=ur(t,e);if(!i)return t+"";var s=i[0],r=i[1],a=r-(gr=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,n=s.length;return a===n?s:a>n?s+new Array(a-n+1).join("0"):a>0?s.slice(0,a)+"."+s.slice(a):"0."+new Array(1-a).join("0")+ur(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Br(t){return t}var Ur,Fr,Ir,fr=Array.prototype.map,Cr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vr(t){var e,i,s=void 0===t.grouping||void 0===t.thousands?Br:(e=fr.call(t.grouping,Number),i=t.thousands+"",function(t,s){for(var r=t.length,a=[],n=0,o=e[0],l=0;r>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),a.push(t.substring(r-=o,r+o)),!((l+=o+1)>s));)o=e[n=(n+1)%e.length];return a.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",n=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?Br:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(fr.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=mr(t)).fill,i=t.align,u=t.sign,h=t.symbol,g=t.zero,p=t.width,m=t.comma,b=t.precision,y=t.trim,Q=t.type;"n"===Q?(m=!0,Q="g"):Qr[Q]||(void 0===b&&(b=12),y=!0,Q="g"),(g||"0"===e&&"="===i)&&(g=!0,e="0",i="=");var B="$"===h?r:"#"===h&&/[boxX]/.test(Q)?"0"+Q.toLowerCase():"",U="$"===h?a:/[%p]/.test(Q)?l:"",F=Qr[Q],I=/[defgprs%]/.test(Q);function f(t){var r,a,l,h=B,f=U;if("c"===Q)f=F(t)+f,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?d:F(Math.abs(t),b),y&&(t=function(t){t:for(var e,i=t.length,s=1,r=-1;s<i;++s)switch(t[s]){case".":r=e=s;break;case"0":0===r&&(r=s),e=s;break;default:if(!+t[s])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),C&&0===+t&&"+"!==u&&(C=!1),h=(C?"("===u?u:c:"-"===u||"("===u?"":u)+h,f=("s"===Q?Cr[8+gr/3]:"")+f+(C&&"("===u?")":""),I)for(r=-1,a=t.length;++r<a;)if(48>(l=t.charCodeAt(r))||l>57){f=(46===l?n+t.slice(r+1):t.slice(r))+f,t=t.slice(0,r);break}}m&&!g&&(t=s(t,1/0));var v=h.length+t.length+f.length,A=v<p?new Array(p-v+1).join(e):"";switch(m&&g&&(t=s(A+t,A.length?p-f.length:1/0),A=""),i){case"<":t=h+t+f+A;break;case"=":t=h+A+t+f;break;case"^":t=A.slice(0,v=A.length>>1)+h+t+f+A.slice(v);break;default:t=A+h+t+f}return o(t)}return b=void 0===b?6:/[gprs]/.test(Q)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),f.toString=function(){return t+""},f}return{format:u,formatPrefix:function(t,e){var i=u(((t=mr(t)).type="f",t)),s=3*Math.max(-8,Math.min(8,Math.floor(hr(e)/3))),r=Math.pow(10,-s),a=Cr[8+s/3];return function(t){return i(r*t)+a}}}}Ur=vr({thousands:",",grouping:[3],currency:["$",""]}),Fr=Ur.format,Ir=Ur.formatPrefix;var Ar=Math.random,xr=function t(e){function i(t,i){return t=null==t?0:+t,i=null==i?1:+i,1===arguments.length?(i=t,t=0):i-=t,function(){return e()*i+t}}return i.source=t,i}(Ar),Er=function t(e){function i(t,i){var s,r;return t=null==t?0:+t,i=null==i?1:+i,function(){var a;if(null!=s)a=s,s=null;else do{s=2*e()-1,a=2*e()-1,r=s*s+a*a}while(!r||r>1);return t+i*a*Math.sqrt(-2*Math.log(r)/r)}}return i.source=t,i}(Ar);const Rr=1/4294967296;function Sr(t=Math.random()){let e=0|(0<=t&&t<1?t/Rr:Math.abs(t));return()=>(e=1664525*e+1013904223|0,Rr*(e>>>0))}function Nr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Lr(t){return+t}var wr=[0,1];function Dr(t){return t}function Mr(t,e){return(e-=t=+t)?function(i){return(i-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function kr(t,e,i){var s=t[0],r=t[1],a=e[0],n=e[1];return r<s?(s=Mr(r,s),a=i(n,a)):(s=Mr(s,r),a=i(a,n)),function(t){return a(s(t))}}function Tr(t,e,i){var s=Math.min(t.length,e.length)-1,r=new Array(s),a=new Array(s),n=-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++n<s;)r[n]=Mr(t[n],t[n+1]),a[n]=i(e[n],e[n+1]);return function(e){var i=pt(t,e,1,s)-1;return a[i](r[i](e))}}function Vr(){var t,e,i,s,r,a,n=wr,o=wr,l=ts,c=Dr;function d(){var t=Math.min(n.length,o.length);return c!==Dr&&(c=function(t,e){var i;return t>e&&(i=t,t=e,e=i),function(i){return Math.max(t,Math.min(e,i))}}(n[0],n[t-1])),s=t>2?Tr:kr,r=a=null,u}function u(e){return null==e||isNaN(e=+e)?i:(r||(r=s(n.map(t),o,l)))(t(c(e)))}return u.invert=function(i){return c(e((a||(a=s(o,n.map(t),Zi)))(i)))},u.domain=function(t){return arguments.length?(n=Array.from(t,Lr),d()):n.slice()},u.range=function(t){return arguments.length?(o=Array.from(t),d()):o.slice()},u.rangeRound=function(t){return o=Array.from(t),l=es,d()},u.clamp=function(t){return arguments.length?(c=!!t||Dr,d()):c!==Dr},u.interpolate=function(t){return arguments.length?(l=t,d()):l},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i,s){return t=i,e=s,d()}}function $r(t,e,i,s){var r,a=function(t,e,i){i=+i;const s=(e=+e)<(t=+t),r=s?Bt(e,t,i):Bt(t,e,i);return(s?-1:1)*(r<0?1/-r:r)}(t,e,i);switch((s=mr(null==s?",f":s)).type){case"s":var n=Math.max(Math.abs(t),Math.abs(e));return null!=s.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hr(e)/3)))-hr(Math.abs(t)))}(a,n))||(s.precision=r),Ir(s,n);case"":case"e":case"g":case"p":case"r":null!=s.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,hr(e)-hr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(s.precision=r-("e"===s.type));break;case"f":case"%":null!=s.precision||isNaN(r=function(t){return Math.max(0,-hr(Math.abs(t)))}(a))||(s.precision=r-2*("%"===s.type))}return Fr(s)}function Hr(t){var e=t.domain;return t.ticks=function(t){var i=e();return function(t,e,i){if(!((i=+i)>0))return[];if((t=+t)===(e=+e))return[t];const s=e<t,[r,a,n]=s?Qt(e,t,i):Qt(t,e,i);if(!(a>=r))return[];const o=a-r+1,l=new Array(o);if(s)if(n<0)for(let t=0;t<o;++t)l[t]=(a-t)/-n;else for(let t=0;t<o;++t)l[t]=(a-t)*n;else if(n<0)for(let t=0;t<o;++t)l[t]=(r+t)/-n;else for(let t=0;t<o;++t)l[t]=(r+t)*n;return l}(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var s=e();return $r(s[0],s[s.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var s,r,a=e(),n=0,o=a.length-1,l=a[n],c=a[o],d=10;for(c<l&&(r=l,l=c,c=r,r=n,n=o,o=r);d-- >0;){if((r=Bt(l,c,i))===s)return a[n]=l,a[o]=c,e(a);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}s=r}return t},t}function zr(){var t=Vr()(Dr,Dr);return t.copy=function(){return e=t,zr().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());var e},Nr.apply(t,arguments),Hr(t)}function Gr(t){return function(){return t}}function Yr(t){this._context=t}function Xr(t){return new Yr(t)}function Jr(t){return t[0]}function Wr(t){return t[1]}function _r(t,e){var i=Gr(!0),s=null,r=Xr,a=null,n=function(t){let e=3;return t.digits=function(i){if(!arguments.length)return e;if(null==i)e=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);e=t}return t},()=>new dr(e)}(o);function o(o){var l,c,d,u=(o=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(o)).length,h=!1;for(null==s&&(a=r(d=n())),l=0;l<=u;++l)!(l<u&&i(c=o[l],l,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,l,o),+e(c,l,o));if(d)return a=null,d+""||null}return t="function"==typeof t?t:void 0===t?Jr:Gr(t),e="function"==typeof e?e:void 0===e?Wr:Gr(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:Gr(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Gr(+t),o):e},o.defined=function(t){return arguments.length?(i="function"==typeof t?t:Gr(!!t),o):i},o.curve=function(t){return arguments.length?(r=t,null!=s&&(a=r(s)),o):r},o.context=function(t){return arguments.length?(null==t?s=a=null:a=r(s=t),o):s},o}function Kr(t,e,i){this.k=t,this.x=e,this.y=i}Yr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Kr.prototype={constructor:Kr,scale:function(t){return 1===t?this:new Kr(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Kr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Kr.prototype;class Zr extends lt{getComputedStyleValue(t){return getComputedStyle(this).getPropertyValue(t).trim()}firstUpdated(t){super.firstUpdated(t),We(this.renderRoot.host).classed("keyboard",!0).on("mousemove.keyboard touchstart.keyboard",t=>{We(t.currentTarget.renderRoot.host).classed("keyboard",!1).on("mousemove.keyboard touchstart.keyboard",null)}).on("keydown.keyboard",t=>{We(t.currentTarget.renderRoot.host).classed("keyboard",!0).on("keydown.keyboard mousemove.keyboard touchstart.keyboard",null)})}static get greys(){const t="#999999",e={white:"#ffffff"};return e.light75=Ji(t,"#ffffff")(.75),e.light50=Ji(t,"#ffffff")(.5),e.light25=Ji(t,"#ffffff")(.25),e.grey=t,e.dark25=Ji(t,"#000000")(.25),e.dark50=Ji(t,"#000000")(.5),e.dark75=Ji(t,"#000000")(.75),e.black="#000000",e}static get shadows(){return{elevations:[0,2,4,8,16],baselineColor:"#000000",baselineColorString:"0, 0, 0",inverseBaselineColor:"#FFFFFF",inverseBaselineColorString:"255, 255, 255",opacityUmbra:.2,opacityPenumbra:.14,opacityAmbient:.12,opacityBoost:.2,mapUmbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:3,b:1,s:-2},4:{x:0,y:2,b:4,s:-1},8:{x:0,y:5,b:5,s:-3},16:{x:0,y:8,b:10,s:-5}},mapPenumbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:2,b:2,s:0},4:{x:0,y:4,b:5,s:0},8:{x:0,y:8,b:10,s:1},16:{x:0,y:16,b:24,s:2}},mapAmbient:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:1,b:5,s:0},4:{x:0,y:1,b:10,s:0},8:{x:0,y:3,b:14,s:2},16:{x:0,y:6,b:30,s:5}}}}static cssBoxShadow(t,e=!1,i=!1){const s=this.shadows.opacityUmbra+this.shadows.opacityBoost,r=this.shadows.opacityPenumbra+this.shadows.opacityBoost,a=this.shadows.opacityAmbient+this.shadows.opacityBoost,n=i?`rgba(${this.shadows.inverseBaselineColorString}, ${s})`:`rgba(${this.shadows.baselineColorString}, ${s})`,o=i?`rgba(${this.shadows.inverseBaselineColorString}, ${r})`:`rgba(${this.shadows.baselineColorString}, ${r})`,l=i?`rgba(${this.shadows.inverseBaselineColorString}, ${a})`:`rgba(${this.shadows.baselineColorString}, ${a})`,c=this.shadows.mapUmbra[t],d=this.shadows.mapPenumbra[t],u=this.shadows.mapAmbient[t];return`${e?`${-c.y}px ${c.y/2}px ${c.b}px ${c.s}px`:`${c.y/2}px ${c.y}px ${c.b}px ${c.s}px`} ${n}, ${e?`${-d.y}px ${d.y/2}px ${d.b}px ${d.s}px`:`${d.y/2}px ${d.y}px ${d.b}px ${d.s}px`} ${o}, ${e?`${-u.y}px ${u.y/2}px ${u.b}px ${u.s}px`:`${u.y/2}px ${u.y}px ${u.b}px ${u.s}px`} ${l}`}static get svgDefs(){const t=Zr.shadows,e=t.elevations.map(e=>`\n <filter id=shadow-${e} filterUnits="userSpaceOnUse" x="-100%" y="-100%" width="200%" height="200%">\n <feComponentTransfer in="SourceAlpha" result="solid">\n <feFuncA type="table" tableValues="0 1 1"/>\n </feComponentTransfer>\n <feOffset in="solid" result="offU" dx=${t.mapUmbra[e].y/2} dy=${t.mapUmbra[e].y} />\n <feOffset in="solid" result="offP" dx=${t.mapPenumbra[e].y/2} dy=${t.mapPenumbra[e].y} />\n <feOffset in="solid" result="offA" dx=${t.mapAmbient[e].y/2} dy=${t.mapAmbient[e].y} />\n ${0===t.mapUmbra[e].s?"":`<feMorphology in="offU" result="spreadU" operator=${t.mapUmbra[e].s>0?"dilate":"erode"} radius=${Math.abs(t.mapUmbra[e].s)} />`}\n ${0===t.mapPenumbra[e].s?"":`<feMorphology in="offP" result="spreadP" operator=${t.mapPenumbra[e].s>0?"dilate":"erode"} radius=${Math.abs(t.mapPenumbra[e].s)} />`}\n ${0===t.mapAmbient[e].s?"":`<feMorphology in="offA" result="spreadA" operator=${t.mapAmbient[e].s>0?"dilate":"erode"} radius=${Math.abs(t.mapAmbient[e].s)} />`}\n <feGaussianBlur in=${0===t.mapUmbra[e].s?"offU":"spreadU"} result="blurU" stdDeviation=${t.mapUmbra[e].b/2} />\n <feGaussianBlur in=${0===t.mapPenumbra[e].s?"offP":"spreadP"} result="blurP" stdDeviation=${t.mapPenumbra[e].b/2} />\n <feGaussianBlur in=${0===t.mapAmbient[e].s?"offA":"spreadA"} result="blurA" stdDeviation=${t.mapAmbient[e].b/2} />\n <feFlood in="SourceGraphic" result="opU" flood-color=${t.baselineColor} flood-opacity=${t.opacityUmbra+t.opacityBoost} />\n <feFlood in="SourceGraphic" result="opP" flood-color=${t.baselineColor} flood-opacity=${t.opacityPenumbra+t.opacityBoost} />\n <feFlood in="SourceGraphic" result="opA" flood-color=${t.baselineColor} flood-opacity=${t.opacityAmbient+t.opacityBoost} />\n <feComposite in="opU" in2="blurU" result="shU" operator="in" />\n <feComposite in="opP" in2="blurP" result="shP" operator="in" />\n <feComposite in="opA" in2="blurA" result="shA" operator="in" />\n <feMorphology in="solid" result="smaller" operator="erode" radius="1" />\n <feComposite in="shU" in2="smaller" result="finalU" operator="out" />\n <feComposite in="shP" in2="smaller" result="finalP" operator="out" />\n <feComposite in="shA" in2="smaller" result="finalA" operator="out" />\n <feMerge>\n <feMergeNode in="finalU" />\n <feMergeNode in="finalP" />\n <feMergeNode in="finalA" />\n <feMergeNode in="SourceGraphic" />\n </feMerge>\n </filter>`);return`\n <defs>\n ${e}\n </defs>\n `}static get svgFilters(){const t=Zr.shadows,e=t.elevations.map(e=>X`
|
|
22
|
+
*/class lt extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new tt(e.insertBefore(N(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return J}}lt._$litElement$=!0,lt.finalized=!0,ot.litElementHydrateSupport?.({LitElement:lt});const ct=ot.litElementPolyfillSupport;function dt(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ut(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ht(t){let e,i,s;function r(t,s,r=0,a=t.length){if(r<a){if(0!==e(s,s))return a;do{const e=r+a>>>1;i(t[e],s)<0?r=e+1:a=e}while(r<a)}return r}return 2!==t.length?(e=dt,i=(e,i)=>dt(t(e),i),s=(e,i)=>t(e)-i):(e=t===dt||t===ut?t:gt,i=t,s=t),{left:r,center:function(t,e,i=0,a=t.length){const n=r(t,e,i,a-1);return n>i&&s(t[n-1],e)>-s(t[n],e)?n-1:n},right:function(t,s,r=0,a=t.length){if(r<a){if(0!==e(s,s))return a;do{const e=r+a>>>1;i(t[e],s)<=0?r=e+1:a=e}while(r<a)}return r}}}function gt(){return 0}ct?.({LitElement:lt}),(ot.litElementVersions??=[]).push("4.2.1");const pt=ht(dt).right;ht(function(t){return null===t?NaN:+t}).center;const mt=Math.sqrt(50),bt=Math.sqrt(10),yt=Math.sqrt(2);function Qt(t,e,i){const s=(e-t)/Math.max(0,i),r=Math.floor(Math.log10(s)),a=s/Math.pow(10,r),n=a>=mt?10:a>=bt?5:a>=yt?2:1;let o,l,c;return r<0?(c=Math.pow(10,-r)/n,o=Math.round(t*c),l=Math.round(e*c),o/c<t&&++o,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*n,o=Math.round(t/c),l=Math.round(e/c),o*c<t&&++o,l*c>e&&--l),l<o&&.5<=i&&i<2?Qt(t,e,2*i):[o,l,c]}function Bt(t,e,i){return Qt(t=+t,e=+e,i=+i)[2]}function Ut(t){return t}var Ft=1e-6;function It(t){return"translate("+t+",0)"}function ft(t){return"translate(0,"+t+")"}function Ct(t){return e=>+t(e)}function vt(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),i=>+t(i)+e}function At(){return!this.__axis}function xt(t,e){var i=[],s=null,r=null,a=6,n=6,o=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,d=4===t||2===t?"x":"y",u=1===t||3===t?It:ft;function h(h){var g=null==s?e.ticks?e.ticks.apply(e,i):e.domain():s,p=null==r?e.tickFormat?e.tickFormat.apply(e,i):Ut:r,m=Math.max(a,0)+o,b=e.range(),y=+b[0]+l,Q=+b[b.length-1]+l,B=(e.bandwidth?vt:Ct)(e.copy(),l),U=h.selection?h.selection():h,F=U.selectAll(".domain").data([null]),I=U.selectAll(".tick").data(g,e).order(),f=I.exit(),C=I.enter().append("g").attr("class","tick"),v=I.select("line"),A=I.select("text");F=F.merge(F.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(C),v=v.merge(C.append("line").attr("stroke","currentColor").attr(d+"2",c*a)),A=A.merge(C.append("text").attr("fill","currentColor").attr(d,c*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==U&&(F=F.transition(h),I=I.transition(h),v=v.transition(h),A=A.transition(h),f=f.transition(h).attr("opacity",Ft).attr("transform",function(t){return isFinite(t=B(t))?u(t+l):this.getAttribute("transform")}),C.attr("opacity",Ft).attr("transform",function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:B(t))+l)})),f.remove(),F.attr("d",4===t||2===t?n?"M"+c*n+","+y+"H"+l+"V"+Q+"H"+c*n:"M"+l+","+y+"V"+Q:n?"M"+y+","+c*n+"V"+l+"H"+Q+"V"+c*n:"M"+y+","+l+"H"+Q),I.attr("opacity",1).attr("transform",function(t){return u(B(t)+l)}),v.attr(d+"2",c*a),A.attr(d,c*m).text(p),U.filter(At).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),U.each(function(){this.__axis=B})}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return i=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),h):i.slice()},h.tickValues=function(t){return arguments.length?(s=null==t?null:Array.from(t),h):s&&s.slice()},h.tickFormat=function(t){return arguments.length?(r=t,h):r},h.tickSize=function(t){return arguments.length?(a=n=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(n=+t,h):n},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(l=+t,h):l},h}function Et(t){return xt(4,t)}var Rt={value:()=>{}};function St(){for(var t,e=0,i=arguments.length,s={};e<i;++e){if(!(t=arguments[e]+"")||t in s||/[\s.]/.test(t))throw new Error("illegal type: "+t);s[t]=[]}return new Nt(s)}function Nt(t){this._=t}function Lt(t,e){for(var i,s=0,r=t.length;s<r;++s)if((i=t[s]).name===e)return i.value}function wt(t,e,i){for(var s=0,r=t.length;s<r;++s)if(t[s].name===e){t[s]=Rt,t=t.slice(0,s).concat(t.slice(s+1));break}return null!=i&&t.push({name:e,value:i}),t}Nt.prototype=St.prototype={constructor:Nt,on:function(t,e){var i,s,r=this._,a=(s=r,(t+"").trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!s.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),n=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++n<o;)if(i=(t=a[n]).type)r[i]=wt(r[i],t.name,e);else if(null==e)for(i in r)r[i]=wt(r[i],t.name,null);return this}for(;++n<o;)if((i=(t=a[n]).type)&&(i=Lt(r[i],t.name)))return i},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new Nt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var i,s,r=new Array(i),a=0;a<i;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,i=(s=this._[t]).length;a<i;++a)s[a].value.apply(e,r)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var s=this._[t],r=0,a=s.length;r<a;++r)s[r].value.apply(e,i)}};var Dt="http://www.w3.org/1999/xhtml",Mt={svg:"http://www.w3.org/2000/svg",xhtml:Dt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function kt(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),Mt.hasOwnProperty(e)?{space:Mt[e],local:t}:t}function Tt(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Dt&&e.documentElement.namespaceURI===Dt?e.createElement(t):e.createElementNS(i,t)}}function Vt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function $t(t){var e=kt(t);return(e.local?Vt:Tt)(e)}function Ht(){}function zt(t){return null==t?Ht:function(){return this.querySelector(t)}}function Gt(){return[]}function Yt(t){return null==t?Gt:function(){return this.querySelectorAll(t)}}function Xt(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function Jt(t){return function(){return this.matches(t)}}function Wt(t){return function(e){return e.matches(t)}}var _t=Array.prototype.find;function Kt(){return this.firstElementChild}var Pt=Array.prototype.filter;function Zt(){return Array.from(this.children)}function Ot(t){return new Array(t.length)}function jt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function qt(t,e,i,s,r,a){for(var n,o=0,l=e.length,c=a.length;o<c;++o)(n=e[o])?(n.__data__=a[o],s[o]=n):i[o]=new jt(t,a[o]);for(;o<l;++o)(n=e[o])&&(r[o]=n)}function te(t,e,i,s,r,a,n){var o,l,c,d=new Map,u=e.length,h=a.length,g=new Array(u);for(o=0;o<u;++o)(l=e[o])&&(g[o]=c=n.call(l,l.__data__,o,e)+"",d.has(c)?r[o]=l:d.set(c,l));for(o=0;o<h;++o)c=n.call(t,a[o],o,a)+"",(l=d.get(c))?(s[o]=l,l.__data__=a[o],d.delete(c)):i[o]=new jt(t,a[o]);for(o=0;o<u;++o)(l=e[o])&&d.get(g[o])===l&&(r[o]=l)}function ee(t){return t.__data__}function ie(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function se(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function re(t){return function(){this.removeAttribute(t)}}function ae(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ne(t,e){return function(){this.setAttribute(t,e)}}function oe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function le(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function ce(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function de(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ue(t){return function(){this.style.removeProperty(t)}}function he(t,e,i){return function(){this.style.setProperty(t,e,i)}}function ge(t,e,i){return function(){var s=e.apply(this,arguments);null==s?this.style.removeProperty(t):this.style.setProperty(t,s,i)}}function pe(t,e){return t.style.getPropertyValue(e)||de(t).getComputedStyle(t,null).getPropertyValue(e)}function me(t){return function(){delete this[t]}}function be(t,e){return function(){this[t]=e}}function ye(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Qe(t){return t.trim().split(/^|\s+/)}function Be(t){return t.classList||new Ue(t)}function Ue(t){this._node=t,this._names=Qe(t.getAttribute("class")||"")}function Fe(t,e){for(var i=Be(t),s=-1,r=e.length;++s<r;)i.add(e[s])}function Ie(t,e){for(var i=Be(t),s=-1,r=e.length;++s<r;)i.remove(e[s])}function fe(t){return function(){Fe(this,t)}}function Ce(t){return function(){Ie(this,t)}}function ve(t,e){return function(){(e.apply(this,arguments)?Fe:Ie)(this,t)}}function Ae(){this.textContent=""}function xe(t){return function(){this.textContent=t}}function Ee(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Re(){this.innerHTML=""}function Se(t){return function(){this.innerHTML=t}}function Ne(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Le(){this.nextSibling&&this.parentNode.appendChild(this)}function we(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function De(){return null}function Me(){var t=this.parentNode;t&&t.removeChild(this)}function ke(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Te(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ve(t){return function(){var e=this.__on;if(e){for(var i,s=0,r=-1,a=e.length;s<a;++s)i=e[s],t.type&&i.type!==t.type||i.name!==t.name?e[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?e.length=r:delete this.__on}}}function $e(t,e,i){return function(){var s,r=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var n=0,o=r.length;n<o;++n)if((s=r[n]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=i),void(s.value=e);this.addEventListener(t.type,a,i),s={type:t.type,name:t.name,value:e,listener:a,options:i},r?r.push(s):this.__on=[s]}}function He(t,e,i){var s=de(t),r=s.CustomEvent;"function"==typeof r?r=new r(e,i):(r=s.document.createEvent("Event"),i?(r.initEvent(e,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function ze(t,e){return function(){return He(this,t,e)}}function Ge(t,e){return function(){return He(this,t,e.apply(this,arguments))}}jt.prototype={constructor:jt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Ue.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ye=[null];function Xe(t,e){this._groups=t,this._parents=e}function Je(){return new Xe([[document.documentElement]],Ye)}function We(t){return"string"==typeof t?new Xe([[document.querySelector(t)]],[document.documentElement]):new Xe([[t]],Ye)}Xe.prototype=Je.prototype={constructor:Xe,select:function(t){"function"!=typeof t&&(t=zt(t));for(var e=this._groups,i=e.length,s=new Array(i),r=0;r<i;++r)for(var a,n,o=e[r],l=o.length,c=s[r]=new Array(l),d=0;d<l;++d)(a=o[d])&&(n=t.call(a,a.__data__,d,o))&&("__data__"in a&&(n.__data__=a.__data__),c[d]=n);return new Xe(s,this._parents)},selectAll:function(t){t="function"==typeof t?Xt(t):Yt(t);for(var e=this._groups,i=e.length,s=[],r=[],a=0;a<i;++a)for(var n,o=e[a],l=o.length,c=0;c<l;++c)(n=o[c])&&(s.push(t.call(n,n.__data__,c,o)),r.push(n));return new Xe(s,r)},selectChild:function(t){return this.select(null==t?Kt:function(t){return function(){return _t.call(this.children,t)}}("function"==typeof t?t:Wt(t)))},selectChildren:function(t){return this.selectAll(null==t?Zt:function(t){return function(){return Pt.call(this.children,t)}}("function"==typeof t?t:Wt(t)))},filter:function(t){"function"!=typeof t&&(t=Jt(t));for(var e=this._groups,i=e.length,s=new Array(i),r=0;r<i;++r)for(var a,n=e[r],o=n.length,l=s[r]=[],c=0;c<o;++c)(a=n[c])&&t.call(a,a.__data__,c,n)&&l.push(a);return new Xe(s,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,ee);var i=e?te:qt,s=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,n=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var d=s[c],u=r[c],h=u.length,g=ie(t.call(d,d&&d.__data__,c,s)),p=g.length,m=o[c]=new Array(p),b=n[c]=new Array(p);i(d,u,m,b,l[c]=new Array(h),g,e);for(var y,Q,B=0,U=0;B<p;++B)if(y=m[B]){for(B>=U&&(U=B+1);!(Q=b[U])&&++U<p;);y._next=Q||null}}return(n=new Xe(n,s))._enter=o,n._exit=l,n},enter:function(){return new Xe(this._enter||this._groups.map(Ot),this._parents)},exit:function(){return new Xe(this._exit||this._groups.map(Ot),this._parents)},join:function(t,e,i){var s=this.enter(),r=this,a=this.exit();return"function"==typeof t?(s=t(s))&&(s=s.selection()):s=s.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==i?a.remove():i(a),s&&r?s.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,i=this._groups,s=e._groups,r=i.length,a=s.length,n=Math.min(r,a),o=new Array(r),l=0;l<n;++l)for(var c,d=i[l],u=s[l],h=d.length,g=o[l]=new Array(h),p=0;p<h;++p)(c=d[p]||u[p])&&(g[p]=c);for(;l<r;++l)o[l]=i[l];return new Xe(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var s,r=t[e],a=r.length-1,n=r[a];--a>=0;)(s=r[a])&&(n&&4^s.compareDocumentPosition(n)&&n.parentNode.insertBefore(s,n),n=s);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=se);for(var i=this._groups,s=i.length,r=new Array(s),a=0;a<s;++a){for(var n,o=i[a],l=o.length,c=r[a]=new Array(l),d=0;d<l;++d)(n=o[d])&&(c[d]=n);c.sort(e)}return new Xe(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var s=t[e],r=0,a=s.length;r<a;++r){var n=s[r];if(n)return n}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var r,a=e[i],n=0,o=a.length;n<o;++n)(r=a[n])&&t.call(r,r.__data__,n,a);return this},attr:function(t,e){var i=kt(t);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((null==e?i.local?ae:re:"function"==typeof e?i.local?ce:le:i.local?oe:ne)(i,e))},style:function(t,e,i){return arguments.length>1?this.each((null==e?ue:"function"==typeof e?ge:he)(t,e,null==i?"":i)):pe(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?me:"function"==typeof e?ye:be)(t,e)):this.node()[t]},classed:function(t,e){var i=Qe(t+"");if(arguments.length<2){for(var s=Be(this.node()),r=-1,a=i.length;++r<a;)if(!s.contains(i[r]))return!1;return!0}return this.each(("function"==typeof e?ve:e?fe:Ce)(i,e))},text:function(t){return arguments.length?this.each(null==t?Ae:("function"==typeof t?Ee:xe)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Re:("function"==typeof t?Ne:Se)(t)):this.node().innerHTML},raise:function(){return this.each(Le)},lower:function(){return this.each(we)},append:function(t){var e="function"==typeof t?t:$t(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var i="function"==typeof t?t:$t(t),s=null==e?De:"function"==typeof e?e:zt(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})},remove:function(){return this.each(Me)},clone:function(t){return this.select(t?Te:ke)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,i){var s,r,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}(t+""),n=a.length;if(!(arguments.length<2)){for(o=e?$e:Ve,s=0;s<n;++s)this.each(o(a[s],e,i));return this}var o=this.node().__on;if(o)for(var l,c=0,d=o.length;c<d;++c)for(s=0,l=o[c];s<n;++s)if((r=a[s]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ge:ze)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var s,r=t[e],a=0,n=r.length;a<n;++a)(s=r[a])&&(yield s)}};var _e=0;function Ke(){return new Pe}function Pe(){this._="@"+(++_e).toString(36)}function Ze(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var i=e.ownerSVGElement||e;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=t.clientX,s.y=t.clientY,[(s=s.matrixTransform(e.getScreenCTM().inverse())).x,s.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}Pe.prototype=Ke.prototype={constructor:Pe,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const Oe={passive:!1},je={capture:!0,passive:!1};function qe(t){t.stopImmediatePropagation()}function ti(t){t.preventDefault(),t.stopImmediatePropagation()}var ei=t=>()=>t;function ii(t,{sourceEvent:e,subject:i,target:s,identifier:r,active:a,x:n,y:o,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:n,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}function si(t){return!t.ctrlKey&&!t.button}function ri(){return this.parentNode}function ai(t,e){return null==e?{x:t.x,y:t.y}:e}function ni(){return navigator.maxTouchPoints||"ontouchstart"in this}function oi(){var t,e,i,s,r=si,a=ri,n=ai,o=ni,l={},c=St("start","drag","end"),d=0,u=0;function h(t){t.on("mousedown.drag",g).filter(o).on("touchstart.drag",b).on("touchmove.drag",y,Oe).on("touchend.drag touchcancel.drag",Q).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(n,o){if(!s&&r.call(this,n,o)){var l=B(this,a.call(this,n,o),n,o,"mouse");l&&(We(n.view).on("mousemove.drag",p,je).on("mouseup.drag",m,je),function(t){var e=t.document.documentElement,i=We(t).on("dragstart.drag",ti,je);"onselectstart"in e?i.on("selectstart.drag",ti,je):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(n.view),qe(n),i=!1,t=n.clientX,e=n.clientY,l("start",n))}}function p(s){if(ti(s),!i){var r=s.clientX-t,a=s.clientY-e;i=r*r+a*a>u}l.mouse("drag",s)}function m(t){We(t.view).on("mousemove.drag mouseup.drag",null),function(t,e){var i=t.document.documentElement,s=We(t).on("dragstart.drag",null);e&&(s.on("click.drag",ti,je),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}(t.view,i),ti(t),l.mouse("end",t)}function b(t,e){if(r.call(this,t,e)){var i,s,n=t.changedTouches,o=a.call(this,t,e),l=n.length;for(i=0;i<l;++i)(s=B(this,o,t,e,n[i].identifier,n[i]))&&(qe(t),s("start",t,n[i]))}}function y(t){var e,i,s=t.changedTouches,r=s.length;for(e=0;e<r;++e)(i=l[s[e].identifier])&&(ti(t),i("drag",t,s[e]))}function Q(t){var e,i,r=t.changedTouches,a=r.length;for(s&&clearTimeout(s),s=setTimeout(function(){s=null},500),e=0;e<a;++e)(i=l[r[e].identifier])&&(qe(t),i("end",t,r[e]))}function B(t,e,i,s,r,a){var o,u,g,p=c.copy(),m=Ze(a||i,e);if(null!=(g=n.call(t,new ii("beforestart",{sourceEvent:i,target:h,identifier:r,active:d,x:m[0],y:m[1],dx:0,dy:0,dispatch:p}),s)))return o=g.x-m[0]||0,u=g.y-m[1]||0,function i(a,n,c){var b,y=m;switch(a){case"start":l[r]=i,b=d++;break;case"end":delete l[r],--d;case"drag":m=Ze(c||n,e),b=d}p.call(a,t,new ii(a,{sourceEvent:n,subject:g,target:h,identifier:r,active:b,x:m[0]+o,y:m[1]+u,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:p}),s)}}return h.filter=function(t){return arguments.length?(r="function"==typeof t?t:ei(!!t),h):r},h.container=function(t){return arguments.length?(a="function"==typeof t?t:ei(t),h):a},h.subject=function(t){return arguments.length?(n="function"==typeof t?t:ei(t),h):n},h.touchable=function(t){return arguments.length?(o="function"==typeof t?t:ei(!!t),h):o},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(u=(t=+t)*t,h):Math.sqrt(u)},h}function li(t,e,i){t.prototype=e.prototype=i,i.constructor=t}function ci(t,e){var i=Object.create(t.prototype);for(var s in e)i[s]=e[s];return i}function di(){}ii.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ui=.7,hi=1/ui,gi="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bi=/^#([0-9a-f]{3,8})$/,yi=new RegExp(`^rgb\\(${gi},${gi},${gi}\\)$`),Qi=new RegExp(`^rgb\\(${mi},${mi},${mi}\\)$`),Bi=new RegExp(`^rgba\\(${gi},${gi},${gi},${pi}\\)$`),Ui=new RegExp(`^rgba\\(${mi},${mi},${mi},${pi}\\)$`),Fi=new RegExp(`^hsl\\(${pi},${mi},${mi}\\)$`),Ii=new RegExp(`^hsla\\(${pi},${mi},${mi},${pi}\\)$`),fi={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};function Ci(){return this.rgb().formatHex()}function vi(){return this.rgb().formatRgb()}function Ai(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=bi.exec(t))?(i=e[1].length,e=parseInt(e[1],16),6===i?xi(e):3===i?new Si(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?Ei(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?Ei(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yi.exec(t))?new Si(e[1],e[2],e[3],1):(e=Qi.exec(t))?new Si(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Bi.exec(t))?Ei(e[1],e[2],e[3],e[4]):(e=Ui.exec(t))?Ei(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Fi.exec(t))?ki(e[1],e[2]/100,e[3]/100,1):(e=Ii.exec(t))?ki(e[1],e[2]/100,e[3]/100,e[4]):fi.hasOwnProperty(t)?xi(fi[t]):"transparent"===t?new Si(NaN,NaN,NaN,0):null}function xi(t){return new Si(t>>16&255,t>>8&255,255&t,1)}function Ei(t,e,i,s){return s<=0&&(t=e=i=NaN),new Si(t,e,i,s)}function Ri(t,e,i,s){return 1===arguments.length?function(t){return t instanceof di||(t=Ai(t)),t?new Si((t=t.rgb()).r,t.g,t.b,t.opacity):new Si}(t):new Si(t,e,i,null==s?1:s)}function Si(t,e,i,s){this.r=+t,this.g=+e,this.b=+i,this.opacity=+s}function Ni(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}`}function Li(){const t=wi(this.opacity);return`${1===t?"rgb(":"rgba("}${Di(this.r)}, ${Di(this.g)}, ${Di(this.b)}${1===t?")":`, ${t})`}`}function wi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Di(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mi(t){return((t=Di(t))<16?"0":"")+t.toString(16)}function ki(t,e,i,s){return s<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new Vi(t,e,i,s)}function Ti(t){if(t instanceof Vi)return new Vi(t.h,t.s,t.l,t.opacity);if(t instanceof di||(t=Ai(t)),!t)return new Vi;if(t instanceof Vi)return t;var e=(t=t.rgb()).r/255,i=t.g/255,s=t.b/255,r=Math.min(e,i,s),a=Math.max(e,i,s),n=NaN,o=a-r,l=(a+r)/2;return o?(n=e===a?(i-s)/o+6*(i<s):i===a?(s-e)/o+2:(e-i)/o+4,o/=l<.5?a+r:2-a-r,n*=60):o=l>0&&l<1?0:n,new Vi(n,o,l,t.opacity)}function Vi(t,e,i,s){this.h=+t,this.s=+e,this.l=+i,this.opacity=+s}function $i(t){return(t=(t||0)%360)<0?t+360:t}function Hi(t){return Math.max(0,Math.min(1,t||0))}function zi(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}li(di,Ai,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ci,formatHex:Ci,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ti(this).formatHsl()},formatRgb:vi,toString:vi}),li(Si,Ri,ci(di,{brighter(t){return t=null==t?hi:Math.pow(hi,t),new Si(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ui:Math.pow(ui,t),new Si(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Si(Di(this.r),Di(this.g),Di(this.b),wi(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:Ni,formatHex:Ni,formatHex8:function(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}${Mi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Li,toString:Li})),li(Vi,function(t,e,i,s){return 1===arguments.length?Ti(t):new Vi(t,e,i,null==s?1:s)},ci(di,{brighter(t){return t=null==t?hi:Math.pow(hi,t),new Vi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ui:Math.pow(ui,t),new Vi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*e,r=2*i-s;return new Si(zi(t>=240?t-240:t+120,r,s),zi(t,r,s),zi(t<120?t+240:t-120,r,s),this.opacity)},clamp(){return new Vi($i(this.h),Hi(this.s),Hi(this.l),wi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=wi(this.opacity);return`${1===t?"hsl(":"hsla("}${$i(this.h)}, ${100*Hi(this.s)}%, ${100*Hi(this.l)}%${1===t?")":`, ${t})`}`}}));var Gi=t=>()=>t;function Yi(t){return 1===(t=+t)?Xi:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(s){return Math.pow(t+s*e,i)}}(e,i,t):Gi(isNaN(e)?i:e)}}function Xi(t,e){var i=e-t;return i?function(t,e){return function(i){return t+i*e}}(t,i):Gi(isNaN(t)?e:t)}var Ji=function t(e){var i=Yi(e);function s(t,e){var s=i((t=Ri(t)).r,(e=Ri(e)).r),r=i(t.g,e.g),a=i(t.b,e.b),n=Xi(t.opacity,e.opacity);return function(e){return t.r=s(e),t.g=r(e),t.b=a(e),t.opacity=n(e),t+""}}return s.gamma=t,s}(1);function Wi(t,e){e||(e=[]);var i,s=t?Math.min(e.length,t.length):0,r=e.slice();return function(a){for(i=0;i<s;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function _i(t,e){var i,s=e?e.length:0,r=t?Math.min(s,t.length):0,a=new Array(r),n=new Array(s);for(i=0;i<r;++i)a[i]=ts(t[i],e[i]);for(;i<s;++i)n[i]=e[i];return function(t){for(i=0;i<r;++i)n[i]=a[i](t);return n}}function Ki(t,e){var i=new Date;return t=+t,e=+e,function(s){return i.setTime(t*(1-s)+e*s),i}}function Pi(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}function Zi(t,e){var i,s={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)i in t?s[i]=ts(t[i],e[i]):r[i]=e[i];return function(t){for(i in s)r[i]=s[i](t);return r}}var Oi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ji=new RegExp(Oi.source,"g");function qi(t,e){var i,s,r,a=Oi.lastIndex=ji.lastIndex=0,n=-1,o=[],l=[];for(t+="",e+="";(i=Oi.exec(t))&&(s=ji.exec(e));)(r=s.index)>a&&(r=e.slice(a,r),o[n]?o[n]+=r:o[++n]=r),(i=i[0])===(s=s[0])?o[n]?o[n]+=s:o[++n]=s:(o[++n]=null,l.push({i:n,x:Pi(i,s)})),a=ji.lastIndex;return a<e.length&&(r=e.slice(a),o[n]?o[n]+=r:o[++n]=r),o.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var i,s=0;s<e;++s)o[(i=l[s]).i]=i.x(t);return o.join("")})}function ts(t,e){var i,s=typeof e;return null==e||"boolean"===s?Gi(e):("number"===s?Pi:"string"===s?(i=Ai(e))?(e=i,Ji):qi:e instanceof Ai?Ji:e instanceof Date?Ki:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Wi:Array.isArray(e)?_i:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Zi:Pi)(t,e)}function es(t,e){return t=+t,e=+e,function(i){return Math.round(t*(1-i)+e*i)}}var is,ss=180/Math.PI,rs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function as(t,e,i,s,r,a){var n,o,l;return(n=Math.sqrt(t*t+e*e))&&(t/=n,e/=n),(l=t*i+e*s)&&(i-=t*l,s-=e*l),(o=Math.sqrt(i*i+s*s))&&(i/=o,s/=o,l/=o),t*s<e*i&&(t=-t,e=-e,l=-l,n=-n),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*ss,skewX:Math.atan(l)*ss,scaleX:n,scaleY:o}}function ns(t,e,i,s){function r(t){return t.length?t.pop()+" ":""}return function(a,n){var o=[],l=[];return a=t(a),n=t(n),function(t,s,r,a,n,o){if(t!==r||s!==a){var l=n.push("translate(",null,e,null,i);o.push({i:l-4,x:Pi(t,r)},{i:l-2,x:Pi(s,a)})}else(r||a)&&n.push("translate("+r+e+a+i)}(a.translateX,a.translateY,n.translateX,n.translateY,o,l),function(t,e,i,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:i.push(r(i)+"rotate(",null,s)-2,x:Pi(t,e)})):e&&i.push(r(i)+"rotate("+e+s)}(a.rotate,n.rotate,o,l),function(t,e,i,a){t!==e?a.push({i:i.push(r(i)+"skewX(",null,s)-2,x:Pi(t,e)}):e&&i.push(r(i)+"skewX("+e+s)}(a.skewX,n.skewX,o,l),function(t,e,i,s,a,n){if(t!==i||e!==s){var o=a.push(r(a)+"scale(",null,",",null,")");n.push({i:o-4,x:Pi(t,i)},{i:o-2,x:Pi(e,s)})}else 1===i&&1===s||a.push(r(a)+"scale("+i+","+s+")")}(a.scaleX,a.scaleY,n.scaleX,n.scaleY,o,l),a=n=null,function(t){for(var e,i=-1,s=l.length;++i<s;)o[(e=l[i]).i]=e.x(t);return o.join("")}}}var os,ls,cs=ns(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?rs:as(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),ds=ns(function(t){return null==t?rs:(is||(is=document.createElementNS("http://www.w3.org/2000/svg","g")),is.setAttribute("transform",t),(t=is.transform.baseVal.consolidate())?as((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):rs)},", ",")",")"),us=0,hs=0,gs=0,ps=0,ms=0,bs=0,ys="object"==typeof performance&&performance.now?performance:Date,Qs="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bs(){return ms||(Qs(Us),ms=ys.now()+bs)}function Us(){ms=0}function Fs(){this._call=this._time=this._next=null}function Is(t,e,i){var s=new Fs;return s.restart(t,e,i),s}function fs(){ms=(ps=ys.now())+bs,us=hs=0;try{!function(){Bs(),++us;for(var t,e=os;e;)(t=ms-e._time)>=0&&e._call.call(void 0,t),e=e._next;--us}()}finally{us=0,function(){var t,e,i=os,s=1/0;for(;i;)i._call?(s>i._time&&(s=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:os=e);ls=t,vs(s)}(),ms=0}}function Cs(){var t=ys.now(),e=t-ps;e>1e3&&(bs-=e,ps=t)}function vs(t){us||(hs&&(hs=clearTimeout(hs)),t-ms>24?(t<1/0&&(hs=setTimeout(fs,t-ys.now()-bs)),gs&&(gs=clearInterval(gs))):(gs||(ps=ys.now(),gs=setInterval(Cs,1e3)),us=1,Qs(fs)))}function As(t,e,i){var s=new Fs;return e=null==e?0:+e,s.restart(i=>{s.stop(),t(i+e)},e,i),s}Fs.prototype=Is.prototype={constructor:Fs,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?Bs():+i)+(null==e?0:+e),this._next||ls===this||(ls?ls._next=this:os=this,ls=this),this._call=t,this._time=i,vs()},stop:function(){this._call&&(this._call=null,this._time=1/0,vs())}};var xs=St("start","end","cancel","interrupt"),Es=[];function Rs(t,e,i,s,r,a){var n=t.__transition;if(n){if(i in n)return}else t.__transition={};!function(t,e,i){var s,r=t.__transition;function a(t){i.state=1,i.timer.restart(n,i.delay,i.time),i.delay<=t&&n(t-i.delay)}function n(a){var c,d,u,h;if(1!==i.state)return l();for(c in r)if((h=r[c]).name===i.name){if(3===h.state)return As(n);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete r[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete r[c])}if(As(function(){3===i.state&&(i.state=4,i.timer.restart(o,i.delay,i.time),o(a))}),i.state=2,i.on.call("start",t,t.__data__,i.index,i.group),2===i.state){for(i.state=3,s=new Array(u=i.tween.length),c=0,d=-1;c<u;++c)(h=i.tween[c].value.call(t,t.__data__,i.index,i.group))&&(s[++d]=h);s.length=d+1}}function o(e){for(var r=e<i.duration?i.ease.call(null,e/i.duration):(i.timer.restart(l),i.state=5,1),a=-1,n=s.length;++a<n;)s[a].call(t,r);5===i.state&&(i.on.call("end",t,t.__data__,i.index,i.group),l())}function l(){for(var s in i.state=6,i.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=i,i.timer=Is(a,0,i.time)}(t,i,{name:e,index:s,group:r,on:xs,tween:Es,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Ss(t,e){var i=Ls(t,e);if(i.state>0)throw new Error("too late; already scheduled");return i}function Ns(t,e){var i=Ls(t,e);if(i.state>3)throw new Error("too late; already running");return i}function Ls(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function ws(t,e){var i,s;return function(){var r=Ns(this,t),a=r.tween;if(a!==i)for(var n=0,o=(s=i=a).length;n<o;++n)if(s[n].name===e){(s=s.slice()).splice(n,1);break}r.tween=s}}function Ds(t,e,i){var s,r;if("function"!=typeof i)throw new Error;return function(){var a=Ns(this,t),n=a.tween;if(n!==s){r=(s=n).slice();for(var o={name:e,value:i},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=o;break}l===c&&r.push(o)}a.tween=r}}function Ms(t,e,i){var s=t._id;return t.each(function(){var t=Ns(this,s);(t.value||(t.value={}))[e]=i.apply(this,arguments)}),function(t){return Ls(t,s).value[e]}}function ks(t,e){var i;return("number"==typeof e?Pi:e instanceof Ai?Ji:(i=Ai(e))?(e=i,Ji):qi)(t,e)}function Ts(t){return function(){this.removeAttribute(t)}}function Vs(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $s(t,e,i){var s,r,a=i+"";return function(){var n=this.getAttribute(t);return n===a?null:n===s?r:r=e(s=n,i)}}function Hs(t,e,i){var s,r,a=i+"";return function(){var n=this.getAttributeNS(t.space,t.local);return n===a?null:n===s?r:r=e(s=n,i)}}function zs(t,e,i){var s,r,a;return function(){var n,o,l=i(this);if(null!=l)return(n=this.getAttribute(t))===(o=l+"")?null:n===s&&o===r?a:(r=o,a=e(s=n,l));this.removeAttribute(t)}}function Gs(t,e,i){var s,r,a;return function(){var n,o,l=i(this);if(null!=l)return(n=this.getAttributeNS(t.space,t.local))===(o=l+"")?null:n===s&&o===r?a:(r=o,a=e(s=n,l));this.removeAttributeNS(t.space,t.local)}}function Ys(t,e){var i,s;function r(){var r=e.apply(this,arguments);return r!==s&&(i=(s=r)&&function(t,e){return function(i){this.setAttributeNS(t.space,t.local,e.call(this,i))}}(t,r)),i}return r._value=e,r}function Xs(t,e){var i,s;function r(){var r=e.apply(this,arguments);return r!==s&&(i=(s=r)&&function(t,e){return function(i){this.setAttribute(t,e.call(this,i))}}(t,r)),i}return r._value=e,r}function Js(t,e){return function(){Ss(this,t).delay=+e.apply(this,arguments)}}function Ws(t,e){return e=+e,function(){Ss(this,t).delay=e}}function _s(t,e){return function(){Ns(this,t).duration=+e.apply(this,arguments)}}function Ks(t,e){return e=+e,function(){Ns(this,t).duration=e}}var Ps=Je.prototype.constructor;function Zs(t){return function(){this.style.removeProperty(t)}}var Os=0;function js(t,e,i,s){this._groups=t,this._parents=e,this._name=i,this._id=s}function qs(){return++Os}var tr=Je.prototype;js.prototype={constructor:js,select:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=zt(t));for(var s=this._groups,r=s.length,a=new Array(r),n=0;n<r;++n)for(var o,l,c=s[n],d=c.length,u=a[n]=new Array(d),h=0;h<d;++h)(o=c[h])&&(l=t.call(o,o.__data__,h,c))&&("__data__"in o&&(l.__data__=o.__data__),u[h]=l,Rs(u[h],e,i,h,u,Ls(o,i)));return new js(a,this._parents,e,i)},selectAll:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=Yt(t));for(var s=this._groups,r=s.length,a=[],n=[],o=0;o<r;++o)for(var l,c=s[o],d=c.length,u=0;u<d;++u)if(l=c[u]){for(var h,g=t.call(l,l.__data__,u,c),p=Ls(l,i),m=0,b=g.length;m<b;++m)(h=g[m])&&Rs(h,e,i,m,g,p);a.push(g),n.push(l)}return new js(a,n,e,i)},selectChild:tr.selectChild,selectChildren:tr.selectChildren,filter:function(t){"function"!=typeof t&&(t=Jt(t));for(var e=this._groups,i=e.length,s=new Array(i),r=0;r<i;++r)for(var a,n=e[r],o=n.length,l=s[r]=[],c=0;c<o;++c)(a=n[c])&&t.call(a,a.__data__,c,n)&&l.push(a);return new js(s,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,i=t._groups,s=e.length,r=i.length,a=Math.min(s,r),n=new Array(s),o=0;o<a;++o)for(var l,c=e[o],d=i[o],u=c.length,h=n[o]=new Array(u),g=0;g<u;++g)(l=c[g]||d[g])&&(h[g]=l);for(;o<s;++o)n[o]=e[o];return new js(n,this._parents,this._name,this._id)},selection:function(){return new Ps(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,i=qs(),s=this._groups,r=s.length,a=0;a<r;++a)for(var n,o=s[a],l=o.length,c=0;c<l;++c)if(n=o[c]){var d=Ls(n,e);Rs(n,t,i,c,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new js(s,this._parents,t,i)},call:tr.call,nodes:tr.nodes,node:tr.node,size:tr.size,empty:tr.empty,each:tr.each,on:function(t,e){var i=this._id;return arguments.length<2?Ls(this.node(),i).on.on(t):this.each(function(t,e,i){var s,r,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?Ss:Ns;return function(){var n=a(this,t),o=n.on;o!==s&&(r=(s=o).copy()).on(e,i),n.on=r}}(i,t,e))},attr:function(t,e){var i=kt(t),s="transform"===i?ds:ks;return this.attrTween(t,"function"==typeof e?(i.local?Gs:zs)(i,s,Ms(this,"attr."+t,e)):null==e?(i.local?Vs:Ts)(i):(i.local?Hs:$s)(i,s,e))},attrTween:function(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var s=kt(t);return this.tween(i,(s.local?Ys:Xs)(s,e))},style:function(t,e,i){var s="transform"==(t+="")?cs:ks;return null==e?this.styleTween(t,function(t,e){var i,s,r;return function(){var a=pe(this,t),n=(this.style.removeProperty(t),pe(this,t));return a===n?null:a===i&&n===s?r:r=e(i=a,s=n)}}(t,s)).on("end.style."+t,Zs(t)):"function"==typeof e?this.styleTween(t,function(t,e,i){var s,r,a;return function(){var n=pe(this,t),o=i(this),l=o+"";return null==o&&(this.style.removeProperty(t),l=o=pe(this,t)),n===l?null:n===s&&l===r?a:(r=l,a=e(s=n,o))}}(t,s,Ms(this,"style."+t,e))).each(function(t,e){var i,s,r,a,n="style."+e,o="end."+n;return function(){var l=Ns(this,t),c=l.on,d=null==l.value[n]?a||(a=Zs(e)):void 0;c===i&&r===d||(s=(i=c).copy()).on(o,r=d),l.on=s}}(this._id,t)):this.styleTween(t,function(t,e,i){var s,r,a=i+"";return function(){var n=pe(this,t);return n===a?null:n===s?r:r=e(s=n,i)}}(t,s,e),i).on("end.style."+t,null)},styleTween:function(t,e,i){var s="style."+(t+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(null==e)return this.tween(s,null);if("function"!=typeof e)throw new Error;return this.tween(s,function(t,e,i){var s,r;function a(){var a=e.apply(this,arguments);return a!==r&&(s=(r=a)&&function(t,e,i){return function(s){this.style.setProperty(t,e.call(this,s),i)}}(t,a,i)),s}return a._value=e,a}(t,e,null==i?"":i))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ms(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,i;function s(){var s=t.apply(this,arguments);return s!==i&&(e=(i=s)&&function(t){return function(e){this.textContent=t.call(this,e)}}(s)),e}return s._value=t,s}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var i=this._id;if(t+="",arguments.length<2){for(var s,r=Ls(this.node(),i).tween,a=0,n=r.length;a<n;++a)if((s=r[a]).name===t)return s.value;return null}return this.each((null==e?ws:Ds)(i,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Js:Ws)(e,t)):Ls(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?_s:Ks)(e,t)):Ls(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Ns(this,t).ease=e}}(e,t)):Ls(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var i=e.apply(this,arguments);if("function"!=typeof i)throw new Error;Ns(this,t).ease=i}}(this._id,t))},end:function(){var t,e,i=this,s=i._id,r=i.size();return new Promise(function(a,n){var o={value:n},l={value:function(){0===--r&&a()}};i.each(function(){var i=Ns(this,s),r=i.on;r!==t&&((e=(t=r).copy())._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),i.on=e}),0===r&&a()})},[Symbol.iterator]:tr[Symbol.iterator]};const er=t=>+t;function ir(t){return--t*t*t+1}var sr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function rr(t,e){for(var i;!(i=t.__transition)||!(i=i[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return i}Je.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var i,s,r,a=t.__transition,n=!0;if(a){for(r in e=null==e?null:e+"",a)(i=a[r]).name===e?(s=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(s?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete a[r]):n=!1;n&&delete t.__transition}}(this,t)})},Je.prototype.transition=function(t){var e,i;t instanceof js?(e=t._id,t=t._name):(e=qs(),(i=sr).time=Bs(),t=null==t?null:t+"");for(var s=this._groups,r=s.length,a=0;a<r;++a)for(var n,o=s[a],l=o.length,c=0;c<l;++c)(n=o[c])&&Rs(n,t,e,c,o,i||rr(n,e));return new js(s,this._parents,t,e)};const ar=Math.PI,nr=2*ar,or=1e-6,lr=nr-or;function cr(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=arguments[e]+t[e]}class dr{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?cr:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return cr;const i=10**e;return function(t){this._+=t[0];for(let e=1,s=t.length;e<s;++e)this._+=Math.round(arguments[e]*i)/i+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,i,s){this._append`Q${+t},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,e,i,s,r,a){this._append`C${+t},${+e},${+i},${+s},${this._x1=+r},${this._y1=+a}`}arcTo(t,e,i,s,r){if(t=+t,e=+e,i=+i,s=+s,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=this._x1,n=this._y1,o=i-t,l=s-e,c=a-t,d=n-e,u=c*c+d*d;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>or)if(Math.abs(d*o-l*c)>or&&r){let h=i-a,g=s-n,p=o*o+l*l,m=h*h+g*g,b=Math.sqrt(p),y=Math.sqrt(u),Q=r*Math.tan((ar-Math.acos((p+u-m)/(2*b*y)))/2),B=Q/y,U=Q/b;Math.abs(B-1)>or&&this._append`L${t+B*c},${e+B*d}`,this._append`A${r},${r},0,0,${+(d*h>c*g)},${this._x1=t+U*o},${this._y1=e+U*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,i,s,r,a){if(t=+t,e=+e,a=!!a,(i=+i)<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),o=i*Math.sin(s),l=t+n,c=e+o,d=1^a,u=a?s-r:r-s;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>or||Math.abs(this._y1-c)>or)&&this._append`L${l},${c}`,i&&(u<0&&(u=u%nr+nr),u>lr?this._append`A${i},${i},0,1,${d},${t-n},${e-o}A${i},${i},0,1,${d},${this._x1=l},${this._y1=c}`:u>or&&this._append`A${i},${i},0,${+(u>=ar)},${d},${this._x1=t+i*Math.cos(r)},${this._y1=e+i*Math.sin(r)}`)}rect(t,e,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function ur(t,e){if((i=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var i,s=t.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+t.slice(i+1)]}function hr(t){return(t=ur(Math.abs(t)))?t[1]:NaN}var gr,pr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mr(t){if(!(e=pr.exec(t)))throw new Error("invalid format: "+t);var e;return new br({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function br(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yr(t,e){var i=ur(t,e);if(!i)return t+"";var s=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}mr.prototype=br.prototype,br.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Qr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>yr(100*t,e),r:yr,s:function(t,e){var i=ur(t,e);if(!i)return t+"";var s=i[0],r=i[1],a=r-(gr=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,n=s.length;return a===n?s:a>n?s+new Array(a-n+1).join("0"):a>0?s.slice(0,a)+"."+s.slice(a):"0."+new Array(1-a).join("0")+ur(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Br(t){return t}var Ur,Fr,Ir,fr=Array.prototype.map,Cr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vr(t){var e,i,s=void 0===t.grouping||void 0===t.thousands?Br:(e=fr.call(t.grouping,Number),i=t.thousands+"",function(t,s){for(var r=t.length,a=[],n=0,o=e[0],l=0;r>0&&o>0&&(l+o+1>s&&(o=Math.max(1,s-l)),a.push(t.substring(r-=o,r+o)),!((l+=o+1)>s));)o=e[n=(n+1)%e.length];return a.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",n=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?Br:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(fr.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=mr(t)).fill,i=t.align,u=t.sign,h=t.symbol,g=t.zero,p=t.width,m=t.comma,b=t.precision,y=t.trim,Q=t.type;"n"===Q?(m=!0,Q="g"):Qr[Q]||(void 0===b&&(b=12),y=!0,Q="g"),(g||"0"===e&&"="===i)&&(g=!0,e="0",i="=");var B="$"===h?r:"#"===h&&/[boxX]/.test(Q)?"0"+Q.toLowerCase():"",U="$"===h?a:/[%p]/.test(Q)?l:"",F=Qr[Q],I=/[defgprs%]/.test(Q);function f(t){var r,a,l,h=B,f=U;if("c"===Q)f=F(t)+f,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?d:F(Math.abs(t),b),y&&(t=function(t){t:for(var e,i=t.length,s=1,r=-1;s<i;++s)switch(t[s]){case".":r=e=s;break;case"0":0===r&&(r=s),e=s;break;default:if(!+t[s])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),C&&0===+t&&"+"!==u&&(C=!1),h=(C?"("===u?u:c:"-"===u||"("===u?"":u)+h,f=("s"===Q?Cr[8+gr/3]:"")+f+(C&&"("===u?")":""),I)for(r=-1,a=t.length;++r<a;)if(48>(l=t.charCodeAt(r))||l>57){f=(46===l?n+t.slice(r+1):t.slice(r))+f,t=t.slice(0,r);break}}m&&!g&&(t=s(t,1/0));var v=h.length+t.length+f.length,A=v<p?new Array(p-v+1).join(e):"";switch(m&&g&&(t=s(A+t,A.length?p-f.length:1/0),A=""),i){case"<":t=h+t+f+A;break;case"=":t=h+A+t+f;break;case"^":t=A.slice(0,v=A.length>>1)+h+t+f+A.slice(v);break;default:t=A+h+t+f}return o(t)}return b=void 0===b?6:/[gprs]/.test(Q)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),f.toString=function(){return t+""},f}return{format:u,formatPrefix:function(t,e){var i=u(((t=mr(t)).type="f",t)),s=3*Math.max(-8,Math.min(8,Math.floor(hr(e)/3))),r=Math.pow(10,-s),a=Cr[8+s/3];return function(t){return i(r*t)+a}}}}Ur=vr({thousands:",",grouping:[3],currency:["$",""]}),Fr=Ur.format,Ir=Ur.formatPrefix;var Ar=Math.random,xr=function t(e){function i(t,i){return t=null==t?0:+t,i=null==i?1:+i,1===arguments.length?(i=t,t=0):i-=t,function(){return e()*i+t}}return i.source=t,i}(Ar),Er=function t(e){function i(t,i){var s,r;return t=null==t?0:+t,i=null==i?1:+i,function(){var a;if(null!=s)a=s,s=null;else do{s=2*e()-1,a=2*e()-1,r=s*s+a*a}while(!r||r>1);return t+i*a*Math.sqrt(-2*Math.log(r)/r)}}return i.source=t,i}(Ar);const Rr=1/4294967296;function Sr(t=Math.random()){let e=0|(0<=t&&t<1?t/Rr:Math.abs(t));return()=>(e=1664525*e+1013904223|0,Rr*(e>>>0))}function Nr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Lr(t){return+t}var wr=[0,1];function Dr(t){return t}function Mr(t,e){return(e-=t=+t)?function(i){return(i-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function kr(t,e,i){var s=t[0],r=t[1],a=e[0],n=e[1];return r<s?(s=Mr(r,s),a=i(n,a)):(s=Mr(s,r),a=i(a,n)),function(t){return a(s(t))}}function Tr(t,e,i){var s=Math.min(t.length,e.length)-1,r=new Array(s),a=new Array(s),n=-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++n<s;)r[n]=Mr(t[n],t[n+1]),a[n]=i(e[n],e[n+1]);return function(e){var i=pt(t,e,1,s)-1;return a[i](r[i](e))}}function Vr(){var t,e,i,s,r,a,n=wr,o=wr,l=ts,c=Dr;function d(){var t=Math.min(n.length,o.length);return c!==Dr&&(c=function(t,e){var i;return t>e&&(i=t,t=e,e=i),function(i){return Math.max(t,Math.min(e,i))}}(n[0],n[t-1])),s=t>2?Tr:kr,r=a=null,u}function u(e){return null==e||isNaN(e=+e)?i:(r||(r=s(n.map(t),o,l)))(t(c(e)))}return u.invert=function(i){return c(e((a||(a=s(o,n.map(t),Pi)))(i)))},u.domain=function(t){return arguments.length?(n=Array.from(t,Lr),d()):n.slice()},u.range=function(t){return arguments.length?(o=Array.from(t),d()):o.slice()},u.rangeRound=function(t){return o=Array.from(t),l=es,d()},u.clamp=function(t){return arguments.length?(c=!!t||Dr,d()):c!==Dr},u.interpolate=function(t){return arguments.length?(l=t,d()):l},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i,s){return t=i,e=s,d()}}function $r(t,e,i,s){var r,a=function(t,e,i){i=+i;const s=(e=+e)<(t=+t),r=s?Bt(e,t,i):Bt(t,e,i);return(s?-1:1)*(r<0?1/-r:r)}(t,e,i);switch((s=mr(null==s?",f":s)).type){case"s":var n=Math.max(Math.abs(t),Math.abs(e));return null!=s.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hr(e)/3)))-hr(Math.abs(t)))}(a,n))||(s.precision=r),Ir(s,n);case"":case"e":case"g":case"p":case"r":null!=s.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,hr(e)-hr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(s.precision=r-("e"===s.type));break;case"f":case"%":null!=s.precision||isNaN(r=function(t){return Math.max(0,-hr(Math.abs(t)))}(a))||(s.precision=r-2*("%"===s.type))}return Fr(s)}function Hr(t){var e=t.domain;return t.ticks=function(t){var i=e();return function(t,e,i){if(!((i=+i)>0))return[];if((t=+t)===(e=+e))return[t];const s=e<t,[r,a,n]=s?Qt(e,t,i):Qt(t,e,i);if(!(a>=r))return[];const o=a-r+1,l=new Array(o);if(s)if(n<0)for(let t=0;t<o;++t)l[t]=(a-t)/-n;else for(let t=0;t<o;++t)l[t]=(a-t)*n;else if(n<0)for(let t=0;t<o;++t)l[t]=(r+t)/-n;else for(let t=0;t<o;++t)l[t]=(r+t)*n;return l}(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var s=e();return $r(s[0],s[s.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var s,r,a=e(),n=0,o=a.length-1,l=a[n],c=a[o],d=10;for(c<l&&(r=l,l=c,c=r,r=n,n=o,o=r);d-- >0;){if((r=Bt(l,c,i))===s)return a[n]=l,a[o]=c,e(a);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}s=r}return t},t}function zr(){var t=Vr()(Dr,Dr);return t.copy=function(){return e=t,zr().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());var e},Nr.apply(t,arguments),Hr(t)}function Gr(t){return function(){return t}}function Yr(t){this._context=t}function Xr(t){return new Yr(t)}function Jr(t){return t[0]}function Wr(t){return t[1]}function _r(t,e){var i=Gr(!0),s=null,r=Xr,a=null,n=function(t){let e=3;return t.digits=function(i){if(!arguments.length)return e;if(null==i)e=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);e=t}return t},()=>new dr(e)}(o);function o(o){var l,c,d,u=(o=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(o)).length,h=!1;for(null==s&&(a=r(d=n())),l=0;l<=u;++l)!(l<u&&i(c=o[l],l,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,l,o),+e(c,l,o));if(d)return a=null,d+""||null}return t="function"==typeof t?t:void 0===t?Jr:Gr(t),e="function"==typeof e?e:void 0===e?Wr:Gr(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:Gr(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Gr(+t),o):e},o.defined=function(t){return arguments.length?(i="function"==typeof t?t:Gr(!!t),o):i},o.curve=function(t){return arguments.length?(r=t,null!=s&&(a=r(s)),o):r},o.context=function(t){return arguments.length?(null==t?s=a=null:a=r(s=t),o):s},o}function Kr(t,e,i){this.k=t,this.x=e,this.y=i}Yr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Kr.prototype={constructor:Kr,scale:function(t){return 1===t?this:new Kr(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Kr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Kr.prototype;class Pr extends lt{getComputedStyleValue(t){return getComputedStyle(this).getPropertyValue(t).trim()}firstUpdated(t){super.firstUpdated(t),We(this.renderRoot.host).classed("keyboard",!0).on("mousemove.keyboard touchstart.keyboard",t=>{We(t.currentTarget.renderRoot.host).classed("keyboard",!1).on("mousemove.keyboard touchstart.keyboard",null)}).on("keydown.keyboard",t=>{We(t.currentTarget.renderRoot.host).classed("keyboard",!0).on("keydown.keyboard mousemove.keyboard touchstart.keyboard",null)})}static get greys(){const t="#999999",e={white:"#ffffff"};return e.light75=Ji(t,"#ffffff")(.75),e.light50=Ji(t,"#ffffff")(.5),e.light25=Ji(t,"#ffffff")(.25),e.grey=t,e.dark25=Ji(t,"#000000")(.25),e.dark50=Ji(t,"#000000")(.5),e.dark75=Ji(t,"#000000")(.75),e.black="#000000",e}static get shadows(){return{elevations:[0,2,4,8,16],baselineColor:"#000000",baselineColorString:"0, 0, 0",inverseBaselineColor:"#FFFFFF",inverseBaselineColorString:"255, 255, 255",opacityUmbra:.2,opacityPenumbra:.14,opacityAmbient:.12,opacityBoost:.2,mapUmbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:3,b:1,s:-2},4:{x:0,y:2,b:4,s:-1},8:{x:0,y:5,b:5,s:-3},16:{x:0,y:8,b:10,s:-5}},mapPenumbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:2,b:2,s:0},4:{x:0,y:4,b:5,s:0},8:{x:0,y:8,b:10,s:1},16:{x:0,y:16,b:24,s:2}},mapAmbient:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:1,b:5,s:0},4:{x:0,y:1,b:10,s:0},8:{x:0,y:3,b:14,s:2},16:{x:0,y:6,b:30,s:5}}}}static cssBoxShadow(t,e=!1,i=!1){const s=this.shadows.opacityUmbra+this.shadows.opacityBoost,r=this.shadows.opacityPenumbra+this.shadows.opacityBoost,a=this.shadows.opacityAmbient+this.shadows.opacityBoost,n=i?`rgba(${this.shadows.inverseBaselineColorString}, ${s})`:`rgba(${this.shadows.baselineColorString}, ${s})`,o=i?`rgba(${this.shadows.inverseBaselineColorString}, ${r})`:`rgba(${this.shadows.baselineColorString}, ${r})`,l=i?`rgba(${this.shadows.inverseBaselineColorString}, ${a})`:`rgba(${this.shadows.baselineColorString}, ${a})`,c=this.shadows.mapUmbra[t],d=this.shadows.mapPenumbra[t],u=this.shadows.mapAmbient[t];return`${e?`${-c.y}px ${c.y/2}px ${c.b}px ${c.s}px`:`${c.y/2}px ${c.y}px ${c.b}px ${c.s}px`} ${n}, ${e?`${-d.y}px ${d.y/2}px ${d.b}px ${d.s}px`:`${d.y/2}px ${d.y}px ${d.b}px ${d.s}px`} ${o}, ${e?`${-u.y}px ${u.y/2}px ${u.b}px ${u.s}px`:`${u.y/2}px ${u.y}px ${u.b}px ${u.s}px`} ${l}`}static get svgDefs(){const t=Pr.shadows,e=t.elevations.map(e=>`\n <filter id=shadow-${e} filterUnits="userSpaceOnUse" x="-100%" y="-100%" width="200%" height="200%">\n <feComponentTransfer in="SourceAlpha" result="solid">\n <feFuncA type="table" tableValues="0 1 1"/>\n </feComponentTransfer>\n <feOffset in="solid" result="offU" dx=${t.mapUmbra[e].y/2} dy=${t.mapUmbra[e].y} />\n <feOffset in="solid" result="offP" dx=${t.mapPenumbra[e].y/2} dy=${t.mapPenumbra[e].y} />\n <feOffset in="solid" result="offA" dx=${t.mapAmbient[e].y/2} dy=${t.mapAmbient[e].y} />\n ${0===t.mapUmbra[e].s?"":`<feMorphology in="offU" result="spreadU" operator=${t.mapUmbra[e].s>0?"dilate":"erode"} radius=${Math.abs(t.mapUmbra[e].s)} />`}\n ${0===t.mapPenumbra[e].s?"":`<feMorphology in="offP" result="spreadP" operator=${t.mapPenumbra[e].s>0?"dilate":"erode"} radius=${Math.abs(t.mapPenumbra[e].s)} />`}\n ${0===t.mapAmbient[e].s?"":`<feMorphology in="offA" result="spreadA" operator=${t.mapAmbient[e].s>0?"dilate":"erode"} radius=${Math.abs(t.mapAmbient[e].s)} />`}\n <feGaussianBlur in=${0===t.mapUmbra[e].s?"offU":"spreadU"} result="blurU" stdDeviation=${t.mapUmbra[e].b/2} />\n <feGaussianBlur in=${0===t.mapPenumbra[e].s?"offP":"spreadP"} result="blurP" stdDeviation=${t.mapPenumbra[e].b/2} />\n <feGaussianBlur in=${0===t.mapAmbient[e].s?"offA":"spreadA"} result="blurA" stdDeviation=${t.mapAmbient[e].b/2} />\n <feFlood in="SourceGraphic" result="opU" flood-color=${t.baselineColor} flood-opacity=${t.opacityUmbra+t.opacityBoost} />\n <feFlood in="SourceGraphic" result="opP" flood-color=${t.baselineColor} flood-opacity=${t.opacityPenumbra+t.opacityBoost} />\n <feFlood in="SourceGraphic" result="opA" flood-color=${t.baselineColor} flood-opacity=${t.opacityAmbient+t.opacityBoost} />\n <feComposite in="opU" in2="blurU" result="shU" operator="in" />\n <feComposite in="opP" in2="blurP" result="shP" operator="in" />\n <feComposite in="opA" in2="blurA" result="shA" operator="in" />\n <feMorphology in="solid" result="smaller" operator="erode" radius="1" />\n <feComposite in="shU" in2="smaller" result="finalU" operator="out" />\n <feComposite in="shP" in2="smaller" result="finalP" operator="out" />\n <feComposite in="shA" in2="smaller" result="finalA" operator="out" />\n <feMerge>\n <feMergeNode in="finalU" />\n <feMergeNode in="finalP" />\n <feMergeNode in="finalA" />\n <feMergeNode in="SourceGraphic" />\n </feMerge>\n </filter>`);return`\n <defs>\n ${e}\n </defs>\n `}static get svgFilters(){const t=Pr.shadows,e=t.elevations.map(e=>X`
|
|
23
23
|
<filter id=${`shadow-${e}`} x="-250%" y="-250%" width="600%" height="600%">
|
|
24
24
|
<feComponentTransfer in="SourceAlpha" result="solid">
|
|
25
25
|
<feFuncA type="table" tableValues="0 1 1"/>
|
|
@@ -113,7 +113,7 @@ const f=globalThis,C=f.trustedTypes,v=C?C.createPolicy("lit-html",{createHTML:t=
|
|
|
113
113
|
width: 0;
|
|
114
114
|
height: 0;
|
|
115
115
|
}
|
|
116
|
-
`}}customElements.define("decidables-button",class extends
|
|
116
|
+
`}}customElements.define("decidables-button",class extends Pr{static get properties(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}constructor(){super(),this.disabled=!1}static get styles(){return[super.styles,n`
|
|
117
117
|
:host {
|
|
118
118
|
---decidables-button-background-color-disabled: var(--decidables-button-background-color, var(---color-element-disabled));
|
|
119
119
|
---decidables-button-background-color-enabled: var(--decidables-button-background-color, var(---color-element-enabled));
|
|
@@ -179,7 +179,7 @@ const f=globalThis,C=f.trustedTypes,v=C?C.createPolicy("lit-html",{createHTML:t=
|
|
|
179
179
|
* Copyright 2018 Google LLC
|
|
180
180
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
181
181
|
*/
|
|
182
|
-
const
|
|
182
|
+
const Zr=t=>t??W;customElements.define("decidables-slider",class extends Pr{static get properties(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0},scale:{attribute:"scale",type:Boolean,reflect:!0},max:{attribute:"max",type:Number,reflect:!0},min:{attribute:"min",type:Number,reflect:!0},step:{attribute:"step",type:Number,reflect:!0},value:{attribute:"value",type:Number,reflect:!0},nonlinear:{attribute:!1,type:Boolean,reflect:!1}}}constructor(){super(),this.disabled=!1,this.scale=!1,this.max=void 0,this.min=void 0,this.step=void 0,this.value=void 0,this.nonlinear=!1,this.rangeMax=void 0,this.rangeMin=void 0,this.rangeStep=void 0,this.rangeValue=void 0,this.toRange=void 0,this.fromRange=void 0}nonlinearRange(t,e,i){this.nonlinear=t,this.toRange=t?e:void 0,this.fromRange=t?i:void 0}rangeChanged(t){this.value=this.nonlinear?this.fromRange(t.target.value):t.target.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0}))}rangeInputted(t){this.value=this.nonlinear?this.fromRange(t.target.value):t.target.value}spinnerInputted(t){this.value=t.target.value}willUpdate(){this.rangeMax=void 0===this.max?void 0:this.nonlinear?this.toRange(this.max):this.max,this.rangeMin=void 0===this.min?void 0:this.nonlinear?this.toRange(this.min):this.min,this.rangeStep=void 0===this.step?void 0:this.nonlinear?"any":this.step,this.rangeValue=void 0===this.value?void 0:this.nonlinear?this.toRange(this.value):this.value}static get styles(){return[super.styles,n`
|
|
183
183
|
:host {
|
|
184
184
|
---decidables-slider-background-color: var(--decidables-slider-background-color, var(---color-element-disabled));
|
|
185
185
|
---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
|
|
@@ -470,16 +470,16 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
470
470
|
<slot></slot>
|
|
471
471
|
</label>
|
|
472
472
|
<div class="range">
|
|
473
|
-
<input ?disabled=${this.disabled} type="range" id="slider" min=${
|
|
473
|
+
<input ?disabled=${this.disabled} type="range" id="slider" min=${Zr(this.rangeMin)} max=${Zr(this.rangeMax)} step=${Zr(this.rangeStep)} .value=${this.rangeValue} @change=${this.rangeChanged.bind(this)} @input=${this.rangeInputted.bind(this)}>
|
|
474
474
|
${this.scale?Y`
|
|
475
475
|
<datalist id="ticks">
|
|
476
|
-
<option value=${
|
|
477
|
-
<option value=${
|
|
476
|
+
<option value=${Zr(this.rangeMax)} label=${Zr(this.max)}></option>
|
|
477
|
+
<option value=${Zr(this.rangeMin)} label=${Zr(this.min)}></option>
|
|
478
478
|
</datalist>
|
|
479
479
|
`:Y``}
|
|
480
480
|
</div>
|
|
481
|
-
<decidables-spinner ?disabled=${this.disabled} min=${
|
|
482
|
-
`}});customElements.define("decidables-spinner",class extends
|
|
481
|
+
<decidables-spinner ?disabled=${this.disabled} min=${Zr(this.min)} max=${Zr(this.max)} step=${Zr(this.step)} .value=${this.value} @input=${this.spinnerInputted.bind(this)}></decidables-spinner>
|
|
482
|
+
`}});customElements.define("decidables-spinner",class extends Pr{static get properties(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0},max:{attribute:"max",type:Number,reflect:!0},min:{attribute:"min",type:Number,reflect:!0},step:{attribute:"step",type:Number,reflect:!0},value:{attribute:"value",type:Number,reflect:!0}}}constructor(){super(),this.disabled=!1,this.max=void 0,this.min=void 0,this.step=void 0,this.value=void 0}inputted(t){this.value=t.target.value}static get styles(){return[super.styles,n`
|
|
483
483
|
:host {
|
|
484
484
|
---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
|
|
485
485
|
---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
|
|
@@ -576,9 +576,9 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
576
576
|
`]}render(){return Y`
|
|
577
577
|
<label>
|
|
578
578
|
<slot></slot>
|
|
579
|
-
<input ?disabled=${this.disabled} type="number" min=${
|
|
579
|
+
<input ?disabled=${this.disabled} type="number" min=${Zr(this.min)} max=${Zr(this.max)} step=${Zr(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
|
|
580
580
|
</label>
|
|
581
|
-
`}});customElements.define("decidables-switch",class extends
|
|
581
|
+
`}});customElements.define("decidables-switch",class extends Pr{static get properties(){return{checked:{attribute:"checked",type:Boolean,reflect:!0},disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}constructor(){super(),this.checked=!1,this.disabled=!1}changed(t){this.checked=t.target.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked},bubbles:!0}))}static get styles(){return[super.styles,n`
|
|
582
582
|
:host {
|
|
583
583
|
display: flex;
|
|
584
584
|
|
|
@@ -705,7 +705,7 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
705
705
|
<label for="switch">
|
|
706
706
|
<slot></slot>
|
|
707
707
|
</label>
|
|
708
|
-
`}});customElements.define("decidables-toggle",class extends
|
|
708
|
+
`}});customElements.define("decidables-toggle",class extends Pr{static get properties(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}constructor(){super(),this.disabled=!1}static get styles(){return[super.styles,n`
|
|
709
709
|
fieldset {
|
|
710
710
|
display: flex;
|
|
711
711
|
|
|
@@ -727,7 +727,7 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
727
727
|
<legend><slot name="label"></slot></legend>
|
|
728
728
|
<slot></slot>
|
|
729
729
|
</fieldset>
|
|
730
|
-
`}});function Or(t){return class extends t{static get properties(){return{width:{attribute:!1,type:Number,reflect:!1},height:{attribute:!1,type:Number,reflect:!1},rem:{attribute:!1,type:Number,reflect:!1}}}constructor(){super(),this.width=NaN,this.height=NaN,this.rem=NaN}getDimensions(){this.width=parseFloat(this.getComputedStyleValue("width"),10),this.height=parseFloat(this.getComputedStyleValue("height"),10),this.rem=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("font-size"),10)}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(this.getDimensions.bind(this)),this.resizeObserver.observe(this)}disconnectedCallback(){this.resizeObserver.unobserve(this),super.disconnectedCallback()}}}customElements.define("decidables-toggle-option",class extends
|
|
730
|
+
`}});function Or(t){return class extends t{static get properties(){return{width:{attribute:!1,type:Number,reflect:!1},height:{attribute:!1,type:Number,reflect:!1},rem:{attribute:!1,type:Number,reflect:!1}}}constructor(){super(),this.width=NaN,this.height=NaN,this.rem=NaN}getDimensions(){this.width=parseFloat(this.getComputedStyleValue("width"),10),this.height=parseFloat(this.getComputedStyleValue("height"),10),this.rem=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("font-size"),10)}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(this.getDimensions.bind(this)),this.resizeObserver.observe(this)}disconnectedCallback(){this.resizeObserver.unobserve(this),super.disconnectedCallback()}}}customElements.define("decidables-toggle-option",class extends Pr{static get properties(){return{checked:{attribute:"checked",type:Boolean,reflect:!0},disabled:{attribute:"disabled",type:Boolean,reflect:!0},name:{attribute:"name",type:String,reflect:!0},value:{attribute:"value",type:String,reflect:!0}}}constructor(){super(),this.checked=!1,this.disabled=!1,this.name=void 0,this.value=void 0}changed(t){this.checked=t.target.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked,value:this.value},bubbles:!0}))}static get styles(){return[super.styles,n`
|
|
731
731
|
:host {
|
|
732
732
|
display: flex;
|
|
733
733
|
}
|
|
@@ -824,7 +824,7 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
824
824
|
<label for="toggle-option">
|
|
825
825
|
<slot></slot>
|
|
826
826
|
</label>
|
|
827
|
-
`}});var jr={a:"#e41a1c",z:"#377eb8",v:"#ff7f00",t0:"#f781bf",s:"#999999",left:"#f032e6",right:"#10dbc9",correct:"#4daf4a",error:"#984ea3",nr:"#cccccc"};class qr extends
|
|
827
|
+
`}});var jr={a:"#e41a1c",z:"#377eb8",v:"#ff7f00",t0:"#f781bf",s:"#999999",left:"#f032e6",right:"#10dbc9",correct:"#4daf4a",error:"#984ea3",nr:"#cccccc"};class qr extends Pr{static get properties(){return{interactive:{attribute:"interactive",type:Boolean,reflect:!0}}}constructor(){super(),this.interactive=!1}static get colors(){return jr}static get lights(){return Object.keys(qr.colors).reduce((t,e)=>(t[e]=Ji(qr.colors[e],"#ffffff")(.5),t),{})}static get darks(){return Object.keys(qr.colors).reduce((t,e)=>(t[e]=Ji(qr.colors[e],"#000000")(.5),t),{})}static get styles(){return[super.styles,n`
|
|
828
828
|
:host {
|
|
829
829
|
/* Declare base colors */
|
|
830
830
|
${a(Object.keys(qr.colors).map(t=>`---color-${t}: var(--color-${t}, ${this.colors[t]});`).join("\n"))}
|
|
@@ -1591,8 +1591,13 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
1593
|
|
|
1594
|
-
.measure {
|
|
1595
|
-
stroke-width:
|
|
1594
|
+
.measure .line.short {
|
|
1595
|
+
stroke-width: 0;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.measure .markers {
|
|
1599
|
+
fill: none;
|
|
1600
|
+
stroke-width: 0;
|
|
1596
1601
|
}
|
|
1597
1602
|
|
|
1598
1603
|
.measure .label {
|
|
@@ -1610,12 +1615,6 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
1610
1615
|
text-anchor: end;
|
|
1611
1616
|
}
|
|
1612
1617
|
|
|
1613
|
-
/* Hack to avoid lack of context-stroke and context-fill in Safari */
|
|
1614
|
-
.measure-arrow.a {
|
|
1615
|
-
fill: var(---color-a);
|
|
1616
|
-
stroke: var(---color-a);
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
1618
|
.measure.z .line {
|
|
1620
1619
|
stroke: var(---color-z);
|
|
1621
1620
|
}
|
|
@@ -1627,12 +1626,6 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
1627
1626
|
text-anchor: start;
|
|
1628
1627
|
}
|
|
1629
1628
|
|
|
1630
|
-
/* Hack to avoid lack of context-stroke and context-fill in Safari */
|
|
1631
|
-
.measure-arrow.z {
|
|
1632
|
-
fill: var(---color-z);
|
|
1633
|
-
stroke: var(---color-z);
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
1629
|
.measure.v .line {
|
|
1637
1630
|
stroke: var(---color-v);
|
|
1638
1631
|
}
|
|
@@ -1642,12 +1635,6 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
1642
1635
|
text-anchor: start;
|
|
1643
1636
|
}
|
|
1644
1637
|
|
|
1645
|
-
/* Hack to avoid lack of context-stroke and context-fill in Safari */
|
|
1646
|
-
.measure-arrow.v {
|
|
1647
|
-
fill: var(---color-v);
|
|
1648
|
-
stroke: var(---color-v);
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
1638
|
.measure.t0 .line {
|
|
1652
1639
|
stroke: var(---color-t0);
|
|
1653
1640
|
}
|
|
@@ -1657,6 +1644,37 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
1657
1644
|
text-anchor: middle;
|
|
1658
1645
|
}
|
|
1659
1646
|
|
|
1647
|
+
.measure-arrow {
|
|
1648
|
+
fill: context-stroke;
|
|
1649
|
+
stroke: context-stroke;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
.measure-arrow .arrow {
|
|
1653
|
+
stroke-width: 1;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
.measure-arrow.capped .cap {
|
|
1657
|
+
stroke-width: 2;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
/* Hack to avoid lack of context-stroke and context-fill in Safari */
|
|
1661
|
+
.measure-arrow.a {
|
|
1662
|
+
fill: var(---color-a);
|
|
1663
|
+
stroke: var(---color-a);
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/* Hack to avoid lack of context-stroke and context-fill in Safari */
|
|
1667
|
+
.measure-arrow.z {
|
|
1668
|
+
fill: var(---color-z);
|
|
1669
|
+
stroke: var(---color-z);
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/* Hack to avoid lack of context-stroke and context-fill in Safari */
|
|
1673
|
+
.measure-arrow.v {
|
|
1674
|
+
fill: var(---color-v);
|
|
1675
|
+
stroke: var(---color-v);
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1660
1678
|
/* Hack to avoid lack of context-stroke and context-fill in Safari */
|
|
1661
1679
|
.measure-arrow.t0 {
|
|
1662
1680
|
fill: var(---color-t0);
|
|
@@ -1722,7 +1740,7 @@ const Pr=t=>t??W;customElements.define("decidables-slider",class extends Zr{stat
|
|
|
1722
1740
|
.rt-label.error text {
|
|
1723
1741
|
dominant-baseline: hanging;
|
|
1724
1742
|
}
|
|
1725
|
-
`]}render(){return Y``}willUpdate(){this.alignState()}update(t){if(super.update(t),Number.isNaN(this.width)||Number.isNaN(this.height)||Number.isNaN(this.rem))return;const e=this.width,i=this.height;let s,r;e/i>1.5?(r=i,s=1.5*r):(s=e,r=s/1.5);const a=1*this.rem,n=3*this.rem,o=3.75*this.rem,l=3.25*this.rem,c=r-(a+n),d=s-(o+l),u=.75*this.rem,h=.5*c,g=.25*c-u,p=.75*this.rem,m=.9*d,b=.1*d-p,y=parseInt(this.getComputedStyleValue("---transition-duration"),10),Q=zr().domain([this.scale.time.min,this.scale.time.max]).range([0,m]),B=zr().domain([this.scale.evidence.min,this.scale.evidence.max]).range([h,0]),U=zr().domain([this.scale.density.min,this.scale.density.max]).range([g,0]),F=zr().domain([this.scale.density.min,this.scale.density.max]).range([0,g]),I=zr().domain([0,1]).range([0,c]),f=oi().subject((t,e)=>({x:Q(e.t0),y:B(e.startingPoint)})).on("start",t=>{We(t.currentTarget).classed("dragging",!0)}).on("drag",t=>{this.drag=!0;const e=!!t.sourceEvent.shiftKey&&(Math.abs(t.x-t.subject.x)>Math.abs(t.y-t.subject.y)?"t0":"z");let i=Q.invert(t.x),s=(B.invert(t.y)+this.a/2)/this.a;i="z"===e?Q.invert(t.subject.x):i<ea.t0.MIN?ea.t0.MIN:i>ea.t0.MAX?ea.t0.MAX:i,s="t0"===e?(B.invert(t.subject.y)+this.a/2)/this.a:s<ea.z.MIN?ea.z.MIN:s>ea.z.MAX?ea.z.MAX:s,this.t0=i,this.z=s,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-t0",{detail:{t0:this.t0},bubbles:!0})),this.dispatchEvent(new CustomEvent("ddm-model-z",{detail:{z:this.z},bubbles:!0}))}).on("end",t=>{We(t.currentTarget).classed("dragging",!1),this.drag=!1}),C=oi().on("start",t=>{We(t.currentTarget).classed("dragging",!0)}).on("drag",t=>{this.drag=!0;let e=(B.invert(t.y)-this.startingPoint)/(Q.invert(t.x)-this.t0)*1e3;e=e<ea.v.MIN?ea.v.MIN:e>ea.v.MAX?ea.v.MAX:e,this.v=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-v",{detail:{v:this.v},bubbles:!0}))}).on("end",t=>{We(t.currentTarget).classed("dragging",!1),this.drag=!1}),v=oi().subject((t,e)=>({x:0,y:B(e.value)})).on("start",t=>{We(t.currentTarget).classed("dragging",!0)}).on("drag",t=>{this.drag=!0;const e=B.invert(t.y);let i=Math.abs(2*e);i=i<ea.a.MIN?ea.a.MIN:i>ea.a.MAX?ea.a.MAX:i,this.a=i,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-a",{detail:{a:this.a},bubbles:!0}))}).on("end",t=>{We(t.currentTarget).classed("dragging",!1),this.drag=!1}),A=_r().x(t=>Q(t.t)).y(t=>B(t.e)),x=_r().x(t=>Q(t.t)).y(t=>U(t.d)),E=_r().x(t=>Q(t.t)).y(t=>F(t.d)),R=We(this.renderRoot).selectAll(".main").data([{width:this.width,height:this.height,rem:this.rem}]),S=R.enter().append("svg").classed("main",!0).html(qr.svgDefs),N=S.append("defs"),L=t=>{N.append("marker").attr("id",`measure-arrow-${t}`).attr("class",`measure-arrow ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-5 -5 10 10").attr("refX","2").attr("refY","0").attr("markerWidth","10").attr("markerHeight","10").append("path").attr("stroke","context-stroke").attr("fill","context-stroke").attr("d","M -3 -3 l 6 3 l -6 3 z")},w=t=>{const e=N.append("marker").attr("id",`measure-arrow-cap-${t}`).attr("class",`measure-arrow cap ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-5 -5 10 10").attr("refX","2").attr("refY","0").attr("markerWidth","10").attr("markerHeight","10");e.append("path").attr("stroke","context-stroke").attr("fill","context-stroke").attr("d","M -3 -3 l 6 3 l -6 3 z"),e.append("path").attr("stroke","context-stroke").attr("fill","context-stroke").attr("stroke-width","2").attr("d","M 4 -4 l 0 8")};L("a"),L("z"),w("v"),L("t0"),w("t0");const D=t=>{N.append("marker").attr("id",`model-sd-cap-${t}`).attr("class",`model-sd cap ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-5 -5 10 10").attr("refX","0").attr("refY","0").attr("markerWidth","10").attr("markerHeight","10").append("path").attr("stroke","context-stroke").attr("fill","context-stroke").attr("stroke-width","2").attr("d","M 0 -4 l 0 8"),N.append("marker").attr("id",`data-sd-cap-${t}`).attr("class",`data-sd cap ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-5 -5 10 10").attr("refX","0").attr("refY","0").attr("markerWidth","10").attr("markerHeight","10").append("path").attr("stroke","context-stroke").attr("fill","context-stroke").attr("stroke-width","2").attr("d","M 0 -3 l 0 6")};D("error"),D("correct");const M=N.append("linearGradient").attr("id","path-animate").attr("gradientUnits","userSpaceOnUse").attr("color-interpolation","linearRGB").attr("x1","0").attr("x2","0").attr("y1",B(this.bounds.upper)).attr("y2",B(this.bounds.lower));M.append("stop").classed("stop-0",!0).attr("offset","0%"),M.append("stop").classed("stop-100",!0).attr("offset","100%");const k=S.merge(R).attr("viewBox",`0 0 ${s} ${r}`),T=k.selectAll(".plot.density").data([{outcome:"correct",data:{meanRT:this.data.correctMeanRT,sdRT:this.data.correctSDRT},model:{meanRT:this.model.correctMeanRT,sdRT:this.model.correctSDRT,dist:this.model.correctDist},densityScale:U,densityLine:x,alignDistribution:this.alignCorrectDistribution.bind(this)},{outcome:"error",data:{meanRT:this.data.errorMeanRT,sdRT:this.data.errorSDRT},model:{meanRT:this.model.errorMeanRT,sdRT:this.model.errorSDRT,dist:this.model.errorDist},densityScale:F,densityLine:E,alignDistribution:this.alignErrorDistribution.bind(this)}]),V=S.append("g").classed("plot evidence",!0),$=T.enter().append("g").attr("class",t=>`plot density ${t.outcome}`),H=S.append("g").classed("plot accuracy",!0),z=k.select(".plot.evidence").attr("transform",`translate(${o}, ${a+g+u})`),G=$.merge(T).attr("transform",t=>`translate(${o}, ${"correct"===t.outcome?a:a+g+h+2*u})`),Y=k.select(".plot.accuracy").attr("transform",`translate(${o+m+p}, ${a})`);V.append("clipPath").attr("id","clip-evidence").append("rect"),z.select("clipPath rect").attr("y",B(this.bounds.upper)).attr("height",B(this.bounds.lower)-B(this.bounds.upper)+1).attr("width",m+1);const X=V.append("g").classed("underlayer",!0),J=$.append("g").classed("underlayer",!0),W=H.append("g").classed("underlayer",!0),_=z.select(".underlayer"),K=G.select(".underlayer"),Z=Y.select(".underlayer");V.append("g").classed("content",!0).append("g").classed("paths",!0);const P=$.append("g").classed("content",!0);H.append("g").classed("content",!0);const O=z.select(".content"),j=G.select(".content"),q=Y.select(".content");V.append("g").classed("overlayer",!0),$.append("g").classed("overlayer",!0),H.append("g").classed("overlayer",!0);const tt=z.select(".overlayer"),et=G.select(".overlayer");X.append("rect").classed("background",!0),J.append("rect").classed("background",!0),_.select(".background").transition().duration(this.drag?0:y).ease(ir).attr("y",B(this.bounds.upper)).attr("height",B(this.bounds.lower)-B(this.bounds.upper)).attr("width",m),K.select(".background").transition().duration(y).ease(ir).attr("height",g).attr("width",m),J.filter(t=>"error"===t.outcome).append("g").classed("axis time",!0);const it=K.filter(t=>"error"===t.outcome).select(".axis.time").attr("transform",`translate(0, ${g+.25*this.rem})`);var st;it.transition().duration(y).ease(ir).call((st=Q,xt(3,st))).attr("font-size",null).attr("font-family",null).selectAll("line, path").attr("stroke",null);const rt=J.filter(t=>"error"===t.outcome).append("text").classed("title time",!0).attr("text-anchor","middle");rt.append("tspan").classed("name",!0).text("Time (ms)"),K.filter(t=>"error"===t.outcome).select(".title.time").transition().duration(y).ease(ir).attr("transform",`translate(${m/2}, ${g+2.5*this.rem})`),X.append("g").classed("axis evidence",!0),J.append("g").attr("class",t=>`axis density ${t.outcome}`),W.append("g").classed("axis accuracy",!0);const at=_.select(".axis.evidence").attr("transform",`translate(${-.25*this.rem}, 0)`),nt=K.select(".axis.density").attr("transform",`translate(${-.25*this.rem}, 0)`),ot=Z.select(".axis.accuracy").attr("transform",`translate(${b+.25*this.rem}, 0)`),lt=at.transition().duration(y).ease(ir).call(Et(B)).attr("font-size",null).attr("font-family",null),ct=nt.transition().duration(y).ease(ir).each((t,e,i)=>{Et(t.densityScale).ticks(2)(We(i[e]))}).attr("font-size",null).attr("font-family",null),dt=ot.transition().duration(y).ease(ir).call(function(t){return xt(2,t)}(I)).attr("font-size",null).attr("font-family",null);lt.selectAll("line, path").attr("stroke",null),ct.selectAll("line, path").attr("stroke",null),dt.selectAll("line, path").attr("stroke",null);const ut=X.append("text").classed("title evidence",!0).attr("text-anchor","middle"),ht=J.append("text").attr("class",t=>`title density ${t.outcome}`).attr("text-anchor","middle"),gt=W.append("text").classed("title accuracy",!0).attr("text-anchor","middle");ut.append("tspan").classed("name",!0).text("Evidence"),ht.append("tspan").classed("name",!0).text("Density"),gt.append("tspan").classed("name",!0).text("Accuracy"),_.select(".title.evidence").transition().duration(y).ease(ir).attr("transform",`translate(${-2.5*this.rem}, ${h/2})rotate(-90)`),K.select(".title.density").transition().duration(y).ease(ir).attr("transform",`translate(${-2.5*this.rem}, ${g/2})rotate(-90)`),Z.select(".title.accuracy").transition().duration(y).ease(ir).attr("transform",`translate(${b+2.25*this.rem}, ${c/2})rotate(90)`);const pt=O.select(".paths").selectAll(".path").data(this.data.trials.filter(t=>void 0!==t.path)),mt=Ke(),bt=pt.enter().append("g").classed("path",!0).attr("data-new-trial-ease-time",0).on("pointerenter",(t,e)=>{if(!this.drag){We(t.currentTarget).classed("highlight",!0).raise();const i=tt.append("g").classed(`rt-label ${e.outcome}`,!0),s=i.append("rect"),r=i.append("text").text(`RT = ${e.rt.toFixed()}`).attr("x",Q(e.rt)).attr("y","correct"===e.outcome?B(this.bounds.upper)-.25*this.rem:B(this.bounds.lower)+.125*this.rem).node().getBBox();s.attr("x",r.x-.125*this.rem).attr("y",r.y+.125*this.rem).attr("width",r.width+.25*this.rem).attr("height",r.height-.25*this.rem),mt.set(t.currentTarget,i)}}).on("pointerout",(t,e)=>{this.drag||(We(t.currentTarget).classed("highlight",!1).lower(),t.currentTarget.parentNode.insertBefore(t.currentTarget,t.currentTarget.parentNode.children[e.index]),mt.get(t.currentTarget).remove())});bt.append("path").classed("curve",!0).attr("clip-path","url(#clip-evidence)").attr("pathLength",1).attr("stroke-dashoffset",1);const yt=bt.merge(pt).attr("class",t=>`path ${t.outcome}`);yt.select(".curve").transition().duration(this.drag?0:y).ease(ir).attr("stroke",t=>this.getComputedStyleValue(`---color-${t.outcome}`)).attrTween("d",(t,e,i)=>{const s=i[e],r=ts(void 0!==s.a?s.a:this.a,this.a),a=ts(void 0!==s.z?s.z:this.z,this.z),n=ts(void 0!==s.v?s.v:this.v,this.v),o=ts(void 0!==s.t0?s.t0:this.t0,this.t0);return e=>{s.a=r(e),s.z=a(e),s.v=n(e),s.t0=o(e);const i=this.alignPath(t.seed,s.a,s.z,s.v,s.t0);return A(i)}});const Qt=yt.filter(t=>t.animate&&!this.paused);if(!Qt.empty()){const t=Qt.attr("data-new-trial-ease-time"),e=e=>zr().domain([0,1]).range([t,1])(e),i=e=>i=>zr().domain([e(t),1]).range([0,1])(e(i));Qt.classed("animate",!0).select(".curve").attr("stroke-dasharray",1),Qt.transition("new").duration(e=>Math.floor(1.5*e.rt*(1-t))).ease(e).attr("data-new-trial-ease-time",1).select(".curve").attrTween("stroke-dashoffset",(t,e,s)=>{const r=ts(s[e].getAttribute("stroke-dashoffset"),0);return t=>r(i(er)(t))}).on("end",(t,e,i)=>{We(i[e].parentElement).classed("animate",!1).attr("data-new-trial-ease-time",null),t.animate=!1,this.animate=!1,this.alignState(),this.requestUpdate(),this.dispatchEvent(new CustomEvent("accumulable-response",{detail:{outcome:t.outcome,data:this.data,model:this.model},bubbles:!0}))})}const Bt=yt.filter(t=>t.animate&&this.paused);if(!Bt.empty()){const t=Bt.attr("data-new-trial-ease-time");Bt.classed("animate",!0).select(".curve").attr("stroke-dasharray",1).attr("stroke-dashoffset",()=>ts(1,0)(er(t)))}yt.filter(t=>!t.animate).attr("data-new-trial-ease-time",null),pt.exit().remove();const Ut=P.append("g").attr("class",t=>`dist ${t.outcome}`);Ut.append("path").classed("curve",!0),j.select(".dist").select(".curve").transition().duration(this.drag?0:y).ease(ir).attrTween("d",(t,e,i)=>{const s=i[e],r=ts(void 0!==s.a?s.a:this.a,this.a),a=ts(void 0!==s.z?s.z:this.z,this.z),n=ts(void 0!==s.v?s.v:this.v,this.v),o=ts(void 0!==s.t0?s.t0:this.t0,this.t0);return e=>{s.a=r(e),s.z=a(e),s.v=n(e),s.t0=o(e);const i=t.alignDistribution(s.a,s.z,s.v,s.t0);return t.densityLine(i)}});const Ft=O.selectAll(".rt").data(this.data.trials),It=Ft.enter().append("g");It.append("line").classed("mark",!0).attr("x1",t=>Q(t.rt)).attr("x2",t=>Q(t.rt)).attr("y1",t=>"correct"===t.outcome?B(1)-.125*this.rem:B(-1)+.125*this.rem).attr("y2",t=>"correct"===t.outcome?B(1)-.675*this.rem:B(-1)+.675*this.rem);const ft=It.merge(Ft).attr("class",t=>`rt ${t.outcome}`);ft.filter(t=>!t.animate).select(".mark").transition().duration(this.drag?0:y).ease(ir).attr("stroke",t=>this.getComputedStyleValue(`---color-${t.outcome}`)).attr("x1",t=>Q(t.rt)).attr("x2",t=>Q(t.rt)).attr("y1",t=>"correct"===t.outcome?B(1)-.125*this.rem:B(-1)+.125*this.rem).attr("y2",t=>"correct"===t.outcome?B(1)-.675*this.rem:B(-1)+.675*this.rem),Ft.exit().remove();const Ct=q.selectAll(".accuracy.model").data([this.model.accuracy,1-this.model.accuracy]),vt=Ct.enter().append("g").attr("class",(t,e)=>"accuracy model "+(0===e?"correct":"error"));vt.append("rect").classed("bar",!0).attr("x",0),vt.merge(Ct).select("rect").transition().duration(this.drag?0:y).ease(ir).attr("y",(t,e)=>I(0===e?0:1-t)).attr("width",b).attr("height",t=>I(t)),Ct.exit().remove();const At=q.selectAll(".accuracy.data").data(Number.isNaN(this.data.accuracy)?[]:[this.data.accuracy]),Rt=At.enter().append("g").classed("accuracy data",!0);Rt.append("line").classed("mark",!0);const St=Rt.merge(At).attr("class",t=>"accuracy data "+(t<this.model.accuracy.correct?"correct":"error"));St.select(".mark").transition().duration(this.drag?0:y).ease(ir).attr("x1",0+.25*this.rem).attr("x2",b-.25*this.rem).attr("y1",t=>I(t)-1).attr("y2",t=>I(t)-1),At.exit().remove();const Nt=tt.selectAll(".boundary").data([{bound:"upper",value:this.bounds.upper},{bound:"lower",value:this.bounds.lower}]),Lt=Nt.enter().append("g").attr("class",(t,e)=>"boundary "+(0===e?"correct":"error"));Lt.append("line").classed("line",!0),Lt.append("line").classed("line touch",!0);const wt=Lt.merge(Nt).attr("tabindex",this.interactive?0:null).classed("interactive",this.interactive).on("keydown",this.interactive?(t,e)=>{if(["ArrowUp","ArrowDown"].includes(t.key)){let{a:i}=this;switch(t.key){case"ArrowUp":i+="upper"===e.bound?t.shiftKey?ea.a.STEP:ea.a.JUMP:t.shiftKey?-.01:-.1;break;case"ArrowDown":i+="upper"===e.bound?t.shiftKey?-.01:-.1:t.shiftKey?ea.a.STEP:ea.a.JUMP}i=i<ea.a.MIN?ea.a.MIN:i>ea.a.MAX?ea.a.MAX:i,this.a=i,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-a",{detail:{a:this.a},bubbles:!0})),t.preventDefault()}}:null);(this.firstUpdate||t.has("interactive"))&&(this.interactive?wt.call(v):wt.on(".drag",null)),wt.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.min)).attr("x2",Q(this.scale.time.max)).attr("y1",t=>B(t.value)).attr("y2",t=>B(t.value)),wt.select(".line.touch").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.min)).attr("x2",Q(this.scale.time.max)).attr("y1",t=>B(t.value)).attr("y2",t=>B(t.value)),Nt.exit().remove();const Dt=tt.selectAll(".drift").data([{v:this.v,t0:this.t0,startingPoint:this.startingPoint}]),Mt=Dt.enter().append("g").classed("drift",!0);Mt.append("line").classed("line",!0),Mt.append("line").classed("line touch",!0),Mt.append("path").classed("arrow",!0),Mt.append("path").classed("arrow touch",!0);const kt=Mt.merge(Dt).attr("tabindex",this.interactive?0:null).classed("interactive",this.interactive).on("keydown",this.interactive?t=>{if(["ArrowUp","ArrowDown"].includes(t.key)){let{v:e}=this;switch(t.key){case"ArrowUp":e+=t.shiftKey?ea.v.STEP:ea.v.JUMP;break;case"ArrowDown":e-=t.shiftKey?ea.v.STEP:ea.v.JUMP}e=e<ea.v.MIN?ea.v.MIN:e>ea.v.MAX?ea.v.MAX:e,this.v=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-v",{detail:{v:this.v},bubbles:!0})),t.preventDefault()}}:null);(this.firstUpdate||t.has("interactive"))&&(this.interactive?kt.call(C):kt.on(".drag",null));const Tt=(B(0)-B(1))/(Q(1)-Q(0));kt.transition().duration(this.drag?0:y).ease(ir).attr("transform",t=>`translate(${Q(t.t0)}, ${B(t.startingPoint)})\n rotate(${-Math.atan(t.v/1e3*Tt)*(180/Math.PI)})`),kt.select(".line").attr("x2",Q(200)),kt.select(".line.touch").attr("x2",Q(200)),kt.select(".arrow").attr("d",`\n M ${Q(200)-.5*this.rem},${.5*-this.rem}\n l ${.5*this.rem},${.5*this.rem}\n l ${.5*-this.rem},${.5*this.rem}\n `),kt.select(".arrow.touch").attr("d",`\n M ${Q(200)-.5*this.rem},${.5*-this.rem}\n l ${.5*this.rem},${.5*this.rem}\n l ${.5*-this.rem},${.5*this.rem}\n `),Dt.exit().remove();const Vt=tt.selectAll(".t0z").data([{t0:this.t0,startingPoint:this.startingPoint}]),$t=Vt.enter().append("g").classed("t0z",!0);$t.append("line").classed("line",!0),$t.append("line").classed("line touch",!0),$t.append("circle").classed("point touch",!0);const Ht=$t.merge(Vt).attr("tabindex",this.interactive?0:null).classed("interactive",this.interactive).on("keydown",this.interactive?t=>{if(["ArrowUp","ArrowDown"].includes(t.key)){let{z:e}=this;switch(t.key){case"ArrowUp":e+=t.shiftKey?ea.z.STEP:ea.z.JUMP;break;case"ArrowDown":e-=t.shiftKey?ea.z.STEP:ea.z.JUMP}e=e<ea.z.MIN?ea.z.MIN:e>ea.z.MAX?ea.z.MAX:e,this.z=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-z",{detail:{z:this.z},bubbles:!0})),t.preventDefault()}if(["ArrowLeft","ArrowRight"].includes(t.key)){let e=this.t0;switch(t.key){case"ArrowRight":e+=t.shiftKey?ea.t0.STEP:ea.t0.JUMP;break;case"ArrowLeft":e-=t.shiftKey?ea.t0.STEP:ea.t0.JUMP}e=e<ea.t0.MIN?ea.t0.MIN:e>ea.t0.MAX?ea.t0.MAX:e,this.t0=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-t0",{detail:{t0:this.t0},bubbles:!0})),t.preventDefault()}}:null);(this.firstUpdate||t.has("interactive"))&&(this.interactive?Ht.call(f):Ht.on(".drag",null)),Ht.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(0)).attr("x2",t=>Q(t.t0)).attr("y1",t=>B(t.startingPoint)).attr("y2",t=>B(t.startingPoint)),Ht.select(".line.touch").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(0)).attr("x2",t=>Q(t.t0)).attr("y1",t=>B(t.startingPoint)).attr("y2",t=>B(t.startingPoint)),Ht.select(".point").transition().duration(this.drag?0:y).ease(ir).attr("cx",t=>Q(t.t0)).attr("cy",t=>B(t.startingPoint)),Vt.exit().remove();const zt=tt.selectAll(".measure.a").data(this.measures?[this.a]:[]),Gt=zt.enter().append("g").classed("measure a",!0);Gt.append("line").classed("line",!0).attr("marker-start","url(#measure-arrow-a)").attr("marker-end","url(#measure-arrow-a)");const Yt=Gt.append("text").classed("label",!0);Yt.append("tspan").classed("a math-var",!0).text("a"),Yt.append("tspan").classed("equals",!0).text(" = "),Yt.append("tspan").classed("value",!0);const Xt=Gt.merge(zt);Xt.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.max)-.75*this.rem).attr("y1",B(this.bounds.upper)+2).attr("x2",Q(this.scale.time.max)-.75*this.rem).attr("y2",B(this.bounds.lower)-2);Xt.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.scale.time.max)).attr("y",B(this.bounds.upper)-.25*this.rem).select(".value").text(Fr(".2f")(this.a)),zt.exit().remove();const Jt=tt.selectAll(".measure.z").data(this.measures?[this.z]:[]),Wt=Jt.enter().append("g").classed("measure z",!0);Wt.append("line").classed("line",!0).attr("marker-start","url(#measure-arrow-z)").attr("marker-end","url(#measure-arrow-z)");const _t=Wt.append("text").classed("label",!0);_t.append("tspan").classed("z math-var",!0).text("z"),_t.append("tspan").classed("equals",!0).text(" = "),_t.append("tspan").classed("value",!0);const Kt=Wt.merge(Jt);Kt.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.min)+.75*this.rem).attr("y1",B(this.startingPoint)+2).attr("x2",Q(this.scale.time.min)+.75*this.rem).attr("y2",B(this.bounds.lower)-2);Kt.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.scale.time.min)).attr("y",B(this.bounds.lower)+.125*this.rem).select(".value").text(Fr(".0%")(this.z)),Jt.exit().remove();const Zt=tt.selectAll(".measure.v").data(this.measures?[this.v]:[]),Pt=Zt.enter().append("g").classed("measure v",!0);Pt.append("path").classed("line",!0).attr("marker-start","url(#measure-arrow-cap-v)").attr("marker-end","url(#measure-arrow-cap-v)");const Ot=Pt.append("text").classed("label",!0);Ot.append("tspan").classed("v math-var",!0).text("v"),Ot.append("tspan").classed("equals",!0).text(" = "),Ot.append("tspan").classed("value",!0);const jt=Q(200)-Q(0)+.75*this.rem,qt=2/jt,te=Math.atan(this.v/1e3*Tt)-qt,ee=Math.cos(te)*jt,ie=Math.sin(te)*jt,se=Pt.merge(Zt);se.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("d",`\n M ${Q(this.t0+200)+.75*this.rem}, ${B(this.startingPoint)-2}\n A ${Q(200)-Q(0)} ${Q(200)-Q(0)} 0 0 0 ${Q(this.t0)+ee} ${B(this.startingPoint)-ie}\n `);se.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.t0+200)+.5*this.rem).attr("y",B(this.bounds.upper)-.25*this.rem).select(".value").text(Fr(".2f")(this.v)),Zt.exit().remove();const re=tt.selectAll(".measure.t0").data(this.measures?[this.t0]:[]),ae=re.enter().append("g").classed("measure t0",!0);ae.append("line").classed("line",!0).attr("marker-start","url(#measure-arrow-t0)").attr("marker-end","url(#measure-arrow-cap-t0)");const ne=ae.append("text").classed("label",!0);ne.append("tspan").classed("t0 math-var",!0).text("t₀"),ne.append("tspan").classed("equals",!0).text(" = "),ne.append("tspan").classed("value",!0);const oe=ae.merge(re);oe.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(0)+2).attr("y1",B(this.startingPoint)-.75*this.rem).attr("x2",Q(this.t0)-2).attr("y2",B(this.startingPoint)-.75*this.rem);oe.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.t0)+.25*this.rem).attr("y",B(this.bounds.upper)-.25*this.rem).select(".value").text(Fr("d")(this.t0)),re.exit().remove();const le=et.selectAll(".model.mean").data(t=>this.means?[t]:[]),ce=le.enter().append("g").attr("class",t=>`model mean ${t.outcome}`);ce.append("line").classed("indicator",!0);ce.merge(le).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.model.meanRT)).attr("x2",t=>Q(t.model.meanRT)).attr("y1",t=>t.densityScale(this.scale.density.min)).attr("y2",t=>t.densityScale(this.scale.density.max)),le.exit().remove();const de=et.selectAll(".data.mean").data(t=>this.means&&!Number.isNaN(t.data.meanRT)?[t]:[]),ue=de.enter().append("g").attr("class",t=>`data mean ${t.outcome}`);ue.append("line").classed("indicator",!0).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.125:-.125)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.675:-.675)*this.rem);ue.merge(de).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.data.meanRT)).attr("x2",t=>Q(t.data.meanRT)).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.125:-.125)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.675:-.675)*this.rem),de.exit().select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",0).attr("x2",0).on("end",(t,e,i)=>{We(i[e].parentElement).remove()});const he=et.selectAll(".model.sd").data(t=>this.sds?[t]:[]),ge=he.enter().append("g").attr("class",t=>`model sd ${t.outcome}`);ge.append("line").classed("indicator",!0).attr("marker-start",t=>`url(#model-sd-cap-${t.outcome})`).attr("marker-end",t=>`url(#model-sd-cap-${t.outcome})`);ge.merge(he).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.model.meanRT-t.model.sdRT/2)).attr("x2",t=>Q(t.model.meanRT+t.model.sdRT/2)).attr("y1",t=>t.densityScale(5)).attr("y2",t=>t.densityScale(5)),he.exit().remove();const pe=et.selectAll(".data.sd").data(t=>!this.sds||Number.isNaN(t.data.meanRT)||Number.isNaN(t.data.sdRT)?[]:[t]),me=pe.enter().append("g").attr("class",t=>`data sd ${t.outcome}`);me.append("line").classed("indicator",!0).attr("marker-start",t=>`url(#data-sd-cap-${t.outcome})`).attr("marker-end",t=>`url(#data-sd-cap-${t.outcome})`).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem);me.merge(pe).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.data.meanRT-t.data.sdRT/2)).attr("x2",t=>Q(t.data.meanRT+t.data.sdRT/2)).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem),pe.exit().select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",0).attr("x2",0).on("end",(t,e,i)=>{We(i[e].parentElement).remove()}),this.firstUpdate=!1}}customElements.define("ddm-model",ca);class da extends(Or(qr)){static get properties(){return{coherence:{attribute:"coherence",type:Number,reflect:!0},count:{attribute:"count",type:Number,reflect:!0},probability:{attribute:"probability",type:Number,reflect:!0},duration:{attribute:"duration",type:Number,reflect:!0},wait:{attribute:"wait",type:Number,reflect:!0},iti:{attribute:"iti",type:Number,reflect:!0},trials:{attribute:"trials",type:Number,reflect:!0},running:{attribute:"running",type:Boolean,reflect:!0},lifetime:{attribute:!1,type:Number,reflect:!1},speed:{attribute:!1,type:Number,reflect:!1}}}constructor(){super(),this.coherence=.5,this.count=100,this.probability=.5,this.duration=2e3,this.wait=2e3,this.iti=2e3,this.trials=5,this.running=!1,this.lifetime=400,this.speed=50,this.firstUpdate=!0,this.COHERENT=0,this.RANDOM=1,this.dots=[[],[]],this.trial=0,this.states=["resetted","iti","stimulus","wait","ended"],this.state="resetted",this.baseTime=0,this.pauseTime=0,this.startTime=0,this.lastTime=0,this.LEFT=180,this.RIGHT=0,this.currentDirection=void 0,this.signals=["left","right"],this.signal=void 0,this.runner=void 0,this.xScale=void 0,this.yScale=void 0}static get styles(){return[super.styles,n`
|
|
1743
|
+
`]}render(){return Y``}willUpdate(){this.alignState()}update(t){if(super.update(t),Number.isNaN(this.width)||Number.isNaN(this.height)||Number.isNaN(this.rem))return;const e=this.width,i=this.height;let s,r;e/i>1.5?(r=i,s=1.5*r):(s=e,r=s/1.5);const a=1*this.rem,n=3*this.rem,o=3.75*this.rem,l=3.25*this.rem,c=r-(a+n),d=s-(o+l),u=.75*this.rem,h=.5*c,g=.25*c-u,p=.75*this.rem,m=.9*d,b=.1*d-p,y=parseInt(this.getComputedStyleValue("---transition-duration"),10),Q=zr().domain([this.scale.time.min,this.scale.time.max]).range([0,m]),B=zr().domain([this.scale.evidence.min,this.scale.evidence.max]).range([h,0]),U=zr().domain([this.scale.density.min,this.scale.density.max]).range([g,0]),F=zr().domain([this.scale.density.min,this.scale.density.max]).range([0,g]),I=zr().domain([0,1]).range([0,c]),f=oi().subject((t,e)=>({x:Q(e.t0),y:B(e.startingPoint)})).on("start",t=>{We(t.currentTarget).classed("dragging",!0)}).on("drag",t=>{this.drag=!0;const e=!!t.sourceEvent.shiftKey&&(Math.abs(t.x-t.subject.x)>Math.abs(t.y-t.subject.y)?"t0":"z");let i=Q.invert(t.x),s=(B.invert(t.y)+this.a/2)/this.a;i="z"===e?Q.invert(t.subject.x):i<ea.t0.MIN?ea.t0.MIN:i>ea.t0.MAX?ea.t0.MAX:i,s="t0"===e?(B.invert(t.subject.y)+this.a/2)/this.a:s<ea.z.MIN?ea.z.MIN:s>ea.z.MAX?ea.z.MAX:s,this.t0=i,this.z=s,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-t0",{detail:{t0:this.t0},bubbles:!0})),this.dispatchEvent(new CustomEvent("ddm-model-z",{detail:{z:this.z},bubbles:!0}))}).on("end",t=>{We(t.currentTarget).classed("dragging",!1),this.drag=!1}),C=oi().on("start",t=>{We(t.currentTarget).classed("dragging",!0)}).on("drag",t=>{this.drag=!0;let e=(B.invert(t.y)-this.startingPoint)/(Q.invert(t.x)-this.t0)*1e3;e=e<ea.v.MIN?ea.v.MIN:e>ea.v.MAX?ea.v.MAX:e,this.v=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-v",{detail:{v:this.v},bubbles:!0}))}).on("end",t=>{We(t.currentTarget).classed("dragging",!1),this.drag=!1}),v=oi().subject((t,e)=>({x:0,y:B(e.value)})).on("start",t=>{We(t.currentTarget).classed("dragging",!0)}).on("drag",t=>{this.drag=!0;const e=B.invert(t.y);let i=Math.abs(2*e);i=i<ea.a.MIN?ea.a.MIN:i>ea.a.MAX?ea.a.MAX:i,this.a=i,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-a",{detail:{a:this.a},bubbles:!0}))}).on("end",t=>{We(t.currentTarget).classed("dragging",!1),this.drag=!1}),A=_r().x(t=>Q(t.t)).y(t=>B(t.e)),x=_r().x(t=>Q(t.t)).y(t=>U(t.d)),E=_r().x(t=>Q(t.t)).y(t=>F(t.d)),R=We(this.renderRoot).selectAll(".main").data([{width:this.width,height:this.height,rem:this.rem}]),S=R.enter().append("svg").classed("main",!0).html(qr.svgDefs),N=S.append("defs"),L=t=>{N.append("marker").attr("id",`measure-arrow-${t}`).attr("class",`measure-arrow ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-10 -6 12 12").attr("refX","0").attr("refY","0").attr("markerWidth","12").attr("markerHeight","12").append("path").attr("class","arrow").attr("d","M -7 -3 l 6 3 l -6 3 z")},w=t=>{const e=N.append("marker").attr("id",`measure-capped-arrow-${t}`).attr("class",`measure-arrow capped ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-10 -6 12 12").attr("refX","0").attr("refY","0").attr("markerWidth","12").attr("markerHeight","12");e.append("path").attr("class","arrow").attr("d","M -7 -3 l 6 3 l -6 3 z"),e.append("path").attr("class","cap").attr("d","M 0 -4 l 0 8")};L("a"),L("z"),w("v"),L("t0"),w("t0");const D=t=>{N.append("marker").attr("id",`model-sd-cap-${t}`).attr("class",`model-sd cap ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-5 -5 10 10").attr("refX","0").attr("refY","0").attr("markerWidth","10").attr("markerHeight","10").append("path").attr("stroke","context-stroke").attr("fill","context-stroke").attr("stroke-width","2").attr("d","M 0 -4 l 0 8"),N.append("marker").attr("id",`data-sd-cap-${t}`).attr("class",`data-sd cap ${t}`).attr("orient","auto-start-reverse").attr("markerUnits","userSpaceOnUse").attr("viewBox","-5 -5 10 10").attr("refX","0").attr("refY","0").attr("markerWidth","10").attr("markerHeight","10").append("path").attr("stroke","context-stroke").attr("fill","context-stroke").attr("stroke-width","2").attr("d","M 0 -3 l 0 6")};D("error"),D("correct");const M=N.append("linearGradient").attr("id","path-animate").attr("gradientUnits","userSpaceOnUse").attr("color-interpolation","linearRGB").attr("x1","0").attr("x2","0").attr("y1",B(this.bounds.upper)).attr("y2",B(this.bounds.lower));M.append("stop").classed("stop-0",!0).attr("offset","0%"),M.append("stop").classed("stop-100",!0).attr("offset","100%");const k=S.merge(R).attr("viewBox",`0 0 ${s} ${r}`),T=k.selectAll(".plot.density").data([{outcome:"correct",data:{meanRT:this.data.correctMeanRT,sdRT:this.data.correctSDRT},model:{meanRT:this.model.correctMeanRT,sdRT:this.model.correctSDRT,dist:this.model.correctDist},densityScale:U,densityLine:x,alignDistribution:this.alignCorrectDistribution.bind(this)},{outcome:"error",data:{meanRT:this.data.errorMeanRT,sdRT:this.data.errorSDRT},model:{meanRT:this.model.errorMeanRT,sdRT:this.model.errorSDRT,dist:this.model.errorDist},densityScale:F,densityLine:E,alignDistribution:this.alignErrorDistribution.bind(this)}]),V=S.append("g").classed("plot evidence",!0),$=T.enter().append("g").attr("class",t=>`plot density ${t.outcome}`),H=S.append("g").classed("plot accuracy",!0),z=k.select(".plot.evidence").attr("transform",`translate(${o}, ${a+g+u})`),G=$.merge(T).attr("transform",t=>`translate(${o}, ${"correct"===t.outcome?a:a+g+h+2*u})`),Y=k.select(".plot.accuracy").attr("transform",`translate(${o+m+p}, ${a})`);V.append("clipPath").attr("id","clip-evidence").append("rect"),z.select("clipPath rect").attr("y",B(this.bounds.upper)).attr("height",B(this.bounds.lower)-B(this.bounds.upper)+1).attr("width",m+1);const X=V.append("g").classed("underlayer",!0),J=$.append("g").classed("underlayer",!0),W=H.append("g").classed("underlayer",!0),_=z.select(".underlayer"),K=G.select(".underlayer"),P=Y.select(".underlayer");V.append("g").classed("content",!0).append("g").classed("paths",!0);const Z=$.append("g").classed("content",!0);H.append("g").classed("content",!0);const O=z.select(".content"),j=G.select(".content"),q=Y.select(".content");V.append("g").classed("overlayer",!0),$.append("g").classed("overlayer",!0),H.append("g").classed("overlayer",!0);const tt=z.select(".overlayer"),et=G.select(".overlayer");X.append("rect").classed("background",!0),J.append("rect").classed("background",!0),_.select(".background").transition().duration(this.drag?0:y).ease(ir).attr("y",B(this.bounds.upper)).attr("height",B(this.bounds.lower)-B(this.bounds.upper)).attr("width",m),K.select(".background").transition().duration(y).ease(ir).attr("height",g).attr("width",m),J.filter(t=>"error"===t.outcome).append("g").classed("axis time",!0);const it=K.filter(t=>"error"===t.outcome).select(".axis.time").attr("transform",`translate(0, ${g+.25*this.rem})`);var st;it.transition().duration(y).ease(ir).call((st=Q,xt(3,st))).attr("font-size",null).attr("font-family",null).selectAll("line, path").attr("stroke",null);const rt=J.filter(t=>"error"===t.outcome).append("text").classed("title time",!0).attr("text-anchor","middle");rt.append("tspan").classed("name",!0).text("Time (ms)"),K.filter(t=>"error"===t.outcome).select(".title.time").transition().duration(y).ease(ir).attr("transform",`translate(${m/2}, ${g+2.5*this.rem})`),X.append("g").classed("axis evidence",!0),J.append("g").attr("class",t=>`axis density ${t.outcome}`),W.append("g").classed("axis accuracy",!0);const at=_.select(".axis.evidence").attr("transform",`translate(${-.25*this.rem}, 0)`),nt=K.select(".axis.density").attr("transform",`translate(${-.25*this.rem}, 0)`),ot=P.select(".axis.accuracy").attr("transform",`translate(${b+.25*this.rem}, 0)`),lt=at.transition().duration(y).ease(ir).call(Et(B)).attr("font-size",null).attr("font-family",null),ct=nt.transition().duration(y).ease(ir).each((t,e,i)=>{Et(t.densityScale).ticks(2)(We(i[e]))}).attr("font-size",null).attr("font-family",null),dt=ot.transition().duration(y).ease(ir).call(function(t){return xt(2,t)}(I)).attr("font-size",null).attr("font-family",null);lt.selectAll("line, path").attr("stroke",null),ct.selectAll("line, path").attr("stroke",null),dt.selectAll("line, path").attr("stroke",null);const ut=X.append("text").classed("title evidence",!0).attr("text-anchor","middle"),ht=J.append("text").attr("class",t=>`title density ${t.outcome}`).attr("text-anchor","middle"),gt=W.append("text").classed("title accuracy",!0).attr("text-anchor","middle");ut.append("tspan").classed("name",!0).text("Evidence"),ht.append("tspan").classed("name",!0).text("Density"),gt.append("tspan").classed("name",!0).text("Accuracy"),_.select(".title.evidence").transition().duration(y).ease(ir).attr("transform",`translate(${-2.5*this.rem}, ${h/2})rotate(-90)`),K.select(".title.density").transition().duration(y).ease(ir).attr("transform",`translate(${-2.5*this.rem}, ${g/2})rotate(-90)`),P.select(".title.accuracy").transition().duration(y).ease(ir).attr("transform",`translate(${b+2.25*this.rem}, ${c/2})rotate(90)`);const pt=O.select(".paths").selectAll(".path").data(this.data.trials.filter(t=>void 0!==t.path)),mt=Ke(),bt=pt.enter().append("g").classed("path",!0).attr("data-new-trial-ease-time",0).on("pointerenter",(t,e)=>{if(!this.drag){We(t.currentTarget).classed("highlight",!0).raise();const i=tt.append("g").classed(`rt-label ${e.outcome}`,!0),s=i.append("rect"),r=i.append("text").text(`RT = ${e.rt.toFixed()}`).attr("x",Q(e.rt)).attr("y","correct"===e.outcome?B(this.bounds.upper)-.25*this.rem:B(this.bounds.lower)+.125*this.rem).node().getBBox();s.attr("x",r.x-.125*this.rem).attr("y",r.y+.125*this.rem).attr("width",r.width+.25*this.rem).attr("height",r.height-.25*this.rem),mt.set(t.currentTarget,i)}}).on("pointerout",(t,e)=>{this.drag||(We(t.currentTarget).classed("highlight",!1).lower(),t.currentTarget.parentNode.insertBefore(t.currentTarget,t.currentTarget.parentNode.children[e.index]),mt.get(t.currentTarget).remove())});bt.append("path").classed("curve",!0).attr("clip-path","url(#clip-evidence)").attr("pathLength",1).attr("stroke-dashoffset",1);const yt=bt.merge(pt).attr("class",t=>`path ${t.outcome}`);yt.select(".curve").transition().duration(this.drag?0:y).ease(ir).attr("stroke",t=>this.getComputedStyleValue(`---color-${t.outcome}`)).attrTween("d",(t,e,i)=>{const s=i[e],r=ts(void 0!==s.a?s.a:this.a,this.a),a=ts(void 0!==s.z?s.z:this.z,this.z),n=ts(void 0!==s.v?s.v:this.v,this.v),o=ts(void 0!==s.t0?s.t0:this.t0,this.t0);return e=>{s.a=r(e),s.z=a(e),s.v=n(e),s.t0=o(e);const i=this.alignPath(t.seed,s.a,s.z,s.v,s.t0);return A(i)}});const Qt=yt.filter(t=>t.animate&&!this.paused);if(!Qt.empty()){const t=Qt.attr("data-new-trial-ease-time"),e=e=>zr().domain([0,1]).range([t,1])(e),i=e=>i=>zr().domain([e(t),1]).range([0,1])(e(i));Qt.classed("animate",!0).select(".curve").attr("stroke-dasharray",1),Qt.transition("new").duration(e=>Math.floor(1.5*e.rt*(1-t))).ease(e).attr("data-new-trial-ease-time",1).select(".curve").attrTween("stroke-dashoffset",(t,e,s)=>{const r=ts(s[e].getAttribute("stroke-dashoffset"),0);return t=>r(i(er)(t))}).on("end",(t,e,i)=>{We(i[e].parentElement).classed("animate",!1).attr("data-new-trial-ease-time",null),t.animate=!1,this.animate=!1,this.alignState(),this.requestUpdate(),this.dispatchEvent(new CustomEvent("accumulable-response",{detail:{outcome:t.outcome,data:this.data,model:this.model},bubbles:!0}))})}const Bt=yt.filter(t=>t.animate&&this.paused);if(!Bt.empty()){const t=Bt.attr("data-new-trial-ease-time");Bt.classed("animate",!0).select(".curve").attr("stroke-dasharray",1).attr("stroke-dashoffset",()=>ts(1,0)(er(t)))}yt.filter(t=>!t.animate).attr("data-new-trial-ease-time",null),pt.exit().remove();const Ut=Z.append("g").attr("class",t=>`dist ${t.outcome}`);Ut.append("path").classed("curve",!0),j.select(".dist").select(".curve").transition().duration(this.drag?0:y).ease(ir).attrTween("d",(t,e,i)=>{const s=i[e],r=ts(void 0!==s.a?s.a:this.a,this.a),a=ts(void 0!==s.z?s.z:this.z,this.z),n=ts(void 0!==s.v?s.v:this.v,this.v),o=ts(void 0!==s.t0?s.t0:this.t0,this.t0);return e=>{s.a=r(e),s.z=a(e),s.v=n(e),s.t0=o(e);const i=t.alignDistribution(s.a,s.z,s.v,s.t0);return t.densityLine(i)}});const Ft=O.selectAll(".rt").data(this.data.trials),It=Ft.enter().append("g");It.append("line").classed("mark",!0).attr("x1",t=>Q(t.rt)).attr("x2",t=>Q(t.rt)).attr("y1",t=>"correct"===t.outcome?B(1)-.125*this.rem:B(-1)+.125*this.rem).attr("y2",t=>"correct"===t.outcome?B(1)-.675*this.rem:B(-1)+.675*this.rem);const ft=It.merge(Ft).attr("class",t=>`rt ${t.outcome}`);ft.filter(t=>!t.animate).select(".mark").transition().duration(this.drag?0:y).ease(ir).attr("stroke",t=>this.getComputedStyleValue(`---color-${t.outcome}`)).attr("x1",t=>Q(t.rt)).attr("x2",t=>Q(t.rt)).attr("y1",t=>"correct"===t.outcome?B(1)-.125*this.rem:B(-1)+.125*this.rem).attr("y2",t=>"correct"===t.outcome?B(1)-.675*this.rem:B(-1)+.675*this.rem),Ft.exit().remove();const Ct=q.selectAll(".accuracy.model").data([this.model.accuracy,1-this.model.accuracy]),vt=Ct.enter().append("g").attr("class",(t,e)=>"accuracy model "+(0===e?"correct":"error"));vt.append("rect").classed("bar",!0).attr("x",0),vt.merge(Ct).select("rect").transition().duration(this.drag?0:y).ease(ir).attr("y",(t,e)=>I(0===e?0:1-t)).attr("width",b).attr("height",t=>I(t)),Ct.exit().remove();const At=q.selectAll(".accuracy.data").data(Number.isNaN(this.data.accuracy)?[]:[this.data.accuracy]),Rt=At.enter().append("g").classed("accuracy data",!0);Rt.append("line").classed("mark",!0);const St=Rt.merge(At).attr("class",t=>"accuracy data "+(t<this.model.accuracy.correct?"correct":"error"));St.select(".mark").transition().duration(this.drag?0:y).ease(ir).attr("x1",0+.25*this.rem).attr("x2",b-.25*this.rem).attr("y1",t=>I(t)-1).attr("y2",t=>I(t)-1),At.exit().remove();const Nt=tt.selectAll(".boundary").data([{bound:"upper",value:this.bounds.upper},{bound:"lower",value:this.bounds.lower}]),Lt=Nt.enter().append("g").attr("class",(t,e)=>"boundary "+(0===e?"correct":"error"));Lt.append("line").classed("line",!0),Lt.append("line").classed("line touch",!0);const wt=Lt.merge(Nt).attr("tabindex",this.interactive?0:null).classed("interactive",this.interactive).on("keydown",this.interactive?(t,e)=>{if(["ArrowUp","ArrowDown"].includes(t.key)){let{a:i}=this;switch(t.key){case"ArrowUp":i+="upper"===e.bound?t.shiftKey?ea.a.STEP:ea.a.JUMP:t.shiftKey?-.01:-.1;break;case"ArrowDown":i+="upper"===e.bound?t.shiftKey?-.01:-.1:t.shiftKey?ea.a.STEP:ea.a.JUMP}i=i<ea.a.MIN?ea.a.MIN:i>ea.a.MAX?ea.a.MAX:i,this.a=i,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-a",{detail:{a:this.a},bubbles:!0})),t.preventDefault()}}:null);(this.firstUpdate||t.has("interactive"))&&(this.interactive?wt.call(v):wt.on(".drag",null)),wt.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.min)).attr("x2",Q(this.scale.time.max)).attr("y1",t=>B(t.value)).attr("y2",t=>B(t.value)),wt.select(".line.touch").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.min)).attr("x2",Q(this.scale.time.max)).attr("y1",t=>B(t.value)).attr("y2",t=>B(t.value)),Nt.exit().remove();const Dt=tt.selectAll(".drift").data([{v:this.v,t0:this.t0,startingPoint:this.startingPoint}]),Mt=Dt.enter().append("g").classed("drift",!0);Mt.append("line").classed("line",!0),Mt.append("line").classed("line touch",!0),Mt.append("path").classed("arrow",!0),Mt.append("path").classed("arrow touch",!0);const kt=Mt.merge(Dt).attr("tabindex",this.interactive?0:null).classed("interactive",this.interactive).on("keydown",this.interactive?t=>{if(["ArrowUp","ArrowDown"].includes(t.key)){let{v:e}=this;switch(t.key){case"ArrowUp":e+=t.shiftKey?ea.v.STEP:ea.v.JUMP;break;case"ArrowDown":e-=t.shiftKey?ea.v.STEP:ea.v.JUMP}e=e<ea.v.MIN?ea.v.MIN:e>ea.v.MAX?ea.v.MAX:e,this.v=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-v",{detail:{v:this.v},bubbles:!0})),t.preventDefault()}}:null);(this.firstUpdate||t.has("interactive"))&&(this.interactive?kt.call(C):kt.on(".drag",null));const Tt=(B(0)-B(1))/(Q(1)-Q(0));kt.transition().duration(this.drag?0:y).ease(ir).attr("transform",t=>`translate(${Q(t.t0)}, ${B(t.startingPoint)})\n rotate(${-Math.atan(t.v/1e3*Tt)*(180/Math.PI)})`),kt.select(".line").attr("x2",Q(200)),kt.select(".line.touch").attr("x2",Q(200)),kt.select(".arrow").attr("d",`\n M ${Q(200)-.5*this.rem},${.5*-this.rem}\n l ${.5*this.rem},${.5*this.rem}\n l ${.5*-this.rem},${.5*this.rem}\n `),kt.select(".arrow.touch").attr("d",`\n M ${Q(200)-.5*this.rem},${.5*-this.rem}\n l ${.5*this.rem},${.5*this.rem}\n l ${.5*-this.rem},${.5*this.rem}\n `),Dt.exit().remove();const Vt=tt.selectAll(".t0z").data([{t0:this.t0,startingPoint:this.startingPoint}]),$t=Vt.enter().append("g").classed("t0z",!0);$t.append("line").classed("line",!0),$t.append("line").classed("line touch",!0),$t.append("circle").classed("point touch",!0);const Ht=$t.merge(Vt).attr("tabindex",this.interactive?0:null).classed("interactive",this.interactive).on("keydown",this.interactive?t=>{if(["ArrowUp","ArrowDown"].includes(t.key)){let{z:e}=this;switch(t.key){case"ArrowUp":e+=t.shiftKey?ea.z.STEP:ea.z.JUMP;break;case"ArrowDown":e-=t.shiftKey?ea.z.STEP:ea.z.JUMP}e=e<ea.z.MIN?ea.z.MIN:e>ea.z.MAX?ea.z.MAX:e,this.z=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-z",{detail:{z:this.z},bubbles:!0})),t.preventDefault()}if(["ArrowLeft","ArrowRight"].includes(t.key)){let e=this.t0;switch(t.key){case"ArrowRight":e+=t.shiftKey?ea.t0.STEP:ea.t0.JUMP;break;case"ArrowLeft":e-=t.shiftKey?ea.t0.STEP:ea.t0.JUMP}e=e<ea.t0.MIN?ea.t0.MIN:e>ea.t0.MAX?ea.t0.MAX:e,this.t0=e,this.alignState(),this.dispatchEvent(new CustomEvent("ddm-model-t0",{detail:{t0:this.t0},bubbles:!0})),t.preventDefault()}}:null);(this.firstUpdate||t.has("interactive"))&&(this.interactive?Ht.call(f):Ht.on(".drag",null)),Ht.select(".line").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(0)).attr("x2",t=>Q(t.t0)).attr("y1",t=>B(t.startingPoint)).attr("y2",t=>B(t.startingPoint)),Ht.select(".line.touch").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(0)).attr("x2",t=>Q(t.t0)).attr("y1",t=>B(t.startingPoint)).attr("y2",t=>B(t.startingPoint)),Ht.select(".point").transition().duration(this.drag?0:y).ease(ir).attr("cx",t=>Q(t.t0)).attr("cy",t=>B(t.startingPoint)),Vt.exit().remove();const zt=tt.selectAll(".measure.a").data(this.measures?[this.a]:[]),Gt=zt.enter().append("g").classed("measure a",!0);Gt.append("line").classed("line",!0),Gt.append("line").classed("markers",!0).attr("marker-start","url(#measure-arrow-a)").attr("marker-end","url(#measure-arrow-a)");const Yt=Gt.append("text").classed("label",!0);Yt.append("tspan").classed("a math-var",!0).text("a"),Yt.append("tspan").classed("equals",!0).text(" = "),Yt.append("tspan").classed("value",!0);const Xt=Math.abs(B(this.bounds.upper)-B(this.bounds.lower))<=4,Jt=Gt.merge(zt);Jt.select(".line").classed("short",Xt).transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.max)-.75*this.rem).attr("y1",B(this.bounds.upper)+2).attr("x2",Q(this.scale.time.max)-.75*this.rem).attr("y2",B(this.bounds.lower)-2),Jt.select(".markers").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.max)-.75*this.rem).attr("y1",B(this.bounds.upper)).attr("x2",Q(this.scale.time.max)-.75*this.rem).attr("y2",B(this.bounds.lower));Jt.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.scale.time.max)).attr("y",B(this.bounds.upper)-.25*this.rem).select(".value").text(Fr(".2f")(this.a)),zt.exit().remove();const Wt=tt.selectAll(".measure.z").data(this.measures?[this.z]:[]),_t=Wt.enter().append("g").classed("measure z",!0);_t.append("line").classed("line",!0),_t.append("line").classed("markers",!0).attr("marker-start","url(#measure-arrow-z)").attr("marker-end","url(#measure-arrow-z)");const Kt=_t.append("text").classed("label",!0);Kt.append("tspan").classed("z math-var",!0).text("z"),Kt.append("tspan").classed("equals",!0).text(" = "),Kt.append("tspan").classed("value",!0);const Pt=Math.abs(B(this.startingPoint)-B(this.bounds.lower))<=4,Zt=_t.merge(Wt);Zt.select(".line").classed("short",Pt).transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.min)+.75*this.rem).attr("y1",B(this.startingPoint)+2).attr("x2",Q(this.scale.time.min)+.75*this.rem).attr("y2",B(this.bounds.lower)-2),Zt.select(".markers").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(this.scale.time.min)+.75*this.rem).attr("y1",B(this.startingPoint)).attr("x2",Q(this.scale.time.min)+.75*this.rem).attr("y2",B(this.bounds.lower));Zt.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.scale.time.min)).attr("y",B(this.bounds.lower)+.125*this.rem).select(".value").text(Fr(".0%")(this.z)),Wt.exit().remove();const Ot=tt.selectAll(".measure.v").data(this.measures?[this.v]:[]),jt=Ot.enter().append("g").classed("measure v",!0);jt.append("path").classed("line",!0),jt.append("path").classed("markers",!0).attr("marker-start","url(#measure-capped-arrow-v)").attr("marker-end","url(#measure-capped-arrow-v)");const qt=jt.append("text").classed("label",!0);qt.append("tspan").classed("v math-var",!0).text("v"),qt.append("tspan").classed("equals",!0).text(" = "),qt.append("tspan").classed("value",!0);const te=Q(200)-Q(0)+.75*this.rem,ee=Math.atan(this.v/1e3*Tt),ie=Math.cos(ee)*te,se=Math.sin(ee)*te,re=2/te,ae=Math.atan(this.v/1e3*Tt)-re,ne=Math.cos(re)*te,oe=Math.sin(re)*te,le=Math.cos(ae)*te,ce=Math.sin(ae)*te,de=ae*te<=4,ue=jt.merge(Ot);ue.select(".line").classed("short",de).transition().duration(this.drag?0:y).ease(ir).attr("d",`\n M ${Q(this.t0)+ne}, ${B(this.startingPoint)-oe}\n A ${Q(200)-Q(0)+.75*this.rem} ${Q(200)-Q(0)+.75*this.rem} 0 0 0 ${Q(this.t0)+le} ${B(this.startingPoint)-ce}\n `),ue.select(".markers").transition().duration(this.drag?0:y).ease(ir).attr("d",`\n M ${Q(this.t0+200)+.75*this.rem}, ${B(this.startingPoint)}\n A ${Q(200)-Q(0)+.75*this.rem} ${Q(200)-Q(0)+.75*this.rem} 0 0 0 ${Q(this.t0)+ie} ${B(this.startingPoint)-se}\n `);ue.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.t0+200)+.5*this.rem).attr("y",B(this.bounds.upper)-.25*this.rem).select(".value").text(Fr(".2f")(this.v)),Ot.exit().remove();const he=tt.selectAll(".measure.t0").data(this.measures?[this.t0]:[]),ge=he.enter().append("g").classed("measure t0",!0);ge.append("line").classed("line",!0),ge.append("line").classed("markers",!0).attr("marker-start","url(#measure-arrow-t0)").attr("marker-end","url(#measure-capped-arrow-t0)");const pe=ge.append("text").classed("label",!0);pe.append("tspan").classed("t0 math-var",!0).text("t₀"),pe.append("tspan").classed("equals",!0).text(" = "),pe.append("tspan").classed("value",!0);const me=Math.abs(Q(0)-Q(this.t0))<=4,be=ge.merge(he);be.select(".line").classed("short",me).transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(0)+2).attr("y1",B(this.startingPoint)-.75*this.rem).attr("x2",Q(this.t0)-2).attr("y2",B(this.startingPoint)-.75*this.rem),be.select(".markers").transition().duration(this.drag?0:y).ease(ir).attr("x1",Q(0)).attr("y1",B(this.startingPoint)-.75*this.rem).attr("x2",Q(this.t0)).attr("y2",B(this.startingPoint)-.75*this.rem);be.select(".label").transition().duration(this.drag?0:y).ease(ir).attr("x",Q(this.t0)+.25*this.rem).attr("y",B(this.bounds.upper)-.25*this.rem).select(".value").text(Fr("d")(this.t0)),he.exit().remove();const ye=et.selectAll(".model.mean").data(t=>this.means?[t]:[]),Qe=ye.enter().append("g").attr("class",t=>`model mean ${t.outcome}`);Qe.append("line").classed("indicator",!0);Qe.merge(ye).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.model.meanRT)).attr("x2",t=>Q(t.model.meanRT)).attr("y1",t=>t.densityScale(this.scale.density.min)).attr("y2",t=>t.densityScale(this.scale.density.max)),ye.exit().remove();const Be=et.selectAll(".data.mean").data(t=>this.means&&!Number.isNaN(t.data.meanRT)?[t]:[]),Ue=Be.enter().append("g").attr("class",t=>`data mean ${t.outcome}`);Ue.append("line").classed("indicator",!0).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.125:-.125)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.675:-.675)*this.rem);Ue.merge(Be).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.data.meanRT)).attr("x2",t=>Q(t.data.meanRT)).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.125:-.125)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.675:-.675)*this.rem),Be.exit().select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",0).attr("x2",0).on("end",(t,e,i)=>{We(i[e].parentElement).remove()});const Fe=et.selectAll(".model.sd").data(t=>this.sds?[t]:[]),Ie=Fe.enter().append("g").attr("class",t=>`model sd ${t.outcome}`);Ie.append("line").classed("indicator",!0).attr("marker-start",t=>`url(#model-sd-cap-${t.outcome})`).attr("marker-end",t=>`url(#model-sd-cap-${t.outcome})`);Ie.merge(Fe).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.model.meanRT-t.model.sdRT/2)).attr("x2",t=>Q(t.model.meanRT+t.model.sdRT/2)).attr("y1",t=>t.densityScale(5)).attr("y2",t=>t.densityScale(5)),Fe.exit().remove();const fe=et.selectAll(".data.sd").data(t=>!this.sds||Number.isNaN(t.data.meanRT)||Number.isNaN(t.data.sdRT)?[]:[t]),Ce=fe.enter().append("g").attr("class",t=>`data sd ${t.outcome}`);Ce.append("line").classed("indicator",!0).attr("marker-start",t=>`url(#data-sd-cap-${t.outcome})`).attr("marker-end",t=>`url(#data-sd-cap-${t.outcome})`).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem);Ce.merge(fe).select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",t=>Q(t.data.meanRT-t.data.sdRT/2)).attr("x2",t=>Q(t.data.meanRT+t.data.sdRT/2)).attr("y1",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem).attr("y2",t=>t.densityScale(0)+("correct"===t.outcome?.375:-.375)*this.rem),fe.exit().select(".indicator").transition().duration(this.drag?0:y).ease(ir).attr("x1",0).attr("x2",0).on("end",(t,e,i)=>{We(i[e].parentElement).remove()}),this.firstUpdate=!1}}customElements.define("ddm-model",ca);class da extends(Or(qr)){static get properties(){return{coherence:{attribute:"coherence",type:Number,reflect:!0},count:{attribute:"count",type:Number,reflect:!0},probability:{attribute:"probability",type:Number,reflect:!0},duration:{attribute:"duration",type:Number,reflect:!0},wait:{attribute:"wait",type:Number,reflect:!0},iti:{attribute:"iti",type:Number,reflect:!0},trials:{attribute:"trials",type:Number,reflect:!0},running:{attribute:"running",type:Boolean,reflect:!0},lifetime:{attribute:!1,type:Number,reflect:!1},speed:{attribute:!1,type:Number,reflect:!1}}}constructor(){super(),this.coherence=.5,this.count=100,this.probability=.5,this.duration=2e3,this.wait=2e3,this.iti=2e3,this.trials=5,this.running=!1,this.lifetime=400,this.speed=50,this.firstUpdate=!0,this.COHERENT=0,this.RANDOM=1,this.dots=[[],[]],this.trial=0,this.states=["resetted","iti","stimulus","wait","ended"],this.state="resetted",this.baseTime=0,this.pauseTime=0,this.startTime=0,this.lastTime=0,this.LEFT=180,this.RIGHT=0,this.currentDirection=void 0,this.signals=["left","right"],this.signal=void 0,this.runner=void 0,this.xScale=void 0,this.yScale=void 0}static get styles(){return[super.styles,n`
|
|
1726
1744
|
:host {
|
|
1727
1745
|
display: inline-block;
|
|
1728
1746
|
|