diff --git a/js/index-CQRgr7_b.chunk.mjs b/js/index-D5vryGZj.chunk.mjs similarity index 96% rename from js/index-CQRgr7_b.chunk.mjs rename to js/index-D5vryGZj.chunk.mjs index 5813211b1..abc1f7c2e 100644 --- a/js/index-CQRgr7_b.chunk.mjs +++ b/js/index-D5vryGZj.chunk.mjs @@ -1,2 +1,2 @@ -import{c as x,o as p,n as R,r as D,a as l,b,w as T,v as ye,t as oe,d as K,e as w,f as L,g as z,h as g,i as fe,j as ke,_ as Ce,k as Me,m as re,u as ie,l as _e,p as I,q as f,s as Se,T as He,F as Ae,x as $e,y as Le,N as U,z as Ee,A as Re,B as G,C as Fe,D as Ie,E as De,G as Ne,H as Be,I as Te,J as Ve,K as ze,L as Ue}from"./logreader-main.mjs";const Oe="";function N(e,t){t===void 0&&(t={});var a=t.insertAt;if(!(!e||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}const B=function(e,t){const{componentPrefix:a=Oe}=t||{};e.component(`${a}${this.name}`,this)},J={};var V={name:"Checkboard",props:{size:{type:[Number,String],default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},computed:{bgStyle(){return{"background-image":`url(${We(this.white,this.grey,this.size)})`}}}};function je(e,t,a){if(typeof document>"u")return null;const n=document.createElement("canvas");n.width=n.height=a*2;const r=n.getContext("2d");return r?(r.fillStyle=e,r.fillRect(0,0,n.width,n.height),r.fillStyle=t,r.fillRect(0,0,a,a),r.translate(a,a),r.fillRect(0,0,a,a),n.toDataURL()):null}function We(e,t,a){const n=`${e},${t},${a}`;if(J[n])return J[n];const r=je(e,t,a);return J[n]=r,r}function qe(e,t,a,n,r,o){return p(),x("div",{class:"vc-checkerboard",style:R(o.bgStyle)},null,4)}var Xe=".vc-checkerboard{background-size:contain;bottom:0;left:0;position:absolute;right:0;top:0}";N(Xe),V.render=qe,V.__file="src/components/checkboard/checkboard.vue",V.install=B;var W={name:"Alpha",components:{Checkboard:V},props:{value:Object,onChange:Function},computed:{colors(){return this.value},gradientColor(){const{rgba:e}=this.colors,t=[e.r,e.g,e.b].join(",");return`linear-gradient(to right, rgba(${t}, 0) 0%, rgba(${t}, 1) 100%)`}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:a}=this.$refs;if(!a)return;const n=a.clientWidth,r=a.getBoundingClientRect().left+window.pageXOffset,o=(e.pageX||(e.touches?e.touches[0].pageX:0))-r;let i;o<0?i=0:o>n?i=1:i=Math.round(o*100/n)/100,this.colors.a!==i&&this.$emit("change",{h:this.colors.hsl.h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:i,source:"rgba"})},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const Pe={class:"vc-alpha"},Ye={class:"vc-alpha-checkboard-wrap"},Ke=l("div",{class:"vc-alpha-picker"},null,-1),Ge=[Ke];function Je(e,t,a,n,r,o){const i=D("Checkboard");return p(),x("div",Pe,[l("div",Ye,[b(i)]),l("div",{class:"vc-alpha-gradient",style:R({background:o.gradientColor})},null,4),l("div",{ref:"container",class:"vc-alpha-container",onMousedown:t[0]||(t[0]=(...s)=>o.handleMouseDown&&o.handleMouseDown(...s)),onTouchmove:t[1]||(t[1]=(...s)=>o.handleChange&&o.handleChange(...s)),onTouchstart:t[2]||(t[2]=(...s)=>o.handleChange&&o.handleChange(...s))},[l("div",{class:"vc-alpha-pointer",style:R({left:`${o.colors.a*100}%`})},Ge,4)],544)])}var Ze=".vc-alpha,.vc-alpha-checkboard-wrap{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-container{cursor:pointer;height:100%;margin:0 3px;position:relative;z-index:2}.vc-alpha-pointer{position:absolute;z-index:2}.vc-alpha-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";N(Ze),W.render=Je,W.__file="src/components/alpha/alpha.vue",W.install=B;function m(e,t){Qe(e)&&(e="100%");var a=et(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),a&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function O(e){return Math.min(1,Math.max(0,e))}function Qe(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function et(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ge(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function j(e){return e<=1?"".concat(Number(e)*100,"%"):e}function F(e){return e.length===1?"0"+e:String(e)}function tt(e,t,a){return{r:m(e,255)*255,g:m(t,255)*255,b:m(a,255)*255}}function se(e,t,a){e=m(e,255),t=m(t,255),a=m(a,255);var n=Math.max(e,t,a),r=Math.min(e,t,a),o=0,i=0,s=(n+r)/2;if(n===r)i=0,o=0;else{var d=n-r;switch(i=s>.5?d/(2-n-r):d/(n+r),n){case e:o=(t-a)/d+(t1&&(a-=1),a<1/6?e+(t-e)*(6*a):a<1/2?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function at(e,t,a){var n,r,o;if(e=m(e,360),t=m(t,100),a=m(a,100),t===0)r=a,o=a,n=a;else{var i=a<.5?a*(1+t):a+t-a*t,s=2*a-i;n=Z(s,i,e+1/3),r=Z(s,i,e),o=Z(s,i,e-1/3)}return{r:n*255,g:r*255,b:o*255}}function le(e,t,a){e=m(e,255),t=m(t,255),a=m(a,255);var n=Math.max(e,t,a),r=Math.min(e,t,a),o=0,i=n,s=n-r,d=n===0?0:s/n;if(n===r)o=0;else{switch(n){case e:o=(t-a)/s+(t>16,g:(e&65280)>>8,b:e&255}}var ne={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function st(e){var t={r:0,g:0,b:0},a=1,n=null,r=null,o=null,i=!1,s=!1;return typeof e=="string"&&(e=ct(e)),typeof e=="object"&&(S(e.r)&&S(e.g)&&S(e.b)?(t=tt(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):S(e.h)&&S(e.s)&&S(e.v)?(n=j(e.s),r=j(e.v),t=ot(e.h,n,r),i=!0,s="hsv"):S(e.h)&&S(e.s)&&S(e.l)&&(n=j(e.s),o=j(e.l),t=at(e.h,n,o),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(a=e.a)),a=ge(a),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a}}var lt="[-\\+]?\\d+%?",ht="[-\\+]?\\d*\\.\\d+%?",E="(?:".concat(ht,")|(?:").concat(lt,")"),Q="[\\s|\\(]+(".concat(E,")[,|\\s]+(").concat(E,")[,|\\s]+(").concat(E,")\\s*\\)?"),ee="[\\s|\\(]+(".concat(E,")[,|\\s]+(").concat(E,")[,|\\s]+(").concat(E,")[,|\\s]+(").concat(E,")\\s*\\)?"),_={CSS_UNIT:new RegExp(E),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+ee),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+ee),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+ee),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ct(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ne[e])e=ne[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var a=_.rgb.exec(e);return a?{r:a[1],g:a[2],b:a[3]}:(a=_.rgba.exec(e),a?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=_.hsl.exec(e),a?{h:a[1],s:a[2],l:a[3]}:(a=_.hsla.exec(e),a?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=_.hsv.exec(e),a?{h:a[1],s:a[2],v:a[3]}:(a=_.hsva.exec(e),a?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=_.hex8.exec(e),a?{r:k(a[1]),g:k(a[2]),b:k(a[3]),a:ce(a[4]),format:t?"name":"hex8"}:(a=_.hex6.exec(e),a?{r:k(a[1]),g:k(a[2]),b:k(a[3]),format:t?"name":"hex"}:(a=_.hex4.exec(e),a?{r:k(a[1]+a[1]),g:k(a[2]+a[2]),b:k(a[3]+a[3]),a:ce(a[4]+a[4]),format:t?"name":"hex8"}:(a=_.hex3.exec(e),a?{r:k(a[1]+a[1]),g:k(a[2]+a[2]),b:k(a[3]+a[3]),format:t?"name":"hex"}:!1)))))))))}function S(e){return!!_.CSS_UNIT.exec(String(e))}var dt=(function(){function e(t,a){t===void 0&&(t=""),a===void 0&&(a={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=it(t)),this.originalInput=t;var r=st(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=a.format)!==null&&n!==void 0?n:r.format,this.gradientType=a.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),a,n,r,o=t.r/255,i=t.g/255,s=t.b/255;return o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),.2126*a+.7152*n+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ge(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=le(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=le(this.r,this.g,this.b),a=Math.round(t.h*360),n=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(a,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(a,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=se(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=se(this.r,this.g,this.b),a=Math.round(t.h*360),n=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(a,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(a,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),he(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),nt(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),a=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(a,", ").concat(n,")"):"rgba(".concat(t,", ").concat(a,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(a){return"".concat(Math.round(m(a,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(a){return Math.round(m(a,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+he(this.r,this.g,this.b,!1),a=0,n=Object.entries(ne);a=0,o=!a&&r&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.l+=t/100,a.l=O(a.l),new e(a)},e.prototype.brighten=function(t){t===void 0&&(t=10);var a=this.toRgb();return a.r=Math.max(0,Math.min(255,a.r-Math.round(255*-(t/100)))),a.g=Math.max(0,Math.min(255,a.g-Math.round(255*-(t/100)))),a.b=Math.max(0,Math.min(255,a.b-Math.round(255*-(t/100)))),new e(a)},e.prototype.darken=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.l-=t/100,a.l=O(a.l),new e(a)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.s-=t/100,a.s=O(a.s),new e(a)},e.prototype.saturate=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.s+=t/100,a.s=O(a.s),new e(a)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var a=this.toHsl(),n=(a.h+t)%360;return a.h=n<0?360+n:n,new e(a)},e.prototype.mix=function(t,a){a===void 0&&(a=50);var n=this.toRgb(),r=new e(t).toRgb(),o=a/100,i={r:(r.r-n.r)*o+n.r,g:(r.g-n.g)*o+n.g,b:(r.b-n.b)*o+n.b,a:(r.a-n.a)*o+n.a};return new e(i)},e.prototype.analogous=function(t,a){t===void 0&&(t=6),a===void 0&&(a=30);var n=this.toHsl(),r=360/a,o=[this];for(n.h=(n.h-(r*t>>1)+720)%360;--t;)n.h=(n.h+r)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var a=this.toHsv(),n=a.h,r=a.s,o=a.v,i=[],s=1/t;t--;)i.push(new e({h:n,s:r,v:o})),o=(o+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),a=t.h;return[this,new e({h:(a+72)%360,s:t.s,l:t.l}),new e({h:(a+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var a=this.toRgb(),n=new e(t).toRgb(),r=a.a+n.a*(1-a.a);return new e({r:(a.r*a.a+n.r*n.a*(1-a.a))/r,g:(a.g*a.a+n.g*n.a*(1-a.a))/r,b:(a.b*a.a+n.b*n.a*(1-a.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var a=this.toHsl(),n=a.h,r=[this],o=360/t,i=1;i0?n=$(e.hex):e&&e.hsv?n=$(e.hsv):e&&e.rgba?n=$(e.rgba):e&&e.rgb?n=$(e.rgb):n=$(e),n&&(n._a===void 0||n._a===null)&&n.setAlpha(a||n.getAlpha());const r=n.toHsl(),o=n.toHsv();return r.s===0&&(o.h=r.h=e.h||e.hsl&&e.hsl.h||t||0),o.v<.0164&&(o.h=e.h||e.hsv&&e.hsv.h||0,o.s=e.s||e.hsv&&e.hsv.s||0),r.l<.01&&(r.h=e.h||e.hsl&&e.hsl.h||0,r.s=e.s||e.hsl&&e.hsl.s||0),{hsl:r,hex:n.toHexString().toUpperCase(),hex8:n.toHex8String().toUpperCase(),rgba:n.toRgb(),hsv:o,oldHue:e.h||t||r.h,source:e.source,a:n.getAlpha()}}var ut={model:{prop:"modelValue",event:"update:modelValue"},props:["modelValue"],data(){return{val:te(this.modelValue)}},computed:{colors:{get(){return this.val},set(e){this.val=e,this.$emit("update:modelValue",e)}}},watch:{modelValue(e){this.val=te(e)}},methods:{colorChange(e,t){this.oldHue=this.colors.hsl.h,this.colors=te(e,t||this.oldHue)},isValidHex(e){return $(e).isValid},simpleCheckForValidColor(e){const t=["r","g","b","a","h","s","l","v"];let a=0,n=0;for(let r=0;rt.toUpperCase())},isTransparent(e){return $(e).getAlpha()===0}}},q={name:"EditableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(e){if(this.max!==void 0&&+e>this.max)this.$refs.input.value=this.max;else return e}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(e){this.handleChange(e.target.value)},handleChange(e){const t={};t[this.label]=e,t.hex===void 0&&t["#"]===void 0?this.$emit("change",t):e.length>5&&this.$emit("change",t)},handleKeyDown(e){let{val:t}=this;const a=Number(t);if(a){const n=this.arrowOffset||1;e.keyCode===38&&(t=a+n,this.handleChange(t),e.preventDefault()),e.keyCode===40&&(t=a-n,this.handleChange(t),e.preventDefault())}}}};const pt={class:"vc-editable-input"},ft=["aria-labelledby"],gt=["id","for"],vt={class:"vc-input__desc"};function bt(e,t,a,n,r,o){return p(),x("div",pt,[T(l("input",{ref:"input","onUpdate:modelValue":t[0]||(t[0]=i=>o.val=i),"aria-labelledby":o.labelId,class:"vc-input__input",onKeydown:t[1]||(t[1]=(...i)=>o.handleKeyDown&&o.handleKeyDown(...i)),onInput:t[2]||(t[2]=(...i)=>o.update&&o.update(...i))},null,40,ft),[[ye,o.val]]),l("span",{id:o.labelId,for:a.label,class:"vc-input__label"},oe(o.labelSpanText),9,gt),l("span",vt,oe(a.desc),1)])}var mt=".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}";N(mt),q.render=bt,q.__file="src/components/editable-input/editable-input.vue",q.install=B;function ae(e,t,a){return ta?a:e:et?t:e}var X={name:"Saturation",props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return`${-(this.colors.hsv.v*100)+1+100}%`},pointerLeft(){return`${this.colors.hsv.s*100}%`}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:a}=this.$refs;if(!a)return;const n=a.clientWidth,r=a.clientHeight,o=a.getBoundingClientRect().left+window.pageXOffset,i=a.getBoundingClientRect().top+window.pageYOffset,s=e.pageX||(e.touches?e.touches[0].pageX:0),d=e.pageY||(e.touches?e.touches[0].pageY:0),M=ae(s-o,0,n),v=ae(d-i,0,r),u=M/n,H=ae(-(v/r)+1,0,1);this.onChange({h:this.colors.hsv.h,s:u,v:H,a:this.colors.hsv.a,source:"hsva"})},onChange(e){this.$emit("change",e)},handleMouseDown(e){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const xt=l("div",{class:"vc-saturation--white"},null,-1),wt=l("div",{class:"vc-saturation--black"},null,-1),yt=l("div",{class:"vc-saturation-circle"},null,-1),kt=[yt];function Ct(e,t,a,n,r,o){return p(),x("div",{ref:"container",class:"vc-saturation",style:R({background:o.bgColor}),onMousedown:t[0]||(t[0]=(...i)=>o.handleMouseDown&&o.handleMouseDown(...i)),onTouchmove:t[1]||(t[1]=(...i)=>o.handleChange&&o.handleChange(...i)),onTouchstart:t[2]||(t[2]=(...i)=>o.handleChange&&o.handleChange(...i))},[xt,wt,l("div",{class:"vc-saturation-pointer",style:R({top:o.pointerTop,left:o.pointerLeft})},kt,4)],36)}var Mt=".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}";N(Mt),X.render=Ct,X.__file="src/components/saturation/saturation.vue",X.install=B;var P={name:"Hue",props:{value:Object,direction:{type:String,default:"horizontal"}},data(){return{oldHue:0,pullDirection:""}},computed:{colors(){return this.value},directionClass(){return{"vc-hue--horizontal":this.direction==="horizontal","vc-hue--vertical":this.direction==="vertical"}},pointerTop(){return this.direction==="vertical"?this.colors.hsl.h===0&&this.pullDirection==="right"?0:`${-(this.colors.hsl.h*100/360)+100}%`:0},pointerLeft(){return this.direction==="vertical"?0:this.colors.hsl.h===0&&this.pullDirection==="right"?"100%":`${this.colors.hsl.h*100/360}%`}},watch:{value:{handler(e,t){const{h:a}=e.hsl;a!==0&&a-this.oldHue>0&&(this.pullDirection="right"),a!==0&&a-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=a},deep:!0,immediate:!0}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:a}=this.$refs;if(!a)return;const n=a.clientWidth,r=a.clientHeight,o=a.getBoundingClientRect().left+window.pageXOffset,i=a.getBoundingClientRect().top+window.pageYOffset,s=e.pageX||(e.touches?e.touches[0].pageX:0),d=e.pageY||(e.touches?e.touches[0].pageY:0),M=s-o,v=d-i;let u,H;this.direction==="vertical"?(v<0?u=360:v>r?u=0:(H=-(v*100/r)+100,u=360*H/100),this.colors.hsl.h!==u&&this.$emit("change",{h:u,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(M<0?u=0:M>n?u=360:(H=M*100/n,u=360*H/100),this.colors.hsl.h!==u&&this.$emit("change",{h:u,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const _t=["aria-valuenow"],St=l("div",{class:"vc-hue-picker"},null,-1),Ht=[St];function At(e,t,a,n,r,o){return p(),x("div",{class:K(["vc-hue",[o.directionClass]])},[l("div",{ref:"container",class:"vc-hue-container",role:"slider","aria-valuenow":o.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360",onMousedown:t[0]||(t[0]=(...i)=>o.handleMouseDown&&o.handleMouseDown(...i)),onTouchmove:t[1]||(t[1]=(...i)=>o.handleChange&&o.handleChange(...i)),onTouchstart:t[2]||(t[2]=(...i)=>o.handleChange&&o.handleChange(...i))},[l("div",{class:"vc-hue-pointer",style:R({top:o.pointerTop,left:o.pointerLeft}),role:"presentation"},Ht,4)],40,_t)],2)}var $t=".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";N($t),P.render=At,P.__file="src/components/hue/hue.vue",P.install=B;var Y={name:"Chrome",components:{Saturation:X,Hue:P,Alpha:W,EdIn:q,Checkboard:V},mixins:[ut],props:{disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1},format:{type:String,default:"hex"}},data(){return{fieldsIndex:"hex",highlight:!1}},computed:{hsl(){const{h:e,s:t,l:a}=this.colors.hsl;return{h:e.toFixed(),s:`${(t*100).toFixed()}%`,l:`${(a*100).toFixed()}%`}},activeColor(){const{rgba:e}=this.colors;return`rgba(${[e.r,e.g,e.b,e.a].join(",")})`},hasAlpha(){return this.colors.a<1}},watch:{format:{handler(e){this.fieldsIndex=e},immediate:!0}},methods:{childChange(e){this.colorChange(e)},inputChange(e){if(e){if(e.hex)this.isValidHex(e.hex)&&this.colorChange({hex:e.hex,source:"hex"});else if(e.r||e.g||e.b||e.a)this.colorChange({r:e.r||this.colors.rgba.r,g:e.g||this.colors.rgba.g,b:e.b||this.colors.rgba.b,a:e.a||this.colors.rgba.a,source:"rgba"});else if(e.h||e.s||e.l){const t=e.s?e.s.replace("%","")/100:this.colors.hsl.s,a=e.l?e.l.replace("%","")/100:this.colors.hsl.l;this.colorChange({h:e.h||this.colors.hsl.h,s:t,l:a,source:"hsl"})}}},toggleViews(){switch(this.fieldsIndex){case"hex":this.fieldsIndex=`rgb${this.disableAlpha?"":"a"}`;break;case"rgb":case"rgba":this.fieldsIndex=`hsl${this.disableAlpha?"":"a"}`;break;default:this.fieldsIndex="hex";break}this.$emit("update:format",this.fieldsIndex)},showHighlight(){this.highlight=!0},hideHighlight(){this.highlight=!1}}};const Lt={class:"vc-chrome-saturation-wrap"},Et={class:"vc-chrome-body"},Rt={class:"vc-chrome-controls"},Ft={class:"vc-chrome-color-wrap"},It=["aria-label"],Dt={class:"vc-chrome-sliders"},Nt={class:"vc-chrome-hue-wrap"},Bt={key:0,class:"vc-chrome-alpha-wrap"},Tt={key:0,class:"vc-chrome-fields-wrap"},Vt={class:"vc-chrome-fields"},zt={class:"vc-chrome-field"},Ut={class:"vc-chrome-fields"},Ot={class:"vc-chrome-field"},jt={class:"vc-chrome-field"},Wt={class:"vc-chrome-field"},qt={key:0,class:"vc-chrome-field"},Xt={class:"vc-chrome-fields"},Pt={class:"vc-chrome-field"},Yt={class:"vc-chrome-field"},Kt={class:"vc-chrome-field"},Gt={key:0,class:"vc-chrome-field"},Jt={class:"vc-chrome-toggle-icon"},Zt=l("path",{fill:"#333",d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"},null,-1),Qt=[Zt],ea={class:"vc-chrome-toggle-icon-highlight"};function ta(e,t,a,n,r,o){const i=D("Saturation"),s=D("Checkboard"),d=D("Hue"),M=D("Alpha"),v=D("EdIn");return p(),x("div",{role:"application","aria-label":"Chrome color picker",class:K(["vc-chrome",[a.disableAlpha?"vc-chrome__disable-alpha":""]])},[l("div",Lt,[b(i,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]),l("div",Et,[l("div",Rt,[l("div",Ft,[l("div",{"aria-label":`current color is ${e.colors.hex}`,class:"vc-chrome-active-color",style:R({background:o.activeColor})},null,12,It),a.disableAlpha?w("v-if",!0):(p(),L(s,{key:0}))]),l("div",Dt,[l("div",Nt,[b(d,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]),a.disableAlpha?w("v-if",!0):(p(),x("div",Bt,[b(M,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]))])]),a.disableFields?w("v-if",!0):(p(),x("div",Tt,[T(l("div",Vt,[w(" hex "),l("div",zt,[o.hasAlpha?w("v-if",!0):(p(),L(v,{key:0,label:"hex",value:e.colors.hex,onChange:o.inputChange},null,8,["value","onChange"])),o.hasAlpha?(p(),L(v,{key:1,label:"hex",value:e.colors.hex8,onChange:o.inputChange},null,8,["value","onChange"])):w("v-if",!0)])],512),[[z,r.fieldsIndex==="hex"]]),T(l("div",Ut,[w(" rgba "),l("div",Ot,[b(v,{label:"r",value:e.colors.rgba.r,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",jt,[b(v,{label:"g",value:e.colors.rgba.g,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",Wt,[b(v,{label:"b",value:e.colors.rgba.b,onChange:o.inputChange},null,8,["value","onChange"])]),a.disableAlpha?w("v-if",!0):(p(),x("div",qt,[b(v,{label:"a",value:e.colors.a,"arrow-offset":.01,max:1,onChange:o.inputChange},null,8,["value","arrow-offset","onChange"])]))],512),[[z,["rgb","rgba"].includes(r.fieldsIndex)]]),T(l("div",Xt,[w(" hsla "),l("div",Pt,[b(v,{label:"h",value:o.hsl.h,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",Yt,[b(v,{label:"s",value:o.hsl.s,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",Kt,[b(v,{label:"l",value:o.hsl.l,onChange:o.inputChange},null,8,["value","onChange"])]),a.disableAlpha?w("v-if",!0):(p(),x("div",Gt,[b(v,{label:"a",value:e.colors.a,"arrow-offset":.01,max:1,onChange:o.inputChange},null,8,["value","arrow-offset","onChange"])]))],512),[[z,["hsl","hsla"].includes(r.fieldsIndex)]]),w(" btn "),l("div",{class:"vc-chrome-toggle-btn",role:"button","aria-label":"Change another color definition",onClick:t[3]||(t[3]=(...u)=>o.toggleViews&&o.toggleViews(...u))},[l("div",Jt,[(p(),x("svg",{style:{width:"24px",height:"24px"},viewBox:"0 0 24 24",onMouseover:t[0]||(t[0]=(...u)=>o.showHighlight&&o.showHighlight(...u)),onMouseenter:t[1]||(t[1]=(...u)=>o.showHighlight&&o.showHighlight(...u)),onMouseout:t[2]||(t[2]=(...u)=>o.hideHighlight&&o.hideHighlight(...u))},Qt,32))]),T(l("div",ea,null,512),[[z,r.highlight]])]),w(" btn ")]))])],2)}var aa=".vc-chrome{background:#fff;background-color:#fff;border-radius:2px;box-shadow:0 0 2px rgba(0,0,0,.3),0 4px 8px rgba(0,0,0,.3);box-sizing:initial;font-family:Menlo;width:225px}.vc-chrome-controls{display:flex}.vc-chrome-color-wrap{position:relative;width:36px}.vc-chrome-active-color{border-radius:15px;height:30px;overflow:hidden;position:relative;width:30px;z-index:1}.vc-chrome-color-wrap .vc-checkerboard{background-size:auto;border-radius:15px;height:30px;width:30px}.vc-chrome-sliders{flex:1}.vc-chrome-fields-wrap{display:flex;padding-top:16px}.vc-chrome-fields{display:flex;flex:1;margin-left:-6px}.vc-chrome-field{padding-left:6px;width:100%}.vc-chrome-toggle-btn{position:relative;text-align:right;width:32px}.vc-chrome-toggle-icon{cursor:pointer;margin-right:-4px;margin-top:12px;position:relative;z-index:2}.vc-chrome-toggle-icon-highlight{background:#eee;border-radius:4px;height:28px;left:12px;position:absolute;top:10px;width:24px}.vc-chrome-hue-wrap{margin-bottom:8px}.vc-chrome-alpha-wrap,.vc-chrome-hue-wrap{height:10px;position:relative}.vc-chrome-alpha-wrap .vc-alpha-gradient,.vc-chrome-hue-wrap .vc-hue{border-radius:2px}.vc-chrome-alpha-wrap .vc-alpha-picker,.vc-chrome-hue-wrap .vc-hue-picker{background-color:#f8f8f8;border-radius:6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:12px;transform:translate(-6px,-2px);width:12px}.vc-chrome-body{background-color:#fff;padding:16px 16px 12px}.vc-chrome-saturation-wrap{border-radius:2px 2px 0 0;overflow:hidden;padding-bottom:55%;position:relative;width:100%}.vc-chrome-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-chrome-fields .vc-input__input{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #dadada;color:#333;font-size:11px;height:21px;text-align:center;width:100%}.vc-chrome-fields .vc-input__label{color:#969696;display:block;font-size:11px;line-height:11px;margin-top:12px;text-align:center;text-transform:uppercase}.vc-chrome__disable-alpha .vc-chrome-active-color{height:18px;width:18px}.vc-chrome__disable-alpha .vc-chrome-color-wrap{width:30px}.vc-chrome__disable-alpha .vc-chrome-hue-wrap{margin-bottom:4px;margin-top:4px}";N(aa),Y.render=ta,Y.__file="src/components/chrome/chrome.vue",Y.install=B,fe(ke);class y{constructor(t,a,n,r){this.r=t,this.g=a,this.b=n,this.name=r,this.r=Math.min(t,255),this.g=Math.min(a,255),this.b=Math.min(n,255),this.name=r}get color(){const t=a=>`00${a.toString(16)}`.slice(-2);return`#${t(this.r)}${t(this.g)}${t(this.b)}`}}const oa=new y(182,70,157,g("Purple")),na=new y(221,203,85,g("Gold")),ra=new y(0,130,201,g("Nextcloud blue")),de=new y(0,0,0,g("Black")),ue=new y(255,255,255,g("White")),pe=[oa,new y(191,103,139,g("Rosy brown")),new y(201,136,121,g("Feldspar")),new y(211,169,103,g("Whiskey")),na,new y(165,184,114,g("Olivine")),new y(110,166,143,g("Acapulco")),new y(55,148,172,g("Boston Blue")),ra,new y(45,115,190,g("Mariner")),new y(91,100,179,g("Blue Violet")),new y(136,85,168,g("Deluge"))];fe(Ue);const ia=["aria-label"],sa={key:0,class:"color-picker__simple"},la=["aria-label","name","checked","onClick"],ha=["title"],ca=["aria-label","name","checked"],da={key:0,class:"color-picker__navigation"},ua=Me({__name:"NcColorPicker",props:re({advancedFields:{type:Boolean},clearable:{type:Boolean},container:{default:"body"},palette:{default:()=>[]},paletteOnly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{},open:{type:Boolean},openModifiers:{}}),emits:re(["submit","closed"],["update:modelValue","update:open"]),setup(e,{emit:t}){const a=ie(e,"modelValue"),n=ie(e,"open"),r=e,o=t,i=/^#([a-f0-9]{3}|[a-f0-9]{6})$/i,s=_e(),d=Se(!1),M=Le(()=>{let c=r.palette;for(const h of c)if(typeof h=="string"&&!h.match(i)||typeof h=="object"&&!h.color?.match(i)){ze.error("[NcColorPicker] Invalid palette passed",{color:h}),c=[];break}return c.length===0&&(c=r.clearable?[...pe,de,ue]:[...pe]),c.map(h=>({color:typeof h=="object"?h.color:h,name:typeof h=="object"&&h.name?h.name:g("A color with a HEX value {hex}",{hex:typeof h=="string"?h:h.color})}))});function v(c){o("submit",a.value),c(),d.value=!1}function u(c){c=typeof c=="string"?c:c.color,r.clearable&&a.value===c?a.value=void 0:a.value=c}function H(c){a.value=c.hex}function ve(c){return be(c)>.5?de.color:ue.color}function be(c){const[h,A,C]=me(c);return(.2126*h+.7152*A+.0722*C)/255}function me(c){const h=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(c);return h?[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]:[0,0,0]}return(c,h)=>(p(),L(f(Ve),{shown:n.value,"onUpdate:shown":h[3]||(h[3]=A=>n.value=A),container:c.container,popupRole:"dialog",onApplyHide:h[4]||(h[4]=A=>o("closed"))},{trigger:I(A=>[Ne(c.$slots,"default",Be(Te(A)),void 0,!0)]),default:I(A=>[l("div",{role:"dialog",class:K(["color-picker",{"color-picker--advanced-fields":d.value&&c.advancedFields,"color-picker--clearable":c.clearable}]),"aria-modal":"true","aria-label":f(g)("Color picker")},[b(He,{name:"slide",mode:"out-in"},{default:I(()=>[d.value?(p(),L(f(Y),{key:1,class:"color-picker__advanced",disableAlpha:"",disableFields:!c.advancedFields,modelValue:a.value??"#000000","onUpdate:modelValue":H},null,8,["disableFields","modelValue"])):(p(),x("div",sa,[(p(!0),x(Ae,null,$e(M.value,({color:C,name:xe},we)=>(p(),x("label",{key:we,class:K(["color-picker__simple-color-circle",{"color-picker__simple-color-circle--active":C===a.value}]),style:R({backgroundColor:C,color:ve(C)})},[C===a.value?(p(),L(f(U),{key:0,path:f(Ee)},null,8,["path"])):w("",!0),l("input",{type:"radio",class:"hidden-visually","aria-label":xe,name:`color-picker-${f(s)}`,checked:C===a.value,onClick:pa=>u(C)},null,8,la)],6))),128)),c.clearable?(p(),x("label",{key:0,class:"color-picker__clear",title:f(g)("No color")},[b(f(U),{size:a.value?28:34,path:f(Re)},null,8,["size","path"]),l("input",{type:"radio",class:"hidden-visually","aria-label":f(g)("No color"),name:`color-picker-${f(s)}`,checked:!a.value,onClick:h[0]||(h[0]=C=>a.value=void 0)},null,8,ca)],8,ha)):w("",!0)]))]),_:1}),c.paletteOnly?w("",!0):(p(),x("div",da,[d.value?(p(),L(f(G),{key:0,"aria-label":f(g)("Back"),title:f(g)("Back"),variant:"tertiary",onClick:h[1]||(h[1]=C=>d.value=!1)},{icon:I(()=>[b(f(U),{directional:"",path:f(Fe)},null,8,["path"])]),_:1},8,["aria-label","title"])):(p(),L(f(G),{key:1,"aria-label":f(g)("More options"),title:f(g)("More options"),variant:"tertiary",onClick:h[2]||(h[2]=C=>d.value=!0)},{icon:I(()=>[b(f(U),{path:f(Ie)},null,8,["path"])]),_:1},8,["aria-label","title"])),b(f(G),{variant:"primary",onClick:C=>v(A.hide)},{default:I(()=>[De(oe(f(g)("Choose")),1)]),_:2},1032,["onClick"])]))],10,ia)]),_:3},8,["shown","container"]))}}),ga=Ce(ua,[["__scopeId","data-v-45e1396f"]]);export{ga as default}; -//# sourceMappingURL=index-CQRgr7_b.chunk.mjs.map +import{o as p,c as x,n as R,r as D,a as l,b,w as T,v as ye,t as oe,d as K,e as L,f as w,g as z,h as g,i as fe,j as ke,_ as Ce,k as Me,u as re,l as _e,m as I,p as f,T as Se,F as He,q as Ae,N as U,s as $e,x as Le,y as G,z as Ee,A as Re,B as Fe,C as Ie,D as De,E as Ne,G as Be,H as ie,I as Te,J as Ve,K as ze,L as Ue}from"./logreader-main.mjs";const Oe="";function N(e,t){t===void 0&&(t={});var a=t.insertAt;if(!(!e||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}const B=function(e,t){const{componentPrefix:a=Oe}=t||{};e.component(`${a}${this.name}`,this)},J={};var V={name:"Checkboard",props:{size:{type:[Number,String],default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},computed:{bgStyle(){return{"background-image":`url(${We(this.white,this.grey,this.size)})`}}}};function je(e,t,a){if(typeof document>"u")return null;const n=document.createElement("canvas");n.width=n.height=a*2;const r=n.getContext("2d");return r?(r.fillStyle=e,r.fillRect(0,0,n.width,n.height),r.fillStyle=t,r.fillRect(0,0,a,a),r.translate(a,a),r.fillRect(0,0,a,a),n.toDataURL()):null}function We(e,t,a){const n=`${e},${t},${a}`;if(J[n])return J[n];const r=je(e,t,a);return J[n]=r,r}function qe(e,t,a,n,r,o){return p(),x("div",{class:"vc-checkerboard",style:R(o.bgStyle)},null,4)}var Xe=".vc-checkerboard{background-size:contain;bottom:0;left:0;position:absolute;right:0;top:0}";N(Xe),V.render=qe,V.__file="src/components/checkboard/checkboard.vue",V.install=B;var W={name:"Alpha",components:{Checkboard:V},props:{value:Object,onChange:Function},computed:{colors(){return this.value},gradientColor(){const{rgba:e}=this.colors,t=[e.r,e.g,e.b].join(",");return`linear-gradient(to right, rgba(${t}, 0) 0%, rgba(${t}, 1) 100%)`}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:a}=this.$refs;if(!a)return;const n=a.clientWidth,r=a.getBoundingClientRect().left+window.pageXOffset,o=(e.pageX||(e.touches?e.touches[0].pageX:0))-r;let i;o<0?i=0:o>n?i=1:i=Math.round(o*100/n)/100,this.colors.a!==i&&this.$emit("change",{h:this.colors.hsl.h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:i,source:"rgba"})},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const Pe={class:"vc-alpha"},Ye={class:"vc-alpha-checkboard-wrap"},Ke=l("div",{class:"vc-alpha-picker"},null,-1),Ge=[Ke];function Je(e,t,a,n,r,o){const i=D("Checkboard");return p(),x("div",Pe,[l("div",Ye,[b(i)]),l("div",{class:"vc-alpha-gradient",style:R({background:o.gradientColor})},null,4),l("div",{ref:"container",class:"vc-alpha-container",onMousedown:t[0]||(t[0]=(...s)=>o.handleMouseDown&&o.handleMouseDown(...s)),onTouchmove:t[1]||(t[1]=(...s)=>o.handleChange&&o.handleChange(...s)),onTouchstart:t[2]||(t[2]=(...s)=>o.handleChange&&o.handleChange(...s))},[l("div",{class:"vc-alpha-pointer",style:R({left:`${o.colors.a*100}%`})},Ge,4)],544)])}var Ze=".vc-alpha,.vc-alpha-checkboard-wrap{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-container{cursor:pointer;height:100%;margin:0 3px;position:relative;z-index:2}.vc-alpha-pointer{position:absolute;z-index:2}.vc-alpha-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";N(Ze),W.render=Je,W.__file="src/components/alpha/alpha.vue",W.install=B;function m(e,t){Qe(e)&&(e="100%");var a=et(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),a&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function O(e){return Math.min(1,Math.max(0,e))}function Qe(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function et(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ge(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function j(e){return e<=1?"".concat(Number(e)*100,"%"):e}function F(e){return e.length===1?"0"+e:String(e)}function tt(e,t,a){return{r:m(e,255)*255,g:m(t,255)*255,b:m(a,255)*255}}function se(e,t,a){e=m(e,255),t=m(t,255),a=m(a,255);var n=Math.max(e,t,a),r=Math.min(e,t,a),o=0,i=0,s=(n+r)/2;if(n===r)i=0,o=0;else{var d=n-r;switch(i=s>.5?d/(2-n-r):d/(n+r),n){case e:o=(t-a)/d+(t1&&(a-=1),a<1/6?e+(t-e)*(6*a):a<1/2?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function at(e,t,a){var n,r,o;if(e=m(e,360),t=m(t,100),a=m(a,100),t===0)r=a,o=a,n=a;else{var i=a<.5?a*(1+t):a+t-a*t,s=2*a-i;n=Z(s,i,e+1/3),r=Z(s,i,e),o=Z(s,i,e-1/3)}return{r:n*255,g:r*255,b:o*255}}function le(e,t,a){e=m(e,255),t=m(t,255),a=m(a,255);var n=Math.max(e,t,a),r=Math.min(e,t,a),o=0,i=n,s=n-r,d=n===0?0:s/n;if(n===r)o=0;else{switch(n){case e:o=(t-a)/s+(t>16,g:(e&65280)>>8,b:e&255}}var ne={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function st(e){var t={r:0,g:0,b:0},a=1,n=null,r=null,o=null,i=!1,s=!1;return typeof e=="string"&&(e=ct(e)),typeof e=="object"&&(S(e.r)&&S(e.g)&&S(e.b)?(t=tt(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):S(e.h)&&S(e.s)&&S(e.v)?(n=j(e.s),r=j(e.v),t=ot(e.h,n,r),i=!0,s="hsv"):S(e.h)&&S(e.s)&&S(e.l)&&(n=j(e.s),o=j(e.l),t=at(e.h,n,o),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(a=e.a)),a=ge(a),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a}}var lt="[-\\+]?\\d+%?",ht="[-\\+]?\\d*\\.\\d+%?",E="(?:".concat(ht,")|(?:").concat(lt,")"),Q="[\\s|\\(]+(".concat(E,")[,|\\s]+(").concat(E,")[,|\\s]+(").concat(E,")\\s*\\)?"),ee="[\\s|\\(]+(".concat(E,")[,|\\s]+(").concat(E,")[,|\\s]+(").concat(E,")[,|\\s]+(").concat(E,")\\s*\\)?"),_={CSS_UNIT:new RegExp(E),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+ee),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+ee),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+ee),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ct(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ne[e])e=ne[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var a=_.rgb.exec(e);return a?{r:a[1],g:a[2],b:a[3]}:(a=_.rgba.exec(e),a?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=_.hsl.exec(e),a?{h:a[1],s:a[2],l:a[3]}:(a=_.hsla.exec(e),a?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=_.hsv.exec(e),a?{h:a[1],s:a[2],v:a[3]}:(a=_.hsva.exec(e),a?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=_.hex8.exec(e),a?{r:k(a[1]),g:k(a[2]),b:k(a[3]),a:ce(a[4]),format:t?"name":"hex8"}:(a=_.hex6.exec(e),a?{r:k(a[1]),g:k(a[2]),b:k(a[3]),format:t?"name":"hex"}:(a=_.hex4.exec(e),a?{r:k(a[1]+a[1]),g:k(a[2]+a[2]),b:k(a[3]+a[3]),a:ce(a[4]+a[4]),format:t?"name":"hex8"}:(a=_.hex3.exec(e),a?{r:k(a[1]+a[1]),g:k(a[2]+a[2]),b:k(a[3]+a[3]),format:t?"name":"hex"}:!1)))))))))}function S(e){return!!_.CSS_UNIT.exec(String(e))}var dt=(function(){function e(t,a){t===void 0&&(t=""),a===void 0&&(a={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=it(t)),this.originalInput=t;var r=st(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=a.format)!==null&&n!==void 0?n:r.format,this.gradientType=a.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),a,n,r,o=t.r/255,i=t.g/255,s=t.b/255;return o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),.2126*a+.7152*n+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ge(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=le(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=le(this.r,this.g,this.b),a=Math.round(t.h*360),n=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(a,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(a,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=se(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=se(this.r,this.g,this.b),a=Math.round(t.h*360),n=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(a,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(a,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),he(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),nt(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),a=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(a,", ").concat(n,")"):"rgba(".concat(t,", ").concat(a,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(a){return"".concat(Math.round(m(a,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(a){return Math.round(m(a,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+he(this.r,this.g,this.b,!1),a=0,n=Object.entries(ne);a=0,o=!a&&r&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.l+=t/100,a.l=O(a.l),new e(a)},e.prototype.brighten=function(t){t===void 0&&(t=10);var a=this.toRgb();return a.r=Math.max(0,Math.min(255,a.r-Math.round(255*-(t/100)))),a.g=Math.max(0,Math.min(255,a.g-Math.round(255*-(t/100)))),a.b=Math.max(0,Math.min(255,a.b-Math.round(255*-(t/100)))),new e(a)},e.prototype.darken=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.l-=t/100,a.l=O(a.l),new e(a)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.s-=t/100,a.s=O(a.s),new e(a)},e.prototype.saturate=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.s+=t/100,a.s=O(a.s),new e(a)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var a=this.toHsl(),n=(a.h+t)%360;return a.h=n<0?360+n:n,new e(a)},e.prototype.mix=function(t,a){a===void 0&&(a=50);var n=this.toRgb(),r=new e(t).toRgb(),o=a/100,i={r:(r.r-n.r)*o+n.r,g:(r.g-n.g)*o+n.g,b:(r.b-n.b)*o+n.b,a:(r.a-n.a)*o+n.a};return new e(i)},e.prototype.analogous=function(t,a){t===void 0&&(t=6),a===void 0&&(a=30);var n=this.toHsl(),r=360/a,o=[this];for(n.h=(n.h-(r*t>>1)+720)%360;--t;)n.h=(n.h+r)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var a=this.toHsv(),n=a.h,r=a.s,o=a.v,i=[],s=1/t;t--;)i.push(new e({h:n,s:r,v:o})),o=(o+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),a=t.h;return[this,new e({h:(a+72)%360,s:t.s,l:t.l}),new e({h:(a+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var a=this.toRgb(),n=new e(t).toRgb(),r=a.a+n.a*(1-a.a);return new e({r:(a.r*a.a+n.r*n.a*(1-a.a))/r,g:(a.g*a.a+n.g*n.a*(1-a.a))/r,b:(a.b*a.a+n.b*n.a*(1-a.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var a=this.toHsl(),n=a.h,r=[this],o=360/t,i=1;i0?n=$(e.hex):e&&e.hsv?n=$(e.hsv):e&&e.rgba?n=$(e.rgba):e&&e.rgb?n=$(e.rgb):n=$(e),n&&(n._a===void 0||n._a===null)&&n.setAlpha(a||n.getAlpha());const r=n.toHsl(),o=n.toHsv();return r.s===0&&(o.h=r.h=e.h||e.hsl&&e.hsl.h||t||0),o.v<.0164&&(o.h=e.h||e.hsv&&e.hsv.h||0,o.s=e.s||e.hsv&&e.hsv.s||0),r.l<.01&&(r.h=e.h||e.hsl&&e.hsl.h||0,r.s=e.s||e.hsl&&e.hsl.s||0),{hsl:r,hex:n.toHexString().toUpperCase(),hex8:n.toHex8String().toUpperCase(),rgba:n.toRgb(),hsv:o,oldHue:e.h||t||r.h,source:e.source,a:n.getAlpha()}}var ut={model:{prop:"modelValue",event:"update:modelValue"},props:["modelValue"],data(){return{val:te(this.modelValue)}},computed:{colors:{get(){return this.val},set(e){this.val=e,this.$emit("update:modelValue",e)}}},watch:{modelValue(e){this.val=te(e)}},methods:{colorChange(e,t){this.oldHue=this.colors.hsl.h,this.colors=te(e,t||this.oldHue)},isValidHex(e){return $(e).isValid},simpleCheckForValidColor(e){const t=["r","g","b","a","h","s","l","v"];let a=0,n=0;for(let r=0;rt.toUpperCase())},isTransparent(e){return $(e).getAlpha()===0}}},q={name:"EditableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(e){if(this.max!==void 0&&+e>this.max)this.$refs.input.value=this.max;else return e}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(e){this.handleChange(e.target.value)},handleChange(e){const t={};t[this.label]=e,t.hex===void 0&&t["#"]===void 0?this.$emit("change",t):e.length>5&&this.$emit("change",t)},handleKeyDown(e){let{val:t}=this;const a=Number(t);if(a){const n=this.arrowOffset||1;e.keyCode===38&&(t=a+n,this.handleChange(t),e.preventDefault()),e.keyCode===40&&(t=a-n,this.handleChange(t),e.preventDefault())}}}};const pt={class:"vc-editable-input"},ft=["aria-labelledby"],gt=["id","for"],vt={class:"vc-input__desc"};function bt(e,t,a,n,r,o){return p(),x("div",pt,[T(l("input",{ref:"input","onUpdate:modelValue":t[0]||(t[0]=i=>o.val=i),"aria-labelledby":o.labelId,class:"vc-input__input",onKeydown:t[1]||(t[1]=(...i)=>o.handleKeyDown&&o.handleKeyDown(...i)),onInput:t[2]||(t[2]=(...i)=>o.update&&o.update(...i))},null,40,ft),[[ye,o.val]]),l("span",{id:o.labelId,for:a.label,class:"vc-input__label"},oe(o.labelSpanText),9,gt),l("span",vt,oe(a.desc),1)])}var mt=".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}";N(mt),q.render=bt,q.__file="src/components/editable-input/editable-input.vue",q.install=B;function ae(e,t,a){return ta?a:e:et?t:e}var X={name:"Saturation",props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return`${-(this.colors.hsv.v*100)+1+100}%`},pointerLeft(){return`${this.colors.hsv.s*100}%`}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:a}=this.$refs;if(!a)return;const n=a.clientWidth,r=a.clientHeight,o=a.getBoundingClientRect().left+window.pageXOffset,i=a.getBoundingClientRect().top+window.pageYOffset,s=e.pageX||(e.touches?e.touches[0].pageX:0),d=e.pageY||(e.touches?e.touches[0].pageY:0),M=ae(s-o,0,n),v=ae(d-i,0,r),u=M/n,H=ae(-(v/r)+1,0,1);this.onChange({h:this.colors.hsv.h,s:u,v:H,a:this.colors.hsv.a,source:"hsva"})},onChange(e){this.$emit("change",e)},handleMouseDown(e){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const xt=l("div",{class:"vc-saturation--white"},null,-1),wt=l("div",{class:"vc-saturation--black"},null,-1),yt=l("div",{class:"vc-saturation-circle"},null,-1),kt=[yt];function Ct(e,t,a,n,r,o){return p(),x("div",{ref:"container",class:"vc-saturation",style:R({background:o.bgColor}),onMousedown:t[0]||(t[0]=(...i)=>o.handleMouseDown&&o.handleMouseDown(...i)),onTouchmove:t[1]||(t[1]=(...i)=>o.handleChange&&o.handleChange(...i)),onTouchstart:t[2]||(t[2]=(...i)=>o.handleChange&&o.handleChange(...i))},[xt,wt,l("div",{class:"vc-saturation-pointer",style:R({top:o.pointerTop,left:o.pointerLeft})},kt,4)],36)}var Mt=".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}";N(Mt),X.render=Ct,X.__file="src/components/saturation/saturation.vue",X.install=B;var P={name:"Hue",props:{value:Object,direction:{type:String,default:"horizontal"}},data(){return{oldHue:0,pullDirection:""}},computed:{colors(){return this.value},directionClass(){return{"vc-hue--horizontal":this.direction==="horizontal","vc-hue--vertical":this.direction==="vertical"}},pointerTop(){return this.direction==="vertical"?this.colors.hsl.h===0&&this.pullDirection==="right"?0:`${-(this.colors.hsl.h*100/360)+100}%`:0},pointerLeft(){return this.direction==="vertical"?0:this.colors.hsl.h===0&&this.pullDirection==="right"?"100%":`${this.colors.hsl.h*100/360}%`}},watch:{value:{handler(e,t){const{h:a}=e.hsl;a!==0&&a-this.oldHue>0&&(this.pullDirection="right"),a!==0&&a-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=a},deep:!0,immediate:!0}},methods:{handleChange(e,t){!t&&e.preventDefault();const{container:a}=this.$refs;if(!a)return;const n=a.clientWidth,r=a.clientHeight,o=a.getBoundingClientRect().left+window.pageXOffset,i=a.getBoundingClientRect().top+window.pageYOffset,s=e.pageX||(e.touches?e.touches[0].pageX:0),d=e.pageY||(e.touches?e.touches[0].pageY:0),M=s-o,v=d-i;let u,H;this.direction==="vertical"?(v<0?u=360:v>r?u=0:(H=-(v*100/r)+100,u=360*H/100),this.colors.hsl.h!==u&&this.$emit("change",{h:u,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(M<0?u=0:M>n?u=360:(H=M*100/n,u=360*H/100),this.colors.hsl.h!==u&&this.$emit("change",{h:u,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}};const _t=["aria-valuenow"],St=l("div",{class:"vc-hue-picker"},null,-1),Ht=[St];function At(e,t,a,n,r,o){return p(),x("div",{class:K(["vc-hue",[o.directionClass]])},[l("div",{ref:"container",class:"vc-hue-container",role:"slider","aria-valuenow":o.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360",onMousedown:t[0]||(t[0]=(...i)=>o.handleMouseDown&&o.handleMouseDown(...i)),onTouchmove:t[1]||(t[1]=(...i)=>o.handleChange&&o.handleChange(...i)),onTouchstart:t[2]||(t[2]=(...i)=>o.handleChange&&o.handleChange(...i))},[l("div",{class:"vc-hue-pointer",style:R({top:o.pointerTop,left:o.pointerLeft}),role:"presentation"},Ht,4)],40,_t)],2)}var $t=".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";N($t),P.render=At,P.__file="src/components/hue/hue.vue",P.install=B;var Y={name:"Chrome",components:{Saturation:X,Hue:P,Alpha:W,EdIn:q,Checkboard:V},mixins:[ut],props:{disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1},format:{type:String,default:"hex"}},data(){return{fieldsIndex:"hex",highlight:!1}},computed:{hsl(){const{h:e,s:t,l:a}=this.colors.hsl;return{h:e.toFixed(),s:`${(t*100).toFixed()}%`,l:`${(a*100).toFixed()}%`}},activeColor(){const{rgba:e}=this.colors;return`rgba(${[e.r,e.g,e.b,e.a].join(",")})`},hasAlpha(){return this.colors.a<1}},watch:{format:{handler(e){this.fieldsIndex=e},immediate:!0}},methods:{childChange(e){this.colorChange(e)},inputChange(e){if(e){if(e.hex)this.isValidHex(e.hex)&&this.colorChange({hex:e.hex,source:"hex"});else if(e.r||e.g||e.b||e.a)this.colorChange({r:e.r||this.colors.rgba.r,g:e.g||this.colors.rgba.g,b:e.b||this.colors.rgba.b,a:e.a||this.colors.rgba.a,source:"rgba"});else if(e.h||e.s||e.l){const t=e.s?e.s.replace("%","")/100:this.colors.hsl.s,a=e.l?e.l.replace("%","")/100:this.colors.hsl.l;this.colorChange({h:e.h||this.colors.hsl.h,s:t,l:a,source:"hsl"})}}},toggleViews(){switch(this.fieldsIndex){case"hex":this.fieldsIndex=`rgb${this.disableAlpha?"":"a"}`;break;case"rgb":case"rgba":this.fieldsIndex=`hsl${this.disableAlpha?"":"a"}`;break;default:this.fieldsIndex="hex";break}this.$emit("update:format",this.fieldsIndex)},showHighlight(){this.highlight=!0},hideHighlight(){this.highlight=!1}}};const Lt={class:"vc-chrome-saturation-wrap"},Et={class:"vc-chrome-body"},Rt={class:"vc-chrome-controls"},Ft={class:"vc-chrome-color-wrap"},It=["aria-label"],Dt={class:"vc-chrome-sliders"},Nt={class:"vc-chrome-hue-wrap"},Bt={key:0,class:"vc-chrome-alpha-wrap"},Tt={key:0,class:"vc-chrome-fields-wrap"},Vt={class:"vc-chrome-fields"},zt={class:"vc-chrome-field"},Ut={class:"vc-chrome-fields"},Ot={class:"vc-chrome-field"},jt={class:"vc-chrome-field"},Wt={class:"vc-chrome-field"},qt={key:0,class:"vc-chrome-field"},Xt={class:"vc-chrome-fields"},Pt={class:"vc-chrome-field"},Yt={class:"vc-chrome-field"},Kt={class:"vc-chrome-field"},Gt={key:0,class:"vc-chrome-field"},Jt={class:"vc-chrome-toggle-icon"},Zt=l("path",{fill:"#333",d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"},null,-1),Qt=[Zt],ea={class:"vc-chrome-toggle-icon-highlight"};function ta(e,t,a,n,r,o){const i=D("Saturation"),s=D("Checkboard"),d=D("Hue"),M=D("Alpha"),v=D("EdIn");return p(),x("div",{role:"application","aria-label":"Chrome color picker",class:K(["vc-chrome",[a.disableAlpha?"vc-chrome__disable-alpha":""]])},[l("div",Lt,[b(i,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]),l("div",Et,[l("div",Rt,[l("div",Ft,[l("div",{"aria-label":`current color is ${e.colors.hex}`,class:"vc-chrome-active-color",style:R({background:o.activeColor})},null,12,It),a.disableAlpha?w("v-if",!0):(p(),L(s,{key:0}))]),l("div",Dt,[l("div",Nt,[b(d,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]),a.disableAlpha?w("v-if",!0):(p(),x("div",Bt,[b(M,{value:e.colors,onChange:o.childChange},null,8,["value","onChange"])]))])]),a.disableFields?w("v-if",!0):(p(),x("div",Tt,[T(l("div",Vt,[w(" hex "),l("div",zt,[o.hasAlpha?w("v-if",!0):(p(),L(v,{key:0,label:"hex",value:e.colors.hex,onChange:o.inputChange},null,8,["value","onChange"])),o.hasAlpha?(p(),L(v,{key:1,label:"hex",value:e.colors.hex8,onChange:o.inputChange},null,8,["value","onChange"])):w("v-if",!0)])],512),[[z,r.fieldsIndex==="hex"]]),T(l("div",Ut,[w(" rgba "),l("div",Ot,[b(v,{label:"r",value:e.colors.rgba.r,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",jt,[b(v,{label:"g",value:e.colors.rgba.g,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",Wt,[b(v,{label:"b",value:e.colors.rgba.b,onChange:o.inputChange},null,8,["value","onChange"])]),a.disableAlpha?w("v-if",!0):(p(),x("div",qt,[b(v,{label:"a",value:e.colors.a,"arrow-offset":.01,max:1,onChange:o.inputChange},null,8,["value","arrow-offset","onChange"])]))],512),[[z,["rgb","rgba"].includes(r.fieldsIndex)]]),T(l("div",Xt,[w(" hsla "),l("div",Pt,[b(v,{label:"h",value:o.hsl.h,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",Yt,[b(v,{label:"s",value:o.hsl.s,onChange:o.inputChange},null,8,["value","onChange"])]),l("div",Kt,[b(v,{label:"l",value:o.hsl.l,onChange:o.inputChange},null,8,["value","onChange"])]),a.disableAlpha?w("v-if",!0):(p(),x("div",Gt,[b(v,{label:"a",value:e.colors.a,"arrow-offset":.01,max:1,onChange:o.inputChange},null,8,["value","arrow-offset","onChange"])]))],512),[[z,["hsl","hsla"].includes(r.fieldsIndex)]]),w(" btn "),l("div",{class:"vc-chrome-toggle-btn",role:"button","aria-label":"Change another color definition",onClick:t[3]||(t[3]=(...u)=>o.toggleViews&&o.toggleViews(...u))},[l("div",Jt,[(p(),x("svg",{style:{width:"24px",height:"24px"},viewBox:"0 0 24 24",onMouseover:t[0]||(t[0]=(...u)=>o.showHighlight&&o.showHighlight(...u)),onMouseenter:t[1]||(t[1]=(...u)=>o.showHighlight&&o.showHighlight(...u)),onMouseout:t[2]||(t[2]=(...u)=>o.hideHighlight&&o.hideHighlight(...u))},Qt,32))]),T(l("div",ea,null,512),[[z,r.highlight]])]),w(" btn ")]))])],2)}var aa=".vc-chrome{background:#fff;background-color:#fff;border-radius:2px;box-shadow:0 0 2px rgba(0,0,0,.3),0 4px 8px rgba(0,0,0,.3);box-sizing:initial;font-family:Menlo;width:225px}.vc-chrome-controls{display:flex}.vc-chrome-color-wrap{position:relative;width:36px}.vc-chrome-active-color{border-radius:15px;height:30px;overflow:hidden;position:relative;width:30px;z-index:1}.vc-chrome-color-wrap .vc-checkerboard{background-size:auto;border-radius:15px;height:30px;width:30px}.vc-chrome-sliders{flex:1}.vc-chrome-fields-wrap{display:flex;padding-top:16px}.vc-chrome-fields{display:flex;flex:1;margin-left:-6px}.vc-chrome-field{padding-left:6px;width:100%}.vc-chrome-toggle-btn{position:relative;text-align:right;width:32px}.vc-chrome-toggle-icon{cursor:pointer;margin-right:-4px;margin-top:12px;position:relative;z-index:2}.vc-chrome-toggle-icon-highlight{background:#eee;border-radius:4px;height:28px;left:12px;position:absolute;top:10px;width:24px}.vc-chrome-hue-wrap{margin-bottom:8px}.vc-chrome-alpha-wrap,.vc-chrome-hue-wrap{height:10px;position:relative}.vc-chrome-alpha-wrap .vc-alpha-gradient,.vc-chrome-hue-wrap .vc-hue{border-radius:2px}.vc-chrome-alpha-wrap .vc-alpha-picker,.vc-chrome-hue-wrap .vc-hue-picker{background-color:#f8f8f8;border-radius:6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:12px;transform:translate(-6px,-2px);width:12px}.vc-chrome-body{background-color:#fff;padding:16px 16px 12px}.vc-chrome-saturation-wrap{border-radius:2px 2px 0 0;overflow:hidden;padding-bottom:55%;position:relative;width:100%}.vc-chrome-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-chrome-fields .vc-input__input{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #dadada;color:#333;font-size:11px;height:21px;text-align:center;width:100%}.vc-chrome-fields .vc-input__label{color:#969696;display:block;font-size:11px;line-height:11px;margin-top:12px;text-align:center;text-transform:uppercase}.vc-chrome__disable-alpha .vc-chrome-active-color{height:18px;width:18px}.vc-chrome__disable-alpha .vc-chrome-color-wrap{width:30px}.vc-chrome__disable-alpha .vc-chrome-hue-wrap{margin-bottom:4px;margin-top:4px}";N(aa),Y.render=ta,Y.__file="src/components/chrome/chrome.vue",Y.install=B,fe(ke);class y{constructor(t,a,n,r){this.r=t,this.g=a,this.b=n,this.name=r,this.r=Math.min(t,255),this.g=Math.min(a,255),this.b=Math.min(n,255),this.name=r}get color(){const t=a=>`00${a.toString(16)}`.slice(-2);return`#${t(this.r)}${t(this.g)}${t(this.b)}`}}const oa=new y(182,70,157,g("Purple")),na=new y(221,203,85,g("Gold")),ra=new y(0,130,201,g("Nextcloud blue")),de=new y(0,0,0,g("Black")),ue=new y(255,255,255,g("White")),pe=[oa,new y(191,103,139,g("Rosy brown")),new y(201,136,121,g("Feldspar")),new y(211,169,103,g("Whiskey")),na,new y(165,184,114,g("Olivine")),new y(110,166,143,g("Acapulco")),new y(55,148,172,g("Boston Blue")),ra,new y(45,115,190,g("Mariner")),new y(91,100,179,g("Blue Violet")),new y(136,85,168,g("Deluge"))];fe(Ue);const ia=["aria-label"],sa={key:0,class:"color-picker__simple"},la=["aria-label","name","checked","onClick"],ha=["title"],ca=["aria-label","name","checked"],da={key:0,class:"color-picker__navigation"},ua=Me({__name:"NcColorPicker",props:ie({advancedFields:{type:Boolean},clearable:{type:Boolean},container:{default:"body"},palette:{default:()=>[]},paletteOnly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{},open:{type:Boolean},openModifiers:{}}),emits:ie(["submit","closed"],["update:modelValue","update:open"]),setup(e,{emit:t}){const a=re(e,"modelValue"),n=re(e,"open"),r=e,o=t,i=/^#([a-f0-9]{3}|[a-f0-9]{6})$/i,s=_e(),d=Te(!1),M=Ve(()=>{let c=r.palette;for(const h of c)if(typeof h=="string"&&!h.match(i)||typeof h=="object"&&!h.color?.match(i)){ze.error("[NcColorPicker] Invalid palette passed",{color:h}),c=[];break}return c.length===0&&(c=r.clearable?[...pe,de,ue]:[...pe]),c.map(h=>({color:typeof h=="object"?h.color:h,name:typeof h=="object"&&h.name?h.name:g("A color with a HEX value {hex}",{hex:typeof h=="string"?h:h.color})}))});function v(c){o("submit",a.value),c(),d.value=!1}function u(c){c=typeof c=="string"?c:c.color,r.clearable&&a.value===c?a.value=void 0:a.value=c}function H(c){a.value=c.hex}function ve(c){return be(c)>.5?de.color:ue.color}function be(c){const[h,A,C]=me(c);return(.2126*h+.7152*A+.0722*C)/255}function me(c){const h=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(c);return h?[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]:[0,0,0]}return(c,h)=>(p(),L(f(Be),{shown:n.value,"onUpdate:shown":h[3]||(h[3]=A=>n.value=A),container:c.container,popupRole:"dialog",onApplyHide:h[4]||(h[4]=A=>o("closed"))},{trigger:I(A=>[Ie(c.$slots,"default",De(Ne(A)),void 0,!0)]),default:I(A=>[l("div",{role:"dialog",class:K(["color-picker",{"color-picker--advanced-fields":d.value&&c.advancedFields,"color-picker--clearable":c.clearable}]),"aria-modal":"true","aria-label":f(g)("Color picker")},[b(Se,{name:"slide",mode:"out-in"},{default:I(()=>[d.value?(p(),L(f(Y),{key:1,class:"color-picker__advanced",disableAlpha:"",disableFields:!c.advancedFields,modelValue:a.value??"#000000","onUpdate:modelValue":H},null,8,["disableFields","modelValue"])):(p(),x("div",sa,[(p(!0),x(He,null,Ae(M.value,({color:C,name:xe},we)=>(p(),x("label",{key:we,class:K(["color-picker__simple-color-circle",{"color-picker__simple-color-circle--active":C===a.value}]),style:R({backgroundColor:C,color:ve(C)})},[C===a.value?(p(),L(f(U),{key:0,path:f($e)},null,8,["path"])):w("",!0),l("input",{type:"radio",class:"hidden-visually","aria-label":xe,name:`color-picker-${f(s)}`,checked:C===a.value,onClick:pa=>u(C)},null,8,la)],6))),128)),c.clearable?(p(),x("label",{key:0,class:"color-picker__clear",title:f(g)("No color")},[b(f(U),{size:a.value?28:34,path:f(Le)},null,8,["size","path"]),l("input",{type:"radio",class:"hidden-visually","aria-label":f(g)("No color"),name:`color-picker-${f(s)}`,checked:!a.value,onClick:h[0]||(h[0]=C=>a.value=void 0)},null,8,ca)],8,ha)):w("",!0)]))]),_:1}),c.paletteOnly?w("",!0):(p(),x("div",da,[d.value?(p(),L(f(G),{key:0,"aria-label":f(g)("Back"),title:f(g)("Back"),variant:"tertiary",onClick:h[1]||(h[1]=C=>d.value=!1)},{icon:I(()=>[b(f(U),{directional:"",path:f(Ee)},null,8,["path"])]),_:1},8,["aria-label","title"])):(p(),L(f(G),{key:1,"aria-label":f(g)("More options"),title:f(g)("More options"),variant:"tertiary",onClick:h[2]||(h[2]=C=>d.value=!0)},{icon:I(()=>[b(f(U),{path:f(Re)},null,8,["path"])]),_:1},8,["aria-label","title"])),b(f(G),{variant:"primary",onClick:C=>v(A.hide)},{default:I(()=>[Fe(oe(f(g)("Choose")),1)]),_:2},1032,["onClick"])]))],10,ia)]),_:3},8,["shown","container"]))}}),ga=Ce(ua,[["__scopeId","data-v-45e1396f"]]);export{ga as default}; +//# sourceMappingURL=index-D5vryGZj.chunk.mjs.map diff --git a/js/index-CQRgr7_b.chunk.mjs.license b/js/index-D5vryGZj.chunk.mjs.license similarity index 100% rename from js/index-CQRgr7_b.chunk.mjs.license rename to js/index-D5vryGZj.chunk.mjs.license diff --git a/js/index-CQRgr7_b.chunk.mjs.map b/js/index-D5vryGZj.chunk.mjs.map similarity index 99% rename from js/index-CQRgr7_b.chunk.mjs.map rename to js/index-D5vryGZj.chunk.mjs.map index 2683e7ea1..0238131eb 100644 --- a/js/index-CQRgr7_b.chunk.mjs.map +++ b/js/index-D5vryGZj.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"index-CQRgr7_b.chunk.mjs","sources":["../node_modules/@ckpack/vue-color/libs/defaultConfig.js","../node_modules/@ckpack/vue-color/libs/style-inject.es-746bb8ed.js","../node_modules/@ckpack/vue-color/libs/utils/compoent.js","../node_modules/@ckpack/vue-color/libs/components/checkboard/index.js","../node_modules/@ckpack/vue-color/libs/components/alpha/index.js","../node_modules/@ctrl/tinycolor/dist/module/util.js","../node_modules/@ctrl/tinycolor/dist/module/conversion.js","../node_modules/@ctrl/tinycolor/dist/module/css-color-names.js","../node_modules/@ctrl/tinycolor/dist/module/format-input.js","../node_modules/@ctrl/tinycolor/dist/module/index.js","../node_modules/@ckpack/vue-color/libs/mixin/color.js","../node_modules/@ckpack/vue-color/libs/components/editable-input/index.js","../node_modules/@ckpack/vue-color/libs/utils/utils.js","../node_modules/@ckpack/vue-color/libs/components/saturation/index.js","../node_modules/@ckpack/vue-color/libs/components/hue/index.js","../node_modules/@ckpack/vue-color/libs/components/chrome/index.js","../node_modules/@nextcloud/vue/dist/chunks/colors-BHGKZFDI.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcColorPicker-DDHxR-iN.mjs"],"sourcesContent":["const name = 'VueColor';\n// 自定义组件前缀\nconst prefix = '';\nconst cssPrefix = '';\nconst size = 'medium';\n\nexport { cssPrefix, name, prefix, size };\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport { styleInject as s };\n","import { prefix } from '../defaultConfig.js';\n\nconst install = function (app, options) {\n const { componentPrefix = prefix } = options || {};\n app.component(`${componentPrefix}${this.name}`, this);\n};\n\nexport { install };\n","import { openBlock, createElementBlock, normalizeStyle } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nconst _checkboardCache = {};\n\nvar script = {\n name: 'Checkboard',\n props: {\n size: {\n type: [Number, String],\n default: 8,\n },\n white: {\n type: String,\n default: '#fff',\n },\n grey: {\n type: String,\n default: '#e6e6e6',\n },\n },\n computed: {\n bgStyle() {\n return {\n 'background-image': `url(${getCheckboard(this.white, this.grey, this.size)})`,\n };\n },\n },\n};\n\n/**\n * get base 64 data by canvas\n *\n * @param {String} c1 hex color\n * @param {String} c2 hex color\n * @param {Number} size\n */\n\nfunction renderCheckboard(c1, c2, size) {\n // Dont Render On Server\n if (typeof document === 'undefined')\n return null;\n\n const canvas = document.createElement('canvas');\n canvas.width = canvas.height = size * 2;\n const ctx = canvas.getContext('2d');\n // If no context can be found, return early.\n if (!ctx)\n return null;\n\n ctx.fillStyle = c1;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = c2;\n ctx.fillRect(0, 0, size, size);\n ctx.translate(size, size);\n ctx.fillRect(0, 0, size, size);\n return canvas.toDataURL();\n}\n\n/**\n * get checkboard base data and cache\n *\n * @param {String} c1 hex color\n * @param {String} c2 hex color\n * @param {Number} size\n */\n\nfunction getCheckboard(c1, c2, size) {\n const key = `${c1},${c2},${size}`;\n\n if (_checkboardCache[key])\n return _checkboardCache[key];\n\n const checkboard = renderCheckboard(c1, c2, size);\n _checkboardCache[key] = checkboard;\n return checkboard;\n}\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", {\n class: \"vc-checkerboard\",\n style: normalizeStyle($options.bgStyle)\n }, null, 4 /* STYLE */))\n}\n\nvar css_248z = \".vc-checkerboard{background-size:contain;bottom:0;left:0;position:absolute;right:0;top:0}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/checkboard/checkboard.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import script$1 from '../checkboard/index.js';\nimport { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, normalizeStyle } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Alpha',\n components: {\n Checkboard: script$1,\n },\n props: {\n value: Object,\n onChange: Function,\n },\n computed: {\n colors() {\n return this.value;\n },\n gradientColor() {\n const { rgba } = this.colors;\n const rgbStr = [rgba.r, rgba.g, rgba.b].join(',');\n return `linear-gradient(to right, rgba(${rgbStr}, 0) 0%, rgba(${rgbStr}, 1) 100%)`;\n },\n },\n methods: {\n handleChange(e, skip) {\n !skip && e.preventDefault();\n const { container } = this.$refs;\n if (!container) {\n // for some edge cases, container may not exist. see #220\n return;\n }\n const containerWidth = container.clientWidth;\n\n const xOffset = container.getBoundingClientRect().left + window.pageXOffset;\n const pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);\n const left = pageX - xOffset;\n\n let a;\n if (left < 0)\n a = 0;\n else if (left > containerWidth)\n a = 1;\n else\n a = Math.round(left * 100 / containerWidth) / 100;\n\n if (this.colors.a !== a) {\n this.$emit('change', {\n h: this.colors.hsl.h,\n s: this.colors.hsl.s,\n l: this.colors.hsl.l,\n a,\n source: 'rgba',\n });\n }\n },\n handleMouseDown(e) {\n this.handleChange(e, true);\n window.addEventListener('mousemove', this.handleChange);\n window.addEventListener('mouseup', this.handleMouseUp);\n },\n handleMouseUp() {\n this.unbindEventListeners();\n },\n unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n },\n },\n};\n\nconst _hoisted_1 = { class: \"vc-alpha\" };\nconst _hoisted_2 = { class: \"vc-alpha-checkboard-wrap\" };\nconst _hoisted_3 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-alpha-picker\" }, null, -1 /* HOISTED */);\nconst _hoisted_4 = [\n _hoisted_3\n];\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_Checkboard = resolveComponent(\"Checkboard\");\n\n return (openBlock(), createElementBlock(\"div\", _hoisted_1, [\n createElementVNode(\"div\", _hoisted_2, [\n createVNode(_component_Checkboard)\n ]),\n createElementVNode(\"div\", {\n class: \"vc-alpha-gradient\",\n style: normalizeStyle({ background: $options.gradientColor })\n }, null, 4 /* STYLE */),\n createElementVNode(\"div\", {\n ref: \"container\",\n class: \"vc-alpha-container\",\n onMousedown: _cache[0] || (_cache[0] = (...args) => ($options.handleMouseDown && $options.handleMouseDown(...args))),\n onTouchmove: _cache[1] || (_cache[1] = (...args) => ($options.handleChange && $options.handleChange(...args))),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => ($options.handleChange && $options.handleChange(...args)))\n }, [\n createElementVNode(\"div\", {\n class: \"vc-alpha-pointer\",\n style: normalizeStyle({ left: `${$options.colors.a * 100}%` })\n }, _hoisted_4, 4 /* STYLE */)\n ], 544 /* HYDRATE_EVENTS, NEED_PATCH */)\n ]))\n}\n\nvar css_248z = \".vc-alpha,.vc-alpha-checkboard-wrap{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-container{cursor:pointer;height:100%;margin:0 3px;position:relative;z-index:2}.vc-alpha-pointer{position:absolute;z-index:2}.vc-alpha-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/alpha/alpha.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * \n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n","import { bound01, pad2 } from './util.js';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * \n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n","// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n","/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb, } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { boundAlpha, convertToPercentage } from './util.js';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// \nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// \nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n","import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util.js';\nvar TinyColor = /** @class */ (function () {\n function TinyColor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n var _a;\n // If input is already a tinycolor, return itself\n if (color instanceof TinyColor) {\n // eslint-disable-next-line no-constructor-return\n return color;\n }\n if (typeof color === 'number') {\n color = numberInputToObject(color);\n }\n this.originalInput = color;\n var rgb = inputToRGB(color);\n this.originalInput = color;\n this.r = rgb.r;\n this.g = rgb.g;\n this.b = rgb.b;\n this.a = rgb.a;\n this.roundA = Math.round(100 * this.a) / 100;\n this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n this.gradientType = opts.gradientType;\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this.r < 1) {\n this.r = Math.round(this.r);\n }\n if (this.g < 1) {\n this.g = Math.round(this.g);\n }\n if (this.b < 1) {\n this.b = Math.round(this.b);\n }\n this.isValid = rgb.ok;\n }\n TinyColor.prototype.isDark = function () {\n return this.getBrightness() < 128;\n };\n TinyColor.prototype.isLight = function () {\n return !this.isDark();\n };\n /**\n * Returns the perceived brightness of the color, from 0-255.\n */\n TinyColor.prototype.getBrightness = function () {\n // http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n };\n /**\n * Returns the perceived luminance of a color, from 0-1.\n */\n TinyColor.prototype.getLuminance = function () {\n // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var R;\n var G;\n var B;\n var RsRGB = rgb.r / 255;\n var GsRGB = rgb.g / 255;\n var BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) {\n R = RsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n }\n if (GsRGB <= 0.03928) {\n G = GsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n }\n if (BsRGB <= 0.03928) {\n B = BsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n }\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n };\n /**\n * Returns the alpha value of a color, from 0-1.\n */\n TinyColor.prototype.getAlpha = function () {\n return this.a;\n };\n /**\n * Sets the alpha value on the current color.\n *\n * @param alpha - The new alpha value. The accepted range is 0-1.\n */\n TinyColor.prototype.setAlpha = function (alpha) {\n this.a = boundAlpha(alpha);\n this.roundA = Math.round(100 * this.a) / 100;\n return this;\n };\n /**\n * Returns whether the color is monochrome.\n */\n TinyColor.prototype.isMonochrome = function () {\n var s = this.toHsl().s;\n return s === 0;\n };\n /**\n * Returns the object as a HSVA object.\n */\n TinyColor.prototype.toHsv = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n };\n /**\n * Returns the hsva values interpolated into a string with the following format:\n * \"hsva(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHsvString = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n var h = Math.round(hsv.h * 360);\n var s = Math.round(hsv.s * 100);\n var v = Math.round(hsv.v * 100);\n return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a HSLA object.\n */\n TinyColor.prototype.toHsl = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n };\n /**\n * Returns the hsla values interpolated into a string with the following format:\n * \"hsla(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHslString = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n var h = Math.round(hsl.h * 360);\n var s = Math.round(hsl.s * 100);\n var l = Math.round(hsl.l * 100);\n return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the hex value of the color.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHex = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n };\n /**\n * Returns the hex value of the color -with a # prefixed.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHexString = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return '#' + this.toHex(allow3Char);\n };\n /**\n * Returns the hex 8 value of the color.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8 = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n };\n /**\n * Returns the hex 8 value of the color -with a # prefixed.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8String = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return '#' + this.toHex8(allow4Char);\n };\n /**\n * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.\n * @param allowShortChar will shorten hex value to 3 or 4 char if possible\n */\n TinyColor.prototype.toHexShortString = function (allowShortChar) {\n if (allowShortChar === void 0) { allowShortChar = false; }\n return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toRgb = function () {\n return {\n r: Math.round(this.r),\n g: Math.round(this.g),\n b: Math.round(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA values interpolated into a string with the following format:\n * \"RGBA(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toRgbString = function () {\n var r = Math.round(this.r);\n var g = Math.round(this.g);\n var b = Math.round(this.b);\n return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toPercentageRgb = function () {\n var fmt = function (x) { return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\"); };\n return {\n r: fmt(this.r),\n g: fmt(this.g),\n b: fmt(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA relative values interpolated into a string\n */\n TinyColor.prototype.toPercentageRgbString = function () {\n var rnd = function (x) { return Math.round(bound01(x, 255) * 100); };\n return this.a === 1\n ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\")\n : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n };\n /**\n * The 'real' name of the color -if there is one.\n */\n TinyColor.prototype.toName = function () {\n if (this.a === 0) {\n return 'transparent';\n }\n if (this.a < 1) {\n return false;\n }\n var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n if (hex === value) {\n return key;\n }\n }\n return false;\n };\n TinyColor.prototype.toString = function (format) {\n var formatSet = Boolean(format);\n format = format !== null && format !== void 0 ? format : this.format;\n var formattedString = false;\n var hasAlpha = this.a < 1 && this.a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this.a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n };\n TinyColor.prototype.toNumber = function () {\n return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n };\n TinyColor.prototype.clone = function () {\n return new TinyColor(this.toString());\n };\n /**\n * Lighten the color a given amount. Providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.lighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Brighten the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.brighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var rgb = this.toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return new TinyColor(rgb);\n };\n /**\n * Darken the color a given amount, from 0 to 100.\n * Providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.darken = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.tint = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('white', amount);\n };\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.shade = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('black', amount);\n };\n /**\n * Desaturate the color a given amount, from 0 to 100.\n * Providing 100 will is the same as calling greyscale\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.desaturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Saturate the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.saturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Completely desaturates a color into greyscale.\n * Same as calling `desaturate(100)`\n */\n TinyColor.prototype.greyscale = function () {\n return this.desaturate(100);\n };\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n TinyColor.prototype.spin = function (amount) {\n var hsl = this.toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n };\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n TinyColor.prototype.mix = function (color, amount) {\n if (amount === void 0) { amount = 50; }\n var rgb1 = this.toRgb();\n var rgb2 = new TinyColor(color).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a,\n };\n return new TinyColor(rgba);\n };\n TinyColor.prototype.analogous = function (results, slices) {\n if (results === void 0) { results = 6; }\n if (slices === void 0) { slices = 30; }\n var hsl = this.toHsl();\n var part = 360 / slices;\n var ret = [this];\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(new TinyColor(hsl));\n }\n return ret;\n };\n /**\n * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n */\n TinyColor.prototype.complement = function () {\n var hsl = this.toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return new TinyColor(hsl);\n };\n TinyColor.prototype.monochromatic = function (results) {\n if (results === void 0) { results = 6; }\n var hsv = this.toHsv();\n var h = hsv.h;\n var s = hsv.s;\n var v = hsv.v;\n var res = [];\n var modification = 1 / results;\n while (results--) {\n res.push(new TinyColor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n return res;\n };\n TinyColor.prototype.splitcomplement = function () {\n var hsl = this.toHsl();\n var h = hsl.h;\n return [\n this,\n new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n };\n /**\n * Compute how the color would appear on a background\n */\n TinyColor.prototype.onBackground = function (background) {\n var fg = this.toRgb();\n var bg = new TinyColor(background).toRgb();\n var alpha = fg.a + bg.a * (1 - fg.a);\n return new TinyColor({\n r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,\n g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,\n b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,\n a: alpha,\n });\n };\n /**\n * Alias for `polyad(3)`\n */\n TinyColor.prototype.triad = function () {\n return this.polyad(3);\n };\n /**\n * Alias for `polyad(4)`\n */\n TinyColor.prototype.tetrad = function () {\n return this.polyad(4);\n };\n /**\n * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n */\n TinyColor.prototype.polyad = function (n) {\n var hsl = this.toHsl();\n var h = hsl.h;\n var result = [this];\n var increment = 360 / n;\n for (var i = 1; i < n; i++) {\n result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n }\n return result;\n };\n /**\n * compare color vs current color\n */\n TinyColor.prototype.equals = function (color) {\n return this.toRgbString() === new TinyColor(color).toRgbString();\n };\n return TinyColor;\n}());\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n return new TinyColor(color, opts);\n}\n","import { TinyColor } from '@ctrl/tinycolor';\n\nfunction tinycolor(...args) {\n return new TinyColor(...args);\n}\n\nfunction _colorChange(data, oldHue) {\n const alpha = data && data.a;\n let color;\n\n // hsl is better than hex between conversions\n if (data && data.hsl)\n color = tinycolor(data.hsl);\n else if (data && data.hex && data.hex.length > 0)\n color = tinycolor(data.hex);\n else if (data && data.hsv)\n color = tinycolor(data.hsv);\n else if (data && data.rgba)\n color = tinycolor(data.rgba);\n else if (data && data.rgb)\n color = tinycolor(data.rgb);\n else\n color = tinycolor(data);\n\n if (color && (color._a === undefined || color._a === null))\n color.setAlpha(alpha || color.getAlpha());\n\n const hsl = color.toHsl();\n const hsv = color.toHsv();\n\n if (hsl.s === 0)\n hsv.h = hsl.h = data.h || (data.hsl && data.hsl.h) || oldHue || 0;\n\n /* --- comment this block to fix #109, may cause #25 again --- */\n // when the hsv.v is less than 0.0164 (base on test)\n // because of possible loss of precision\n // the result of hue and saturation would be miscalculated\n if (hsv.v < 0.0164) {\n hsv.h = data.h || (data.hsv && data.hsv.h) || 0;\n hsv.s = data.s || (data.hsv && data.hsv.s) || 0;\n }\n\n if (hsl.l < 0.01) {\n hsl.h = data.h || (data.hsl && data.hsl.h) || 0;\n hsl.s = data.s || (data.hsl && data.hsl.s) || 0;\n }\n /* ------ */\n\n return {\n hsl,\n hex: color.toHexString().toUpperCase(),\n hex8: color.toHex8String().toUpperCase(),\n rgba: color.toRgb(),\n hsv,\n oldHue: data.h || oldHue || hsl.h,\n source: data.source,\n a: color.getAlpha(),\n };\n}\n\nvar colorMixin = {\n model: {\n prop: 'modelValue',\n event: 'update:modelValue',\n },\n props: ['modelValue'],\n data() {\n return {\n val: _colorChange(this.modelValue),\n };\n },\n computed: {\n colors: {\n get() {\n return this.val;\n },\n set(newVal) {\n this.val = newVal;\n this.$emit('update:modelValue', newVal);\n },\n },\n },\n watch: {\n modelValue(newVal) {\n this.val = _colorChange(newVal);\n },\n },\n methods: {\n colorChange(data, oldHue) {\n this.oldHue = this.colors.hsl.h;\n this.colors = _colorChange(data, oldHue || this.oldHue);\n },\n isValidHex(hex) {\n return tinycolor(hex).isValid;\n },\n simpleCheckForValidColor(data) {\n const keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];\n let checked = 0;\n let passed = 0;\n\n for (let i = 0; i < keysToCheck.length; i++) {\n const letter = keysToCheck[i];\n if (data[letter]) {\n checked++;\n if (!isNaN(data[letter]))\n passed++;\n }\n }\n\n if (checked === passed)\n return data;\n },\n paletteUpperCase(palette) {\n return palette.map(c => c.toUpperCase());\n },\n isTransparent(color) {\n return tinycolor(color).getAlpha() === 0;\n },\n },\n};\n\nexport { colorMixin as default };\n","import { openBlock, createElementBlock, withDirectives, createElementVNode, vModelText, toDisplayString } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'EditableInput',\n props: {\n label: String,\n labelText: String,\n desc: String,\n value: [String, Number],\n max: Number,\n min: Number,\n arrowOffset: {\n type: Number,\n default: 1,\n },\n },\n computed: {\n val: {\n get() {\n return this.value;\n },\n set(v) {\n // TODO: min\n if (!(this.max === undefined) && +v > this.max)\n this.$refs.input.value = this.max;\n else\n return v;\n },\n },\n labelId() {\n return `input__label__${this.label}__${Math.random().toString().slice(2, 5)}`;\n },\n labelSpanText() {\n return this.labelText || this.label;\n },\n },\n methods: {\n update(e) {\n this.handleChange(e.target.value);\n },\n handleChange(newVal) {\n const data = {};\n data[this.label] = newVal;\n if (data.hex === undefined && data['#'] === undefined)\n this.$emit('change', data);\n else if (newVal.length > 5)\n this.$emit('change', data);\n },\n // **** unused\n // handleBlur (e) {\n // console.log(e)\n // },\n handleKeyDown(e) {\n let { val } = this;\n const number = Number(val);\n\n if (number) {\n const amount = this.arrowOffset || 1;\n\n // Up\n if (e.keyCode === 38) {\n val = number + amount;\n this.handleChange(val);\n e.preventDefault();\n }\n\n // Down\n if (e.keyCode === 40) {\n val = number - amount;\n this.handleChange(val);\n e.preventDefault();\n }\n }\n },\n // **** unused\n // handleDrag (e) {\n // console.log(e)\n // },\n // handleMouseDown (e) {\n // console.log(e)\n // }\n },\n};\n\nconst _hoisted_1 = { class: \"vc-editable-input\" };\nconst _hoisted_2 = [\"aria-labelledby\"];\nconst _hoisted_3 = [\"id\", \"for\"];\nconst _hoisted_4 = { class: \"vc-input__desc\" };\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", _hoisted_1, [\n withDirectives(createElementVNode(\"input\", {\n ref: \"input\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($options.val) = $event)),\n \"aria-labelledby\": $options.labelId,\n class: \"vc-input__input\",\n onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.handleKeyDown && $options.handleKeyDown(...args))),\n onInput: _cache[2] || (_cache[2] = (...args) => ($options.update && $options.update(...args)))\n }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_2), [\n [vModelText, $options.val]\n ]),\n createElementVNode(\"span\", {\n id: $options.labelId,\n for: $props.label,\n class: \"vc-input__label\"\n }, toDisplayString($options.labelSpanText), 9 /* TEXT, PROPS */, _hoisted_3),\n createElementVNode(\"span\", _hoisted_4, toDisplayString($props.desc), 1 /* TEXT */)\n ]))\n}\n\nvar css_248z = \".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/editable-input/editable-input.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","function clamp(value, min, max) {\n return min < max\n ? (value < min ? min : value > max ? max : value)\n : (value < max ? max : value > min ? min : value);\n}\n\nexport { clamp };\n","import { clamp } from '../../utils/utils.js';\nimport { openBlock, createElementBlock, normalizeStyle, createElementVNode } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Saturation',\n props: {\n value: Object,\n },\n computed: {\n colors() {\n return this.value;\n },\n bgColor() {\n return `hsl(${this.colors.hsv.h}, 100%, 50%)`;\n },\n pointerTop() {\n return `${(-(this.colors.hsv.v * 100) + 1) + 100}%`;\n },\n pointerLeft() {\n return `${this.colors.hsv.s * 100}%`;\n },\n },\n methods: {\n handleChange(e, skip) {\n !skip && e.preventDefault();\n const { container } = this.$refs;\n if (!container) {\n // for some edge cases, container may not exist. see #220\n return;\n }\n const containerWidth = container.clientWidth;\n const containerHeight = container.clientHeight;\n\n const xOffset = container.getBoundingClientRect().left + window.pageXOffset;\n const yOffset = container.getBoundingClientRect().top + window.pageYOffset;\n const pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);\n const pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);\n const left = clamp(pageX - xOffset, 0, containerWidth);\n const top = clamp(pageY - yOffset, 0, containerHeight);\n const saturation = left / containerWidth;\n const bright = clamp(-(top / containerHeight) + 1, 0, 1);\n\n this.onChange({\n h: this.colors.hsv.h,\n s: saturation,\n v: bright,\n a: this.colors.hsv.a,\n source: 'hsva',\n });\n },\n onChange(param) {\n this.$emit('change', param);\n },\n handleMouseDown(e) {\n // this.handleChange(e, true)\n window.addEventListener('mousemove', this.handleChange);\n window.addEventListener('mouseup', this.handleChange);\n window.addEventListener('mouseup', this.handleMouseUp);\n },\n handleMouseUp(e) {\n this.unbindEventListeners();\n },\n unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n },\n },\n};\n\nconst _hoisted_1 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-saturation--white\" }, null, -1 /* HOISTED */);\nconst _hoisted_2 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-saturation--black\" }, null, -1 /* HOISTED */);\nconst _hoisted_3 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-saturation-circle\" }, null, -1 /* HOISTED */);\nconst _hoisted_4 = [\n _hoisted_3\n];\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", {\n ref: \"container\",\n class: \"vc-saturation\",\n style: normalizeStyle({ background: $options.bgColor }),\n onMousedown: _cache[0] || (_cache[0] = (...args) => ($options.handleMouseDown && $options.handleMouseDown(...args))),\n onTouchmove: _cache[1] || (_cache[1] = (...args) => ($options.handleChange && $options.handleChange(...args))),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => ($options.handleChange && $options.handleChange(...args)))\n }, [\n _hoisted_1,\n _hoisted_2,\n createElementVNode(\"div\", {\n class: \"vc-saturation-pointer\",\n style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft })\n }, _hoisted_4, 4 /* STYLE */)\n ], 36 /* STYLE, HYDRATE_EVENTS */))\n}\n\nvar css_248z = \".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/saturation/saturation.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import { openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Hue',\n props: {\n value: Object,\n direction: {\n type: String,\n // [horizontal | vertical]\n default: 'horizontal',\n },\n },\n data() {\n return {\n oldHue: 0,\n pullDirection: '',\n };\n },\n computed: {\n colors() {\n return this.value;\n },\n directionClass() {\n return {\n 'vc-hue--horizontal': this.direction === 'horizontal',\n 'vc-hue--vertical': this.direction === 'vertical',\n };\n },\n pointerTop() {\n if (this.direction === 'vertical') {\n if (this.colors.hsl.h === 0 && this.pullDirection === 'right')\n return 0;\n return `${-((this.colors.hsl.h * 100) / 360) + 100}%`;\n }\n return 0;\n },\n pointerLeft() {\n if (this.direction === 'vertical')\n return 0;\n\n if (this.colors.hsl.h === 0 && this.pullDirection === 'right')\n return '100%';\n return `${(this.colors.hsl.h * 100) / 360}%`;\n },\n },\n watch: {\n value: {\n handler(value, oldVal) {\n const { h } = value.hsl;\n if (h !== 0 && h - this.oldHue > 0)\n this.pullDirection = 'right';\n if (h !== 0 && h - this.oldHue < 0)\n this.pullDirection = 'left';\n this.oldHue = h;\n },\n deep: true,\n immediate: true,\n },\n },\n methods: {\n handleChange(e, skip) {\n !skip && e.preventDefault();\n\n const { container } = this.$refs;\n if (!container) {\n // for some edge cases, container may not exist. see #220\n return;\n }\n const containerWidth = container.clientWidth;\n const containerHeight = container.clientHeight;\n\n const xOffset = container.getBoundingClientRect().left + window.pageXOffset;\n const yOffset = container.getBoundingClientRect().top + window.pageYOffset;\n const pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);\n const pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);\n const left = pageX - xOffset;\n const top = pageY - yOffset;\n\n let h;\n let percent;\n\n if (this.direction === 'vertical') {\n if (top < 0) {\n h = 360;\n }\n else if (top > containerHeight) {\n h = 0;\n }\n else {\n percent = -(top * 100 / containerHeight) + 100;\n h = (360 * percent / 100);\n }\n\n if (this.colors.hsl.h !== h) {\n this.$emit('change', {\n h,\n s: this.colors.hsl.s,\n l: this.colors.hsl.l,\n a: this.colors.hsl.a,\n source: 'hsl',\n });\n }\n }\n else {\n if (left < 0) {\n h = 0;\n }\n else if (left > containerWidth) {\n h = 360;\n }\n else {\n percent = left * 100 / containerWidth;\n h = (360 * percent / 100);\n }\n\n if (this.colors.hsl.h !== h) {\n this.$emit('change', {\n h,\n s: this.colors.hsl.s,\n l: this.colors.hsl.l,\n a: this.colors.hsl.a,\n source: 'hsl',\n });\n }\n }\n },\n handleMouseDown(e) {\n this.handleChange(e, true);\n window.addEventListener('mousemove', this.handleChange);\n window.addEventListener('mouseup', this.handleChange);\n window.addEventListener('mouseup', this.handleMouseUp);\n },\n handleMouseUp(e) {\n this.unbindEventListeners();\n },\n unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n },\n },\n};\n\nconst _hoisted_1 = [\"aria-valuenow\"];\nconst _hoisted_2 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-hue-picker\" }, null, -1 /* HOISTED */);\nconst _hoisted_3 = [\n _hoisted_2\n];\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([\"vc-hue\", [$options.directionClass]])\n }, [\n createElementVNode(\"div\", {\n ref: \"container\",\n class: \"vc-hue-container\",\n role: \"slider\",\n \"aria-valuenow\": $options.colors.hsl.h,\n \"aria-valuemin\": \"0\",\n \"aria-valuemax\": \"360\",\n onMousedown: _cache[0] || (_cache[0] = (...args) => ($options.handleMouseDown && $options.handleMouseDown(...args))),\n onTouchmove: _cache[1] || (_cache[1] = (...args) => ($options.handleChange && $options.handleChange(...args))),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => ($options.handleChange && $options.handleChange(...args)))\n }, [\n createElementVNode(\"div\", {\n class: \"vc-hue-pointer\",\n style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft }),\n role: \"presentation\"\n }, _hoisted_3, 4 /* STYLE */)\n ], 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1)\n ], 2 /* CLASS */))\n}\n\nvar css_248z = \".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/hue/hue.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import colorMixin from '../../mixin/color.js';\nimport script$4 from '../editable-input/index.js';\nimport script$1 from '../saturation/index.js';\nimport script$2 from '../hue/index.js';\nimport script$3 from '../alpha/index.js';\nimport script$5 from '../checkboard/index.js';\nimport { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, normalizeStyle, createBlock, createCommentVNode, withDirectives, vShow } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '@ctrl/tinycolor';\nimport '../../utils/utils.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Chrome',\n components: {\n Saturation: script$1,\n Hue: script$2,\n Alpha: script$3,\n EdIn: script$4,\n Checkboard: script$5,\n },\n mixins: [colorMixin],\n props: {\n disableAlpha: {\n type: Boolean,\n default: false,\n },\n disableFields: {\n type: Boolean,\n default: false,\n },\n format: {\n type: String,\n default: 'hex',\n },\n },\n data() {\n return {\n fieldsIndex: 'hex',\n highlight: false,\n };\n },\n computed: {\n hsl() {\n const { h, s, l } = this.colors.hsl;\n return {\n h: h.toFixed(),\n s: `${(s * 100).toFixed()}%`,\n l: `${(l * 100).toFixed()}%`,\n };\n },\n activeColor() {\n const { rgba } = this.colors;\n return `rgba(${[rgba.r, rgba.g, rgba.b, rgba.a].join(',')})`;\n },\n hasAlpha() {\n return this.colors.a < 1;\n },\n },\n watch: {\n format: {\n handler(val) {\n this.fieldsIndex = val;\n },\n immediate: true,\n },\n },\n methods: {\n childChange(data) {\n this.colorChange(data);\n },\n inputChange(data) {\n if (!data)\n return;\n\n if (data.hex) {\n this.isValidHex(data.hex) && this.colorChange({\n hex: data.hex,\n source: 'hex',\n });\n }\n else if (data.r || data.g || data.b || data.a) {\n this.colorChange({\n r: data.r || this.colors.rgba.r,\n g: data.g || this.colors.rgba.g,\n b: data.b || this.colors.rgba.b,\n a: data.a || this.colors.rgba.a,\n source: 'rgba',\n });\n }\n else if (data.h || data.s || data.l) {\n const s = data.s ? (data.s.replace('%', '') / 100) : this.colors.hsl.s;\n const l = data.l ? (data.l.replace('%', '') / 100) : this.colors.hsl.l;\n\n this.colorChange({\n h: data.h || this.colors.hsl.h,\n s,\n l,\n source: 'hsl',\n });\n }\n },\n toggleViews() {\n switch (this.fieldsIndex) {\n case 'hex':\n this.fieldsIndex = `rgb${this.disableAlpha ? '' : 'a'}`;\n break;\n case 'rgb':\n case 'rgba':\n this.fieldsIndex = `hsl${this.disableAlpha ? '' : 'a'}`;\n break;\n default:\n this.fieldsIndex = 'hex';\n break;\n }\n this.$emit('update:format', this.fieldsIndex);\n },\n showHighlight() {\n this.highlight = true;\n },\n hideHighlight() {\n this.highlight = false;\n },\n },\n};\n\nconst _hoisted_1 = { class: \"vc-chrome-saturation-wrap\" };\nconst _hoisted_2 = { class: \"vc-chrome-body\" };\nconst _hoisted_3 = { class: \"vc-chrome-controls\" };\nconst _hoisted_4 = { class: \"vc-chrome-color-wrap\" };\nconst _hoisted_5 = [\"aria-label\"];\nconst _hoisted_6 = { class: \"vc-chrome-sliders\" };\nconst _hoisted_7 = { class: \"vc-chrome-hue-wrap\" };\nconst _hoisted_8 = {\n key: 0,\n class: \"vc-chrome-alpha-wrap\"\n};\nconst _hoisted_9 = {\n key: 0,\n class: \"vc-chrome-fields-wrap\"\n};\nconst _hoisted_10 = { class: \"vc-chrome-fields\" };\nconst _hoisted_11 = { class: \"vc-chrome-field\" };\nconst _hoisted_12 = { class: \"vc-chrome-fields\" };\nconst _hoisted_13 = { class: \"vc-chrome-field\" };\nconst _hoisted_14 = { class: \"vc-chrome-field\" };\nconst _hoisted_15 = { class: \"vc-chrome-field\" };\nconst _hoisted_16 = {\n key: 0,\n class: \"vc-chrome-field\"\n};\nconst _hoisted_17 = { class: \"vc-chrome-fields\" };\nconst _hoisted_18 = { class: \"vc-chrome-field\" };\nconst _hoisted_19 = { class: \"vc-chrome-field\" };\nconst _hoisted_20 = { class: \"vc-chrome-field\" };\nconst _hoisted_21 = {\n key: 0,\n class: \"vc-chrome-field\"\n};\nconst _hoisted_22 = { class: \"vc-chrome-toggle-icon\" };\nconst _hoisted_23 = /*#__PURE__*/createElementVNode(\"path\", {\n fill: \"#333\",\n d: \"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z\"\n}, null, -1 /* HOISTED */);\nconst _hoisted_24 = [\n _hoisted_23\n];\nconst _hoisted_25 = { class: \"vc-chrome-toggle-icon-highlight\" };\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_Saturation = resolveComponent(\"Saturation\");\n const _component_Checkboard = resolveComponent(\"Checkboard\");\n const _component_Hue = resolveComponent(\"Hue\");\n const _component_Alpha = resolveComponent(\"Alpha\");\n const _component_EdIn = resolveComponent(\"EdIn\");\n\n return (openBlock(), createElementBlock(\"div\", {\n role: \"application\",\n \"aria-label\": \"Chrome color picker\",\n class: normalizeClass([\"vc-chrome\", [$props.disableAlpha ? 'vc-chrome__disable-alpha' : '']])\n }, [\n createElementVNode(\"div\", _hoisted_1, [\n createVNode(_component_Saturation, {\n value: _ctx.colors,\n onChange: $options.childChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_2, [\n createElementVNode(\"div\", _hoisted_3, [\n createElementVNode(\"div\", _hoisted_4, [\n createElementVNode(\"div\", {\n \"aria-label\": `current color is ${_ctx.colors.hex}`,\n class: \"vc-chrome-active-color\",\n style: normalizeStyle({ background: $options.activeColor })\n }, null, 12 /* STYLE, PROPS */, _hoisted_5),\n (!$props.disableAlpha)\n ? (openBlock(), createBlock(_component_Checkboard, { key: 0 }))\n : createCommentVNode(\"v-if\", true)\n ]),\n createElementVNode(\"div\", _hoisted_6, [\n createElementVNode(\"div\", _hoisted_7, [\n createVNode(_component_Hue, {\n value: _ctx.colors,\n onChange: $options.childChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n (!$props.disableAlpha)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_8, [\n createVNode(_component_Alpha, {\n value: _ctx.colors,\n onChange: $options.childChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]))\n : createCommentVNode(\"v-if\", true)\n ])\n ]),\n (!$props.disableFields)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_9, [\n withDirectives(createElementVNode(\"div\", _hoisted_10, [\n createCommentVNode(\" hex \"),\n createElementVNode(\"div\", _hoisted_11, [\n (!$options.hasAlpha)\n ? (openBlock(), createBlock(_component_EdIn, {\n key: 0,\n label: \"hex\",\n value: _ctx.colors.hex,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"]))\n : createCommentVNode(\"v-if\", true),\n ($options.hasAlpha)\n ? (openBlock(), createBlock(_component_EdIn, {\n key: 1,\n label: \"hex\",\n value: _ctx.colors.hex8,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"]))\n : createCommentVNode(\"v-if\", true)\n ])\n ], 512 /* NEED_PATCH */), [\n [vShow, $data.fieldsIndex === 'hex']\n ]),\n withDirectives(createElementVNode(\"div\", _hoisted_12, [\n createCommentVNode(\" rgba \"),\n createElementVNode(\"div\", _hoisted_13, [\n createVNode(_component_EdIn, {\n label: \"r\",\n value: _ctx.colors.rgba.r,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_14, [\n createVNode(_component_EdIn, {\n label: \"g\",\n value: _ctx.colors.rgba.g,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_15, [\n createVNode(_component_EdIn, {\n label: \"b\",\n value: _ctx.colors.rgba.b,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n (!$props.disableAlpha)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_16, [\n createVNode(_component_EdIn, {\n label: \"a\",\n value: _ctx.colors.a,\n \"arrow-offset\": 0.01,\n max: 1,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"arrow-offset\", \"onChange\"])\n ]))\n : createCommentVNode(\"v-if\", true)\n ], 512 /* NEED_PATCH */), [\n [vShow, ['rgb', 'rgba'].includes($data.fieldsIndex)]\n ]),\n withDirectives(createElementVNode(\"div\", _hoisted_17, [\n createCommentVNode(\" hsla \"),\n createElementVNode(\"div\", _hoisted_18, [\n createVNode(_component_EdIn, {\n label: \"h\",\n value: $options.hsl.h,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_19, [\n createVNode(_component_EdIn, {\n label: \"s\",\n value: $options.hsl.s,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_20, [\n createVNode(_component_EdIn, {\n label: \"l\",\n value: $options.hsl.l,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n (!$props.disableAlpha)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_21, [\n createVNode(_component_EdIn, {\n label: \"a\",\n value: _ctx.colors.a,\n \"arrow-offset\": 0.01,\n max: 1,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"arrow-offset\", \"onChange\"])\n ]))\n : createCommentVNode(\"v-if\", true)\n ], 512 /* NEED_PATCH */), [\n [vShow, ['hsl', 'hsla'].includes($data.fieldsIndex)]\n ]),\n createCommentVNode(\" btn \"),\n createElementVNode(\"div\", {\n class: \"vc-chrome-toggle-btn\",\n role: \"button\",\n \"aria-label\": \"Change another color definition\",\n onClick: _cache[3] || (_cache[3] = (...args) => ($options.toggleViews && $options.toggleViews(...args)))\n }, [\n createElementVNode(\"div\", _hoisted_22, [\n (openBlock(), createElementBlock(\"svg\", {\n style: {\"width\":\"24px\",\"height\":\"24px\"},\n viewBox: \"0 0 24 24\",\n onMouseover: _cache[0] || (_cache[0] = (...args) => ($options.showHighlight && $options.showHighlight(...args))),\n onMouseenter: _cache[1] || (_cache[1] = (...args) => ($options.showHighlight && $options.showHighlight(...args))),\n onMouseout: _cache[2] || (_cache[2] = (...args) => ($options.hideHighlight && $options.hideHighlight(...args)))\n }, _hoisted_24, 32 /* HYDRATE_EVENTS */))\n ]),\n withDirectives(createElementVNode(\"div\", _hoisted_25, null, 512 /* NEED_PATCH */), [\n [vShow, $data.highlight]\n ])\n ]),\n createCommentVNode(\" btn \")\n ]))\n : createCommentVNode(\"v-if\", true)\n ])\n ], 2 /* CLASS */))\n}\n\nvar css_248z = \".vc-chrome{background:#fff;background-color:#fff;border-radius:2px;box-shadow:0 0 2px rgba(0,0,0,.3),0 4px 8px rgba(0,0,0,.3);box-sizing:initial;font-family:Menlo;width:225px}.vc-chrome-controls{display:flex}.vc-chrome-color-wrap{position:relative;width:36px}.vc-chrome-active-color{border-radius:15px;height:30px;overflow:hidden;position:relative;width:30px;z-index:1}.vc-chrome-color-wrap .vc-checkerboard{background-size:auto;border-radius:15px;height:30px;width:30px}.vc-chrome-sliders{flex:1}.vc-chrome-fields-wrap{display:flex;padding-top:16px}.vc-chrome-fields{display:flex;flex:1;margin-left:-6px}.vc-chrome-field{padding-left:6px;width:100%}.vc-chrome-toggle-btn{position:relative;text-align:right;width:32px}.vc-chrome-toggle-icon{cursor:pointer;margin-right:-4px;margin-top:12px;position:relative;z-index:2}.vc-chrome-toggle-icon-highlight{background:#eee;border-radius:4px;height:28px;left:12px;position:absolute;top:10px;width:24px}.vc-chrome-hue-wrap{margin-bottom:8px}.vc-chrome-alpha-wrap,.vc-chrome-hue-wrap{height:10px;position:relative}.vc-chrome-alpha-wrap .vc-alpha-gradient,.vc-chrome-hue-wrap .vc-hue{border-radius:2px}.vc-chrome-alpha-wrap .vc-alpha-picker,.vc-chrome-hue-wrap .vc-hue-picker{background-color:#f8f8f8;border-radius:6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:12px;transform:translate(-6px,-2px);width:12px}.vc-chrome-body{background-color:#fff;padding:16px 16px 12px}.vc-chrome-saturation-wrap{border-radius:2px 2px 0 0;overflow:hidden;padding-bottom:55%;position:relative;width:100%}.vc-chrome-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-chrome-fields .vc-input__input{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #dadada;color:#333;font-size:11px;height:21px;text-align:center;width:100%}.vc-chrome-fields .vc-input__label{color:#969696;display:block;font-size:11px;line-height:11px;margin-top:12px;text-align:center;text-transform:uppercase}.vc-chrome__disable-alpha .vc-chrome-active-color{height:18px;width:18px}.vc-chrome__disable-alpha .vc-chrome-color-wrap{width:30px}.vc-chrome__disable-alpha .vc-chrome-hue-wrap{margin-bottom:4px;margin-top:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/chrome/chrome.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import { r as register, t as t3, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nregister(t3);\nclass Color {\n /**\n * @param r - The red value\n * @param g - The green value\n * @param b - The blue value\n * @param name - The name of the color\n */\n constructor(r, g, b, name) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.name = name;\n this.r = Math.min(r, 255);\n this.g = Math.min(g, 255);\n this.b = Math.min(b, 255);\n this.name = name;\n }\n /**\n * The hexadecimal color string.\n */\n get color() {\n const toHex = (int) => `00${int.toString(16)}`.slice(-2);\n return `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`;\n }\n}\nfunction calculateStepIncrement(steps, color1, color2) {\n return {\n r: (color2.r - color1.r) / steps,\n g: (color2.g - color1.g) / steps,\n b: (color2.b - color1.b) / steps\n };\n}\nfunction mixPalette(steps, color1, color2) {\n const palette = [];\n palette.push(color1);\n const increment = calculateStepIncrement(steps, color1, color2);\n for (let i = 1; i < steps; i++) {\n const r = Math.floor(color1.r + increment.r * i);\n const g = Math.floor(color1.g + increment.g * i);\n const b = Math.floor(color1.b + increment.b * i);\n palette.push(new Color(r, g, b));\n }\n return palette;\n}\nconst COLOR_RED = new Color(182, 70, 157, t(\"Purple\"));\nconst COLOR_YELLOW = new Color(221, 203, 85, t(\"Gold\"));\nconst COLOR_BLUE = new Color(0, 130, 201, t(\"Nextcloud blue\"));\nconst COLOR_BLACK = new Color(0, 0, 0, t(\"Black\"));\nconst COLOR_WHITE = new Color(255, 255, 255, t(\"White\"));\nconst defaultPalette = [\n COLOR_RED,\n new Color(\n ...[191, 103, 139],\n t(\"Rosy brown\")\n // TRANSLATORS: A color name for RGB(191, 103, 139)\n ),\n new Color(\n ...[201, 136, 121],\n t(\"Feldspar\")\n // TRANSLATORS: A color name for RGB(201, 136, 121)\n ),\n new Color(\n ...[211, 169, 103],\n t(\"Whiskey\")\n // TRANSLATORS: A color name for RGB(211, 169, 103)\n ),\n COLOR_YELLOW,\n new Color(\n ...[165, 184, 114],\n t(\"Olivine\")\n // TRANSLATORS: A color name for RGB(165, 184, 114)\n ),\n new Color(\n ...[110, 166, 143],\n t(\"Acapulco\")\n // TRANSLATORS: A color name for RGB(110, 166, 143)\n ),\n new Color(\n ...[55, 148, 172],\n t(\"Boston Blue\")\n // TRANSLATORS: A color name for RGB(55, 148, 172)\n ),\n COLOR_BLUE,\n new Color(\n ...[45, 115, 190],\n t(\"Mariner\")\n // TRANSLATORS: A color name for RGB(45, 115, 190)\n ),\n new Color(\n ...[91, 100, 179],\n t(\"Blue Violet\")\n // TRANSLATORS: A color name for RGB(91, 100, 179)\n ),\n new Color(\n ...[136, 85, 168],\n t(\"Deluge\")\n // TRANSLATORS: A color name for RGB(136, 85, 168)\n )\n];\nfunction generatePalette(steps) {\n const palette1 = mixPalette(steps, COLOR_RED, COLOR_YELLOW);\n const palette2 = mixPalette(steps, COLOR_YELLOW, COLOR_BLUE);\n const palette3 = mixPalette(steps, COLOR_BLUE, COLOR_RED);\n return palette1.concat(palette2).concat(palette3);\n}\nexport {\n Color as C,\n COLOR_BLACK as a,\n COLOR_WHITE as b,\n defaultPalette as d,\n generatePalette as g\n};\n//# sourceMappingURL=colors-BHGKZFDI.mjs.map\n","import '../assets/NcColorPicker-CCanY5eB.css';\nimport { defineComponent, mergeModels, useModel, ref, computed, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createVNode, createElementBlock, createCommentVNode, Transition, Fragment, renderList, normalizeStyle, createTextVNode, toDisplayString, renderSlot, normalizeProps, guardReactiveProps } from \"vue\";\nimport { Chrome } from \"@ckpack/vue-color\";\nimport { d as mdiCheck, u as mdiCloseCircleOutline, v as mdiArrowLeft, w as mdiDotsHorizontal } from \"./mdi-CpchYUUV.mjs\";\nimport { r as register, w as t1, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nimport { d as defaultPalette, a as COLOR_BLACK, b as COLOR_WHITE } from \"./colors-BHGKZFDI.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { l as logger } from \"./logger-D3RVzcfQ.mjs\";\nimport { N as NcButton } from \"./NcButton-C9D47Igd.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-BvLanNaW.mjs\";\nimport { N as NcPopover } from \"./NcPopover-OqcYrWOx.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nregister(t1);\nconst _hoisted_1 = [\"aria-label\"];\nconst _hoisted_2 = {\n key: 0,\n class: \"color-picker__simple\"\n};\nconst _hoisted_3 = [\"aria-label\", \"name\", \"checked\", \"onClick\"];\nconst _hoisted_4 = [\"title\"];\nconst _hoisted_5 = [\"aria-label\", \"name\", \"checked\"];\nconst _hoisted_6 = {\n key: 0,\n class: \"color-picker__navigation\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcColorPicker\",\n props: /* @__PURE__ */ mergeModels({\n advancedFields: { type: Boolean },\n clearable: { type: Boolean },\n container: { default: \"body\" },\n palette: { default: () => [] },\n paletteOnly: { type: Boolean }\n }, {\n \"modelValue\": { required: true },\n \"modelModifiers\": {},\n \"open\": { type: Boolean },\n \"openModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"submit\", \"closed\"], [\"update:modelValue\", \"update:open\"]),\n setup(__props, { emit: __emit }) {\n const currentColor = useModel(__props, \"modelValue\");\n const open = useModel(__props, \"open\");\n const props = __props;\n const emit = __emit;\n const HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i;\n const id = createElementId();\n const advanced = ref(false);\n const normalizedPalette = computed(() => {\n let palette = props.palette;\n for (const color of palette) {\n if (typeof color === \"string\" && !color.match(HEX_REGEX) || typeof color === \"object\" && !color.color?.match(HEX_REGEX)) {\n logger.error(\"[NcColorPicker] Invalid palette passed\", { color });\n palette = [];\n break;\n }\n }\n if (palette.length === 0) {\n palette = props.clearable ? [...defaultPalette, COLOR_BLACK, COLOR_WHITE] : [...defaultPalette];\n }\n return palette.map((item) => ({\n color: typeof item === \"object\" ? item.color : item,\n name: typeof item === \"object\" && item.name ? item.name : t(\"A color with a HEX value {hex}\", { hex: typeof item === \"string\" ? item : item.color })\n }));\n });\n function handleConfirm(hideCallback) {\n emit(\"submit\", currentColor.value);\n hideCallback();\n advanced.value = false;\n }\n function toggleColor(color) {\n color = typeof color === \"string\" ? color : color.color;\n if (props.clearable && currentColor.value === color) {\n currentColor.value = void 0;\n } else {\n currentColor.value = color;\n }\n }\n function pickCustomColor(color) {\n currentColor.value = color.hex;\n }\n function getContrastColor(color) {\n return calculateLuma(color) > 0.5 ? COLOR_BLACK.color : COLOR_WHITE.color;\n }\n function calculateLuma(color) {\n const [red, green, blue] = hexToRGB(color);\n return (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255;\n }\n function hexToRGB(hex) {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n if (!result) {\n return [0, 0, 0];\n }\n return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)];\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcPopover), {\n shown: open.value,\n \"onUpdate:shown\": _cache[3] || (_cache[3] = ($event) => open.value = $event),\n container: _ctx.container,\n popupRole: \"dialog\",\n onApplyHide: _cache[4] || (_cache[4] = ($event) => emit(\"closed\"))\n }, {\n trigger: withCtx((slotProps) => [\n renderSlot(_ctx.$slots, \"default\", normalizeProps(guardReactiveProps(slotProps)), void 0, true)\n ]),\n default: withCtx((slotProps) => [\n createElementVNode(\"div\", {\n role: \"dialog\",\n class: normalizeClass([\"color-picker\", {\n \"color-picker--advanced-fields\": advanced.value && _ctx.advancedFields,\n \"color-picker--clearable\": _ctx.clearable\n }]),\n \"aria-modal\": \"true\",\n \"aria-label\": unref(t)(\"Color picker\")\n }, [\n createVNode(Transition, {\n name: \"slide\",\n mode: \"out-in\"\n }, {\n default: withCtx(() => [\n !advanced.value ? (openBlock(), createElementBlock(\"div\", _hoisted_2, [\n (openBlock(true), createElementBlock(Fragment, null, renderList(normalizedPalette.value, ({ color, name }, index) => {\n return openBlock(), createElementBlock(\"label\", {\n key: index,\n class: normalizeClass([\"color-picker__simple-color-circle\", { \"color-picker__simple-color-circle--active\": color === currentColor.value }]),\n style: normalizeStyle({\n backgroundColor: color,\n color: getContrastColor(color)\n })\n }, [\n color === currentColor.value ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {\n key: 0,\n path: unref(mdiCheck)\n }, null, 8, [\"path\"])) : createCommentVNode(\"\", true),\n createElementVNode(\"input\", {\n type: \"radio\",\n class: \"hidden-visually\",\n \"aria-label\": name,\n name: `color-picker-${unref(id)}`,\n checked: color === currentColor.value,\n onClick: ($event) => toggleColor(color)\n }, null, 8, _hoisted_3)\n ], 6);\n }), 128)),\n _ctx.clearable ? (openBlock(), createElementBlock(\"label\", {\n key: 0,\n class: \"color-picker__clear\",\n title: unref(t)(\"No color\")\n }, [\n createVNode(unref(NcIconSvgWrapper), {\n size: currentColor.value ? 28 : 34,\n path: unref(mdiCloseCircleOutline)\n }, null, 8, [\"size\", \"path\"]),\n createElementVNode(\"input\", {\n type: \"radio\",\n class: \"hidden-visually\",\n \"aria-label\": unref(t)(\"No color\"),\n name: `color-picker-${unref(id)}`,\n checked: !currentColor.value,\n onClick: _cache[0] || (_cache[0] = ($event) => currentColor.value = void 0)\n }, null, 8, _hoisted_5)\n ], 8, _hoisted_4)) : createCommentVNode(\"\", true)\n ])) : (openBlock(), createBlock(unref(Chrome), {\n key: 1,\n class: \"color-picker__advanced\",\n disableAlpha: \"\",\n disableFields: !_ctx.advancedFields,\n modelValue: currentColor.value ?? \"#000000\",\n \"onUpdate:modelValue\": pickCustomColor\n }, null, 8, [\"disableFields\", \"modelValue\"]))\n ]),\n _: 1\n }),\n !_ctx.paletteOnly ? (openBlock(), createElementBlock(\"div\", _hoisted_6, [\n advanced.value ? (openBlock(), createBlock(unref(NcButton), {\n key: 0,\n \"aria-label\": unref(t)(\"Back\"),\n title: unref(t)(\"Back\"),\n variant: \"tertiary\",\n onClick: _cache[1] || (_cache[1] = ($event) => advanced.value = false)\n }, {\n icon: withCtx(() => [\n createVNode(unref(NcIconSvgWrapper), {\n directional: \"\",\n path: unref(mdiArrowLeft)\n }, null, 8, [\"path\"])\n ]),\n _: 1\n }, 8, [\"aria-label\", \"title\"])) : (openBlock(), createBlock(unref(NcButton), {\n key: 1,\n \"aria-label\": unref(t)(\"More options\"),\n title: unref(t)(\"More options\"),\n variant: \"tertiary\",\n onClick: _cache[2] || (_cache[2] = ($event) => advanced.value = true)\n }, {\n icon: withCtx(() => [\n createVNode(unref(NcIconSvgWrapper), { path: unref(mdiDotsHorizontal) }, null, 8, [\"path\"])\n ]),\n _: 1\n }, 8, [\"aria-label\", \"title\"])),\n createVNode(unref(NcButton), {\n variant: \"primary\",\n onClick: ($event) => handleConfirm(slotProps.hide)\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(unref(t)(\"Choose\")), 1)\n ]),\n _: 2\n }, 1032, [\"onClick\"])\n ])) : createCommentVNode(\"\", true)\n ], 10, _hoisted_1)\n ]),\n _: 3\n }, 8, [\"shown\", \"container\"]);\n };\n }\n});\nconst NcColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-45e1396f\"]]);\nexport {\n NcColorPicker as N\n};\n//# sourceMappingURL=NcColorPicker-DDHxR-iN.mjs.map\n"],"names":["prefix","styleInject","css","ref","insertAt","head","style","install","app","options","componentPrefix","_checkboardCache","script","getCheckboard","renderCheckboard","c1","c2","size","canvas","ctx","key","checkboard","render","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","normalizeStyle","css_248z","script$1","rgba","rgbStr","skip","container","containerWidth","xOffset","left","a","_hoisted_1","_hoisted_2","_hoisted_3","createElementVNode","_hoisted_4","_component_Checkboard","resolveComponent","createVNode","args","bound01","n","max","isOnePointZero","isPercent","isPercentage","clamp01","val","boundAlpha","convertToPercentage","pad2","c","rgbToRgb","r","g","b","rgbToHsl","min","h","s","l","d","hue2rgb","p","q","t","hslToRgb","rgbToHsv","v","hsvToRgb","i","f","mod","rgbToHex","allow3Char","hex","rgbaToHex","allow4Char","convertDecimalToHex","convertHexToDecimal","parseIntFromHex","numberInputToObject","color","names","inputToRGB","rgb","ok","format","stringInputToObject","isValidCSSUnit","CSS_INTEGER","CSS_NUMBER","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","matchers","named","match","TinyColor","opts","_a","R","G","B","RsRGB","GsRGB","BsRGB","alpha","hsv","hsl","allowShortChar","fmt","x","rnd","_i","_b","value","formatSet","formattedString","hasAlpha","needsAlphaFormat","amount","hue","rgb1","rgb2","results","slices","part","ret","res","modification","background","fg","bg","result","increment","tinycolor","_colorChange","data","oldHue","colorMixin","newVal","keysToCheck","checked","passed","letter","palette","number","withDirectives","$event","vModelText","toDisplayString","clamp","containerHeight","yOffset","pageX","pageY","top","saturation","bright","param","oldVal","percent","normalizeClass","script$2","script$3","script$4","script$5","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_component_Saturation","_component_Hue","_component_Alpha","_component_EdIn","createCommentVNode","createBlock","vShow","register","t3","Color","name","toHex","int","COLOR_RED","COLOR_YELLOW","COLOR_BLUE","COLOR_BLACK","COLOR_WHITE","defaultPalette","t1","_sfc_main","defineComponent","mergeModels","__props","__emit","currentColor","useModel","open","props","emit","HEX_REGEX","id","createElementId","advanced","normalizedPalette","computed","logger","item","handleConfirm","hideCallback","toggleColor","pickCustomColor","getContrastColor","calculateLuma","red","green","blue","hexToRGB","unref","NcPopover","withCtx","slotProps","renderSlot","normalizeProps","guardReactiveProps","Transition","Chrome","Fragment","renderList","index","NcIconSvgWrapper","mdiCheck","mdiCloseCircleOutline","NcButton","mdiArrowLeft","mdiDotsHorizontal","createTextVNode","NcColorPicker","_export_sfc"],"mappings":"qVAEA,MAAMA,GAAS,GCFf,SAASC,EAAYC,EAAKC,EAAK,CACxBA,IAAQ,SAASA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAI,SAEnB,GAAI,EAAA,CAACD,GAAO,OAAO,SAAa,KAEhC,CAAA,IAAIG,EAAO,SAAS,MAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC,EAC/DC,EAAQ,SAAS,cAAc,OAAO,EAC1CA,EAAM,KAAO,WAETF,IAAa,OACXC,EAAK,WACPA,EAAK,aAAaC,EAAOD,EAAK,UAAU,EAK1CA,EAAK,YAAYC,CAAK,EAGpBA,EAAM,WACRA,EAAM,WAAW,QAAUJ,EAE3BI,EAAM,YAAY,SAAS,eAAeJ,CAAG,CAAC,CAAA,CAElD,CCvBA,MAAMK,EAAU,SAAUC,EAAKC,EAAS,CACtC,KAAM,CAAE,gBAAAC,EAAkBV,EAAM,EAAKS,GAAW,CAAA,EAChDD,EAAI,UAAU,GAAGE,CAAe,GAAG,KAAK,IAAI,GAAI,IAAI,CACtD,ECAMC,EAAmB,CAAA,EAEzB,IAAIC,EAAS,CACX,KAAM,aACN,MAAO,CACL,KAAM,CACJ,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,CACf,EACI,MAAO,CACL,KAAM,OACN,QAAS,MACf,EACI,KAAM,CACJ,KAAM,OACN,QAAS,SACf,CACA,EACE,SAAU,CACR,SAAU,CACR,MAAO,CACL,mBAAoB,OAAOC,GAAc,KAAK,MAAO,KAAK,KAAM,KAAK,IAAI,CAAC,GAClF,CACI,CACJ,CACA,EAUA,SAASC,GAAiBC,EAAIC,EAAIC,EAAM,CAEtC,GAAI,OAA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CAAiB,EACD,EAAG,CACnB,EAAiB,EAAG,CAAC,aAAc,OAAO,CAAC,GAC7BxN,EAAYuM,EAAMe,CAAQ,EAAG,CAC3B,QAAS,UACT,QAAUvG,GAAW8E,EAAca,EAAU,IAAI,CACjE,EAAiB,CACD,QAASD,EAAQ,IAAM,CACrBgB,GAAgBxG,GAAgBsF,EAAM5K,CAAC,EAAE,QAAQ,CAAC,EAAG,CAAC,CACxE,CAAiB,EACD,EAAG,CACnB,EAAiB,KAAM,CAAC,SAAS,CAAC,CAClC,CAAa,EACb,EAAa,GAAIlC,EAAU,CAC3B,CAAS,EACD,EAAG,CACX,EAAS,EAAG,CAAC,QAAS,WAAW,CAAC,EAEhC,CACF,CAAC,EACKiO,GAAgCC,GAAYhD,GAAW,CAAC,CAAC,YAAa,iBAAiB,CAAC,CAAC","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]} \ No newline at end of file +{"version":3,"file":"index-D5vryGZj.chunk.mjs","sources":["../node_modules/@ckpack/vue-color/libs/defaultConfig.js","../node_modules/@ckpack/vue-color/libs/style-inject.es-746bb8ed.js","../node_modules/@ckpack/vue-color/libs/utils/compoent.js","../node_modules/@ckpack/vue-color/libs/components/checkboard/index.js","../node_modules/@ckpack/vue-color/libs/components/alpha/index.js","../node_modules/@ctrl/tinycolor/dist/module/util.js","../node_modules/@ctrl/tinycolor/dist/module/conversion.js","../node_modules/@ctrl/tinycolor/dist/module/css-color-names.js","../node_modules/@ctrl/tinycolor/dist/module/format-input.js","../node_modules/@ctrl/tinycolor/dist/module/index.js","../node_modules/@ckpack/vue-color/libs/mixin/color.js","../node_modules/@ckpack/vue-color/libs/components/editable-input/index.js","../node_modules/@ckpack/vue-color/libs/utils/utils.js","../node_modules/@ckpack/vue-color/libs/components/saturation/index.js","../node_modules/@ckpack/vue-color/libs/components/hue/index.js","../node_modules/@ckpack/vue-color/libs/components/chrome/index.js","../node_modules/@nextcloud/vue/dist/chunks/colors-BHGKZFDI.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcColorPicker-DDHxR-iN.mjs"],"sourcesContent":["const name = 'VueColor';\n// 自定义组件前缀\nconst prefix = '';\nconst cssPrefix = '';\nconst size = 'medium';\n\nexport { cssPrefix, name, prefix, size };\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport { styleInject as s };\n","import { prefix } from '../defaultConfig.js';\n\nconst install = function (app, options) {\n const { componentPrefix = prefix } = options || {};\n app.component(`${componentPrefix}${this.name}`, this);\n};\n\nexport { install };\n","import { openBlock, createElementBlock, normalizeStyle } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nconst _checkboardCache = {};\n\nvar script = {\n name: 'Checkboard',\n props: {\n size: {\n type: [Number, String],\n default: 8,\n },\n white: {\n type: String,\n default: '#fff',\n },\n grey: {\n type: String,\n default: '#e6e6e6',\n },\n },\n computed: {\n bgStyle() {\n return {\n 'background-image': `url(${getCheckboard(this.white, this.grey, this.size)})`,\n };\n },\n },\n};\n\n/**\n * get base 64 data by canvas\n *\n * @param {String} c1 hex color\n * @param {String} c2 hex color\n * @param {Number} size\n */\n\nfunction renderCheckboard(c1, c2, size) {\n // Dont Render On Server\n if (typeof document === 'undefined')\n return null;\n\n const canvas = document.createElement('canvas');\n canvas.width = canvas.height = size * 2;\n const ctx = canvas.getContext('2d');\n // If no context can be found, return early.\n if (!ctx)\n return null;\n\n ctx.fillStyle = c1;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = c2;\n ctx.fillRect(0, 0, size, size);\n ctx.translate(size, size);\n ctx.fillRect(0, 0, size, size);\n return canvas.toDataURL();\n}\n\n/**\n * get checkboard base data and cache\n *\n * @param {String} c1 hex color\n * @param {String} c2 hex color\n * @param {Number} size\n */\n\nfunction getCheckboard(c1, c2, size) {\n const key = `${c1},${c2},${size}`;\n\n if (_checkboardCache[key])\n return _checkboardCache[key];\n\n const checkboard = renderCheckboard(c1, c2, size);\n _checkboardCache[key] = checkboard;\n return checkboard;\n}\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", {\n class: \"vc-checkerboard\",\n style: normalizeStyle($options.bgStyle)\n }, null, 4 /* STYLE */))\n}\n\nvar css_248z = \".vc-checkerboard{background-size:contain;bottom:0;left:0;position:absolute;right:0;top:0}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/checkboard/checkboard.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import script$1 from '../checkboard/index.js';\nimport { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, normalizeStyle } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Alpha',\n components: {\n Checkboard: script$1,\n },\n props: {\n value: Object,\n onChange: Function,\n },\n computed: {\n colors() {\n return this.value;\n },\n gradientColor() {\n const { rgba } = this.colors;\n const rgbStr = [rgba.r, rgba.g, rgba.b].join(',');\n return `linear-gradient(to right, rgba(${rgbStr}, 0) 0%, rgba(${rgbStr}, 1) 100%)`;\n },\n },\n methods: {\n handleChange(e, skip) {\n !skip && e.preventDefault();\n const { container } = this.$refs;\n if (!container) {\n // for some edge cases, container may not exist. see #220\n return;\n }\n const containerWidth = container.clientWidth;\n\n const xOffset = container.getBoundingClientRect().left + window.pageXOffset;\n const pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);\n const left = pageX - xOffset;\n\n let a;\n if (left < 0)\n a = 0;\n else if (left > containerWidth)\n a = 1;\n else\n a = Math.round(left * 100 / containerWidth) / 100;\n\n if (this.colors.a !== a) {\n this.$emit('change', {\n h: this.colors.hsl.h,\n s: this.colors.hsl.s,\n l: this.colors.hsl.l,\n a,\n source: 'rgba',\n });\n }\n },\n handleMouseDown(e) {\n this.handleChange(e, true);\n window.addEventListener('mousemove', this.handleChange);\n window.addEventListener('mouseup', this.handleMouseUp);\n },\n handleMouseUp() {\n this.unbindEventListeners();\n },\n unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n },\n },\n};\n\nconst _hoisted_1 = { class: \"vc-alpha\" };\nconst _hoisted_2 = { class: \"vc-alpha-checkboard-wrap\" };\nconst _hoisted_3 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-alpha-picker\" }, null, -1 /* HOISTED */);\nconst _hoisted_4 = [\n _hoisted_3\n];\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_Checkboard = resolveComponent(\"Checkboard\");\n\n return (openBlock(), createElementBlock(\"div\", _hoisted_1, [\n createElementVNode(\"div\", _hoisted_2, [\n createVNode(_component_Checkboard)\n ]),\n createElementVNode(\"div\", {\n class: \"vc-alpha-gradient\",\n style: normalizeStyle({ background: $options.gradientColor })\n }, null, 4 /* STYLE */),\n createElementVNode(\"div\", {\n ref: \"container\",\n class: \"vc-alpha-container\",\n onMousedown: _cache[0] || (_cache[0] = (...args) => ($options.handleMouseDown && $options.handleMouseDown(...args))),\n onTouchmove: _cache[1] || (_cache[1] = (...args) => ($options.handleChange && $options.handleChange(...args))),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => ($options.handleChange && $options.handleChange(...args)))\n }, [\n createElementVNode(\"div\", {\n class: \"vc-alpha-pointer\",\n style: normalizeStyle({ left: `${$options.colors.a * 100}%` })\n }, _hoisted_4, 4 /* STYLE */)\n ], 544 /* HYDRATE_EVENTS, NEED_PATCH */)\n ]))\n}\n\nvar css_248z = \".vc-alpha,.vc-alpha-checkboard-wrap{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-container{cursor:pointer;height:100%;margin:0 3px;position:relative;z-index:2}.vc-alpha-pointer{position:absolute;z-index:2}.vc-alpha-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/alpha/alpha.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * \n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n","import { bound01, pad2 } from './util.js';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * \n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n","// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n","/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb, } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { boundAlpha, convertToPercentage } from './util.js';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// \nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// \nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n","import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util.js';\nvar TinyColor = /** @class */ (function () {\n function TinyColor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n var _a;\n // If input is already a tinycolor, return itself\n if (color instanceof TinyColor) {\n // eslint-disable-next-line no-constructor-return\n return color;\n }\n if (typeof color === 'number') {\n color = numberInputToObject(color);\n }\n this.originalInput = color;\n var rgb = inputToRGB(color);\n this.originalInput = color;\n this.r = rgb.r;\n this.g = rgb.g;\n this.b = rgb.b;\n this.a = rgb.a;\n this.roundA = Math.round(100 * this.a) / 100;\n this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n this.gradientType = opts.gradientType;\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this.r < 1) {\n this.r = Math.round(this.r);\n }\n if (this.g < 1) {\n this.g = Math.round(this.g);\n }\n if (this.b < 1) {\n this.b = Math.round(this.b);\n }\n this.isValid = rgb.ok;\n }\n TinyColor.prototype.isDark = function () {\n return this.getBrightness() < 128;\n };\n TinyColor.prototype.isLight = function () {\n return !this.isDark();\n };\n /**\n * Returns the perceived brightness of the color, from 0-255.\n */\n TinyColor.prototype.getBrightness = function () {\n // http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n };\n /**\n * Returns the perceived luminance of a color, from 0-1.\n */\n TinyColor.prototype.getLuminance = function () {\n // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var R;\n var G;\n var B;\n var RsRGB = rgb.r / 255;\n var GsRGB = rgb.g / 255;\n var BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) {\n R = RsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n }\n if (GsRGB <= 0.03928) {\n G = GsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n }\n if (BsRGB <= 0.03928) {\n B = BsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n }\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n };\n /**\n * Returns the alpha value of a color, from 0-1.\n */\n TinyColor.prototype.getAlpha = function () {\n return this.a;\n };\n /**\n * Sets the alpha value on the current color.\n *\n * @param alpha - The new alpha value. The accepted range is 0-1.\n */\n TinyColor.prototype.setAlpha = function (alpha) {\n this.a = boundAlpha(alpha);\n this.roundA = Math.round(100 * this.a) / 100;\n return this;\n };\n /**\n * Returns whether the color is monochrome.\n */\n TinyColor.prototype.isMonochrome = function () {\n var s = this.toHsl().s;\n return s === 0;\n };\n /**\n * Returns the object as a HSVA object.\n */\n TinyColor.prototype.toHsv = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n };\n /**\n * Returns the hsva values interpolated into a string with the following format:\n * \"hsva(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHsvString = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n var h = Math.round(hsv.h * 360);\n var s = Math.round(hsv.s * 100);\n var v = Math.round(hsv.v * 100);\n return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a HSLA object.\n */\n TinyColor.prototype.toHsl = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n };\n /**\n * Returns the hsla values interpolated into a string with the following format:\n * \"hsla(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHslString = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n var h = Math.round(hsl.h * 360);\n var s = Math.round(hsl.s * 100);\n var l = Math.round(hsl.l * 100);\n return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the hex value of the color.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHex = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n };\n /**\n * Returns the hex value of the color -with a # prefixed.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHexString = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return '#' + this.toHex(allow3Char);\n };\n /**\n * Returns the hex 8 value of the color.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8 = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n };\n /**\n * Returns the hex 8 value of the color -with a # prefixed.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8String = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return '#' + this.toHex8(allow4Char);\n };\n /**\n * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.\n * @param allowShortChar will shorten hex value to 3 or 4 char if possible\n */\n TinyColor.prototype.toHexShortString = function (allowShortChar) {\n if (allowShortChar === void 0) { allowShortChar = false; }\n return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toRgb = function () {\n return {\n r: Math.round(this.r),\n g: Math.round(this.g),\n b: Math.round(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA values interpolated into a string with the following format:\n * \"RGBA(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toRgbString = function () {\n var r = Math.round(this.r);\n var g = Math.round(this.g);\n var b = Math.round(this.b);\n return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toPercentageRgb = function () {\n var fmt = function (x) { return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\"); };\n return {\n r: fmt(this.r),\n g: fmt(this.g),\n b: fmt(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA relative values interpolated into a string\n */\n TinyColor.prototype.toPercentageRgbString = function () {\n var rnd = function (x) { return Math.round(bound01(x, 255) * 100); };\n return this.a === 1\n ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\")\n : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n };\n /**\n * The 'real' name of the color -if there is one.\n */\n TinyColor.prototype.toName = function () {\n if (this.a === 0) {\n return 'transparent';\n }\n if (this.a < 1) {\n return false;\n }\n var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n if (hex === value) {\n return key;\n }\n }\n return false;\n };\n TinyColor.prototype.toString = function (format) {\n var formatSet = Boolean(format);\n format = format !== null && format !== void 0 ? format : this.format;\n var formattedString = false;\n var hasAlpha = this.a < 1 && this.a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this.a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n };\n TinyColor.prototype.toNumber = function () {\n return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n };\n TinyColor.prototype.clone = function () {\n return new TinyColor(this.toString());\n };\n /**\n * Lighten the color a given amount. Providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.lighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Brighten the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.brighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var rgb = this.toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return new TinyColor(rgb);\n };\n /**\n * Darken the color a given amount, from 0 to 100.\n * Providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.darken = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.tint = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('white', amount);\n };\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.shade = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('black', amount);\n };\n /**\n * Desaturate the color a given amount, from 0 to 100.\n * Providing 100 will is the same as calling greyscale\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.desaturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Saturate the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.saturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Completely desaturates a color into greyscale.\n * Same as calling `desaturate(100)`\n */\n TinyColor.prototype.greyscale = function () {\n return this.desaturate(100);\n };\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n TinyColor.prototype.spin = function (amount) {\n var hsl = this.toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n };\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n TinyColor.prototype.mix = function (color, amount) {\n if (amount === void 0) { amount = 50; }\n var rgb1 = this.toRgb();\n var rgb2 = new TinyColor(color).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a,\n };\n return new TinyColor(rgba);\n };\n TinyColor.prototype.analogous = function (results, slices) {\n if (results === void 0) { results = 6; }\n if (slices === void 0) { slices = 30; }\n var hsl = this.toHsl();\n var part = 360 / slices;\n var ret = [this];\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(new TinyColor(hsl));\n }\n return ret;\n };\n /**\n * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n */\n TinyColor.prototype.complement = function () {\n var hsl = this.toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return new TinyColor(hsl);\n };\n TinyColor.prototype.monochromatic = function (results) {\n if (results === void 0) { results = 6; }\n var hsv = this.toHsv();\n var h = hsv.h;\n var s = hsv.s;\n var v = hsv.v;\n var res = [];\n var modification = 1 / results;\n while (results--) {\n res.push(new TinyColor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n return res;\n };\n TinyColor.prototype.splitcomplement = function () {\n var hsl = this.toHsl();\n var h = hsl.h;\n return [\n this,\n new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n };\n /**\n * Compute how the color would appear on a background\n */\n TinyColor.prototype.onBackground = function (background) {\n var fg = this.toRgb();\n var bg = new TinyColor(background).toRgb();\n var alpha = fg.a + bg.a * (1 - fg.a);\n return new TinyColor({\n r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,\n g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,\n b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,\n a: alpha,\n });\n };\n /**\n * Alias for `polyad(3)`\n */\n TinyColor.prototype.triad = function () {\n return this.polyad(3);\n };\n /**\n * Alias for `polyad(4)`\n */\n TinyColor.prototype.tetrad = function () {\n return this.polyad(4);\n };\n /**\n * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n */\n TinyColor.prototype.polyad = function (n) {\n var hsl = this.toHsl();\n var h = hsl.h;\n var result = [this];\n var increment = 360 / n;\n for (var i = 1; i < n; i++) {\n result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n }\n return result;\n };\n /**\n * compare color vs current color\n */\n TinyColor.prototype.equals = function (color) {\n return this.toRgbString() === new TinyColor(color).toRgbString();\n };\n return TinyColor;\n}());\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n return new TinyColor(color, opts);\n}\n","import { TinyColor } from '@ctrl/tinycolor';\n\nfunction tinycolor(...args) {\n return new TinyColor(...args);\n}\n\nfunction _colorChange(data, oldHue) {\n const alpha = data && data.a;\n let color;\n\n // hsl is better than hex between conversions\n if (data && data.hsl)\n color = tinycolor(data.hsl);\n else if (data && data.hex && data.hex.length > 0)\n color = tinycolor(data.hex);\n else if (data && data.hsv)\n color = tinycolor(data.hsv);\n else if (data && data.rgba)\n color = tinycolor(data.rgba);\n else if (data && data.rgb)\n color = tinycolor(data.rgb);\n else\n color = tinycolor(data);\n\n if (color && (color._a === undefined || color._a === null))\n color.setAlpha(alpha || color.getAlpha());\n\n const hsl = color.toHsl();\n const hsv = color.toHsv();\n\n if (hsl.s === 0)\n hsv.h = hsl.h = data.h || (data.hsl && data.hsl.h) || oldHue || 0;\n\n /* --- comment this block to fix #109, may cause #25 again --- */\n // when the hsv.v is less than 0.0164 (base on test)\n // because of possible loss of precision\n // the result of hue and saturation would be miscalculated\n if (hsv.v < 0.0164) {\n hsv.h = data.h || (data.hsv && data.hsv.h) || 0;\n hsv.s = data.s || (data.hsv && data.hsv.s) || 0;\n }\n\n if (hsl.l < 0.01) {\n hsl.h = data.h || (data.hsl && data.hsl.h) || 0;\n hsl.s = data.s || (data.hsl && data.hsl.s) || 0;\n }\n /* ------ */\n\n return {\n hsl,\n hex: color.toHexString().toUpperCase(),\n hex8: color.toHex8String().toUpperCase(),\n rgba: color.toRgb(),\n hsv,\n oldHue: data.h || oldHue || hsl.h,\n source: data.source,\n a: color.getAlpha(),\n };\n}\n\nvar colorMixin = {\n model: {\n prop: 'modelValue',\n event: 'update:modelValue',\n },\n props: ['modelValue'],\n data() {\n return {\n val: _colorChange(this.modelValue),\n };\n },\n computed: {\n colors: {\n get() {\n return this.val;\n },\n set(newVal) {\n this.val = newVal;\n this.$emit('update:modelValue', newVal);\n },\n },\n },\n watch: {\n modelValue(newVal) {\n this.val = _colorChange(newVal);\n },\n },\n methods: {\n colorChange(data, oldHue) {\n this.oldHue = this.colors.hsl.h;\n this.colors = _colorChange(data, oldHue || this.oldHue);\n },\n isValidHex(hex) {\n return tinycolor(hex).isValid;\n },\n simpleCheckForValidColor(data) {\n const keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];\n let checked = 0;\n let passed = 0;\n\n for (let i = 0; i < keysToCheck.length; i++) {\n const letter = keysToCheck[i];\n if (data[letter]) {\n checked++;\n if (!isNaN(data[letter]))\n passed++;\n }\n }\n\n if (checked === passed)\n return data;\n },\n paletteUpperCase(palette) {\n return palette.map(c => c.toUpperCase());\n },\n isTransparent(color) {\n return tinycolor(color).getAlpha() === 0;\n },\n },\n};\n\nexport { colorMixin as default };\n","import { openBlock, createElementBlock, withDirectives, createElementVNode, vModelText, toDisplayString } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'EditableInput',\n props: {\n label: String,\n labelText: String,\n desc: String,\n value: [String, Number],\n max: Number,\n min: Number,\n arrowOffset: {\n type: Number,\n default: 1,\n },\n },\n computed: {\n val: {\n get() {\n return this.value;\n },\n set(v) {\n // TODO: min\n if (!(this.max === undefined) && +v > this.max)\n this.$refs.input.value = this.max;\n else\n return v;\n },\n },\n labelId() {\n return `input__label__${this.label}__${Math.random().toString().slice(2, 5)}`;\n },\n labelSpanText() {\n return this.labelText || this.label;\n },\n },\n methods: {\n update(e) {\n this.handleChange(e.target.value);\n },\n handleChange(newVal) {\n const data = {};\n data[this.label] = newVal;\n if (data.hex === undefined && data['#'] === undefined)\n this.$emit('change', data);\n else if (newVal.length > 5)\n this.$emit('change', data);\n },\n // **** unused\n // handleBlur (e) {\n // console.log(e)\n // },\n handleKeyDown(e) {\n let { val } = this;\n const number = Number(val);\n\n if (number) {\n const amount = this.arrowOffset || 1;\n\n // Up\n if (e.keyCode === 38) {\n val = number + amount;\n this.handleChange(val);\n e.preventDefault();\n }\n\n // Down\n if (e.keyCode === 40) {\n val = number - amount;\n this.handleChange(val);\n e.preventDefault();\n }\n }\n },\n // **** unused\n // handleDrag (e) {\n // console.log(e)\n // },\n // handleMouseDown (e) {\n // console.log(e)\n // }\n },\n};\n\nconst _hoisted_1 = { class: \"vc-editable-input\" };\nconst _hoisted_2 = [\"aria-labelledby\"];\nconst _hoisted_3 = [\"id\", \"for\"];\nconst _hoisted_4 = { class: \"vc-input__desc\" };\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", _hoisted_1, [\n withDirectives(createElementVNode(\"input\", {\n ref: \"input\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($options.val) = $event)),\n \"aria-labelledby\": $options.labelId,\n class: \"vc-input__input\",\n onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.handleKeyDown && $options.handleKeyDown(...args))),\n onInput: _cache[2] || (_cache[2] = (...args) => ($options.update && $options.update(...args)))\n }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_2), [\n [vModelText, $options.val]\n ]),\n createElementVNode(\"span\", {\n id: $options.labelId,\n for: $props.label,\n class: \"vc-input__label\"\n }, toDisplayString($options.labelSpanText), 9 /* TEXT, PROPS */, _hoisted_3),\n createElementVNode(\"span\", _hoisted_4, toDisplayString($props.desc), 1 /* TEXT */)\n ]))\n}\n\nvar css_248z = \".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/editable-input/editable-input.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","function clamp(value, min, max) {\n return min < max\n ? (value < min ? min : value > max ? max : value)\n : (value < max ? max : value > min ? min : value);\n}\n\nexport { clamp };\n","import { clamp } from '../../utils/utils.js';\nimport { openBlock, createElementBlock, normalizeStyle, createElementVNode } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Saturation',\n props: {\n value: Object,\n },\n computed: {\n colors() {\n return this.value;\n },\n bgColor() {\n return `hsl(${this.colors.hsv.h}, 100%, 50%)`;\n },\n pointerTop() {\n return `${(-(this.colors.hsv.v * 100) + 1) + 100}%`;\n },\n pointerLeft() {\n return `${this.colors.hsv.s * 100}%`;\n },\n },\n methods: {\n handleChange(e, skip) {\n !skip && e.preventDefault();\n const { container } = this.$refs;\n if (!container) {\n // for some edge cases, container may not exist. see #220\n return;\n }\n const containerWidth = container.clientWidth;\n const containerHeight = container.clientHeight;\n\n const xOffset = container.getBoundingClientRect().left + window.pageXOffset;\n const yOffset = container.getBoundingClientRect().top + window.pageYOffset;\n const pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);\n const pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);\n const left = clamp(pageX - xOffset, 0, containerWidth);\n const top = clamp(pageY - yOffset, 0, containerHeight);\n const saturation = left / containerWidth;\n const bright = clamp(-(top / containerHeight) + 1, 0, 1);\n\n this.onChange({\n h: this.colors.hsv.h,\n s: saturation,\n v: bright,\n a: this.colors.hsv.a,\n source: 'hsva',\n });\n },\n onChange(param) {\n this.$emit('change', param);\n },\n handleMouseDown(e) {\n // this.handleChange(e, true)\n window.addEventListener('mousemove', this.handleChange);\n window.addEventListener('mouseup', this.handleChange);\n window.addEventListener('mouseup', this.handleMouseUp);\n },\n handleMouseUp(e) {\n this.unbindEventListeners();\n },\n unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n },\n },\n};\n\nconst _hoisted_1 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-saturation--white\" }, null, -1 /* HOISTED */);\nconst _hoisted_2 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-saturation--black\" }, null, -1 /* HOISTED */);\nconst _hoisted_3 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-saturation-circle\" }, null, -1 /* HOISTED */);\nconst _hoisted_4 = [\n _hoisted_3\n];\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", {\n ref: \"container\",\n class: \"vc-saturation\",\n style: normalizeStyle({ background: $options.bgColor }),\n onMousedown: _cache[0] || (_cache[0] = (...args) => ($options.handleMouseDown && $options.handleMouseDown(...args))),\n onTouchmove: _cache[1] || (_cache[1] = (...args) => ($options.handleChange && $options.handleChange(...args))),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => ($options.handleChange && $options.handleChange(...args)))\n }, [\n _hoisted_1,\n _hoisted_2,\n createElementVNode(\"div\", {\n class: \"vc-saturation-pointer\",\n style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft })\n }, _hoisted_4, 4 /* STYLE */)\n ], 36 /* STYLE, HYDRATE_EVENTS */))\n}\n\nvar css_248z = \".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/saturation/saturation.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import { openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Hue',\n props: {\n value: Object,\n direction: {\n type: String,\n // [horizontal | vertical]\n default: 'horizontal',\n },\n },\n data() {\n return {\n oldHue: 0,\n pullDirection: '',\n };\n },\n computed: {\n colors() {\n return this.value;\n },\n directionClass() {\n return {\n 'vc-hue--horizontal': this.direction === 'horizontal',\n 'vc-hue--vertical': this.direction === 'vertical',\n };\n },\n pointerTop() {\n if (this.direction === 'vertical') {\n if (this.colors.hsl.h === 0 && this.pullDirection === 'right')\n return 0;\n return `${-((this.colors.hsl.h * 100) / 360) + 100}%`;\n }\n return 0;\n },\n pointerLeft() {\n if (this.direction === 'vertical')\n return 0;\n\n if (this.colors.hsl.h === 0 && this.pullDirection === 'right')\n return '100%';\n return `${(this.colors.hsl.h * 100) / 360}%`;\n },\n },\n watch: {\n value: {\n handler(value, oldVal) {\n const { h } = value.hsl;\n if (h !== 0 && h - this.oldHue > 0)\n this.pullDirection = 'right';\n if (h !== 0 && h - this.oldHue < 0)\n this.pullDirection = 'left';\n this.oldHue = h;\n },\n deep: true,\n immediate: true,\n },\n },\n methods: {\n handleChange(e, skip) {\n !skip && e.preventDefault();\n\n const { container } = this.$refs;\n if (!container) {\n // for some edge cases, container may not exist. see #220\n return;\n }\n const containerWidth = container.clientWidth;\n const containerHeight = container.clientHeight;\n\n const xOffset = container.getBoundingClientRect().left + window.pageXOffset;\n const yOffset = container.getBoundingClientRect().top + window.pageYOffset;\n const pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);\n const pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);\n const left = pageX - xOffset;\n const top = pageY - yOffset;\n\n let h;\n let percent;\n\n if (this.direction === 'vertical') {\n if (top < 0) {\n h = 360;\n }\n else if (top > containerHeight) {\n h = 0;\n }\n else {\n percent = -(top * 100 / containerHeight) + 100;\n h = (360 * percent / 100);\n }\n\n if (this.colors.hsl.h !== h) {\n this.$emit('change', {\n h,\n s: this.colors.hsl.s,\n l: this.colors.hsl.l,\n a: this.colors.hsl.a,\n source: 'hsl',\n });\n }\n }\n else {\n if (left < 0) {\n h = 0;\n }\n else if (left > containerWidth) {\n h = 360;\n }\n else {\n percent = left * 100 / containerWidth;\n h = (360 * percent / 100);\n }\n\n if (this.colors.hsl.h !== h) {\n this.$emit('change', {\n h,\n s: this.colors.hsl.s,\n l: this.colors.hsl.l,\n a: this.colors.hsl.a,\n source: 'hsl',\n });\n }\n }\n },\n handleMouseDown(e) {\n this.handleChange(e, true);\n window.addEventListener('mousemove', this.handleChange);\n window.addEventListener('mouseup', this.handleChange);\n window.addEventListener('mouseup', this.handleMouseUp);\n },\n handleMouseUp(e) {\n this.unbindEventListeners();\n },\n unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n },\n },\n};\n\nconst _hoisted_1 = [\"aria-valuenow\"];\nconst _hoisted_2 = /*#__PURE__*/createElementVNode(\"div\", { class: \"vc-hue-picker\" }, null, -1 /* HOISTED */);\nconst _hoisted_3 = [\n _hoisted_2\n];\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([\"vc-hue\", [$options.directionClass]])\n }, [\n createElementVNode(\"div\", {\n ref: \"container\",\n class: \"vc-hue-container\",\n role: \"slider\",\n \"aria-valuenow\": $options.colors.hsl.h,\n \"aria-valuemin\": \"0\",\n \"aria-valuemax\": \"360\",\n onMousedown: _cache[0] || (_cache[0] = (...args) => ($options.handleMouseDown && $options.handleMouseDown(...args))),\n onTouchmove: _cache[1] || (_cache[1] = (...args) => ($options.handleChange && $options.handleChange(...args))),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => ($options.handleChange && $options.handleChange(...args)))\n }, [\n createElementVNode(\"div\", {\n class: \"vc-hue-pointer\",\n style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft }),\n role: \"presentation\"\n }, _hoisted_3, 4 /* STYLE */)\n ], 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1)\n ], 2 /* CLASS */))\n}\n\nvar css_248z = \".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/hue/hue.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import colorMixin from '../../mixin/color.js';\nimport script$4 from '../editable-input/index.js';\nimport script$1 from '../saturation/index.js';\nimport script$2 from '../hue/index.js';\nimport script$3 from '../alpha/index.js';\nimport script$5 from '../checkboard/index.js';\nimport { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, normalizeStyle, createBlock, createCommentVNode, withDirectives, vShow } from 'vue';\nimport { s as styleInject } from '../../style-inject.es-746bb8ed.js';\nimport { install } from '../../utils/compoent.js';\nimport '@ctrl/tinycolor';\nimport '../../utils/utils.js';\nimport '../../defaultConfig.js';\n\nvar script = {\n name: 'Chrome',\n components: {\n Saturation: script$1,\n Hue: script$2,\n Alpha: script$3,\n EdIn: script$4,\n Checkboard: script$5,\n },\n mixins: [colorMixin],\n props: {\n disableAlpha: {\n type: Boolean,\n default: false,\n },\n disableFields: {\n type: Boolean,\n default: false,\n },\n format: {\n type: String,\n default: 'hex',\n },\n },\n data() {\n return {\n fieldsIndex: 'hex',\n highlight: false,\n };\n },\n computed: {\n hsl() {\n const { h, s, l } = this.colors.hsl;\n return {\n h: h.toFixed(),\n s: `${(s * 100).toFixed()}%`,\n l: `${(l * 100).toFixed()}%`,\n };\n },\n activeColor() {\n const { rgba } = this.colors;\n return `rgba(${[rgba.r, rgba.g, rgba.b, rgba.a].join(',')})`;\n },\n hasAlpha() {\n return this.colors.a < 1;\n },\n },\n watch: {\n format: {\n handler(val) {\n this.fieldsIndex = val;\n },\n immediate: true,\n },\n },\n methods: {\n childChange(data) {\n this.colorChange(data);\n },\n inputChange(data) {\n if (!data)\n return;\n\n if (data.hex) {\n this.isValidHex(data.hex) && this.colorChange({\n hex: data.hex,\n source: 'hex',\n });\n }\n else if (data.r || data.g || data.b || data.a) {\n this.colorChange({\n r: data.r || this.colors.rgba.r,\n g: data.g || this.colors.rgba.g,\n b: data.b || this.colors.rgba.b,\n a: data.a || this.colors.rgba.a,\n source: 'rgba',\n });\n }\n else if (data.h || data.s || data.l) {\n const s = data.s ? (data.s.replace('%', '') / 100) : this.colors.hsl.s;\n const l = data.l ? (data.l.replace('%', '') / 100) : this.colors.hsl.l;\n\n this.colorChange({\n h: data.h || this.colors.hsl.h,\n s,\n l,\n source: 'hsl',\n });\n }\n },\n toggleViews() {\n switch (this.fieldsIndex) {\n case 'hex':\n this.fieldsIndex = `rgb${this.disableAlpha ? '' : 'a'}`;\n break;\n case 'rgb':\n case 'rgba':\n this.fieldsIndex = `hsl${this.disableAlpha ? '' : 'a'}`;\n break;\n default:\n this.fieldsIndex = 'hex';\n break;\n }\n this.$emit('update:format', this.fieldsIndex);\n },\n showHighlight() {\n this.highlight = true;\n },\n hideHighlight() {\n this.highlight = false;\n },\n },\n};\n\nconst _hoisted_1 = { class: \"vc-chrome-saturation-wrap\" };\nconst _hoisted_2 = { class: \"vc-chrome-body\" };\nconst _hoisted_3 = { class: \"vc-chrome-controls\" };\nconst _hoisted_4 = { class: \"vc-chrome-color-wrap\" };\nconst _hoisted_5 = [\"aria-label\"];\nconst _hoisted_6 = { class: \"vc-chrome-sliders\" };\nconst _hoisted_7 = { class: \"vc-chrome-hue-wrap\" };\nconst _hoisted_8 = {\n key: 0,\n class: \"vc-chrome-alpha-wrap\"\n};\nconst _hoisted_9 = {\n key: 0,\n class: \"vc-chrome-fields-wrap\"\n};\nconst _hoisted_10 = { class: \"vc-chrome-fields\" };\nconst _hoisted_11 = { class: \"vc-chrome-field\" };\nconst _hoisted_12 = { class: \"vc-chrome-fields\" };\nconst _hoisted_13 = { class: \"vc-chrome-field\" };\nconst _hoisted_14 = { class: \"vc-chrome-field\" };\nconst _hoisted_15 = { class: \"vc-chrome-field\" };\nconst _hoisted_16 = {\n key: 0,\n class: \"vc-chrome-field\"\n};\nconst _hoisted_17 = { class: \"vc-chrome-fields\" };\nconst _hoisted_18 = { class: \"vc-chrome-field\" };\nconst _hoisted_19 = { class: \"vc-chrome-field\" };\nconst _hoisted_20 = { class: \"vc-chrome-field\" };\nconst _hoisted_21 = {\n key: 0,\n class: \"vc-chrome-field\"\n};\nconst _hoisted_22 = { class: \"vc-chrome-toggle-icon\" };\nconst _hoisted_23 = /*#__PURE__*/createElementVNode(\"path\", {\n fill: \"#333\",\n d: \"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z\"\n}, null, -1 /* HOISTED */);\nconst _hoisted_24 = [\n _hoisted_23\n];\nconst _hoisted_25 = { class: \"vc-chrome-toggle-icon-highlight\" };\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_Saturation = resolveComponent(\"Saturation\");\n const _component_Checkboard = resolveComponent(\"Checkboard\");\n const _component_Hue = resolveComponent(\"Hue\");\n const _component_Alpha = resolveComponent(\"Alpha\");\n const _component_EdIn = resolveComponent(\"EdIn\");\n\n return (openBlock(), createElementBlock(\"div\", {\n role: \"application\",\n \"aria-label\": \"Chrome color picker\",\n class: normalizeClass([\"vc-chrome\", [$props.disableAlpha ? 'vc-chrome__disable-alpha' : '']])\n }, [\n createElementVNode(\"div\", _hoisted_1, [\n createVNode(_component_Saturation, {\n value: _ctx.colors,\n onChange: $options.childChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_2, [\n createElementVNode(\"div\", _hoisted_3, [\n createElementVNode(\"div\", _hoisted_4, [\n createElementVNode(\"div\", {\n \"aria-label\": `current color is ${_ctx.colors.hex}`,\n class: \"vc-chrome-active-color\",\n style: normalizeStyle({ background: $options.activeColor })\n }, null, 12 /* STYLE, PROPS */, _hoisted_5),\n (!$props.disableAlpha)\n ? (openBlock(), createBlock(_component_Checkboard, { key: 0 }))\n : createCommentVNode(\"v-if\", true)\n ]),\n createElementVNode(\"div\", _hoisted_6, [\n createElementVNode(\"div\", _hoisted_7, [\n createVNode(_component_Hue, {\n value: _ctx.colors,\n onChange: $options.childChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n (!$props.disableAlpha)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_8, [\n createVNode(_component_Alpha, {\n value: _ctx.colors,\n onChange: $options.childChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]))\n : createCommentVNode(\"v-if\", true)\n ])\n ]),\n (!$props.disableFields)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_9, [\n withDirectives(createElementVNode(\"div\", _hoisted_10, [\n createCommentVNode(\" hex \"),\n createElementVNode(\"div\", _hoisted_11, [\n (!$options.hasAlpha)\n ? (openBlock(), createBlock(_component_EdIn, {\n key: 0,\n label: \"hex\",\n value: _ctx.colors.hex,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"]))\n : createCommentVNode(\"v-if\", true),\n ($options.hasAlpha)\n ? (openBlock(), createBlock(_component_EdIn, {\n key: 1,\n label: \"hex\",\n value: _ctx.colors.hex8,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"]))\n : createCommentVNode(\"v-if\", true)\n ])\n ], 512 /* NEED_PATCH */), [\n [vShow, $data.fieldsIndex === 'hex']\n ]),\n withDirectives(createElementVNode(\"div\", _hoisted_12, [\n createCommentVNode(\" rgba \"),\n createElementVNode(\"div\", _hoisted_13, [\n createVNode(_component_EdIn, {\n label: \"r\",\n value: _ctx.colors.rgba.r,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_14, [\n createVNode(_component_EdIn, {\n label: \"g\",\n value: _ctx.colors.rgba.g,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_15, [\n createVNode(_component_EdIn, {\n label: \"b\",\n value: _ctx.colors.rgba.b,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n (!$props.disableAlpha)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_16, [\n createVNode(_component_EdIn, {\n label: \"a\",\n value: _ctx.colors.a,\n \"arrow-offset\": 0.01,\n max: 1,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"arrow-offset\", \"onChange\"])\n ]))\n : createCommentVNode(\"v-if\", true)\n ], 512 /* NEED_PATCH */), [\n [vShow, ['rgb', 'rgba'].includes($data.fieldsIndex)]\n ]),\n withDirectives(createElementVNode(\"div\", _hoisted_17, [\n createCommentVNode(\" hsla \"),\n createElementVNode(\"div\", _hoisted_18, [\n createVNode(_component_EdIn, {\n label: \"h\",\n value: $options.hsl.h,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_19, [\n createVNode(_component_EdIn, {\n label: \"s\",\n value: $options.hsl.s,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n createElementVNode(\"div\", _hoisted_20, [\n createVNode(_component_EdIn, {\n label: \"l\",\n value: $options.hsl.l,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"onChange\"])\n ]),\n (!$props.disableAlpha)\n ? (openBlock(), createElementBlock(\"div\", _hoisted_21, [\n createVNode(_component_EdIn, {\n label: \"a\",\n value: _ctx.colors.a,\n \"arrow-offset\": 0.01,\n max: 1,\n onChange: $options.inputChange\n }, null, 8 /* PROPS */, [\"value\", \"arrow-offset\", \"onChange\"])\n ]))\n : createCommentVNode(\"v-if\", true)\n ], 512 /* NEED_PATCH */), [\n [vShow, ['hsl', 'hsla'].includes($data.fieldsIndex)]\n ]),\n createCommentVNode(\" btn \"),\n createElementVNode(\"div\", {\n class: \"vc-chrome-toggle-btn\",\n role: \"button\",\n \"aria-label\": \"Change another color definition\",\n onClick: _cache[3] || (_cache[3] = (...args) => ($options.toggleViews && $options.toggleViews(...args)))\n }, [\n createElementVNode(\"div\", _hoisted_22, [\n (openBlock(), createElementBlock(\"svg\", {\n style: {\"width\":\"24px\",\"height\":\"24px\"},\n viewBox: \"0 0 24 24\",\n onMouseover: _cache[0] || (_cache[0] = (...args) => ($options.showHighlight && $options.showHighlight(...args))),\n onMouseenter: _cache[1] || (_cache[1] = (...args) => ($options.showHighlight && $options.showHighlight(...args))),\n onMouseout: _cache[2] || (_cache[2] = (...args) => ($options.hideHighlight && $options.hideHighlight(...args)))\n }, _hoisted_24, 32 /* HYDRATE_EVENTS */))\n ]),\n withDirectives(createElementVNode(\"div\", _hoisted_25, null, 512 /* NEED_PATCH */), [\n [vShow, $data.highlight]\n ])\n ]),\n createCommentVNode(\" btn \")\n ]))\n : createCommentVNode(\"v-if\", true)\n ])\n ], 2 /* CLASS */))\n}\n\nvar css_248z = \".vc-chrome{background:#fff;background-color:#fff;border-radius:2px;box-shadow:0 0 2px rgba(0,0,0,.3),0 4px 8px rgba(0,0,0,.3);box-sizing:initial;font-family:Menlo;width:225px}.vc-chrome-controls{display:flex}.vc-chrome-color-wrap{position:relative;width:36px}.vc-chrome-active-color{border-radius:15px;height:30px;overflow:hidden;position:relative;width:30px;z-index:1}.vc-chrome-color-wrap .vc-checkerboard{background-size:auto;border-radius:15px;height:30px;width:30px}.vc-chrome-sliders{flex:1}.vc-chrome-fields-wrap{display:flex;padding-top:16px}.vc-chrome-fields{display:flex;flex:1;margin-left:-6px}.vc-chrome-field{padding-left:6px;width:100%}.vc-chrome-toggle-btn{position:relative;text-align:right;width:32px}.vc-chrome-toggle-icon{cursor:pointer;margin-right:-4px;margin-top:12px;position:relative;z-index:2}.vc-chrome-toggle-icon-highlight{background:#eee;border-radius:4px;height:28px;left:12px;position:absolute;top:10px;width:24px}.vc-chrome-hue-wrap{margin-bottom:8px}.vc-chrome-alpha-wrap,.vc-chrome-hue-wrap{height:10px;position:relative}.vc-chrome-alpha-wrap .vc-alpha-gradient,.vc-chrome-hue-wrap .vc-hue{border-radius:2px}.vc-chrome-alpha-wrap .vc-alpha-picker,.vc-chrome-hue-wrap .vc-hue-picker{background-color:#f8f8f8;border-radius:6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:12px;transform:translate(-6px,-2px);width:12px}.vc-chrome-body{background-color:#fff;padding:16px 16px 12px}.vc-chrome-saturation-wrap{border-radius:2px 2px 0 0;overflow:hidden;padding-bottom:55%;position:relative;width:100%}.vc-chrome-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-chrome-fields .vc-input__input{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #dadada;color:#333;font-size:11px;height:21px;text-align:center;width:100%}.vc-chrome-fields .vc-input__label{color:#969696;display:block;font-size:11px;line-height:11px;margin-top:12px;text-align:center;text-transform:uppercase}.vc-chrome__disable-alpha .vc-chrome-active-color{height:18px;width:18px}.vc-chrome__disable-alpha .vc-chrome-color-wrap{width:30px}.vc-chrome__disable-alpha .vc-chrome-hue-wrap{margin-bottom:4px;margin-top:4px}\";\nstyleInject(css_248z);\n\nscript.render = render;\nscript.__file = \"src/components/chrome/chrome.vue\";\n\nscript.install = install;\n\nexport { script as default };\n","import { r as register, t as t3, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nregister(t3);\nclass Color {\n /**\n * @param r - The red value\n * @param g - The green value\n * @param b - The blue value\n * @param name - The name of the color\n */\n constructor(r, g, b, name) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.name = name;\n this.r = Math.min(r, 255);\n this.g = Math.min(g, 255);\n this.b = Math.min(b, 255);\n this.name = name;\n }\n /**\n * The hexadecimal color string.\n */\n get color() {\n const toHex = (int) => `00${int.toString(16)}`.slice(-2);\n return `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`;\n }\n}\nfunction calculateStepIncrement(steps, color1, color2) {\n return {\n r: (color2.r - color1.r) / steps,\n g: (color2.g - color1.g) / steps,\n b: (color2.b - color1.b) / steps\n };\n}\nfunction mixPalette(steps, color1, color2) {\n const palette = [];\n palette.push(color1);\n const increment = calculateStepIncrement(steps, color1, color2);\n for (let i = 1; i < steps; i++) {\n const r = Math.floor(color1.r + increment.r * i);\n const g = Math.floor(color1.g + increment.g * i);\n const b = Math.floor(color1.b + increment.b * i);\n palette.push(new Color(r, g, b));\n }\n return palette;\n}\nconst COLOR_RED = new Color(182, 70, 157, t(\"Purple\"));\nconst COLOR_YELLOW = new Color(221, 203, 85, t(\"Gold\"));\nconst COLOR_BLUE = new Color(0, 130, 201, t(\"Nextcloud blue\"));\nconst COLOR_BLACK = new Color(0, 0, 0, t(\"Black\"));\nconst COLOR_WHITE = new Color(255, 255, 255, t(\"White\"));\nconst defaultPalette = [\n COLOR_RED,\n new Color(\n ...[191, 103, 139],\n t(\"Rosy brown\")\n // TRANSLATORS: A color name for RGB(191, 103, 139)\n ),\n new Color(\n ...[201, 136, 121],\n t(\"Feldspar\")\n // TRANSLATORS: A color name for RGB(201, 136, 121)\n ),\n new Color(\n ...[211, 169, 103],\n t(\"Whiskey\")\n // TRANSLATORS: A color name for RGB(211, 169, 103)\n ),\n COLOR_YELLOW,\n new Color(\n ...[165, 184, 114],\n t(\"Olivine\")\n // TRANSLATORS: A color name for RGB(165, 184, 114)\n ),\n new Color(\n ...[110, 166, 143],\n t(\"Acapulco\")\n // TRANSLATORS: A color name for RGB(110, 166, 143)\n ),\n new Color(\n ...[55, 148, 172],\n t(\"Boston Blue\")\n // TRANSLATORS: A color name for RGB(55, 148, 172)\n ),\n COLOR_BLUE,\n new Color(\n ...[45, 115, 190],\n t(\"Mariner\")\n // TRANSLATORS: A color name for RGB(45, 115, 190)\n ),\n new Color(\n ...[91, 100, 179],\n t(\"Blue Violet\")\n // TRANSLATORS: A color name for RGB(91, 100, 179)\n ),\n new Color(\n ...[136, 85, 168],\n t(\"Deluge\")\n // TRANSLATORS: A color name for RGB(136, 85, 168)\n )\n];\nfunction generatePalette(steps) {\n const palette1 = mixPalette(steps, COLOR_RED, COLOR_YELLOW);\n const palette2 = mixPalette(steps, COLOR_YELLOW, COLOR_BLUE);\n const palette3 = mixPalette(steps, COLOR_BLUE, COLOR_RED);\n return palette1.concat(palette2).concat(palette3);\n}\nexport {\n Color as C,\n COLOR_BLACK as a,\n COLOR_WHITE as b,\n defaultPalette as d,\n generatePalette as g\n};\n//# sourceMappingURL=colors-BHGKZFDI.mjs.map\n","import '../assets/NcColorPicker-CCanY5eB.css';\nimport { defineComponent, mergeModels, useModel, ref, computed, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createVNode, createElementBlock, createCommentVNode, Transition, Fragment, renderList, normalizeStyle, createTextVNode, toDisplayString, renderSlot, normalizeProps, guardReactiveProps } from \"vue\";\nimport { Chrome } from \"@ckpack/vue-color\";\nimport { d as mdiCheck, u as mdiCloseCircleOutline, v as mdiArrowLeft, w as mdiDotsHorizontal } from \"./mdi-CpchYUUV.mjs\";\nimport { r as register, w as t1, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nimport { d as defaultPalette, a as COLOR_BLACK, b as COLOR_WHITE } from \"./colors-BHGKZFDI.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { l as logger } from \"./logger-D3RVzcfQ.mjs\";\nimport { N as NcButton } from \"./NcButton-C9D47Igd.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-BvLanNaW.mjs\";\nimport { N as NcPopover } from \"./NcPopover-OqcYrWOx.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nregister(t1);\nconst _hoisted_1 = [\"aria-label\"];\nconst _hoisted_2 = {\n key: 0,\n class: \"color-picker__simple\"\n};\nconst _hoisted_3 = [\"aria-label\", \"name\", \"checked\", \"onClick\"];\nconst _hoisted_4 = [\"title\"];\nconst _hoisted_5 = [\"aria-label\", \"name\", \"checked\"];\nconst _hoisted_6 = {\n key: 0,\n class: \"color-picker__navigation\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcColorPicker\",\n props: /* @__PURE__ */ mergeModels({\n advancedFields: { type: Boolean },\n clearable: { type: Boolean },\n container: { default: \"body\" },\n palette: { default: () => [] },\n paletteOnly: { type: Boolean }\n }, {\n \"modelValue\": { required: true },\n \"modelModifiers\": {},\n \"open\": { type: Boolean },\n \"openModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"submit\", \"closed\"], [\"update:modelValue\", \"update:open\"]),\n setup(__props, { emit: __emit }) {\n const currentColor = useModel(__props, \"modelValue\");\n const open = useModel(__props, \"open\");\n const props = __props;\n const emit = __emit;\n const HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i;\n const id = createElementId();\n const advanced = ref(false);\n const normalizedPalette = computed(() => {\n let palette = props.palette;\n for (const color of palette) {\n if (typeof color === \"string\" && !color.match(HEX_REGEX) || typeof color === \"object\" && !color.color?.match(HEX_REGEX)) {\n logger.error(\"[NcColorPicker] Invalid palette passed\", { color });\n palette = [];\n break;\n }\n }\n if (palette.length === 0) {\n palette = props.clearable ? [...defaultPalette, COLOR_BLACK, COLOR_WHITE] : [...defaultPalette];\n }\n return palette.map((item) => ({\n color: typeof item === \"object\" ? item.color : item,\n name: typeof item === \"object\" && item.name ? item.name : t(\"A color with a HEX value {hex}\", { hex: typeof item === \"string\" ? item : item.color })\n }));\n });\n function handleConfirm(hideCallback) {\n emit(\"submit\", currentColor.value);\n hideCallback();\n advanced.value = false;\n }\n function toggleColor(color) {\n color = typeof color === \"string\" ? color : color.color;\n if (props.clearable && currentColor.value === color) {\n currentColor.value = void 0;\n } else {\n currentColor.value = color;\n }\n }\n function pickCustomColor(color) {\n currentColor.value = color.hex;\n }\n function getContrastColor(color) {\n return calculateLuma(color) > 0.5 ? COLOR_BLACK.color : COLOR_WHITE.color;\n }\n function calculateLuma(color) {\n const [red, green, blue] = hexToRGB(color);\n return (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255;\n }\n function hexToRGB(hex) {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n if (!result) {\n return [0, 0, 0];\n }\n return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)];\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcPopover), {\n shown: open.value,\n \"onUpdate:shown\": _cache[3] || (_cache[3] = ($event) => open.value = $event),\n container: _ctx.container,\n popupRole: \"dialog\",\n onApplyHide: _cache[4] || (_cache[4] = ($event) => emit(\"closed\"))\n }, {\n trigger: withCtx((slotProps) => [\n renderSlot(_ctx.$slots, \"default\", normalizeProps(guardReactiveProps(slotProps)), void 0, true)\n ]),\n default: withCtx((slotProps) => [\n createElementVNode(\"div\", {\n role: \"dialog\",\n class: normalizeClass([\"color-picker\", {\n \"color-picker--advanced-fields\": advanced.value && _ctx.advancedFields,\n \"color-picker--clearable\": _ctx.clearable\n }]),\n \"aria-modal\": \"true\",\n \"aria-label\": unref(t)(\"Color picker\")\n }, [\n createVNode(Transition, {\n name: \"slide\",\n mode: \"out-in\"\n }, {\n default: withCtx(() => [\n !advanced.value ? (openBlock(), createElementBlock(\"div\", _hoisted_2, [\n (openBlock(true), createElementBlock(Fragment, null, renderList(normalizedPalette.value, ({ color, name }, index) => {\n return openBlock(), createElementBlock(\"label\", {\n key: index,\n class: normalizeClass([\"color-picker__simple-color-circle\", { \"color-picker__simple-color-circle--active\": color === currentColor.value }]),\n style: normalizeStyle({\n backgroundColor: color,\n color: getContrastColor(color)\n })\n }, [\n color === currentColor.value ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {\n key: 0,\n path: unref(mdiCheck)\n }, null, 8, [\"path\"])) : createCommentVNode(\"\", true),\n createElementVNode(\"input\", {\n type: \"radio\",\n class: \"hidden-visually\",\n \"aria-label\": name,\n name: `color-picker-${unref(id)}`,\n checked: color === currentColor.value,\n onClick: ($event) => toggleColor(color)\n }, null, 8, _hoisted_3)\n ], 6);\n }), 128)),\n _ctx.clearable ? (openBlock(), createElementBlock(\"label\", {\n key: 0,\n class: \"color-picker__clear\",\n title: unref(t)(\"No color\")\n }, [\n createVNode(unref(NcIconSvgWrapper), {\n size: currentColor.value ? 28 : 34,\n path: unref(mdiCloseCircleOutline)\n }, null, 8, [\"size\", \"path\"]),\n createElementVNode(\"input\", {\n type: \"radio\",\n class: \"hidden-visually\",\n \"aria-label\": unref(t)(\"No color\"),\n name: `color-picker-${unref(id)}`,\n checked: !currentColor.value,\n onClick: _cache[0] || (_cache[0] = ($event) => currentColor.value = void 0)\n }, null, 8, _hoisted_5)\n ], 8, _hoisted_4)) : createCommentVNode(\"\", true)\n ])) : (openBlock(), createBlock(unref(Chrome), {\n key: 1,\n class: \"color-picker__advanced\",\n disableAlpha: \"\",\n disableFields: !_ctx.advancedFields,\n modelValue: currentColor.value ?? \"#000000\",\n \"onUpdate:modelValue\": pickCustomColor\n }, null, 8, [\"disableFields\", \"modelValue\"]))\n ]),\n _: 1\n }),\n !_ctx.paletteOnly ? (openBlock(), createElementBlock(\"div\", _hoisted_6, [\n advanced.value ? (openBlock(), createBlock(unref(NcButton), {\n key: 0,\n \"aria-label\": unref(t)(\"Back\"),\n title: unref(t)(\"Back\"),\n variant: \"tertiary\",\n onClick: _cache[1] || (_cache[1] = ($event) => advanced.value = false)\n }, {\n icon: withCtx(() => [\n createVNode(unref(NcIconSvgWrapper), {\n directional: \"\",\n path: unref(mdiArrowLeft)\n }, null, 8, [\"path\"])\n ]),\n _: 1\n }, 8, [\"aria-label\", \"title\"])) : (openBlock(), createBlock(unref(NcButton), {\n key: 1,\n \"aria-label\": unref(t)(\"More options\"),\n title: unref(t)(\"More options\"),\n variant: \"tertiary\",\n onClick: _cache[2] || (_cache[2] = ($event) => advanced.value = true)\n }, {\n icon: withCtx(() => [\n createVNode(unref(NcIconSvgWrapper), { path: unref(mdiDotsHorizontal) }, null, 8, [\"path\"])\n ]),\n _: 1\n }, 8, [\"aria-label\", \"title\"])),\n createVNode(unref(NcButton), {\n variant: \"primary\",\n onClick: ($event) => handleConfirm(slotProps.hide)\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(unref(t)(\"Choose\")), 1)\n ]),\n _: 2\n }, 1032, [\"onClick\"])\n ])) : createCommentVNode(\"\", true)\n ], 10, _hoisted_1)\n ]),\n _: 3\n }, 8, [\"shown\", \"container\"]);\n };\n }\n});\nconst NcColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-45e1396f\"]]);\nexport {\n NcColorPicker as N\n};\n//# sourceMappingURL=NcColorPicker-DDHxR-iN.mjs.map\n"],"names":["prefix","styleInject","css","ref","insertAt","head","style","install","app","options","componentPrefix","_checkboardCache","script","getCheckboard","renderCheckboard","c1","c2","size","canvas","ctx","key","checkboard","render","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","normalizeStyle","css_248z","script$1","rgba","rgbStr","skip","container","containerWidth","xOffset","left","a","_hoisted_1","_hoisted_2","_hoisted_3","createElementVNode","_hoisted_4","_component_Checkboard","resolveComponent","createVNode","args","bound01","n","max","isOnePointZero","isPercent","isPercentage","clamp01","val","boundAlpha","convertToPercentage","pad2","c","rgbToRgb","r","g","b","rgbToHsl","min","h","s","l","d","hue2rgb","p","q","t","hslToRgb","rgbToHsv","v","hsvToRgb","i","f","mod","rgbToHex","allow3Char","hex","rgbaToHex","allow4Char","convertDecimalToHex","convertHexToDecimal","parseIntFromHex","numberInputToObject","color","names","inputToRGB","rgb","ok","format","stringInputToObject","isValidCSSUnit","CSS_INTEGER","CSS_NUMBER","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","matchers","named","match","TinyColor","opts","_a","R","G","B","RsRGB","GsRGB","BsRGB","alpha","hsv","hsl","allowShortChar","fmt","x","rnd","_i","_b","value","formatSet","formattedString","hasAlpha","needsAlphaFormat","amount","hue","rgb1","rgb2","results","slices","part","ret","res","modification","background","fg","bg","result","increment","tinycolor","_colorChange","data","oldHue","colorMixin","newVal","keysToCheck","checked","passed","letter","palette","number","withDirectives","$event","vModelText","toDisplayString","clamp","containerHeight","yOffset","pageX","pageY","top","saturation","bright","param","oldVal","percent","normalizeClass","script$2","script$3","script$4","script$5","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_component_Saturation","_component_Hue","_component_Alpha","_component_EdIn","createCommentVNode","createBlock","vShow","register","t3","Color","name","toHex","int","COLOR_RED","COLOR_YELLOW","COLOR_BLUE","COLOR_BLACK","COLOR_WHITE","defaultPalette","t1","_sfc_main","defineComponent","mergeModels","__props","__emit","currentColor","useModel","open","props","emit","HEX_REGEX","id","createElementId","advanced","normalizedPalette","computed","logger","item","handleConfirm","hideCallback","toggleColor","pickCustomColor","getContrastColor","calculateLuma","red","green","blue","hexToRGB","unref","NcPopover","withCtx","slotProps","renderSlot","normalizeProps","guardReactiveProps","Transition","Chrome","Fragment","renderList","index","NcIconSvgWrapper","mdiCheck","mdiCloseCircleOutline","NcButton","mdiArrowLeft","mdiDotsHorizontal","createTextVNode","NcColorPicker","_export_sfc"],"mappings":"qVAEA,MAAMA,GAAS,GCFf,SAASC,EAAYC,EAAKC,EAAK,CACxBA,IAAQ,SAASA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAI,SAEnB,GAAI,EAAA,CAACD,GAAO,OAAO,SAAa,KAEhC,CAAA,IAAIG,EAAO,SAAS,MAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC,EAC/DC,EAAQ,SAAS,cAAc,OAAO,EAC1CA,EAAM,KAAO,WAETF,IAAa,OACXC,EAAK,WACPA,EAAK,aAAaC,EAAOD,EAAK,UAAU,EAK1CA,EAAK,YAAYC,CAAK,EAGpBA,EAAM,WACRA,EAAM,WAAW,QAAUJ,EAE3BI,EAAM,YAAY,SAAS,eAAeJ,CAAG,CAAC,CAAA,CAElD,CCvBA,MAAMK,EAAU,SAAUC,EAAKC,EAAS,CACtC,KAAM,CAAE,gBAAAC,EAAkBV,EAAM,EAAKS,GAAW,CAAA,EAChDD,EAAI,UAAU,GAAGE,CAAe,GAAG,KAAK,IAAI,GAAI,IAAI,CACtD,ECAMC,EAAmB,CAAA,EAEzB,IAAIC,EAAS,CACX,KAAM,aACN,MAAO,CACL,KAAM,CACJ,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,CACf,EACI,MAAO,CACL,KAAM,OACN,QAAS,MACf,EACI,KAAM,CACJ,KAAM,OACN,QAAS,SACf,CACA,EACE,SAAU,CACR,SAAU,CACR,MAAO,CACL,mBAAoB,OAAOC,GAAc,KAAK,MAAO,KAAK,KAAM,KAAK,IAAI,CAAC,GAClF,CACI,CACJ,CACA,EAUA,SAASC,GAAiBC,EAAIC,EAAIC,EAAM,CAEtC,GAAI,OAAO,SAAa,IACtB,OAAO,KAET,MAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9CA,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BxN,EAAYuM,EAAMe,CAAQ,EAAG,CAC3B,QAAS,UACT,QAAUvG,GAAW8E,EAAca,EAAU,IAAI,CACjE,EAAiB,CACD,QAASD,EAAQ,IAAM,CACrBgB,GAAgBxG,GAAgBsF,EAAM5K,CAAC,EAAE,QAAQ,CAAC,EAAG,CAAC,CACxE,CAAiB,EACD,EAAG,CACnB,EAAiB,KAAM,CAAC,SAAS,CAAC,CAClC,CAAa,EACb,EAAa,GAAIlC,EAAU,CAC3B,CAAS,EACD,EAAG,CACX,EAAS,EAAG,CAAC,QAAS,WAAW,CAAC,EAEhC,CACF,CAAC,EACKiO,GAAgCC,GAAYhD,GAAW,CAAC,CAAC,YAAa,iBAAiB,CAAC,CAAC","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]} \ No newline at end of file diff --git a/js/index-Berf7HSo.chunk.mjs b/js/index-D6u9VflH.chunk.mjs similarity index 92% rename from js/index-Berf7HSo.chunk.mjs rename to js/index-D6u9VflH.chunk.mjs index c71b56e3e..c6d3828aa 100644 --- a/js/index-Berf7HSo.chunk.mjs +++ b/js/index-D6u9VflH.chunk.mjs @@ -1,4 +1,4 @@ -import{an as V,ao as Te,ap as ze,aq as He,ar as We,as as Ke,at as Q,au as N,av as ee,aw as qe,ax as he,ay as Ue,c as f,o as u,G as b,a as x,b as q,H as w,I as v,F as me,x as ue,e as P,E as te,t as z,f as I,X as re,V as E,az as Fe,w as ae,g as be,p as F,a2 as we,d as ve,T as Je,_ as oe,k as Xe,$ as G,r as K,h as Z,l as Oe,aA as Ye,U as Qe,aB as Ze,i as Ge,aC as et}from"./logreader-main.mjs";function ne(){return typeof window<"u"}function W(e){return ke(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function T(e){var t;return(t=(ke(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ke(e){return ne()?e instanceof Node||e instanceof O(e).Node:!1}function _(e){return ne()?e instanceof Element||e instanceof O(e).Element:!1}function B(e){return ne()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function Se(e){return!ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}const tt=new Set(["inline","contents"]);function J(e){const{overflow:t,overflowX:o,overflowY:n,display:s}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!tt.has(s)}const ot=new Set(["table","td","th"]);function nt(e){return ot.has(W(e))}const it=[":popover-open",":modal"];function ie(e){return it.some(t=>{try{return e.matches(t)}catch{return!1}})}const st=["transform","translate","scale","rotate","perspective"],lt=["transform","translate","scale","rotate","perspective","filter"],rt=["paint","layout","strict","content"];function pe(e){const t=fe(),o=_(e)?$(e):e;return st.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||lt.some(n=>(o.willChange||"").includes(n))||rt.some(n=>(o.contain||"").includes(n))}function at(e){let t=k(e);for(;B(t)&&!H(t);){if(pe(t))return t;if(ie(t))return null;t=k(t)}return null}function fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ct=new Set(["html","body","#document"]);function H(e){return ct.has(W(e))}function $(e){return O(e).getComputedStyle(e)}function se(e){return _(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function k(e){if(W(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Se(e)&&e.host||T(e);return Se(t)?t.host:t}function De(e){const t=k(e);return H(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&J(t)?t:De(t)}function U(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const s=De(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),r=O(s);if(i){const l=de(r);return t.concat(r,r.visualViewport||[],J(s)?s:[],l&&o?U(l):[])}return t.concat(s,U(s,[],o))}function de(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ae(e){const t=$(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=B(e),i=s?e.offsetWidth:o,r=s?e.offsetHeight:n,l=ee(o)!==i||ee(n)!==r;return l&&(o=i,n=r),{width:o,height:n,$:l}}function ge(e){return _(e)?e:e.contextElement}function j(e){const t=ge(e);if(!B(t))return V(1);const o=t.getBoundingClientRect(),{width:n,height:s,$:i}=Ae(t);let r=(i?ee(o.width):o.width)/n,l=(i?ee(o.height):o.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ht=V(0);function Pe(e){const t=O(e);return!fe()||!t.visualViewport?ht:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ut(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==O(e)?!1:t}function R(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const s=e.getBoundingClientRect(),i=ge(e);let r=V(1);t&&(n?_(n)&&(r=j(n)):r=j(e));const l=ut(i,o,n)?Pe(i):V(0);let a=(s.left+l.x)/r.x,h=(s.top+l.y)/r.y,c=s.width/r.x,d=s.height/r.y;if(i){const g=O(i),p=n&&_(n)?O(n):n;let S=g,m=de(S);for(;m&&n&&p!==S;){const L=j(m),y=m.getBoundingClientRect(),C=$(m),D=y.left+(m.clientLeft+parseFloat(C.paddingLeft))*L.x,X=y.top+(m.clientTop+parseFloat(C.paddingTop))*L.y;a*=L.x,h*=L.y,c*=L.x,d*=L.y,a+=D,h+=X,S=O(m),m=de(S)}}return Te({width:c,height:d,x:a,y:h})}function le(e,t){const o=se(e).scrollLeft;return t?t.left+o:R(T(e)).left+o}function Ee(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-le(e,o),s=o.top+t.scrollTop;return{x:n,y:s}}function dt(e){let{elements:t,rect:o,offsetParent:n,strategy:s}=e;const i=s==="fixed",r=T(n),l=t?ie(t.floating):!1;if(n===r||l&&i)return o;let a={scrollLeft:0,scrollTop:0},h=V(1);const c=V(0),d=B(n);if((d||!d&&!i)&&((W(n)!=="body"||J(r))&&(a=se(n)),B(n))){const p=R(n);h=j(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const g=r&&!d&&!i?Ee(r,a):V(0);return{width:o.width*h.x,height:o.height*h.y,x:o.x*h.x-a.scrollLeft*h.x+c.x+g.x,y:o.y*h.y-a.scrollTop*h.y+c.y+g.y}}function pt(e){return Array.from(e.getClientRects())}function ft(e){const t=T(e),o=se(e),n=e.ownerDocument.body,s=N(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=N(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+le(e);const l=-o.scrollTop;return $(n).direction==="rtl"&&(r+=N(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:r,y:l}}const xe=25;function gt(e,t){const o=O(e),n=T(e),s=o.visualViewport;let i=n.clientWidth,r=n.clientHeight,l=0,a=0;if(s){i=s.width,r=s.height;const c=fe();(!c||c&&t==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}const h=le(n);if(h<=0){const c=n.ownerDocument,d=c.body,g=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,S=Math.abs(n.clientWidth-d.clientWidth-p);S<=xe&&(i-=S)}else h<=xe&&(i+=h);return{width:i,height:r,x:l,y:a}}const yt=new Set(["absolute","fixed"]);function mt(e,t){const o=R(e,!0,t==="fixed"),n=o.top+e.clientTop,s=o.left+e.clientLeft,i=B(e)?j(e):V(1),r=e.clientWidth*i.x,l=e.clientHeight*i.y,a=s*i.x,h=n*i.y;return{width:r,height:l,x:a,y:h}}function Le(e,t,o){let n;if(t==="viewport")n=gt(e,o);else if(t==="document")n=ft(T(e));else if(_(t))n=mt(t,o);else{const s=Pe(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Te(n)}function Re(e,t){const o=k(e);return o===t||!_(o)||H(o)?!1:$(o).position==="fixed"||Re(o,t)}function bt(e,t){const o=t.get(e);if(o)return o;let n=U(e,[],!1).filter(l=>_(l)&&W(l)!=="body"),s=null;const i=$(e).position==="fixed";let r=i?k(e):e;for(;_(r)&&!H(r);){const l=$(r),a=pe(r);!a&&l.position==="fixed"&&(s=null),(i?!a&&!s:!a&&l.position==="static"&&s&&yt.has(s.position)||J(r)&&!a&&Re(e,r))?n=n.filter(h=>h!==r):s=l,r=k(r)}return t.set(e,n),n}function wt(e){let{element:t,boundary:o,rootBoundary:n,strategy:s}=e;const i=[...o==="clippingAncestors"?ie(t)?[]:bt(t,this._c):[].concat(o),n],r=i[0],l=i.reduce((a,h)=>{const c=Le(t,h,s);return a.top=N(c.top,a.top),a.right=he(c.right,a.right),a.bottom=he(c.bottom,a.bottom),a.left=N(c.left,a.left),a},Le(t,r,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vt(e){const{width:t,height:o}=Ae(e);return{width:t,height:o}}function Ot(e,t,o){const n=B(t),s=T(t),i=o==="fixed",r=R(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=V(0);function h(){a.x=le(s)}if(n||!n&&!i)if((W(t)!=="body"||J(s))&&(l=se(t)),n){const p=R(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else s&&h();i&&!n&&s&&h();const c=s&&!n&&!i?Ee(s,l):V(0),d=r.left+l.scrollLeft-a.x-c.x,g=r.top+l.scrollTop-a.y-c.y;return{x:d,y:g,width:r.width,height:r.height}}function ce(e){return $(e).position==="static"}function Ce(e,t){if(!B(e)||$(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return T(e)===o&&(o=o.ownerDocument.body),o}function Me(e,t){const o=O(e);if(ie(e))return o;if(!B(e)){let s=k(e);for(;s&&!H(s);){if(_(s)&&!ce(s))return s;s=k(s)}return o}let n=Ce(e,t);for(;n&&nt(n)&&ce(n);)n=Ce(n,t);return n&&H(n)&&ce(n)&&!pe(n)?o:n||at(e)||o}const St=async function(e){const t=this.getOffsetParent||Me,o=this.getDimensions,n=await o(e.floating);return{reference:Ot(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function xt(e){return $(e).direction==="rtl"}const Lt={convertOffsetParentRelativeRectToViewportRelativeRect:dt,getDocumentElement:T,getClippingRect:wt,getOffsetParent:Me,getElementRects:St,getClientRects:pt,getDimensions:vt,getScale:j,isElement:_,isRTL:xt};function Ne(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ct(e,t){let o=null,n;const s=T(e);function i(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const h=e.getBoundingClientRect(),{left:c,top:d,width:g,height:p}=h;if(l||t(),!g||!p)return;const S=Q(d),m=Q(s.clientWidth-(c+g)),L=Q(s.clientHeight-(d+p)),y=Q(c),C={rootMargin:-S+"px "+-m+"px "+-L+"px "+-y+"px",threshold:N(0,he(1,a))||1};let D=!0;function X(je){const Y=je[0].intersectionRatio;if(Y!==a){if(!D)return r();Y?r(!1,Y):n=setTimeout(()=>{r(!1,1e-7)},1e3)}Y===1&&!Ne(h,e.getBoundingClientRect())&&r(),D=!1}try{o=new IntersectionObserver(X,{...C,root:s.ownerDocument})}catch{o=new IntersectionObserver(X,C)}o.observe(e)}return r(!0),i}function _t(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,h=ge(e),c=s||i?[...h?U(h):[],...U(t)]:[];c.forEach(y=>{s&&y.addEventListener("scroll",o,{passive:!0}),i&&y.addEventListener("resize",o)});const d=h&&l?Ct(h,o):null;let g=-1,p=null;r&&(p=new ResizeObserver(y=>{let[C]=y;C&&C.target===h&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var D;(D=p)==null||D.observe(t)})),o()}),h&&!a&&p.observe(h),p.observe(t));let S,m=a?R(e):null;a&&L();function L(){const y=R(e);m&&!Ne(m,y)&&o(),m=y,S=requestAnimationFrame(L)}return o(),()=>{var y;c.forEach(C=>{s&&C.removeEventListener("scroll",o),i&&C.removeEventListener("resize",o)}),d?.(),(y=p)==null||y.disconnect(),p=null,a&&cancelAnimationFrame(S)}}const $t=ze,Vt=We,Bt=He,Tt=Ke,Ft=(e,t,o)=>{const n=new Map,s={platform:Lt,...o},i={...s.platform,_c:n};return qe(e,t,{...s,platform:i})};var kt=Object.defineProperty,Dt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,$e=(e,t,o)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,M=(e,t)=>{for(var o in t||(t={}))Pt.call(t,o)&&$e(e,o,t[o]);if(_e)for(var o of _e(t))Et.call(t,o)&&$e(e,o,t[o]);return e},Ve=(e,t)=>Dt(e,At(t));const Rt={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(e){this.autoscroll&&e&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var e;const t=((e=this.$refs.dropdownMenu)==null?void 0:e.children[this.typeAheadPointer])||!1;if(t){const o=this.getDropdownViewport(),{top:n,bottom:s,height:i}=t.getBoundingClientRect();if(no.bottom)return this.$refs.dropdownMenu.scrollTop=t.offsetTop-(o.height-i)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Mt={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let e=0;e=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown(){for(let e=this.typeAheadPointer+1;e{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},It={},jt={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},zt=x("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),Ht=[zt];function Wt(e,t){return u(),f("svg",jt,Ht)}const Kt=ye(It,[["render",Wt]]),qt={},Ut={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Jt=x("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),Xt=[Jt];function Yt(e,t){return u(),f("svg",Ut,Xt)}const Qt=ye(qt,[["render",Yt]]),Be={Deselect:Kt,OpenIndicator:Qt},Zt={mounted(e,{instance:t}){if(t.appendToBody){const{height:o,top:n,left:s,width:i}=t.$refs.toggle.getBoundingClientRect();let r=window.scrollX||window.pageXOffset,l=window.scrollY||window.pageYOffset;e.unbindPosition=t.calculatePosition(e,t,{width:i+"px",left:r+s+"px",top:l+n+o+"px"}),document.body.appendChild(e)}},unmounted(e,{instance:t}){t.appendToBody&&(e.unbindPosition&&typeof e.unbindPosition=="function"&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}};function Gt(e){const t={};return Object.keys(e).sort().forEach(o=>{t[o]=e[o]}),JSON.stringify(t)}let eo=0;function to(){return++eo}const oo={components:M({},Be),directives:{appendToBody:Zt},mixins:[Rt,Mt,Nt],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:e=>e},selectable:{type:Function,default:e=>!0},getOptionLabel:{type:Function,default(e){return typeof e=="object"?e.hasOwnProperty(this.label)?e[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}. +import{an as V,ao as Te,ap as Z,aq as ee,ar as ze,as as We,at as He,au as qe,av as Ke,aw as N,ax as he,ay as Ue,o as u,c as f,C as b,D as w,E as v,a as x,F as me,q as ue,B as te,t as z,e as I,W as re,f as P,U as E,az as Fe,w as ae,g as be,b as K,m as F,a0 as we,d as ve,T as Je,_ as oe,k as Xe,Z as G,r as q,h as Q,aA as Ye,S as Ze,aB as Qe,l as Oe,i as Ge,aC as et}from"./logreader-main.mjs";function ne(){return typeof window<"u"}function H(e){return ke(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function T(e){var t;return(t=(ke(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ke(e){return ne()?e instanceof Node||e instanceof O(e).Node:!1}function _(e){return ne()?e instanceof Element||e instanceof O(e).Element:!1}function B(e){return ne()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function Se(e){return!ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}const tt=new Set(["inline","contents"]);function J(e){const{overflow:t,overflowX:o,overflowY:n,display:s}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!tt.has(s)}const ot=new Set(["table","td","th"]);function nt(e){return ot.has(H(e))}const it=[":popover-open",":modal"];function ie(e){return it.some(t=>{try{return e.matches(t)}catch{return!1}})}const st=["transform","translate","scale","rotate","perspective"],lt=["transform","translate","scale","rotate","perspective","filter"],rt=["paint","layout","strict","content"];function pe(e){const t=fe(),o=_(e)?$(e):e;return st.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||lt.some(n=>(o.willChange||"").includes(n))||rt.some(n=>(o.contain||"").includes(n))}function at(e){let t=k(e);for(;B(t)&&!W(t);){if(pe(t))return t;if(ie(t))return null;t=k(t)}return null}function fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ct=new Set(["html","body","#document"]);function W(e){return ct.has(H(e))}function $(e){return O(e).getComputedStyle(e)}function se(e){return _(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function k(e){if(H(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Se(e)&&e.host||T(e);return Se(t)?t.host:t}function De(e){const t=k(e);return W(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&J(t)?t:De(t)}function U(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const s=De(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),r=O(s);if(i){const l=de(r);return t.concat(r,r.visualViewport||[],J(s)?s:[],l&&o?U(l):[])}return t.concat(s,U(s,[],o))}function de(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ae(e){const t=$(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=B(e),i=s?e.offsetWidth:o,r=s?e.offsetHeight:n,l=ee(o)!==i||ee(n)!==r;return l&&(o=i,n=r),{width:o,height:n,$:l}}function ge(e){return _(e)?e:e.contextElement}function j(e){const t=ge(e);if(!B(t))return V(1);const o=t.getBoundingClientRect(),{width:n,height:s,$:i}=Ae(t);let r=(i?ee(o.width):o.width)/n,l=(i?ee(o.height):o.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ht=V(0);function Pe(e){const t=O(e);return!fe()||!t.visualViewport?ht:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ut(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==O(e)?!1:t}function R(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const s=e.getBoundingClientRect(),i=ge(e);let r=V(1);t&&(n?_(n)&&(r=j(n)):r=j(e));const l=ut(i,o,n)?Pe(i):V(0);let a=(s.left+l.x)/r.x,h=(s.top+l.y)/r.y,c=s.width/r.x,d=s.height/r.y;if(i){const g=O(i),p=n&&_(n)?O(n):n;let S=g,m=de(S);for(;m&&n&&p!==S;){const L=j(m),y=m.getBoundingClientRect(),C=$(m),D=y.left+(m.clientLeft+parseFloat(C.paddingLeft))*L.x,X=y.top+(m.clientTop+parseFloat(C.paddingTop))*L.y;a*=L.x,h*=L.y,c*=L.x,d*=L.y,a+=D,h+=X,S=O(m),m=de(S)}}return Te({width:c,height:d,x:a,y:h})}function le(e,t){const o=se(e).scrollLeft;return t?t.left+o:R(T(e)).left+o}function Ee(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-le(e,o),s=o.top+t.scrollTop;return{x:n,y:s}}function dt(e){let{elements:t,rect:o,offsetParent:n,strategy:s}=e;const i=s==="fixed",r=T(n),l=t?ie(t.floating):!1;if(n===r||l&&i)return o;let a={scrollLeft:0,scrollTop:0},h=V(1);const c=V(0),d=B(n);if((d||!d&&!i)&&((H(n)!=="body"||J(r))&&(a=se(n)),B(n))){const p=R(n);h=j(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const g=r&&!d&&!i?Ee(r,a):V(0);return{width:o.width*h.x,height:o.height*h.y,x:o.x*h.x-a.scrollLeft*h.x+c.x+g.x,y:o.y*h.y-a.scrollTop*h.y+c.y+g.y}}function pt(e){return Array.from(e.getClientRects())}function ft(e){const t=T(e),o=se(e),n=e.ownerDocument.body,s=N(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=N(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+le(e);const l=-o.scrollTop;return $(n).direction==="rtl"&&(r+=N(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:r,y:l}}const xe=25;function gt(e,t){const o=O(e),n=T(e),s=o.visualViewport;let i=n.clientWidth,r=n.clientHeight,l=0,a=0;if(s){i=s.width,r=s.height;const c=fe();(!c||c&&t==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}const h=le(n);if(h<=0){const c=n.ownerDocument,d=c.body,g=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,S=Math.abs(n.clientWidth-d.clientWidth-p);S<=xe&&(i-=S)}else h<=xe&&(i+=h);return{width:i,height:r,x:l,y:a}}const yt=new Set(["absolute","fixed"]);function mt(e,t){const o=R(e,!0,t==="fixed"),n=o.top+e.clientTop,s=o.left+e.clientLeft,i=B(e)?j(e):V(1),r=e.clientWidth*i.x,l=e.clientHeight*i.y,a=s*i.x,h=n*i.y;return{width:r,height:l,x:a,y:h}}function Le(e,t,o){let n;if(t==="viewport")n=gt(e,o);else if(t==="document")n=ft(T(e));else if(_(t))n=mt(t,o);else{const s=Pe(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Te(n)}function Re(e,t){const o=k(e);return o===t||!_(o)||W(o)?!1:$(o).position==="fixed"||Re(o,t)}function bt(e,t){const o=t.get(e);if(o)return o;let n=U(e,[],!1).filter(l=>_(l)&&H(l)!=="body"),s=null;const i=$(e).position==="fixed";let r=i?k(e):e;for(;_(r)&&!W(r);){const l=$(r),a=pe(r);!a&&l.position==="fixed"&&(s=null),(i?!a&&!s:!a&&l.position==="static"&&s&&yt.has(s.position)||J(r)&&!a&&Re(e,r))?n=n.filter(h=>h!==r):s=l,r=k(r)}return t.set(e,n),n}function wt(e){let{element:t,boundary:o,rootBoundary:n,strategy:s}=e;const i=[...o==="clippingAncestors"?ie(t)?[]:bt(t,this._c):[].concat(o),n],r=i[0],l=i.reduce((a,h)=>{const c=Le(t,h,s);return a.top=N(c.top,a.top),a.right=he(c.right,a.right),a.bottom=he(c.bottom,a.bottom),a.left=N(c.left,a.left),a},Le(t,r,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vt(e){const{width:t,height:o}=Ae(e);return{width:t,height:o}}function Ot(e,t,o){const n=B(t),s=T(t),i=o==="fixed",r=R(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=V(0);function h(){a.x=le(s)}if(n||!n&&!i)if((H(t)!=="body"||J(s))&&(l=se(t)),n){const p=R(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else s&&h();i&&!n&&s&&h();const c=s&&!n&&!i?Ee(s,l):V(0),d=r.left+l.scrollLeft-a.x-c.x,g=r.top+l.scrollTop-a.y-c.y;return{x:d,y:g,width:r.width,height:r.height}}function ce(e){return $(e).position==="static"}function Ce(e,t){if(!B(e)||$(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return T(e)===o&&(o=o.ownerDocument.body),o}function Me(e,t){const o=O(e);if(ie(e))return o;if(!B(e)){let s=k(e);for(;s&&!W(s);){if(_(s)&&!ce(s))return s;s=k(s)}return o}let n=Ce(e,t);for(;n&&nt(n)&&ce(n);)n=Ce(n,t);return n&&W(n)&&ce(n)&&!pe(n)?o:n||at(e)||o}const St=async function(e){const t=this.getOffsetParent||Me,o=this.getDimensions,n=await o(e.floating);return{reference:Ot(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function xt(e){return $(e).direction==="rtl"}const Lt={convertOffsetParentRelativeRectToViewportRelativeRect:dt,getDocumentElement:T,getClippingRect:wt,getOffsetParent:Me,getElementRects:St,getClientRects:pt,getDimensions:vt,getScale:j,isElement:_,isRTL:xt};function Ne(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ct(e,t){let o=null,n;const s=T(e);function i(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const h=e.getBoundingClientRect(),{left:c,top:d,width:g,height:p}=h;if(l||t(),!g||!p)return;const S=Z(d),m=Z(s.clientWidth-(c+g)),L=Z(s.clientHeight-(d+p)),y=Z(c),C={rootMargin:-S+"px "+-m+"px "+-L+"px "+-y+"px",threshold:N(0,he(1,a))||1};let D=!0;function X(je){const Y=je[0].intersectionRatio;if(Y!==a){if(!D)return r();Y?r(!1,Y):n=setTimeout(()=>{r(!1,1e-7)},1e3)}Y===1&&!Ne(h,e.getBoundingClientRect())&&r(),D=!1}try{o=new IntersectionObserver(X,{...C,root:s.ownerDocument})}catch{o=new IntersectionObserver(X,C)}o.observe(e)}return r(!0),i}function _t(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,h=ge(e),c=s||i?[...h?U(h):[],...U(t)]:[];c.forEach(y=>{s&&y.addEventListener("scroll",o,{passive:!0}),i&&y.addEventListener("resize",o)});const d=h&&l?Ct(h,o):null;let g=-1,p=null;r&&(p=new ResizeObserver(y=>{let[C]=y;C&&C.target===h&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var D;(D=p)==null||D.observe(t)})),o()}),h&&!a&&p.observe(h),p.observe(t));let S,m=a?R(e):null;a&&L();function L(){const y=R(e);m&&!Ne(m,y)&&o(),m=y,S=requestAnimationFrame(L)}return o(),()=>{var y;c.forEach(C=>{s&&C.removeEventListener("scroll",o),i&&C.removeEventListener("resize",o)}),d?.(),(y=p)==null||y.disconnect(),p=null,a&&cancelAnimationFrame(S)}}const $t=We,Vt=qe,Bt=He,Tt=Ke,Ft=(e,t,o)=>{const n=new Map,s={platform:Lt,...o},i={...s.platform,_c:n};return ze(e,t,{...s,platform:i})};var kt=Object.defineProperty,Dt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,$e=(e,t,o)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,M=(e,t)=>{for(var o in t||(t={}))Pt.call(t,o)&&$e(e,o,t[o]);if(_e)for(var o of _e(t))Et.call(t,o)&&$e(e,o,t[o]);return e},Ve=(e,t)=>Dt(e,At(t));const Rt={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(e){this.autoscroll&&e&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var e;const t=((e=this.$refs.dropdownMenu)==null?void 0:e.children[this.typeAheadPointer])||!1;if(t){const o=this.getDropdownViewport(),{top:n,bottom:s,height:i}=t.getBoundingClientRect();if(no.bottom)return this.$refs.dropdownMenu.scrollTop=t.offsetTop-(o.height-i)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Mt={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let e=0;e=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown(){for(let e=this.typeAheadPointer+1;e{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},It={},jt={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},zt=x("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),Wt=[zt];function Ht(e,t){return u(),f("svg",jt,Wt)}const qt=ye(It,[["render",Ht]]),Kt={},Ut={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Jt=x("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),Xt=[Jt];function Yt(e,t){return u(),f("svg",Ut,Xt)}const Zt=ye(Kt,[["render",Yt]]),Be={Deselect:qt,OpenIndicator:Zt},Qt={mounted(e,{instance:t}){if(t.appendToBody){const{height:o,top:n,left:s,width:i}=t.$refs.toggle.getBoundingClientRect();let r=window.scrollX||window.pageXOffset,l=window.scrollY||window.pageYOffset;e.unbindPosition=t.calculatePosition(e,t,{width:i+"px",left:r+s+"px",top:l+n+o+"px"}),document.body.appendChild(e)}},unmounted(e,{instance:t}){t.appendToBody&&(e.unbindPosition&&typeof e.unbindPosition=="function"&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}};function Gt(e){const t={};return Object.keys(e).sort().forEach(o=>{t[o]=e[o]}),JSON.stringify(t)}let eo=0;function to(){return++eo}const oo={components:M({},Be),directives:{appendToBody:Qt},mixins:[Rt,Mt,Nt],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:e=>e},selectable:{type:Function,default:e=>!0},getOptionLabel:{type:Function,default(e){return typeof e=="object"?e.hasOwnProperty(this.label)?e[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}. https://vue-select.org/api/props.html#getoptionlabel`):e}},getOptionKey:{type:Function,default(e){if(typeof e!="object")return e;try{return e.hasOwnProperty("id")?e.id:Gt(e)}catch(t){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option. -https://vue-select.org/api/props.html#getoptionkey`,e,t)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(e,t,o){return(t||"").toLocaleLowerCase().indexOf(o.toLocaleLowerCase())>-1}},filter:{type:Function,default(e,t){return e.filter(o=>{let n=this.getOptionLabel(o);return typeof n=="number"&&(n=n.toString()),this.filterBy(o,n,t)})}},createOption:{type:Function,default(e){return typeof this.optionList[0]=="object"?{[this.label]:e}:e}},resetOnOptionsChange:{default:!1,validator:e=>["function","boolean"].includes(typeof e)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:e,multiple:t}){return e&&!t}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(e,t)=>e},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(e,t,{width:o,top:n,left:s}){e.style.top=n,e.style.left=s,e.style.width=o}},dropdownShouldOpen:{type:Function,default({noDrop:e,open:t,mutableLoading:o}){return e?!1:t&&!o}},uid:{type:[String,Number],default:()=>to()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let e=this.modelValue;return this.isTrackingValues&&(e=this.$data._value),e!=null&&e!==""?[].concat(e):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const e={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:M({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:t=>this.search=t.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:e,listFooter:e,header:Ve(M({},e),{deselect:this.deselect}),footer:Ve(M({},e),{deselect:this.deselect})}},childComponents(){return M(M({},Be),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const e=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return e;const t=this.search.length?this.filter(e,this.search,this):e;if(this.taggable&&this.search.length){const o=this.createOption(this.search);this.optionExists(o)||t.unshift(o)}return t},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(e,t){const o=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(e,t,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&o()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)}},multiple(){this.clearSelection()},open(e){this.$emit(e?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(e){Array.isArray(e)?this.$data._value=e.map(t=>this.findOptionFromReducedValue(t)):this.$data._value=this.findOptionFromReducedValue(e)},select(e){this.$emit("option:selecting",e),this.isOptionSelected(e)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(e):(this.taggable&&!this.optionExists(e)&&(this.$emit("option:created",e),this.pushTag(e)),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit("option:selected",e)),this.onAfterSelect(e)},deselect(e){this.$emit("option:deselecting",e),this.updateValue(this.selectedValue.filter(t=>!this.optionComparator(t,e))),this.$emit("option:deselected",e)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(e){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(e){typeof this.modelValue>"u"&&(this.$data._value=e),e!==null&&(Array.isArray(e)?e=e.map(t=>this.reduce(t)):e=this.reduce(e)),this.$emit("update:modelValue",e)},toggleDropdown(e){const t=e.target!==this.searchEl;t&&e.preventDefault();const o=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||o.filter(Boolean).some(n=>n.contains(e.target)||n===e.target)){e.preventDefault();return}this.open&&t?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(e){return this.selectedValue.some(t=>this.optionComparator(t,e))},isOptionDeselectable(e){return this.isOptionSelected(e)&&this.deselectFromDropdown},optionComparator(e,t){return this.getOptionKey(e)===this.getOptionKey(t)},findOptionFromReducedValue(e){const t=n=>JSON.stringify(this.reduce(n))===JSON.stringify(e),o=[...this.options,...this.pushedTags].filter(t);return o.length===1?o[0]:o.find(n=>this.optionComparator(n,this.$data._value))||e},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let e=null;this.multiple&&(e=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(e)}},optionExists(e){return this.optionList.some(t=>this.optionComparator(t,e))},normalizeOptionForSlot(e){return typeof e=="object"?e:{[this.label]:e}},pushTag(e){this.pushedTags.push(e)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:e,multiple:t}=this;this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:t})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(e){const t=s=>(s.preventDefault(),!this.isComposing&&this.typeAheadSelect()),o={8:s=>this.maybeDeleteValue(),9:s=>this.onTab(),27:s=>this.onEscape(),38:s=>(s.preventDefault(),this.typeAheadUp()),40:s=>(s.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(s=>o[s]=t);const n=this.mapKeydown(o,this);if(typeof n[e.keyCode]=="function")return n[e.keyCode](e)}}},no=["dir"],io=["id","aria-expanded","aria-owns"],so={ref:"selectedOptions",class:"vs__selected-options"},lo=["disabled","title","aria-label","onClick"],ro={ref:"actions",class:"vs__actions"},ao=["disabled"],co={class:"vs__spinner"},ho=["id"],uo=["id","aria-selected","onMouseover","onClick"],po={key:0,class:"vs__no-options"},fo=te(" Sorry, no matching options. "),go=["id"];function yo(e,t,o,n,s,i){const r=Ue("append-to-body");return u(),f("div",{dir:o.dir,class:ve(["v-select",i.stateClasses])},[b(e.$slots,"header",w(v(i.scope.header))),x("div",{id:`vs${o.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":i.dropdownOpen.toString(),"aria-owns":`vs${o.uid}__listbox`,"aria-label":"Search for option",onMousedown:t[1]||(t[1]=l=>i.toggleDropdown(l))},[x("div",so,[(u(!0),f(me,null,ue(i.selectedValue,(l,a)=>b(e.$slots,"selected-option-container",{option:i.normalizeOptionForSlot(l),deselect:i.deselect,multiple:o.multiple,disabled:o.disabled},()=>[(u(),f("span",{key:o.getOptionKey(l),class:"vs__selected"},[b(e.$slots,"selected-option",w(v(i.normalizeOptionForSlot(l))),()=>[te(z(o.getOptionLabel(l)),1)]),o.multiple?(u(),f("button",{key:0,ref_for:!0,ref:h=>s.deselectButtons[a]=h,disabled:o.disabled,type:"button",class:"vs__deselect",title:`Deselect ${o.getOptionLabel(l)}`,"aria-label":`Deselect ${o.getOptionLabel(l)}`,onClick:h=>i.deselect(l)},[(u(),I(re(i.childComponents.Deselect)))],8,lo)):P("",!0)]))])),256)),b(e.$slots,"search",w(v(i.scope.search)),()=>[x("input",E({class:"vs__search"},i.scope.search.attributes,Fe(i.scope.search.events)),null,16)])],512),x("div",ro,[ae(x("button",{ref:"clearButton",disabled:o.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:t[0]||(t[0]=(...l)=>i.clearSelection&&i.clearSelection(...l))},[(u(),I(re(i.childComponents.Deselect)))],8,ao),[[be,i.showClearButton]]),b(e.$slots,"open-indicator",w(v(i.scope.openIndicator)),()=>[o.noDrop?P("",!0):(u(),I(re(i.childComponents.OpenIndicator),w(E({key:0},i.scope.openIndicator.attributes)),null,16))]),b(e.$slots,"spinner",w(v(i.scope.spinner)),()=>[ae(x("div",co,"Loading...",512),[[be,e.mutableLoading]])])],512)],40,io),q(Je,{name:o.transition},{default:F(()=>[i.dropdownOpen?ae((u(),f("ul",{id:`vs${o.uid}__listbox`,ref:"dropdownMenu",key:`vs${o.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:t[2]||(t[2]=we((...l)=>i.onMousedown&&i.onMousedown(...l),["prevent"])),onMouseup:t[3]||(t[3]=(...l)=>i.onMouseUp&&i.onMouseUp(...l))},[b(e.$slots,"list-header",w(v(i.scope.listHeader))),(u(!0),f(me,null,ue(i.filteredOptions,(l,a)=>(u(),f("li",{id:`vs${o.uid}__option-${a}`,key:o.getOptionKey(l),role:"option",class:ve(["vs__dropdown-option",{"vs__dropdown-option--deselect":i.isOptionDeselectable(l)&&a===e.typeAheadPointer,"vs__dropdown-option--selected":i.isOptionSelected(l),"vs__dropdown-option--highlight":a===e.typeAheadPointer,"vs__dropdown-option--disabled":!o.selectable(l)}]),"aria-selected":a===e.typeAheadPointer?!0:null,onMouseover:h=>o.selectable(l)?e.typeAheadPointer=a:null,onClick:we(h=>o.selectable(l)?i.select(l):null,["prevent","stop"])},[b(e.$slots,"option",w(v(i.normalizeOptionForSlot(l))),()=>[te(z(o.getOptionLabel(l)),1)])],42,uo))),128)),i.filteredOptions.length===0?(u(),f("li",po,[b(e.$slots,"no-options",w(v(i.scope.noOptions)),()=>[fo])])):P("",!0),b(e.$slots,"list-footer",w(v(i.scope.listFooter)))],40,ho)),[[r]]):(u(),f("ul",{key:1,id:`vs${o.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,go))]),_:3},8,["name"]),b(e.$slots,"footer",w(v(i.scope.footer)))],10,no)}const A=ye(oo,[["render",yo]]),mo={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},bo=["aria-hidden","aria-label"],wo=["fill","width","height"],vo={d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},Oo={key:0};function So(e,t,o,n,s,i){return u(),f("span",E(e.$attrs,{"aria-hidden":o.title?null:"true","aria-label":o.title,class:"material-design-icon chevron-down-icon",role:"img",onClick:t[0]||(t[0]=r=>e.$emit("click",r))}),[(u(),f("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[x("path",vo,[o.title?(u(),f("title",Oo,z(o.title),1)):P("",!0)])],8,wo))],16,bo)}const xo=oe(mo,[["render",So]]),Lo={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Co=["aria-hidden","aria-label"],_o=["fill","width","height"],$o={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},Vo={key:0};function Bo(e,t,o,n,s,i){return u(),f("span",E(e.$attrs,{"aria-hidden":o.title?null:"true","aria-label":o.title,class:"material-design-icon close-icon",role:"img",onClick:t[0]||(t[0]=r=>e.$emit("click",r))}),[(u(),f("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[x("path",$o,[o.title?(u(),f("title",Vo,z(o.title),1)):P("",!0)])],8,_o))],16,Co)}const To=oe(Lo,[["render",Bo]]);function Ie(e,t){const o=[];let n=0,s=e.toLowerCase().indexOf(t.toLowerCase(),n),i=0;for(;s>-1&&i++[]}},computed:{ranges(){let e=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?e=this.highlight:e=Ie(this.text,this.search),e.forEach((t,o)=>{t.end(o.start0&&t.push({start:o.start<0?0:o.start,end:o.end>this.text.length?this.text.length:o.end}),t),[]),e.sort((t,o)=>t.start-o.start),e=e.reduce((t,o)=>{if(!t.length)t.push(o);else{const n=t.length-1;t[n].end>=o.start?t[n]={start:t[n].start,end:Math.max(t[n].end,o.end)}:t.push(o)}return t},[])),e},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const e=[];let t=0,o=0;for(;t=this.ranges.length&&te.highlight?G("strong",{},e.text):e.text)):G("span",{},this.text)}}),ko={name:"NcEllipsisedOption",components:{NcHighlight:Fo},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?Ie(this.name,this.search):[]},highlight2(){return this.highlight1.map(e=>({start:e.start-this.split,end:e.end-this.split}))}}},Do=["title"];function Ao(e,t,o,n,s,i){const r=K("NcHighlight");return u(),f("span",{dir:"auto",class:"name-parts",title:o.name},[q(r,{class:"name-parts__first",text:i.part1,search:o.search,highlight:i.highlight1},null,8,["text","search","highlight"]),i.part2?(u(),I(r,{key:0,class:"name-parts__last",text:i.part2,search:o.search,highlight:i.highlight2},null,8,["text","search","highlight"])):P("",!0)],8,Do)}const Po=oe(ko,[["render",Ao],["__scopeId","data-v-a612f185"]]);Ge(et);const Eo={name:"NcSelect",components:{ChevronDown:xo,NcEllipsisedOption:Po,NcLoadingIcon:Ye,VueSelect:A},props:{...A.props,...A.mixins.reduce((e,t)=>({...e,...t.props}),{}),ariaLabelClearSelected:{type:String,default:Z("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:Z("Options")},ariaLabelDeselectOption:{type:Function,default:e=>Z("Deselect {option}",{option:e})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},keepOpen:{type:Boolean,default:!1},components:{type:Object,default:()=>({Deselect:{render:()=>G(To,{size:20,fillColor:"var(--vs-controls-color)",style:[{cursor:"pointer"}]})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:e,open:t})=>e?!1:t},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>Oe()},inputLabel:{type:String,default:null},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(e,t){return{...e,27:o=>{t.open&&o.stopPropagation(),e[27](o)}}}},uid:{type:String,default:()=>Oe()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},modelValue:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" ","update:modelValue"],setup(){const e=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),t=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline"));return{avatarSize:e-2*t,isLegacy:Ze}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.modelValue===null||Array.isArray(this.modelValue)&&this.modelValue.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(e,t,{width:o})=>{e.style.width=o;const n={name:"addClass",fn(){return e.classList.add("vs__dropdown-menu--floating"),{}}},s={name:"togglePlacementClass",fn({placement:r}){return t.$el.classList.toggle("select--drop-up",r==="top"),e.classList.toggle("vs__dropdown-menu--floating-placement-top",r==="top"),{}}},i=()=>{Ft(t.$refs.toggle,e,{placement:this.placement,middleware:[$t(-1),n,s,Bt(),Vt({limiter:Tt()})]}).then(({x:r,y:l})=>{Object.assign(e.style,{left:`${r}px`,top:`${l}px`,width:`${t.$refs.toggle.getBoundingClientRect().width}px`})})};return _t(t.$refs.toggle,e,i)}},localFilterBy(){return this.filterBy??A.props.filterBy.default},localLabel(){return this.label??A.props.label.default},propsToForward(){const e=[...Object.keys(A.props),...A.mixins.flatMap(t=>Object.keys(t.props??{}))];return{...Object.fromEntries(Object.entries(this.$props).filter(([t,o])=>e.includes(t))),calculatePosition:this.localCalculatePosition,closeOnSelect:!this.keepOpen,filterBy:this.localFilterBy,label:this.localLabel}}},mounted(){!this.labelOutside&&!this.inputLabel&&this.ariaLabelCombobox,this.inputLabel&&this.ariaLabelCombobox},methods:{t:Z}},Ro=["for"],Mo=["required"];function No(e,t,o,n,s,i){const r=K("ChevronDown"),l=K("NcEllipsisedOption"),a=K("NcLoadingIcon"),h=K("VueSelect");return u(),I(h,E({class:["select",{"select--legacy":n.isLegacy,"select--no-wrap":o.noWrap}]},i.propsToForward,{onSearch:t[0]||(t[0]=c=>s.search=c),"onUpdate:modelValue":t[1]||(t[1]=c=>e.$emit("update:modelValue",c))}),Qe({search:F(({attributes:c,events:d})=>[x("input",E({class:["vs__search",[o.inputClass]]},c,{required:i.inputRequired,dir:"auto"},Fe(d,!0)),null,16,Mo)]),"open-indicator":F(({attributes:c})=>[q(r,E(c,{fillColor:"var(--vs-controls-color)",style:{cursor:o.disabled?null:"pointer"},size:26}),null,16,["style"])]),option:F(c=>[b(e.$slots,"option",w(v(c)),()=>[q(l,{name:String(c[i.localLabel]),search:s.search},null,8,["name","search"])])]),"selected-option":F(c=>[b(e.$slots,"selected-option",w(v(c)),()=>[q(l,{name:String(c[i.localLabel]),search:s.search},null,8,["name","search"])])]),spinner:F(c=>[c.loading?(u(),I(a,{key:0})):P("",!0)]),"no-options":F(()=>[te(z(i.t("No results")),1)]),_:2},[!o.labelOutside&&o.inputLabel?{name:"header",fn:F(()=>[x("label",{for:o.inputId,class:"select__label"},z(o.inputLabel),9,Ro)]),key:"0"}:void 0,ue(e.$slots,(c,d)=>({name:d,fn:F(g=>[b(e.$slots,d,w(v(g)))])}))]),1040,["class"])}const jo=oe(Eo,[["render",No]]);export{jo as default}; -//# sourceMappingURL=index-Berf7HSo.chunk.mjs.map +https://vue-select.org/api/props.html#getoptionkey`,e,t)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(e,t,o){return(t||"").toLocaleLowerCase().indexOf(o.toLocaleLowerCase())>-1}},filter:{type:Function,default(e,t){return e.filter(o=>{let n=this.getOptionLabel(o);return typeof n=="number"&&(n=n.toString()),this.filterBy(o,n,t)})}},createOption:{type:Function,default(e){return typeof this.optionList[0]=="object"?{[this.label]:e}:e}},resetOnOptionsChange:{default:!1,validator:e=>["function","boolean"].includes(typeof e)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:e,multiple:t}){return e&&!t}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(e,t)=>e},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(e,t,{width:o,top:n,left:s}){e.style.top=n,e.style.left=s,e.style.width=o}},dropdownShouldOpen:{type:Function,default({noDrop:e,open:t,mutableLoading:o}){return e?!1:t&&!o}},uid:{type:[String,Number],default:()=>to()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let e=this.modelValue;return this.isTrackingValues&&(e=this.$data._value),e!=null&&e!==""?[].concat(e):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const e={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:M({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:t=>this.search=t.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:e,listFooter:e,header:Ve(M({},e),{deselect:this.deselect}),footer:Ve(M({},e),{deselect:this.deselect})}},childComponents(){return M(M({},Be),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const e=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return e;const t=this.search.length?this.filter(e,this.search,this):e;if(this.taggable&&this.search.length){const o=this.createOption(this.search);this.optionExists(o)||t.unshift(o)}return t},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(e,t){const o=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(e,t,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&o()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)}},multiple(){this.clearSelection()},open(e){this.$emit(e?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(e){Array.isArray(e)?this.$data._value=e.map(t=>this.findOptionFromReducedValue(t)):this.$data._value=this.findOptionFromReducedValue(e)},select(e){this.$emit("option:selecting",e),this.isOptionSelected(e)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(e):(this.taggable&&!this.optionExists(e)&&(this.$emit("option:created",e),this.pushTag(e)),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit("option:selected",e)),this.onAfterSelect(e)},deselect(e){this.$emit("option:deselecting",e),this.updateValue(this.selectedValue.filter(t=>!this.optionComparator(t,e))),this.$emit("option:deselected",e)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(e){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(e){typeof this.modelValue>"u"&&(this.$data._value=e),e!==null&&(Array.isArray(e)?e=e.map(t=>this.reduce(t)):e=this.reduce(e)),this.$emit("update:modelValue",e)},toggleDropdown(e){const t=e.target!==this.searchEl;t&&e.preventDefault();const o=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||o.filter(Boolean).some(n=>n.contains(e.target)||n===e.target)){e.preventDefault();return}this.open&&t?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(e){return this.selectedValue.some(t=>this.optionComparator(t,e))},isOptionDeselectable(e){return this.isOptionSelected(e)&&this.deselectFromDropdown},optionComparator(e,t){return this.getOptionKey(e)===this.getOptionKey(t)},findOptionFromReducedValue(e){const t=n=>JSON.stringify(this.reduce(n))===JSON.stringify(e),o=[...this.options,...this.pushedTags].filter(t);return o.length===1?o[0]:o.find(n=>this.optionComparator(n,this.$data._value))||e},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let e=null;this.multiple&&(e=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(e)}},optionExists(e){return this.optionList.some(t=>this.optionComparator(t,e))},normalizeOptionForSlot(e){return typeof e=="object"?e:{[this.label]:e}},pushTag(e){this.pushedTags.push(e)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:e,multiple:t}=this;this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:t})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(e){const t=s=>(s.preventDefault(),!this.isComposing&&this.typeAheadSelect()),o={8:s=>this.maybeDeleteValue(),9:s=>this.onTab(),27:s=>this.onEscape(),38:s=>(s.preventDefault(),this.typeAheadUp()),40:s=>(s.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(s=>o[s]=t);const n=this.mapKeydown(o,this);if(typeof n[e.keyCode]=="function")return n[e.keyCode](e)}}},no=["dir"],io=["id","aria-expanded","aria-owns"],so={ref:"selectedOptions",class:"vs__selected-options"},lo=["disabled","title","aria-label","onClick"],ro={ref:"actions",class:"vs__actions"},ao=["disabled"],co={class:"vs__spinner"},ho=["id"],uo=["id","aria-selected","onMouseover","onClick"],po={key:0,class:"vs__no-options"},fo=te(" Sorry, no matching options. "),go=["id"];function yo(e,t,o,n,s,i){const r=Ue("append-to-body");return u(),f("div",{dir:o.dir,class:ve(["v-select",i.stateClasses])},[b(e.$slots,"header",w(v(i.scope.header))),x("div",{id:`vs${o.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":i.dropdownOpen.toString(),"aria-owns":`vs${o.uid}__listbox`,"aria-label":"Search for option",onMousedown:t[1]||(t[1]=l=>i.toggleDropdown(l))},[x("div",so,[(u(!0),f(me,null,ue(i.selectedValue,(l,a)=>b(e.$slots,"selected-option-container",{option:i.normalizeOptionForSlot(l),deselect:i.deselect,multiple:o.multiple,disabled:o.disabled},()=>[(u(),f("span",{key:o.getOptionKey(l),class:"vs__selected"},[b(e.$slots,"selected-option",w(v(i.normalizeOptionForSlot(l))),()=>[te(z(o.getOptionLabel(l)),1)]),o.multiple?(u(),f("button",{key:0,ref_for:!0,ref:h=>s.deselectButtons[a]=h,disabled:o.disabled,type:"button",class:"vs__deselect",title:`Deselect ${o.getOptionLabel(l)}`,"aria-label":`Deselect ${o.getOptionLabel(l)}`,onClick:h=>i.deselect(l)},[(u(),I(re(i.childComponents.Deselect)))],8,lo)):P("",!0)]))])),256)),b(e.$slots,"search",w(v(i.scope.search)),()=>[x("input",E({class:"vs__search"},i.scope.search.attributes,Fe(i.scope.search.events)),null,16)])],512),x("div",ro,[ae(x("button",{ref:"clearButton",disabled:o.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:t[0]||(t[0]=(...l)=>i.clearSelection&&i.clearSelection(...l))},[(u(),I(re(i.childComponents.Deselect)))],8,ao),[[be,i.showClearButton]]),b(e.$slots,"open-indicator",w(v(i.scope.openIndicator)),()=>[o.noDrop?P("",!0):(u(),I(re(i.childComponents.OpenIndicator),w(E({key:0},i.scope.openIndicator.attributes)),null,16))]),b(e.$slots,"spinner",w(v(i.scope.spinner)),()=>[ae(x("div",co,"Loading...",512),[[be,e.mutableLoading]])])],512)],40,io),K(Je,{name:o.transition},{default:F(()=>[i.dropdownOpen?ae((u(),f("ul",{id:`vs${o.uid}__listbox`,ref:"dropdownMenu",key:`vs${o.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:t[2]||(t[2]=we((...l)=>i.onMousedown&&i.onMousedown(...l),["prevent"])),onMouseup:t[3]||(t[3]=(...l)=>i.onMouseUp&&i.onMouseUp(...l))},[b(e.$slots,"list-header",w(v(i.scope.listHeader))),(u(!0),f(me,null,ue(i.filteredOptions,(l,a)=>(u(),f("li",{id:`vs${o.uid}__option-${a}`,key:o.getOptionKey(l),role:"option",class:ve(["vs__dropdown-option",{"vs__dropdown-option--deselect":i.isOptionDeselectable(l)&&a===e.typeAheadPointer,"vs__dropdown-option--selected":i.isOptionSelected(l),"vs__dropdown-option--highlight":a===e.typeAheadPointer,"vs__dropdown-option--disabled":!o.selectable(l)}]),"aria-selected":a===e.typeAheadPointer?!0:null,onMouseover:h=>o.selectable(l)?e.typeAheadPointer=a:null,onClick:we(h=>o.selectable(l)?i.select(l):null,["prevent","stop"])},[b(e.$slots,"option",w(v(i.normalizeOptionForSlot(l))),()=>[te(z(o.getOptionLabel(l)),1)])],42,uo))),128)),i.filteredOptions.length===0?(u(),f("li",po,[b(e.$slots,"no-options",w(v(i.scope.noOptions)),()=>[fo])])):P("",!0),b(e.$slots,"list-footer",w(v(i.scope.listFooter)))],40,ho)),[[r]]):(u(),f("ul",{key:1,id:`vs${o.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,go))]),_:3},8,["name"]),b(e.$slots,"footer",w(v(i.scope.footer)))],10,no)}const A=ye(oo,[["render",yo]]),mo={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},bo=["aria-hidden","aria-label"],wo=["fill","width","height"],vo={d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},Oo={key:0};function So(e,t,o,n,s,i){return u(),f("span",E(e.$attrs,{"aria-hidden":o.title?null:"true","aria-label":o.title,class:"material-design-icon chevron-down-icon",role:"img",onClick:t[0]||(t[0]=r=>e.$emit("click",r))}),[(u(),f("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[x("path",vo,[o.title?(u(),f("title",Oo,z(o.title),1)):P("",!0)])],8,wo))],16,bo)}const xo=oe(mo,[["render",So]]),Lo={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Co=["aria-hidden","aria-label"],_o=["fill","width","height"],$o={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},Vo={key:0};function Bo(e,t,o,n,s,i){return u(),f("span",E(e.$attrs,{"aria-hidden":o.title?null:"true","aria-label":o.title,class:"material-design-icon close-icon",role:"img",onClick:t[0]||(t[0]=r=>e.$emit("click",r))}),[(u(),f("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[x("path",$o,[o.title?(u(),f("title",Vo,z(o.title),1)):P("",!0)])],8,_o))],16,Co)}const To=oe(Lo,[["render",Bo]]);function Ie(e,t){const o=[];let n=0,s=e.toLowerCase().indexOf(t.toLowerCase(),n),i=0;for(;s>-1&&i++[]}},computed:{ranges(){let e=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?e=this.highlight:e=Ie(this.text,this.search),e.forEach((t,o)=>{t.end(o.start0&&t.push({start:o.start<0?0:o.start,end:o.end>this.text.length?this.text.length:o.end}),t),[]),e.sort((t,o)=>t.start-o.start),e=e.reduce((t,o)=>{if(!t.length)t.push(o);else{const n=t.length-1;t[n].end>=o.start?t[n]={start:t[n].start,end:Math.max(t[n].end,o.end)}:t.push(o)}return t},[])),e},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const e=[];let t=0,o=0;for(;t=this.ranges.length&&te.highlight?G("strong",{},e.text):e.text)):G("span",{},this.text)}}),ko={name:"NcEllipsisedOption",components:{NcHighlight:Fo},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?Ie(this.name,this.search):[]},highlight2(){return this.highlight1.map(e=>({start:e.start-this.split,end:e.end-this.split}))}}},Do=["title"];function Ao(e,t,o,n,s,i){const r=q("NcHighlight");return u(),f("span",{dir:"auto",class:"name-parts",title:o.name},[K(r,{class:"name-parts__first",text:i.part1,search:o.search,highlight:i.highlight1},null,8,["text","search","highlight"]),i.part2?(u(),I(r,{key:0,class:"name-parts__last",text:i.part2,search:o.search,highlight:i.highlight2},null,8,["text","search","highlight"])):P("",!0)],8,Do)}const Po=oe(ko,[["render",Ao],["__scopeId","data-v-a612f185"]]);Ge(et);const Eo={name:"NcSelect",components:{ChevronDown:xo,NcEllipsisedOption:Po,NcLoadingIcon:Ye,VueSelect:A},props:{...A.props,...A.mixins.reduce((e,t)=>({...e,...t.props}),{}),ariaLabelClearSelected:{type:String,default:Q("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:Q("Options")},ariaLabelDeselectOption:{type:Function,default:e=>Q("Deselect {option}",{option:e})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},keepOpen:{type:Boolean,default:!1},components:{type:Object,default:()=>({Deselect:{render:()=>G(To,{size:20,fillColor:"var(--vs-controls-color)",style:[{cursor:"pointer"}]})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:e,open:t})=>e?!1:t},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>Oe()},inputLabel:{type:String,default:null},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(e,t){return{...e,27:o=>{t.open&&o.stopPropagation(),e[27](o)}}}},uid:{type:String,default:()=>Oe()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},modelValue:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" ","update:modelValue"],setup(){const e=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),t=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline"));return{avatarSize:e-2*t,isLegacy:Qe}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.modelValue===null||Array.isArray(this.modelValue)&&this.modelValue.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(e,t,{width:o})=>{e.style.width=o;const n={name:"addClass",fn(){return e.classList.add("vs__dropdown-menu--floating"),{}}},s={name:"togglePlacementClass",fn({placement:r}){return t.$el.classList.toggle("select--drop-up",r==="top"),e.classList.toggle("vs__dropdown-menu--floating-placement-top",r==="top"),{}}},i=()=>{Ft(t.$refs.toggle,e,{placement:this.placement,middleware:[$t(-1),n,s,Bt(),Vt({limiter:Tt()})]}).then(({x:r,y:l})=>{Object.assign(e.style,{left:`${r}px`,top:`${l}px`,width:`${t.$refs.toggle.getBoundingClientRect().width}px`})})};return _t(t.$refs.toggle,e,i)}},localFilterBy(){return this.filterBy??A.props.filterBy.default},localLabel(){return this.label??A.props.label.default},propsToForward(){const e=[...Object.keys(A.props),...A.mixins.flatMap(t=>Object.keys(t.props??{}))];return{...Object.fromEntries(Object.entries(this.$props).filter(([t,o])=>e.includes(t))),calculatePosition:this.localCalculatePosition,closeOnSelect:!this.keepOpen,filterBy:this.localFilterBy,label:this.localLabel}}},mounted(){!this.labelOutside&&!this.inputLabel&&this.ariaLabelCombobox,this.inputLabel&&this.ariaLabelCombobox},methods:{t:Q}},Ro=["for"],Mo=["required"];function No(e,t,o,n,s,i){const r=q("ChevronDown"),l=q("NcEllipsisedOption"),a=q("NcLoadingIcon"),h=q("VueSelect");return u(),I(h,E({class:["select",{"select--legacy":n.isLegacy,"select--no-wrap":o.noWrap}]},i.propsToForward,{onSearch:t[0]||(t[0]=c=>s.search=c),"onUpdate:modelValue":t[1]||(t[1]=c=>e.$emit("update:modelValue",c))}),Ze({search:F(({attributes:c,events:d})=>[x("input",E({class:["vs__search",[o.inputClass]]},c,{required:i.inputRequired,dir:"auto"},Fe(d,!0)),null,16,Mo)]),"open-indicator":F(({attributes:c})=>[K(r,E(c,{fillColor:"var(--vs-controls-color)",style:{cursor:o.disabled?null:"pointer"},size:26}),null,16,["style"])]),option:F(c=>[b(e.$slots,"option",w(v(c)),()=>[K(l,{name:String(c[i.localLabel]),search:s.search},null,8,["name","search"])])]),"selected-option":F(c=>[b(e.$slots,"selected-option",w(v(c)),()=>[K(l,{name:String(c[i.localLabel]),search:s.search},null,8,["name","search"])])]),spinner:F(c=>[c.loading?(u(),I(a,{key:0})):P("",!0)]),"no-options":F(()=>[te(z(i.t("No results")),1)]),_:2},[!o.labelOutside&&o.inputLabel?{name:"header",fn:F(()=>[x("label",{for:o.inputId,class:"select__label"},z(o.inputLabel),9,Ro)]),key:"0"}:void 0,ue(e.$slots,(c,d)=>({name:d,fn:F(g=>[b(e.$slots,d,w(v(g)))])}))]),1040,["class"])}const jo=oe(Eo,[["render",No]]);export{jo as default}; +//# sourceMappingURL=index-D6u9VflH.chunk.mjs.map diff --git a/js/index-Berf7HSo.chunk.mjs.license b/js/index-D6u9VflH.chunk.mjs.license similarity index 100% rename from js/index-Berf7HSo.chunk.mjs.license rename to js/index-D6u9VflH.chunk.mjs.license diff --git a/js/index-Berf7HSo.chunk.mjs.map b/js/index-D6u9VflH.chunk.mjs.map similarity index 99% rename from js/index-Berf7HSo.chunk.mjs.map rename to js/index-D6u9VflH.chunk.mjs.map index ecb1c7315..47b43bfe9 100644 --- a/js/index-Berf7HSo.chunk.mjs.map +++ b/js/index-D6u9VflH.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"index-Berf7HSo.chunk.mjs","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/vue-select/dist/vue-select.es.js","../node_modules/@nextcloud/vue/dist/chunks/ChevronDown-FiGpp0KT.mjs","../node_modules/@nextcloud/vue/dist/chunks/Close-D6ngJ4t9.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcHighlight.vue_vue_type_script_lang-DnWQDM_2.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcEllipsisedOption-dT-CtXYp.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcSelect-DLheQ2yp.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the element as the offsetParent if it's non-static,\n // while Chrome and Safari return the element. The element must\n // be used to perform the correct calculations even if the element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle