1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[231],{79962:t=>{var e;self,t.exports=(()=>{"use strict";var t={d:(e,i)=>{for(var o in i)t.o(i,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:i[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.d(e,{default:()=>A});var i={};function o(t,e,i,r,n={}){for(let o of(e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]),e))for(let e of i)o[t](e,r,{capture:!1,...n});return Array.prototype.slice.call(arguments,1)}t.r(i),t.d(i,{adjustableInputNumbers:()=>p,createElementFromString:()=>s,createFromTemplate:()=>a,eventPath:()=>l,off:()=>n,on:()=>r,resolveElement:()=>c});let r=o.bind(null,"addEventListener"),n=o.bind(null,"removeEventListener");function s(t){let e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild}function a(t){let e=(t,e)=>{let i=t.getAttribute(e);return t.removeAttribute(e),i},i=(t,o={})=>{let r=e(t,":obj"),n=e(t,":ref"),s=r?o[r]={}:o;for(let r of(n&&(o[n]=t),Array.from(t.children))){let t=e(r,":arr"),o=i(r,t?{}:s);t&&(s[t]||(s[t]=[])).push(Object.keys(o).length?o:r)}return o};return i(s(t))}function l(t){let e=t.path||t.composedPath&&t.composedPath();if(e)return e;let i=t.target.parentElement;for(e=[t.target,i];i=i.parentElement;)e.push(i);return e.push(document,window),e}function c(t){return t instanceof Element?t:"string"==typeof t?t.split(/>>/g).reduce((t,e,i,o)=>(t=t.querySelector(e),i<o.length-1?t.shadowRoot:t),document):null}function p(t,e=t=>t){function i(i){let o=[.001,.01,.1][Number(i.shiftKey||2*i.ctrlKey)]*(i.deltaY<0?1:-1),r=0,n=t.selectionStart;t.value=t.value.replace(/[\d.]+/g,(t,i)=>i<=n&&i+t.length>=n?(n=i,e(Number(t),o,r)):(r++,t)),t.focus(),t.setSelectionRange(n,n),i.preventDefault(),t.dispatchEvent(new Event("input"))}r(t,"focus",()=>r(window,"wheel",i,{passive:!1})),r(t,"blur",()=>n(window,"wheel",i))}let{min:h,max:u,floor:d,round:m}=Math;function v(t,e,i){e/=100,i/=100;let o=d(t=t/360*6),r=t-o,n=i*(1-e),s=i*(1-r*e),a=i*(1-(1-r)*e),l=o%6;return[255*[i,s,n,n,a,i][l],255*[a,i,i,s,n,n][l],255*[n,n,a,i,i,s][l]]}function f(t,e,i){let o,r,n=h(t/=255,e/=255,i/=255),s=u(t,e,i),a=s-n;if(0===a)o=r=0;else{r=a/s;let n=((s-t)/6+a/2)/a,l=((s-e)/6+a/2)/a,c=((s-i)/6+a/2)/a;t===s?o=c-l:e===s?o=1/3+n-c:i===s&&(o=2/3+l-n),o<0?o+=1:o>1&&(o-=1)}return[360*o,100*r,100*s]}function b(t=0,e=0,i=0,o=1){let r=(t,e)=>(i=-1)=>e(~i?t.map(t=>Number(t.toFixed(i))):t),n={h:t,s:e,v:i,a:o,toHSVA(){let t=[n.h,n.s,n.v,n.a];return t.toString=r(t,t=>`hsva(${t[0]}, ${t[1]}%, ${t[2]}%, ${n.a})`),t},toHSLA(){let t=[...function(t,e,i){let o=(2-(e/=100))*(i/=100)/2;return 0!==o&&(e=1===o?0:o<.5?e*i/(2*o):e*i/(2-2*o)),[t,100*e,100*o]}(n.h,n.s,n.v),n.a];return t.toString=r(t,t=>`hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${n.a})`),t},toRGBA(){let t=[...v(n.h,n.s,n.v),n.a];return t.toString=r(t,t=>`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${n.a})`),t},toCMYK(){let t=function(t,e,i){let o=v(t,e,i),r=o[0]/255,n=o[1]/255,s=o[2]/255,a=h(1-r,1-n,1-s);return[100*(1===a?0:(1-r-a)/(1-a)),100*(1===a?0:(1-n-a)/(1-a)),100*(1===a?0:(1-s-a)/(1-a)),100*a]}(n.h,n.s,n.v);return t.toString=r(t,t=>`cmyk(${t[0]}%, ${t[1]}%, ${t[2]}%, ${t[3]}%)`),t},toHEXA(){let t=v(n.h,n.s,n.v).map(t=>m(t).toString(16).padStart(2,"0")),e=n.a>=1?"":Number((255*n.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return e&&t.push(e),t.toString=()=>`#${t.join("").toUpperCase()}`,t},clone:()=>b(n.h,n.s,n.v,n.a)};return n}let g=t=>Math.max(Math.min(t,1),0);function y(t){let e={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},t),_keyboard(t){let{options:i}=e,{type:o,key:r}=t;if(document.activeElement===i.wrapper){let{lock:i}=e.options,n="ArrowUp"===r,s="ArrowRight"===r,a="ArrowDown"===r,l="ArrowLeft"===r;if("keydown"===o&&(n||s||a||l)){let o=0,r=0;"v"===i?o=n||s?1:-1:"h"===i?o=n||s?-1:1:(r=n?-1:+!!a,o=l?-1:+!!s),e.update(g(e.cache.x+.01*o),g(e.cache.y+.01*r)),t.preventDefault()}else r.startsWith("Arrow")&&(e.options.onstop(),t.preventDefault())}},_tapstart(t){r(document,["mouseup","touchend","touchcancel"],e._tapstop),r(document,["mousemove","touchmove"],e._tapmove),t.cancelable&&t.preventDefault(),e._tapmove(t)},_tapmove(t){let{options:i,cache:o}=e,{lock:r,element:n,wrapper:s}=i,a=s.getBoundingClientRect(),l=0,c=0;if(t){let e=t&&t.touches&&t.touches[0];l=t?(e||t).clientX:0,c=t?(e||t).clientY:0,l<a.left?l=a.left:l>a.left+a.width&&(l=a.left+a.width),c<a.top?c=a.top:c>a.top+a.height&&(c=a.top+a.height),l-=a.left,c-=a.top}else o&&(l=o.x*a.width,c=o.y*a.height);"h"!==r&&(n.style.left=`calc(${l/a.width*100}% - ${n.offsetWidth/2}
1px)`),"v"!==r&&(n.style.top=`calc(${c/a.height*100}% - ${n.offsetHeight/2}px)`),e.cache={x:l/a.width,y:c/a.height};let p=g(l/a.width),h=g(c/a.height);switch(r){case"v":return i.onchange(p);case"h":return i.onchange(h);default:return i.onchange(p,h)}},_tapstop(){e.options.onstop(),n(document,["mouseup","touchend","touchcancel"],e._tapstop),n(document,["mousemove","touchmove"],e._tapmove)},trigger(){e._tapmove()},update(t=0,i=0){let{left:o,top:r,width:n,height:s}=e.options.wrapper.getBoundingClientRect();"h"===e.options.lock&&(i=t),e._tapmove({clientX:o+n*t,clientY:r+s*i})},destroy(){let{options:t,_tapstart:i,_keyboard:o}=e;n(document,["keydown","keyup"],o),n([t.wrapper,t.element],"mousedown",i),n([t.wrapper,t.element],"touchstart",i,{passive:!1})}},{options:i,_tapstart:o,_keyboard:s}=e;return r([i.wrapper,i.element],"mousedown",o),r([i.wrapper,i.element],"touchstart",o,{passive:!1}),r(document,["keydown","keyup"],s),e}let _={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0},w=(t,e,i)=>{let o="object"!=typeof t||t instanceof HTMLElement?{reference:t,popper:e,...i}:t;return{update(t=o){let{reference:e,popper:i}=Object.assign(o,t);if(!i||!e)throw Error("Popper- or reference-element missing.");return((t,e,i)=>{let{container:o,arrow:r,margin:n,padding:s,position:a,variantFlipOrder:l,positionFlipOrder:c}={container:document.documentElement.getBoundingClientRect(),..._,...i},{left:p,top:h}=e.style;e.style.left="0",e.style.top="0";let u=t.getBoundingClientRect(),d=e.getBoundingClientRect(),m={t:u.top-d.height-n,b:u.bottom+n,r:u.right+n,l:u.left-d.width-n},v={vs:u.left,vm:u.left+u.width/2-d.width/2,ve:u.left+u.width-d.width,hs:u.top,hm:u.bottom-u.height/2-d.height/2,he:u.bottom-d.height},[f,b="middle"]=a.split("-"),g=c[f],y=l[b],{top:w,left:A,bottom:C,right:$}=o;for(let t of g){let i="t"===t||"b"===t,o=m[t],[n,a]=i?["top","left"]:["left","top"],[l,c]=i?[d.height,d.width]:[d.width,d.height],[p,h]=i?[C,$]:[$,C],[f,b]=i?[w,A]:[A,w];if(!(o<f||o+l+s>p))for(let p of y){let m=v[(i?"v":"h")+p];if(!(m<b||m+c+s>h)){if(m-=d[a],o-=d[n],e.style[a]=`${m}px`,e.style[n]=`${o}px`,r){let e=i?u.width/2:u.height/2,s=c/2,h=e>s,d=m+({s:h?s:e,m:s,e:h?s:c-e})[p],v=o+({t:l,b:0,r:0,l})[t];r.style[a]=`${d}px`,r.style[n]=`${v}px`}return t+p}}}return e.style.left=p,e.style.top=h,null})(e,i,o)}}};class A{static utils=i;static version="1.9.1";static I18N_DEFAULTS={"ui:dialog":"color picker dialog","btn:toggle":"toggle color picker dialog","btn:swatch":"color swatch","btn:last-color":"use previous color","btn:save":"Save","btn:cancel":"Cancel","btn:clear":"Clear","aria:btn:save":"save and close","aria:btn:cancel":"cancel and close","aria:btn:clear":"clear and close","aria:input":"color input field","aria:palette":"color selection area","aria:hue":"hue selection slider","aria:opacity":"selection slider"};static DEFAULT_OPTIONS={appClass:null,theme:"classic",useAsButton:!1,padding:8,disabled:!1,comparison:!0,closeOnScroll:!1,outputPrecision:0,lockOpacity:!1,autoReposition:!0,container:"body",components:{interaction:{}},i18n:{},swatches:null,inline:!1,sliders:null,default:"#42445a",defaultRepresentation:null,position:"bottom-middle",adjustableNumbers:!0,showAlways:!1,closeWithKey:"Escape"};_initializingActive=!0;_recalc=!0;_nanopop=null;_root=null;_color=b();_lastColor=b();_swatchColors=[];_setupAnimationFrame=null;_eventListener={init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]};constructor(t){this.options=t=Object.assign({...A.DEFAULT_OPTIONS},t);let{swatches:e,components:i,theme:o,sliders:r,lockOpacity:n,padding:s}=t;["nano","monolith"].includes(o)&&!r&&(t.sliders="h"),i.interaction||(i.interaction={});let{preview:a,opacity:l,hue:c,palette:p}=i;i.opacity=!n&&l,i.palette=p||a||l||c,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),e&&e.length&&e.forEach(t=>this.addSwatch(t));let{button:h,app:u}=this._root;this._nanopop=w(h,u,{margin:s}),h.setAttribute("role","button"),h.setAttribute("aria-label",this._t("btn:toggle"));let d=this;this._setupAnimationFrame=requestAnimationFrame(function e(){if(!u.offsetWidth)return requestAnimationFrame(e);d.setColor(t.default),d._rePositioningPicker(),t.defaultRepresentation&&(d._representation=t.defaultRepresentation,d.setColorRepresentation(d._representation)),t.showAlways&&d.show(),d._initializingActive=!1,d._emit("init")})}static create=t=>new A(t);_preBuild(){let{options:t}=this;for(let e of["el","container"])t[e]=c(t[e]);this._root=(t=>{let{components:e,useAsButton:i,inline:o,appClass:r,theme:n,lockOpacity:s}=t.options,l=t=>t?"":'style="display:none" hidden',c=e=>t._t(e),p=a(` 2 <div :ref="root" class="pickr"> 3 4 ${i?"":'<button type="button" :ref="button" class="pcr-button"></button>'} 5 6 <div :ref="app" class="pcr-app ${r||""}" data-theme="${n}" ${o?'style="position: unset"':""} aria-label="${c("ui:dialog")}" role="window"> 7 <div class="pcr-selection" ${l(e.palette)}> 8 <div :obj="preview" class="pcr-color-preview" ${l(e.preview)}> 9 <button type="button" :ref="lastColor" class="pcr-last-color" aria-label="${c("btn:last-color")}"></button> 10 <div :ref="currentColor" class="pcr-current-color"></div> 11 </div> 12
13 <div :obj="palette" class="pcr-color-palette"> 14 <div :ref="picker" class="pcr-picker"></div> 15 <div :ref="palette" class="pcr-palette" tabindex="0" aria-label="${c("aria:palette")}" role="listbox"></div> 16 </div> 17 18 <div :obj="hue" class="pcr-color-chooser" ${l(e.hue)}> 19 <div :ref="picker" class="pcr-picker"></div> 20 <div :ref="slider" class="pcr-hue pcr-slider" tabindex="0" aria-label="${c("aria:hue")}" role="slider"></div> 21 </div> 22 23 <div :obj="opacity" class="pcr-color-opacity" ${l(e.opacity)}> 24 <div :ref="picker" class="pcr-picker"></div> 25 <div :ref="slider" class="pcr-opacity pcr-slider" tabindex="0" aria-label="${c("aria:opacity")}" role="slider"></div> 26 </div> 27 </div> 28 29 <div class="pcr-swatches ${e.palette?"":"pcr-last"}" :ref="swatches"></div> 30 31 <div :obj="interaction" class="pcr-interaction" ${l(Object.keys(e.interaction).length)}> 32 <input :ref="result" class="pcr-result" type="text" spellcheck="false" ${l(e.interaction.input)} aria-label="${c("aria:input")}"> 33 34 <input :arr="options" class="pcr-type" data-type="HEXA" value="${s?"HEX":"HEXA"}" type="button" ${l(e.interaction.hex)}> 35 <input :arr="options" class="pcr-type" data-type="RGBA" value="${s?"RGB":"RGBA"}" type="button" ${l(e.interaction.rgba)}> 36 <input :arr="options" class="pcr-type" data-type="HSLA" value="${s?"HSL":"HSLA"}" type="button" ${l(e.interaction.hsla)}> 37 <input :arr="options" class="pcr-type" data-type="HSVA" value="${s?"HSV":"HSVA"}" type="button" ${l(e.interaction.hsva)}> 38 <input :arr="options" class="pcr-type" data-type="CMYK" value="CMYK" type="button" ${l(e.interaction.cmyk)}> 39 40 <input :ref="save" class="pcr-save" value="${c("btn:save")}" type="button" ${l(e.interaction.save)} aria-label="${c("aria:btn:save")}"> 41 <input :ref="cancel" class="pcr-cancel" value="${c("btn:cancel")}" type="button" ${l(e.interaction.cancel)} aria-label="${c("aria:btn:cancel")}"> 42 <input :ref="clear" class="pcr-clear" value="${c("btn:clear")}" type="button" ${l(e.interaction.clear)} aria-label="${c("aria:btn:clear")}"> 43 </div> 44 </div> 45 </div> 46 `),h=p.interaction;return h.options.find(t=>!t.hidden&&!t.classList.add("active")),h.type=()=>h.options.find(t=>t.classList.contains("active")),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){let t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){let i=t.el.parentElement;t.el.nextSibling?i.insertBefore(e.app,t.el.nextSibling):i.appendChild(e.app)}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){let t=this,e=this.options.components,i=(t.options.sliders||"v").repeat(2),[o,s]=i.match(/^[vh]+$/g)?i:[],a=()=>this._color||(this._color=this._lastColor.clone()),l={palette:y({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(i,o){if(!e.palette)return;let r=a(),{_root:n,options:s}=t,{lastColor:l,currentColor:c}=n.preview;t._recalc&&(r.s=100*i,r.v=100-100*o,r.v<0&&(r.v=0),t._updateOutput("slider"));let p=r.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=` 47 linear-gradient(to top, rgba(0, 0, 0, ${r.a}), transparent), 48 linear-gradient(to left, hsla(${r.h}, 100%, 50%, ${r.a}), rgba(255, 255, 255, ${r.a})) 49 `,s.comparison?s.useAsButton||t._lastColor||l.style.setProperty("--pcr-color",p):(n.button.style.setProperty("--pcr-color",p),n.button.classList.remove("clear"));let h=r.toHEXA().toString();for(let{el:e,color:i}of t._swatchColors)e.classList[h===i.toHEXA().toString()?"add":"remove"]("pcr-active");c.style.setProperty("--pcr-color",p)}}),hue:y({lock:"v"===s?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(i){if(!e.hue||!e.palette)return;let o=a();t._recalc&&(o.h=360*i),this.element.style.backgroundColor=`hsl(${o.h}, 100%, 50%)`,l.palette.trigger()}}),opacity:y({lock:"v"===o?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(i){if(!e.opacity||!e.palette)return;let o=a();t._recalc&&(o.a=Math.round(100*i)/100),this.element.style.background=`rgba(0, 0, 0, ${o.a})`,l.palette.trigger()}}),selectable:function(t={}){let e=r((t=Object.assign({onchange:()=>0,className:"",elements:[]},t)).elements,"click",e=>
49{t.elements.forEach(i=>i.classList[e.target===i?"add":"remove"](t.className)),t.onchange(e),e.stopPropagation()});return{destroy:()=>n(...e)}}({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=l}_bindEvents(){let{_root:t,options:e}=this,i=[r(t.interaction.clear,"click",()=>this._clearColor()),r([t.interaction.cancel,t.preview.lastColor],"click",()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")}),r(t.interaction.save,"click",()=>{this.applyColor()||e.showAlways||this.hide()}),r(t.interaction.result,["keyup","input"],t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()}),r(t.interaction.result,["focus","blur"],t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)}),r([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],()=>this._recalc=!0,{passive:!0})];if(!e.showAlways){let o=e.closeWithKey;i.push(r(t.button,"click",()=>this.isOpen()?this.hide():this.show()),r(document,"keyup",t=>this.isOpen()&&(t.key===o||t.code===o)&&this.hide()),r(document,["touchstart","mousedown"],e=>{this.isOpen()&&!l(e).some(e=>e===t.app||e===t.button)&&this.hide()},{capture:!0}))}if(e.adjustableNumbers){let e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,(t,i,o)=>{let r=e[this.getColorRepresentation().toLowerCase()];if(r){let e=r[o],n=t+(e>=100?1e3*i:i);return n<=0?0:Number((n<e?n:e).toPrecision(3))}return t})}if(e.autoReposition&&!e.inline){let t=null,o=this;i.push(r(window,["scroll","resize"],()=>{o.isOpen()&&(e.closeOnScroll&&o.hide(),null===t?(t=setTimeout(()=>t=null,100),requestAnimationFrame(function e(){o._rePositioningPicker(),null!==t&&requestAnimationFrame(e)})):(clearTimeout(t),t=setTimeout(()=>t=null,100)))},{capture:!0}))}this._eventBindings=i}_rePositioningPicker(){let{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){let t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px"}}_updateOutput(t){let{_root:e,_color:i,options:o}=this;if(e.interaction.type()){let t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof i[t]?i[t]().toString(o.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",i,t,this)}_clearColor(t=!1){let{_root:e,options:i}=this;i.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),i.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){let{values:e,type:i,a:o}=function(t){let e;t=t.match(/^[a-zA-Z]+$/)?function(t){if("black"===t.toLowerCase())return"#000";let e=document.createElement("canvas").getContext("2d");return e.fillStyle=t,"#000"===e.fillStyle?null:e.fillStyle}(t):t;let i={cmyk:/^cmyk\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)/i,rgba:/^rgba?\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D*?(([\d.]+)(%?)|$)/i,hsla:/^hsla?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hsva:/^hsva?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},o=t=>t.map(t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0);t:for(let l in i)if(e=i[l].exec(t))switch(l){case"cmyk":{var r,n,s,a;let[,t,i,c,p]=o(e);if(t>100||i>100||c>100||p>100)break t;return{values:(r=t,n=i/100,s=c/100,[...f(255*(1-h(1,(r/=100)*(1-(a=p/100))+a)),255*(1-h(1,n*(1-a)+a)),255*(1-h(1,s*(1-a)+a)))]),type:l}}case"rgba":{let[,t,,i,,r,,,n]=o(e);if(t="%"===e[2]?t/100*255:t,i="%"===e[4]?i/100*255:i,r="%"===e[6]?r/100*255:r,n="%"===e[9]?n/100:n,t>255||i>255||r>255||n<0||n>1)break t;
49return{values:[...f(t,i,r),n],a:n,type:l}}case"hexa":{let[,t]=e;4!==t.length&&3!==t.length||(t=t.split("").map(t=>t+t).join(""));let i=t.substring(0,6),o=t.substring(6);return o=o?parseInt(o,16)/255:void 0,{values:[...f(...i.match(/.{2}/g).map(t=>parseInt(t,16))),o],a:o,type:l}}case"hsla":{let[,t,i,r,,n]=o(e);if(n="%"===e[6]?n/100:n,t>360||i>100||r>100||n<0||n>1)break t;return{values:[...function(t,e,i){e/=100;let o=2*(e*=(i/=100)<.5?i:1-i)/(i+e)*100,r=100*(i+e);return[t,isNaN(o)?0:o,r]}(t,i,r),n],a:n,type:l}}case"hsva":{let[,t,i,r,,n]=o(e);if(n="%"===e[6]?n/100:n,t>360||i>100||r>100||n<0||n>1)break t;return{values:[t,i,r,n],a:n,type:l}}}return{values:null,type:null}}(t),{lockOpacity:r}=this.options;return e&&3===e.length&&(e[3]=void 0),{values:!e||r&&void 0!==o&&1!==o?null:e,type:i}}_t(t){return this.options.i18n[t]||A.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach(t=>t(...e,this))}on(t,e){return this._eventListener[t].push(e),this}off(t,e){let i=this._eventListener[t]||[],o=i.indexOf(e);return~o&&i.splice(o,1),this}addSwatch(t){let{values:e}=this._parseLocalColor(t);if(e){let{_swatchColors:t,_root:i}=this,o=b(...e),n=s(`<button type="button" style="--pcr-color: ${o.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);
49return i.swatches.appendChild(n),t.push({el:n,color:o}),this._eventBindings.push(r(n,"click",()=>{this.setHSVA(...o.toHSVA(),!0),this._emit("swatchselect",o),this._emit("change",o,"swatch",this)})),!0}return!1}removeSwatch(t){let e=this._swatchColors[t];if(e){let{el:i}=e;return this._root.swatches.removeChild(i),this._swatchColors.splice(t,1),!0}return!1}applyColor(t=!1){let{preview:e,button:i}=this._root,o=this._color.toRGBA().toString(0);return e.lastColor.style.setProperty("--pcr-color",o),this.options.useAsButton||i.style.setProperty("--pcr-color",o),i.classList.remove("clear"),this._lastColor=this._color.clone(),this._initializingActive||t||this._emit("save",this._color),this}destroy(){cancelAnimationFrame(this._setupAnimationFrame),this._eventBindings.forEach(t=>n(...t)),Object.keys(this._components).forEach(t=>this._components[t].destroy())}destroyAndRemove(){this.destroy();let{root:t,app:e}=this._root;t.parentElement&&t.parentElement.removeChild(t),e.parentElement.removeChild(e),Object.keys(this).forEach(t=>this[t]=null)}hide(){return!!this.isOpen()&&(this._root.app.classList.remove("visible"),this._emit("hide"),!0)}show(){return!this.options.disabled&&!this.isOpen()&&(this._root.app.classList.add("visible"),this._rePositioningPicker(),this._emit("show",this._color),this)}isOpen(){return this._root.app.classList.contains("visible")}setHSVA(t=360,e=0,i=0,o=1,r=!1){let n=this._recalc;if(this._recalc=!1,t<0||t>360||e<0||e>100||i<0||i>100||o<0||o>1)return!1;this._color=b(t,e,i,o);let{hue:s,opacity:a,palette:l}=this._components;return s.update(t/360),a.update(o),l.update(e/100,1-i/100),r||this.applyColor(),n&&this._updateOutput(),this._recalc=n,!0}setColor(t,e=!1){if(null===t)return this._clearColor(e),!0;let{values:i,type:o}=this._parseLocalColor(t);if(i){let t=o.toUpperCase(),{options:r}=this._root.interaction,n=r.find(e=>e.getAttribute("data-type")===t);if(n&&!n.hidden)for(let t of r)t.classList[t===n?"add":"remove"]("active");return!!this.setHSVA(...i,e)&&this.setColorRepresentation(t)}return!1}setColorRepresentation(t){return t=t.toUpperCase(),!!this._root.interaction.options.find(e=>e.getAttribute("data-type").startsWith(t)&&!e.click())}getColorRepresentation(){return this._representation}getColor(){return this._color}getSelectedColor(){return this._lastColor}getRoot(){return this._root}disable(){return this.hide(),this.options.disabled=!0,this._root.button.classList.add("disabled"),this}enable(){return this.options.disabled=!1,this._root.button.classList.remove("disabled"),this}}return e.default})()},81912:()=>{}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.