@cas-smartdesign/lit-slider 7.2.1 → 7.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs/doc.mjs CHANGED
@@ -399,7 +399,7 @@ document.querySelectorAll("[validate-it] sd-lit-slider").forEach((slider: Slider
399
399
  </sd-field-validation-message>
400
400
  `}
401
401
  </div>
402
- `}updated(t){super.updated(t),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0),this.rows>1&&((t.has("min")||t.has("max")||t.has("pattern"))&&console.warn("min, max & pattern attributes are not supported with multiple rows configuration."),this.type!="text"&&console.warn(`type: ${this.type} is not supported with multiple rows configuration.`))}update(t){if(super.update(t),t.has("validationMessage")&&(this.validationMessage?this._internals?.setValidity({customError:!0},this.validationMessage):this._internals?.setValidity(this.inputElement.validity,this.inputElement.validationMessage)),this._initialized&&t.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(t){this.dispatchEvent(new CustomEvent(`${t?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value)}updateFormValidity(){if(this.validationMessage==null){this._internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage);const t=this.shadowRoot.querySelector("sd-field-validation-message");this.requestUpdate("validationMessage",t==null?null:t.message)}}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted||this.type==="date"}setFormValue(t){this._internals?.setFormValue(t),this.updateFormValidity()}formResetCallback(){this.value=this._initialValue}formDisabledCallback(t){this.effectiveDisabled=t||this.hasAttribute("disabled")}formAssociatedCallback(t){this._needsAutocompletedCheck=!0}formStateRestoreCallback(t,e){typeof t=="string"&&(this.value=t)}},xe.ID=so,xe.DEFAULT_MAX_LENGTH=524288,xe.formAssociated=!0,xe.shadowRootOptions={...Re.shadowRootOptions,delegatesFocus:bn},xe);Q([q({type:String,reflect:!0})],Y.prototype,"label");Q([q({type:String,attribute:!0})],Y.prototype,"validationMessage");Q([q({type:String,attribute:!0})],Y.prototype,"validationIconSrc");Q([q({type:$t,attribute:!0,reflect:!0})],Y.prototype,"validationLevel");Q([q({type:String,hasChanged(t,e){return e!=null&&e!=t}})],Y.prototype,"currentText");Q([q({type:Boolean,attribute:!0})],Y.prototype,"alwaysFloatLabel");Q([q({type:Boolean,attribute:!0})],Y.prototype,"autocompleted");Q([q({type:Number,attribute:!0})],Y.prototype,"rows");Q([q({type:Boolean,reflect:!0,attribute:"effective-disabled"})],Y.prototype,"effectiveDisabled");Q([q({type:Boolean,reflect:!0,attribute:"extended-prefix"})],Y.prototype,"extendedPrefix");Q([q({type:String,reflect:!0})],Y.prototype,"type");Q([q({type:String,reflect:!0})],Y.prototype,"placeholder");Q([q({type:String,reflect:!0})],Y.prototype,"sdAriaLabel");Q([q({type:Number,reflect:!0})],Y.prototype,"maxlength");Q([q({type:Boolean,reflect:!0})],Y.prototype,"readonly");Q([q({type:Boolean,reflect:!0})],Y.prototype,"required");Q([q({type:String,reflect:!0})],Y.prototype,"name");Q([q({type:Boolean,reflect:!0})],Y.prototype,"inactive");Q([q({type:String,attribute:!0})],Y.prototype,"autocomplete");Q([q({type:String,attribute:!0})],Y.prototype,"min");Q([q({type:String,attribute:!0})],Y.prototype,"max");Q([q({type:String,attribute:!0})],Y.prototype,"pattern");let Yt=Y;customElements.get(Yt.ID)||customElements.define(Yt.ID,Yt);var ao=20,lo=1,De=1e6,vn=1e6,co=-7,uo=21,ho=!1,dt="[big.js] ",ze=dt+"Invalid ",Nt=ze+"decimal places",fo=ze+"rounding mode",er=dt+"Division by zero",V={},Ee=void 0,po=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function tr(){function t(e){var i=this;if(!(i instanceof t))return e===Ee&&arguments.length===0?tr():new t(e);if(e instanceof t)i.s=e.s,i.e=e.e,i.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(ze+"value");e=e===0&&1/e<0?"-0":String(e)}mo(i,e)}i.constructor=t}return t.prototype=V,t.DP=ao,t.RM=lo,t.NE=co,t.PE=uo,t.strict=ho,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function mo(t,e){var i,r,n;if(!po.test(e))throw Error(ze+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(i=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(i<0&&(i=r),i+=+e.slice(r+1),e=e.substring(0,r)):i<0&&(i=e.length),n=e.length,r=0;r<n&&e.charAt(r)=="0";)++r;if(r==n)t.c=[t.e=0];else{for(;n>0&&e.charAt(--n)=="0";);for(t.e=i-r-1,t.c=[],i=0;r<=n;)t.c[i++]=+e.charAt(r++)}return t}function Be(t,e,i,r){var n=t.c;if(i===Ee&&(i=t.constructor.RM),i!==0&&i!==1&&i!==2&&i!==3)throw Error(fo);if(e<1)r=i===3&&(r||!!n[0])||e===0&&(i===1&&n[0]>=5||i===2&&(n[0]>5||n[0]===5&&(r||n[1]!==Ee))),n.length=1,r?(t.e=t.e-e+1,n[0]=1):n[0]=t.e=0;else if(e<n.length){if(r=i===1&&n[e]>=5||i===2&&(n[e]>5||n[e]===5&&(r||n[e+1]!==Ee||n[e-1]&1))||i===3&&(r||!!n[0]),n.length=e,r){for(;++n[--e]>9;)if(n[e]=0,e===0){++t.e,n.unshift(1);break}}for(e=n.length;!n[--e];)n.pop()}return t}function Ue(t,e,i){var r=t.e,n=t.c.join(""),s=n.length;if(e)n=n.charAt(0)+(s>1?"."+n.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)n="0"+n;n="0."+n}else if(r>0)if(++r>s)for(r-=s;r--;)n+="0";else r<s&&(n=n.slice(0,r)+"."+n.slice(r));else s>1&&(n=n.charAt(0)+"."+n.slice(1));return t.s<0&&i?"-"+n:n}V.abs=function(){var t=new this.constructor(this);return t.s=1,t};V.cmp=function(t){var e,i=this,r=i.c,n=(t=new i.constructor(t)).c,s=i.s,a=t.s,d=i.e,g=t.e;if(!r[0]||!n[0])return r[0]?s:n[0]?-a:0;if(s!=a)return s;if(e=s<0,d!=g)return d>g^e?1:-1;for(a=(d=r.length)<(g=n.length)?d:g,s=-1;++s<a;)if(r[s]!=n[s])return r[s]>n[s]^e?1:-1;return d==g?0:d>g^e?1:-1};V.div=function(t){var e=this,i=e.constructor,r=e.c,n=(t=new i(t)).c,s=e.s==t.s?1:-1,a=i.DP;if(a!==~~a||a<0||a>De)throw Error(Nt);if(!n[0])throw Error(er);if(!r[0])return t.s=s,t.c=[t.e=0],t;var d,g,h,o,l,c=n.slice(),u=d=n.length,p=r.length,f=r.slice(0,d),b=f.length,x=t,_=x.c=[],w=0,y=a+(x.e=e.e-t.e)+1;for(x.s=s,s=y<0?0:y,c.unshift(0);b++<d;)f.push(0);do{for(h=0;h<10;h++){if(d!=(b=f.length))o=d>b?1:-1;else for(l=-1,o=0;++l<d;)if(n[l]!=f[l]){o=n[l]>f[l]?1:-1;break}if(o<0){for(g=b==d?n:c;b;){if(f[--b]<g[b]){for(l=b;l&&!f[--l];)f[l]=9;--f[l],f[b]+=10}f[b]-=g[b]}for(;!f[0];)f.shift()}else break}_[w++]=o?h:++h,f[0]&&o?f[b]=r[u]||0:f=[r[u]]}while((u++<p||f[0]!==Ee)&&s--);return!_[0]&&w!=1&&(_.shift(),x.e--,y--),w>y&&Be(x,y,i.RM,f[0]!==Ee),x};V.eq=function(t){return this.cmp(t)===0};V.gt=function(t){return this.cmp(t)>0};V.gte=function(t){return this.cmp(t)>-1};V.lt=function(t){return this.cmp(t)<0};V.lte=function(t){return this.cmp(t)<1};V.minus=V.sub=function(t){var e,i,r,n,s=this,a=s.constructor,d=s.s,g=(t=new a(t)).s;if(d!=g)return t.s=-g,s.plus(t);var h=s.c.slice(),o=s.e,l=t.c,c=t.e;if(!h[0]||!l[0])return l[0]?t.s=-g:h[0]?t=new a(s):t.s=1,t;if(d=o-c){for((n=d<0)?(d=-d,r=h):(c=o,r=l),r.reverse(),g=d;g--;)r.push(0);r.reverse()}else for(i=((n=h.length<l.length)?h:l).length,d=g=0;g<i;g++)if(h[g]!=l[g]){n=h[g]<l[g];break}if(n&&(r=h,h=l,l=r,t.s=-t.s),(g=(i=l.length)-(e=h.length))>0)for(;g--;)h[e++]=0;for(g=e;i>d;){if(h[--i]<l[i]){for(e=i;e&&!h[--e];)h[e]=9;--h[e],h[i]+=10}h[i]-=l[i]}for(;h[--g]===0;)h.pop();for(;h[0]===0;)h.shift(),--c;return h[0]||(t.s=1,h=[c=0]),t.c=h,t.e=c,t};V.mod=function(t){var e,i=this,r=i.constructor,n=i.s,s=(t=new r(t)).s;if(!t.c[0])throw Error(er);return i.s=t.s=1,e=t.cmp(i)==1,i.s=n,t.s=s,e?new r(i):(n=r.DP,s=r.RM,r.DP=r.RM=0,i=i.div(t),r.DP=n,r.RM=s,this.minus(i.times(t)))};V.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};V.plus=V.add=function(t){var e,i,r,n=this,s=n.constructor;if(t=new s(t),n.s!=t.s)return t.s=-t.s,n.minus(t);var a=n.e,d=n.c,g=t.e,h=t.c;if(!d[0]||!h[0])return h[0]||(d[0]?t=new s(n):t.s=n.s),t;if(d=d.slice(),e=a-g){for(e>0?(g=a,r=h):(e=-e,r=d),r.reverse();e--;)r.push(0);r.reverse()}for(d.length-h.length<0&&(r=h,h=d,d=r),e=h.length,i=0;e;d[e]%=10)i=(d[--e]=d[e]+h[e]+i)/10|0;for(i&&(d.unshift(i),++g),e=d.length;d[--e]===0;)d.pop();return t.c=d,t.e=g,t};V.pow=function(t){var e=this,i=new e.constructor("1"),r=i,n=t<0;if(t!==~~t||t<-vn||t>vn)throw Error(ze+"exponent");for(n&&(t=-t);t&1&&(r=r.times(e)),t>>=1,!!t;)e=e.times(e);return n?i.div(r):r};V.prec=function(t,e){if(t!==~~t||t<1||t>De)throw Error(ze+"precision");return Be(new this.constructor(this),t,e)};V.round=function(t,e){if(t===Ee)t=0;else if(t!==~~t||t<-De||t>De)throw Error(Nt);return Be(new this.constructor(this),t+this.e+1,e)};V.sqrt=function(){var t,e,i,r=this,n=r.constructor,s=r.s,a=r.e,d=new n("0.5");if(!r.c[0])return new n(r);if(s<0)throw Error(dt+"No square root");s=Math.sqrt(+Ue(r,!0,!0)),s===0||s===1/0?(e=r.c.join(""),e.length+a&1||(e+="0"),s=Math.sqrt(e),a=((a+1)/2|0)-(a<0||a&1),t=new n((s==1/0?"5e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+a)):t=new n(s+""),a=t.e+(n.DP+=4);do i=t,t=d.times(i.plus(r.div(i)));while(i.c.slice(0,a).join("")!==t.c.slice(0,a).join(""));return Be(t,(n.DP-=4)+t.e+1,n.RM)};V.times=V.mul=function(t){var e,i=this,r=i.constructor,n=i.c,s=(t=new r(t)).c,a=n.length,d=s.length,g=i.e,h=t.e;if(t.s=i.s==t.s?1:-1,!n[0]||!s[0])return t.c=[t.e=0],t;for(t.e=g+h,a<d&&(e=n,n=s,s=e,h=a,a=d,d=h),e=new Array(h=a+d);h--;)e[h]=0;for(g=d;g--;){for(d=0,h=a+g;h>g;)d=e[h]+s[g]*n[h-g-1]+d,e[h--]=d%10,d=d/10|0;e[h]=d}for(d?++t.e:e.shift(),g=e.length;!e[--g];)e.pop();return t.c=e,t};V.toExponential=function(t,e){var i=this,r=i.c[0];if(t!==Ee){if(t!==~~t||t<0||t>De)throw Error(Nt);for(i=Be(new i.constructor(i),++t,e);i.c.length<t;)i.c.push(0)}return Ue(i,!0,!!r)};V.toFixed=function(t,e){var i=this,r=i.c[0];if(t!==Ee){if(t!==~~t||t<0||t>De)throw Error(Nt);for(i=Be(new i.constructor(i),t+i.e+1,e),t=t+i.e+1;i.c.length<t;)i.c.push(0)}return Ue(i,!1,!!r)};V.toJSON=V.toString=function(){var t=this,e=t.constructor;return Ue(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};typeof Symbol<"u"&&(V[Symbol.for("nodejs.util.inspect.custom")]=V.toJSON);V.toNumber=function(){var t=+Ue(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(dt+"Imprecise conversion");return t};V.toPrecision=function(t,e){var i=this,r=i.constructor,n=i.c[0];if(t!==Ee){if(t!==~~t||t<1||t>De)throw Error(ze+"precision");for(i=Be(new r(i),t,e);i.c.length<t;)i.c.push(0)}return Ue(i,t<=i.e||i.e<=r.NE||i.e>=r.PE,!!n)};V.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(dt+"valueOf disallowed");return Ue(t,t.e<=e.NE||t.e>=e.PE,!0)};var go=tr();const bo=":host{display:block;position:relative;width:100%;height:48px;cursor:pointer;touch-action:none;contain:layout style}:host([hidden]){display:none!important}:host([disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([disabled]) sd-lit-input{opacity:1}#track-container{position:absolute;top:50%;left:0;height:2px;overflow:hidden}#track{position:absolute;width:100%;height:100%;transform-origin:left top;will-change:transform}:host(:focus) #thumb{top:11px;left:-14px;border-width:8px}#thumb[active]{top:7px!important;left:-18px!important;border-width:12px!important}#thumb{width:12px;height:12px;position:absolute;top:19px;left:-6px;border-radius:50%;border-width:0;background-clip:padding-box;-webkit-user-select:none;user-select:none;will-change:transform;border-style:solid}sd-lit-input{position:absolute;height:100%;width:var(--slider-suffix-width, 50px);right:0;text-align:center;outline:none;white-space:nowrap}sd-field-validation-message{position:absolute;bottom:0}";var vo=Object.defineProperty,de=(t,e,i,r)=>{for(var n=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(n=a(e,i,n)||n);return n&&vo(e,i,n),n},Se;const ce=(Se=class extends Re{constructor(){super(),this.thumbPosition=0,this._value=0,this._relativeValue=0,this.min=0,this.max=1,this.colorBlender=new Js,this.baseColor=Se.defaultColor,this.resizeObserver=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{this.lastKnownWidth!==this.trackContainerWidth&&(this.lastKnownWidth=this.trackContainerWidth,this.doUpdateRelativeValue(this._relativeValue,!0))})})}firstUpdated(e){super.firstUpdated(e),this.updateValue(Number.parseFloat(this.getAttribute("value"))||this._value),this.addEventListener(this.useTouchEvents()?"touchstart":"pointerdown",i=>{!this.hasAttribute("disabled")&&i.composedPath().indexOf(this.inputElement)===-1&&(i.preventDefault(),i.pointerId&&this.setPointerCapture(i.pointerId),this.focus(),this.listenMoveEvents(i.clientX||i.changedTouches[0].clientX))}),this.addEventListener("keydown",this.handleKeyDown,!0),this.setAttribute("aria-valuemin",this.min.toString()),this.setAttribute("aria-valuemax",this.max.toString()),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}connectedCallback(){super.connectedCallback(),["colors","min","max","step","editable","inputSuffix","value"].forEach(e=>{this.upgradeProperty(e)}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.lastKnownWidth=void 0,this.resizeObserver.disconnect()}upgradeProperty(e){if(Object.prototype.hasOwnProperty.call(this,e)){const i=this[e];delete this[e],this[e]=i}}static get observedAttributes(){const e=super.observedAttributes;return e.push("value"),e}attributeChangedCallback(e,i,r){super.attributeChangedCallback(e,i,r),(e==="value"||e=="step")&&this.hasUpdated&&this.updateValue(Number.parseFloat(r))}updateValue(e){this.setValueInternal(e)&&(this.inputElement&&(this.inputElement.value=this.formattedValue()),this._value!=e&&this.fireBothValueChangeEvents())}get value(){return this._value}set value(e){this.setValueInternal(e)&&this.fireBothValueChangeEvents()}roundToStep(e){let i=Number.parseFloat(e);if(Number.isNaN(i))return this._value;if(this.step&&i>=this.min&&i<=this.max){const r=new go(i).minus(this.min).div(this.step).round().mul(this.step).plus(this.min);i=Number.parseFloat(r.toString())}return i}setValueInternal(e){const i=this.roundToStep(e),r=this.clampValue?Math.max(this.min,Math.min(this.max,i)):i;if(this._value!==r){const n=this._value;return this._value=r,this.relativeValue=(r-this.min)/(this.max-this.min),this.setAttribute("aria-valuenow",this._value.toString()),this.requestUpdate("value",n),!0}return!1}get relativeValue(){return this._relativeValue}set relativeValue(e){this._relativeValue!==e&&this.doUpdateRelativeValue(e)}doUpdateRelativeValue(e,i){this._relativeValue=e,this.thumbPosition=Math.min(Math.max(0,e),1)*this.trackContainerWidth;const r=this.min+(this.max-this.min)*this._relativeValue;this.setValueInternal(r),!i&&this.colors&&this.colors.size&&(this.baseColor=this.colorBlender.blend(this._relativeValue))}get colors(){return this.colorBlender.colors}set colors(e){this.colorBlender.colors=e,this.colors&&this.colors.size?this.baseColor=this.colorBlender.blend(this._relativeValue):this.baseColor=Se.defaultColor}static get styles(){return[Ri`
402
+ `}updated(t){super.updated(t),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0),this.rows>1&&((t.has("min")||t.has("max")||t.has("pattern"))&&console.warn("min, max & pattern attributes are not supported with multiple rows configuration."),this.type!="text"&&console.warn(`type: ${this.type} is not supported with multiple rows configuration.`))}update(t){if(super.update(t),t.has("validationMessage")&&(this.validationMessage?this._internals?.setValidity({customError:!0},this.validationMessage):this._internals?.setValidity(this.inputElement.validity,this.inputElement.validationMessage)),this._initialized&&t.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(t){this.dispatchEvent(new CustomEvent(`${t?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value)}updateFormValidity(){if(this.validationMessage==null&&this.inputElement!=null){this._internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage);const t=this.shadowRoot.querySelector("sd-field-validation-message");this.requestUpdate("validationMessage",t==null?null:t.message)}}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted||this.type==="date"}setFormValue(t){this._internals?.setFormValue(t),this.updateFormValidity()}formResetCallback(){this.value=this._initialValue}formDisabledCallback(t){this.effectiveDisabled=t||this.hasAttribute("disabled")}formAssociatedCallback(t){this._needsAutocompletedCheck=!0}formStateRestoreCallback(t,e){typeof t=="string"&&(this.value=t)}},xe.ID=so,xe.DEFAULT_MAX_LENGTH=524288,xe.formAssociated=!0,xe.shadowRootOptions={...Re.shadowRootOptions,delegatesFocus:bn},xe);Q([q({type:String,reflect:!0})],Y.prototype,"label");Q([q({type:String,attribute:!0})],Y.prototype,"validationMessage");Q([q({type:String,attribute:!0})],Y.prototype,"validationIconSrc");Q([q({type:$t,attribute:!0,reflect:!0})],Y.prototype,"validationLevel");Q([q({type:String,hasChanged(t,e){return e!=null&&e!=t}})],Y.prototype,"currentText");Q([q({type:Boolean,attribute:!0})],Y.prototype,"alwaysFloatLabel");Q([q({type:Boolean,attribute:!0})],Y.prototype,"autocompleted");Q([q({type:Number,attribute:!0})],Y.prototype,"rows");Q([q({type:Boolean,reflect:!0,attribute:"effective-disabled"})],Y.prototype,"effectiveDisabled");Q([q({type:Boolean,reflect:!0,attribute:"extended-prefix"})],Y.prototype,"extendedPrefix");Q([q({type:String,reflect:!0})],Y.prototype,"type");Q([q({type:String,reflect:!0})],Y.prototype,"placeholder");Q([q({type:String,reflect:!0})],Y.prototype,"sdAriaLabel");Q([q({type:Number,reflect:!0})],Y.prototype,"maxlength");Q([q({type:Boolean,reflect:!0})],Y.prototype,"readonly");Q([q({type:Boolean,reflect:!0})],Y.prototype,"required");Q([q({type:String,reflect:!0})],Y.prototype,"name");Q([q({type:Boolean,reflect:!0})],Y.prototype,"inactive");Q([q({type:String,attribute:!0})],Y.prototype,"autocomplete");Q([q({type:String,attribute:!0})],Y.prototype,"min");Q([q({type:String,attribute:!0})],Y.prototype,"max");Q([q({type:String,attribute:!0})],Y.prototype,"pattern");let Yt=Y;customElements.get(Yt.ID)||customElements.define(Yt.ID,Yt);var ao=20,lo=1,De=1e6,vn=1e6,co=-7,uo=21,ho=!1,dt="[big.js] ",ze=dt+"Invalid ",Nt=ze+"decimal places",fo=ze+"rounding mode",er=dt+"Division by zero",V={},Ee=void 0,po=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function tr(){function t(e){var i=this;if(!(i instanceof t))return e===Ee&&arguments.length===0?tr():new t(e);if(e instanceof t)i.s=e.s,i.e=e.e,i.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(ze+"value");e=e===0&&1/e<0?"-0":String(e)}mo(i,e)}i.constructor=t}return t.prototype=V,t.DP=ao,t.RM=lo,t.NE=co,t.PE=uo,t.strict=ho,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function mo(t,e){var i,r,n;if(!po.test(e))throw Error(ze+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(i=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(i<0&&(i=r),i+=+e.slice(r+1),e=e.substring(0,r)):i<0&&(i=e.length),n=e.length,r=0;r<n&&e.charAt(r)=="0";)++r;if(r==n)t.c=[t.e=0];else{for(;n>0&&e.charAt(--n)=="0";);for(t.e=i-r-1,t.c=[],i=0;r<=n;)t.c[i++]=+e.charAt(r++)}return t}function Be(t,e,i,r){var n=t.c;if(i===Ee&&(i=t.constructor.RM),i!==0&&i!==1&&i!==2&&i!==3)throw Error(fo);if(e<1)r=i===3&&(r||!!n[0])||e===0&&(i===1&&n[0]>=5||i===2&&(n[0]>5||n[0]===5&&(r||n[1]!==Ee))),n.length=1,r?(t.e=t.e-e+1,n[0]=1):n[0]=t.e=0;else if(e<n.length){if(r=i===1&&n[e]>=5||i===2&&(n[e]>5||n[e]===5&&(r||n[e+1]!==Ee||n[e-1]&1))||i===3&&(r||!!n[0]),n.length=e,r){for(;++n[--e]>9;)if(n[e]=0,e===0){++t.e,n.unshift(1);break}}for(e=n.length;!n[--e];)n.pop()}return t}function Ue(t,e,i){var r=t.e,n=t.c.join(""),s=n.length;if(e)n=n.charAt(0)+(s>1?"."+n.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)n="0"+n;n="0."+n}else if(r>0)if(++r>s)for(r-=s;r--;)n+="0";else r<s&&(n=n.slice(0,r)+"."+n.slice(r));else s>1&&(n=n.charAt(0)+"."+n.slice(1));return t.s<0&&i?"-"+n:n}V.abs=function(){var t=new this.constructor(this);return t.s=1,t};V.cmp=function(t){var e,i=this,r=i.c,n=(t=new i.constructor(t)).c,s=i.s,a=t.s,d=i.e,g=t.e;if(!r[0]||!n[0])return r[0]?s:n[0]?-a:0;if(s!=a)return s;if(e=s<0,d!=g)return d>g^e?1:-1;for(a=(d=r.length)<(g=n.length)?d:g,s=-1;++s<a;)if(r[s]!=n[s])return r[s]>n[s]^e?1:-1;return d==g?0:d>g^e?1:-1};V.div=function(t){var e=this,i=e.constructor,r=e.c,n=(t=new i(t)).c,s=e.s==t.s?1:-1,a=i.DP;if(a!==~~a||a<0||a>De)throw Error(Nt);if(!n[0])throw Error(er);if(!r[0])return t.s=s,t.c=[t.e=0],t;var d,g,h,o,l,c=n.slice(),u=d=n.length,p=r.length,f=r.slice(0,d),b=f.length,x=t,_=x.c=[],w=0,y=a+(x.e=e.e-t.e)+1;for(x.s=s,s=y<0?0:y,c.unshift(0);b++<d;)f.push(0);do{for(h=0;h<10;h++){if(d!=(b=f.length))o=d>b?1:-1;else for(l=-1,o=0;++l<d;)if(n[l]!=f[l]){o=n[l]>f[l]?1:-1;break}if(o<0){for(g=b==d?n:c;b;){if(f[--b]<g[b]){for(l=b;l&&!f[--l];)f[l]=9;--f[l],f[b]+=10}f[b]-=g[b]}for(;!f[0];)f.shift()}else break}_[w++]=o?h:++h,f[0]&&o?f[b]=r[u]||0:f=[r[u]]}while((u++<p||f[0]!==Ee)&&s--);return!_[0]&&w!=1&&(_.shift(),x.e--,y--),w>y&&Be(x,y,i.RM,f[0]!==Ee),x};V.eq=function(t){return this.cmp(t)===0};V.gt=function(t){return this.cmp(t)>0};V.gte=function(t){return this.cmp(t)>-1};V.lt=function(t){return this.cmp(t)<0};V.lte=function(t){return this.cmp(t)<1};V.minus=V.sub=function(t){var e,i,r,n,s=this,a=s.constructor,d=s.s,g=(t=new a(t)).s;if(d!=g)return t.s=-g,s.plus(t);var h=s.c.slice(),o=s.e,l=t.c,c=t.e;if(!h[0]||!l[0])return l[0]?t.s=-g:h[0]?t=new a(s):t.s=1,t;if(d=o-c){for((n=d<0)?(d=-d,r=h):(c=o,r=l),r.reverse(),g=d;g--;)r.push(0);r.reverse()}else for(i=((n=h.length<l.length)?h:l).length,d=g=0;g<i;g++)if(h[g]!=l[g]){n=h[g]<l[g];break}if(n&&(r=h,h=l,l=r,t.s=-t.s),(g=(i=l.length)-(e=h.length))>0)for(;g--;)h[e++]=0;for(g=e;i>d;){if(h[--i]<l[i]){for(e=i;e&&!h[--e];)h[e]=9;--h[e],h[i]+=10}h[i]-=l[i]}for(;h[--g]===0;)h.pop();for(;h[0]===0;)h.shift(),--c;return h[0]||(t.s=1,h=[c=0]),t.c=h,t.e=c,t};V.mod=function(t){var e,i=this,r=i.constructor,n=i.s,s=(t=new r(t)).s;if(!t.c[0])throw Error(er);return i.s=t.s=1,e=t.cmp(i)==1,i.s=n,t.s=s,e?new r(i):(n=r.DP,s=r.RM,r.DP=r.RM=0,i=i.div(t),r.DP=n,r.RM=s,this.minus(i.times(t)))};V.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};V.plus=V.add=function(t){var e,i,r,n=this,s=n.constructor;if(t=new s(t),n.s!=t.s)return t.s=-t.s,n.minus(t);var a=n.e,d=n.c,g=t.e,h=t.c;if(!d[0]||!h[0])return h[0]||(d[0]?t=new s(n):t.s=n.s),t;if(d=d.slice(),e=a-g){for(e>0?(g=a,r=h):(e=-e,r=d),r.reverse();e--;)r.push(0);r.reverse()}for(d.length-h.length<0&&(r=h,h=d,d=r),e=h.length,i=0;e;d[e]%=10)i=(d[--e]=d[e]+h[e]+i)/10|0;for(i&&(d.unshift(i),++g),e=d.length;d[--e]===0;)d.pop();return t.c=d,t.e=g,t};V.pow=function(t){var e=this,i=new e.constructor("1"),r=i,n=t<0;if(t!==~~t||t<-vn||t>vn)throw Error(ze+"exponent");for(n&&(t=-t);t&1&&(r=r.times(e)),t>>=1,!!t;)e=e.times(e);return n?i.div(r):r};V.prec=function(t,e){if(t!==~~t||t<1||t>De)throw Error(ze+"precision");return Be(new this.constructor(this),t,e)};V.round=function(t,e){if(t===Ee)t=0;else if(t!==~~t||t<-De||t>De)throw Error(Nt);return Be(new this.constructor(this),t+this.e+1,e)};V.sqrt=function(){var t,e,i,r=this,n=r.constructor,s=r.s,a=r.e,d=new n("0.5");if(!r.c[0])return new n(r);if(s<0)throw Error(dt+"No square root");s=Math.sqrt(+Ue(r,!0,!0)),s===0||s===1/0?(e=r.c.join(""),e.length+a&1||(e+="0"),s=Math.sqrt(e),a=((a+1)/2|0)-(a<0||a&1),t=new n((s==1/0?"5e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+a)):t=new n(s+""),a=t.e+(n.DP+=4);do i=t,t=d.times(i.plus(r.div(i)));while(i.c.slice(0,a).join("")!==t.c.slice(0,a).join(""));return Be(t,(n.DP-=4)+t.e+1,n.RM)};V.times=V.mul=function(t){var e,i=this,r=i.constructor,n=i.c,s=(t=new r(t)).c,a=n.length,d=s.length,g=i.e,h=t.e;if(t.s=i.s==t.s?1:-1,!n[0]||!s[0])return t.c=[t.e=0],t;for(t.e=g+h,a<d&&(e=n,n=s,s=e,h=a,a=d,d=h),e=new Array(h=a+d);h--;)e[h]=0;for(g=d;g--;){for(d=0,h=a+g;h>g;)d=e[h]+s[g]*n[h-g-1]+d,e[h--]=d%10,d=d/10|0;e[h]=d}for(d?++t.e:e.shift(),g=e.length;!e[--g];)e.pop();return t.c=e,t};V.toExponential=function(t,e){var i=this,r=i.c[0];if(t!==Ee){if(t!==~~t||t<0||t>De)throw Error(Nt);for(i=Be(new i.constructor(i),++t,e);i.c.length<t;)i.c.push(0)}return Ue(i,!0,!!r)};V.toFixed=function(t,e){var i=this,r=i.c[0];if(t!==Ee){if(t!==~~t||t<0||t>De)throw Error(Nt);for(i=Be(new i.constructor(i),t+i.e+1,e),t=t+i.e+1;i.c.length<t;)i.c.push(0)}return Ue(i,!1,!!r)};V.toJSON=V.toString=function(){var t=this,e=t.constructor;return Ue(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};typeof Symbol<"u"&&(V[Symbol.for("nodejs.util.inspect.custom")]=V.toJSON);V.toNumber=function(){var t=+Ue(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(dt+"Imprecise conversion");return t};V.toPrecision=function(t,e){var i=this,r=i.constructor,n=i.c[0];if(t!==Ee){if(t!==~~t||t<1||t>De)throw Error(ze+"precision");for(i=Be(new r(i),t,e);i.c.length<t;)i.c.push(0)}return Ue(i,t<=i.e||i.e<=r.NE||i.e>=r.PE,!!n)};V.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(dt+"valueOf disallowed");return Ue(t,t.e<=e.NE||t.e>=e.PE,!0)};var go=tr();const bo=":host{display:block;position:relative;width:100%;height:48px;cursor:pointer;touch-action:none;contain:layout style}:host([hidden]){display:none!important}:host([disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([disabled]) sd-lit-input{opacity:1}#track-container{position:absolute;top:50%;left:0;height:2px;overflow:hidden}#track{position:absolute;width:100%;height:100%;transform-origin:left top;will-change:transform}:host(:focus) #thumb{top:11px;left:-14px;border-width:8px}#thumb[active]{top:7px!important;left:-18px!important;border-width:12px!important}#thumb{width:12px;height:12px;position:absolute;top:19px;left:-6px;border-radius:50%;border-width:0;background-clip:padding-box;-webkit-user-select:none;user-select:none;will-change:transform;border-style:solid}sd-lit-input{position:absolute;height:100%;width:var(--slider-suffix-width, 50px);right:0;text-align:center;outline:none;white-space:nowrap}sd-field-validation-message{position:absolute;bottom:0}";var vo=Object.defineProperty,de=(t,e,i,r)=>{for(var n=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(n=a(e,i,n)||n);return n&&vo(e,i,n),n},Se;const ce=(Se=class extends Re{constructor(){super(),this.thumbPosition=0,this._value=0,this._relativeValue=0,this.min=0,this.max=1,this.colorBlender=new Js,this.baseColor=Se.defaultColor,this.resizeObserver=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{this.lastKnownWidth!==this.trackContainerWidth&&(this.lastKnownWidth=this.trackContainerWidth,this.doUpdateRelativeValue(this._relativeValue,!0))})})}firstUpdated(e){super.firstUpdated(e),this.updateValue(Number.parseFloat(this.getAttribute("value"))||this._value),this.addEventListener(this.useTouchEvents()?"touchstart":"pointerdown",i=>{!this.hasAttribute("disabled")&&i.composedPath().indexOf(this.inputElement)===-1&&(i.preventDefault(),i.pointerId&&this.setPointerCapture(i.pointerId),this.focus(),this.listenMoveEvents(i.clientX||i.changedTouches[0].clientX))}),this.addEventListener("keydown",this.handleKeyDown,!0),this.setAttribute("aria-valuemin",this.min.toString()),this.setAttribute("aria-valuemax",this.max.toString()),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}connectedCallback(){super.connectedCallback(),["colors","min","max","step","editable","inputSuffix","value"].forEach(e=>{this.upgradeProperty(e)}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.lastKnownWidth=void 0,this.resizeObserver.disconnect()}upgradeProperty(e){if(Object.prototype.hasOwnProperty.call(this,e)){const i=this[e];delete this[e],this[e]=i}}static get observedAttributes(){const e=super.observedAttributes;return e.push("value"),e}attributeChangedCallback(e,i,r){super.attributeChangedCallback(e,i,r),(e==="value"||e=="step")&&this.hasUpdated&&this.updateValue(Number.parseFloat(r))}updateValue(e){this.setValueInternal(e)&&(this.inputElement&&(this.inputElement.value=this.formattedValue()),this._value!=e&&this.fireBothValueChangeEvents())}get value(){return this._value}set value(e){this.setValueInternal(e)&&this.fireBothValueChangeEvents()}roundToStep(e){let i=Number.parseFloat(e);if(Number.isNaN(i))return this._value;if(this.step&&i>=this.min&&i<=this.max){const r=new go(i).minus(this.min).div(this.step).round().mul(this.step).plus(this.min);i=Number.parseFloat(r.toString())}return i}setValueInternal(e){const i=this.roundToStep(e),r=this.clampValue?Math.max(this.min,Math.min(this.max,i)):i;if(this._value!==r){const n=this._value;return this._value=r,this.relativeValue=(r-this.min)/(this.max-this.min),this.setAttribute("aria-valuenow",this._value.toString()),this.requestUpdate("value",n),!0}return!1}get relativeValue(){return this._relativeValue}set relativeValue(e){this._relativeValue!==e&&this.doUpdateRelativeValue(e)}doUpdateRelativeValue(e,i){this._relativeValue=e,this.thumbPosition=Math.min(Math.max(0,e),1)*this.trackContainerWidth;const r=this.min+(this.max-this.min)*this._relativeValue;this.setValueInternal(r),!i&&this.colors&&this.colors.size&&(this.baseColor=this.colorBlender.blend(this._relativeValue))}get colors(){return this.colorBlender.colors}set colors(e){this.colorBlender.colors=e,this.colors&&this.colors.size?this.baseColor=this.colorBlender.blend(this._relativeValue):this.baseColor=Se.defaultColor}static get styles(){return[Ri`
403
403
  ${Rt(bo)}
404
404
  `]}render(){const e=this.colorBlender.transparentize(this.baseColor,.26),i=`background-color:${e}; right: ${this.editable?"calc(var(--slider-suffix-width, 50px) + 8px)":"0"}`,r=`transform: scaleX(${this.relativeValue}); background-color:${this.baseColor};`,n=`transform: translateX(${this.thumbPosition}px); background-color:${this.baseColor}; border-color:${e};`;return ge`
405
405
  <div id="track-container" style="${i}">
@@ -71,7 +71,7 @@ var window;(window||={})["@cas-smartdesign/lit-slider"]=(()=>{var ft=Object.defi
71
71
  </sd-field-validation-message>
72
72
  `}
73
73
  </div>
74
- `}updated(e){super.updated(e),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0),this.rows>1&&((e.has("min")||e.has("max")||e.has("pattern"))&&console.warn("min, max & pattern attributes are not supported with multiple rows configuration."),this.type!="text"&&console.warn(`type: ${this.type} is not supported with multiple rows configuration.`))}update(e){if(super.update(e),e.has("validationMessage")&&(this.validationMessage?this._internals?.setValidity({customError:!0},this.validationMessage):this._internals?.setValidity(this.inputElement.validity,this.inputElement.validationMessage)),this._initialized&&e.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(e){this.dispatchEvent(new CustomEvent(`${e?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value)}updateFormValidity(){if(this.validationMessage==null){this._internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage);let e=this.shadowRoot.querySelector("sd-field-validation-message");this.requestUpdate("validationMessage",e==null?null:e.message)}}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted||this.type==="date"}setFormValue(e){this._internals?.setFormValue(e),this.updateFormValidity()}formResetCallback(){this.value=this._initialValue}formDisabledCallback(e){this.effectiveDisabled=e||this.hasAttribute("disabled")}formAssociatedCallback(e){this._needsAutocompletedCheck=!0}formStateRestoreCallback(e,t){typeof e=="string"&&(this.value=e)}},S.ID=ke,S.DEFAULT_MAX_LENGTH=524288,S.formAssociated=!0,S.shadowRootOptions={...w.shadowRootOptions,delegatesFocus:Xt},S);m([u({type:String,reflect:!0})],f.prototype,"label");m([u({type:String,attribute:!0})],f.prototype,"validationMessage");m([u({type:String,attribute:!0})],f.prototype,"validationIconSrc");m([u({type:st,attribute:!0,reflect:!0})],f.prototype,"validationLevel");m([u({type:String,hasChanged(e,t){return t!=null&&t!=e}})],f.prototype,"currentText");m([u({type:Boolean,attribute:!0})],f.prototype,"alwaysFloatLabel");m([u({type:Boolean,attribute:!0})],f.prototype,"autocompleted");m([u({type:Number,attribute:!0})],f.prototype,"rows");m([u({type:Boolean,reflect:!0,attribute:"effective-disabled"})],f.prototype,"effectiveDisabled");m([u({type:Boolean,reflect:!0,attribute:"extended-prefix"})],f.prototype,"extendedPrefix");m([u({type:String,reflect:!0})],f.prototype,"type");m([u({type:String,reflect:!0})],f.prototype,"placeholder");m([u({type:String,reflect:!0})],f.prototype,"sdAriaLabel");m([u({type:Number,reflect:!0})],f.prototype,"maxlength");m([u({type:Boolean,reflect:!0})],f.prototype,"readonly");m([u({type:Boolean,reflect:!0})],f.prototype,"required");m([u({type:String,reflect:!0})],f.prototype,"name");m([u({type:Boolean,reflect:!0})],f.prototype,"inactive");m([u({type:String,attribute:!0})],f.prototype,"autocomplete");m([u({type:String,attribute:!0})],f.prototype,"min");m([u({type:String,attribute:!0})],f.prototype,"max");m([u({type:String,attribute:!0})],f.prototype,"pattern");var kt=f;customElements.get(kt.ID)||customElements.define(kt.ID,kt);var De=20,Ve=1,I=1e6,Gt=1e6,Le=-7,Te=21,Ie=!1,rt="[big.js] ",O=rt+"Invalid ",ct=O+"decimal places",Oe=O+"rounding mode",Kt=rt+"Division by zero",d={},C=void 0,Ne=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Jt(){function e(t){var i=this;if(!(i instanceof e))return t===C&&arguments.length===0?Jt():new e(t);if(t instanceof e)i.s=t.s,i.e=t.e,i.c=t.c.slice();else{if(typeof t!="string"){if(e.strict===!0&&typeof t!="bigint")throw TypeError(O+"value");t=t===0&&1/t<0?"-0":String(t)}Ue(i,t)}i.constructor=e}return e.prototype=d,e.DP=De,e.RM=Ve,e.NE=Le,e.PE=Te,e.strict=Ie,e.roundDown=0,e.roundHalfUp=1,e.roundHalfEven=2,e.roundUp=3,e}function Ue(e,t){var i,s,r;if(!Ne.test(t))throw Error(O+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(i=t.indexOf("."))>-1&&(t=t.replace(".","")),(s=t.search(/e/i))>0?(i<0&&(i=s),i+=+t.slice(s+1),t=t.substring(0,s)):i<0&&(i=t.length),r=t.length,s=0;s<r&&t.charAt(s)=="0";)++s;if(s==r)e.c=[e.e=0];else{for(;r>0&&t.charAt(--r)=="0";);for(e.e=i-s-1,e.c=[],i=0;s<=r;)e.c[i++]=+t.charAt(s++)}return e}function N(e,t,i,s){var r=e.c;if(i===C&&(i=e.constructor.RM),i!==0&&i!==1&&i!==2&&i!==3)throw Error(Oe);if(t<1)s=i===3&&(s||!!r[0])||t===0&&(i===1&&r[0]>=5||i===2&&(r[0]>5||r[0]===5&&(s||r[1]!==C))),r.length=1,s?(e.e=e.e-t+1,r[0]=1):r[0]=e.e=0;else if(t<r.length){if(s=i===1&&r[t]>=5||i===2&&(r[t]>5||r[t]===5&&(s||r[t+1]!==C||r[t-1]&1))||i===3&&(s||!!r[0]),r.length=t,s){for(;++r[--t]>9;)if(r[t]=0,t===0){++e.e,r.unshift(1);break}}for(t=r.length;!r[--t];)r.pop()}return e}function U(e,t,i){var s=e.e,r=e.c.join(""),o=r.length;if(t)r=r.charAt(0)+(o>1?"."+r.slice(1):"")+(s<0?"e":"e+")+s;else if(s<0){for(;++s;)r="0"+r;r="0."+r}else if(s>0)if(++s>o)for(s-=o;s--;)r+="0";else s<o&&(r=r.slice(0,s)+"."+r.slice(s));else o>1&&(r=r.charAt(0)+"."+r.slice(1));return e.s<0&&i?"-"+r:r}d.abs=function(){var e=new this.constructor(this);return e.s=1,e};d.cmp=function(e){var t,i=this,s=i.c,r=(e=new i.constructor(e)).c,o=i.s,n=e.s,a=i.e,l=e.e;if(!s[0]||!r[0])return s[0]?o:r[0]?-n:0;if(o!=n)return o;if(t=o<0,a!=l)return a>l^t?1:-1;for(n=(a=s.length)<(l=r.length)?a:l,o=-1;++o<n;)if(s[o]!=r[o])return s[o]>r[o]^t?1:-1;return a==l?0:a>l^t?1:-1};d.div=function(e){var t=this,i=t.constructor,s=t.c,r=(e=new i(e)).c,o=t.s==e.s?1:-1,n=i.DP;if(n!==~~n||n<0||n>I)throw Error(ct);if(!r[0])throw Error(Kt);if(!s[0])return e.s=o,e.c=[e.e=0],e;var a,l,h,p,c,g=r.slice(),E=a=r.length,B=s.length,b=s.slice(0,a),x=b.length,H=e,dt=H.c=[],pt=0,W=n+(H.e=t.e-e.e)+1;for(H.s=o,o=W<0?0:W,g.unshift(0);x++<a;)b.push(0);do{for(h=0;h<10;h++){if(a!=(x=b.length))p=a>x?1:-1;else for(c=-1,p=0;++c<a;)if(r[c]!=b[c]){p=r[c]>b[c]?1:-1;break}if(p<0){for(l=x==a?r:g;x;){if(b[--x]<l[x]){for(c=x;c&&!b[--c];)b[c]=9;--b[c],b[x]+=10}b[x]-=l[x]}for(;!b[0];)b.shift()}else break}dt[pt++]=p?h:++h,b[0]&&p?b[x]=s[E]||0:b=[s[E]]}while((E++<B||b[0]!==C)&&o--);return!dt[0]&&pt!=1&&(dt.shift(),H.e--,W--),pt>W&&N(H,W,i.RM,b[0]!==C),H};d.eq=function(e){return this.cmp(e)===0};d.gt=function(e){return this.cmp(e)>0};d.gte=function(e){return this.cmp(e)>-1};d.lt=function(e){return this.cmp(e)<0};d.lte=function(e){return this.cmp(e)<1};d.minus=d.sub=function(e){var t,i,s,r,o=this,n=o.constructor,a=o.s,l=(e=new n(e)).s;if(a!=l)return e.s=-l,o.plus(e);var h=o.c.slice(),p=o.e,c=e.c,g=e.e;if(!h[0]||!c[0])return c[0]?e.s=-l:h[0]?e=new n(o):e.s=1,e;if(a=p-g){for((r=a<0)?(a=-a,s=h):(g=p,s=c),s.reverse(),l=a;l--;)s.push(0);s.reverse()}else for(i=((r=h.length<c.length)?h:c).length,a=l=0;l<i;l++)if(h[l]!=c[l]){r=h[l]<c[l];break}if(r&&(s=h,h=c,c=s,e.s=-e.s),(l=(i=c.length)-(t=h.length))>0)for(;l--;)h[t++]=0;for(l=t;i>a;){if(h[--i]<c[i]){for(t=i;t&&!h[--t];)h[t]=9;--h[t],h[i]+=10}h[i]-=c[i]}for(;h[--l]===0;)h.pop();for(;h[0]===0;)h.shift(),--g;return h[0]||(e.s=1,h=[g=0]),e.c=h,e.e=g,e};d.mod=function(e){var t,i=this,s=i.constructor,r=i.s,o=(e=new s(e)).s;if(!e.c[0])throw Error(Kt);return i.s=e.s=1,t=e.cmp(i)==1,i.s=r,e.s=o,t?new s(i):(r=s.DP,o=s.RM,s.DP=s.RM=0,i=i.div(e),s.DP=r,s.RM=o,this.minus(i.times(e)))};d.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e};d.plus=d.add=function(e){var t,i,s,r=this,o=r.constructor;if(e=new o(e),r.s!=e.s)return e.s=-e.s,r.minus(e);var n=r.e,a=r.c,l=e.e,h=e.c;if(!a[0]||!h[0])return h[0]||(a[0]?e=new o(r):e.s=r.s),e;if(a=a.slice(),t=n-l){for(t>0?(l=n,s=h):(t=-t,s=a),s.reverse();t--;)s.push(0);s.reverse()}for(a.length-h.length<0&&(s=h,h=a,a=s),t=h.length,i=0;t;a[t]%=10)i=(a[--t]=a[t]+h[t]+i)/10|0;for(i&&(a.unshift(i),++l),t=a.length;a[--t]===0;)a.pop();return e.c=a,e.e=l,e};d.pow=function(e){var t=this,i=new t.constructor("1"),s=i,r=e<0;if(e!==~~e||e<-Gt||e>Gt)throw Error(O+"exponent");for(r&&(e=-e);e&1&&(s=s.times(t)),e>>=1,!!e;)t=t.times(t);return r?i.div(s):s};d.prec=function(e,t){if(e!==~~e||e<1||e>I)throw Error(O+"precision");return N(new this.constructor(this),e,t)};d.round=function(e,t){if(e===C)e=0;else if(e!==~~e||e<-I||e>I)throw Error(ct);return N(new this.constructor(this),e+this.e+1,t)};d.sqrt=function(){var e,t,i,s=this,r=s.constructor,o=s.s,n=s.e,a=new r("0.5");if(!s.c[0])return new r(s);if(o<0)throw Error(rt+"No square root");o=Math.sqrt(+U(s,!0,!0)),o===0||o===1/0?(t=s.c.join(""),t.length+n&1||(t+="0"),o=Math.sqrt(t),n=((n+1)/2|0)-(n<0||n&1),e=new r((o==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+n)):e=new r(o+""),n=e.e+(r.DP+=4);do i=e,e=a.times(i.plus(s.div(i)));while(i.c.slice(0,n).join("")!==e.c.slice(0,n).join(""));return N(e,(r.DP-=4)+e.e+1,r.RM)};d.times=d.mul=function(e){var t,i=this,s=i.constructor,r=i.c,o=(e=new s(e)).c,n=r.length,a=o.length,l=i.e,h=e.e;if(e.s=i.s==e.s?1:-1,!r[0]||!o[0])return e.c=[e.e=0],e;for(e.e=l+h,n<a&&(t=r,r=o,o=t,h=n,n=a,a=h),t=new Array(h=n+a);h--;)t[h]=0;for(l=a;l--;){for(a=0,h=n+l;h>l;)a=t[h]+o[l]*r[h-l-1]+a,t[h--]=a%10,a=a/10|0;t[h]=a}for(a?++e.e:t.shift(),l=t.length;!t[--l];)t.pop();return e.c=t,e};d.toExponential=function(e,t){var i=this,s=i.c[0];if(e!==C){if(e!==~~e||e<0||e>I)throw Error(ct);for(i=N(new i.constructor(i),++e,t);i.c.length<e;)i.c.push(0)}return U(i,!0,!!s)};d.toFixed=function(e,t){var i=this,s=i.c[0];if(e!==C){if(e!==~~e||e<0||e>I)throw Error(ct);for(i=N(new i.constructor(i),e+i.e+1,t),e=e+i.e+1;i.c.length<e;)i.c.push(0)}return U(i,!1,!!s)};d.toJSON=d.toString=function(){var e=this,t=e.constructor;return U(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])};typeof Symbol<"u"&&(d[Symbol.for("nodejs.util.inspect.custom")]=d.toJSON);d.toNumber=function(){var e=+U(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(rt+"Imprecise conversion");return e};d.toPrecision=function(e,t){var i=this,s=i.constructor,r=i.c[0];if(e!==C){if(e!==~~e||e<1||e>I)throw Error(O+"precision");for(i=N(new s(i),e,t);i.c.length<e;)i.c.push(0)}return U(i,e<=i.e||i.e<=s.NE||i.e>=s.PE,!!r)};d.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(rt+"valueOf disallowed");return U(e,e.e<=t.NE||e.e>=t.PE,!0)};var Zt=Jt();var Rt=class{constructor(){this._rgbaColors=new Map,this._originalColors=new Map}get colors(){return this._originalColors}set colors(t){if(this._rgbaColors.clear(),this._originalColors=t,t&&t.size){if(Array.from(t.keys()).find(s=>s<0||s>1))throw Error("The keys of the colors must represent the relative value where the color is fully applied.");t.forEach((s,r)=>{let o=this.convertFromRGBAString(s)||this.convertFromHex(s);if(Object.keys(o).length===0&&o.constructor===Object)throw Error(`Cannot convert color: ${s} to rgba-color`);this._rgbaColors.set(r,o)});let i=Array.from(this._rgbaColors.entries()).sort();this._rgbaColors=new Map(i)}}blend(t){if(!this._rgbaColors.size)throw Error("It is not possible to blend without a color list.");let i,s;for(let o of this._rgbaColors)if(i||(i=o),o[0]<t)i=o;else if(o[0]===t){i=s=o;break}else{s=o;break}s||(s=i);let r=s[0]-i[0];return r?this.blendColors(i[1],s[1],(t-i[0])/r):this.convertToRGBAString(i[1])}blendColors(t,i,s){return this.convertToRGBAString({red:Math.round(t.red+(i.red-t.red)*s),green:Math.round(t.green+(i.green-t.green)*s),blue:Math.round(t.blue+(i.blue-t.blue)*s),alpha:t.alpha+(i.alpha-t.alpha)*s})}convertFromHex(t){let i=Ct(t);return i.alpha>1&&(i.alpha/=255),i}convertFromRGBAString(t){let i=t.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);return i?{red:parseInt(i[1],10),green:parseInt(i[2],10),blue:parseInt(i[3],10),alpha:parseInt(i[4],10)||1}:null}transparentize(t,i){return this.convertToRGBAString(this.convertFromRGBAString(t),i)}convertToRGBAString(t,i){return`rgba(${t.red},${t.green},${t.blue},${i||t.alpha})`}},Be=":host{display:block;position:relative;width:100%;height:48px;cursor:pointer;touch-action:none;contain:layout style}:host([hidden]){display:none!important}:host([disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([disabled]) sd-lit-input{opacity:1}#track-container{position:absolute;top:50%;left:0;height:2px;overflow:hidden}#track{position:absolute;width:100%;height:100%;transform-origin:left top;will-change:transform}:host(:focus) #thumb{top:11px;left:-14px;border-width:8px}#thumb[active]{top:7px!important;left:-18px!important;border-width:12px!important}#thumb{width:12px;height:12px;position:absolute;top:19px;left:-6px;border-radius:50%;border-width:0;background-clip:padding-box;-webkit-user-select:none;user-select:none;will-change:transform;border-style:solid}sd-lit-input{position:absolute;height:100%;width:var(--slider-suffix-width, 50px);right:0;text-align:center;outline:none;white-space:nowrap}sd-field-validation-message{position:absolute;bottom:0}",He=Object.defineProperty,_=(e,t,i,s)=>{for(var r=void 0,o=e.length-1,n;o>=0;o--)(n=e[o])&&(r=n(t,i,r)||r);return r&&He(t,i,r),r},j,$=(j=class extends w{constructor(){super(),this.thumbPosition=0,this._value=0,this._relativeValue=0,this.min=0,this.max=1,this.colorBlender=new Rt,this.baseColor=j.defaultColor,this.resizeObserver=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{this.lastKnownWidth!==this.trackContainerWidth&&(this.lastKnownWidth=this.trackContainerWidth,this.doUpdateRelativeValue(this._relativeValue,!0))})})}firstUpdated(e){super.firstUpdated(e),this.updateValue(Number.parseFloat(this.getAttribute("value"))||this._value),this.addEventListener(this.useTouchEvents()?"touchstart":"pointerdown",t=>{!this.hasAttribute("disabled")&&t.composedPath().indexOf(this.inputElement)===-1&&(t.preventDefault(),t.pointerId&&this.setPointerCapture(t.pointerId),this.focus(),this.listenMoveEvents(t.clientX||t.changedTouches[0].clientX))}),this.addEventListener("keydown",this.handleKeyDown,!0),this.setAttribute("aria-valuemin",this.min.toString()),this.setAttribute("aria-valuemax",this.max.toString()),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}connectedCallback(){super.connectedCallback(),["colors","min","max","step","editable","inputSuffix","value"].forEach(e=>{this.upgradeProperty(e)}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.lastKnownWidth=void 0,this.resizeObserver.disconnect()}upgradeProperty(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}static get observedAttributes(){let e=super.observedAttributes;return e.push("value"),e}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e==="value"||e=="step")&&this.hasUpdated&&this.updateValue(Number.parseFloat(i))}updateValue(e){this.setValueInternal(e)&&(this.inputElement&&(this.inputElement.value=this.formattedValue()),this._value!=e&&this.fireBothValueChangeEvents())}get value(){return this._value}set value(e){this.setValueInternal(e)&&this.fireBothValueChangeEvents()}roundToStep(e){let t=Number.parseFloat(e);if(Number.isNaN(t))return this._value;if(this.step&&t>=this.min&&t<=this.max){let i=new Zt(t).minus(this.min).div(this.step).round().mul(this.step).plus(this.min);t=Number.parseFloat(i.toString())}return t}setValueInternal(e){let t=this.roundToStep(e),i=this.clampValue?Math.max(this.min,Math.min(this.max,t)):t;if(this._value!==i){let s=this._value;return this._value=i,this.relativeValue=(i-this.min)/(this.max-this.min),this.setAttribute("aria-valuenow",this._value.toString()),this.requestUpdate("value",s),!0}return!1}get relativeValue(){return this._relativeValue}set relativeValue(e){this._relativeValue!==e&&this.doUpdateRelativeValue(e)}doUpdateRelativeValue(e,t){this._relativeValue=e,this.thumbPosition=Math.min(Math.max(0,e),1)*this.trackContainerWidth;let i=this.min+(this.max-this.min)*this._relativeValue;this.setValueInternal(i),!t&&this.colors&&this.colors.size&&(this.baseColor=this.colorBlender.blend(this._relativeValue))}get colors(){return this.colorBlender.colors}set colors(e){this.colorBlender.colors=e,this.colors&&this.colors.size?this.baseColor=this.colorBlender.blend(this._relativeValue):this.baseColor=j.defaultColor}static get styles(){return[R`
74
+ `}updated(e){super.updated(e),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0),this.rows>1&&((e.has("min")||e.has("max")||e.has("pattern"))&&console.warn("min, max & pattern attributes are not supported with multiple rows configuration."),this.type!="text"&&console.warn(`type: ${this.type} is not supported with multiple rows configuration.`))}update(e){if(super.update(e),e.has("validationMessage")&&(this.validationMessage?this._internals?.setValidity({customError:!0},this.validationMessage):this._internals?.setValidity(this.inputElement.validity,this.inputElement.validationMessage)),this._initialized&&e.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(e){this.dispatchEvent(new CustomEvent(`${e?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value)}updateFormValidity(){if(this.validationMessage==null&&this.inputElement!=null){this._internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage);let e=this.shadowRoot.querySelector("sd-field-validation-message");this.requestUpdate("validationMessage",e==null?null:e.message)}}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted||this.type==="date"}setFormValue(e){this._internals?.setFormValue(e),this.updateFormValidity()}formResetCallback(){this.value=this._initialValue}formDisabledCallback(e){this.effectiveDisabled=e||this.hasAttribute("disabled")}formAssociatedCallback(e){this._needsAutocompletedCheck=!0}formStateRestoreCallback(e,t){typeof e=="string"&&(this.value=e)}},S.ID=ke,S.DEFAULT_MAX_LENGTH=524288,S.formAssociated=!0,S.shadowRootOptions={...w.shadowRootOptions,delegatesFocus:Xt},S);m([u({type:String,reflect:!0})],f.prototype,"label");m([u({type:String,attribute:!0})],f.prototype,"validationMessage");m([u({type:String,attribute:!0})],f.prototype,"validationIconSrc");m([u({type:st,attribute:!0,reflect:!0})],f.prototype,"validationLevel");m([u({type:String,hasChanged(e,t){return t!=null&&t!=e}})],f.prototype,"currentText");m([u({type:Boolean,attribute:!0})],f.prototype,"alwaysFloatLabel");m([u({type:Boolean,attribute:!0})],f.prototype,"autocompleted");m([u({type:Number,attribute:!0})],f.prototype,"rows");m([u({type:Boolean,reflect:!0,attribute:"effective-disabled"})],f.prototype,"effectiveDisabled");m([u({type:Boolean,reflect:!0,attribute:"extended-prefix"})],f.prototype,"extendedPrefix");m([u({type:String,reflect:!0})],f.prototype,"type");m([u({type:String,reflect:!0})],f.prototype,"placeholder");m([u({type:String,reflect:!0})],f.prototype,"sdAriaLabel");m([u({type:Number,reflect:!0})],f.prototype,"maxlength");m([u({type:Boolean,reflect:!0})],f.prototype,"readonly");m([u({type:Boolean,reflect:!0})],f.prototype,"required");m([u({type:String,reflect:!0})],f.prototype,"name");m([u({type:Boolean,reflect:!0})],f.prototype,"inactive");m([u({type:String,attribute:!0})],f.prototype,"autocomplete");m([u({type:String,attribute:!0})],f.prototype,"min");m([u({type:String,attribute:!0})],f.prototype,"max");m([u({type:String,attribute:!0})],f.prototype,"pattern");var kt=f;customElements.get(kt.ID)||customElements.define(kt.ID,kt);var De=20,Ve=1,I=1e6,Gt=1e6,Le=-7,Te=21,Ie=!1,rt="[big.js] ",O=rt+"Invalid ",ct=O+"decimal places",Oe=O+"rounding mode",Kt=rt+"Division by zero",d={},C=void 0,Ne=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Jt(){function e(t){var i=this;if(!(i instanceof e))return t===C&&arguments.length===0?Jt():new e(t);if(t instanceof e)i.s=t.s,i.e=t.e,i.c=t.c.slice();else{if(typeof t!="string"){if(e.strict===!0&&typeof t!="bigint")throw TypeError(O+"value");t=t===0&&1/t<0?"-0":String(t)}Ue(i,t)}i.constructor=e}return e.prototype=d,e.DP=De,e.RM=Ve,e.NE=Le,e.PE=Te,e.strict=Ie,e.roundDown=0,e.roundHalfUp=1,e.roundHalfEven=2,e.roundUp=3,e}function Ue(e,t){var i,s,r;if(!Ne.test(t))throw Error(O+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(i=t.indexOf("."))>-1&&(t=t.replace(".","")),(s=t.search(/e/i))>0?(i<0&&(i=s),i+=+t.slice(s+1),t=t.substring(0,s)):i<0&&(i=t.length),r=t.length,s=0;s<r&&t.charAt(s)=="0";)++s;if(s==r)e.c=[e.e=0];else{for(;r>0&&t.charAt(--r)=="0";);for(e.e=i-s-1,e.c=[],i=0;s<=r;)e.c[i++]=+t.charAt(s++)}return e}function N(e,t,i,s){var r=e.c;if(i===C&&(i=e.constructor.RM),i!==0&&i!==1&&i!==2&&i!==3)throw Error(Oe);if(t<1)s=i===3&&(s||!!r[0])||t===0&&(i===1&&r[0]>=5||i===2&&(r[0]>5||r[0]===5&&(s||r[1]!==C))),r.length=1,s?(e.e=e.e-t+1,r[0]=1):r[0]=e.e=0;else if(t<r.length){if(s=i===1&&r[t]>=5||i===2&&(r[t]>5||r[t]===5&&(s||r[t+1]!==C||r[t-1]&1))||i===3&&(s||!!r[0]),r.length=t,s){for(;++r[--t]>9;)if(r[t]=0,t===0){++e.e,r.unshift(1);break}}for(t=r.length;!r[--t];)r.pop()}return e}function U(e,t,i){var s=e.e,r=e.c.join(""),o=r.length;if(t)r=r.charAt(0)+(o>1?"."+r.slice(1):"")+(s<0?"e":"e+")+s;else if(s<0){for(;++s;)r="0"+r;r="0."+r}else if(s>0)if(++s>o)for(s-=o;s--;)r+="0";else s<o&&(r=r.slice(0,s)+"."+r.slice(s));else o>1&&(r=r.charAt(0)+"."+r.slice(1));return e.s<0&&i?"-"+r:r}d.abs=function(){var e=new this.constructor(this);return e.s=1,e};d.cmp=function(e){var t,i=this,s=i.c,r=(e=new i.constructor(e)).c,o=i.s,n=e.s,a=i.e,l=e.e;if(!s[0]||!r[0])return s[0]?o:r[0]?-n:0;if(o!=n)return o;if(t=o<0,a!=l)return a>l^t?1:-1;for(n=(a=s.length)<(l=r.length)?a:l,o=-1;++o<n;)if(s[o]!=r[o])return s[o]>r[o]^t?1:-1;return a==l?0:a>l^t?1:-1};d.div=function(e){var t=this,i=t.constructor,s=t.c,r=(e=new i(e)).c,o=t.s==e.s?1:-1,n=i.DP;if(n!==~~n||n<0||n>I)throw Error(ct);if(!r[0])throw Error(Kt);if(!s[0])return e.s=o,e.c=[e.e=0],e;var a,l,h,p,c,g=r.slice(),E=a=r.length,B=s.length,b=s.slice(0,a),x=b.length,H=e,dt=H.c=[],pt=0,W=n+(H.e=t.e-e.e)+1;for(H.s=o,o=W<0?0:W,g.unshift(0);x++<a;)b.push(0);do{for(h=0;h<10;h++){if(a!=(x=b.length))p=a>x?1:-1;else for(c=-1,p=0;++c<a;)if(r[c]!=b[c]){p=r[c]>b[c]?1:-1;break}if(p<0){for(l=x==a?r:g;x;){if(b[--x]<l[x]){for(c=x;c&&!b[--c];)b[c]=9;--b[c],b[x]+=10}b[x]-=l[x]}for(;!b[0];)b.shift()}else break}dt[pt++]=p?h:++h,b[0]&&p?b[x]=s[E]||0:b=[s[E]]}while((E++<B||b[0]!==C)&&o--);return!dt[0]&&pt!=1&&(dt.shift(),H.e--,W--),pt>W&&N(H,W,i.RM,b[0]!==C),H};d.eq=function(e){return this.cmp(e)===0};d.gt=function(e){return this.cmp(e)>0};d.gte=function(e){return this.cmp(e)>-1};d.lt=function(e){return this.cmp(e)<0};d.lte=function(e){return this.cmp(e)<1};d.minus=d.sub=function(e){var t,i,s,r,o=this,n=o.constructor,a=o.s,l=(e=new n(e)).s;if(a!=l)return e.s=-l,o.plus(e);var h=o.c.slice(),p=o.e,c=e.c,g=e.e;if(!h[0]||!c[0])return c[0]?e.s=-l:h[0]?e=new n(o):e.s=1,e;if(a=p-g){for((r=a<0)?(a=-a,s=h):(g=p,s=c),s.reverse(),l=a;l--;)s.push(0);s.reverse()}else for(i=((r=h.length<c.length)?h:c).length,a=l=0;l<i;l++)if(h[l]!=c[l]){r=h[l]<c[l];break}if(r&&(s=h,h=c,c=s,e.s=-e.s),(l=(i=c.length)-(t=h.length))>0)for(;l--;)h[t++]=0;for(l=t;i>a;){if(h[--i]<c[i]){for(t=i;t&&!h[--t];)h[t]=9;--h[t],h[i]+=10}h[i]-=c[i]}for(;h[--l]===0;)h.pop();for(;h[0]===0;)h.shift(),--g;return h[0]||(e.s=1,h=[g=0]),e.c=h,e.e=g,e};d.mod=function(e){var t,i=this,s=i.constructor,r=i.s,o=(e=new s(e)).s;if(!e.c[0])throw Error(Kt);return i.s=e.s=1,t=e.cmp(i)==1,i.s=r,e.s=o,t?new s(i):(r=s.DP,o=s.RM,s.DP=s.RM=0,i=i.div(e),s.DP=r,s.RM=o,this.minus(i.times(e)))};d.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e};d.plus=d.add=function(e){var t,i,s,r=this,o=r.constructor;if(e=new o(e),r.s!=e.s)return e.s=-e.s,r.minus(e);var n=r.e,a=r.c,l=e.e,h=e.c;if(!a[0]||!h[0])return h[0]||(a[0]?e=new o(r):e.s=r.s),e;if(a=a.slice(),t=n-l){for(t>0?(l=n,s=h):(t=-t,s=a),s.reverse();t--;)s.push(0);s.reverse()}for(a.length-h.length<0&&(s=h,h=a,a=s),t=h.length,i=0;t;a[t]%=10)i=(a[--t]=a[t]+h[t]+i)/10|0;for(i&&(a.unshift(i),++l),t=a.length;a[--t]===0;)a.pop();return e.c=a,e.e=l,e};d.pow=function(e){var t=this,i=new t.constructor("1"),s=i,r=e<0;if(e!==~~e||e<-Gt||e>Gt)throw Error(O+"exponent");for(r&&(e=-e);e&1&&(s=s.times(t)),e>>=1,!!e;)t=t.times(t);return r?i.div(s):s};d.prec=function(e,t){if(e!==~~e||e<1||e>I)throw Error(O+"precision");return N(new this.constructor(this),e,t)};d.round=function(e,t){if(e===C)e=0;else if(e!==~~e||e<-I||e>I)throw Error(ct);return N(new this.constructor(this),e+this.e+1,t)};d.sqrt=function(){var e,t,i,s=this,r=s.constructor,o=s.s,n=s.e,a=new r("0.5");if(!s.c[0])return new r(s);if(o<0)throw Error(rt+"No square root");o=Math.sqrt(+U(s,!0,!0)),o===0||o===1/0?(t=s.c.join(""),t.length+n&1||(t+="0"),o=Math.sqrt(t),n=((n+1)/2|0)-(n<0||n&1),e=new r((o==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+n)):e=new r(o+""),n=e.e+(r.DP+=4);do i=e,e=a.times(i.plus(s.div(i)));while(i.c.slice(0,n).join("")!==e.c.slice(0,n).join(""));return N(e,(r.DP-=4)+e.e+1,r.RM)};d.times=d.mul=function(e){var t,i=this,s=i.constructor,r=i.c,o=(e=new s(e)).c,n=r.length,a=o.length,l=i.e,h=e.e;if(e.s=i.s==e.s?1:-1,!r[0]||!o[0])return e.c=[e.e=0],e;for(e.e=l+h,n<a&&(t=r,r=o,o=t,h=n,n=a,a=h),t=new Array(h=n+a);h--;)t[h]=0;for(l=a;l--;){for(a=0,h=n+l;h>l;)a=t[h]+o[l]*r[h-l-1]+a,t[h--]=a%10,a=a/10|0;t[h]=a}for(a?++e.e:t.shift(),l=t.length;!t[--l];)t.pop();return e.c=t,e};d.toExponential=function(e,t){var i=this,s=i.c[0];if(e!==C){if(e!==~~e||e<0||e>I)throw Error(ct);for(i=N(new i.constructor(i),++e,t);i.c.length<e;)i.c.push(0)}return U(i,!0,!!s)};d.toFixed=function(e,t){var i=this,s=i.c[0];if(e!==C){if(e!==~~e||e<0||e>I)throw Error(ct);for(i=N(new i.constructor(i),e+i.e+1,t),e=e+i.e+1;i.c.length<e;)i.c.push(0)}return U(i,!1,!!s)};d.toJSON=d.toString=function(){var e=this,t=e.constructor;return U(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])};typeof Symbol<"u"&&(d[Symbol.for("nodejs.util.inspect.custom")]=d.toJSON);d.toNumber=function(){var e=+U(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(rt+"Imprecise conversion");return e};d.toPrecision=function(e,t){var i=this,s=i.constructor,r=i.c[0];if(e!==C){if(e!==~~e||e<1||e>I)throw Error(O+"precision");for(i=N(new s(i),e,t);i.c.length<e;)i.c.push(0)}return U(i,e<=i.e||i.e<=s.NE||i.e>=s.PE,!!r)};d.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(rt+"valueOf disallowed");return U(e,e.e<=t.NE||e.e>=t.PE,!0)};var Zt=Jt();var Rt=class{constructor(){this._rgbaColors=new Map,this._originalColors=new Map}get colors(){return this._originalColors}set colors(t){if(this._rgbaColors.clear(),this._originalColors=t,t&&t.size){if(Array.from(t.keys()).find(s=>s<0||s>1))throw Error("The keys of the colors must represent the relative value where the color is fully applied.");t.forEach((s,r)=>{let o=this.convertFromRGBAString(s)||this.convertFromHex(s);if(Object.keys(o).length===0&&o.constructor===Object)throw Error(`Cannot convert color: ${s} to rgba-color`);this._rgbaColors.set(r,o)});let i=Array.from(this._rgbaColors.entries()).sort();this._rgbaColors=new Map(i)}}blend(t){if(!this._rgbaColors.size)throw Error("It is not possible to blend without a color list.");let i,s;for(let o of this._rgbaColors)if(i||(i=o),o[0]<t)i=o;else if(o[0]===t){i=s=o;break}else{s=o;break}s||(s=i);let r=s[0]-i[0];return r?this.blendColors(i[1],s[1],(t-i[0])/r):this.convertToRGBAString(i[1])}blendColors(t,i,s){return this.convertToRGBAString({red:Math.round(t.red+(i.red-t.red)*s),green:Math.round(t.green+(i.green-t.green)*s),blue:Math.round(t.blue+(i.blue-t.blue)*s),alpha:t.alpha+(i.alpha-t.alpha)*s})}convertFromHex(t){let i=Ct(t);return i.alpha>1&&(i.alpha/=255),i}convertFromRGBAString(t){let i=t.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);return i?{red:parseInt(i[1],10),green:parseInt(i[2],10),blue:parseInt(i[3],10),alpha:parseInt(i[4],10)||1}:null}transparentize(t,i){return this.convertToRGBAString(this.convertFromRGBAString(t),i)}convertToRGBAString(t,i){return`rgba(${t.red},${t.green},${t.blue},${i||t.alpha})`}},Be=":host{display:block;position:relative;width:100%;height:48px;cursor:pointer;touch-action:none;contain:layout style}:host([hidden]){display:none!important}:host([disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([disabled]) sd-lit-input{opacity:1}#track-container{position:absolute;top:50%;left:0;height:2px;overflow:hidden}#track{position:absolute;width:100%;height:100%;transform-origin:left top;will-change:transform}:host(:focus) #thumb{top:11px;left:-14px;border-width:8px}#thumb[active]{top:7px!important;left:-18px!important;border-width:12px!important}#thumb{width:12px;height:12px;position:absolute;top:19px;left:-6px;border-radius:50%;border-width:0;background-clip:padding-box;-webkit-user-select:none;user-select:none;will-change:transform;border-style:solid}sd-lit-input{position:absolute;height:100%;width:var(--slider-suffix-width, 50px);right:0;text-align:center;outline:none;white-space:nowrap}sd-field-validation-message{position:absolute;bottom:0}",He=Object.defineProperty,_=(e,t,i,s)=>{for(var r=void 0,o=e.length-1,n;o>=0;o--)(n=e[o])&&(r=n(t,i,r)||r);return r&&He(t,i,r),r},j,$=(j=class extends w{constructor(){super(),this.thumbPosition=0,this._value=0,this._relativeValue=0,this.min=0,this.max=1,this.colorBlender=new Rt,this.baseColor=j.defaultColor,this.resizeObserver=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{this.lastKnownWidth!==this.trackContainerWidth&&(this.lastKnownWidth=this.trackContainerWidth,this.doUpdateRelativeValue(this._relativeValue,!0))})})}firstUpdated(e){super.firstUpdated(e),this.updateValue(Number.parseFloat(this.getAttribute("value"))||this._value),this.addEventListener(this.useTouchEvents()?"touchstart":"pointerdown",t=>{!this.hasAttribute("disabled")&&t.composedPath().indexOf(this.inputElement)===-1&&(t.preventDefault(),t.pointerId&&this.setPointerCapture(t.pointerId),this.focus(),this.listenMoveEvents(t.clientX||t.changedTouches[0].clientX))}),this.addEventListener("keydown",this.handleKeyDown,!0),this.setAttribute("aria-valuemin",this.min.toString()),this.setAttribute("aria-valuemax",this.max.toString()),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}connectedCallback(){super.connectedCallback(),["colors","min","max","step","editable","inputSuffix","value"].forEach(e=>{this.upgradeProperty(e)}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.lastKnownWidth=void 0,this.resizeObserver.disconnect()}upgradeProperty(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}static get observedAttributes(){let e=super.observedAttributes;return e.push("value"),e}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e==="value"||e=="step")&&this.hasUpdated&&this.updateValue(Number.parseFloat(i))}updateValue(e){this.setValueInternal(e)&&(this.inputElement&&(this.inputElement.value=this.formattedValue()),this._value!=e&&this.fireBothValueChangeEvents())}get value(){return this._value}set value(e){this.setValueInternal(e)&&this.fireBothValueChangeEvents()}roundToStep(e){let t=Number.parseFloat(e);if(Number.isNaN(t))return this._value;if(this.step&&t>=this.min&&t<=this.max){let i=new Zt(t).minus(this.min).div(this.step).round().mul(this.step).plus(this.min);t=Number.parseFloat(i.toString())}return t}setValueInternal(e){let t=this.roundToStep(e),i=this.clampValue?Math.max(this.min,Math.min(this.max,t)):t;if(this._value!==i){let s=this._value;return this._value=i,this.relativeValue=(i-this.min)/(this.max-this.min),this.setAttribute("aria-valuenow",this._value.toString()),this.requestUpdate("value",s),!0}return!1}get relativeValue(){return this._relativeValue}set relativeValue(e){this._relativeValue!==e&&this.doUpdateRelativeValue(e)}doUpdateRelativeValue(e,t){this._relativeValue=e,this.thumbPosition=Math.min(Math.max(0,e),1)*this.trackContainerWidth;let i=this.min+(this.max-this.min)*this._relativeValue;this.setValueInternal(i),!t&&this.colors&&this.colors.size&&(this.baseColor=this.colorBlender.blend(this._relativeValue))}get colors(){return this.colorBlender.colors}set colors(e){this.colorBlender.colors=e,this.colors&&this.colors.size?this.baseColor=this.colorBlender.blend(this._relativeValue):this.baseColor=j.defaultColor}static get styles(){return[R`
75
75
  ${M(Be)}
76
76
  `]}render(){let e=this.colorBlender.transparentize(this.baseColor,.26),t=`background-color:${e}; right: ${this.editable?"calc(var(--slider-suffix-width, 50px) + 8px)":"0"}`,i=`transform: scaleX(${this.relativeValue}); background-color:${this.baseColor};`,s=`transform: translateX(${this.thumbPosition}px); background-color:${this.baseColor}; border-color:${e};`;return y`
77
77
  <div id="track-container" style="${t}">