UNPKG

buefy

Version:

Lightweight UI components for Vue.js (v3) based on Bulma

2 lines 76.5 kB
/*! Buefy v3.0.7 | MIT License | github.com/buefy/buefy */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Colorpicker={},e.Vue)}(this,(function(e,t){"use strict";var s=Object.defineProperty,i=Math.pow,o=(e,t,i)=>((e,t,i)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,t+"",i);const n=["red","green","blue","alpha"],a={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",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",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",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",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"};class r extends Error{constructor(){super("ColorTypeError: type must be hex(a), rgb(a) or hsl(a)")}}class l{constructor(...e){if(o(this,"$channels"),e.length>0)return l.parse(...e);this.$channels=new Uint8Array(n.length)}get red(){return this.$channels[0]}set red(e){Number.isNaN(e/1)||(this.$channels[0]=Math.min(255,Math.max(0,e)))}get green(){return this.$channels[1]}set green(e){Number.isNaN(e/1)||(this.$channels[1]=Math.min(255,Math.max(0,e)))}get blue(){return this.$channels[2]}set blue(e){Number.isNaN(e/1)||(this.$channels[2]=Math.min(255,Math.max(0,e)))}get alpha(){return this.$channels[3]}set alpha(e){Number.isNaN(e/1)||(this.$channels[3]=Math.min(255,Math.max(0,e)))}get hue(){return this.getHue()}set hue(e){Number.isNaN(e/1)||this.setHue(e)}get saturation(){return this.getSaturation()}set saturation(e){Number.isNaN(e/1)||this.setSaturation(e)}get lightness(){return this.getLightness()}set lightness(e){Number.isNaN(e/1)||this.setLightness(e)}getHue(){const[e,t,s]=Array.from(this.$channels).map((e=>e/255)),[i,o]=[Math.min(e,t,s),Math.max(e,t,s)],n=o-i;let a=0;if(0===n)return a;for(a=e===o?(t-s)/n%6:t===o?(s-e)/n+2:(e-t)/n+4,a*=60;a!==-1/0&&a<0;)a+=360;return Math.round(a%360)}setHue(e){const t=l.fromHSL(e,this.saturation,this.lightness,this.alpha/255);for(let e=0;e<this.$channels.length;e++)this.$channels[e]=Number(t.$channels[e])}getSaturation(){const[e,t,s]=Array.from(this.$channels).map((e=>e/255)),[i,o]=[Math.min(e,t,s),Math.max(e,t,s)],n=o-i;return 0!==n?Math.round(n/(1-Math.abs(2*this.lightness-1))*100)/100:0}setSaturation(e){const t=l.fromHSL(this.hue,e,this.lightness,this.alpha/255);n.forEach(((e,s)=>this.$channels[s]=t.$channels[s]))}getLightness(){const[e,t,s]=Array.from(this.$channels).map((e=>e/255)),[i,o]=[Math.min(e,t,s),Math.max(e,t,s)];return Math.round((o+i)/2*100)/100}setLightness(e){const t=l.fromHSL(this.hue,this.lightness,e,this.alpha/255);n.forEach(((e,s)=>this.$channels[s]=t.$channels[s]))}clone(){const e=new l;return n.forEach(((t,s)=>e.$channels[s]=this.$channels[s])),e}toString(e="hex"){switch(String(e).toLowerCase()){case"hex":return"#"+n.slice(0,3).map((e=>this[e].toString(16).padStart(2,"0"))).join("");case"hexa":return"#"+n.map((e=>this[e].toString(16).padStart(2,"0"))).join("");case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${Math.round(this.alpha/2.55)/100})`;case"hsl":return`hsl(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%)`;case"hsla":return`hsla(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%, ${Math.round(this.alpha/2.55)/100})`;default:throw new r}}get[Symbol.toStringTag](){return this.toString("hex")}static parse(...e){if("object"==typeof e[0])return l.parseObject(e[0]);if(e.every((e=>!Number.isNaN(e/1)))){const t=new l;if(e.length>3)t.red=e[0],t.green=e[1],t.blue=e[2],e[3]&&(t.alpha=e[3]);else if(1===e.length){const t=Number(e[0]);return l.parseIndex(t,t>i(2,24)?3:4)}}else if("string"==typeof e[0]){let t=null;if("string"==typeof a[e[0].toLowerCase()])return l.parseHex(a[e[0].toLowerCase()]);if(null!==(t=e[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return l.parseHex(t[2]);if(null!==(t=e[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){const e=[t[1],t[2],t[3],void 0!==t[5]?t[5]:1];return l.fromRGB(...e.map((e=>Number(e))))}if(e[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}static parseObject(e){const t=new l;return null===e||"object"!=typeof e?t:l.isColor(e)?e.clone():(n.forEach((s=>{Number.isNaN(e[s])||(t[s]=e[s])})),t)}static parseHex(e){if("string"!=typeof e)throw new Error("Hex expression must be a string");if(3!==(e=e.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==e.length||(e=e.split("").map((e=>e.repeat(2))).join("")),6!==e.length&&8!==e.length)throw new Error("Incorrect Hex expression length");const t=e.split(/(..)/).filter((e=>e)).map((e=>Number.parseInt(e,16)));return"number"==typeof t[3]&&(t[3]/=255),l.fromRGB(...t)}static parseIndex(e,t=3){const s=new l;for(let i=0;i<4;i++)s[n[i]]=e>>8*(t-i)&&255;return s}static fromRGB(e,t,s,i=1){if([e,t,s,i].some((e=>Number.isNaN(e/1))))throw new Error("Invalid arguments");i*=255;const o=new l;return[e,t,s,i].forEach(((e,t)=>{o[n[t]]=e})),o}static fromHSL(e,t,s,i=1){if([e,t,s,i].some((e=>Number.isNaN(e))))throw new Error("Invalid arguments");for(;e<0&&e!==-1/0;)e+=360;e%=360,t=Math.max(0,Math.min(1,t)),s=Math.max(0,Math.min(1,s)),i=Math.max(0,Math.min(1,i));const o=(1-Math.abs(2*s-1))*t,n=o*(1-Math.abs(e/60%2-1)),a=s-o/2,[r,c,h]=e<60?[o,n,0]:e<120?[n,o,0]:e<180?[0,o,n]:e<240?[0,n,o]:e<300?[n,0,o]:[o,0,n];return l.fromRGB(255*(r+a),255*(c+a),255*(h+a),i)}static isColor(e){return e instanceof l}}let c={defaultIconPack:"mdi",defaultIconComponent:null,defaultLocale:void 0,defaultTooltipType:"is-primary",defaultTooltipDelay:null,defaultTooltipCloseDelay:null,defaultInputAutocomplete:"on",defaultInputHasCounter:!0,defaultCompatFallthrough:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerMobileModal:!0,defaultTrapFocus:!0,defaultButtonRounded:!1,defaultStatusIcon:!0,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"]};const h={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&(window.navigator.userAgent.match(/iPhone|iPad|iPod/i)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return h.Android()||h.BlackBerry()||h.iOS()||h.Opera()||h.Windows()}};function u(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}function d(e){const t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";const s=document.createElement("div");return t.appendChild(s),s.appendChild(e),document.body.appendChild(t),t}var p=t.defineComponent({name:"BFieldBody",inject:{parent:{from:"BField",default:null}},props:{message:{type:[String,Array]},type:{type:[String,Object]}},render(){let e=!0,s="function"==typeof this.$slots.default?this.$slots.default():this.$slots.default;return null!=s&&1===s.length&&s[0].type===t.Fragment&&(s=s[0].children),t.h("div",{class:"field-body"},{default:()=>null!=s&&s.map((s=>{if(s.type===t.Comment||s.type===t.Text)return s;let i;e&&(i=this.message,e=!1);const o=this.parent;return t.h(o?o.$.type:t.resolveComponent("b-field"),{type:this.type,message:i},(()=>s))}))})}});const m=t.defineComponent({name:"BField",components:{BFieldBody:p},provide(){return{BField:this}},inject:{parent:{from:"BField",default:!1}},props:{type:{type:[String,Object],default:void 0},label:String,labelFor:String,message:{type:[String,Array,Object],default:void 0},grouped:Boolean,groupMultiline:Boolean,position:String,expanded:Boolean,horizontal:Boolean,addons:{type:Boolean,default:!0},customClass:String,labelPosition:{type:String,default:()=>c.defaultFieldLabelPosition}},data(){return{newType:this.type,newMessage:this.message,fieldLabelSize:null,numberInputClasses:[],_isField:!0}},computed:{rootClasses(){return[{"is-expanded":this.expanded,"is-horizontal":this.horizontal,"is-floating-in-label":this.hasLabel&&!this.horizontal&&"inside"===this.labelPosition,"is-floating-label":this.hasLabel&&!this.horizontal&&"on-border"===this.labelPosition},this.numberInputClasses]},innerFieldClasses(){return[this.fieldType(),this.newPosition,{"is-grouped-multiline":this.groupMultiline}]},hasInnerField(){return this.grouped||this.groupMultiline||this.hasAddons()},newPosition(){if(void 0===this.position)return;const e=this.position.split("-");if(e.length<1)return;const t=this.grouped?"is-grouped-":"has-addons-";return this.position?t+e[1]:void 0},formattedMessage(){const e=this.parent;if(e&&e.hasInnerField)return"";if("string"==typeof this.newMessage)return[this.newMessage];const t=[];if(Array.isArray(this.newMessage))this.newMessage.forEach((e=>{if("string"==typeof e)t.push(e);else for(const s in e)e[s]&&t.push(s)}));else for(const e in this.newMessage)this.newMessage[e]&&t.push(e);return t.filter((e=>!!e))},hasLabel(){return this.label||this.$slots.label},hasMessage(){const e=this.parent;return(!e||!e.hasInnerField)&&this.newMessage||this.$slots.message}},watch:{type(e){this.newType=e},message(e){JSON.stringify(e)!==JSON.stringify(this.newMessage)&&(this.newMessage=e)},newMessage(e){const t=this.parent;t&&t.hasInnerField&&(t.type||(t.newType=this.newType),t.message||(t.newMessage=e))}},methods:{fieldType(){return this.grouped?"is-grouped":this.hasAddons()?"has-addons":void 0},hasAddons(){let e=0;return this.$slots.default&&(e=this.$slots.default().reduce(((e,s)=>{return(i=s).type!==t.Comment&&i.type!==t.Text&&i.type!==t.Static?e+1:e;var i}),0)),e>1&&this.addons&&!this.horizontal},wrapNumberinput({controlsPosition:e,size:t}){const s=["has-numberinput"];e&&s.push(`has-numberinput-${e}`),t&&s.push(`has-numberinput-${t}`),this.numberInputClasses=s}},mounted(){if(this.horizontal){this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider").length>0&&(this.fieldLabelSize="is-normal")}}});var f=(e,t)=>{const s=e.__vccOpts||e;for(const[e,i]of t)s[e]=i;return s};const g=["for"],y=["for"],v={key:3,class:"field-body"};var b=f(m,[["render",function(e,s,i,o,n,a){const r=t.resolveComponent("b-field-body"),l=t.resolveComponent("b-field");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field",e.rootClasses])},[e.horizontal?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["field-label",[e.customClass,e.fieldLabelSize]])},[e.hasLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.labelFor,class:t.normalizeClass([e.customClass,"label"])},[e.$slots.label?t.renderSlot(e.$slots,"label",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.label),1)],64))],10,g)):t.createCommentVNode("v-if",!0)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.hasLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.labelFor,class:t.normalizeClass([e.customClass,"label"])},[e.$slots.label?t.renderSlot(e.$slots,"label",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.label),1)],64))],10,y)):t.createCommentVNode("v-if",!0)],64)),e.horizontal?(t.openBlock(),t.createBlock(r,{key:2,message:e.newMessage?e.formattedMessage:"",type:e.newType},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["message","type"])):e.hasInnerField?(t.openBlock(),t.createElementBlock("div",v,[t.createVNode(l,{addons:!1,type:e.type,class:t.normalizeClass(e.innerFieldClasses)},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["type","class"])])):t.renderSlot(e.$slots,"default",{key:4}),e.hasMessage&&!e.horizontal?(t.openBlock(),t.createElementBlock("p",{key:5,class:t.normalizeClass(["help",e.newType])},[e.$slots.message?t.renderSlot(e.$slots,"message",{key:0,messages:e.formattedMessage}):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.formattedMessage,((s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createTextVNode(t.toDisplayString(s)+" ",1),i+1<e.formattedMessage.length?(t.openBlock(),t.createElementBlock("br",{key:i})):t.createCommentVNode("v-if",!0)],64)))),256))],2)):t.createCommentVNode("v-if",!0)],2)}]]);const k=t.defineComponent({props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:()=>c.defaultUseHtml5Validation},validationMessage:String,locale:{type:[String,Array],default:()=>c.defaultLocale},statusIcon:{type:Boolean,default:()=>c.defaultStatusIcon}},emits:{blur:e=>!0,focus:e=>!0},data(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||c.defaultIconPack,_elementRef:""}},computed:{parentField(){let e=this.$parent;for(let t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType(){const{newType:e}=this.parentField||{};if(e){if("string"==typeof e)return e;for(const t in e)if(e[t])return t}},statusMessage(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus(){const e=this.getElement();void 0!==e&&this.$nextTick((()=>{e&&e.focus()}))},onBlur(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus(e){this.isFocused=!0,this.$emit("focus",e)},getElement(){let e=this.$refs[this.$data._elementRef];for(;null!=e&&"object"==typeof e&&"$refs"in e;){const t=e;e=t.$refs[t.$data._elementRef]}return e},setInvalid(){const e=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",e)},setValidity(e,t){this.$nextTick((()=>{this.parentField&&(this.parentField.type||(this.parentField.newType=e),this.parentField.message||(this.parentField.newMessage=t))}))},checkHtml5Validity(){if(!this.useHtml5Validation)return!1;const e=this.getElement();return null!=e&&(e.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid)}}}),w={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},C=()=>{const e="fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}},M={checkboxOn:{type:"svg",viewBox:"0 0 1 1",path:"M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z"},checkboxIndeterminate:{type:"svg",viewBox:"0 0 1 1",path:"M 0.15,0.4 L 0.85,0.4 L 0.85,0.6 L 0.15,0.6 Z"},chevronLeft:{type:"svg",path:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},chevronRight:{type:"svg",path:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},chevronDown:{type:"svg",path:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},chevronUp:{type:"svg",path:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"},menuDown:{type:"svg",path:"M7,10L12,15L17,10H7Z"},menuUp:{type:"svg",path:"M7,14L12,9L17,14H7Z"},check:{type:"svg",path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},alertCircle:{type:"svg",path:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},alert:{type:"svg",path:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"},information:{type:"svg",path:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},close:{type:"svg",path:"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"},closeCircle:{type:"svg",path:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},eye:{type:"svg",path:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"},eyeOff:{type:"svg",path:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.18 16.38,18.6L16.81,19L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"}};function x(e){return M[e]}var B=t.defineComponent({name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:{type:String,required:!1,default:void 0},alias:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{resolvedAlias(){var e;return this.alias&&null!=(e=x(this.alias))?e:null},isSvgAlias(){var e;return"svg"===(null==(e=this.resolvedAlias)?void 0:e.type)},isComponentAlias(){var e;return"component"===(null==(e=this.resolvedAlias)?void 0:e.type)},resolvedAliasSvg(){return this.resolvedAlias},resolvedAliasComponent(){return this.resolvedAlias},iconConfig(){return{mdi:w,fa:C(),fas:C(),far:C(),fad:C(),fab:C(),fal:C(),"fa-solid":C(),"fa-regular":C(),"fa-light":C(),"fa-thin":C(),"fa-duotone":C(),"fa-brands":C()}[this.newPack]},iconPrefix(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon(){var e;return`${this.iconPrefix}${this.getEquivalentIconOf(null!=(e=this.icon)?e:"")}`},newPack(){return this.pack||c.defaultIconPack},newType(){if(!this.type)return;let e=[];if("string"==typeof this.type)e=this.type.split("-");else for(const t in this.type)if(this.type[t]){e=t.split("-");break}if(e.length<=1)return;const[,...t]=e;return`has-text-${t.join("-")}`},newCustomSize(){return this.customSize||this.customSizeByPack},customSizeByPack(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent(){return this.component||c.defaultIconComponent}},methods:{getEquivalentIconOf(e){if(!this.both)return e;if(null==this.iconConfig)return e;const t=this.iconConfig;return t&&t.internalIcons&&t.internalIcons[e]?t.internalIcons[e]:e}}});const $=["viewBox"],L=["d"];var S=f(B,[["render",function(e,s,i,o,n,a){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["icon",[e.newType,e.size]])},[e.isSvgAlias?(t.openBlock(),t.createElementBlock("svg",{key:0,viewBox:e.resolvedAliasSvg.viewBox||"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass(e.customClass),"aria-hidden":"true"},[t.createElementVNode("path",{fill:"currentColor",d:e.resolvedAliasSvg.path},null,8,L)],10,$)):e.isComponentAlias?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.resolvedAliasComponent.component),{key:1,icon:e.resolvedAliasComponent.icon,class:t.normalizeClass(e.customClass)},null,8,["icon","class"])):e.useIconComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.useIconComponent),{key:3,icon:[e.newPack,e.newIcon],size:e.newCustomSize,class:t.normalizeClass([e.customClass])},null,8,["icon","size","class"])):(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass([e.newPack,e.newIcon,e.newCustomSize,e.customClass])},null,2))],2)}]]);const A=["button","submit","reset"];var E=t.defineComponent({name:"BButton",components:{BIcon:S},inheritAttrs:!1,props:{type:[String,Object],size:String,label:String,iconPack:String,iconLeft:String,iconRight:String,rounded:{type:Boolean,default:()=>c.defaultButtonRounded},loading:Boolean,outlined:Boolean,expanded:Boolean,inverted:Boolean,focused:Boolean,active:Boolean,hovered:Boolean,selected:Boolean,nativeType:{type:String,default:"button",validator:e=>A.indexOf(e)>=0},tag:{type:[String,Object],default:"button",validator:e=>"object"==typeof e||c.defaultLinkTags.indexOf(e)>=0}},computed:{computedTag(){return void 0!==this.$attrs.disabled&&!1!==this.$attrs.disabled?"button":this.tag},iconSize(){return this.size&&"is-medium"!==this.size?"is-large"===this.size?"is-medium":this.size:"is-small"}}});const V={key:1},T={key:2};var z=f(E,[["render",function(e,s,i,o,n,a){const r=t.resolveComponent("b-icon");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.computedTag),t.mergeProps({class:"button"},e.$attrs,{type:"string"==typeof e.computedTag&&["button","input"].includes(e.computedTag)?e.nativeType:void 0,class:[e.size,e.type,{"is-rounded":e.rounded,"is-loading":e.loading,"is-outlined":e.outlined,"is-fullwidth":e.expanded,"is-inverted":e.inverted,"is-focused":e.focused,"is-active":e.active,"is-hovered":e.hovered,"is-selected":e.selected}]}),{default:t.withCtx((()=>[e.iconLeft?(t.openBlock(),t.createBlock(r,{key:0,pack:e.iconPack,icon:e.iconLeft,size:e.iconSize},null,8,["pack","icon","size"])):t.createCommentVNode("v-if",!0),e.label?(t.openBlock(),t.createElementBlock("span",V,t.toDisplayString(e.label),1)):e.$slots.default?(t.openBlock(),t.createElementBlock("span",T,[t.renderSlot(e.$slots,"default")])):t.createCommentVNode("v-if",!0),e.iconRight?(t.openBlock(),t.createBlock(r,{key:3,pack:e.iconPack,icon:e.iconRight,size:e.iconSize},null,8,["pack","icon","size"])):t.createCommentVNode("v-if",!0)])),_:3},16,["type","class"])}]]);const N=(e,t=!1)=>e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null;let P;const I={beforeMount:(e,{value:t=!0})=>{if(t){let t=N(e),s=N(e,!0);t&&t.length>0&&(P=i=>{t=N(e),s=N(e,!0);const o=t[0],n=t[t.length-1];i.target===o&&i.shiftKey&&"Tab"===i.key?(i.preventDefault(),n.focus()):(i.target===n||Array.from(s).indexOf(i.target)>=0)&&!i.shiftKey&&"Tab"===i.key&&(i.preventDefault(),o.focus())},e.addEventListener("keydown",P))}},unmounted:e=>{e.removeEventListener("keydown",P)}},O=["escape","outside"],F=Symbol("bdropdown");var H=t.defineComponent({name:"BDropdown",directives:{trapFocus:I},provide(){return{[F]:this}},props:{modelValue:{type:[String,Number,Boolean,Object,Array,Function],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:200},position:{type:String,validator:e=>["is-top-right","is-top-left","is-bottom-left","is-bottom-right"].indexOf(e)>-1},triggers:{type:Array,default:()=>["click"]},mobileModal:{type:Boolean,default:()=>c.defaultDropdownMobileModal},ariaRole:{type:String,validator:e=>["menu","list","dialog"].indexOf(e)>-1,default:null},animation:{type:String,default:"fade"},multiple:Boolean,trapFocus:{type:Boolean,default:()=>c.defaultTrapFocus},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,appendToBody:Boolean,appendToBodyCopyParent:Boolean,triggerTabindex:{type:Number,default:0}},emits:{"active-change":e=>!0,change:e=>!0,"update:modelValue":e=>!0},data(){return{selected:this.modelValue,style:{},isActive:!1,isHoverable:!1,maybeTap:!1,isTouchEnabled:!1,_bodyEl:void 0,timeOutID:void 0,timeOutID2:void 0}},computed:{rootClasses(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal,"is-expanded":this.expanded,"is-touch-enabled":this.isTouchEnabled}]},isMobileModal(){return this.mobileModal&&!this.inline},cancelOptions(){return"boolean"==typeof this.canClose?this.canClose?O:[]:this.canClose},contentStyle(){var e,t;return{maxHeight:this.scrollable&&null!=(t=this.maxHeight,e=void 0===t?null:isNaN(+t)?`${t}`:t+"px")?e:void 0,overflow:this.scrollable?"auto":void 0}},hoverable(){return this.triggers.indexOf("hover")>=0}},watch:{modelValue(e){this.selected=e},isActive(e){this.$emit("active-change",e),e||(this.timeOutID=setTimeout((()=>{this.isActive||(this.isTouchEnabled=!1)}),250)),this.handleScroll(),this.appendToBody&&this.$nextTick((()=>{this.updateAppendToBody()}))},isHoverable(e){this.hoverable&&this.$emit("active-change",e)}},methods:{handleScroll(){"undefined"!=typeof window&&this.isMobileModal&&(this.isActive?document.documentElement.classList.add("is-clipped-touch"):document.documentElement.classList.remove("is-clipped-touch"))},selectItem(e){if(this.multiple){if(this.selected){const t=this.selected;-1===t.indexOf(e)?this.selected=[...t,e]:this.selected=t.filter((t=>t!==e))}else this.selected=[e];this.$emit("change",this.selected)}else this.selected!==e&&(this.selected=e,this.$emit("change",this.selected));this.$emit("update:modelValue",this.selected),this.multiple||(this.isActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1))},isInWhiteList(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(null!=this.$refs.dropdownMenu){const t=this.$refs.dropdownMenu.querySelectorAll("*");for(const s of t)if(e===s)return!0}if(null!=this.$refs.trigger){const t=this.$refs.trigger.querySelectorAll("*");for(const s of t)if(e===s)return!0}return!1},clickedOutside(e){if(this.cancelOptions.indexOf("outside")<0)return;if(this.inline)return;const t=null!=(s=this).$root&&"shadowRoot"in s.$root.$options?e.composedPath()[0]:e.target;var s;this.isInWhiteList(t)||(this.isActive=!1)},keyPress({key:e}){if(this.isActive&&("Escape"===e||"Esc"===e)){if(this.cancelOptions.indexOf("escape")<0)return;this.isActive=!1}},onClick(){-1===this.triggers.indexOf("hover")&&(this.triggers.indexOf("click")<0||this.toggle())},onContextMenu(){this.triggers.indexOf("contextmenu")<0||this.toggle()},onHover(){this.triggers.indexOf("hover")<0||this.isTouchEnabled||(this.isHoverable=!0)},onTouchStart(){this.maybeTap=!0},onTouchMove(){this.maybeTap=!1},onTouchEnd(e){-1!==this.triggers.indexOf("hover")&&this.maybeTap&&(e.preventDefault(),this.maybeTap=!1,this.isTouchEnabled=!0,this.toggle())},onFocus(){this.triggers.indexOf("focus")<0||this.toggle()},toggle(){this.disabled||(this.isActive?this.isActive=!this.isActive:this.timeOutID2=setTimeout((()=>{const e=!this.isActive;this.isActive=e})))},updateAppendToBody(){const e=this.$refs.dropdown,t=this.$refs.dropdownMenu,s=this.$refs.trigger;if(t&&s){const i=this.$data._bodyEl.children[0];if(i.classList.forEach((e=>i.classList.remove(e))),i.classList.add("dropdown"),i.classList.add("dropdown-menu-animation"),this.rootClasses.forEach((e=>{if(e&&"object"==typeof e)for(const t in e)e[t]&&i.classList.add(t)})),this.appendToBodyCopyParent){const e=this.$refs.dropdown.parentNode,t=this.$data._bodyEl;t.classList.forEach((e=>t.classList.remove(e))),e.classList.forEach((e=>{t.classList.add(e)}))}const o=s.getBoundingClientRect();let n=o.top+window.scrollY,a=o.left+window.scrollX;!this.position||this.position.indexOf("bottom")>=0?n+=s.clientHeight:n-=t.clientHeight,this.position&&this.position.indexOf("left")>=0&&(a-=t.clientWidth-s.clientWidth),this.style={position:"absolute",top:`${n}px`,left:`${a}px`,zIndex:"99",width:this.expanded?`${e.offsetWidth}px`:void 0}}}},mounted(){this.appendToBody&&(this.$data._bodyEl=d(this.$refs.dropdownMenu),this.updateAppendToBody())},created(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeUnmount(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress),document.documentElement.classList.remove("is-clipped-touch")),this.appendToBody&&u(this.$data._bodyEl),clearTimeout(this.timeOutID),clearTimeout(this.timeOutID2)}});const D=["tabindex"],R=["aria-hidden"],j=["aria-hidden"],_=["role","aria-modal"];var q=f(H,[["render",function(e,s,i,o,n,a){const r=t.resolveDirective("trap-focus");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["dropdown dropdown-menu-animation",e.rootClasses]),ref:"dropdown",onMouseleave:s[7]||(s[7]=t=>e.isHoverable=!1)},[e.inline?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:e.disabled?void 0:e.triggerTabindex,ref:"trigger",class:"dropdown-trigger",onClick:s[0]||(s[0]=(...t)=>e.onClick&&e.onClick(...t)),onContextmenu:s[1]||(s[1]=t.withModifiers(((...t)=>e.onContextMenu&&e.onContextMenu(...t)),["prevent"])),onMouseenter:s[2]||(s[2]=(...t)=>e.onHover&&e.onHover(...t)),onFocusCapture:s[3]||(s[3]=(...t)=>e.onFocus&&e.onFocus(...t)),onTouchstart:s[4]||(s[4]=(...t)=>e.onTouchStart&&e.onTouchStart(...t)),onTouchmove:s[5]||(s[5]=(...t)=>e.onTouchMove&&e.onTouchMove(...t)),onTouchend:s[6]||(s[6]=(...t)=>e.onTouchEnd&&e.onTouchEnd(...t)),"aria-haspopup":"true"},[t.renderSlot(e.$slots,"trigger",{active:e.isActive})],40,D)),t.createVNode(t.Transition,{name:e.animation},{default:t.withCtx((()=>[e.isMobileModal?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"background","aria-hidden":!e.isActive},null,8,R)),[[t.vShow,e.isActive]]):t.createCommentVNode("v-if",!0)])),_:1},8,["name"]),t.createVNode(t.Transition,{name:e.animation,persisted:""},{default:t.withCtx((()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref:"dropdownMenu",class:"dropdown-menu",style:t.normalizeStyle(e.style),"aria-hidden":!e.isActive},[t.createElementVNode("div",{class:"dropdown-content",role:e.ariaRole,"aria-modal":!e.inline,style:t.normalizeStyle(e.contentStyle)},[t.renderSlot(e.$slots,"default")],12,_)],12,j)),[[t.vShow,!e.disabled&&(e.isActive||e.isHoverable)||e.inline],[r,e.trapFocus]])])),_:3},8,["name"])],34)}]]),U=t.defineComponent({name:"BDropdownItem",inject:{parent:{from:F,default:void 0}},props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},emits:{click:()=>!0},computed:{anchorClasses(){return{"is-disabled":this.parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:void 0},isClickable(){return!(this.parent.disabled||this.separator||this.disabled||this.custom)},isActive(){return null!==this.parent.selected&&(this.parent.multiple?this.parent.selected.indexOf(this.value)>=0:this.value===this.parent.selected)},isFocusable(){return!this.hasLink&&this.focusable}},methods:{selectItem(){this.isClickable&&(this.parent.selectItem(this.value),this.$emit("click"))}}});const K={key:0,class:"dropdown-divider"},Z=["role","tabindex"],W=["role","tabindex"];var G=f(U,[["render",function(e,s,i,o,n,a){return e.separator?(t.openBlock(),t.createElementBlock("hr",K)):e.custom||e.hasLink?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.itemClasses),onClick:s[1]||(s[1]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,W)):(t.openBlock(),t.createElementBlock("a",{key:1,class:t.normalizeClass(["dropdown-item",e.anchorClasses]),onClick:s[0]||(s[0]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,Z))}]]),X=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,Q=t.defineComponent({inheritAttrs:!1,props:{compatFallthrough:{type:Boolean,default:()=>c.defaultCompatFallthrough}},computed:{rootAttrs(){return this.compatFallthrough?{class:this.$attrs.class,style:this.$attrs.style,id:this.$attrs.id}:{}},fallthroughAttrs(){if(this.compatFallthrough){const e=this.$attrs,{style:t,class:s,id:i}=e;return((e,t)=>{var s={};for(var i in e)Y.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&X)for(var i of X(e))t.indexOf(i)<0&&J.call(e,i)&&(s[i]=e[i]);return s})(e,["style","class","id"])}return this.$attrs}}}),ee=t.defineComponent({name:"BInput",components:{BIcon:S},mixins:[Q,k],props:{modelValue:{type:[Number,String]},type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:()=>c.defaultInputHasCounter},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean,iconRightType:String,autocomplete:String},emits:{"icon-click":e=>!0,"icon-right-click":e=>!0,"update:modelValue":e=>!0},data(){return{newValue:this.modelValue,newType:this.type,newAutocomplete:this.autocomplete||c.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get(){return this.newValue},set(e){this.newValue=e,this.$emit("update:modelValue",e)}},rootClasses(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType(){return this.passwordReveal?"is-primary":this.iconRight?this.iconRightType||void 0:this.statusType},iconPosition(){let e="";return this.icon&&(e+="has-icons-left "),this.hasIconRight&&(e+="has-icons-right"),e},statusTypeIcon(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert";default:return}},hasMessage(){return!!this.statusMessage},passwordVisibleIcon(){return this.isPasswordVisible?"eye-off":"eye"},valueLength(){return"string"==typeof this.computedValue?Array.from(this.computedValue).length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{modelValue(e){const t=this.computedValue!=e;this.newValue=e,t&&this.$nextTick((()=>{!this.isValid&&this.checkHtml5Validity()}))},type(e){this.newType=e}},methods:{togglePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick((()=>{this.focus()}))},iconClick(e,t){this.$emit(e,t),this.$nextTick((()=>{this.focus()}))},rightIconClick(e){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",e)},onInput(){this.lazy||this.revalidate()},onChange(){this.lazy&&this.revalidate()},revalidate(){!this.isValid&&this.checkHtml5Validity()}}});const te=["type","autocomplete","maxlength"],se=["maxlength"],ie=["type","autocomplete","maxlength"],oe=["maxlength"];var ne=f(ee,[["render",function(e,s,i,o,n,a){const r=t.resolveComponent("b-icon");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["control",e.rootClasses]},e.rootAttrs),[e.lazy?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},["textarea"!==e.type?t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:0,ref:"input",class:["input",[e.inputClasses,e.customClass]],type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength,"onUpdate:modelValue":s[0]||(s[0]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:s[1]||(s[1]=(...t)=>e.onInput&&e.onInput(...t)),onChange:s[2]||(s[2]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:s[3]||(s[3]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:s[4]||(s[4]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,te)),[[t.vModelDynamic,e.computedValue,void 0,{lazy:!0}]]):t.withDirectives((t.openBlock(),t.createElementBlock("textarea",t.mergeProps({key:1,ref:"textarea",class:["textarea",[e.inputClasses,e.customClass]],maxlength:e.maxlength,"onUpdate:modelValue":s[5]||(s[5]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:s[6]||(s[6]=(...t)=>e.onInput&&e.onInput(...t)),onChange:s[7]||(s[7]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:s[8]||(s[8]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:s[9]||(s[9]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,se)),[[t.vModelText,e.computedValue,void 0,{lazy:!0}]])],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},["textarea"!==e.type?t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:0,ref:"input",class:["input",[e.inputClasses,e.customClass]],type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength,"onUpdate:modelValue":s[10]||(s[10]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:s[11]||(s[11]=(...t)=>e.onInput&&e.onInput(...t)),onChange:s[12]||(s[12]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:s[13]||(s[13]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:s[14]||(s[14]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,ie)),[[t.vModelDynamic,e.computedValue]]):t.withDirectives((t.openBlock(),t.createElementBlock("textarea",t.mergeProps({key:1,ref:"textarea",class:["textarea",[e.inputClasses,e.customClass]],maxlength:e.maxlength,"onUpdate:modelValue":s[15]||(s[15]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:s[16]||(s[16]=(...t)=>e.onInput&&e.onInput(...t)),onChange:s[17]||(s[17]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:s[18]||(s[18]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:s[19]||(s[19]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,oe)),[[t.vModelText,e.computedValue]])],64)),e.icon?(t.openBlock(),t.createBlock(r,{key:2,class:t.normalizeClass(["is-left",{"is-clickable":e.iconClickable}]),icon:e.icon,pack:e.iconPack,size:e.iconSize,onClick:s[20]||(s[20]=t=>e.iconClick("icon-click",t))},null,8,["class","icon","pack","size"])):t.createCommentVNode("v-if",!0),!e.loading&&e.hasIconRight&&e.rightIcon?(t.openBlock(),t.createBlock(r,{key:3,class:t.normalizeClass(["is-right",{"is-clickable":e.passwordReveal||e.iconRightClickable}]),icon:e.rightIcon,pack:e.iconPack,size:e.iconSize,type:e.rightIconType,both:"",onClick:e.rightIconClick},null,8,["class","icon","pack","size","type","onClick"])):t.createCommentVNode("v-if",!0),e.maxlength&&e.hasCounter&&"number"!==e.type?(t.openBlock(),t.createElementBlock("small",{key:4,class:t.normalizeClass(["help counter",{"is-invisible":!e.isFocused}])},t.toDisplayString(e.valueLength)+" / "+t.toDisplayString(e.maxlength),3)):t.createCommentVNode("v-if",!0)],16)}]]);const ae=.86602540378,re=.5;let le=0;var ce=t.defineComponent({name:"BColorpickerHSLRepresentationTriangle",props:{value:{type:Object,required:!0,validator:e=>"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness},size:{type:Number,default:200},thickness:{type:Number,default:20}},emits:{input:e=>!0},data(){return{id:le++,hue:this.value.hue,saturation:this.value.saturation,lightness:this.value.lightness,captureMouse:!1,captureType:"hue",clientOffset:{cx:-1,cy:-1,width:0,height:0},cos30:ae,sin30:re,debounce:0}},computed:{viewBox(){const{size:e}=this;return`0 0 ${e} ${e}`},internalRadius(){return this.size/2-this.thickness},haloPath(){const{size:e,thickness:t}=this,s=e/2-2,i=s-t,o=e/2;return`M${o-s} ${o}a${s} ${s} 0 1 1 ${2*s} 0h${-t}a${-i} ${i} 0 1 0 ${-2*i} 0a${i} ${i} 0 1 0 ${2*i} 0h${t}a${s} ${s} 0 1 1 ${-2*s} 0z`},trianglePath(){const{size:e,thickness:t}=this,s=(e-4-2*t)/2;return`M0 ${-s}L${ae*s} ${re*s}H${-ae*s}z`}},watch:{captureMouse(e,t){if(!1===t&&!1!==e){const e=this.$el.getBoundingClientRect();this.clientOffset.cx=e.x+e.width/2,this.clientOffset.cy=e.y+e.height/2,this.clientOffset.width=e.width,this.clientOffset.height=e.height}},value:{deep:!0,handler(e){const{hue:t,saturation:s,lightness:i}=e;window.clearTimeout(this.debounce),this.debounce=window.setTimeout((()=>{i>=.03&&i<=.97&&s>0&&(this.hue=t),this.saturation=s,this.lightness=i}),200)}}},methods:{increaseHue(e=1){this.hue=(this.hue+e)%360},decreaseHue(e=1){this.hue=(360+this.hue-e)%360},increaseSaturation(e=.01){this.saturation=Math.min(1,Math.max(0,this.saturation+e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},decreaseSaturation(e=.01){this.saturation=Math.min(1,Math.max(0,this.saturation-e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},increaseLightness(e=.01){this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness+e))},decreaseLightness(e=.01){this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness-e))},hueKeyPress(e){let t=!1;switch(e.key){case"ArrowRight":case"ArrowUp":this.increaseHue(),t=!0;break;case"ArrowLeft":case"ArrowDown":this.decreaseHue(),t=!0;break;case"Home":this.increaseHue(360-this.hue),t=!0;break;case"End":this.decreaseHue(this.hue),t=!0;break;case"PageUp":this.increaseHue(60-this.hue%60),t=!0;break;case"PageDown":this.decreaseHue(60+this.hue%60),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},slKeyPress(e){let t=!1;switch(e.key){case"ArrowRight":this.decreaseLightness(),t=!0;break;case"ArrowUp":this.increaseSaturation(),t=!0;break;case"ArrowLeft":this.increaseLightness(),t=!0;break;case"ArrowDown":this.decreaseSaturation(),t=!0;break;case"Home":this.increaseLightness(1-this.lightness),t=!0;break;case"End":this.decreaseLightness(this.lightness),t=!0;break;case"PageUp":this.increaseSaturation(1-this.saturation),t=!0;break;case"PageDown":this.decreaseSaturation(this.saturation),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},clickHue(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.hueCursor.focus()},clickSL(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.slCursor.focus()},trackMouse(e){if(!1===this.captureMouse)return;e.preventDefault(),e.stopPropagation();const t=e.touches;let[s,i]=[0,0];void 0!==t&&t.length?[s,i]=[t[0].clientX,t[0].clientY]:[s,i]=[e.clientX,e.clientY];const o=Math.atan2(i-this.clientOffset.cy,s-this.clientOffset.cx);if("sl"===this.captureType){const e=Math.sqrt(Math.pow(s-this.clientOffset.cx,2)+Math.pow(i-this.clientOffset.cy,2)),t=this.size/this.clientOffset.width,n=e*Math.cos(o-this.hue/180*Math.PI)*t,a=e*Math.sin(o-this.hue/180*Math.PI)*t,r=this.internalRadius,l=1-(Math.min(r*re,Math.max(-r,a))+r)/(r+r*re),c=(Math.min(r*ae*(1-l),Math.max(-r*ae*(1-l),n))+r*ae)/(2*r*ae);this.saturation=Math.round(1e3*l)/1e3,this.lightness=1-Math.round(1e3*c)/1e3}else this.hue=Math.round(o/Math.PI*180+90)%360;this.emitColor()},startMouseCapture(e){e.stopPropagation(),this.captureMouse=!0,null!==e.target.closest(".colorpicker-triangle-slider-sl")?this.captureType="sl":this.captureType="hue"},stopMouseCapture(e){!1!==this.captureMouse&&(e.preventDefault(),e.stopPropagation(),this.$refs["sl"===this.captureType?"slCursor":"hueCursor"].focus()),this.captureMouse=!1},emitColor(){const{hue:e,saturation:t,lightness:s}=this;this.$emit("input",l.fromHSL(e,t,s)),window.clearTimeout(this.debounce)}},mounted(){window.addEventListener("mousemove",this.trackMouse),window.addEventListener("touchmove",this.trackMouse,{passive:!1}),window.addEventListener("mouseup",this.stopMouseCapture),window.addEventListener("touchend",this.stopMouseCapture)},beforeUnmount(){window.removeEventListener("mousemove",this.trackMouse),window.removeEventListener("touchmove",this.trackMouse),window.removeEventListener("mouseup",this.stopMouseCapture),window.removeEventListener("touchend",this.stopMouseCapture),clearTimeout(this.debounce)}});const he=["viewBox"],ue=["id"],de=[t.createElementVNode("stop",{offset:"0%","stop-color":"#fff"},null,-1),t.createElementVNode("stop",{offset:"100%","stop-color":"#000"},null,-1)],pe=["id"],me=["stop-color"],fe=["stop-color"],ge=["id"],ye=["d"],ve={class:"colorpicker-triangle-slider-hue"},be=["width","height","clip-path"],ke=["x","height"],we=["aria-valuenow"],Ce=["d","fill"],Me=["d","fill"],xe=["x","y"],Be=["aria-datavalues"];var $e=f(ce,[["render",function(e,s,i,o,n,a){return t.openBlock(),t.createElementBlock("svg",{viewBox:e.viewBox,class:"b-colorpicker-triangle"},[t.createElementVNode("defs",null,[t.createElementVNode("linearGradient",{id:`cp-triangle-gradient-ligthness-${e.id}`,x1:"0",y1:"0",x2:"1",y2:"0"},[...de],8,ue),t.createElementVNode("linearGradient",{id:`cp-triangle-gradient-saturation-${e.id}`,x1:"0",y1:"0",x2:"0",y2:"1"},[t.createElementVNode("stop",{offset:"0%","stop-color":`hsl(${e.hue}deg, 100%, 50%)`,"stop-opacity":"1"},null,8,me),t.createElementVNode("stop",{offset:"100%","stop-color":`hsl(${e.hue}deg, 100%, 50%)`,"stop-opacity":"0"},null,8,fe)],8,pe),t.createElementVNode("clipPath",{id:`cp-triangle-clip-${e.id}`},[t.createElementVNode("path",{d:e.haloPath},null,8,ye)],8,ge)]),t.createElementVNode("g",ve,[(t.openBlock(),t.createElementBlock("foreignObject",{x:0,y:0,width:e.size,height:e.size,"clip-path":`url(#cp-triangle-clip-${e.id})`},[t.createElementVNode("div",{class:"colorpicker-triangle-hue",onClick:s[0]||(s[0]=(...t)=>e.clickHue&&e.clickHue(...t)),onMousedown:s[1]||(s[1]=t.withModifiers(((...t)=>e.startMouseCapture&&e.startMouseCapture(...t)),["prevent"])),onTouchstart:s[2]||(s[2]=t.withModifiers(((...t)=>e.startMouseCapture&&e.startMouseCapture(...t)),["prevent"]))},null,32)],8,be)),t.createElementVNode("g",{style:t.normalizeStyle(`transform: rotate(${e.hue}deg)`)},[(t.openBlock(),t.createElementBlock("foreignObject",{x:e.size/2-4,y:0,width:"8",height:e.thickness+4},[t.createElementVNode("div",{ref:"hueCursor",class:"hue-range-thumb",style:t.normalizeStyle(`background-color: hsl(${e.hue}deg, 100%, 50%)`),role:"slider",tabindex:"0","aria-label":"Hue","aria-valuemin":"0","aria-valuenow":e.hue,"aria-valuemax":"360",onClick:s[3]||(s[3]=(...t)=>e.clickHue&&e.clickHue(...t)),onKeydown:s[4]||(s[4]=(...t)=>e.hueKeyPress&&e.hueKeyPress(...t)),onMousedown:s[5]||(s[5]=t.withModifi