color-legend-element
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -0,1 +1,2 @@ | ||
import{scaleSequential as t,scaleLinear as i,scaleQuantize as e,scaleThreshold as s,scaleOrdinal as n}from"d3-scale";import{interpolateHcl as r,piecewise as o}from"d3-interpolate";import{format as l}from"d3-format"; | ||
/** | ||
@@ -5,4 +6,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),n=new Map;class e{constructor(t,n){if(this._$cssResult$=!0,n!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let i=n.get(this.cssText);return t&&void 0===i&&(n.set(this.cssText,i=new CSSStyleSheet),i.replaceSync(this.cssText)),i}toString(){return this.cssText}}const r=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let n="";for(const i of t.cssRules)n+=i.cssText;return(t=>new e("string"==typeof t?t:t+"",i))(n)})(t):t | ||
*/const h=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),a=new Map;class d{constructor(t,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=a.get(this.cssText);return h&&void 0===t&&(a.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const u=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return(t=>new d("string"==typeof t?t:t+"",c))(i)})(t):t | ||
/** | ||
@@ -12,3 +12,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/;var s;const o=window.trustedTypes,a=o?o.emptyScript:"",h=window.reactiveElementPolyfillSupport,u={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let n=t;switch(i){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},l=(t,i)=>i!==t&&(i==i||t==t),c={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:l};class f extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,n)=>{const e=this._$Eh(n,i);void 0!==e&&(this._$Eu.set(e,n),t.push(e))})),t}static createProperty(t,i=c){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,n,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,n){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||c}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of i)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)i.unshift(r(t))}else void 0!==t&&i.push(r(t));return i}static _$Eh(t,i){const n=i.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,n;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var i;const n=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,n)=>{t?i.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((t=>{const n=document.createElement("style"),e=window.litNonce;void 0!==e&&n.setAttribute("nonce",e),n.textContent=t.cssText,i.appendChild(n)}))})(n,this.constructor.elementStyles),n}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$ES(t,i,n=c){var e,r;const s=this.constructor._$Eh(t,n);if(void 0!==s&&!0===n.reflect){const o=(null!==(r=null===(e=n.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==r?r:u.toAttribute)(i,n.type);this._$Ei=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Ei=null}}_$AK(t,i){var n,e,r;const s=this.constructor,o=s._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){const t=s.getPropertyOptions(o),a=t.converter,h=null!==(r=null!==(e=null===(n=a)||void 0===n?void 0:n.fromAttribute)&&void 0!==e?e:"function"==typeof a?a:null)&&void 0!==r?r:u.fromAttribute;this._$Ei=o,this[o]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,n){let e=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||l)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):e=!1),!this.isUpdatePending&&e&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const n=this._$AL;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(n)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(n)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}} | ||
*/;var v;const f=window.trustedTypes,g=f?f.emptyScript:"",p=window.reactiveElementPolyfillSupport,m={toAttribute(t,i){switch(i){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},y=(t,i)=>i!==t&&(i==i||t==t),b={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:y};class w extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Eh(e,i);void 0!==s&&(this._$Eu.set(s,e),t.push(s))})),t}static createProperty(t,i=b){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const n=this[t];this[i]=s,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||b}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(u(t))}else void 0!==t&&i.push(u(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{h?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const e=document.createElement("style"),s=window.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$ES(t,i,e=b){var s,n;const r=this.constructor._$Eh(t,e);if(void 0!==r&&!0===e.reflect){const o=(null!==(n=null===(s=e.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==n?n:m.toAttribute)(i,e.type);this._$Ei=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Ei=null}}_$AK(t,i){var e,s,n;const r=this.constructor,o=r._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){const t=r.getPropertyOptions(o),l=t.converter,h=null!==(n=null!==(s=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==n?n:m.fromAttribute;this._$Ei=o,this[o]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}} | ||
/** | ||
@@ -19,3 +19,3 @@ * @license | ||
*/ | ||
var d;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:f}),(null!==(s=globalThis.reactiveElementVersions)&&void 0!==s?s:globalThis.reactiveElementVersions=[]).push("1.0.2");const v=globalThis.trustedTypes,g=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,m="?"+p,w=`<${m}>`,y=document,b=(t="")=>y.createComment(t),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,S=/>/g,x=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,A=/'/g,C=/"/g,T=/^(?:script|style|textarea)$/i,_=t=>(i,...n)=>({_$litType$:t,strings:i,values:n}),E=_(1),z=_(2),R=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),U=new WeakMap,O=y.createTreeWalker(y,129,null,!1),q=(t,i)=>{const n=t.length-1,e=[];let r,s=2===i?"<svg>":"",o=N;for(let i=0;i<n;i++){const n=t[i];let a,h,u=-1,l=0;for(;l<n.length&&(o.lastIndex=l,h=o.exec(n),null!==h);)l=o.lastIndex,o===N?"!--"===h[1]?o=$:void 0!==h[1]?o=S:void 0!==h[2]?(T.test(h[2])&&(r=RegExp("</"+h[2],"g")),o=x):void 0!==h[3]&&(o=x):o===x?">"===h[0]?(o=null!=r?r:N,u=-1):void 0===h[1]?u=-2:(u=o.lastIndex-h[2].length,a=h[1],o=void 0===h[3]?x:'"'===h[3]?C:A):o===C||o===A?o=x:o===$||o===S?o=N:(o=x,r=void 0);const c=o===x&&t[i+1].startsWith("/>")?" ":"";s+=o===N?n+w:u>=0?(e.push(a),n.slice(0,u)+"$lit$"+n.slice(u)+p+c):n+p+(-2===u?(e.push(void 0),i):c)}const a=s+(t[n]||"<?>")+(2===i?"</svg>":"");return[void 0!==g?g.createHTML(a):a,e]};class F{constructor({strings:t,_$litType$:i},n){let e;this.parts=[];let r=0,s=0;const o=t.length-1,a=this.parts,[h,u]=q(t,i);if(this.el=F.createElement(h,n),O.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=O.nextNode())&&a.length<o;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(p)){const n=u[s++];if(t.push(i),void 0!==n){const t=e.getAttribute(n.toLowerCase()+"$lit$").split(p),i=/([.?@])?(.*)/.exec(n);a.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?I:"?"===i[1]?V:"@"===i[1]?X:H})}else a.push({type:6,index:r})}for(const i of t)e.removeAttribute(i)}if(T.test(e.tagName)){const t=e.textContent.split(p),i=t.length-1;if(i>0){e.textContent=v?v.emptyScript:"";for(let n=0;n<i;n++)e.append(t[n],b()),O.nextNode(),a.push({type:2,index:++r});e.append(t[i],b())}}}else if(8===e.nodeType)if(e.data===m)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=e.data.indexOf(p,t+1));)a.push({type:7,index:r}),t+=p.length-1}r++}}static createElement(t,i){const n=y.createElement("template");return n.innerHTML=t,n}}function L(t,i,n=t,e){var r,s,o,a;if(i===R)return i;let h=void 0!==e?null===(r=n._$Cl)||void 0===r?void 0:r[e]:n._$Cu;const u=M(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==u&&(null===(s=null==h?void 0:h._$AO)||void 0===s||s.call(h,!1),void 0===u?h=void 0:(h=new u(t),h._$AT(t,n,e)),void 0!==e?(null!==(o=(a=n)._$Cl)&&void 0!==o?o:a._$Cl=[])[e]=h:n._$Cu=h),void 0!==h&&(i=L(t,h._$AS(t,i.values),h,e)),i}class D{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:n},parts:e}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:y).importNode(n,!0);O.currentNode=r;let s=O.nextNode(),o=0,a=0,h=e[0];for(;void 0!==h;){if(o===h.index){let i;2===h.type?i=new P(s,s.nextSibling,this,t):1===h.type?i=new h.ctor(s,h.name,h.strings,this,t):6===h.type&&(i=new Z(s,this,t)),this.v.push(i),h=e[++a]}o!==(null==h?void 0:h.index)&&(s=O.nextNode(),o++)}return r}m(t){let i=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,i),i+=n.strings.length-2):n._$AI(t[i])),i++}}class P{constructor(t,i,n,e){var r;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=n,this.options=e,this._$Cg=null===(r=null==e?void 0:e.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=L(this,t,i),M(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==R&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return k(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.M(t):this.$(t)}A(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==j&&M(this._$AH)?this._$AA.nextSibling.data=t:this.S(y.createTextNode(t)),this._$AH=t}T(t){var i;const{values:n,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=F.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.m(n);else{const t=new D(r,this),i=t.p(this.options);t.m(n),this.S(i),this._$AH=t}}_$AC(t){let i=U.get(t.strings);return void 0===i&&U.set(t.strings,i=new F(t)),i}M(t){k(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let n,e=0;for(const r of t)e===i.length?i.push(n=new P(this.A(b()),this.A(b()),this,this.options)):n=i[e],n._$AI(r),e++;e<i.length&&(this._$AR(n&&n._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class H{constructor(t,i,n,e,r){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,n,e){const r=this.strings;let s=!1;if(void 0===r)t=L(this,t,i,0),s=!M(t)||t!==this._$AH&&t!==R,s&&(this._$AH=t);else{const e=t;let o,a;for(t=r[0],o=0;o<r.length-1;o++)a=L(this,e[n+o],i,o),a===R&&(a=this._$AH[o]),s||(s=!M(a)||a!==this._$AH[o]),a===j?t=j:t!==j&&(t+=(null!=a?a:"")+r[o+1]),this._$AH[o]=a}s&&!e&&this.k(t)}k(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends H{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===j?void 0:t}}const B=v?v.emptyScript:"";class V extends H{constructor(){super(...arguments),this.type=4}k(t){t&&t!==j?this.element.setAttribute(this.name,B):this.element.removeAttribute(this.name)}}class X extends H{constructor(t,i,n,e,r){super(t,i,n,e,r),this.type=5}_$AI(t,i=this){var n;if((t=null!==(n=L(this,t,i,0))&&void 0!==n?n:j)===R)return;const e=this._$AH,r=t===j&&e!==j||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,s=t!==j&&(e===j||r);r&&this.element.removeEventListener(this.name,this,e),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const J=window.litHtmlPolyfillSupport; | ||
var $;w.finalized=!0,w.elementProperties=new Map,w.elementStyles=[],w.shadowRootOptions={mode:"open"},null==p||p({ReactiveElement:w}),(null!==(v=globalThis.reactiveElementVersions)&&void 0!==v?v:globalThis.reactiveElementVersions=[]).push("1.0.2");const S=globalThis.trustedTypes,k=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,x=`lit$${(Math.random()+"").slice(9)}$`,C="?"+x,T=`<${C}>`,A=document,_=(t="")=>A.createComment(t),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,M=/>/g,R=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,O=/'/g,j=/"/g,L=/^(?:script|style|textarea)$/i,F=t=>(i,...e)=>({_$litType$:t,strings:i,values:e}),D=F(1),I=F(2),P=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),V=new WeakMap,H=A.createTreeWalker(A,129,null,!1),J=(t,i)=>{const e=t.length-1,s=[];let n,r=2===i?"<svg>":"",o=U;for(let i=0;i<e;i++){const e=t[i];let l,h,c=-1,a=0;for(;a<e.length&&(o.lastIndex=a,h=o.exec(e),null!==h);)a=o.lastIndex,o===U?"!--"===h[1]?o=N:void 0!==h[1]?o=M:void 0!==h[2]?(L.test(h[2])&&(n=RegExp("</"+h[2],"g")),o=R):void 0!==h[3]&&(o=R):o===R?">"===h[0]?(o=null!=n?n:U,c=-1):void 0===h[1]?c=-2:(c=o.lastIndex-h[2].length,l=h[1],o=void 0===h[3]?R:'"'===h[3]?j:O):o===j||o===O?o=R:o===N||o===M?o=U:(o=R,n=void 0);const d=o===R&&t[i+1].startsWith("/>")?" ":"";r+=o===U?e+T:c>=0?(s.push(l),e.slice(0,c)+"$lit$"+e.slice(c)+x+d):e+x+(-2===c?(s.push(void 0),i):d)}const l=r+(t[e]||"<?>")+(2===i?"</svg>":"");return[void 0!==k?k.createHTML(l):l,s]};class K{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let n=0,r=0;const o=t.length-1,l=this.parts,[h,c]=J(t,i);if(this.el=K.createElement(h,e),H.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=H.nextNode())&&l.length<o;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(x)){const e=c[r++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+"$lit$").split(x),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?G:"?"===i[1]?Y:"@"===i[1]?tt:X})}else l.push({type:6,index:n})}for(const i of t)s.removeAttribute(i)}if(L.test(s.tagName)){const t=s.textContent.split(x),i=t.length-1;if(i>0){s.textContent=S?S.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],_()),H.nextNode(),l.push({type:2,index:++n});s.append(t[i],_())}}}else if(8===s.nodeType)if(s.data===C)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(x,t+1));)l.push({type:7,index:n}),t+=x.length-1}n++}}static createElement(t,i){const e=A.createElement("template");return e.innerHTML=t,e}}function Z(t,i,e=t,s){var n,r,o,l;if(i===P)return i;let h=void 0!==s?null===(n=e._$Cl)||void 0===n?void 0:n[s]:e._$Cu;const c=z(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==c&&(null===(r=null==h?void 0:h._$AO)||void 0===r||r.call(h,!1),void 0===c?h=void 0:(h=new c(t),h._$AT(t,e,s)),void 0!==s?(null!==(o=(l=e)._$Cl)&&void 0!==o?o:l._$Cl=[])[s]=h:e._$Cu=h),void 0!==h&&(i=Z(t,h._$AS(t,i.values),h,s)),i}class q{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:s}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:A).importNode(e,!0);H.currentNode=n;let r=H.nextNode(),o=0,l=0,h=s[0];for(;void 0!==h;){if(o===h.index){let i;2===h.type?i=new W(r,r.nextSibling,this,t):1===h.type?i=new h.ctor(r,h.name,h.strings,this,t):6===h.type&&(i=new it(r,this,t)),this.v.push(i),h=s[++l]}o!==(null==h?void 0:h.index)&&(r=H.nextNode(),o++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class W{constructor(t,i,e,s){var n;this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cg=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Z(this,t,i),z(t)?t===B||null==t||""===t?(this._$AH!==B&&this._$AR(),this._$AH=B):t!==this._$AH&&t!==P&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return E(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.M(t):this.$(t)}A(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==B&&z(this._$AH)?this._$AA.nextSibling.data=t:this.S(A.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=K.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new q(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=V.get(t.strings);return void 0===i&&V.set(t.strings,i=new K(t)),i}M(t){E(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const n of t)s===i.length?i.push(e=new W(this.A(_()),this.A(_()),this,this.options)):e=i[s],e._$AI(n),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class X{constructor(t,i,e,s,n){this.type=1,this._$AH=B,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const n=this.strings;let r=!1;if(void 0===n)t=Z(this,t,i,0),r=!z(t)||t!==this._$AH&&t!==P,r&&(this._$AH=t);else{const s=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=Z(this,s[e+o],i,o),l===P&&(l=this._$AH[o]),r||(r=!z(l)||l!==this._$AH[o]),l===B?t=B:t!==B&&(t+=(null!=l?l:"")+n[o+1]),this._$AH[o]=l}r&&!s&&this.k(t)}k(t){t===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends X{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===B?void 0:t}}const Q=S?S.emptyScript:"";class Y extends X{constructor(){super(...arguments),this.type=4}k(t){t&&t!==B?this.element.setAttribute(this.name,Q):this.element.removeAttribute(this.name)}}class tt extends X{constructor(t,i,e,s,n){super(t,i,e,s,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=Z(this,t,i,0))&&void 0!==e?e:B)===P)return;const s=this._$AH,n=t===B&&s!==B||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==B&&(s===B||n);n&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const et=window.litHtmlPolyfillSupport; | ||
/** | ||
@@ -26,3 +26,3 @@ * @license | ||
*/ | ||
var K,G;null==J||J(F,P),(null!==(d=globalThis.litHtmlVersions)&&void 0!==d?d:globalThis.litHtmlVersions=[]).push("2.0.2");class W extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const n=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=n.firstChild),n}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,n)=>{var e,r;const s=null!==(e=null==n?void 0:n.renderBefore)&&void 0!==e?e:i;let o=s._$litPart$;if(void 0===o){const t=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;s._$litPart$=o=new P(i.insertBefore(b(),t),t,void 0,null!=n?n:{})}return o._$AI(t),o})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return R}}W.finalized=!0,W._$litElement$=!0,null===(K=globalThis.litElementHydrateSupport)||void 0===K||K.call(globalThis,{LitElement:W});const Y=globalThis.litElementPolyfillSupport;null==Y||Y({LitElement:W}),(null!==(G=globalThis.litElementVersions)&&void 0!==G?G:globalThis.litElementVersions=[]).push("3.0.2"); | ||
var st,nt;null==et||et(K,W),(null!==($=globalThis.litHtmlVersions)&&void 0!==$?$:globalThis.litHtmlVersions=[]).push("2.0.2");class rt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var s,n;const r=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new W(i.insertBefore(_(),t),t,void 0,null!=e?e:{})}return o._$AI(t),o})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return P}}rt.finalized=!0,rt._$litElement$=!0,null===(st=globalThis.litElementHydrateSupport)||void 0===st||st.call(globalThis,{LitElement:rt});const ot=globalThis.litElementPolyfillSupport;null==ot||ot({LitElement:rt}),(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.0.2"); | ||
/** | ||
@@ -33,3 +33,3 @@ * @license | ||
*/ | ||
const Q=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(n){n.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(n){n.createProperty(i.key,t)}}; | ||
const lt=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}}; | ||
/** | ||
@@ -39,3 +39,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/function tt(t){return(i,n)=>void 0!==n?((t,i,n)=>{i.constructor.createProperty(n,t)})(t,i,n):Q(t,i) | ||
*/function ht(t){return(i,e)=>void 0!==e?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,e):lt(t,i) | ||
/** | ||
@@ -45,3 +45,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/}function it(t,i){return null==t||null==i?NaN:t<i?-1:t>i?1:t>=i?0:NaN}function nt(t){let i=t,n=t,e=t;function r(t,i,r=0,s=t.length){if(r<s){if(0!==n(i,i))return s;do{const n=r+s>>>1;e(t[n],i)<0?r=n+1:s=n}while(r<s)}return r}return 2!==t.length&&(i=(i,n)=>t(i)-n,n=it,e=(i,n)=>it(t(i),n)),{left:r,center:function(t,n,e=0,s=t.length){const o=r(t,n,e,s-1);return o>e&&i(t[o-1],n)>-i(t[o],n)?o-1:o},right:function(t,i,r=0,s=t.length){if(r<s){if(0!==n(i,i))return s;do{const n=r+s>>>1;e(t[n],i)<=0?r=n+1:s=n}while(r<s)}return r}}}const et=nt(it).right;nt((function(t){return null===t?NaN:+t})).center;var rt=et;class st extends Map{constructor(t,i=at){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:i}}),null!=t)for(const[i,n]of t)this.set(i,n)}get(t){return super.get(ot(this,t))}has(t){return super.has(ot(this,t))}set(t,i){return super.set(function({_intern:t,_key:i},n){const e=i(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),i)}delete(t){return super.delete(function({_intern:t,_key:i},n){const e=i(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function ot({_intern:t,_key:i},n){const e=i(n);return t.has(e)?t.get(e):n}function at(t){return null!==t&&"object"==typeof t?t.valueOf():t}var ht=Math.sqrt(50),ut=Math.sqrt(10),lt=Math.sqrt(2);function ct(t,i,n){var e=(i-t)/Math.max(0,n),r=Math.floor(Math.log(e)/Math.LN10),s=e/Math.pow(10,r);return r>=0?(s>=ht?10:s>=ut?5:s>=lt?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(s>=ht?10:s>=ut?5:s>=lt?2:1)}function ft(t,i){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(i).domain(t)}return this}function dt(t,i){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof i?this.interpolator(i):this.range(i)}return this}const vt=Symbol("implicit");function gt(){var t=new st,i=[],n=[],e=vt;function r(r){let s=t.get(r);if(void 0===s){if(e!==vt)return e;t.set(r,s=i.push(r)-1)}return n[s%n.length]}return r.domain=function(n){if(!arguments.length)return i.slice();i=[],t=new st;for(const e of n)t.has(e)||t.set(e,i.push(e)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return gt(i,n).unknown(e)},ft.apply(r,arguments),r}function pt(t,i,n){t.prototype=i.prototype=n,n.constructor=t}function mt(t,i){var n=Object.create(t.prototype);for(var e in i)n[e]=i[e];return n}function wt(){}var yt=1/.7,bt="\\s*([+-]?\\d+)\\s*",Mt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",kt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nt=/^#([0-9a-f]{3,8})$/,$t=new RegExp("^rgb\\("+[bt,bt,bt]+"\\)$"),St=new RegExp("^rgb\\("+[kt,kt,kt]+"\\)$"),xt=new RegExp("^rgba\\("+[bt,bt,bt,Mt]+"\\)$"),At=new RegExp("^rgba\\("+[kt,kt,kt,Mt]+"\\)$"),Ct=new RegExp("^hsl\\("+[Mt,kt,kt]+"\\)$"),Tt=new RegExp("^hsla\\("+[Mt,kt,kt,Mt]+"\\)$"),_t={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 Et(){return this.rgb().formatHex()}function zt(){return this.rgb().formatRgb()}function Rt(t){var i,n;return t=(t+"").trim().toLowerCase(),(i=Nt.exec(t))?(n=i[1].length,i=parseInt(i[1],16),6===n?jt(i):3===n?new Ft(i>>8&15|i>>4&240,i>>4&15|240&i,(15&i)<<4|15&i,1):8===n?Ut(i>>24&255,i>>16&255,i>>8&255,(255&i)/255):4===n?Ut(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|240&i,((15&i)<<4|15&i)/255):null):(i=$t.exec(t))?new Ft(i[1],i[2],i[3],1):(i=St.exec(t))?new Ft(255*i[1]/100,255*i[2]/100,255*i[3]/100,1):(i=xt.exec(t))?Ut(i[1],i[2],i[3],i[4]):(i=At.exec(t))?Ut(255*i[1]/100,255*i[2]/100,255*i[3]/100,i[4]):(i=Ct.exec(t))?Ht(i[1],i[2]/100,i[3]/100,1):(i=Tt.exec(t))?Ht(i[1],i[2]/100,i[3]/100,i[4]):_t.hasOwnProperty(t)?jt(_t[t]):"transparent"===t?new Ft(NaN,NaN,NaN,0):null}function jt(t){return new Ft(t>>16&255,t>>8&255,255&t,1)}function Ut(t,i,n,e){return e<=0&&(t=i=n=NaN),new Ft(t,i,n,e)}function Ot(t){return t instanceof wt||(t=Rt(t)),t?new Ft((t=t.rgb()).r,t.g,t.b,t.opacity):new Ft}function qt(t,i,n,e){return 1===arguments.length?Ot(t):new Ft(t,i,n,null==e?1:e)}function Ft(t,i,n,e){this.r=+t,this.g=+i,this.b=+n,this.opacity=+e}function Lt(){return"#"+Pt(this.r)+Pt(this.g)+Pt(this.b)}function Dt(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Pt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ht(t,i,n,e){return e<=0?t=i=n=NaN:n<=0||n>=1?t=i=NaN:i<=0&&(t=NaN),new Bt(t,i,n,e)}function It(t){if(t instanceof Bt)return new Bt(t.h,t.s,t.l,t.opacity);if(t instanceof wt||(t=Rt(t)),!t)return new Bt;if(t instanceof Bt)return t;var i=(t=t.rgb()).r/255,n=t.g/255,e=t.b/255,r=Math.min(i,n,e),s=Math.max(i,n,e),o=NaN,a=s-r,h=(s+r)/2;return a?(o=i===s?(n-e)/a+6*(n<e):n===s?(e-i)/a+2:(i-n)/a+4,a/=h<.5?s+r:2-s-r,o*=60):a=h>0&&h<1?0:o,new Bt(o,a,h,t.opacity)}function Bt(t,i,n,e){this.h=+t,this.s=+i,this.l=+n,this.opacity=+e}function Vt(t,i,n){return 255*(t<60?i+(n-i)*t/60:t<180?n:t<240?i+(n-i)*(240-t)/60:i)}pt(wt,Rt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Et,formatHex:Et,formatHsl:function(){return It(this).formatHsl()},formatRgb:zt,toString:zt}),pt(Ft,qt,mt(wt,{brighter:function(t){return t=null==t?yt:Math.pow(yt,t),new Ft(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ft(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Lt,formatHex:Lt,formatRgb:Dt,toString:Dt})),pt(Bt,(function(t,i,n,e){return 1===arguments.length?It(t):new Bt(t,i,n,null==e?1:e)}),mt(wt,{brighter:function(t){return t=null==t?yt:Math.pow(yt,t),new Bt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Bt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),i=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*i,r=2*n-e;return new Ft(Vt(t>=240?t-240:t+120,r,e),Vt(t,r,e),Vt(t<120?t+240:t-120,r,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Xt=Math.PI/180,Zt=180/Math.PI,Jt=4/29,Kt=6/29,Gt=3*Kt*Kt;function Wt(t){if(t instanceof Yt)return new Yt(t.l,t.a,t.b,t.opacity);if(t instanceof si)return oi(t);t instanceof Ft||(t=Ot(t));var i,n,e=ni(t.r),r=ni(t.g),s=ni(t.b),o=Qt((.2225045*e+.7168786*r+.0606169*s)/1);return e===r&&r===s?i=n=o:(i=Qt((.4360747*e+.3850649*r+.1430804*s)/.96422),n=Qt((.0139322*e+.0971045*r+.7141733*s)/.82521)),new Yt(116*o-16,500*(i-o),200*(o-n),t.opacity)}function Yt(t,i,n,e){this.l=+t,this.a=+i,this.b=+n,this.opacity=+e}function Qt(t){return t>.008856451679035631?Math.pow(t,1/3):t/Gt+Jt}function ti(t){return t>Kt?t*t*t:Gt*(t-Jt)}function ii(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ni(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ei(t){if(t instanceof si)return new si(t.h,t.c,t.l,t.opacity);if(t instanceof Yt||(t=Wt(t)),0===t.a&&0===t.b)return new si(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var i=Math.atan2(t.b,t.a)*Zt;return new si(i<0?i+360:i,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ri(t,i,n,e){return 1===arguments.length?ei(t):new si(t,i,n,null==e?1:e)}function si(t,i,n,e){this.h=+t,this.c=+i,this.l=+n,this.opacity=+e}function oi(t){if(isNaN(t.h))return new Yt(t.l,0,0,t.opacity);var i=t.h*Xt;return new Yt(t.l,Math.cos(i)*t.c,Math.sin(i)*t.c,t.opacity)}pt(Yt,(function(t,i,n,e){return 1===arguments.length?Wt(t):new Yt(t,i,n,null==e?1:e)}),mt(wt,{brighter:function(t){return new Yt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Yt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,i=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ft(ii(3.1338561*(i=.96422*ti(i))-1.6168667*(t=1*ti(t))-.4906146*(n=.82521*ti(n))),ii(-.9787684*i+1.9161415*t+.033454*n),ii(.0719453*i-.2289914*t+1.4052427*n),this.opacity)}})),pt(si,ri,mt(wt,{brighter:function(t){return new si(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new si(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return oi(this).rgb()}}));var ai=t=>()=>t;function hi(t,i){return function(n){return t+n*i}}function ui(t){return 1==(t=+t)?li:function(i,n){return n-i?function(t,i,n){return t=Math.pow(t,n),i=Math.pow(i,n)-t,n=1/n,function(e){return Math.pow(t+e*i,n)}}(i,n,t):ai(isNaN(i)?n:i)}}function li(t,i){var n=i-t;return n?hi(t,n):ai(isNaN(t)?i:t)}var ci=function t(i){var n=ui(i);function e(t,i){var e=n((t=qt(t)).r,(i=qt(i)).r),r=n(t.g,i.g),s=n(t.b,i.b),o=li(t.opacity,i.opacity);return function(i){return t.r=e(i),t.g=r(i),t.b=s(i),t.opacity=o(i),t+""}}return e.gamma=t,e}(1);function fi(t,i){i||(i=[]);var n,e=t?Math.min(i.length,t.length):0,r=i.slice();return function(s){for(n=0;n<e;++n)r[n]=t[n]*(1-s)+i[n]*s;return r}}function di(t,i){var n,e=i?i.length:0,r=t?Math.min(e,t.length):0,s=new Array(r),o=new Array(e);for(n=0;n<r;++n)s[n]=bi(t[n],i[n]);for(;n<e;++n)o[n]=i[n];return function(t){for(n=0;n<r;++n)o[n]=s[n](t);return o}}function vi(t,i){var n=new Date;return t=+t,i=+i,function(e){return n.setTime(t*(1-e)+i*e),n}}function gi(t,i){return t=+t,i=+i,function(n){return t*(1-n)+i*n}}function pi(t,i){var n,e={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==i&&"object"==typeof i||(i={}),i)n in t?e[n]=bi(t[n],i[n]):r[n]=i[n];return function(t){for(n in e)r[n]=e[n](t);return r}}var mi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wi=new RegExp(mi.source,"g");function yi(t,i){var n,e,r,s=mi.lastIndex=wi.lastIndex=0,o=-1,a=[],h=[];for(t+="",i+="";(n=mi.exec(t))&&(e=wi.exec(i));)(r=e.index)>s&&(r=i.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(e=e[0])?a[o]?a[o]+=e:a[++o]=e:(a[++o]=null,h.push({i:o,x:gi(n,e)})),s=wi.lastIndex;return s<i.length&&(r=i.slice(s),a[o]?a[o]+=r:a[++o]=r),a.length<2?h[0]?function(t){return function(i){return t(i)+""}}(h[0].x):function(t){return function(){return t}}(i):(i=h.length,function(t){for(var n,e=0;e<i;++e)a[(n=h[e]).i]=n.x(t);return a.join("")})}function bi(t,i){var n,e=typeof i;return null==i||"boolean"===e?ai(i):("number"===e?gi:"string"===e?(n=Rt(i))?(i=n,ci):yi:i instanceof Rt?ci:i instanceof Date?vi:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(i)?fi:Array.isArray(i)?di:"function"!=typeof i.valueOf&&"function"!=typeof i.toString||isNaN(i)?pi:gi)(t,i)}function Mi(t,i){return t=+t,i=+i,function(n){return Math.round(t*(1-n)+i*n)}}var ki=function(t){return function(i,n){var e=t((i=ri(i)).h,(n=ri(n)).h),r=li(i.c,n.c),s=li(i.l,n.l),o=li(i.opacity,n.opacity);return function(t){return i.h=e(t),i.c=r(t),i.l=s(t),i.opacity=o(t),i+""}}}((function(t,i){var n=i-t;return n?hi(t,n>180||n<-180?n-360*Math.round(n/360):n):ai(isNaN(t)?i:t)}));function Ni(t){return+t}var $i=[0,1];function Si(t){return t}function xi(t,i){return(i-=t=+t)?function(n){return(n-t)/i}:function(t){return function(){return t}}(isNaN(i)?NaN:.5)}function Ai(t,i,n){var e=t[0],r=t[1],s=i[0],o=i[1];return r<e?(e=xi(r,e),s=n(o,s)):(e=xi(e,r),s=n(s,o)),function(t){return s(e(t))}}function Ci(t,i,n){var e=Math.min(t.length,i.length)-1,r=new Array(e),s=new Array(e),o=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),i=i.slice().reverse());++o<e;)r[o]=xi(t[o],t[o+1]),s[o]=n(i[o],i[o+1]);return function(i){var n=rt(t,i,1,e)-1;return s[n](r[n](i))}}function Ti(t,i){return i.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function _i(){var t,i,n,e,r,s,o=$i,a=$i,h=bi,u=Si;function l(){var t=Math.min(o.length,a.length);return u!==Si&&(u=function(t,i){var n;return t>i&&(n=t,t=i,i=n),function(n){return Math.max(t,Math.min(i,n))}}(o[0],o[t-1])),e=t>2?Ci:Ai,r=s=null,c}function c(i){return null==i||isNaN(i=+i)?n:(r||(r=e(o.map(t),a,h)))(t(u(i)))}return c.invert=function(n){return u(i((s||(s=e(a,o.map(t),gi)))(n)))},c.domain=function(t){return arguments.length?(o=Array.from(t,Ni),l()):o.slice()},c.range=function(t){return arguments.length?(a=Array.from(t),l()):a.slice()},c.rangeRound=function(t){return a=Array.from(t),h=Mi,l()},c.clamp=function(t){return arguments.length?(u=!!t||Si,l()):u!==Si},c.interpolate=function(t){return arguments.length?(h=t,l()):h},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,e){return t=n,i=e,l()}}function Ei(){return _i()(Si,Si)}function zi(t,i){if((n=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0)return null;var n,e=t.slice(0,n);return[e.length>1?e[0]+e.slice(2):e,+t.slice(n+1)]}function Ri(t){return(t=zi(Math.abs(t)))?t[1]:NaN}var ji,Ui=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Oi(t){if(!(i=Ui.exec(t)))throw new Error("invalid format: "+t);var i;return new qi({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}function qi(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 Fi(t,i){var n=zi(t,i);if(!n)return t+"";var e=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Oi.prototype=qi.prototype,qi.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 Li={"%":(t,i)=>(100*t).toFixed(i),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,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>Fi(100*t,i),r:Fi,s:function(t,i){var n=zi(t,i);if(!n)return t+"";var e=n[0],r=n[1],s=r-(ji=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=e.length;return s===o?e:s>o?e+new Array(s-o+1).join("0"):s>0?e.slice(0,s)+"."+e.slice(s):"0."+new Array(1-s).join("0")+zi(t,Math.max(0,i+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Di(t){return t}var Pi,Hi,Ii,Bi=Array.prototype.map,Vi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Xi(t){var i,n,e=void 0===t.grouping||void 0===t.thousands?Di:(i=Bi.call(t.grouping,Number),n=t.thousands+"",function(t,e){for(var r=t.length,s=[],o=0,a=i[0],h=0;r>0&&a>0&&(h+a+1>e&&(a=Math.max(1,e-h)),s.push(t.substring(r-=a,r+a)),!((h+=a+1)>e));)a=i[o=(o+1)%i.length];return s.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Di:function(t){return function(i){return i.replace(/[0-9]/g,(function(i){return t[+i]}))}}(Bi.call(t.numerals,String)),h=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(t){var i=(t=Oi(t)).fill,n=t.align,c=t.sign,f=t.symbol,d=t.zero,v=t.width,g=t.comma,p=t.precision,m=t.trim,w=t.type;"n"===w?(g=!0,w="g"):Li[w]||(void 0===p&&(p=12),m=!0,w="g"),(d||"0"===i&&"="===n)&&(d=!0,i="0",n="=");var y="$"===f?r:"#"===f&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",b="$"===f?s:/[%p]/.test(w)?h:"",M=Li[w],k=/[defgprs%]/.test(w);function N(t){var r,s,h,f=y,N=b;if("c"===w)N=M(t)+N,t="";else{var $=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:M(Math.abs(t),p),m&&(t=function(t){t:for(var i,n=t.length,e=1,r=-1;e<n;++e)switch(t[e]){case".":r=i=e;break;case"0":0===r&&(r=e),i=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(i+1):t}(t)),$&&0==+t&&"+"!==c&&($=!1),f=($?"("===c?c:u:"-"===c||"("===c?"":c)+f,N=("s"===w?Vi[8+ji/3]:"")+N+($&&"("===c?")":""),k)for(r=-1,s=t.length;++r<s;)if(48>(h=t.charCodeAt(r))||h>57){N=(46===h?o+t.slice(r+1):t.slice(r))+N,t=t.slice(0,r);break}}g&&!d&&(t=e(t,1/0));var S=f.length+t.length+N.length,x=S<v?new Array(v-S+1).join(i):"";switch(g&&d&&(t=e(x+t,x.length?v-N.length:1/0),x=""),n){case"<":t=f+t+N+x;break;case"=":t=f+x+t+N;break;case"^":t=x.slice(0,S=x.length>>1)+f+t+N+x.slice(S);break;default:t=x+f+t+N}return a(t)}return p=void 0===p?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),N.toString=function(){return t+""},N}return{format:c,formatPrefix:function(t,i){var n=c(((t=Oi(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(Ri(i)/3))),r=Math.pow(10,-e),s=Vi[8+e/3];return function(t){return n(r*t)+s}}}}function Zi(t,i,n,e){var r,s=function(t,i,n){var e=Math.abs(i-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),s=e/r;return s>=ht?r*=10:s>=ut?r*=5:s>=lt&&(r*=2),i<t?-r:r}(t,i,n);switch((e=Oi(null==e?",f":e)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(i));return null!=e.precision||isNaN(r=function(t,i){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ri(i)/3)))-Ri(Math.abs(t)))}(s,o))||(e.precision=r),Ii(e,o);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,i){return t=Math.abs(t),i=Math.abs(i)-t,Math.max(0,Ri(i)-Ri(t))+1}(s,Math.max(Math.abs(t),Math.abs(i))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-Ri(Math.abs(t)))}(s))||(e.precision=r-2*("%"===e.type))}return Hi(e)}function Ji(t){var i=t.domain;return t.ticks=function(t){var n=i();return function(t,i,n){var e,r,s,o,a=-1;if(n=+n,(t=+t)==(i=+i)&&n>0)return[t];if((e=i<t)&&(r=t,t=i,i=r),0===(o=ct(t,i,n))||!isFinite(o))return[];if(o>0){let n=Math.round(t/o),e=Math.round(i/o);for(n*o<t&&++n,e*o>i&&--e,s=new Array(r=e-n+1);++a<r;)s[a]=(n+a)*o}else{o=-o;let n=Math.round(t*o),e=Math.round(i*o);for(n/o<t&&++n,e/o>i&&--e,s=new Array(r=e-n+1);++a<r;)s[a]=(n+a)/o}return e&&s.reverse(),s}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var e=i();return Zi(e[0],e[e.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var e,r,s=i(),o=0,a=s.length-1,h=s[o],u=s[a],l=10;for(u<h&&(r=h,h=u,u=r,r=o,o=a,a=r);l-- >0;){if((r=ct(h,u,n))===e)return s[o]=h,s[a]=u,i(s);if(r>0)h=Math.floor(h/r)*r,u=Math.ceil(u/r)*r;else{if(!(r<0))break;h=Math.ceil(h*r)/r,u=Math.floor(u*r)/r}e=r}return t},t}function Ki(){var t=Ei();return t.copy=function(){return Ti(t,Ki())},ft.apply(t,arguments),Ji(t)}function Gi(){var t,i=0,n=1,e=1,r=[.5],s=[0,1];function o(i){return null!=i&&i<=i?s[rt(r,i,0,e)]:t}function a(){var t=-1;for(r=new Array(e);++t<e;)r[t]=((t+1)*n-(t-e)*i)/(e+1);return o}return o.domain=function(t){return arguments.length?([i,n]=t,i=+i,n=+n,a()):[i,n]},o.range=function(t){return arguments.length?(e=(s=Array.from(t)).length-1,a()):s.slice()},o.invertExtent=function(t){var o=s.indexOf(t);return o<0?[NaN,NaN]:o<1?[i,r[0]]:o>=e?[r[e-1],n]:[r[o-1],r[o]]},o.unknown=function(i){return arguments.length?(t=i,o):o},o.thresholds=function(){return r.slice()},o.copy=function(){return Gi().domain([i,n]).range(s).unknown(t)},ft.apply(Ji(o),arguments)}function Wi(){var t,i=[.5],n=[0,1],e=1;function r(r){return null!=r&&r<=r?n[rt(i,r,0,e)]:t}return r.domain=function(t){return arguments.length?(i=Array.from(t),e=Math.min(i.length,n.length-1),r):i.slice()},r.range=function(t){return arguments.length?(n=Array.from(t),e=Math.min(i.length,n.length-1),r):n.slice()},r.invertExtent=function(t){var e=n.indexOf(t);return[i[e-1],i[e]]},r.unknown=function(i){return arguments.length?(t=i,r):t},r.copy=function(){return Wi().domain(i).range(n).unknown(t)},ft.apply(r,arguments)}function Yi(){var t,i,n,e,r,s=0,o=1,a=Si,h=!1;function u(i){return null==i||isNaN(i=+i)?r:a(0===n?.5:(i=(e(i)-t)*n,h?Math.max(0,Math.min(1,i)):i))}function l(t){return function(i){var n,e;return arguments.length?([n,e]=i,a=t(n,e),u):[a(0),a(1)]}}return u.domain=function(r){return arguments.length?([s,o]=r,t=e(s=+s),i=e(o=+o),n=t===i?0:1/(i-t),u):[s,o]},u.clamp=function(t){return arguments.length?(h=!!t,u):h},u.interpolator=function(t){return arguments.length?(a=t,u):a},u.range=l(bi),u.rangeRound=l(Mi),u.unknown=function(t){return arguments.length?(r=t,u):r},function(r){return e=r,t=r(s),i=r(o),n=t===i?0:1/(i-t),u}}function Qi(t,i){return i.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function tn(){var t=Ji(Yi()(Si));return t.copy=function(){return Qi(t,tn())},dt.apply(t,arguments)}Pi=Xi({thousands:",",grouping:[3],currency:["$",""]}),Hi=Pi.format,Ii=Pi.formatPrefix;class nn{constructor(t){this.cle=t}setColorScale(){switch(this.cle.scaleType){case"continuous":this.setContinousColorScale();break;case"discrete":this.setDiscreteColorScale();break;case"threshold":this.setThresholdColorScale();break;case"categorical":this.setCategoricalColorScale();break;default:this.invalidScaleType(this.cle.scaleType)}}setContinousColorScale(){const{interpolator:t,domain:i,range:n}=this.cle;this.colorScale=t?tn(t).domain(i):Ki().range(n).domain(i).interpolate(ki)}setDiscreteColorScale(){this.colorScale=Gi().domain(this.cle.domain).range(this.cle.range)}setThresholdColorScale(){const t=this.cle.domain;this.colorScale=Wi().domain(t.slice(1,t.length-1)).range(this.cle.range)}setCategoricalColorScale(){this.colorScale=gt().domain(this.cle.domain).range(this.cle.range)}invalidScaleType(t){throw new Error(`invalid property scaletype: ${t}. \n Must be one of "categorical", "continuous", "discrete", "threshold".`)}} | ||
*/}class ct{constructor(t){this.cle=t}setColorScale(){switch(this.cle.scaleType){case"continuous":this.setContinousColorScale();break;case"discrete":this.setDiscreteColorScale();break;case"threshold":this.setThresholdColorScale();break;case"categorical":this.setCategoricalColorScale();break;default:this.invalidScaleType(this.cle.scaleType)}}setContinousColorScale(){const{interpolator:e,domain:s,range:n}=this.cle;this.colorScale=e?t(e).domain(s):i().range(n).domain(s).interpolate(r)}setDiscreteColorScale(){this.colorScale=e().domain(this.cle.domain).range(this.cle.range)}setThresholdColorScale(){const t=this.cle.domain;this.colorScale=s().domain(t.slice(1,t.length-1)).range(this.cle.range)}setCategoricalColorScale(){this.colorScale=n().domain(this.cle.domain).range(this.cle.range)}invalidScaleType(t){throw new Error(`invalid property scaletype: ${t}. \n Must be one of "categorical", "continuous", "discrete", "threshold".`)}} | ||
/** | ||
@@ -51,3 +51,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const en=1; | ||
*/const at=1; | ||
/** | ||
@@ -58,3 +58,3 @@ * @license | ||
*/ | ||
const rn=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,n){this._$Ct=t,this._$AM=i,this._$Ci=n}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==en||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var n,e;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(n=this.et)||void 0===n?void 0:n.has(t))&&this.st.add(t);return this.render(i)}const r=t.element.classList;this.st.forEach((t=>{t in i||(r.remove(t),this.st.delete(t))}));for(const t in i){const n=!!i[t];n===this.st.has(t)||(null===(e=this.et)||void 0===e?void 0:e.has(t))||(n?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return R}});class sn{constructor(t){this.cle=t}render(){const t=this.cle.titleText?E`<p class="legend-title">${this.cle.titleText}</p>`:"",i={hidden:"categorical"===this.cle.scaleType},n={hidden:"categorical"!==this.cle.scaleType,"categorical-container":!0};return E`<div | ||
const dt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==at||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var e,s;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.et)||void 0===e?void 0:e.has(t))&&this.st.add(t);return this.render(i)}const n=t.element.classList;this.st.forEach((t=>{t in i||(n.remove(t),this.st.delete(t))}));for(const t in i){const e=!!i[t];e===this.st.has(t)||(null===(s=this.et)||void 0===s?void 0:s.has(t))||(e?(n.add(t),this.st.add(t)):(n.remove(t),this.st.delete(t)))}return P}});class ut{constructor(t){this.cle=t}render(){const t=this.cle.titleText?D`<p class="legend-title">${this.cle.titleText}</p>`:"",i={hidden:"categorical"===this.cle.scaleType},e={hidden:"categorical"!==this.cle.scaleType,"categorical-container":!0};return D`<div | ||
class="cle-container" | ||
@@ -66,3 +66,3 @@ style="width:${this.cle.width}px; height:auto;" | ||
<svg | ||
class=${rn(i)} | ||
class=${dt(i)} | ||
width=${this.cle.width} | ||
@@ -78,26 +78,26 @@ height=${this.cle.height} | ||
</svg> | ||
<ul class=${rn(n)}> | ||
<ul class=${dt(e)}> | ||
${this.renderCategorical()} | ||
</ul> | ||
<slot name="footer"></slot> | ||
</div>`}renderCategorical(){if("categorical"!==this.cle.scaleType)return"";const{markType:t,colorScale:i,domain:n}=this.cle,e={"legend-item":!0,line:"line"===t,circle:"circle"===t};return E`${n.map((t=>E`<li | ||
class=${rn(e)} | ||
</div>`}renderCategorical(){if("categorical"!==this.cle.scaleType)return"";const{markType:t,colorScale:i,domain:e}=this.cle,s={"legend-item":!0,line:"line"===t,circle:"circle"===t};return D`${e.map((t=>D`<li | ||
class=${dt(s)} | ||
style="--color:${i(t)}" | ||
> | ||
${t} | ||
</li>`))}`}renderContinuous(){var t,i;if("continuous"!==this.cle.scaleType||null===this.cle.colorScale)return"";const{colorScale:n,marginTop:e,marginLeft:r,marginRight:s,tickSize:o,width:a,range:h}=this.cle,u=this.cle.marginBottom+o,l=this.cle.height+o,c=(null===(i=(t=n).interpolator)||void 0===i?void 0:i.call(t))||function(t,i){void 0===i&&(i=t,t=bi);for(var n=0,e=i.length-1,r=i[0],s=new Array(e<0?0:e);n<e;)s[n]=t(r,r=i[++n]);return function(t){var i=Math.max(0,Math.min(e-1,Math.floor(t*=e)));return s[i](t-i)}}(ki,h);return z`<image | ||
x=${r} | ||
y=${e} | ||
width=${a-s-r} | ||
height=${l-e-u} | ||
</li>`))}`}renderContinuous(){var t,i;if("continuous"!==this.cle.scaleType||null===this.cle.colorScale)return"";const{colorScale:e,marginTop:s,marginLeft:n,marginRight:l,tickSize:h,width:c,range:a}=this.cle,d=this.cle.marginBottom+h,u=this.cle.height+h,v=(null===(i=(t=e).interpolator)||void 0===i?void 0:i.call(t))||o(r,a);return I`<image | ||
x=${n} | ||
y=${s} | ||
width=${c-l-n} | ||
height=${u-s-d} | ||
preserveAspectRatio="none" | ||
href=${this.getColorRamp(c).toDataURL()} | ||
></image>`}renderDiscreteThreshold(){if("discrete"!==this.cle.scaleType&&"threshold"!==this.cle.scaleType)return"";const{tickSize:t,marginTop:i,marginLeft:n,colorScale:e,xScale:r}=this.cle,s=this.cle.height+t,o=this.cle.marginBottom+t,a=e.range();return z`${a.map((t=>z`<rect x=${(t=>e.invertExtent(t).map(r)[0]||n)(t)} y=${i} width=${(t=>{let[i,n]=e.invertExtent(t).map(r);return i=i||0,n=n||r.range()[1],n-i})(t)} height=${s-i-o} fill=${t}></rect>`))}`}renderAxis(){if(!this.cle.xScale||"categorical"===this.cle.scaleType)return"";const{ticks:t,tickSize:i,tickFormat:n,tickFormatter:e,tickValues:r,xScale:s,marginTop:o}=this.cle,a=this.cle.height+i,h=this.cle.marginBottom+i,u=(null==r?void 0:r.length)?r:s.ticks.apply(s,[t,n]),l=Math.max(i,0)+3;return z`<g | ||
href=${this.getColorRamp(v).toDataURL()} | ||
></image>`}renderDiscreteThreshold(){if("discrete"!==this.cle.scaleType&&"threshold"!==this.cle.scaleType)return"";const{tickSize:t,marginTop:i,marginLeft:e,colorScale:s,xScale:n}=this.cle,r=this.cle.height+t,o=this.cle.marginBottom+t,l=s.range();return I`${l.map((t=>I`<rect x=${(t=>s.invertExtent(t).map(n)[0]||e)(t)} y=${i} width=${(t=>{let[i,e]=s.invertExtent(t).map(n);return i=i||0,e=e||n.range()[1],e-i})(t)} height=${r-i-o} fill=${t}></rect>`))}`}renderAxis(){if(!this.cle.xScale||"categorical"===this.cle.scaleType)return"";const{ticks:t,tickSize:i,tickFormat:e,tickFormatter:s,tickValues:n,xScale:r,marginTop:o}=this.cle,l=this.cle.height+i,h=this.cle.marginBottom+i,c=(null==n?void 0:n.length)?n:r.ticks.apply(r,[t,e]),a=Math.max(i,0)+3;return I`<g | ||
class="x-axis" | ||
transform="translate(0, ${a-h})" | ||
transform="translate(0, ${l-h})" | ||
text-anchor="middle" | ||
>${u.map((t=>z`<g class="tick" transform='translate(${s(t)},0)'> | ||
<line stroke="currentColor" y2="${i}" y1="${o+h-a}"></line> | ||
<text fill="currentColor" y="${l}" dy="0.71em">${e(t)}</text> | ||
</g>`))}</g>`}getColorRamp(t,i=256){const n=document.createElement("canvas");n.setAttribute("height","1"),n.setAttribute("width",`${i}`);const e=n.getContext("2d");for(let n=0;n<i;n++)e.fillStyle=t(n/(i-1)),e.fillRect(n,0,1,1);return n}}const on=[0,1],an=["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],hn=["domain","range","interpolator","scaleType"],un=["scaleType","ticks","tickSize","tickValues","tickFormat","domain","range","marginLeft","marginRight","marginBottom","marginTop","width","height"];class ln{constructor(t){this.cle=t}setXScale(){const{scaleType:t,marginLeft:i,width:n,marginRight:e}=this.cle;switch(t){case"continuous":this.xScale=Ki().domain(this.cle.domain).range([i,n-e]);break;case"discrete":case"threshold":this.xScale=Ki().domain([this.cle.domain[0],this.cle.domain[this.cle.domain.length-1]]).rangeRound([i,n-e]);break;case"categorical":this.xScale=null;break;default:throw new Error(`Unrecognized scaleType: ${t}`)}}handleAxisTicks(){var t,i,n;const{scaleType:e}=this.cle;if("continuous"!==e&&"categorical"!==e){const[n,e]=this.xScale.domain();this.cle.tickValues=this.cle.tickValues||[n,...(null===(i=null===(t=this.cle.colorScale)||void 0===t?void 0:t.thresholds)||void 0===i?void 0:i.call(t))||this.cle.colorScale.domain(),e]}(null===(n=this.cle.tickFormat)||void 0===n?void 0:n.length)?this.cle.tickFormatter=Hi(this.cle.tickFormat):this.cle.tickFormatter=this.xScale.tickFormat(this.cle.ticks||5,this.cle.tickFormat||".1f")}}const cn=((t,...n)=>{const r=1===t.length?t[0]:n.reduce(((i,n,e)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[e+1]),t[0]);return new e(r,i)})` | ||
>${c.map((t=>I`<g class="tick" transform='translate(${r(t)},0)'> | ||
<line stroke="currentColor" y2="${i}" y1="${o+h-l}"></line> | ||
<text fill="currentColor" y="${a}" dy="0.71em">${s(t)}</text> | ||
</g>`))}</g>`}getColorRamp(t,i=256){const e=document.createElement("canvas");e.setAttribute("height","1"),e.setAttribute("width",`${i}`);const s=e.getContext("2d");for(let e=0;e<i;e++)s.fillStyle=t(e/(i-1)),s.fillRect(e,0,1,1);return e}}const vt=[0,1],ft=["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],gt=["domain","range","interpolator","scaleType"],pt=["scaleType","ticks","tickSize","tickValues","tickFormat","domain","range","marginLeft","marginRight","marginBottom","marginTop","width","height"];class mt{constructor(t){this.cle=t}setXScale(){const{scaleType:t,marginLeft:e,width:s,marginRight:n}=this.cle;switch(t){case"continuous":this.xScale=i().domain(this.cle.domain).range([e,s-n]);break;case"discrete":case"threshold":this.xScale=i().domain([this.cle.domain[0],this.cle.domain[this.cle.domain.length-1]]).rangeRound([e,s-n]);break;case"categorical":this.xScale=null;break;default:throw new Error(`Unrecognized scaleType: ${t}`)}}handleAxisTicks(){var t,i,e;const{scaleType:s}=this.cle;if("continuous"!==s&&"categorical"!==s){const[e,s]=this.xScale.domain();this.cle.tickValues=this.cle.tickValues||[e,...(null===(i=null===(t=this.cle.colorScale)||void 0===t?void 0:t.thresholds)||void 0===i?void 0:i.call(t))||this.cle.colorScale.domain(),s]}(null===(e=this.cle.tickFormat)||void 0===e?void 0:e.length)?this.cle.tickFormatter=l(this.cle.tickFormat):this.cle.tickFormatter=this.xScale.tickFormat(this.cle.ticks||5,this.cle.tickFormat||".1f")}}const yt=((t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,e,s)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[s+1]),t[0]);return new d(e,c)})` | ||
:host { | ||
@@ -196,3 +196,3 @@ --cle-font-family: sans-serif; | ||
} | ||
`;var fn=function(t,i,n,e){for(var r,s=arguments.length,o=s<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,n):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(i,n,o):r(i,n))||o);return s>3&&o&&Object.defineProperty(i,n,o),o};let dn=class extends W{constructor(){super(...arguments),this.titleText="Color Legend Element",this.width=325,this.height=32,this.marginTop=6,this.marginRight=12,this.marginBottom=16,this.marginLeft=12,this.scaleType="continuous",this.domain=on,this.range=an,this.markType="circle",this.ticks=5,this.tickFormat=".1f",this.tickSize=6,this.tickValues=null,this.colorScaleSetter=new nn(this),this.axisTickSetter=new ln(this),this.renderer=new sn(this)}get interpolator(){return this._interpolator}set interpolator(t){if("function"!=typeof t)throw new Error("interpolator must be a function.");{const i=this.interpolator;this._interpolator=t,this.requestUpdate("interpolator",i)}}get tickFormatter(){return this._tickFormatter}set tickFormatter(t){if("function"!=typeof t)throw new Error("tickFormatter must be a function.");{const i=this.tickFormatter;this._tickFormatter=t,this.requestUpdate("tickFormatter",i)}}get colorScale(){return this.colorScaleSetter.colorScale}get xScale(){return this.axisTickSetter.xScale}render(){return this.renderer.render()}willUpdate(t){hn.some((i=>t.has(i)))&&this.colorScaleSetter.setColorScale(),un.some((i=>t.has(i)))&&(this.axisTickSetter.setXScale(),this.axisTickSetter.handleAxisTicks())}};dn.styles=[cn],fn([tt({type:String})],dn.prototype,"titleText",void 0),fn([tt({type:Number})],dn.prototype,"width",void 0),fn([tt({type:Number})],dn.prototype,"height",void 0),fn([tt({type:Number})],dn.prototype,"marginTop",void 0),fn([tt({type:Number})],dn.prototype,"marginRight",void 0),fn([tt({type:Number})],dn.prototype,"marginBottom",void 0),fn([tt({type:Number})],dn.prototype,"marginLeft",void 0),fn([tt({type:String})],dn.prototype,"scaleType",void 0),fn([tt({type:Array})],dn.prototype,"domain",void 0),fn([tt({type:Array})],dn.prototype,"range",void 0),fn([tt({type:String})],dn.prototype,"markType",void 0),fn([tt({type:Number})],dn.prototype,"ticks",void 0),fn([tt({type:String})],dn.prototype,"tickFormat",void 0),fn([tt({type:Number})],dn.prototype,"tickSize",void 0),fn([tt({type:Array})],dn.prototype,"tickValues",void 0),fn([ | ||
`;var bt=function(t,i,e,s){for(var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};let wt=class extends rt{constructor(){super(...arguments),this.titleText="Color Legend Element",this.width=325,this.height=32,this.marginTop=6,this.marginRight=12,this.marginBottom=16,this.marginLeft=12,this.scaleType="continuous",this.domain=vt,this.range=ft,this.markType="circle",this.ticks=5,this.tickFormat=".1f",this.tickSize=6,this.tickValues=null,this.colorScaleSetter=new ct(this),this.axisTickSetter=new mt(this),this.renderer=new ut(this)}get interpolator(){return this._interpolator}set interpolator(t){if("function"!=typeof t)throw new Error("interpolator must be a function.");{const i=this.interpolator;this._interpolator=t,this.requestUpdate("interpolator",i)}}get tickFormatter(){return this._tickFormatter}set tickFormatter(t){if("function"!=typeof t)throw new Error("tickFormatter must be a function.");{const i=this.tickFormatter;this._tickFormatter=t,this.requestUpdate("tickFormatter",i)}}get colorScale(){return this.colorScaleSetter.colorScale}get xScale(){return this.axisTickSetter.xScale}render(){return this.renderer.render()}willUpdate(t){gt.some((i=>t.has(i)))&&this.colorScaleSetter.setColorScale(),pt.some((i=>t.has(i)))&&(this.axisTickSetter.setXScale(),this.axisTickSetter.handleAxisTicks())}};wt.styles=[yt],bt([ht({type:String})],wt.prototype,"titleText",void 0),bt([ht({type:Number})],wt.prototype,"width",void 0),bt([ht({type:Number})],wt.prototype,"height",void 0),bt([ht({type:Number})],wt.prototype,"marginTop",void 0),bt([ht({type:Number})],wt.prototype,"marginRight",void 0),bt([ht({type:Number})],wt.prototype,"marginBottom",void 0),bt([ht({type:Number})],wt.prototype,"marginLeft",void 0),bt([ht({type:String})],wt.prototype,"scaleType",void 0),bt([ht({type:Array})],wt.prototype,"domain",void 0),bt([ht({type:Array})],wt.prototype,"range",void 0),bt([ht({type:String})],wt.prototype,"markType",void 0),bt([ht({type:Number})],wt.prototype,"ticks",void 0),bt([ht({type:String})],wt.prototype,"tickFormat",void 0),bt([ht({type:Number})],wt.prototype,"tickSize",void 0),bt([ht({type:Array})],wt.prototype,"tickValues",void 0),bt([ | ||
/** | ||
@@ -203,2 +203,2 @@ * @license | ||
*/ | ||
function(t,i){return(({finisher:t,descriptor:i})=>(n,e)=>{var r;if(void 0===e){const e=null!==(r=n.originalKey)&&void 0!==r?r:n.key,s=null!=i?{kind:"method",placement:"prototype",key:e,descriptor:i(n.key)}:{...n,key:e};return null!=t&&(s.finisher=function(i){t(i,e)}),s}{const r=n.constructor;void 0!==i&&Object.defineProperty(n,e,i(e)),null==t||t(r,e)}})({descriptor:n=>{const e={get(){var i,n;return null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof n?Symbol():"__"+n;e.get=function(){var n,e;return void 0===this[i]&&(this[i]=null!==(e=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(t))&&void 0!==e?e:null),this[i]}}return e}})}("svg")],dn.prototype,"svg",void 0),fn([tt({attribute:!1})],dn.prototype,"interpolator",null),fn([tt({attribute:!1})],dn.prototype,"tickFormatter",null),dn=fn([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:n,elements:e}=i;return{kind:n,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("color-legend")],dn);export{dn as ColorLegendElement}; | ||
function(t,i){return(({finisher:t,descriptor:i})=>(e,s)=>{var n;if(void 0===s){const s=null!==(n=e.originalKey)&&void 0!==n?n:e.key,r=null!=i?{kind:"method",placement:"prototype",key:s,descriptor:i(e.key)}:{...e,key:s};return null!=t&&(r.finisher=function(i){t(i,s)}),r}{const n=e.constructor;void 0!==i&&Object.defineProperty(e,s,i(s)),null==t||t(n,s)}})({descriptor:e=>{const s={get(){var i,e;return null!==(e=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==e?e:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof e?Symbol():"__"+e;s.get=function(){var e,s;return void 0===this[i]&&(this[i]=null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==s?s:null),this[i]}}return s}})}("svg")],wt.prototype,"svg",void 0),bt([ht({attribute:!1})],wt.prototype,"interpolator",null),bt([ht({attribute:!1})],wt.prototype,"tickFormatter",null),wt=bt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:e,elements:s}=i;return{kind:e,elements:s,finisher(i){window.customElements.define(t,i)}}})(t,i))("color-legend")],wt);export{wt as ColorLegendElement}; |
@@ -1,51 +0,51 @@ | ||
var t,i;t=this,i=function(t){ | ||
var t,i;t=this,i=function(t,i,e,s){ | ||
/** | ||
* @license | ||
* Copyright 2019 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
const i=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),e=new Map;class r{constructor(t,i){if(this._$cssResult$=!0,i!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=e.get(this.cssText);return i&&void 0===t&&(e.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const s=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return(t=>new r("string"==typeof t?t:t+"",n))(i)})(t):t | ||
* @license | ||
* Copyright 2019 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
const n=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),r=new Map;class l{constructor(t,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=r.get(this.cssText);return n&&void 0===t&&(r.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const h=n?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return(t=>new l("string"==typeof t?t:t+"",o))(i)})(t):t | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/;var o;const a=window.trustedTypes,h=a?a.emptyScript:"",u=window.reactiveElementPolyfillSupport,l={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let n=t;switch(i){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},c=(t,i)=>i!==t&&(i==i||t==t),f={attribute:!0,type:String,converter:l,reflect:!1,hasChanged:c};class d extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,n)=>{const e=this._$Eh(n,i);void 0!==e&&(this._$Eu.set(e,n),t.push(e))})),t}static createProperty(t,i=f){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,n,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,n){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||f}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of i)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)i.unshift(s(t))}else void 0!==t&&i.push(s(t));return i}static _$Eh(t,i){const n=i.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,n;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const n=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,n)=>{i?t.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((i=>{const n=document.createElement("style"),e=window.litNonce;void 0!==e&&n.setAttribute("nonce",e),n.textContent=i.cssText,t.appendChild(n)}))})(n,this.constructor.elementStyles),n}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$ES(t,i,n=f){var e,r;const s=this.constructor._$Eh(t,n);if(void 0!==s&&!0===n.reflect){const o=(null!==(r=null===(e=n.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==r?r:l.toAttribute)(i,n.type);this._$Ei=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Ei=null}}_$AK(t,i){var n,e,r;const s=this.constructor,o=s._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){const t=s.getPropertyOptions(o),a=t.converter,h=null!==(r=null!==(e=null===(n=a)||void 0===n?void 0:n.fromAttribute)&&void 0!==e?e:"function"==typeof a?a:null)&&void 0!==r?r:l.fromAttribute;this._$Ei=o,this[o]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,n){let e=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||c)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):e=!1),!this.isUpdatePending&&e&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const n=this._$AL;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(n)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(n)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}} | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/;var c;const a=window.trustedTypes,d=a?a.emptyScript:"",u=window.reactiveElementPolyfillSupport,v={toAttribute(t,i){switch(i){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},f=(t,i)=>i!==t&&(i==i||t==t),g={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:f};class p extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Eh(e,i);void 0!==s&&(this._$Eu.set(s,e),t.push(s))})),t}static createProperty(t,i=g){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const n=this[t];this[i]=s,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||g}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(h(t))}else void 0!==t&&i.push(h(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{n?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const e=document.createElement("style"),s=window.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$ES(t,i,e=g){var s,n;const o=this.constructor._$Eh(t,e);if(void 0!==o&&!0===e.reflect){const r=(null!==(n=null===(s=e.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==n?n:v.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var e,s,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(n=null!==(s=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==n?n:v.fromAttribute;this._$Ei=r,this[r]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||f)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}} | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
var v;d.finalized=!0,d.elementProperties=new Map,d.elementStyles=[],d.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:d}),(null!==(o=globalThis.reactiveElementVersions)&&void 0!==o?o:globalThis.reactiveElementVersions=[]).push("1.0.2");const g=globalThis.trustedTypes,p=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,y="?"+m,w=`<${y}>`,b=document,M=(t="")=>b.createComment(t),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S=/-->/g,x=/>/g,A=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,T=/'/g,_=/"/g,C=/^(?:script|style|textarea)$/i,E=t=>(i,...n)=>({_$litType$:t,strings:i,values:n}),z=E(1),R=E(2),j=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),O=new WeakMap,q=b.createTreeWalker(b,129,null,!1),F=(t,i)=>{const n=t.length-1,e=[];let r,s=2===i?"<svg>":"",o=$;for(let i=0;i<n;i++){const n=t[i];let a,h,u=-1,l=0;for(;l<n.length&&(o.lastIndex=l,h=o.exec(n),null!==h);)l=o.lastIndex,o===$?"!--"===h[1]?o=S:void 0!==h[1]?o=x:void 0!==h[2]?(C.test(h[2])&&(r=RegExp("</"+h[2],"g")),o=A):void 0!==h[3]&&(o=A):o===A?">"===h[0]?(o=null!=r?r:$,u=-1):void 0===h[1]?u=-2:(u=o.lastIndex-h[2].length,a=h[1],o=void 0===h[3]?A:'"'===h[3]?_:T):o===_||o===T?o=A:o===S||o===x?o=$:(o=A,r=void 0);const c=o===A&&t[i+1].startsWith("/>")?" ":"";s+=o===$?n+w:u>=0?(e.push(a),n.slice(0,u)+"$lit$"+n.slice(u)+m+c):n+m+(-2===u?(e.push(void 0),i):c)}const a=s+(t[n]||"<?>")+(2===i?"</svg>":"");return[void 0!==p?p.createHTML(a):a,e]};class L{constructor({strings:t,_$litType$:i},n){let e;this.parts=[];let r=0,s=0;const o=t.length-1,a=this.parts,[h,u]=F(t,i);if(this.el=L.createElement(h,n),q.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=q.nextNode())&&a.length<o;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(m)){const n=u[s++];if(t.push(i),void 0!==n){const t=e.getAttribute(n.toLowerCase()+"$lit$").split(m),i=/([.?@])?(.*)/.exec(n);a.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?B:"?"===i[1]?X:"@"===i[1]?Z:I})}else a.push({type:6,index:r})}for(const i of t)e.removeAttribute(i)}if(C.test(e.tagName)){const t=e.textContent.split(m),i=t.length-1;if(i>0){e.textContent=g?g.emptyScript:"";for(let n=0;n<i;n++)e.append(t[n],M()),q.nextNode(),a.push({type:2,index:++r});e.append(t[i],M())}}}else if(8===e.nodeType)if(e.data===y)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=e.data.indexOf(m,t+1));)a.push({type:7,index:r}),t+=m.length-1}r++}}static createElement(t,i){const n=b.createElement("template");return n.innerHTML=t,n}}function D(t,i,n=t,e){var r,s,o,a;if(i===j)return i;let h=void 0!==e?null===(r=n._$Cl)||void 0===r?void 0:r[e]:n._$Cu;const u=k(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==u&&(null===(s=null==h?void 0:h._$AO)||void 0===s||s.call(h,!1),void 0===u?h=void 0:(h=new u(t),h._$AT(t,n,e)),void 0!==e?(null!==(o=(a=n)._$Cl)&&void 0!==o?o:a._$Cl=[])[e]=h:n._$Cu=h),void 0!==h&&(i=D(t,h._$AS(t,i.values),h,e)),i}class P{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:n},parts:e}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:b).importNode(n,!0);q.currentNode=r;let s=q.nextNode(),o=0,a=0,h=e[0];for(;void 0!==h;){if(o===h.index){let i;2===h.type?i=new H(s,s.nextSibling,this,t):1===h.type?i=new h.ctor(s,h.name,h.strings,this,t):6===h.type&&(i=new J(s,this,t)),this.v.push(i),h=e[++a]}o!==(null==h?void 0:h.index)&&(s=q.nextNode(),o++)}return r}m(t){let i=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,i),i+=n.strings.length-2):n._$AI(t[i])),i++}}class H{constructor(t,i,n,e){var r;this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=n,this.options=e,this._$Cg=null===(r=null==e?void 0:e.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=D(this,t,i),k(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==j&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return N(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.M(t):this.$(t)}A(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==U&&k(this._$AH)?this._$AA.nextSibling.data=t:this.S(b.createTextNode(t)),this._$AH=t}T(t){var i;const{values:n,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=L.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.m(n);else{const t=new P(r,this),i=t.p(this.options);t.m(n),this.S(i),this._$AH=t}}_$AC(t){let i=O.get(t.strings);return void 0===i&&O.set(t.strings,i=new L(t)),i}M(t){N(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let n,e=0;for(const r of t)e===i.length?i.push(n=new H(this.A(M()),this.A(M()),this,this.options)):n=i[e],n._$AI(r),e++;e<i.length&&(this._$AR(n&&n._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class I{constructor(t,i,n,e,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=U}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,n,e){const r=this.strings;let s=!1;if(void 0===r)t=D(this,t,i,0),s=!k(t)||t!==this._$AH&&t!==j,s&&(this._$AH=t);else{const e=t;let o,a;for(t=r[0],o=0;o<r.length-1;o++)a=D(this,e[n+o],i,o),a===j&&(a=this._$AH[o]),s||(s=!k(a)||a!==this._$AH[o]),a===U?t=U:t!==U&&(t+=(null!=a?a:"")+r[o+1]),this._$AH[o]=a}s&&!e&&this.k(t)}k(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class B extends I{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===U?void 0:t}}const V=g?g.emptyScript:"";class X extends I{constructor(){super(...arguments),this.type=4}k(t){t&&t!==U?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class Z extends I{constructor(t,i,n,e,r){super(t,i,n,e,r),this.type=5}_$AI(t,i=this){var n;if((t=null!==(n=D(this,t,i,0))&&void 0!==n?n:U)===j)return;const e=this._$AH,r=t===U&&e!==U||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,s=t!==U&&(e===U||r);r&&this.element.removeEventListener(this.name,this,e),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,i,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const K=window.litHtmlPolyfillSupport; | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
var m;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:p}),(null!==(c=globalThis.reactiveElementVersions)&&void 0!==c?c:globalThis.reactiveElementVersions=[]).push("1.0.2");const y=globalThis.trustedTypes,b=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,$="?"+w,S=`<${$}>`,k=document,x=(t="")=>k.createComment(t),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,z=/>/g,E=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,U=/'/g,M=/"/g,N=/^(?:script|style|textarea)$/i,O=t=>(i,...e)=>({_$litType$:t,strings:i,values:e}),R=O(1),j=O(2),L=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),D=new WeakMap,I=k.createTreeWalker(k,129,null,!1),P=(t,i)=>{const e=t.length-1,s=[];let n,o=2===i?"<svg>":"",r=A;for(let i=0;i<e;i++){const e=t[i];let l,h,c=-1,a=0;for(;a<e.length&&(r.lastIndex=a,h=r.exec(e),null!==h);)a=r.lastIndex,r===A?"!--"===h[1]?r=_:void 0!==h[1]?r=z:void 0!==h[2]?(N.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=E):void 0!==h[3]&&(r=E):r===E?">"===h[0]?(r=null!=n?n:A,c=-1):void 0===h[1]?c=-2:(c=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?E:'"'===h[3]?M:U):r===M||r===U?r=E:r===_||r===z?r=A:(r=E,n=void 0);const d=r===E&&t[i+1].startsWith("/>")?" ":"";o+=r===A?e+S:c>=0?(s.push(l),e.slice(0,c)+"$lit$"+e.slice(c)+w+d):e+w+(-2===c?(s.push(void 0),i):d)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");return[void 0!==b?b.createHTML(l):l,s]};class q{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,c]=P(t,i);if(this.el=q.createElement(h,e),I.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=I.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(w)){const e=c[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?K:"?"===i[1]?W:"@"===i[1]?X:J})}else l.push({type:6,index:n})}for(const i of t)s.removeAttribute(i)}if(N.test(s.tagName)){const t=s.textContent.split(w),i=t.length-1;if(i>0){s.textContent=y?y.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],x()),I.nextNode(),l.push({type:2,index:++n});s.append(t[i],x())}}}else if(8===s.nodeType)if(s.data===$)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(w,t+1));)l.push({type:7,index:n}),t+=w.length-1}n++}}static createElement(t,i){const e=k.createElement("template");return e.innerHTML=t,e}}function B(t,i,e=t,s){var n,o,r,l;if(i===L)return i;let h=void 0!==s?null===(n=e._$Cl)||void 0===n?void 0:n[s]:e._$Cu;const c=T(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==c&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===c?h=void 0:(h=new c(t),h._$AT(t,e,s)),void 0!==s?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=h:e._$Cu=h),void 0!==h&&(i=B(t,h._$AS(t,i.values),h,s)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:s}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:k).importNode(e,!0);I.currentNode=n;let o=I.nextNode(),r=0,l=0,h=s[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new H(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new G(o,this,t)),this.v.push(i),h=s[++l]}r!==(null==h?void 0:h.index)&&(o=I.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class H{constructor(t,i,e,s){var n;this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cg=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=B(this,t,i),T(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==L&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return C(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.M(t):this.$(t)}A(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==F&&T(this._$AH)?this._$AA.nextSibling.data=t:this.S(k.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=q.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new V(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new q(t)),i}M(t){C(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const n of t)s===i.length?i.push(e=new H(this.A(x()),this.A(x()),this,this.options)):e=i[s],e._$AI(n),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class J{constructor(t,i,e,s,n){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const n=this.strings;let o=!1;if(void 0===n)t=B(this,t,i,0),o=!T(t)||t!==this._$AH&&t!==L,o&&(this._$AH=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=B(this,s[e+r],i,r),l===L&&(l=this._$AH[r]),o||(o=!T(l)||l!==this._$AH[r]),l===F?t=F:t!==F&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!s&&this.k(t)}k(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class K extends J{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===F?void 0:t}}const Z=y?y.emptyScript:"";class W extends J{constructor(){super(...arguments),this.type=4}k(t){t&&t!==F?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class X extends J{constructor(t,i,e,s,n){super(t,i,e,s,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=B(this,t,i,0))&&void 0!==e?e:F)===L)return;const s=this._$AH,n=t===F&&s!==F||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==F&&(s===F||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class G{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const Q=window.litHtmlPolyfillSupport; | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
var G,W;null==K||K(L,H),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.0.2");class Y extends d{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const n=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=n.firstChild),n}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,n)=>{var e,r;const s=null!==(e=null==n?void 0:n.renderBefore)&&void 0!==e?e:i;let o=s._$litPart$;if(void 0===o){const t=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;s._$litPart$=o=new H(i.insertBefore(M(),t),t,void 0,null!=n?n:{})}return o._$AI(t),o})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return j}}Y.finalized=!0,Y._$litElement$=!0,null===(G=globalThis.litElementHydrateSupport)||void 0===G||G.call(globalThis,{LitElement:Y});const Q=globalThis.litElementPolyfillSupport;null==Q||Q({LitElement:Y}),(null!==(W=globalThis.litElementVersions)&&void 0!==W?W:globalThis.litElementVersions=[]).push("3.0.2"); | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
var Y,tt;null==Q||Q(q,H),(null!==(m=globalThis.litHtmlVersions)&&void 0!==m?m:globalThis.litHtmlVersions=[]).push("2.0.2");class it extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var s,n;const o=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new H(i.insertBefore(x(),t),t,void 0,null!=e?e:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return L}}it.finalized=!0,it._$litElement$=!0,null===(Y=globalThis.litElementHydrateSupport)||void 0===Y||Y.call(globalThis,{LitElement:it});const et=globalThis.litElementPolyfillSupport;null==et||et({LitElement:it}),(null!==(tt=globalThis.litElementVersions)&&void 0!==tt?tt:globalThis.litElementVersions=[]).push("3.0.2"); | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
const tt=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(n){n.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(n){n.createProperty(i.key,t)}}; | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
const st=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}}; | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/function it(t){return(i,n)=>void 0!==n?((t,i,n)=>{i.constructor.createProperty(n,t)})(t,i,n):tt(t,i) | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/function nt(t){return(i,e)=>void 0!==e?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,e):st(t,i) | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/}function nt(t,i){return null==t||null==i?NaN:t<i?-1:t>i?1:t>=i?0:NaN}function et(t){let i=t,n=t,e=t;function r(t,i,r=0,s=t.length){if(r<s){if(0!==n(i,i))return s;do{const n=r+s>>>1;e(t[n],i)<0?r=n+1:s=n}while(r<s)}return r}return 2!==t.length&&(i=(i,n)=>t(i)-n,n=nt,e=(i,n)=>nt(t(i),n)),{left:r,center:function(t,n,e=0,s=t.length){const o=r(t,n,e,s-1);return o>e&&i(t[o-1],n)>-i(t[o],n)?o-1:o},right:function(t,i,r=0,s=t.length){if(r<s){if(0!==n(i,i))return s;do{const n=r+s>>>1;e(t[n],i)<=0?r=n+1:s=n}while(r<s)}return r}}}const rt=et(nt).right;et((function(t){return null===t?NaN:+t})).center;var st=rt;class ot extends Map{constructor(t,i=ht){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:i}}),null!=t)for(const[i,n]of t)this.set(i,n)}get(t){return super.get(at(this,t))}has(t){return super.has(at(this,t))}set(t,i){return super.set(function({_intern:t,_key:i},n){const e=i(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),i)}delete(t){return super.delete(function({_intern:t,_key:i},n){const e=i(n);return t.has(e)&&(n=t.get(e),t.delete(e)),n}(this,t))}}function at({_intern:t,_key:i},n){const e=i(n);return t.has(e)?t.get(e):n}function ht(t){return null!==t&&"object"==typeof t?t.valueOf():t}var ut=Math.sqrt(50),lt=Math.sqrt(10),ct=Math.sqrt(2);function ft(t,i,n){var e=(i-t)/Math.max(0,n),r=Math.floor(Math.log(e)/Math.LN10),s=e/Math.pow(10,r);return r>=0?(s>=ut?10:s>=lt?5:s>=ct?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(s>=ut?10:s>=lt?5:s>=ct?2:1)}function dt(t,i){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(i).domain(t)}return this}function vt(t,i){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof i?this.interpolator(i):this.range(i)}return this}const gt=Symbol("implicit");function pt(){var t=new ot,i=[],n=[],e=gt;function r(r){let s=t.get(r);if(void 0===s){if(e!==gt)return e;t.set(r,s=i.push(r)-1)}return n[s%n.length]}return r.domain=function(n){if(!arguments.length)return i.slice();i=[],t=new ot;for(const e of n)t.has(e)||t.set(e,i.push(e)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return pt(i,n).unknown(e)},dt.apply(r,arguments),r}function mt(t,i,n){t.prototype=i.prototype=n,n.constructor=t}function yt(t,i){var n=Object.create(t.prototype);for(var e in i)n[e]=i[e];return n}function wt(){}var bt=.7,Mt=1/bt,kt="\\s*([+-]?\\d+)\\s*",Nt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$t="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",St=/^#([0-9a-f]{3,8})$/,xt=new RegExp("^rgb\\("+[kt,kt,kt]+"\\)$"),At=new RegExp("^rgb\\("+[$t,$t,$t]+"\\)$"),Tt=new RegExp("^rgba\\("+[kt,kt,kt,Nt]+"\\)$"),_t=new RegExp("^rgba\\("+[$t,$t,$t,Nt]+"\\)$"),Ct=new RegExp("^hsl\\("+[Nt,$t,$t]+"\\)$"),Et=new RegExp("^hsla\\("+[Nt,$t,$t,Nt]+"\\)$"),zt={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 Rt(){return this.rgb().formatHex()}function jt(){return this.rgb().formatRgb()}function Ut(t){var i,n;return t=(t+"").trim().toLowerCase(),(i=St.exec(t))?(n=i[1].length,i=parseInt(i[1],16),6===n?Ot(i):3===n?new Dt(i>>8&15|i>>4&240,i>>4&15|240&i,(15&i)<<4|15&i,1):8===n?qt(i>>24&255,i>>16&255,i>>8&255,(255&i)/255):4===n?qt(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|240&i,((15&i)<<4|15&i)/255):null):(i=xt.exec(t))?new Dt(i[1],i[2],i[3],1):(i=At.exec(t))?new Dt(255*i[1]/100,255*i[2]/100,255*i[3]/100,1):(i=Tt.exec(t))?qt(i[1],i[2],i[3],i[4]):(i=_t.exec(t))?qt(255*i[1]/100,255*i[2]/100,255*i[3]/100,i[4]):(i=Ct.exec(t))?Bt(i[1],i[2]/100,i[3]/100,1):(i=Et.exec(t))?Bt(i[1],i[2]/100,i[3]/100,i[4]):zt.hasOwnProperty(t)?Ot(zt[t]):"transparent"===t?new Dt(NaN,NaN,NaN,0):null}function Ot(t){return new Dt(t>>16&255,t>>8&255,255&t,1)}function qt(t,i,n,e){return e<=0&&(t=i=n=NaN),new Dt(t,i,n,e)}function Ft(t){return t instanceof wt||(t=Ut(t)),t?new Dt((t=t.rgb()).r,t.g,t.b,t.opacity):new Dt}function Lt(t,i,n,e){return 1===arguments.length?Ft(t):new Dt(t,i,n,null==e?1:e)}function Dt(t,i,n,e){this.r=+t,this.g=+i,this.b=+n,this.opacity=+e}function Pt(){return"#"+It(this.r)+It(this.g)+It(this.b)}function Ht(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function It(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Bt(t,i,n,e){return e<=0?t=i=n=NaN:n<=0||n>=1?t=i=NaN:i<=0&&(t=NaN),new Xt(t,i,n,e)}function Vt(t){if(t instanceof Xt)return new Xt(t.h,t.s,t.l,t.opacity);if(t instanceof wt||(t=Ut(t)),!t)return new Xt;if(t instanceof Xt)return t;var i=(t=t.rgb()).r/255,n=t.g/255,e=t.b/255,r=Math.min(i,n,e),s=Math.max(i,n,e),o=NaN,a=s-r,h=(s+r)/2;return a?(o=i===s?(n-e)/a+6*(n<e):n===s?(e-i)/a+2:(i-n)/a+4,a/=h<.5?s+r:2-s-r,o*=60):a=h>0&&h<1?0:o,new Xt(o,a,h,t.opacity)}function Xt(t,i,n,e){this.h=+t,this.s=+i,this.l=+n,this.opacity=+e}function Zt(t,i,n){return 255*(t<60?i+(n-i)*t/60:t<180?n:t<240?i+(n-i)*(240-t)/60:i)}mt(wt,Ut,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Rt,formatHex:Rt,formatHsl:function(){return Vt(this).formatHsl()},formatRgb:jt,toString:jt}),mt(Dt,Lt,yt(wt,{brighter:function(t){return t=null==t?Mt:Math.pow(Mt,t),new Dt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?bt:Math.pow(bt,t),new Dt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pt,formatHex:Pt,formatRgb:Ht,toString:Ht})),mt(Xt,(function(t,i,n,e){return 1===arguments.length?Vt(t):new Xt(t,i,n,null==e?1:e)}),yt(wt,{brighter:function(t){return t=null==t?Mt:Math.pow(Mt,t),new Xt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?bt:Math.pow(bt,t),new Xt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),i=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*i,r=2*n-e;return new Dt(Zt(t>=240?t-240:t+120,r,e),Zt(t,r,e),Zt(t<120?t+240:t-120,r,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Jt=Math.PI/180,Kt=180/Math.PI,Gt=.96422,Wt=.82521,Yt=4/29,Qt=6/29,ti=3*Qt*Qt;function ii(t){if(t instanceof ni)return new ni(t.l,t.a,t.b,t.opacity);if(t instanceof ui)return li(t);t instanceof Dt||(t=Ft(t));var i,n,e=oi(t.r),r=oi(t.g),s=oi(t.b),o=ei((.2225045*e+.7168786*r+.0606169*s)/1);return e===r&&r===s?i=n=o:(i=ei((.4360747*e+.3850649*r+.1430804*s)/Gt),n=ei((.0139322*e+.0971045*r+.7141733*s)/Wt)),new ni(116*o-16,500*(i-o),200*(o-n),t.opacity)}function ni(t,i,n,e){this.l=+t,this.a=+i,this.b=+n,this.opacity=+e}function ei(t){return t>.008856451679035631?Math.pow(t,1/3):t/ti+Yt}function ri(t){return t>Qt?t*t*t:ti*(t-Yt)}function si(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function oi(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ai(t){if(t instanceof ui)return new ui(t.h,t.c,t.l,t.opacity);if(t instanceof ni||(t=ii(t)),0===t.a&&0===t.b)return new ui(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var i=Math.atan2(t.b,t.a)*Kt;return new ui(i<0?i+360:i,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function hi(t,i,n,e){return 1===arguments.length?ai(t):new ui(t,i,n,null==e?1:e)}function ui(t,i,n,e){this.h=+t,this.c=+i,this.l=+n,this.opacity=+e}function li(t){if(isNaN(t.h))return new ni(t.l,0,0,t.opacity);var i=t.h*Jt;return new ni(t.l,Math.cos(i)*t.c,Math.sin(i)*t.c,t.opacity)}mt(ni,(function(t,i,n,e){return 1===arguments.length?ii(t):new ni(t,i,n,null==e?1:e)}),yt(wt,{brighter:function(t){return new ni(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ni(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,i=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Dt(si(3.1338561*(i=Gt*ri(i))-1.6168667*(t=1*ri(t))-.4906146*(n=Wt*ri(n))),si(-.9787684*i+1.9161415*t+.033454*n),si(.0719453*i-.2289914*t+1.4052427*n),this.opacity)}})),mt(ui,hi,yt(wt,{brighter:function(t){return new ui(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new ui(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return li(this).rgb()}}));var ci=t=>()=>t;function fi(t,i){return function(n){return t+n*i}}function di(t){return 1==(t=+t)?vi:function(i,n){return n-i?function(t,i,n){return t=Math.pow(t,n),i=Math.pow(i,n)-t,n=1/n,function(e){return Math.pow(t+e*i,n)}}(i,n,t):ci(isNaN(i)?n:i)}}function vi(t,i){var n=i-t;return n?fi(t,n):ci(isNaN(t)?i:t)}var gi=function t(i){var n=di(i);function e(t,i){var e=n((t=Lt(t)).r,(i=Lt(i)).r),r=n(t.g,i.g),s=n(t.b,i.b),o=vi(t.opacity,i.opacity);return function(i){return t.r=e(i),t.g=r(i),t.b=s(i),t.opacity=o(i),t+""}}return e.gamma=t,e}(1);function pi(t,i){i||(i=[]);var n,e=t?Math.min(i.length,t.length):0,r=i.slice();return function(s){for(n=0;n<e;++n)r[n]=t[n]*(1-s)+i[n]*s;return r}}function mi(t,i){var n,e=i?i.length:0,r=t?Math.min(e,t.length):0,s=new Array(r),o=new Array(e);for(n=0;n<r;++n)s[n]=$i(t[n],i[n]);for(;n<e;++n)o[n]=i[n];return function(t){for(n=0;n<r;++n)o[n]=s[n](t);return o}}function yi(t,i){var n=new Date;return t=+t,i=+i,function(e){return n.setTime(t*(1-e)+i*e),n}}function wi(t,i){return t=+t,i=+i,function(n){return t*(1-n)+i*n}}function bi(t,i){var n,e={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==i&&"object"==typeof i||(i={}),i)n in t?e[n]=$i(t[n],i[n]):r[n]=i[n];return function(t){for(n in e)r[n]=e[n](t);return r}}var Mi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ki=new RegExp(Mi.source,"g");function Ni(t,i){var n,e,r,s=Mi.lastIndex=ki.lastIndex=0,o=-1,a=[],h=[];for(t+="",i+="";(n=Mi.exec(t))&&(e=ki.exec(i));)(r=e.index)>s&&(r=i.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(e=e[0])?a[o]?a[o]+=e:a[++o]=e:(a[++o]=null,h.push({i:o,x:wi(n,e)})),s=ki.lastIndex;return s<i.length&&(r=i.slice(s),a[o]?a[o]+=r:a[++o]=r),a.length<2?h[0]?function(t){return function(i){return t(i)+""}}(h[0].x):function(t){return function(){return t}}(i):(i=h.length,function(t){for(var n,e=0;e<i;++e)a[(n=h[e]).i]=n.x(t);return a.join("")})}function $i(t,i){var n,e=typeof i;return null==i||"boolean"===e?ci(i):("number"===e?wi:"string"===e?(n=Ut(i))?(i=n,gi):Ni:i instanceof Ut?gi:i instanceof Date?yi:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(i)?pi:Array.isArray(i)?mi:"function"!=typeof i.valueOf&&"function"!=typeof i.toString||isNaN(i)?bi:wi)(t,i)}function Si(t,i){return t=+t,i=+i,function(n){return Math.round(t*(1-n)+i*n)}}var xi=function(t){return function(i,n){var e=t((i=hi(i)).h,(n=hi(n)).h),r=vi(i.c,n.c),s=vi(i.l,n.l),o=vi(i.opacity,n.opacity);return function(t){return i.h=e(t),i.c=r(t),i.l=s(t),i.opacity=o(t),i+""}}}((function(t,i){var n=i-t;return n?fi(t,n>180||n<-180?n-360*Math.round(n/360):n):ci(isNaN(t)?i:t)}));function Ai(t){return+t}var Ti=[0,1];function _i(t){return t}function Ci(t,i){return(i-=t=+t)?function(n){return(n-t)/i}:function(t){return function(){return t}}(isNaN(i)?NaN:.5)}function Ei(t,i,n){var e=t[0],r=t[1],s=i[0],o=i[1];return r<e?(e=Ci(r,e),s=n(o,s)):(e=Ci(e,r),s=n(s,o)),function(t){return s(e(t))}}function zi(t,i,n){var e=Math.min(t.length,i.length)-1,r=new Array(e),s=new Array(e),o=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),i=i.slice().reverse());++o<e;)r[o]=Ci(t[o],t[o+1]),s[o]=n(i[o],i[o+1]);return function(i){var n=st(t,i,1,e)-1;return s[n](r[n](i))}}function Ri(t,i){return i.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ji(){var t,i,n,e,r,s,o=Ti,a=Ti,h=$i,u=_i;function l(){var t=Math.min(o.length,a.length);return u!==_i&&(u=function(t,i){var n;return t>i&&(n=t,t=i,i=n),function(n){return Math.max(t,Math.min(i,n))}}(o[0],o[t-1])),e=t>2?zi:Ei,r=s=null,c}function c(i){return null==i||isNaN(i=+i)?n:(r||(r=e(o.map(t),a,h)))(t(u(i)))}return c.invert=function(n){return u(i((s||(s=e(a,o.map(t),wi)))(n)))},c.domain=function(t){return arguments.length?(o=Array.from(t,Ai),l()):o.slice()},c.range=function(t){return arguments.length?(a=Array.from(t),l()):a.slice()},c.rangeRound=function(t){return a=Array.from(t),h=Si,l()},c.clamp=function(t){return arguments.length?(u=!!t||_i,l()):u!==_i},c.interpolate=function(t){return arguments.length?(h=t,l()):h},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,e){return t=n,i=e,l()}}function Ui(){return ji()(_i,_i)}function Oi(t,i){if((n=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0)return null;var n,e=t.slice(0,n);return[e.length>1?e[0]+e.slice(2):e,+t.slice(n+1)]}function qi(t){return(t=Oi(Math.abs(t)))?t[1]:NaN}var Fi,Li=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Di(t){if(!(i=Li.exec(t)))throw new Error("invalid format: "+t);var i;return new Pi({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}function Pi(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 Hi(t,i){var n=Oi(t,i);if(!n)return t+"";var e=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Di.prototype=Pi.prototype,Pi.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 Ii={"%":(t,i)=>(100*t).toFixed(i),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,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>Hi(100*t,i),r:Hi,s:function(t,i){var n=Oi(t,i);if(!n)return t+"";var e=n[0],r=n[1],s=r-(Fi=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=e.length;return s===o?e:s>o?e+new Array(s-o+1).join("0"):s>0?e.slice(0,s)+"."+e.slice(s):"0."+new Array(1-s).join("0")+Oi(t,Math.max(0,i+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Bi(t){return t}var Vi,Xi,Zi,Ji=Array.prototype.map,Ki=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gi(t){var i,n,e=void 0===t.grouping||void 0===t.thousands?Bi:(i=Ji.call(t.grouping,Number),n=t.thousands+"",function(t,e){for(var r=t.length,s=[],o=0,a=i[0],h=0;r>0&&a>0&&(h+a+1>e&&(a=Math.max(1,e-h)),s.push(t.substring(r-=a,r+a)),!((h+=a+1)>e));)a=i[o=(o+1)%i.length];return s.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Bi:function(t){return function(i){return i.replace(/[0-9]/g,(function(i){return t[+i]}))}}(Ji.call(t.numerals,String)),h=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(t){var i=(t=Di(t)).fill,n=t.align,c=t.sign,f=t.symbol,d=t.zero,v=t.width,g=t.comma,p=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):Ii[y]||(void 0===p&&(p=12),m=!0,y="g"),(d||"0"===i&&"="===n)&&(d=!0,i="0",n="=");var w="$"===f?r:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?s:/[%p]/.test(y)?h:"",M=Ii[y],k=/[defgprs%]/.test(y);function N(t){var r,s,h,f=w,N=b;if("c"===y)N=M(t)+N,t="";else{var $=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:M(Math.abs(t),p),m&&(t=function(t){t:for(var i,n=t.length,e=1,r=-1;e<n;++e)switch(t[e]){case".":r=i=e;break;case"0":0===r&&(r=e),i=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(i+1):t}(t)),$&&0==+t&&"+"!==c&&($=!1),f=($?"("===c?c:u:"-"===c||"("===c?"":c)+f,N=("s"===y?Ki[8+Fi/3]:"")+N+($&&"("===c?")":""),k)for(r=-1,s=t.length;++r<s;)if(48>(h=t.charCodeAt(r))||h>57){N=(46===h?o+t.slice(r+1):t.slice(r))+N,t=t.slice(0,r);break}}g&&!d&&(t=e(t,1/0));var S=f.length+t.length+N.length,x=S<v?new Array(v-S+1).join(i):"";switch(g&&d&&(t=e(x+t,x.length?v-N.length:1/0),x=""),n){case"<":t=f+t+N+x;break;case"=":t=f+x+t+N;break;case"^":t=x.slice(0,S=x.length>>1)+f+t+N+x.slice(S);break;default:t=x+f+t+N}return a(t)}return p=void 0===p?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),N.toString=function(){return t+""},N}return{format:c,formatPrefix:function(t,i){var n=c(((t=Di(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(qi(i)/3))),r=Math.pow(10,-e),s=Ki[8+e/3];return function(t){return n(r*t)+s}}}}function Wi(t,i,n,e){var r,s=function(t,i,n){var e=Math.abs(i-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),s=e/r;return s>=ut?r*=10:s>=lt?r*=5:s>=ct&&(r*=2),i<t?-r:r}(t,i,n);switch((e=Di(null==e?",f":e)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(i));return null!=e.precision||isNaN(r=function(t,i){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qi(i)/3)))-qi(Math.abs(t)))}(s,o))||(e.precision=r),Zi(e,o);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,i){return t=Math.abs(t),i=Math.abs(i)-t,Math.max(0,qi(i)-qi(t))+1}(s,Math.max(Math.abs(t),Math.abs(i))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-qi(Math.abs(t)))}(s))||(e.precision=r-2*("%"===e.type))}return Xi(e)}function Yi(t){var i=t.domain;return t.ticks=function(t){var n=i();return function(t,i,n){var e,r,s,o,a=-1;if(n=+n,(t=+t)==(i=+i)&&n>0)return[t];if((e=i<t)&&(r=t,t=i,i=r),0===(o=ft(t,i,n))||!isFinite(o))return[];if(o>0){let n=Math.round(t/o),e=Math.round(i/o);for(n*o<t&&++n,e*o>i&&--e,s=new Array(r=e-n+1);++a<r;)s[a]=(n+a)*o}else{o=-o;let n=Math.round(t*o),e=Math.round(i*o);for(n/o<t&&++n,e/o>i&&--e,s=new Array(r=e-n+1);++a<r;)s[a]=(n+a)/o}return e&&s.reverse(),s}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var e=i();return Wi(e[0],e[e.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var e,r,s=i(),o=0,a=s.length-1,h=s[o],u=s[a],l=10;for(u<h&&(r=h,h=u,u=r,r=o,o=a,a=r);l-- >0;){if((r=ft(h,u,n))===e)return s[o]=h,s[a]=u,i(s);if(r>0)h=Math.floor(h/r)*r,u=Math.ceil(u/r)*r;else{if(!(r<0))break;h=Math.ceil(h*r)/r,u=Math.floor(u*r)/r}e=r}return t},t}function Qi(){var t=Ui();return t.copy=function(){return Ri(t,Qi())},dt.apply(t,arguments),Yi(t)}function tn(){var t,i=0,n=1,e=1,r=[.5],s=[0,1];function o(i){return null!=i&&i<=i?s[st(r,i,0,e)]:t}function a(){var t=-1;for(r=new Array(e);++t<e;)r[t]=((t+1)*n-(t-e)*i)/(e+1);return o}return o.domain=function(t){return arguments.length?([i,n]=t,i=+i,n=+n,a()):[i,n]},o.range=function(t){return arguments.length?(e=(s=Array.from(t)).length-1,a()):s.slice()},o.invertExtent=function(t){var o=s.indexOf(t);return o<0?[NaN,NaN]:o<1?[i,r[0]]:o>=e?[r[e-1],n]:[r[o-1],r[o]]},o.unknown=function(i){return arguments.length?(t=i,o):o},o.thresholds=function(){return r.slice()},o.copy=function(){return tn().domain([i,n]).range(s).unknown(t)},dt.apply(Yi(o),arguments)}function nn(){var t,i=[.5],n=[0,1],e=1;function r(r){return null!=r&&r<=r?n[st(i,r,0,e)]:t}return r.domain=function(t){return arguments.length?(i=Array.from(t),e=Math.min(i.length,n.length-1),r):i.slice()},r.range=function(t){return arguments.length?(n=Array.from(t),e=Math.min(i.length,n.length-1),r):n.slice()},r.invertExtent=function(t){var e=n.indexOf(t);return[i[e-1],i[e]]},r.unknown=function(i){return arguments.length?(t=i,r):t},r.copy=function(){return nn().domain(i).range(n).unknown(t)},dt.apply(r,arguments)}function en(){var t,i,n,e,r,s=0,o=1,a=_i,h=!1;function u(i){return null==i||isNaN(i=+i)?r:a(0===n?.5:(i=(e(i)-t)*n,h?Math.max(0,Math.min(1,i)):i))}function l(t){return function(i){var n,e;return arguments.length?([n,e]=i,a=t(n,e),u):[a(0),a(1)]}}return u.domain=function(r){return arguments.length?([s,o]=r,t=e(s=+s),i=e(o=+o),n=t===i?0:1/(i-t),u):[s,o]},u.clamp=function(t){return arguments.length?(h=!!t,u):h},u.interpolator=function(t){return arguments.length?(a=t,u):a},u.range=l($i),u.rangeRound=l(Si),u.unknown=function(t){return arguments.length?(r=t,u):r},function(r){return e=r,t=r(s),i=r(o),n=t===i?0:1/(i-t),u}}function rn(t,i){return i.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function sn(){var t=Yi(en()(_i));return t.copy=function(){return rn(t,sn())},vt.apply(t,arguments)}Vi=Gi({thousands:",",grouping:[3],currency:["$",""]}),Xi=Vi.format,Zi=Vi.formatPrefix;class on{constructor(t){this.cle=t}setColorScale(){switch(this.cle.scaleType){case"continuous":this.setContinousColorScale();break;case"discrete":this.setDiscreteColorScale();break;case"threshold":this.setThresholdColorScale();break;case"categorical":this.setCategoricalColorScale();break;default:this.invalidScaleType(this.cle.scaleType)}}setContinousColorScale(){const{interpolator:t,domain:i,range:n}=this.cle;this.colorScale=t?sn(t).domain(i):Qi().range(n).domain(i).interpolate(xi)}setDiscreteColorScale(){this.colorScale=tn().domain(this.cle.domain).range(this.cle.range)}setThresholdColorScale(){const t=this.cle.domain;this.colorScale=nn().domain(t.slice(1,t.length-1)).range(this.cle.range)}setCategoricalColorScale(){this.colorScale=pt().domain(this.cle.domain).range(this.cle.range)}invalidScaleType(t){throw new Error(`invalid property scaletype: ${t}. \n Must be one of "categorical", "continuous", "discrete", "threshold".`)}} | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/}class ot{constructor(t){this.cle=t}setColorScale(){switch(this.cle.scaleType){case"continuous":this.setContinousColorScale();break;case"discrete":this.setDiscreteColorScale();break;case"threshold":this.setThresholdColorScale();break;case"categorical":this.setCategoricalColorScale();break;default:this.invalidScaleType(this.cle.scaleType)}}setContinousColorScale(){const{interpolator:t,domain:s,range:n}=this.cle;this.colorScale=t?i.scaleSequential(t).domain(s):i.scaleLinear().range(n).domain(s).interpolate(e.interpolateHcl)}setDiscreteColorScale(){this.colorScale=i.scaleQuantize().domain(this.cle.domain).range(this.cle.range)}setThresholdColorScale(){const t=this.cle.domain;this.colorScale=i.scaleThreshold().domain(t.slice(1,t.length-1)).range(this.cle.range)}setCategoricalColorScale(){this.colorScale=i.scaleOrdinal().domain(this.cle.domain).range(this.cle.range)}invalidScaleType(t){throw new Error(`invalid property scaletype: ${t}. \n Must be one of "categorical", "continuous", "discrete", "threshold".`)}} | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const an=1,hn=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,n){this._$Ct=t,this._$AM=i,this._$Ci=n}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}} | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const rt=1,lt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}} | ||
/** | ||
* @license | ||
* Copyright 2018 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/{constructor(t){var i;if(super(t),t.type!==an||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var n,e;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(n=this.et)||void 0===n?void 0:n.has(t))&&this.st.add(t);return this.render(i)}const r=t.element.classList;this.st.forEach((t=>{t in i||(r.remove(t),this.st.delete(t))}));for(const t in i){const n=!!i[t];n===this.st.has(t)||(null===(e=this.et)||void 0===e?void 0:e.has(t))||(n?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return j}});class un{constructor(t){this.cle=t}render(){const t=this.cle.titleText?z`<p class="legend-title">${this.cle.titleText}</p>`:"",i={hidden:"categorical"===this.cle.scaleType},n={hidden:"categorical"!==this.cle.scaleType,"categorical-container":!0};return z`<div | ||
* @license | ||
* Copyright 2018 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/{constructor(t){var i;if(super(t),t.type!==rt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var e,s;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.et)||void 0===e?void 0:e.has(t))&&this.st.add(t);return this.render(i)}const n=t.element.classList;this.st.forEach((t=>{t in i||(n.remove(t),this.st.delete(t))}));for(const t in i){const e=!!i[t];e===this.st.has(t)||(null===(s=this.et)||void 0===s?void 0:s.has(t))||(e?(n.add(t),this.st.add(t)):(n.remove(t),this.st.delete(t)))}return L}});class ht{constructor(t){this.cle=t}render(){const t=this.cle.titleText?R`<p class="legend-title">${this.cle.titleText}</p>`:"",i={hidden:"categorical"===this.cle.scaleType},e={hidden:"categorical"!==this.cle.scaleType,"categorical-container":!0};return R`<div | ||
class="cle-container" | ||
@@ -57,3 +57,3 @@ style="width:${this.cle.width}px; height:auto;" | ||
<svg | ||
class=${hn(i)} | ||
class=${lt(i)} | ||
width=${this.cle.width} | ||
@@ -69,26 +69,26 @@ height=${this.cle.height} | ||
</svg> | ||
<ul class=${hn(n)}> | ||
<ul class=${lt(e)}> | ||
${this.renderCategorical()} | ||
</ul> | ||
<slot name="footer"></slot> | ||
</div>`}renderCategorical(){if("categorical"!==this.cle.scaleType)return"";const{markType:t,colorScale:i,domain:n}=this.cle,e={"legend-item":!0,line:"line"===t,circle:"circle"===t};return z`${n.map((t=>z`<li | ||
class=${hn(e)} | ||
</div>`}renderCategorical(){if("categorical"!==this.cle.scaleType)return"";const{markType:t,colorScale:i,domain:e}=this.cle,s={"legend-item":!0,line:"line"===t,circle:"circle"===t};return R`${e.map((t=>R`<li | ||
class=${lt(s)} | ||
style="--color:${i(t)}" | ||
> | ||
${t} | ||
</li>`))}`}renderContinuous(){var t,i;if("continuous"!==this.cle.scaleType||null===this.cle.colorScale)return"";const{colorScale:n,marginTop:e,marginLeft:r,marginRight:s,tickSize:o,width:a,range:h}=this.cle,u=this.cle.marginBottom+o,l=this.cle.height+o,c=(null===(i=(t=n).interpolator)||void 0===i?void 0:i.call(t))||function(t,i){void 0===i&&(i=t,t=$i);for(var n=0,e=i.length-1,r=i[0],s=new Array(e<0?0:e);n<e;)s[n]=t(r,r=i[++n]);return function(t){var i=Math.max(0,Math.min(e-1,Math.floor(t*=e)));return s[i](t-i)}}(xi,h);return R`<image | ||
x=${r} | ||
y=${e} | ||
width=${a-s-r} | ||
height=${l-e-u} | ||
</li>`))}`}renderContinuous(){var t,i;if("continuous"!==this.cle.scaleType||null===this.cle.colorScale)return"";const{colorScale:s,marginTop:n,marginLeft:o,marginRight:r,tickSize:l,width:h,range:c}=this.cle,a=this.cle.marginBottom+l,d=this.cle.height+l,u=(null===(i=(t=s).interpolator)||void 0===i?void 0:i.call(t))||e.piecewise(e.interpolateHcl,c);return j`<image | ||
x=${o} | ||
y=${n} | ||
width=${h-r-o} | ||
height=${d-n-a} | ||
preserveAspectRatio="none" | ||
href=${this.getColorRamp(c).toDataURL()} | ||
></image>`}renderDiscreteThreshold(){if("discrete"!==this.cle.scaleType&&"threshold"!==this.cle.scaleType)return"";const{tickSize:t,marginTop:i,marginLeft:n,colorScale:e,xScale:r}=this.cle,s=this.cle.height+t,o=this.cle.marginBottom+t,a=e.range();return R`${a.map((t=>R`<rect x=${(t=>e.invertExtent(t).map(r)[0]||n)(t)} y=${i} width=${(t=>{let[i,n]=e.invertExtent(t).map(r);return i=i||0,n=n||r.range()[1],n-i})(t)} height=${s-i-o} fill=${t}></rect>`))}`}renderAxis(){if(!this.cle.xScale||"categorical"===this.cle.scaleType)return"";const{ticks:t,tickSize:i,tickFormat:n,tickFormatter:e,tickValues:r,xScale:s,marginTop:o}=this.cle,a=this.cle.height+i,h=this.cle.marginBottom+i,u=(null==r?void 0:r.length)?r:s.ticks.apply(s,[t,n]),l=Math.max(i,0)+3;return R`<g | ||
href=${this.getColorRamp(u).toDataURL()} | ||
></image>`}renderDiscreteThreshold(){if("discrete"!==this.cle.scaleType&&"threshold"!==this.cle.scaleType)return"";const{tickSize:t,marginTop:i,marginLeft:e,colorScale:s,xScale:n}=this.cle,o=this.cle.height+t,r=this.cle.marginBottom+t,l=s.range();return j`${l.map((t=>j`<rect x=${(t=>s.invertExtent(t).map(n)[0]||e)(t)} y=${i} width=${(t=>{let[i,e]=s.invertExtent(t).map(n);return i=i||0,e=e||n.range()[1],e-i})(t)} height=${o-i-r} fill=${t}></rect>`))}`}renderAxis(){if(!this.cle.xScale||"categorical"===this.cle.scaleType)return"";const{ticks:t,tickSize:i,tickFormat:e,tickFormatter:s,tickValues:n,xScale:o,marginTop:r}=this.cle,l=this.cle.height+i,h=this.cle.marginBottom+i,c=(null==n?void 0:n.length)?n:o.ticks.apply(o,[t,e]),a=Math.max(i,0)+3;return j`<g | ||
class="x-axis" | ||
transform="translate(0, ${a-h})" | ||
transform="translate(0, ${l-h})" | ||
text-anchor="middle" | ||
>${u.map((t=>R`<g class="tick" transform='translate(${s(t)},0)'> | ||
<line stroke="currentColor" y2="${i}" y1="${o+h-a}"></line> | ||
<text fill="currentColor" y="${l}" dy="0.71em">${e(t)}</text> | ||
</g>`))}</g>`}getColorRamp(t,i=256){const n=document.createElement("canvas");n.setAttribute("height","1"),n.setAttribute("width",`${i}`);const e=n.getContext("2d");for(let n=0;n<i;n++)e.fillStyle=t(n/(i-1)),e.fillRect(n,0,1,1);return n}}const ln=[0,1],cn=["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],fn=["domain","range","interpolator","scaleType"],dn=["scaleType","ticks","tickSize","tickValues","tickFormat","domain","range","marginLeft","marginRight","marginBottom","marginTop","width","height"];class vn{constructor(t){this.cle=t}setXScale(){const{scaleType:t,marginLeft:i,width:n,marginRight:e}=this.cle;switch(t){case"continuous":this.xScale=Qi().domain(this.cle.domain).range([i,n-e]);break;case"discrete":case"threshold":this.xScale=Qi().domain([this.cle.domain[0],this.cle.domain[this.cle.domain.length-1]]).rangeRound([i,n-e]);break;case"categorical":this.xScale=null;break;default:throw new Error(`Unrecognized scaleType: ${t}`)}}handleAxisTicks(){var t,i,n;const{scaleType:e}=this.cle;if("continuous"!==e&&"categorical"!==e){const[n,e]=this.xScale.domain();this.cle.tickValues=this.cle.tickValues||[n,...(null===(i=null===(t=this.cle.colorScale)||void 0===t?void 0:t.thresholds)||void 0===i?void 0:i.call(t))||this.cle.colorScale.domain(),e]}(null===(n=this.cle.tickFormat)||void 0===n?void 0:n.length)?this.cle.tickFormatter=Xi(this.cle.tickFormat):this.cle.tickFormatter=this.xScale.tickFormat(this.cle.ticks||5,this.cle.tickFormat||".1f")}}const gn=((t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,n,e)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[e+1]),t[0]);return new r(e,n)})` | ||
>${c.map((t=>j`<g class="tick" transform='translate(${o(t)},0)'> | ||
<line stroke="currentColor" y2="${i}" y1="${r+h-l}"></line> | ||
<text fill="currentColor" y="${a}" dy="0.71em">${s(t)}</text> | ||
</g>`))}</g>`}getColorRamp(t,i=256){const e=document.createElement("canvas");e.setAttribute("height","1"),e.setAttribute("width",`${i}`);const s=e.getContext("2d");for(let e=0;e<i;e++)s.fillStyle=t(e/(i-1)),s.fillRect(e,0,1,1);return e}}const ct=[0,1],at=["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],dt=["domain","range","interpolator","scaleType"],ut=["scaleType","ticks","tickSize","tickValues","tickFormat","domain","range","marginLeft","marginRight","marginBottom","marginTop","width","height"];class vt{constructor(t){this.cle=t}setXScale(){const{scaleType:t,marginLeft:e,width:s,marginRight:n}=this.cle;switch(t){case"continuous":this.xScale=i.scaleLinear().domain(this.cle.domain).range([e,s-n]);break;case"discrete":case"threshold":this.xScale=i.scaleLinear().domain([this.cle.domain[0],this.cle.domain[this.cle.domain.length-1]]).rangeRound([e,s-n]);break;case"categorical":this.xScale=null;break;default:throw new Error(`Unrecognized scaleType: ${t}`)}}handleAxisTicks(){var t,i,e;const{scaleType:n}=this.cle;if("continuous"!==n&&"categorical"!==n){const[e,s]=this.xScale.domain();this.cle.tickValues=this.cle.tickValues||[e,...(null===(i=null===(t=this.cle.colorScale)||void 0===t?void 0:t.thresholds)||void 0===i?void 0:i.call(t))||this.cle.colorScale.domain(),s]}(null===(e=this.cle.tickFormat)||void 0===e?void 0:e.length)?this.cle.tickFormatter=s.format(this.cle.tickFormat):this.cle.tickFormatter=this.xScale.tickFormat(this.cle.ticks||5,this.cle.tickFormat||".1f")}}const ft=((t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,e,s)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[s+1]),t[0]);return new l(e,o)})` | ||
:host { | ||
@@ -187,8 +187,8 @@ --cle-font-family: sans-serif; | ||
} | ||
`;var pn=function(t,i,n,e){for(var r,s=arguments.length,o=s<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,n):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(i,n,o):r(i,n))||o);return s>3&&o&&Object.defineProperty(i,n,o),o};t.ColorLegendElement=class extends Y{constructor(){super(...arguments),this.titleText="Color Legend Element",this.width=325,this.height=32,this.marginTop=6,this.marginRight=12,this.marginBottom=16,this.marginLeft=12,this.scaleType="continuous",this.domain=ln,this.range=cn,this.markType="circle",this.ticks=5,this.tickFormat=".1f",this.tickSize=6,this.tickValues=null,this.colorScaleSetter=new on(this),this.axisTickSetter=new vn(this),this.renderer=new un(this)}get interpolator(){return this._interpolator}set interpolator(t){if("function"!=typeof t)throw new Error("interpolator must be a function.");{const i=this.interpolator;this._interpolator=t,this.requestUpdate("interpolator",i)}}get tickFormatter(){return this._tickFormatter}set tickFormatter(t){if("function"!=typeof t)throw new Error("tickFormatter must be a function.");{const i=this.tickFormatter;this._tickFormatter=t,this.requestUpdate("tickFormatter",i)}}get colorScale(){return this.colorScaleSetter.colorScale}get xScale(){return this.axisTickSetter.xScale}render(){return this.renderer.render()}willUpdate(t){fn.some((i=>t.has(i)))&&this.colorScaleSetter.setColorScale(),dn.some((i=>t.has(i)))&&(this.axisTickSetter.setXScale(),this.axisTickSetter.handleAxisTicks())}},t.ColorLegendElement.styles=[gn],pn([it({type:String})],t.ColorLegendElement.prototype,"titleText",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"width",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"height",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"marginTop",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"marginRight",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"marginBottom",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"marginLeft",void 0),pn([it({type:String})],t.ColorLegendElement.prototype,"scaleType",void 0),pn([it({type:Array})],t.ColorLegendElement.prototype,"domain",void 0),pn([it({type:Array})],t.ColorLegendElement.prototype,"range",void 0),pn([it({type:String})],t.ColorLegendElement.prototype,"markType",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"ticks",void 0),pn([it({type:String})],t.ColorLegendElement.prototype,"tickFormat",void 0),pn([it({type:Number})],t.ColorLegendElement.prototype,"tickSize",void 0),pn([it({type:Array})],t.ColorLegendElement.prototype,"tickValues",void 0),pn([ | ||
`;var gt=function(t,i,e,s){for(var n,o=arguments.length,r=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};t.ColorLegendElement=class extends it{constructor(){super(...arguments),this.titleText="Color Legend Element",this.width=325,this.height=32,this.marginTop=6,this.marginRight=12,this.marginBottom=16,this.marginLeft=12,this.scaleType="continuous",this.domain=ct,this.range=at,this.markType="circle",this.ticks=5,this.tickFormat=".1f",this.tickSize=6,this.tickValues=null,this.colorScaleSetter=new ot(this),this.axisTickSetter=new vt(this),this.renderer=new ht(this)}get interpolator(){return this._interpolator}set interpolator(t){if("function"!=typeof t)throw new Error("interpolator must be a function.");{const i=this.interpolator;this._interpolator=t,this.requestUpdate("interpolator",i)}}get tickFormatter(){return this._tickFormatter}set tickFormatter(t){if("function"!=typeof t)throw new Error("tickFormatter must be a function.");{const i=this.tickFormatter;this._tickFormatter=t,this.requestUpdate("tickFormatter",i)}}get colorScale(){return this.colorScaleSetter.colorScale}get xScale(){return this.axisTickSetter.xScale}render(){return this.renderer.render()}willUpdate(t){dt.some((i=>t.has(i)))&&this.colorScaleSetter.setColorScale(),ut.some((i=>t.has(i)))&&(this.axisTickSetter.setXScale(),this.axisTickSetter.handleAxisTicks())}},t.ColorLegendElement.styles=[ft],gt([nt({type:String})],t.ColorLegendElement.prototype,"titleText",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"width",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"height",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"marginTop",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"marginRight",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"marginBottom",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"marginLeft",void 0),gt([nt({type:String})],t.ColorLegendElement.prototype,"scaleType",void 0),gt([nt({type:Array})],t.ColorLegendElement.prototype,"domain",void 0),gt([nt({type:Array})],t.ColorLegendElement.prototype,"range",void 0),gt([nt({type:String})],t.ColorLegendElement.prototype,"markType",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"ticks",void 0),gt([nt({type:String})],t.ColorLegendElement.prototype,"tickFormat",void 0),gt([nt({type:Number})],t.ColorLegendElement.prototype,"tickSize",void 0),gt([nt({type:Array})],t.ColorLegendElement.prototype,"tickValues",void 0),gt([ | ||
/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
function(t,i){return(({finisher:t,descriptor:i})=>(n,e)=>{var r;if(void 0===e){const e=null!==(r=n.originalKey)&&void 0!==r?r:n.key,s=null!=i?{kind:"method",placement:"prototype",key:e,descriptor:i(n.key)}:{...n,key:e};return null!=t&&(s.finisher=function(i){t(i,e)}),s}{const r=n.constructor;void 0!==i&&Object.defineProperty(n,e,i(e)),null==t||t(r,e)}})({descriptor:n=>{const e={get(){var i,n;return null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof n?Symbol():"__"+n;e.get=function(){var n,e;return void 0===this[i]&&(this[i]=null!==(e=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(t))&&void 0!==e?e:null),this[i]}}return e}})}("svg")],t.ColorLegendElement.prototype,"svg",void 0),pn([it({attribute:!1})],t.ColorLegendElement.prototype,"interpolator",null),pn([it({attribute:!1})],t.ColorLegendElement.prototype,"tickFormatter",null),t.ColorLegendElement=pn([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:n,elements:e}=i;return{kind:n,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("color-legend")],t.ColorLegendElement),Object.defineProperty(t,"t",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self)["color-legend-element"]={}); | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
function(t,i){return(({finisher:t,descriptor:i})=>(e,s)=>{var n;if(void 0===s){const s=null!==(n=e.originalKey)&&void 0!==n?n:e.key,o=null!=i?{kind:"method",placement:"prototype",key:s,descriptor:i(e.key)}:{...e,key:s};return null!=t&&(o.finisher=function(i){t(i,s)}),o}{const n=e.constructor;void 0!==i&&Object.defineProperty(e,s,i(s)),null==t||t(n,s)}})({descriptor:e=>{const s={get(){var i,e;return null!==(e=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==e?e:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof e?Symbol():"__"+e;s.get=function(){var e,s;return void 0===this[i]&&(this[i]=null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==s?s:null),this[i]}}return s}})}("svg")],t.ColorLegendElement.prototype,"svg",void 0),gt([nt({attribute:!1})],t.ColorLegendElement.prototype,"interpolator",null),gt([nt({attribute:!1})],t.ColorLegendElement.prototype,"tickFormatter",null),t.ColorLegendElement=gt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:e,elements:s}=i;return{kind:e,elements:s,finisher(i){window.customElements.define(t,i)}}})(t,i))("color-legend")],t.ColorLegendElement),Object.defineProperty(t,"t",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("d3-scale"),require("d3-interpolate"),require("d3-format")):"function"==typeof define&&define.amd?define(["exports","d3-scale","d3-interpolate","d3-format"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self)["color-legend-element"]={},t.d3,t.d3,t.d3); |
{ | ||
"name": "color-legend-element", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A custom element (web component) suitable for use as a legend in data visualizations", | ||
"main": "index.js", | ||
"main": "build/color-legend-element.umd.js", | ||
"module": "index.js", | ||
@@ -7,0 +7,0 @@ "type": "module", |
@@ -18,3 +18,3 @@ # Color Legend Element | ||
- Framework and bundler not required, just add a `<script>` tag and use it! | ||
- [Small bundle size](https://bundlephobia.com/package/color-legend-element) (52kb minified and 18kb gzipped) | ||
- [Small bundle size](https://bundlephobia.com/package/color-legend-element) (28kb minified and 9kb gzipped) | ||
@@ -229,2 +229,4 @@ ## Installation | ||
Then open your browser to `localhost:8080` to view the site. | ||
### Updating the custom-elements.json | ||
@@ -231,0 +233,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
251
120020
25
1720
1