1import{c as bt}from"./chunk-TL4PLB5Y.js";import{a as vt,b as mt,d as _t}from"./chunk-TJ7KR3FN.js";import{d as Ze}from"./chunk-7CURZQOM.js";import{Xa as ft,Ya as gt,g as ut}from"./chunk-ZWGHVY75.js";import{s as oe}from"./chunk-J46DYIXO.js";import{b as et,c as tt}from"./chunk-IMK5WATV.js";import{a as q,b as ot}from"./chunk-UNUMHETD.js";import{d as dt}from"./chunk-PLC6FGDG.js";import{e as pt}from"./chunk-CR7TG7L7.js";import{I as ht,a as at,c as st,i as lt,k as me,n as D,u as ct}from"./chunk-UYHH6E4C.js";import{e as Ke,g as Je,i as rt,j as nt,l as it}from"./chunk-H44CII3F.js";import{F as Ge,G as qe,I as Qe,o as ze}from"./chunk-RONBOCCW.js";import{R as Ye}from"./chunk-J2J2F6UT.js";import{Ba as He,Bd as Xe,Dc as J,Eb as De,Fc as F,Ha as G,Jc as je,Kb as Ne,Kc as x,Lc as w,M as Oe,Na as C,Qc as Le,Rc as ve,Uc as ee,Zb as Fe,ca as Z,cc as ge,ec as pe,f as Me,gc as $e,hc as Be,hd as Ve,ic as We,ja as Te,jc as T,kc as M,lc as H,mc as j,ob as A,pa as W,uc as ie,va as re,vd as Ue,wa as ne,zb as Ae}from"./chunk-TG5FOCBJ.js";var m,se,St,ye,It,Xt,B={},we=[],zt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;function $(t,n){for(var r in n)t[r]=n[r];return t}function Pt(t){var n=t.parentNode;n&&n.removeChild(t)}function p(t,n,r){var e,i,o,a,s=arguments;if(n=$({},n),arguments.length>3)for(r=[r],e=3;e<arguments.length;e++)r.push(s[e]);if(r!=null&&(n.children=r),t!=null&&t.defaultProps!=null)for(i in t.defaultProps)n[i]===void 0&&(n[i]=t.defaultProps[i]);return a=n.key,(o=n.ref)!=null&&delete n.ref,a!=null&&delete n.key,ke(t,n,a,o)}function ke(t,n,r,e){var i={type:t,props:n,key:r,ref:e,__k:null,__p:null,__b:0,__e:null,l:null,__c:null,constructor:void 0};return m.vnode&&m.vnode(i),i}function he(t){return t.children}function Gt(t){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"||typeof t=="number")return ke(null,t,null,null);if(t.__e!=null||t.__c!=null){var n=ke(t.type,t.props,t.key,null);return n.__e=t.__e,n}return t}function K(t,n){this.props=t,this.context=n}function le(t,n){if(n==null)return t.__p?le(t.__p,t.__p.__k.indexOf(t)+1):null;for(var r;n<t.__k.length;n++)if((r=t.__k[n])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?le(t):null}function Mt(t){var n,r;if((t=t.__p)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if((r=t.__k[n])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Mt(t)}}function _e(t){(!t.__d&&(t.__d=!0)&&se.push(t)===1||ye!==m.debounceRendering)&&(ye=m.debounceRendering,(m.debounceRendering||St)(qt))}function qt(){var t,n,r,e,i,o,a,s;for(se.sort(function(c,h){return h.__v.__b-c.__v.__b});t=se.pop();)t.__d&&(r=void 0,e=void 0,o=(i=(n=t).__v).__e,a=n.__P,s=n.u,n.u=!1,a&&(r=[],e=Re(a,i,$({},i),n.__n,a.ownerSVGElement!==void 0,null,r,s,o??le(i)),Tt(r,i),e!=o&&Mt(i)))}function Ot(t,n,r,e,i,o,a,s,c){var h,u,l,d,f,g,v,y=r&&r.__k||we,b=y.length;if(s==B&&(s=o!=null?o[0]:b?le(r,0):null),h=0,n.__k=Ee(n.__k,function(_){if(_!=null){if(_.__p=n,_.__b=n.__b+1,(l=y[h])===null||l&&_.key==l.key&&_.type===l.type)y[h]=void 0;else for(u=0;u<b;u++){if((l=y[u])&&_.key==l.key&&_.type===l.type){y[u]=void 0;break}l=null}if(d=Re(t,_,l=l||B,e,i,o,a,null,s,c),(u=_.ref)&&l.ref!=u&&(v||(v=[])).push(u,_.__c||d,_),d!=null){if(g==null&&(g=d),_.l!=null)d=_.l,_.l=null;else if(o==l||d!=s||d.parentNode==null){e:if(s==null||s.parentNode!==t)t.appendChild(d);else{for(f=s,u=0;(f=f.nextSibling)&&u<b;u+=2)if(f==d)break e;t.insertBefore(d,s)}n.type=="option"&&(t.value="")}s=d.nextSibling,typeof n.type=="function"&&(n.l=d)}}return h++,_}),n.__e=g,o!=null&&typeof n.type!="function")for(h=o.length;h--;)o[h]!=null&&Pt(o[h]);for(h=b;h--;)y[h]!=null&&At(y[h],y[h]);if(v)for(h=0;h<v.length;h++)Ht(v[h],v[++h],v[++h])}function Ee(t,n,r){if(r==null&&(r=[]),t==null||typeof t=="boolean")n&&r.push(n(null));else if(Array.isArray(t))for(var e=0;e<t.length;e++)Ee(t[e],n,r);else r.push(n?n(Gt(t)):t);return r}function Qt(t,n,r,e,i){var o;for(o in r)o in n||kt(t,o,null,r[o],e);for(o in n)i&&typeof n[o]!="function"||o==="value"||o==="checked"||r[o]===n[o]||kt(t,o,n[o],r[o],e)}function yt(t,n,r){n[0]==="-"?t.setProperty(n,r):t[n]=typeof r=="number"&&zt.test(n)===!1?r+"px":r??""}function kt(t,n,r,e,i){var o,a,s,c,h;if(!((n=i?n==="className"?"class":n:n==="class"?"className":n)==="key"||n==="children"))if(n==="style")if(o=t.style,typeof r=="string")o.cssText=r;else{if(typeof e=="string"&&(o.cssText="",e=null),e)for(a in e)r&&a in r||yt(o,a,"");if(r)for(s in r)e&&r[s]===e[s]||yt(o,s,r[s])}else n[0]==="o"&&n[1]==="n"?(c=n!==(n=n.replace(/Capture$/,"")),h=n.toLowerCase(),n=(h in t?h:n).slice(2),r?(e||t.addEventListener(n,Ct,c),(t.t||(t.t={}))[n]=r):t.removeEventListener(n,Ct,c)):n!=="list"&&n!=="tagName"&&n!=="form"&&!i&&n in t?t[n]=r??"":typeof r!="function"&&n!=="dangerouslySetInnerHTML"&&(n!==(n=n.replace(/^xlink:?/,""))?r==null||r===!1?t.removeAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),r):r==null||r===!1?t.removeAttribute(n):t.setAttribute(n,r))}function Ct(t){return this.t[t.type](m.event?m.event(t):t)}function Re(t,n,r,e,i,o,a,s,c,h){var u,l,d,f,g,v,y,b,_,N,O=n.type;if(n.constructor!==void 0)return null;(u=m.__b)&&u(n);try{e:if(typeof O=="function"){if(b=n.props,_=(u=O.contextType)&&e[u.__c],N=u?_?_.props.value:u.__p:e,r.__c?y=(l=n.__c=r.__c).__p=l.__E:("prototype"in O&&O.prototype.render?n.__c=l=new O(b,N
1):(n.__c=l=new K(b,N),l.constructor=O,l.render=Kt),_&&_.sub(l),l.props=b,l.state||(l.state={}),l.context=N,l.__n=e,d=l.__d=!0,l.__h=[]),l.__s==null&&(l.__s=l.state),O.getDerivedStateFromProps!=null&&$(l.__s==l.state?l.__s=$({},l.__s):l.__s,O.getDerivedStateFromProps(b,l.__s)),d)O.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&a.push(l);else{if(O.getDerivedStateFromProps==null&&s==null&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(b,N),!s&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(b,l.__s,N)===!1){for(l.props=b,l.state=l.__s,l.__d=!1,l.__v=n,n.__e=c!=null?c!==r.__e?c:r.__e:null,n.__k=r.__k,u=0;u<n.__k.length;u++)n.__k[u]&&(n.__k[u].__p=n);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(b,l.__s,N)}for(f=l.props,g=l.state,l.context=N,l.props=b,l.state=l.__s,(u=m.__r)&&u(n),l.__d=!1,l.__v=n,l.__P=t,u=l.render(l.props,l.state,l.context),n.__k=Ee(u!=null&&u.type==he&&u.key==null?u.props.children:u),l.getChildContext!=null&&(e=$($({},e),l.getChildContext())),d||l.getSnapshotBeforeUpdate==null||(v=l.getSnapshotBeforeUpdate(f,g)),Ot(t,n,r,e,i,o,a,c,h),l.base=n.__e;u=l.__h.pop();)l.__s&&(l.state=l.__s),u.call(l);d||f==null||l.componentDidUpdate==null||l.componentDidUpdate(f,g,v),y&&(l.__E=l.__p=null)}else n.__e=Yt(r.__e,n,r,e,i,o,a,h);(u=m.diffed)&&u(n)}catch(Ut){m.__e(Ut,n,r)}return n.__e}function Tt(t,n){for(var r;r=t.pop();)try{r.componentDidMount()}catch(e){m.__e(e,r.__v)}m.__c&&m.__c(n)}function Yt(t,n,r,e,i,o,a,s){var c,h,u,l,d=r.props,f=n.props;if(i=n.type==="svg"||i,t==null&&o!=null){for(c=0;c<o.length;c++)if((h=o[c])!=null&&(n.type===null?h.nodeType===3:h.localName===n.type)){t=h,o[c]=null;break}}if(t==null){if(n.type===null)return document.createTextNode(f);t=i?document.createElementNS("http://www.w3.org/2000/svg",n.type):document.createElement(n.type),o=null}return n.type===null?d!==f&&(o!=null&&(o[o.indexOf(t)]=null),t.data=f):n!==r&&(o!=null&&(o=we.slice.call(t.childNodes)),u=(d=r.props||B).dangerouslySetInnerHTML,l=f.dangerouslySetInnerHTML,s||(l||u)&&(l&&u&&l.__html==u.__html||(t.innerHTML=l&&l.__html||"")),Qt(t,f,d,i,s),n.__k=n.props.children,l||Ot(t,n,r,e,n.type!=="foreignObject"&&i,o,a,B,s),s||("value"in f&&f.value!==void 0&&f.value!==t.value&&(t.value=f.value==null?"":f.value),"checked"in f&&f.checked!==void 0&&f.checked!==t.checked&&(t.checked=f.checked))),t}function Ht(t,n,r){try{typeof t=="function"?t(n):t.current=n}catch(e){m.__e(e,r)}}function At(t,n,r){var e,i,o;if(m.unmount&&m.unmount(t),(e=t.ref)&&Ht(e,null,n),r||typeof t.type=="function"||(r=(i=t.__e)!=null),t.__e=t.l=null,(e=t.__c)!=null){if(e.componentWillUnmount)try{e.componentWillUnmount()}catch(a){m.__e(a,n)}e.base=e.__P=null}if(e=t.__k)for(o=0;o<e.length;o++)e[o]&&At(e[o],n,r);i!=null&&Pt(i)}function Kt(t,n,r){return this.constructor(t,r)}function Zt(t,n,r){var e,i,o;m.__p&&m.__p(t,n),i=(e=r===It)?null:r&&r.__k||n.__k,t=p(he,null,[t]),o=[],Re(n,e?n.__k=t:(r||n).__k=t,i||B,B,n.ownerSVGElement!==void 0,r&&!e?[r]:i?null:we.slice.call(n.childNodes),o,!1,r||B,e),Tt(o,t)}m={},K.prototype.setState=function(t,n){var r=this.__s!==this.state&&this.__s||(this.__s=$({},this.state));(typeof t!="function"||(t=t(r,this.props)))&&$(r,t),t!=null&&this.__v&&(this.u=!1,n&&this.__h.push(n),_e(this))},K.prototype.forceUpdate=function(t){this.__v&&(t&&this.__h.push(t),this.u=!0,_e(this))},K.prototype.render=he,se=[],St=typeof Promise=="function"?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,ye=m.debounceRendering,m.__e=function(t,n,r){for(var e;n=n.__p;)if((e=n.__c)&&!e.__p)try{if(e.constructor&&e.constructor.getDerivedStateFromError!=null)e.setState(e.constructor.getDerivedStateFromError(t));else{if(e.componentDidCatch==null)continue;e.componentDidCatch(t)}return _e(e.__E=e)}catch(i){t=i}throw t},It=B,Xt=0;function xt(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function Jt(t,n,r){return n&&xt(t.prototype,n),r&&xt(t,r),t}function S(){return S=Object.assign||function(t){for(var n=arguments,r=1;r<arguments.length;r++){var e=n[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},S.apply(this,arguments)}var er="[-\\+]?\\d+%?",tr="[-\\+]?\\d*\\.\\d+%?",V="(?:"+tr+")|(?:"+er+")",Dt="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",Nt="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",rr=new RegExp("rgb"+Dt),nr=new RegExp("rgba"+Nt),ir=new RegExp("hsl"+Dt),or=new RegExp("hsla"+Nt),ue="^(?:#?|0x?)",U="([0-9a-fA-F]{1})",X="([0-9a-fA-F]{2})",ar=new RegExp(ue+U+U+U+"$"),sr=new RegExp(ue+U+U+U+U+"$"),lr=new RegExp(ue+X+X+X+"$"),cr=new RegExp(ue+X+X+X+X+"$"),hr=2e3,ur=4e4,ae=Math.log,Q=Math.round,te=Math.floor;function P(t,n,r){return Math.min(Math.max(t,n),r)}function E(t,n){var r=t.indexOf("%")>-1,e=parseFloat(t);return r?n/100*e:e}function R(t){return parseInt(t,16)}function L(t){return t.toString(16).padStart(2,"0")}var Y=(function(){function t(r,e){this.$={h:0,s:0,v:0,a:1},r&&this.set(r),this.onChange=e,this.initialValue=S({},this.$)}var n=t.prototype;return n.set=function(e){if(typeof e=="string")/^(?:#?|0x?)[0-9a-fA-F]{3,8}$/.test(e)?this.hexString=e:/^rgba?/.test(e)?this.rgbString=e:/^hsla?/.test(e)&&(this.hslString=e);else if(typeof e=="object")e instanceof t?this.hsva=e.hsva:"r"in e&&"g"in e&&"b"in e?this.rgb=e:"h"in e&&"s"in e&&"v"in e?this.hsv=e:"h"in e&&"s"in e&&"l"in e?this.hsl=e:"kelvin"in e&&(this.kelvin=e.kelvin);else throw new Error("Invalid color value")},n.setChannel=function(e,i,o){var a;this[e]=S({},this[e],(a={},a[i]=o,a))},n.reset=function(){this.hsva=this.initialValue},n.clone=function(){return new t(this)},n.unbind=function(){this.onChange=void 0},t.hsvToRgb=function(e){var i=e.h/60,o=e.s/100,a=e.v/100,s=te(i),c=i-s,h=a*(1-o),u=a*(1-c*o),l=a*(1-(1-c)*o),d=s%6,f=[a,u,h,h,l,a][d],g=[l,a,a,u,h,h][d],v=[h,h,l,a,a,u][d];return{r:P(f*255,0,255),g:P(g*255,0,255),b:P(v*255,0,255)}},t.rgbToHsv=function(e){var i=e.r/255,o=e.g/255,a=e.b/255,s=Math.max(i,o,a),c=Math.min(i,o,a),h=s-c,u=0,l=s,d=s===0?0:h/s;switch(s){case c:u=0;break;case i:u=(o-a)/h+(o<a?6:0);break;case o:u=(a-i)/h+2;break;case a:u=(i-o)/h+4;break}return{h:u*60%360,s:P(d*100,0,100),v:P(l*100,0,100)}},t.hsvToHsl=function(e){var i=e.s/100,o=e.v/100,a=(2-i)*o,s=a<=1?a:2-a,c=s<1e-9?0:i*o/s;return{h:e.h,s:P(c*100,0,100),l:P(a*50,0,100)}},t.hslToHsv=function(e){var i=e.l*2,o=e.s*(i<=100?i:200-i)/100,a=i+o<1e-9?0:2*o/(i+o);return{h:e.h,s:P(a*100,0,100),v:P((i+o)/2,0,100)}},t.kelvinToRgb=function(e){var i=e/100,o,a,s;return i<66?(o=255,a=-155.25485562709179-.44596950469579133*(a=i-2)+104.49216199393888*ae(a),s=i<20?0:-254.76935184120902+.8274096064007395*(s=i-10)+115.67994401066147*ae(s)):(o=351.97690566805693+.114206453784165*(o=i-55)-40.25366309332127*ae(o),a=325.4494125711974+.07943456536662342*(a=i-50)-28.0852963507957*ae(a),s=255),{r:P(te(o),0,255),g:P(te(a),0,255),b:P(te(s),0,255)}},t.rgbToKelvin=function(e){for(var i=e.r,o=e.b,a=.4,s=hr,c=ur,h;c-s>a;){h=(c+s)*.5;var u=t.kelvinToRgb(h);u.b/u.r>=o/i?c=h:s=h}return h},Jt(t,[{key:"hsv",get:function(){var e=this.$;return{h:e.h,s:e.s,v:e.v}},set:function(e){var i=this.$;if(e=S({},i,e),this.onChange){var o={h:!1,v:!1,s:!1,a:!1};for(var a in i)o[a]=e[a]!=i[a];this.$=e,(o.h||o.s||o.v||o.a)&&this.onChange(this,o)}else this.$=e}},{key:"hsva",get:function(){return S({},this.$)},set:function(e){this.hsv=e}},{key:"hue",get:function(){return this.$.h},set:function(e){this.hsv={h:e}}},{key:"saturation",get:function(){return this.$.s},set:function(e){this.hsv={s:e}}},{key:"value",get:function(){return this.$.v},set:function(e){this.hsv={v:e}}},{key:"alpha",get:function(){return this.$.a}
1,set:function(e){this.hsv=S({},this.hsv,{a:e})}},{key:"kelvin",get:function(){return t.rgbToKelvin(this.rgb)},set:function(e){this.rgb=t.kelvinToRgb(e)}},{key:"red",get:function(){var e=this.rgb;return e.r},set:function(e){this.rgb=S({},this.rgb,{r:e})}},{key:"green",get:function(){var e=this.rgb;return e.g},set:function(e){this.rgb=S({},this.rgb,{g:e})}},{key:"blue",get:function(){var e=this.rgb;return e.b},set:function(e){this.rgb=S({},this.rgb,{b:e})}},{key:"rgb",get:function(){var e=t.hsvToRgb(this.$),i=e.r,o=e.g,a=e.b;return{r:Q(i),g:Q(o),b:Q(a)}},set:function(e){this.hsv=S({},t.rgbToHsv(e),{a:e.a===void 0?1:e.a})}},{key:"rgba",get:function(){return S({},this.rgb,{a:this.alpha})},set:function(e){this.rgb=e}},{key:"hsl",get:function(){var e=t.hsvToHsl(this.$),i=e.h,o=e.s,a=e.l;return{h:Q(i),s:Q(o),l:Q(a)}},set:function(e){this.hsv=S({},t.hslToHsv(e),{a:e.a===void 0?1:e.a})}},{key:"hsla",get:function(){return S({},this.hsl,{a:this.alpha})},set:function(e){this.hsl=e}},{key:"rgbString",get:function(){var e=this.rgb;return"rgb("+e.r+", "+e.g+", "+e.b+")"},set:function(e){var i,o,a,s,c=1;if((i=rr.exec(e))?(o=E(i[1],255),a=E(i[2],255),s=E(i[3],255)):(i=nr.exec(e))&&(o=E(i[1],255),a=E(i[2],255),s=E(i[3],255),c=E(i[4],1)),i)this.rgb={r:o,g:a,b:s,a:c};else throw new Error("Invalid rgb string")}},{key:"rgbaString",get:function(){var e=this.rgba;return"rgba("+e.r+", "+e.g+", "+e.b+", "+e.a+")"},set:function(e){this.rgbString=e}},{key:"hexString",get:function(){var e=this.rgb;return"#"+L(e.r)+L(e.g)+L(e.b)},set:function(e){var i,o,a,s,c=255;if((i=ar.exec(e))?(o=R(i[1])*17,a=R(i[2])*17,s=R(i[3])*17):(i=sr.exec(e))?(o=R(i[1])*17,a=R(i[2])*17,s=R(i[3])*17,c=R(i[4])*17):(i=lr.exec(e))?(o=R(i[1]),a=R(i[2]),s=R(i[3])):(i=cr.exec(e))&&(o=R(i[1]),a=R(i[2]),s=R(i[3]),c=R(i[4])),i)this.rgb={r:o,g:a,b:s,a:c/255};else throw new Error("Invalid hex string")}},{key:"hex8String",get:function(){var e=this.rgba;return"#"+L(e.r)+L(e.g)+L(e.b)+L(te(e.a*255))},set:function(e){this.hexString=e}},{key:"hslString",get:function(){var e=this.hsl;return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},set:function(e){var i,o,a,s,c=1;if((i=ir.exec(e))?(o=E(i[1],360),a=E(i[2],100),s=E(i[3],100)):(i=or.exec(e))&&(o=E(i[1],360),a=E(i[2],100),s=E(i[3],100),c=E(i[4],1)),i)this.hsl={h:o,s:a,l:s,a:c};else throw new Error("Invalid hsl string")}},{key:"hslaString",get:function(){var e=this.hsla;return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},set:function(e){this.hslString=e}}]),t})(),dr={sliderShape:"bar",sliderType:"value",minTemperature:2200,maxTemperature:11e3};function Se(t){var n,r=t.width,e=t.sliderSize,i=t.borderWidth,o=t.handleRadius,a=t.padding,s=t.sliderShape,c=t.layoutDirection==="horizontal";return e=(n=e)!=null?n:a*2+o*2,s==="circle"?{handleStart:t.padding+t.handleRadius,handleRange:r-a*2-o*2,width:r,height:r,cx:r/2,cy:r/2,radius:r/2-i/2}:{handleStart:e/2,handleRange:r-e,radius:e/2,x:0,y:0,width:c?e:r,height:c?r:e}}function fr(t,n){var r=n.hsva,e=n.rgb;switch(t.sliderType){case"red":return e.r/2.55;case"green":return e.g/2.55;case"blue":return e.b/2.55;case"alpha":return r.a*100;case"kelvin":var i=t.minTemperature,o=t.maxTemperature,a=o-i,s=(n.kelvin-i)/a*100;return Math.max(0,Math.min(s,100));case"hue":return r.h/=3.6;case"saturation":return r.s;default:return r.v}}function gr(t,n,r){var e=Se(t),i=e.handleRange,o=e.handleStart,a;t.layoutDirection==="horizontal"?a=-1*r+i+o:a=n-o,a=Math.max(Math.min(a,i),0);var s=Math.round(100/i*a);switch(t.sliderType){case"kelvin":var c=t.minTemperature,h=t.maxTemperature,u=h-c;return c+u*(s/100);case"alpha":return s/100;case"hue":return s*3.6;case"red":case"blue":case"green":return s*2.55;default:return s}}function pr(t,n){var r=Se(t),e=r.width,i=r.height,o=r.handleRange,a=r.handleStart,s=t.layoutDirection==="horizontal",c=fr(t,n),h=s?e/2:i/2,u=a+c/100*o;return s&&(u=-1*u+o+a*2),{x:s?h:u,y:s?u:h}}function vr(t,n){var r=n.hsv,e=n.rgb;switch(t.sliderType){case"red":return[[0,"rgb(0,"+e.g+","+e.b+")"],[100,"rgb(255,"+e.g+","+e.b+")"]];case"green":return[[0,"rgb("+e.r+",0,"+e.b+")"],[100,"rgb("+e.r+",255,"+e.b+")"]];case"blue":return[[0,"rgb("+e.r+","+e.g+",0)"],[100,"rgb("+e.r+","+e.g+",255)"]];case"alpha":return[[0,"rgba("+e.r+","+e.g+","+e.b+",0)"],[100,"rgb("+e.r+","+e.g+","+e.b+")"]];case"kelvin":for(var i=[],o=t.minTemperature,a=t.maxTemperature,s=8,c=a-o,h=o,u=0;h<a;h+=c/s,u+=1){var l=Y.kelvinToRgb(h),d=l.r,f=l.g,g=l.b;i.push([100/s*u,"rgb("+d+","+f+","+g+")"])}return i;case"hue":return[[0,"#f00"],[16.666,"#ff0"],[33.333,"#0f0"],[50,"#0ff"],[66.666,"#00f"],[83.333,"#f0f"],[100,"#f00"]];case"saturation":var v=Y.hsvToHsl({h:r.h,s:0,v:r.v}),y=Y.hsvToHsl({h:r.h,s:100,v:r.v});
1return[[0,"hsl("+v.h+","+v.s+"%,"+v.l+"%)"],[100,"hsl("+y.h+","+y.s+"%,"+y.l+"%)"]];default:var b=Y.hsvToHsl({h:r.h,s:r.s,v:100});return[[0,"#000"],[100,"hsl("+b.h+","+b.s+"%,"+b.l+"%)"]]}}var Ft=Math.PI*2,mr=function(n,r){return(n%r+r)%r},$t=function(n,r){return Math.sqrt(n*n+r*r)};function Bt(t){return t.width/2-t.padding-t.handleRadius-t.borderWidth}function _r(t,n,r){var e=de(t),i=e.cx,o=e.cy,a=t.width/2;return $t(i-n,o-r)<a}function de(t){var n=t.width/2;return{width:t.width,radius:n-t.borderWidth,cx:n,cy:n}}function Wt(t,n,r){var e=t.wheelAngle,i=t.wheelDirection;return r&&i==="clockwise"?n=e+n:i==="clockwise"?n=360-e+n:r&&i==="anticlockwise"?n=e+180-n:i==="anticlockwise"&&(n=e-n),mr(n,360)}function br(t,n){var r=n.hsv,e=de(t),i=e.cx,o=e.cy,a=Bt(t),s=(180+Wt(t,r.h,!0))*(Ft/360),c=r.s/100*a,h=t.wheelDirection==="clockwise"?-1:1;return{x:i+c*Math.cos(s)*h,y:o+c*Math.sin(s)*h}}function wt(t,n,r){var e=de(t),i=e.cx,o=e.cy,a=Bt(t);n=i-n,r=o-r;var s=Wt(t,Math.atan2(-r,-n)*(360/Ft)),c=Math.min($t(n,r),a);return{h:Math.round(s),s:Math.round(100/a*c)}}function Ie(t){var n=t.width,r=t.boxHeight,e=t.padding,i=t.handleRadius;return{width:n,height:r??n,radius:e+i}}function Et(t,n,r){var e=Ie(t),i=e.width,o=e.height,a=e.radius,s=a,c=i-a*2,h=o-a*2,u=(n-s)/c*100,l=(r-s)/h*100;return{s:Math.max(0,Math.min(u,100)),v:Math.max(0,Math.min(100-l,100))}}function yr(t,n){var r=Ie(t),e=r.width,i=r.height,o=r.radius,a=n.hsv,s=o,c=e-o*2,h=i-o*2;return{x:s+a.s/100*c,y:s+(h-a.v/100*h)}}function kr(t,n){var r=n.hue;return[[[0,"#fff"],[100,"hsl("+r+",100%,50%)"]],[[0,"rgba(0,0,0,0)"],[100,"#000"]]]}var be;function Cr(t){be||(be=document.getElementsByTagName("base"));var n=window.navigator.userAgent,r=/^((?!chrome|android).)*safari/i.test(n),e=/iPhone|iPod|iPad/i.test(n),i=window.location;return(r||e)&&be.length>0?i.protocol+"//"+i.host+i.pathname+i.search+t:t}function jt(t,n,r,e){for(var i=0;i<e.length;i++){var o=e[i].x-n,a=e[i].y-r,s=Math.sqrt(o*o+a*a);if(s<t.handleRadius)return i}return null}function Pe(t){return{boxSizing:"border-box",border:t.borderWidth+"px solid "+t.borderColor}}function Ce(t,n,r){return t+"-gradient("+n+", "+r.map(function(e){var i=e[0],o=e[1];return o+" "+i+"%"}).join(",")+")"}function k(t){return typeof t=="string"?t:t+"px"}var xr={width:300,height:300,color:"#fff",colors:[],padding:6,layoutDirection:"vertical",borderColor:"#fff",borderWidth:0,handleRadius:8,activeHandleRadius:null,handleSvg:null,handleProps:{x:0,y:0},wheelLightness:!0,wheelAngle:0,wheelDirection:"anticlockwise",sliderSize:null,sliderMargin:12,boxHeight:null},Rt=["mousemove","touchmove","mouseup","touchend"],fe=(function(t){function n(r){t.call(this,r),this.uid=(Math.random()+1).toString(36).substring(5)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.render=function(e){var i=this.handleEvent.bind(this),o={onMouseDown:i,ontouchstart:i},a=e.layoutDirection==="horizontal",s=e.margin===null?e.sliderMargin:e.margin,c={overflow:"visible",display:a?"inline-block":"block"};return e.index>0&&(c[a?"marginLeft":"marginTop"]=s),p(he,null,e.children(this.uid,o,c))},n.prototype.handleEvent=function(e){var i=this,o=this.props.onInput,a=this.base.getBoundingClientRect();e.preventDefault();var s=e.touches?e.changedTouches[0]:e,c=s.clientX-a.left,h=s.clientY-a.top;switch(e.type){case"mousedown":case"touchstart":var u=o(c,h,0);u!==!1&&Rt.forEach(function(l){document.addEventListener(l,i,{passive:!1})});break;case"mousemove":case"touchmove":o(c,h,1);break;case"mouseup":case"touchend":o(c,h,2),Rt.forEach(function(l){document.removeEventListener(l,i,{passive:!1})});break}},n})(K);function z(t){var n=t.r,r=t.url,e=n,i=n;return p("svg",{className:"IroHandle IroHandle--"+t.index+" "+(t.isActive?"IroHandle--isActive":""),style:{"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0);",transform:"translate("+k(t.x)+", "+k(t.y)+")",willChange:"transform",top:k(-n),left:k(-n),width:k(n*2),height:k(n*2),position:"absolute",overflow:"visible"}},r&&p("use",Object.assign({xlinkHref:Cr(r)},t.props)),!r&&p("circle",{cx:e,cy:i,r:n,fill:"none","stroke-width":2,stroke:"#000"}),!r&&p("circle",{cx:e,cy:i,r:n-2,fill:t.fill,"stroke-width":2,stroke:"#fff"}))}
1z.defaultProps={fill:"none",x:0,y:0,r:8,url:null,props:{x:0,y:0}};function ce(t){var n=t.activeIndex,r=n!==void 0&&n<t.colors.length?t.colors[n]:t.color,e=Se(t),i=e.width,o=e.height,a=e.radius,s=pr(t,r),c=vr(t,r);function h(u,l,d){var f=gr(t,u,l);t.parent.inputActive=!0,r[t.sliderType]=f,t.onInput(d,t.id)}return p(fe,Object.assign({},t,{onInput:h}),function(u,l,d){return p("div",Object.assign({},l,{className:"IroSlider",style:Object.assign({},{position:"relative",width:k(i),height:k(o),borderRadius:k(a),background:"conic-gradient(#ccc 25%, #fff 0 50%, #ccc 0 75%, #fff 0)",backgroundSize:"8px 8px"},d)}),p("div",{className:"IroSliderGradient",style:Object.assign({},{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:k(a),background:Ce("linear",t.layoutDirection==="horizontal"?"to top":"to right",c)},Pe(t))}),p(z,{isActive:!0,index:r.index,r:t.handleRadius,url:t.handleSvg,props:t.handleProps,x:s.x,y:s.y}))})}ce.defaultProps=Object.assign({},dr);function wr(t){var n=Ie(t),r=n.width,e=n.height,i=n.radius,o=t.colors,a=t.parent,s=t.activeIndex,c=s!==void 0&&s<t.colors.length?t.colors[s]:t.color,h=kr(t,c),u=o.map(function(d){return yr(t,d)});function l(d,f,g){if(g===0){var v=jt(t,d,f,u);v!==null?a.setActiveColor(v):(a.inputActive=!0,c.hsv=Et(t,d,f),t.onInput(g,t.id))}else g===1&&(a.inputActive=!0,c.hsv=Et(t,d,f));t.onInput(g,t.id)}return p(fe,Object.assign({},t,{onInput:l}),function(d,f,g){return p("div",Object.assign({},f,{className:"IroBox",style:Object.assign({},{width:k(r),height:k(e),position:"relative"},g)}),p("div",{className:"IroBox",style:Object.assign({},{width:"100%",height:"100%",borderRadius:k(i)},Pe(t),{background:Ce("linear","to bottom",h[1])+","+Ce("linear","to right",h[0])})}),o.filter(function(v){return v!==c}).map(function(v){return p(z,{isActive:!1,index:v.index,fill:v.hslString,r:t.handleRadius,url:t.handleSvg,props:t.handleProps,x:u[v.index].x,y:u[v.index].y})}),p(z,{isActive:!0,index:c.index,fill:c.hslString,r:t.activeHandleRadius||t.handleRadius,url:t.handleSvg,props:t.handleProps,x:u[c.index].x,y:u[c.index].y}))})}var Er="conic-gradient(red, yellow, lime, aqua, blue, magenta, red)",Rr="conic-gradient(red, magenta, blue, aqua, lime, yellow, red)";function Lt(t){var n=de(t),r=n.width,e=t.colors,i=t.borderWidth,o=t.parent,a=t.color,s=a.hsv,c=e.map(function(l){return br(t,l)}),h={position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",boxSizing:"border-box"};function u(l,d,f){if(f===0){if(!_r(t,l,d))return!1;var g=jt(t,l,d,c);g!==null?o.setActiveColor(g):(o.inputActive=!0,a.hsv=wt(t,l,d),t.onInput(f,t.id))}else f===1&&(o.inputActive=!0,a.hsv=wt(t,l,d));t.onInput(f,t.id)}return p(fe,Object.assign({},t,{onInput:u}),function(l,d,f){return p("div",Object.assign({},d,{className:"IroWheel",style:Object.assign({},{width:k(r),height:k(r),position:"relative"},f)}),p("div",{className:"IroWheelHue",style:Object.assign({},h,{transform:"rotateZ("+(t.wheelAngle+90)+"deg)",background:t.wheelDirection==="clockwise"?Er:Rr})}),p("div",{className:"IroWheelSaturation",style:Object.assign({},h,{background:"radial-gradient(circle closest-side, #fff, transparent)"})}),t.wheelLightness&&p("div",{className:"IroWheelLightness",style:Object.assign({},h,{background:"#000",opacity:1-s.v/100})}),p("div",{className:"IroWheelBorder",style:Object.assign({},h,Pe(t))}),e.filter(function(g){return g!==a}).map(function(g){return p(z,{isActive:!1,index:g.index,fill:g.hslString,r:t.handleRadius,url:t.handleSvg,props:t.handleProps,x:c[g.index].x,y:c[g.index].y})}),p(z,{isActive:!0,index:a.index,fill:a.hslString,r:t.activeHandleRadius||t.handleRadius,url:t.handleSvg,props:t.handleProps,x:c[a.index].x,y:c[a.index].y}))})}function Sr(t){var n=function(r,e){var i,o=document.createElement("div");Zt(p(t,Object.assign({},{ref:function(s){return i=s}},e)),o);function a(){var s=r instanceof Element?r:document.querySelector(r);s.appendChild(i.base),i.onMount(s)}return document.readyState!=="loading"?a():document.addEventListener("DOMContentLoaded",a),i};return n.prototype=t.prototype,Object.assign(n,t),n.__component=t,n}var Vt=(function(t){function n(r){var e=this;t.call(this,r),this.colors=[],this.inputActive=!1,this.events={},this.activeEvents={},this.deferredEvents={},this.id=r.id;var i=r.colors.length>0?r.colors:[r.color];
1i.forEach(function(o){return e.addColor(o)}),this.setActiveColor(0),this.state=Object.assign({},r,{color:this.color,colors:this.colors,layout:r.layout})}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addColor=function(e,i){i===void 0&&(i=this.colors.length);var o=new Y(e,this.onColorChange.bind(this));this.colors.splice(i,0,o),this.colors.forEach(function(a,s){return a.index=s}),this.state&&this.setState({colors:this.colors}),this.deferredEmit("color:init",o)},n.prototype.removeColor=function(e){var i=this.colors.splice(e,1)[0];i.unbind(),this.colors.forEach(function(o,a){return o.index=a}),this.state&&this.setState({colors:this.colors}),i.index===this.color.index&&this.setActiveColor(0),this.emit("color:remove",i)},n.prototype.setActiveColor=function(e){this.color=this.colors[e],this.state&&this.setState({color:this.color}),this.emit("color:setActive",this.color)},n.prototype.setColors=function(e,i){var o=this;i===void 0&&(i=0),this.colors.forEach(function(a){return a.unbind()}),this.colors=[],e.forEach(function(a){return o.addColor(a)}),this.setActiveColor(i),this.emit("color:setAll",this.colors)},n.prototype.on=function(e,i){var o=this,a=this.events;(Array.isArray(e)?e:[e]).forEach(function(s){(a[s]||(a[s]=[])).push(i),o.deferredEvents[s]&&(o.deferredEvents[s].forEac
1h(function(c){i.apply(null,c)}),o.deferredEvents[s]=[])})},n.prototype.off=function(e,i){var o=this;(Array.isArray(e)?e:[e]).forEach(function(a){var s=o.events[a];s&&s.splice(s.indexOf(i),1)})},n.prototype.emit=function(e){for(var i=this,o=[],a=arguments.length-1;a-- >0;)o[a]=arguments[a+1];var s=this.activeEvents,c=s.hasOwnProperty(e)?s[e]:!1;if(!c){s[e]=!0;var h=this.events[e]||[];h.forEach(function(u){return u.apply(i,o)}),s[e]=!1}},n.prototype.deferredEmit=function(e){for(var i,o=[],a=arguments.length-1;a-- >0;)o[a]=arguments[a+1];var s=this.deferredEvents;(i=this).emit.apply(i,[e].concat(o)),(s[e]||(s[e]=[])).push(o)},n.prototype.setOptions=function(e){this.setState(e)},n.prototype.resize=function(e){this.setOptions({width:e})},n.prototype.reset=function(){this.colors.forEach(function(e){return e.reset()}),this.setState({colors:this.colors})},n.prototype.onMount=function(e){this.el=e,this.deferredEmit("mount",this)},n.prototype.onColorChange=function(e,i){this.setState({color:this.color}),this.inputActive&&(this.inputActive=!1,this.emit("input:change",e,i)),this.emit("color:change",e,i)},n.prototype.emitInputEvent=function(e,i){e===0?this.emit("input:start",this.color,i):e===1?this.emit("input:move",this.color,i):e===2&&this.emit("input:end",this.color,i)},n.prototype.render=function(e,i){var o=this,a=i.layout;return Array.isArray(a)||(a=[{component:Lt},{component:ce}],i.transparency&&a.push({component:ce,options:{sliderType:"alpha"}})),p("div",{class:"IroColorPicker",id:i.id,style:{display:i.display}},a.map(function(s,c){var h=s.component,u=s.options;return p(h,Object.assign({},i,u,{ref:void 0,onInput:o.emitInputEvent.bind(o),parent:o,index:c}))}))},n})(K);Vt.defaultProps=Object.assign({},xr,{colors:[],display:"block",id:null,layout:"default",margin:null});var Ir=Sr(Vt),xe;(function(t){t.version="5.5.2",t.Color=Y,t.ColorPicker=Ir;var n;(function(r){r.h=p,r.ComponentBase=fe,r.Handle=z,r.Slider=ce,r.Wheel=Lt,r.Box=wr})(n=t.ui||(t.ui={}))})(xe||(xe={}));var Pr=xe,I=Pr;var Mr=["hue"],Or=["alpha"],Tr=["palette"],Hr=["trigger"],Ar=["hexInput"],Dr=["rInput"],Nr=["gInput"],Fr=["bInput"],$r=["hInput"],Br=["sInput"],Wr=["lInput"],jr=["inputTypeSelector"],Lr=["colorPanel"];function Vr(t,n){if(t&1){let r=ie();M(0,"button",26),J("click",function(){let i=re(r).$implicit,o=F(2);return ne(o.selectColor(i))}),H()}if(t&2){let r=n.$implicit;Le("background",r),Fe("aria-label","Select color "+r)}}function Ur(t,n){if(t&1&&j(0,"input",21,4),t&2){let r=F(2);T("formControl",r.hex)}}function Xr(t,n){if(t&1&&j(0,"input",27,5)(2,"input",28,6)(4,"input",29,7),t&2){let r=F(2);T("formControl",r.rgbForm.controls.r),A(2),T("formControl",r.rgbForm.controls.g),A(2),T("formControl",r.rgbForm.controls.b)}}function zr(t,n){if(t&1&&j(0,"input",30,8)(2,"input",31,9)(4,"input",32,10),t&2){let r=F(2);T("formControl",r.hslForm.controls.h),A(2),T("formControl",r.hslForm.controls.s),A(2),T("formControl",r.hslForm.controls.l)}}function Gr(t,n){if(t&1){let r=ie();M(0,"button",33),J("click",function(){re(r);let i=F(2);return ne(i.eyedropper())}),j(1,"mat-icon",34),H()}}function qr(t,n){if(t&1){let r=ie();M(0,"div",12),j(1,"div",13,2),M(3,"div",14),Be(4,Vr,1,3,"button",15,$e),H(),M(6,"div",16)(7,"mat-select",17,3)(9,"mat-option",18),ee(10,"HEX"),H(),M(11,"mat-option",19),ee(12,"RGB"),H(),M(13,"mat-option",20),ee(14,"HSL"),H()(),ge(15,Ur,2,1,"input",21)(16,Xr,6,3)(17,zr,6,3),H(),M(18,"div",22),ge(19,Gr,2,0,"button",23),j(20,"span",24),M(21,"button",25),J("click",function(){re(r);let i=F();return ne(i.close())}),ee(22,"Ok"),H()()()}if(t&2){let r,e=F();A(4),We(e.colorHistory()),A(3),T("formControl",e.inputType),A(8),pe((r=e.inputType.value)==="HEX"?15:r==="RGB"?16:r==="HSL"?17:-1),A(4),pe(e.supportsEyeDropper?19:-1)}}var Sn=(()=>{class t{hostClass=!0;logger=dt("ColorPickerComponent");hueRef;alphaRef;paletteRef;triggerRef;hexInputRef;rInputRef;gInputRef;bInputRef;hInputRef;sInputRef;lInputRef;inputTypeSelectorRef;contentTemplate;showAlpha=G(!1);set alphaEnabled(r){this.showAlpha.set(Ye(r))}connectedPosition=G({originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"});set position(r){this.connectedPosition.set(r)}isDisabled=!1;isOpen=G(!1);hex=new D("");rgbForm=new me({r:new D(0),g:new D(0),b:new D(0)});hslForm=new me({h:new D(0),s:new D(0),l:new D(0)});inputType=new D("HEX");color=G("#000000");lowContrast=Xe(()=>!ut(this.color(),"#FFFFFF",1.2));supportsEyeDropper=!1;config=W(gt);storage=W(ft);overlay=W(Ge);el=W(C);overlayClosed$=new Me;destroyRef=W(He);
1_viewContainerRef=W(Ae);palette;initialized=!1;overlayRef=null;colorHistory=G([]);constructor(){this.supportsEyeDropper="EyeDropper"in window,ot(this.isOpen).pipe(q()).subscribe(r=>{if(!r){this.overlayClosed$.next();return}let e=this.overlay.position().flexibleConnectedTo(this.triggerRef.nativeElement).withPositions([this.connectedPosition()]).withFlexibleDimensions(!1).withPush(!0).withViewportMargin(16).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}]);this.overlayRef=this.overlay.create({positionStrategy:e,scrollStrategy:this.overlay.scrollStrategies.close(),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",panelClass:"color-picker-overlay-panel"}),this.overlayRef.attach(new ze(this.contentTemplate,this._viewContainerRef)),this.overlayRef.backdropClick().subscribe(()=>{this.overlayRef?.detach(),this.isOpen.set(!1)}),e.positionChanges.pipe(Z(this.overlayClosed$),q(this.destroyRef)).subscribe(i=>{this.logger.debug("Overlay position changed",{change:i})}),this.storage.get(oe.ColorHistory,[]).then(i=>{this.config.config$.pipe(Oe(1)).subscribe(o=>{if(!i?.length){let a=[new I.Color(o.style.primaryColor).rgbaString,new I.Color(o.style.accentColor).rgbaString,new I.Color(o.style.navTextColor).rgbaString];this.storage.set(oe.ColorHistory,a),this.colorHistory.set(a),i=a}this.colorHistory.set(i)})}),setTimeout(()=>{let i=[{component:I.ui.Box,options:{borderWidth:0,width:242,boxHeight:160}},{component:I.ui.Slider,options:{sliderType:"hue",width:210}}];this.showAlpha()&&i.push({component:I.ui.Slider,options:{sliderType:"alpha",width:210}}),this.palette=I.ColorPicker(this.paletteRef.nativeElement,{display:"flex",margin:16,width:242,color:this.color(),borderWidth:1,borderColor:"#fff",layout:i}),this.palette.color.set(this.color()),this.palette.on("input:change",o=>{this.setColor(o),this.onChange(o.rgbaString)}),this.palette.on("input:move",()=>{this.inputTypeSelectorRef.nativeElement.focus()})}),this.hex.valueChanges.pipe(Z(this.overlayClosed$),q(this.destroyRef)).subscribe(i=>{i??="#000000";let o;try{o=new I.Color(i)}catch{return}this.setColor(o),this.onChange(o.rgbaString)}),this.rgbForm.valueChanges.pipe(Z(this.overlayClosed$),q(this.destroyRef)).subscribe(i=>{if(!i||i.r===null||i.g===null||i.b===null)return;let o=new I.Color({r:i.r,g:i.g,b:i.b,a:this.palette?.color.alpha});o&&(this.setColor(o),this.onChange(o.rgbaString))}),this.hslForm.valueChanges.pipe(Z(this.overlayClosed$),q(this.destroyRef)).subscribe(i=>{if(!i||i.h===null||i.s===null||i.l===null)return;let o=new I.Color({h:i.h,s:i.s,l:i.l,a:this.palette?.color.alpha});this.setColor(o),this.onChange(o.rgbaString)}),this.setColor(new I.Color(this.color()))})}setColor(r){this.color.set(r.rgbaString),this.palette&&this.palette.color.set(r),this.hexInputRef?.nativeElement!==document.activeElement&&this.hex.setValue(this.showAlpha()?r.hex8String.toUpperCase():r.hexString.toUpperCase(),{emitEvent:!1}),this.rInputRef?.nativeElement!==document.activeElement&&this.gInputRef?.nativeElement!==document.activeElement&&this.bInputRef?.nativeElement!==document.activeElement&&this.rgbForm.setValue({r:r.rgb.r,g:r.rgb.g,b:r.rgb.b},{emitEvent:!1}),this.hInputRef?.nativeElement!==document.activeElement&&this.sInputRef?.nativeElement!==document.activeElement&&this.lInputRef?.nativeElement!==document.activeElement&&this.hslForm.setValue({h:r.hsl.h,s:r.hsl.s,l:r.hsl.l},{emitEvent:!1}),this.el.nativeElement.style.setProperty("--color-picker-color",r.rgbaString)}selectColor(r){this.setColor(new I.Color(r)),this.onChange(r)}toggleOverlay(r){this.isOpen.update(e=>!e),this.isOpen()&&(this.initialized=!1)}closeOverlay(r){r.target===this.triggerRef.nativeElement||r.target.classList.contains("cdk-overlay-backdrop")||(this.isOpen.set(!1),this.initialized=!1,this.addColorToHistory(this.color()))}detached(){this.isOpen.set(!1),this.initialized=!1,this.addColorToHistory(this.color())}addColorToHistory(r){let e=[...this.colorHistory().filter(i=>i!==r),r];e.length>12&&e.shift(),this.storage.set(oe.ColorHistory,e),this.colorHistory.set(e)}writeValue(r){this.setColor(new I.Color(r))}onChange;registerOnChange(r){this.onChange=r}onTouched;registerOnTouched(r){this.onTouched=r}setDisabledState(r){this.isDisabled=r}eyedropper(){new window.EyeDropper().open().then(e=>{this.hex.setValue(e.sRGBHex)}).catch(e=>{this.logger.error("EyeDropper failed",{error:e})})}reset(){this.isOpen.set(!1)}close(){this.isOpen.set(!1),this.addColorToHistory(this.color()),this.overlayRef?.detach()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=De({type:t,selectors:[["ih-color-picker"]],viewQuery:function(e,i){if(e&1&&je(Mr,5,C)(Or,5,C)(Tr,5,C)(Hr,5,C)(Ar,5,C)(Dr,5,C)(Nr,5,C)(Fr,5,C
1)($r,5,C)(Br,5,C)(Wr,5,C)(jr,5,C)(Lr,5),e&2){let o;x(o=w())&&(i.hueRef=o.first),x(o=w())&&(i.alphaRef=o.first),x(o=w())&&(i.paletteRef=o.first),x(o=w())&&(i.triggerRef=o.first),x(o=w())&&(i.hexInputRef=o.first),x(o=w())&&(i.rInputRef=o.first),x(o=w())&&(i.gInputRef=o.first),x(o=w())&&(i.bInputRef=o.first),x(o=w())&&(i.hInputRef=o.first),x(o=w())&&(i.sInputRef=o.first),x(o=w())&&(i.lInputRef=o.first),x(o=w())&&(i.inputTypeSelectorRef=o.first),x(o=w())&&(i.contentTemplate=o.first)}},hostVars:2,hostBindings:function(e,i){e&2&&ve("ih-color-picker",i.hostClass)},inputs:{alphaEnabled:"alphaEnabled",position:"position"},features:[Ve([{provide:at,useExisting:Te(()=>t),multi:!0},{provide:vt,useValue:{overlayPanelClass:"mat-select-overlay-panel"}}])],decls:4,vars:3,consts:[["trigger","cdkOverlayOrigin"],["colorPanel",""],["palette",""],["inputTypeSelector",""],["hexInput",""],["rInput",""],["gInput",""],["bInput",""],["hInput",""],["sInput",""],["lInput",""],["matRipple","","type","button","cdkOverlayOrigin","","aria-label","Open color picker",1,"color-picker-trigger","background-checkered",3,"click","matRippleDisabled"],[1,"color-picker-overlay","mat-elevation-z6"],[1,"color-picker-selection-palette"],[1,"color-picker-swatches","fx-layout-row","fx-layout-align-center-center"],["matRipple","","type","button",1,"color-picker-swatch","background-checkered",3,"background"],[1,"color-picker-controls","fx-layout-row"],["panelWidth","",1,"color-picker-input-type",3,"formControl"],["value","HEX"],["value","RGB"],["value","HSL"],["type","text",1,"color-picker-input","color-picker-input-hex",3,"formControl"],[1,"color-picker-action-row","fx-layout-row","fx-layout-align-start-center"],["mat-icon-button","","type","button",1,"color-picker-eye-dropper"],[1,"fx-flex"],["mat-button","","type","button",1,"color-picker-apply",3,"click"],["matRipple","","type","button",1,"color-picker-swatch","background-checkered",3,"click"],["type","text",1,"color-picker-input","color-picker-input-red",3,"formControl"],["type","text",1,"color-picker-input","color-picker-input-green",3,"formControl"],["type","text",1,"color-picker-input","color-picker-input-blue",3,"formControl"],["type","text",1,"color-picker-input","color-picker-input-hue",3,"formControl"],["type","text",1,"color-picker-input","color-picker-input-saturation",3,"formControl"],["type","text",1,"color-picker-input","color-picker-input-lightness",3,"formControl"],["mat-icon-button","","type","button",1,"color-picker-eye-dropper",3,"click"],["svgIcon","eyedropper"]],template:function(e,i){e&1&&(M(0,"button",11,0),J("click",function(a){return i.toggleOverlay(a)}),H(),Ne(2,qr,23,3,"ng-template",null,1,Ue)),e&2&&(ve("low-contrast",i.lowContrast()),T("matRippleDisabled",i.showAlpha()))},dependencies:[it,nt,rt,tt,et,pt,Je,Ke,_t,mt,Ze,bt,Qe,qe,ht,st,lt,ct],styles:['.color-picker-overlay-panel .IroColorPicker{flex-direction:column;align-items:center} .color-picker-overlay-panel .IroBox{border-radius:16px 16px 0 0!important}[_nghost-%COMP%]{display:inline-block;-webkit-user-select:none;user-select:none;height:48px;width:100%;--color-picker-color: var(--mat-sys-on-surface, #000)}.color-picker-trigger[_ngcontent-%COMP%]{background:transparent;border:none;border-radius:var(--mat-sys-corner-large);box-shadow:var(--mat-sys-level1);height:100%;outline:1px solid transparent;overflow:hidden;transition:box-shadow .2s ease,outline-color .2s ease;width:100%}.color-picker-trigger[_ngcontent-%COMP%]:hover{box-shadow:var(--mat-sys-level2)}.color-picker-trigger.low-contrast[_ngcontent-%COMP%]{outline-color:var(--mat-sys-outline-variant)}.color-picker-trigger.background-checkered[_ngcontent-%COMP%]:before{z-index:0}.color-picker-trigger[_ngcontent-%COMP%]:after{background:var(--color-picker-color);border-radius:.15em;content:"";height:100%;left:0;position:absolute;top:0;transition:background .1s;width:100%}.color-picker-overlay[_ngcontent-%COMP%]{position:relative;z-index:0;background-color:#fff;border-radius:16px;margin-top:4px;border:1px solid rgba(0,0,0,.38);width:15.25rem;max-width:95vw;min-height:375px}
1.color-picker-selection-palette[_ngcontent-%COMP%]{cursor:pointer}.color-picker-input-type[_ngcontent-%COMP%]{width:3.125rem;margin-right:.5rem}.color-picker-input[_ngcontent-%COMP%]{flex:1;border-radius:4px;border:1px solid rgba(0,0,0,.38);padding:.5rem;min-width:0;text-align:center}.color-picker-input[_ngcontent-%COMP%]:hover, .color-picker-input[_ngcontent-%COMP%]:focus{border-color:#000000de}.color-picker-swatches[_ngcontent-%COMP%]{flex-wrap:wrap;padding:1rem 1rem 0;gap:8px}.color-picker-swatch[_ngcontent-%COMP%]{height:1.5rem;width:1.5rem;flex-shrink:0;flex-basis:1.5rem;border-radius:4px;outline:none;cursor:pointer;border:1px solid rgba(0,0,0,.36)}.color-picker-controls[_ngcontent-%COMP%]{display:flex;align-items:center;padding:1rem 1rem 0;gap:8px}.color-picker-controls-buttons[_ngcontent-%COMP%]{flex-shrink:0}.color-picker-action-row[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.38);margin-top:1rem;padding:.5rem}.background-checkered[_ngcontent-%COMP%]{position:relative}.background-checkered[_ngcontent-%COMP%]:before{position:absolute;content:"";top:0;left:0;width:100%;height:100%;background:linear-gradient(45deg,grey 25%,transparent 25%,transparent 75%,grey 75%,grey),linear-gradient(45deg,grey 25%,transparent 25%,transparent 75%,grey 75%,grey);background-size:.5rem .5rem,.5rem .5rem;background-position:0 0,.25rem .25rem;z-index:-1}']})}return t})();export{Sn as a}; 2/**i18n:0f1fade16046009adad02f3fd9ac957882d03995a783f16776cfd917e99ccbcd*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.