@decidables/decidables-elements 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +54 -0
- package/gulpfile.js +25 -0
- package/lib/decidablesElements.esm.js +4889 -0
- package/lib/decidablesElements.esm.js.map +1 -0
- package/lib/decidablesElements.esm.min.js +13 -0
- package/lib/decidablesElements.esm.min.js.map +1 -0
- package/lib/decidablesElements.umd.js +4907 -0
- package/lib/decidablesElements.umd.js.map +1 -0
- package/lib/decidablesElements.umd.min.js +13 -0
- package/lib/decidablesElements.umd.min.js.map +1 -0
- package/package.json +46 -0
- package/src/button.js +93 -0
- package/src/converter-array.js +15 -0
- package/src/converter-set.js +15 -0
- package/src/decidables-element.js +264 -0
- package/src/index.js +11 -0
- package/src/slider.js +333 -0
- package/src/spinner.js +149 -0
- package/src/switch.js +179 -0
- package/src/toggle-option.js +163 -0
- package/src/toggle.js +58 -0
- package/test/button.test.js +29 -0
- package/test/converter-array.test.js +14 -0
- package/test/converter-set.test.js +15 -0
- package/test/coverage/lcov-report/base.css +224 -0
- package/test/coverage/lcov-report/block-navigation.js +87 -0
- package/test/coverage/lcov-report/button.js.html +364 -0
- package/test/coverage/lcov-report/converter-array.js.html +130 -0
- package/test/coverage/lcov-report/converter-set.js.html +130 -0
- package/test/coverage/lcov-report/decidables-element.js.html +877 -0
- package/test/coverage/lcov-report/favicon.png +0 -0
- package/test/coverage/lcov-report/index.html +236 -0
- package/test/coverage/lcov-report/prettify.css +1 -0
- package/test/coverage/lcov-report/prettify.js +2 -0
- package/test/coverage/lcov-report/slider.js.html +1084 -0
- package/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/test/coverage/lcov-report/sorter.js +196 -0
- package/test/coverage/lcov-report/spinner.js.html +532 -0
- package/test/coverage/lcov-report/switch.js.html +622 -0
- package/test/coverage/lcov-report/toggle-option.js.html +574 -0
- package/test/coverage/lcov-report/toggle.js.html +259 -0
- package/test/coverage/lcov.info +1480 -0
- package/test/decidables-element.test.js +10 -0
- package/test/slider.test.js +64 -0
- package/test/spinner.test.js +55 -0
- package/test/switch.test.js +71 -0
- package/test/toggle-option.test.js +62 -0
- package/test/toggle.test.js +98 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e,n){return c=u()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&l(i,n.prototype),i},c.apply(null,arguments)}function h(t){var e="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return c(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,t)},h(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function p(t){var e=u();return function(){var n,r=s(t);if(e){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function y(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=y(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(this,arguments)}function b(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||w(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function x(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=w(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2019 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/var k,A,$=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,E=Symbol(),S=new Map,R=function(){function t(e,r){if(n(this,t),this._$cssResult$=!0,r!==E)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}return i(t,[{key:"styleSheet",get:function(){var t=S.get(this.cssText);return $&&void 0===t&&(S.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}},{key:"toString",value:function(){return this.cssText}}]),t}(),C=function(t){return new R("string"==typeof t?t:t+"",E)},N=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=1===t.length?t[0]:n.reduce((function(e,n,r){return e+function(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[r+1]}),t[0]);return new R(i,E)},P=$?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=x(t.cssRules);try{for(r.s();!(e=r.n()).done;){n+=e.value.cssText}}catch(t){r.e(t)}finally{r.f()}return C(n)}(t):t},O=window.trustedTypes,M=O?O.emptyScript:"",U=window.reactiveElementPolyfillSupport,T={toAttribute:function(t,e){switch(e){case Boolean:t=t?M:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){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}},B=function(t,e){return e!==t&&(e==e||t==t)},H={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:B},j=function(r){a(u,h(HTMLElement));var o,s,l=p(u);function u(){var t;return n(this,u),(t=l.call(this))._$Et=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Ei=null,t.o(),t}return i(u,[{key:"o",value:function(){var t,e=this;this._$Ep=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}},{key:"_$Em",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Et.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){$?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ES",value:function(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:H,o=this.constructor._$Eh(t,i);if(void 0!==o&&!0===i.reflect){var a=(null!==(r=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:T.toAttribute)(e,i.type);this._$Ei=t,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$Ei=null}}},{key:"_$AK",value:function(t,e){var n,r,i,o=this.constructor,a=o._$Eu.get(t);if(void 0!==a&&this._$Ei!==a){var s=o.getPropertyOptions(a),l=s.converter,u=null!==(i=null!==(r=null===(n=l)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof l?l:null)&&void 0!==i?i:T.fromAttribute;this._$Ei=a,this[a]=u(e,s.type),this._$Ei=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||B)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}},{key:"_$EC",value:(o=regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Ep;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),s=function(){var t=this,n=arguments;return new Promise((function(r,i){var a=o.apply(t,n);function s(t){e(a,r,i,s,l,"next",t)}function l(t){e(a,r,i,s,l,"throw",t)}s(void 0)}))},function(){return s.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Et&&(this._$Et.forEach((function(t,n){return e[n]=t})),this._$Et=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$EU()}catch(t){throw n=!1,this._$EU(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EU",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Ep}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$E_&&(this._$E_.forEach((function(t,n){return e._$ES(n,e[n],t)})),this._$E_=void 0),this._$EU()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var i=t._$Eh(r,n);void 0!==i&&(t._$Eu.set(i,r),e.push(i))})),e}},{key:"createProperty",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H;if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(e,n),!n.noAccessor&&!this.prototype.hasOwnProperty(e)){var r="symbol"==t(e)?Symbol():"__"+e,i=this.getPropertyDescriptor(e,r,n);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||H}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=x([].concat(g(Object.getOwnPropertyNames(n)),g(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var i=e.value;this.createProperty(i,n[i])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=x(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var i=n.value;e.unshift(P(i))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(P(t));return e}},{key:"_$Eh",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),u}();j.finalized=!0,j.elementProperties=new Map,j.elementStyles=[],j.shadowRootOptions={mode:"open"},null==U||U({ReactiveElement:j}),(null!==(k=globalThis.reactiveElementVersions)&&void 0!==k?k:globalThis.reactiveElementVersions=[]).push("1.1.2");var z=globalThis.trustedTypes,I=z?z.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,q="lit$".concat((Math.random()+"").slice(9),"$"),D="?"+q,L="<".concat(D,">"),F=document,V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return F.createComment(t)},X=function(e){return null===e||"object"!=t(e)&&"function"!=typeof e},Y=Array.isArray,K=function(t){var e;return Y(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,J=/>/g,Z=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,Q=/'/g,tt=/"/g,et=/^(?:script|style|textarea)$/i,nt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return{_$litType$:t,strings:e,values:r}}},rt=nt(1),it=nt(2),ot=Symbol.for("lit-noChange"),at=Symbol.for("lit-nothing"),st=new WeakMap,lt=F.createTreeWalker(F,129,null,!1),ut=function(t,e){for(var n,r=t.length-1,i=[],o=2===e?"<svg>":"",a=G,s=0;s<r;s++){for(var l=t[s],u=void 0,c=void 0,h=-1,d=0;d<l.length&&(a.lastIndex=d,null!==(c=a.exec(l)));)d=a.lastIndex,a===G?"!--"===c[1]?a=W:void 0!==c[1]?a=J:void 0!==c[2]?(et.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Z):void 0!==c[3]&&(a=Z):a===Z?">"===c[0]?(a=null!=n?n:G,h=-1):void 0===c[1]?h=-2:(h=a.lastIndex-c[2].length,u=c[1],a=void 0===c[3]?Z:'"'===c[3]?tt:Q):a===tt||a===Q?a=Z:a===W||a===J?a=G:(a=Z,n=void 0);var f=a===Z&&t[s+1].startsWith("/>")?" ":"";o+=a===G?l+L:h>=0?(i.push(u),l.slice(0,h)+"$lit$"+l.slice(h)+q+f):l+q+(-2===h?(i.push(void 0),s):f)}var p=o+(t[r]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==I?I.createHTML(p):p,i]},ct=function(){function t(e,r){var i,o=e.strings,a=e._$litType$;n(this,t),this.parts=[];var s=0,l=0,u=o.length-1,c=this.parts,h=m(ut(o,a),2),d=h[0],f=h[1];if(this.el=t.createElement(d,r),lt.currentNode=this.el.content,2===a){var p=this.el.content,y=p.firstChild;y.remove(),p.append.apply(p,g(y.childNodes))}for(;null!==(i=lt.nextNode())&&c.length<u;){if(1===i.nodeType){if(i.hasAttributes()){var v,b=[],w=x(i.getAttributeNames());try{for(w.s();!(v=w.n()).done;){var _=v.value;if(_.endsWith("$lit$")||_.startsWith(q)){var k=f[l++];if(b.push(_),void 0!==k){var A=i.getAttribute(k.toLowerCase()+"$lit$").split(q),$=/([.?@])?(.*)/.exec(k);c.push({type:1,index:s,name:$[2],strings:A,ctor:"."===$[1]?bt:"?"===$[1]?gt:"@"===$[1]?wt:vt})}else c.push({type:6,index:s})}}}catch(t){w.e(t)}finally{w.f()}for(var E=0,S=b;E<S.length;E++){var R=S[E];i.removeAttribute(R)}}if(et.test(i.tagName)){var C=i.textContent.split(q),N=C.length-1;if(N>0){i.textContent=z?z.emptyScript:"";for(var P=0;P<N;P++)i.append(C[P],V()),lt.nextNode(),c.push({type:2,index:++s});i.append(C[N],V())}}}else if(8===i.nodeType)if(i.data===D)c.push({type:2,index:s});else for(var O=-1;-1!==(O=i.data.indexOf(q,O+1));)c.push({type:7,index:s}),O+=q.length-1;s++}}return i(t,null,[{key:"createElement",value:function(t,e){var n=F.createElement("template");return n.innerHTML=t,n}}]),t}();function ht(t,e){var n,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===ot)return e;var l=void 0!==s?null===(n=a._$Cl)||void 0===n?void 0:n[s]:a._$Cu,u=X(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===u?l=void 0:(l=new u(t))._$AT(t,a,s),void 0!==s?(null!==(i=(o=a)._$Cl)&&void 0!==i?i:o._$Cl=[])[s]=l:a._$Cu=l),void 0!==l&&(e=ht(t,l._$AS(t,e.values),l,s)),e}var dt,ft,pt=function(){function t(e,r){n(this,t),this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=r}return i(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:F).importNode(r,!0);lt.currentNode=o;for(var a=lt.nextNode(),s=0,l=0,u=i[0];void 0!==u;){if(s===u.index){var c=void 0;2===u.type?c=new yt(a,a.nextSibling,this,t):1===u.type?c=new u.ctor(a,u.name,u.strings,this,t):6===u.type&&(c=new _t(a,this,t)),this.v.push(c),u=i[++l]}s!==(null==u?void 0:u.index)&&(a=lt.nextNode(),s++)}return o}},{key:"m",value:function(t){var e,n=0,r=x(this.v);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),yt=function(){function t(e,r,i,o){var a;n(this,t),this.type=2,this._$AH=at,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=o,this._$Cg=null===(a=null==o?void 0:o.isConnected)||void 0===a||a}return i(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;t=ht(this,t,e),X(t)?t===at||null==t||""===t?(this._$AH!==at&&this._$AR(),this._$AH=at):t!==this._$AH&&t!==ot&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):K(t)?this.A(t):this.$(t)}},{key:"M",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(t,e)}},{key:"S",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}},{key:"$",value:function(t){this._$AH!==at&&X(this._$AH)?this._$AA.nextSibling.data=t:this.S(F.createTextNode(t)),this._$AH=t}},{key:"T",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=ct.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.m(n);else{var o=new pt(i,this),a=o.p(this.options);o.m(n),this.S(a),this._$AH=o}}},{key:"_$AC",value:function(t){var e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new ct(t)),e}},{key:"A",value:function(e){Y(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,o=0,a=x(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;o===i.length?i.push(n=new t(this.M(V()),this.M(V()),this,this.options)):n=i[o],n._$AI(s),o++}}catch(t){a.e(t)}finally{a.f()}o<i.length&&(this._$AR(n&&n._$AB.nextSibling,o),i.length=o)}},{key:"_$AR",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),vt=function(){function t(e,r,i,o,a){n(this,t),this.type=1,this._$AH=at,this._$AN=void 0,this.element=e,this.name=r,this._$AM=o,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=at}return i(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,o=!1;if(void 0===i)t=ht(this,t,e,0),(o=!X(t)||t!==this._$AH&&t!==ot)&&(this._$AH=t);else{var a,s,l=t;for(t=i[0],a=0;a<i.length-1;a++)(s=ht(this,l[n+a],e,a))===ot&&(s=this._$AH[a]),o||(o=!X(s)||s!==this._$AH[a]),s===at?t=at:t!==at&&(t+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.k(t)}},{key:"k",value:function(t){t===at?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}]),t}(),bt=function(t){a(r,vt);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).type=3,t}return i(r,[{key:"k",value:function(t){this.element[this.name]=t===at?void 0:t}}]),r}(),mt=z?z.emptyScript:"",gt=function(t){a(r,vt);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).type=4,t}return i(r,[{key:"k",value:function(t){t&&t!==at?this.element.setAttribute(this.name,mt):this.element.removeAttribute(this.name)}}]),r}(),wt=function(t){a(r,vt);var e=p(r);function r(t,i,o,a,s){var l;return n(this,r),(l=e.call(this,t,i,o,a,s)).type=5,l}return i(r,[{key:"_$AI",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;if((t=null!==(e=ht(this,t,n,0))&&void 0!==e?e:at)!==ot){var r=this._$AH,i=t===at&&r!==at||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==at&&(r===at||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),r}(),_t=function(){function t(e,r,i){n(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}return i(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){ht(this,t)}}]),t}(),xt=window.litHtmlPolyfillSupport;null==xt||xt(ct,yt),(null!==(A=globalThis.litHtmlVersions)&&void 0!==A?A:globalThis.litHtmlVersions=[]).push("2.1.1");var kt=function(t){a(r,j);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).renderOptions={host:d(t)},t._$Dt=void 0,t}return i(r,[{key:"createRenderRoot",value:function(){var t,e,n=v(s(r.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),v(s(r.prototype),"update",this).call(this,t),this._$Dt=function(t,e,n){var r,i,o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,a=o._$litPart$;if(void 0===a){var s=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=a=new yt(e.insertBefore(V(),s),s,void 0,null!=n?n:{})}return a._$AI(t),a}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;v(s(r.prototype),"connectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;v(s(r.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return ot}}]),r}();kt.finalized=!0,kt._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:kt});var At=globalThis.litElementPolyfillSupport;null==At||At({LitElement:kt}),(null!==(ft=globalThis.litElementVersions)&&void 0!==ft?ft:globalThis.litElementVersions=[]).push("3.1.1");var $t={value:function(){}};function Et(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new St(r)}function St(t){this._=t}function Rt(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Ct(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Nt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=$t,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}St.prototype=Et.prototype={constructor:St,on:function(t,e){var n,r=this._,i=Rt(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Nt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Nt(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Ct(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new St(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Pt="http://www.w3.org/1999/xhtml",Ot={svg:"http://www.w3.org/2000/svg",xhtml:Pt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mt(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ot.hasOwnProperty(e)?{space:Ot[e],local:t}:t}function Ut(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Pt&&e.documentElement.namespaceURI===Pt?e.createElement(t):e.createElementNS(n,t)}}function Tt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Bt(t){var e=Mt(t);return(e.local?Tt:Ut)(e)}function Ht(){}function jt(t){return null==t?Ht:function(){return this.querySelector(t)}}function zt(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function It(){return[]}function qt(t){return null==t?It:function(){return this.querySelectorAll(t)}}function Dt(t){return function(){return this.matches(t)}}function Lt(t){return function(e){return e.matches(t)}}var Ft=Array.prototype.find;function Vt(){return this.firstElementChild}var Xt=Array.prototype.filter;function Yt(){return Array.from(this.children)}function Kt(t){return new Array(t.length)}function Gt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Wt(t){return function(){return t}}function Jt(t,e,n,r,i,o){for(var a,s=0,l=e.length,u=o.length;s<u;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Gt(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function Zt(t,e,n,r,i,o,a){var s,l,u,c=new Map,h=e.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=u=a.call(l,l.__data__,s,e)+"",c.has(u)?i[s]=l:c.set(u,l));for(s=0;s<d;++s)u=a.call(t,o[s],s,o)+"",(l=c.get(u))?(r[s]=l,l.__data__=o[s],c.delete(u)):n[s]=new Gt(t,o[s]);for(s=0;s<h;++s)(l=e[s])&&c.get(f[s])===l&&(i[s]=l)}function Qt(t){return t.__data__}function te(e){return"object"===t(e)&&"length"in e?e:Array.from(e)}function ee(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ne(t){return function(){this.removeAttribute(t)}}function re(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ie(t,e){return function(){this.setAttribute(t,e)}}function oe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ae(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function se(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function le(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ue(t){return function(){this.style.removeProperty(t)}}function ce(t,e,n){return function(){this.style.setProperty(t,e,n)}}function he(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function de(t,e){return t.style.getPropertyValue(e)||le(t).getComputedStyle(t,null).getPropertyValue(e)}function fe(t){return function(){delete this[t]}}function pe(t,e){return function(){this[t]=e}}function ye(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ve(t){return t.trim().split(/^|\s+/)}function be(t){return t.classList||new me(t)}function me(t){this._node=t,this._names=ve(t.getAttribute("class")||"")}function ge(t,e){for(var n=be(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function we(t,e){for(var n=be(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function _e(t){return function(){ge(this,t)}}function xe(t){return function(){we(this,t)}}function ke(t,e){return function(){(e.apply(this,arguments)?ge:we)(this,t)}}function Ae(){this.textContent=""}function $e(t){return function(){this.textContent=t}}function Ee(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Se(){this.innerHTML=""}function Re(t){return function(){this.innerHTML=t}}function Ce(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ne(){this.nextSibling&&this.parentNode.appendChild(this)}function Pe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Oe(){return null}function Me(){var t=this.parentNode;t&&t.removeChild(this)}function Ue(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Te(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Be(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function He(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function je(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function ze(t,e,n){var r=le(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Ie(t,e){return function(){return ze(this,t,e)}}function qe(t,e){return function(){return ze(this,t,e.apply(this,arguments))}}Gt.prototype={constructor:Gt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},me.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var De=regeneratorRuntime.mark(Le);function Le(){var t,e,n,r,i,o,a;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e<n)){s.next=13;break}r=t[e],i=0,o=r.length;case 3:if(!(i<o)){s.next=10;break}if(!(a=r[i])){s.next=7;break}return s.next=7,a;case 7:++i,s.next=3;break;case 10:++e,s.next=1;break;case 13:case"end":return s.stop()}}),De,this)}var Fe=[null];function Ve(t,e){this._groups=t,this._parents=e}function Xe(){return new Ve([[document.documentElement]],Fe)}function Ye(t){return"string"==typeof t?new Ve([[document.querySelector(t)]],[document.documentElement]):new Ve([[t]],Fe)}function Ke(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ge(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function We(){}Ve.prototype=Xe.prototype=o({constructor:Ve,select:function(t){"function"!=typeof t&&(t=jt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],l=s.length,u=r[i]=new Array(l),c=0;c<l;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),u[c]=a);return new Ve(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return zt(t.apply(this,arguments))}}(t):qt(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],l=s.length,u=0;u<l;++u)(a=s[u])&&(r.push(t.call(a,a.__data__,u,s)),i.push(a));return new Ve(r,i)},selectChild:function(t){return this.select(null==t?Vt:function(t){return function(){return Ft.call(this.children,t)}}("function"==typeof t?t:Lt(t)))},selectChildren:function(t){return this.selectAll(null==t?Yt:function(t){return function(){return Xt.call(this.children,t)}}("function"==typeof t?t:Lt(t)))},filter:function(t){"function"!=typeof t&&(t=Dt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Ve(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Qt);var n=e?Zt:Jt,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Wt(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],d=h.length,f=te(t.call(c,c&&c.__data__,u,r)),p=f.length,y=s[u]=new Array(p),v=a[u]=new Array(p),b=l[u]=new Array(d);n(c,h,y,v,b,f,e);for(var m,g,w=0,_=0;w<p;++w)if(m=y[w]){for(w>=_&&(_=w+1);!(g=v[_])&&++_<p;);m._next=g||null}}return(a=new Ve(a,r))._enter=s,a._exit=l,a},enter:function(){return new Ve(this._enter||this._groups.map(Kt),this._parents)},exit:function(){return new Ve(this._exit||this._groups.map(Kt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u,c=n[l],h=r[l],d=c.length,f=s[l]=new Array(d),p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<i;++l)s[l]=n[l];return new Ve(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ee);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,u=i[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(e)}return new Ve(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t,e=0,n=x(this);try{for(n.s();!(t=n.n()).done;){t.value;++e}}catch(t){n.e(t)}finally{n.f()}return e},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Mt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?re:ne:"function"==typeof e?n.local?se:ae:n.local?oe:ie)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ue:"function"==typeof e?he:ce)(t,e,null==n?"":n)):de(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?fe:"function"==typeof e?ye:pe)(t,e)):this.node()[t]},classed:function(t,e){var n=ve(t+"");if(arguments.length<2){for(var r=be(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ke:e?_e:xe)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ae:("function"==typeof t?Ee:$e)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Se:("function"==typeof t?Ce:Re)(t)):this.node().innerHTML},raise:function(){return this.each(Ne)},lower:function(){return this.each(Pe)},append:function(t){var e="function"==typeof t?t:Bt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Bt(t),r=null==e?Oe:"function"==typeof e?e:jt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Me)},clone:function(t){return this.select(t?Te:Ue)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Be(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?je:He,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?qe:Ie)(t,e))}},Symbol.iterator,Le);var Je=1/.7,Ze="\\s*([+-]?\\d+)\\s*",Qe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",en=/^#([0-9a-f]{3,8})$/,nn=new RegExp("^rgb\\("+[Ze,Ze,Ze]+"\\)$"),rn=new RegExp("^rgb\\("+[tn,tn,tn]+"\\)$"),on=new RegExp("^rgba\\("+[Ze,Ze,Ze,Qe]+"\\)$"),an=new RegExp("^rgba\\("+[tn,tn,tn,Qe]+"\\)$"),sn=new RegExp("^hsl\\("+[Qe,tn,tn]+"\\)$"),ln=new RegExp("^hsla\\("+[Qe,tn,tn,Qe]+"\\)$"),un={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 cn(){return this.rgb().formatHex()}function hn(){return this.rgb().formatRgb()}function dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=en.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?fn(e):3===n?new bn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?pn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?pn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=nn.exec(t))?new bn(e[1],e[2],e[3],1):(e=rn.exec(t))?new bn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=on.exec(t))?pn(e[1],e[2],e[3],e[4]):(e=an.exec(t))?pn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=sn.exec(t))?_n(e[1],e[2]/100,e[3]/100,1):(e=ln.exec(t))?_n(e[1],e[2]/100,e[3]/100,e[4]):un.hasOwnProperty(t)?fn(un[t]):"transparent"===t?new bn(NaN,NaN,NaN,0):null}function fn(t){return new bn(t>>16&255,t>>8&255,255&t,1)}function pn(t,e,n,r){return r<=0&&(t=e=n=NaN),new bn(t,e,n,r)}function yn(t){return t instanceof We||(t=dn(t)),t?new bn((t=t.rgb()).r,t.g,t.b,t.opacity):new bn}function vn(t,e,n,r){return 1===arguments.length?yn(t):new bn(t,e,n,null==r?1:r)}function bn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function mn(){return"#"+wn(this.r)+wn(this.g)+wn(this.b)}function gn(){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 wn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _n(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new kn(t,e,n,r)}function xn(t){if(t instanceof kn)return new kn(t.h,t.s,t.l,t.opacity);if(t instanceof We||(t=dn(t)),!t)return new kn;if(t instanceof kn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new kn(a,s,l,t.opacity)}function kn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function An(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Ke(We,dn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:cn,formatHex:cn,formatHsl:function(){return xn(this).formatHsl()},formatRgb:hn,toString:hn}),Ke(bn,vn,Ge(We,{brighter:function(t){return t=null==t?Je:Math.pow(Je,t),new bn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new bn(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:mn,formatHex:mn,formatRgb:gn,toString:gn})),Ke(kn,(function(t,e,n,r){return 1===arguments.length?xn(t):new kn(t,e,n,null==r?1:r)}),Ge(We,{brighter:function(t){return t=null==t?Je:Math.pow(Je,t),new kn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new bn(An(t>=240?t-240:t+120,i,r),An(t,i,r),An(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var 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+")")}}));var $n=function(t){return function(){return t}};function En(t){return 1==(t=+t)?Sn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):$n(isNaN(e)?n:e)}}function Sn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):$n(isNaN(t)?e:t)}var Rn=function t(e){var n=En(e);function r(t,e){var r=n((t=vn(t)).r,(e=vn(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Sn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Cn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Nn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pn=new RegExp(Nn.source,"g");function On(t,e){var n,r,i,o=Nn.lastIndex=Pn.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=Nn.exec(t))&&(r=Pn.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Cn(n,r)})),o=Pn.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}var Mn,Un=180/Math.PI,Tn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bn(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Un,skewX:Math.atan(l)*Un,scaleX:a,scaleY:s}}function Hn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:Cn(t,i)},{i:l-2,x:Cn(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Cn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Cn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Cn(t,n)},{i:s-2,x:Cn(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var jn,zn,In=Hn((function(t){var e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Tn:Bn(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),qn=Hn((function(t){return null==t?Tn:(Mn||(Mn=document.createElementNS("http://www.w3.org/2000/svg","g")),Mn.setAttribute("transform",t),(t=Mn.transform.baseVal.consolidate())?Bn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Tn)}),", ",")",")"),Dn=0,Ln=0,Fn=0,Vn=0,Xn=0,Yn=0,Kn="object"===("undefined"==typeof performance?"undefined":t(performance))&&performance.now?performance:Date,Gn="object"===("undefined"==typeof window?"undefined":t(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wn(){return Xn||(Gn(Jn),Xn=Kn.now()+Yn)}function Jn(){Xn=0}function Zn(){this._call=this._time=this._next=null}function Qn(t,e,n){var r=new Zn;return r.restart(t,e,n),r}function tr(){Xn=(Vn=Kn.now())+Yn,Dn=Ln=0;try{!function(){Wn(),++Dn;for(var t,e=jn;e;)(t=Xn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Dn}()}finally{Dn=0,function(){var t,e,n=jn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:jn=e);zn=t,nr(r)}(),Xn=0}}function er(){var t=Kn.now(),e=t-Vn;e>1e3&&(Yn-=e,Vn=t)}function nr(t){Dn||(Ln&&(Ln=clearTimeout(Ln)),t-Xn>24?(t<1/0&&(Ln=setTimeout(tr,t-Kn.now()-Yn)),Fn&&(Fn=clearInterval(Fn))):(Fn||(Vn=Kn.now(),Fn=setInterval(er,1e3)),Dn=1,Gn(tr)))}function rr(t,e,n){var r=new Zn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Zn.prototype=Qn.prototype={constructor:Zn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wn():+n)+(null==e?0:+e),this._next||zn===this||(zn?zn._next=this:jn=this,zn=this),this._call=t,this._time=n,nr()},stop:function(){this._call&&(this._call=null,this._time=1/0,nr())}};var ir=Et("start","end","cancel","interrupt"),or=[];function ar(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var u,c,h,d;if(1!==n.state)return l();for(u in i)if((d=i[u]).name===n.name){if(3===d.state)return rr(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[u]):+u<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[u])}if(rr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(o))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(d=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Qn(o,0,n.time)}(t,n,{name:e,index:r,group:i,on:ir,tween:or,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function sr(t,e){var n=ur(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function lr(t,e){var n=ur(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ur(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function cr(t,e){var n,r;return function(){var i=lr(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function hr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=lr(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function dr(t,e,n){var r=t._id;return t.each((function(){var t=lr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ur(t,r).value[e]}}function fr(t,e){var n;return("number"==typeof e?Cn:e instanceof dn?Rn:(n=dn(e))?(e=n,Rn):On)(t,e)}function pr(t){return function(){this.removeAttribute(t)}}function yr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vr(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function br(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function mr(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttribute(t)}}function gr(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function wr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function _r(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function xr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&_r(t,i)),n}return i._value=e,i}function kr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&wr(t,i)),n}return i._value=e,i}function Ar(t,e){return function(){sr(this,t).delay=+e.apply(this,arguments)}}function $r(t,e){return e=+e,function(){sr(this,t).delay=e}}function Er(t,e){return function(){lr(this,t).duration=+e.apply(this,arguments)}}function Sr(t,e){return e=+e,function(){lr(this,t).duration=e}}function Rr(t,e){if("function"!=typeof e)throw new Error;return function(){lr(this,t).ease=e}}function Cr(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?sr:lr;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Nr=Xe.prototype.constructor;function Pr(t){return function(){this.style.removeProperty(t)}}function Or(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Mr(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Or(t,o,n)),r}return o._value=e,o}function Ur(t){return function(e){this.textContent=t.call(this,e)}}function Tr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ur(r)),e}return r._value=t,r}var Br=0;function Hr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function jr(){return++Br}var zr=Xe.prototype;Hr.prototype=o({constructor:Hr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=jt(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,u=r[a],c=u.length,h=o[a]=new Array(c),d=0;d<c;++d)(s=u[d])&&(l=t.call(s,s.__data__,d,u))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,ar(h[d],e,n,d,h,ur(s,n)));return new Hr(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=qt(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var d,f=t.call(l,l.__data__,h,u),p=ur(l,n),y=0,v=f.length;y<v;++y)(d=f[y])&&ar(d,e,n,y,f,p);o.push(f),a.push(l)}return new Hr(o,a,e,n)},selectChild:zr.selectChild,selectChildren:zr.selectChildren,filter:function(t){"function"!=typeof t&&(t=Dt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Hr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,u=e[s],c=n[s],h=u.length,d=a[s]=new Array(h),f=0;f<h;++f)(l=u[f]||c[f])&&(d[f]=l);for(;s<r;++s)a[s]=e[s];return new Hr(a,this._parents,this._name,this._id)},selection:function(){return new Nr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=jr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)if(a=s[u]){var c=ur(a,e);ar(a,t,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Hr(r,this._parents,t,n)},call:zr.call,nodes:zr.nodes,node:zr.node,size:zr.size,empty:zr.empty,each:zr.each,on:function(t,e){var n=this._id;return arguments.length<2?ur(this.node(),n).on.on(t):this.each(Cr(n,t,e))},attr:function(t,e){var n=Mt(t),r="transform"===n?qn:fr;return this.attrTween(t,"function"==typeof e?(n.local?gr:mr)(n,r,dr(this,"attr."+t,e)):null==e?(n.local?yr:pr)(n):(n.local?br:vr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Mt(t);return this.tween(n,(r.local?xr:kr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?In:fr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=de(this,t),a=(this.style.removeProperty(t),de(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Pr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=de(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=de(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}(t,r,dr(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var l=lr(this,t),u=l.on,c=null==l.value[a]?o||(o=Pr(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(s,i=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=de(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Mr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(dr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Tr(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ur(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?cr:hr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ar:$r)(e,t)):ur(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Er:Sr)(e,t)):ur(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Rr(e,t)):ur(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;lr(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=lr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===i&&o()}))}},Symbol.iterator,zr[Symbol.iterator]);var Ir,qr,Dr,Lr,Fr,Vr,Xr,Yr,Kr,Gr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Wr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error("transition ".concat(e," not found"));return n}Xe.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Xe.prototype.transition=function(t){var e,n;t instanceof Hr?(e=t._id,t=t._name):(e=jr(),(n=Gr).time=Wn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)(a=s[u])&&ar(a,t,e,u,s,n||Wr(a,e));return new Hr(r,this._parents,t,e)};var Jr,Zr,Qr=function(t){a(r,kt);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).uniqueId="decidables-".concat(r.uniqueId),t}return i(r,[{key:"getComputedStyleValue",value:function(t){return window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,t):getComputedStyle(this).getPropertyValue(t)}},{key:"firstUpdated",value:function(t){v(s(r.prototype),"firstUpdated",this).call(this,t),Ye(this.renderRoot.host).classed("keyboard",!0).on("mousemove.keyboard touchstart.keyboard",(function(t){Ye(t.currentTarget.renderRoot.host).classed("keyboard",!1).on("mousemove.keyboard touchstart.keyboard",null)})).on("keydown.keyboard",(function(t){Ye(t.currentTarget.renderRoot.host).classed("keyboard",!0).on("keydown.keyboard mousemove.keyboard touchstart.keyboard",null)}))}}],[{key:"uniqueId",get:function(){return r.ID+=1,r.ID}},{key:"greys",get:function(){var t="#999999",e={white:"#ffffff"};return e.light75=Rn(t,"#ffffff")(.75),e.light50=Rn(t,"#ffffff")(.5),e.light25=Rn(t,"#ffffff")(.25),e.grey=t,e.dark25=Rn(t,"#000000")(.25),e.dark50=Rn(t,"#000000")(.5),e.dark75=Rn(t,"#000000")(.75),e.black="#000000",e}},{key:"shadows",get:function(){return{elevations:[0,2,4,8,16],baselineColor:"#000000",baselineColorString:"0, 0, 0",inverseBaselineColor:"#FFFFFF",inverseBaselineColorString:"255, 255, 255",opacityUmbra:.2,opacityPenumbra:.14,opacityAmbient:.12,opacityBoost:.2,mapUmbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:3,b:1,s:-2},4:{x:0,y:2,b:4,s:-1},8:{x:0,y:5,b:5,s:-3},16:{x:0,y:8,b:10,s:-5}},mapPenumbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:2,b:2,s:0},4:{x:0,y:4,b:5,s:0},8:{x:0,y:8,b:10,s:1},16:{x:0,y:16,b:24,s:2}},mapAmbient:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:1,b:5,s:0},4:{x:0,y:1,b:10,s:0},8:{x:0,y:3,b:14,s:2},16:{x:0,y:6,b:30,s:5}}}}},{key:"cssBoxShadow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.shadows.opacityUmbra+this.shadows.opacityBoost,i=this.shadows.opacityPenumbra+this.shadows.opacityBoost,o=this.shadows.opacityAmbient+this.shadows.opacityBoost,a=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(r,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(r,")"),s=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(i,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(i,")"),l=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(o,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(o,")"),u=this.shadows.mapUmbra[t],c=this.shadows.mapPenumbra[t],h=this.shadows.mapAmbient[t],d=e?"".concat(-u.y,"px ").concat(u.y/2,"px ").concat(u.b,"px ").concat(u.s,"px"):"".concat(u.y/2,"px ").concat(u.y,"px ").concat(u.b,"px ").concat(u.s,"px"),f=e?"".concat(-c.y,"px ").concat(c.y/2,"px ").concat(c.b,"px ").concat(c.s,"px"):"".concat(c.y/2,"px ").concat(c.y,"px ").concat(c.b,"px ").concat(c.s,"px"),p=e?"".concat(-h.y,"px ").concat(h.y/2,"px ").concat(h.b,"px ").concat(h.s,"px"):"".concat(h.y/2,"px ").concat(h.y,"px ").concat(h.b,"px ").concat(h.s,"px");return"".concat(d," ").concat(a,", ").concat(f," ").concat(s,", ").concat(p," ").concat(l)}},{key:"svgFilters",get:function(){var t=r.shadows,e=t.elevations.map((function(e){return it(Ir||(Ir=b(["\n <filter id=",' x="-250%" y="-250%" width="600%" height="600%">\n <feComponentTransfer in="SourceAlpha" result="solid">\n <feFuncA type="table" tableValues="0 1 1"/>\n </feComponentTransfer>\n <feOffset in="solid" result="offU" dx='," dy=",' />\n <feOffset in="solid" result="offP" dx='," dy=",' />\n <feOffset in="solid" result="offA" dx='," dy="," />\n ","\n ","\n ","\n <feGaussianBlur in=",' result="blurU" stdDeviation='," />\n <feGaussianBlur in=",' result="blurP" stdDeviation='," />\n <feGaussianBlur in=",' result="blurA" stdDeviation=',' />\n <feFlood in="SourceGraphic" result="opU" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opP" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opA" flood-color='," flood-opacity=",' />\n <feComposite in="opU" in2="blurU" result="shU" operator="in" />\n <feComposite in="opP" in2="blurP" result="shP" operator="in" />\n <feComposite in="opA" in2="blurA" result="shA" operator="in" />\n \x3c!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the "radius" value! --\x3e\n <feMorphology in="solid" result="smaller" operator="erode" radius=',' />\n <feComposite in="shU" in2="smaller" result="finalU" operator="out" />\n <feComposite in="shP" in2="smaller" result="finalP" operator="out" />\n <feComposite in="shA" in2="smaller" result="finalA" operator="out" />\n <feMerge>\n <feMergeNode in="finalU" />\n <feMergeNode in="finalP" />\n <feMergeNode in="finalA" />\n <feMergeNode in="SourceGraphic" />\n </feMerge>\n </filter>'])),"shadow-".concat(e),t.mapUmbra[e].y/2,t.mapUmbra[e].y,t.mapPenumbra[e].y/2,t.mapPenumbra[e].y,t.mapAmbient[e].y/2,t.mapAmbient[e].y,0===t.mapUmbra[e].s?it(qr||(qr=b([""]))):it(Dr||(Dr=b(['<feMorphology in="offU" result="spreadU" operator='," radius="," />"])),t.mapUmbra[e].s>0?"dilate":"erode",Math.abs(t.mapUmbra[e].s)),0===t.mapPenumbra[e].s?it(Lr||(Lr=b([""]))):it(Fr||(Fr=b(['<feMorphology in="offP" result="spreadP" operator='," radius="," />"])),t.mapPenumbra[e].s>0?"dilate":"erode",Math.abs(t.mapPenumbra[e].s)),0===t.mapAmbient[e].s?it(Vr||(Vr=b([""]))):it(Xr||(Xr=b(['<feMorphology in="offA" result="spreadA" operator='," radius="," />"])),t.mapAmbient[e].s>0?"dilate":"erode",Math.abs(t.mapAmbient[e].s)),0===t.mapUmbra[e].s?"offU":"spreadU",t.mapUmbra[e].b/2,0===t.mapPenumbra[e].s?"offP":"spreadP",t.mapPenumbra[e].b/2,0===t.mapAmbient[e].s?"offA":"spreadA",t.mapAmbient[e].b/2,t.baselineColor,t.opacityUmbra+t.opacityBoost,t.baselineColor,t.opacityPenumbra+t.opacityBoost,t.baselineColor,t.opacityAmbient+t.opacityBoost,1)}));return it(Yr||(Yr=b(['\n <svg class="defs">\n <defs>\n ',"\n </defs>\n </svg>\n "])),e)}},{key:"styles",get:function(){return N(Kr||(Kr=b(["\n :host {\n ---shadow-0: var(--shadow-0, ",");\n ---shadow-2: var(--shadow-2, ",");\n ---shadow-4: var(--shadow-4, ",");\n ---shadow-8: var(--shadow-8, ",");\n\n ---color-background: var(--color-background, ",");\n ---color-border: var(--color-border, ",");\n ---color-text: var(--color-text, ",");\n ---color-text-inverse: var(--color-text-inverse, ",");\n ---color-link: var(--color-link, ",");\n ---color-element-background: var(--color-element-background, ",");\n ---color-element-disabled: var(--color-element-disabled, ",");\n ---color-element-enabled: var(--color-element-enabled, ",");\n ---color-element-selected: var(--color-element-selected, ",");\n ---color-element-border: var(--color-element-border, ",");\n ---color-element-emphasis: var(--color-element-emphasis, ",');\n\n ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);\n ---font-family-math: var(--font-family-math, "Source Serif", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n '])),C(this.cssBoxShadow(0)),C(this.cssBoxShadow(2)),C(this.cssBoxShadow(4)),C(this.cssBoxShadow(8)),C(this.greys.white),C(this.greys.light75),C(this.greys.dark75),C(this.greys.white),C(this.greys.dark25),C(this.greys.light75),C(this.greys.light50),C(this.greys.grey),C(this.greys.dark25),C(this.greys.dark50),C(this.greys.dark75))}}]),r}();Qr.ID=0;var ti=function(t){a(r,Qr);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).disabled=!1,t}return i(r,[{key:"render",value:function(){return rt(Jr||(Jr=b(["\n <button ?disabled=",">\n <slot></slot>\n </button>\n "])),this.disabled)}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[v(s(r),"styles",this),N(Zr||(Zr=b(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))]}}]),r}();customElements.define("decidables-button",ti);
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2018 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/
|
|
12
|
+
var ei,ni,ri,ii,oi=function(t){return null!=t?t:at},ai=function(t){a(r,Qr);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).disabled=!1,t.max=void 0,t.min=void 0,t.step=void 0,t.value=void 0,t}return i(r,[{key:"changed",value:function(t){this.value=t.target.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0}))}},{key:"inputted",value:function(t){this.value=t.target.value}},{key:"render",value:function(){return rt(ei||(ei=b(["\n <label for=",'>\n <slot></slot>\n </label>\n <div class="range">\n <input type="range" id='," min="," max="," step="," .value="," @change="," @input=",">\n </div>\n <decidables-spinner min="," max="," step="," .value="," @input=","></decidables-spinner>\n "])),"".concat(this.uniqueId,"-slider"),"".concat(this.uniqueId,"-slider"),oi(this.min),oi(this.max),oi(this.step),this.value,this.changed.bind(this),this.inputted.bind(this),oi(this.min),oi(this.max),oi(this.step),this.value,this.inputted.bind(this))}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0},max:{attribute:"max",type:Number,reflect:!0},min:{attribute:"min",type:Number,reflect:!0},step:{attribute:"step",type:Number,reflect:!0},value:{attribute:"value",type:Number,reflect:!0}}}},{key:"styles",get:function(){return[v(s(r),"styles",this),N(ni||(ni=b(["\n :host {\n ---shadow-2-rotate: var(--shadow-2-rotate, ",");\n ---shadow-4-rotate: var(--shadow-4-rotate, ",");\n ---shadow-8-rotate: var(--shadow-8-rotate, ",");\n\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n label {\n margin: 0.25rem 0.25rem 0;\n }\n\n .range {\n display: inline-block;\n\n width: 3.5rem;\n height: 4.75rem;\n margin: 0 0.25rem 0.25rem;\n }\n\n decidables-spinner {\n --decidables-spinner-input-width: 3.5rem;\n\n margin: 0 0.25rem 0.25rem;\n }\n\n /* Adapted from http://danielstern.ca/range.css/#/ */\n /* Overall */\n input[type=range] {\n width: 4.75rem;\n height: 3.5rem;\n padding: 0;\n margin: 0;\n\n background-color: unset;\n\n transform: rotate(-90deg);\n transform-origin: 2.375rem 2.375rem;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:enabled {\n cursor: ns-resize;\n }\n\n input[type=range]:focus {\n outline: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-tooltip {\n display: none;\n }\n\n /* Track */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-runnable-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n input[type=range]:focus::-webkit-slider-runnable-track {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-track {\n width: 100%;\n height: 4px;\n\n color: transparent;\n\n background: transparent;\n border-color: transparent;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-lower {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-upper {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-lower {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-upper {\n background: var(---color-element-disabled);\n }\n\n /* Thumb */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-thumb {\n width: 10px;\n height: 20px;\n margin-top: -8px;\n\n border: 0;\n border-radius: 4px;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:disabled::-webkit-slider-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=range]:enabled::-webkit-slider-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n input[type=range]:enabled:hover::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n input[type=range]:enabled:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-thumb {\n width: 10px;\n height: 20px;\n\n border: 0;\n border-radius: 4px;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-moz-range-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-moz-range-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-thumb {\n width: 10px;\n height: 20px;\n margin-top: 0;\n\n background: #999999;\n /* background: var(---color-element-enabled); */\n border: 0;\n border-radius: 4px;\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-ms-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-ms-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n "])),C(this.cssBoxShadow(2,!0,!1)),C(this.cssBoxShadow(4,!0,!1)),C(this.cssBoxShadow(8,!0,!1)))]}}]),r}();customElements.define("decidables-slider",ai);var si,li,ui=function(t){a(r,Qr);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).disabled=!1,t.max=void 0,t.min=void 0,t.step=void 0,t.value=void 0,t}return i(r,[{key:"inputted",value:function(t){this.value=t.target.value}},{key:"render",value:function(){return rt(ri||(ri=b(["\n <label>\n <slot></slot>\n <input ?disabled=",' type="number" min='," max="," step="," .value="," @input=",">\n </label>\n "])),this.disabled,oi(this.min),oi(this.max),oi(this.step),this.value,this.inputted.bind(this))}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0},max:{attribute:"max",type:Number,reflect:!0},min:{attribute:"min",type:Number,reflect:!0},step:{attribute:"step",type:Number,reflect:!0},value:{attribute:"value",type:Number,reflect:!0}}}},{key:"styles",get:function(){return[v(s(r),"styles",this),N(ii||(ii=b(['\n :host {\n ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);\n ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);\n ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");\n\n display: block;\n }\n\n label {\n position: relative;\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n\n margin: 0;\n\n font-size: 0.75rem;\n }\n\n label::before {\n position: absolute;\n bottom: 1px;\n left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);\n\n font-size: var(---decidables-spinner-font-size);\n line-height: normal;\n\n content: var(---decidables-spinner-prefix);\n }\n\n input[type=number] {\n width: var(---decidables-spinner-input-width);\n\n font-family: var(---font-family-base);\n font-size: var(---decidables-spinner-font-size);\n color: inherit;\n text-align: right;\n\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n box-shadow: var(---shadow-2);\n\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n\n input[type=number]:hover {\n box-shadow: var(---shadow-4);\n }\n\n input[type=number]:focus,\n input[type=number]:active {\n box-shadow: var(---shadow-8);\n }\n\n input[type=number]:disabled {\n color: var(---color-text);\n\n border: 0;\n box-shadow: none;\n\n /* HACK: Use correct text color in Safari */\n -webkit-opacity: 1;\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */\n /* HACK: Use correct text color in Safari */\n -webkit-text-fill-color: var(---color-text);\n }\n\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n input[type=number]:disabled::-webkit-outer-spin-button,\n input[type=number]:disabled::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n '])))]}}]),r}();customElements.define("decidables-spinner",ui);var ci,hi,di=function(t){a(r,Qr);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).checked=!1,t.disabled=!1,t}return i(r,[{key:"changed",value:function(t){this.checked=t.target.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked},bubbles:!0}))}},{key:"render",value:function(){return rt(si||(si=b(['\n <input type="checkbox" id='," ?checked="," ?disabled="," @change=",">\n <label for=",'>\n <slot name="off-label"></slot>\n </label>\n <label for=',">\n <slot></slot>\n </label>\n "])),"".concat(this.uniqueId,"-checkbox"),this.checked,this.disabled,this.changed.bind(this),"".concat(this.uniqueId,"-checkbox"),"".concat(this.uniqueId,"-checkbox"))}}],[{key:"properties",get:function(){return{checked:{attribute:"checked",type:Boolean,reflect:!0},disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[v(s(r),"styles",this),N(li||(li=b(['\n :host {\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n /* Adapted from https://codepen.io/guuslieben/pen/YyPRVP */\n input[type=checkbox] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=checkbox] + label {\n order: 1;\n\n margin: 0 0.25rem 0.25rem;\n\n font-weight: 400;\n }\n\n input[type=checkbox] + label + label {\n position: relative;\n\n min-width: 24px;\n padding: 0 0 36px;\n margin: 0.25rem 0.25rem 0;\n\n font-weight: 400;\n\n outline: none;\n }\n\n input[type=checkbox] + label + label::before,\n input[type=checkbox] + label + label::after {\n position: absolute;\n\n left: 50%;\n\n margin: 0;\n\n content: "";\n\n outline: 0;\n\n transition: all var(---transition-duration) ease;\n transform: translate(-50%, 0);\n }\n\n input[type=checkbox] + label + label::before {\n bottom: 1px;\n\n width: 8px;\n height: 34px;\n\n background-color: var(---color-element-disabled);\n border-radius: 4px;\n }\n\n input[type=checkbox] + label + label::after {\n bottom: 0;\n\n width: 18px;\n height: 18px;\n\n background-color: var(---color-element-enabled);\n border-radius: 50%;\n box-shadow: var(---shadow-2);\n }\n\n input[type=checkbox]:checked + label + label::after {\n transform: translate(-50%, -100%);\n }\n\n input[type=checkbox]:disabled + label + label::after {\n background-color: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=checkbox]:enabled + label,\n input[type=checkbox]:enabled + label + label {\n cursor: pointer;\n }\n\n input[type=checkbox]:enabled + label:hover + label::after,\n input[type=checkbox]:enabled + label + label:hover::after {\n box-shadow: var(---shadow-4);\n }\n\n input[type=checkbox]:enabled + label:active + label::after,\n input[type=checkbox]:enabled + label + label:active::after {\n box-shadow: var(---shadow-8);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {\n box-shadow: var(---shadow-4);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,\n :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {\n box-shadow: var(---shadow-8);\n }\n '])))]}}]),r}();customElements.define("decidables-switch",di);var fi,pi,yi=function(t){a(r,Qr);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).disabled=!1,t}return i(r,[{key:"render",value:function(){return rt(ci||(ci=b(["\n <fieldset ?disabled=",'>\n <legend><slot name="label"></slot></legend>\n <slot></slot>\n </fieldset>\n '])),this.disabled)}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[v(s(r),"styles",this),N(hi||(hi=b(["\n fieldset {\n display: flex;\n\n flex-direction: column;\n\n align-items: stretch;\n justify-content: center;\n\n margin: 0.25rem;\n\n border: 0;\n }\n\n legend {\n text-align: center;\n }\n "])))]}}]),r}();customElements.define("decidables-toggle",yi);var vi=function(t){a(r,Qr);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).checked=!1,t.disabled=!1,t.name=void 0,t.value=void 0,t}return i(r,[{key:"changed",value:function(t){this.checked=t.target.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked,value:this.value},bubbles:!0}))}},{key:"render",value:function(){return rt(fi||(fi=b(['\n <input type="radio" id='," name="," value="," .checked="," @change=",">\n <label for=",">\n <slot></slot>\n </label>\n "])),"".concat(this.uniqueId,"-radio"),this.name,this.value,this.checked,this.changed.bind(this),"".concat(this.uniqueId,"-radio"))}}],[{key:"properties",get:function(){return{checked:{attribute:"checked",type:Boolean,reflect:!0},disabled:{attribute:"disabled",type:Boolean,reflect:!0},name:{attribute:"name",type:String,reflect:!0},value:{attribute:"value",type:String,reflect:!0}}}},{key:"styles",get:function(){return[v(s(r),"styles",this),N(pi||(pi=b(["\n :host {\n display: flex;\n }\n\n input[type=radio] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=radio] + label {\n width: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n text-align: center;\n\n cursor: pointer;\n\n background-color: var(---color-element-enabled);\n border: 0;\n border-radius: 0;\n outline: none;\n\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio]:checked + label {\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio] + label:hover {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n input[type=radio] + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(:first-of-type) input[type=radio] + label {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n }\n\n :host(:last-of-type) input[type=radio] + label {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem;\n }\n\n :host(.keyboard) input[type=radio]:focus + label {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus:checked + label {\n z-index: 1;\n\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))]}}]),r}();customElements.define("decidables-toggle-option",vi);var bi={fromAttribute:function(t){return t.split(/\s+/).map((function(t){return Number.parseFloat(t)}))},toAttribute:function(t){return t.length?t.map((function(t){return t.toFixed(3)})).join(" "):null}},mi={fromAttribute:function(t){return new Set(t.split(/\s+/))},toAttribute:function(t){return t.size?g(t).join(" "):null}};export{ti as DecidablesButton,bi as DecidablesConverterArray,mi as DecidablesConverterSet,Qr as DecidablesElement,ai as DecidablesSlider,ui as DecidablesSpinner,di as DecidablesSwitch,yi as DecidablesToggle,vi as DecidablesToggleOption};
|
|
13
|
+
//# sourceMappingURL=decidablesElements.esm.min.js.map
|