UNPKG

halleyx-ui-framework

Version:

The Halleyx UI Framework is a Vue 3 component framework.

1 lines 2.38 MB
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("vue"),require("vue-draggable-next"),require("vue3-apexcharts"),require("vue3-country-flag-icon"),require("vue3-country-flag-icon/dist/CountryFlag.css"),require("chart.js"),require("chartjs-chart-geo")):"function"==typeof define&&define.amd?define(["exports","vue","vue-draggable-next","vue3-apexcharts","vue3-country-flag-icon","vue3-country-flag-icon/dist/CountryFlag.css","chart.js","chartjs-chart-geo"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self)["halleyx-ui-framework"]={},e.Vue,e.vueDraggableNext,e.VueApexCharts,e.CountryFlag,null,e.chart_js,e.ChartGeo)}(this,(function(e,o,t,a,i,n,l,r){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})}})),o.default=e,Object.freeze(o)}var m=c(a),d=c(i),u=s(r),f={name:"HlxAccordion",props:{accordionData:{type:Array,default:()=>[]},direction:{type:String,default:"right"},multiple:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},headerBorder:{type:Boolean,default:!1}},emits:["accordionopen","accordionclose"],data:()=>({unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5)}),mounted(){this.expand&&document.querySelectorAll(".accordion-item")?.forEach((e=>{e?.children[0]?.children[1]?.children[0]?.classList?.remove("icon-angle-right-regular"),e?.children[0]?.children[1]?.children[0]?.classList?.add("icon-angle-down-regular"),e.children[1].style.display="flex",this.$emit("accordionopen")}))},methods:{toggleView(e,o,t){0==t?"right icon-angle-right-regular"===document.querySelector("#arrow-"+o).className?(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.add("noo-border")),document.querySelectorAll(".icon-angle-down-regular").forEach((e=>{"right icon-angle-down-regular"==e.className&&(document.querySelectorAll(".accordion-content").forEach((e=>{e.style.display="none"})),e.classList.remove("icon-angle-down-regular"),e.classList.add("icon-angle-right-regular"))})),document.querySelector("#arrow-"+o).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+o).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+o).className&&(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.add("noo-border")),document.querySelector("#arrow-"+o).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+o).style.display="none",this.$emit("accordionclose")):"right icon-angle-right-regular"===document.querySelector("#arrow-"+o).className?(0==this.headerBorder&&document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.add("noo-border"),document.querySelector("#arrow-"+o).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+o).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+o).className&&(document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.remove("noo-border"),document.querySelector("#arrow-"+o).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+o).style.display="none",this.$emit("accordionclose"))}}};const p=["id","multiple"],h=["id"],g={key:0,style:{display:"flex"}},b=["id"],y={style:{width:"100%"}},A={key:1,style:{display:"flex"}},v=["id"],k=["id"];f.render=function(e,t,a,i,n,l){return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createCommentVNode(' <div class="accordion-container"> '),(o.openBlock(),o.createElementBlock("div",{id:["item-"+n.unique],key:n.unique,class:"accordion-item",multiple:a.multiple},[o.createElementVNode("div",{id:["header-"+n.unique],class:"accordion-header",onClick:t[0]||(t[0]=e=>l.toggleView(e,n.unique,a.multiple))},["left"==a.direction?(o.openBlock(),o.createElementBlock("div",g,[o.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,b)])):o.createCommentVNode("v-if",!0),o.createElementVNode("header",y,[o.renderSlot(e.$slots,"item-title")]),"right"==a.direction?(o.openBlock(),o.createElementBlock("div",A,[o.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,v)])):o.createCommentVNode("v-if",!0)],8,h),o.createElementVNode("div",{id:["content-"+n.unique],class:"accordion-content"},[o.renderSlot(e.$slots,"item-body")],8,k)],8,p)),o.createCommentVNode(" </div> ")],2112)},f.__file="src/components/AccordionComponent.vue";var C={name:"HlxAlertNotification",props:{notify:{type:Object,default:()=>({})},autoClose:{type:Boolean,default:()=>!0},delay:{type:Number,default:e=>e>3e3?e:2e3,validator:e=>e>3e3?e:2e3}},data:()=>({notifications:[],alertStatus:!1,typeData:""}),computed:{computedAlert(){return this.alertStatus}},watch:{notify:{handler(e){const o=(new Date).toISOString().replace(/[.\:-]/g,"")+crypto.randomUUID().toString(16).substring(1);Object.keys(e).length>0&&this.push({...e,id:o})},immediate:!0,deep:!0}},methods:{getClass:e=>e?.type?"alert-"+e?.type.toLowerCase():"alert-success",closeAlert(e){this.$refs["hlx-alert-"+e][0]?.classList.add("close"),setTimeout((()=>{this.notifications=this.notifications.filter((o=>o.id&&o.id!=e))}),1e3)},push(e){this.notifications.push({...e}),this.autoClose&&setTimeout((()=>{this.$refs["hlx-alert-"+e.id][0]?.classList.add("close"),setTimeout((()=>{this.notifications.shift()}),1e3)}),this.delay+1e3*this.notifications.length)},icon(e){if(e)switch(e.toLowerCase()){case"danger":case"warning":return"icon-exclamation-circle-regular";case"primary":return"icon-info-circle-regular";default:return"icon-check-circle-regular"}return"tick-bg"}}};const w={key:0,class:"hlx-alert-wrapper"},E=["id"],S={class:"icon"},B={class:"text"},N={class:"alert-description"},V=["onClick"],x=[o.createElementVNode("i",{class:"icon-times-filled"},null,-1)];C.render=function(e,t,a,i,n,l){return o.openBlock(),o.createBlock(o.Teleport,{to:"body",class:"alert-not"},[n.notifications.length>0?(o.openBlock(),o.createElementBlock("section",w,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.notifications,(e=>(o.openBlock(),o.createElementBlock("div",{id:"alert"+e.id,ref_for:!0,ref:"hlx-alert-"+e.id,key:e,class:o.normalizeClass(["hlx alert",l.getClass(e)])},[o.createElementVNode("span",S,[o.createElementVNode("i",{class:o.normalizeClass(l.icon(e.type))},null,2)]),o.createElementVNode("div",B,[o.createElementVNode("p",N,o.toDisplayString(e.message),1)]),o.createElementVNode("button",{class:"close","aria-label":"close",onClick:o=>l.closeAlert(e.id)},[...x],8,V)],10,E)))),128))])):o.createCommentVNode("v-if",!0)])},C.__file="src/components/AlertComponent.vue";var I={name:"HlxBadge",props:{icon:{type:String,default:""},count:{type:Number,default:0}}};const R=["aria-label"],M={class:"icon-button__badge",style:{"font-size":"10px"}};I.render=function(e,t,a,i,n,l){return o.openBlock(),o.createElementBlock("button",{id:"badge",type:"button",class:"icon-button","aria-label":a.icon},[o.createElementVNode("span",{class:o.normalizeClass(a.icon)},null,2),o.createElementVNode("span",M,o.toDisplayString(a.count),1)],8,R)},I.__file="src/components/BadgeComponent.vue";var _={name:"HlxBreadcrumb",props:{labelValue:{type:String,default:"Back"},autoRoute:{type:Boolean,default:!1},type:{type:String,default:"back-breadcrumb"},items:{type:Array,required:!0},separator:{type:[String,Object],default:"/"}},emits:["path"],data:()=>({unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5)}),computed:{isIconSeparator(){return"object"==typeof this.separator}},methods:{current(e){!0===this.autoRoute&&this.$router.back(),this.$emit("path",e)},tooltipover(e,o){let t=e,a=o;this.ellipsis(t,a)},tooltipleave(e,o){let t=e,a=o;this.ellipses(t,a)},ellipsis(e,o){console.log(e,o),this.$nextTick((()=>{const t=document.querySelector("#"+e);if(null!=t){if(t.clientWidth<t.scrollWidth)if("ellipsis"===(t.currentStyle||window.getComputedStyle(t)).textOverflow){const e=document.querySelector("."+o);console.log(t.getBoundingClientRect().top);let a=t.getBoundingClientRect().top,i=t.getBoundingClientRect().left+77;return e.style.display="block",e.style.top=a+"px",e.style.left=i+"px",!0}return!1}}))},ellipses(e,o){this.$nextTick((()=>{const t=document.querySelector("#"+e);if(null!=t){if(t.clientWidth<t.scrollWidth)if("ellipsis"===(t.currentStyle||window.getComputedStyle(t)).textOverflow){return document.querySelector("."+o).style.display="none",!0}return!1}}))}}};const T={class:"breadcrumb","aria-label":"Breadcrumb"},D={key:0},q=["onClick"],z=["id","onMouseover","onMouseleave"],O=["id","onMouseover","onMouseleave"],L={key:3,class:"breadcrumb-separator"},P={key:1},U=o.createElementVNode("i",{style:{"font-weight":"800"},class:"icon-arrow-left-regular"},null,-1);_.render=function(e,t,a,i,n,l){return o.openBlock(),o.createElementBlock("nav",T,["Pathway-breadcrumb"===a.type?(o.openBlock(),o.createElementBlock("ul",D,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.items,((e,t)=>(o.openBlock(),o.createElementBlock("li",{key:t,onClick:o=>l.current(e)},[null!=e.icon?(o.openBlock(),o.createElementBlock("i",{key:0,"aria-hidden":"true",class:o.normalizeClass(e.icon)},null,2)):o.createCommentVNode("v-if",!0),t===a.items.length-1?(o.openBlock(),o.createElementBlock("a",{key:1,id:"breadcrumb"+t+n.unique,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis","min-width":"45px",width:"auto","max-width":"80px",display:"inline-block"},onMouseover:e=>l.tooltipover("breadcrumb"+t+n.unique,"tooltip-textbreadcrumb"+t+n.unique),onMouseleave:e=>l.tooltipleave("breadcrumb"+t+n.unique,"tooltip-textbreadcrumb"+t+n.unique)},[o.createTextVNode(o.toDisplayString(e.label)+" ",1),o.createElementVNode("p",{id:"tooltip-text1",class:o.normalizeClass("tooltip-textbreadcrumb"+t+n.unique)},o.toDisplayString(e.label),3)],40,z)):(o.openBlock(),o.createElementBlock("a",{key:2,id:"breadcrumb"+n.unique+t,class:"show-breadcrumb",style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis","min-width":"45px",width:"auto","max-width":"80px",display:"inline-block"},onMouseover:e=>l.tooltipover("breadcrumb"+n.unique+t,"tooltip-textbreadcrumb"+n.unique+t),onMouseleave:e=>l.tooltipleave("breadcrumb"+n.unique+t,"tooltip-textbreadcrumb"+n.unique+t)},[o.createTextVNode(o.toDisplayString(e.label)+" ",1),o.createElementVNode("p",{id:"tooltip-text1",class:o.normalizeClass("tooltip-textbreadcrumb"+n.unique+t)},o.toDisplayString(e.label),3)],40,O)),o.createCommentVNode(' <router-link :to="item.link" :class="{ disabled: index === items.length - 1 } " >{{ item.label }}</router-link> '),t<a.items.length-1?(o.openBlock(),o.createElementBlock("span",L,[l.isIconSeparator?(o.openBlock(),o.createElementBlock("i",{key:0,"aria-hidden":"true",class:o.normalizeClass(a.separator.icon)},null,2)):(o.openBlock(),o.createElementBlock("span",P,o.toDisplayString(a.separator),1))])):o.createCommentVNode("v-if",!0)],8,q)))),128))])):o.createCommentVNode("v-if",!0),"back-breadcrumb"===a.type?(o.openBlock(),o.createElementBlock("div",{key:1,class:"back-breadcrumb",style:{display:"flex",cursor:"pointer","align-items":"center",gap:"8px","max-width":"100px"},onClick:t[0]||(t[0]=e=>l.current("back"))},[U,o.createElementVNode("p",null,o.toDisplayString(a.labelValue),1)])):o.createCommentVNode("v-if",!0)])},_.__file="src/components/BreadcrumbComponent.vue";var F={name:"HlxButton",props:{value:{type:String,default:"Hlx click :)"},type:{type:String,default:"button"},name:{type:String,default:"hlx-button"},target:{type:String,default:"_blank"},href:{type:String,default:void 0},disabled:{type:Boolean,default:!1},label:{type:String,default:"Button"}},computed:{primaryClass(){return this.disabled?"disabled-button":""}},watch:{disabled:{handler(e){e&&this.primaryClass},immediate:!0}},methods:{clicked(){this.href&&this.$refs["link-ele"].click()}}};const K=["value","type","name","aria-label"],j=["aria-label","href","target"];F.render=function(e,t,a,i,n,l){return o.openBlock(),o.createElementBlock("button",{id:"hlx-button-0009",ref:"hlx-button",value:a.value,type:a.type,name:a.name,class:o.normalizeClass([l.primaryClass,"hlx-button"]),"aria-label":a.label,onClick:t[0]||(t[0]=(...e)=>l.clicked&&l.clicked(...e))},[o.renderSlot(e.$slots,"default"),null!=a.href?(o.openBlock(),o.createElementBlock("a",{key:0,ref:"link-ele","aria-label":a.label,href:a.href,target:a.target},null,8,j)):o.createCommentVNode("v-if",!0)],10,K)},F.__file="src/components/ButtonComponent.vue";var H={name:"HlxCalendar",props:{disableWeekend:{type:Boolean,default:!1},dateFormatLanguage:{type:String,default:"en"},event:{type:[Array,PointerEvent],default:()=>[]},preValue:{type:[Date,String],default:""},startYear:{type:Number,default:1950},endYear:{type:Number,default:2050},holidayList:{type:Array,default:()=>[]}},emits:["selectedDate","formattedDate"],data:()=>({selectedMonth:"",selectedYear:"",selectedDay:"",formattedDate:"",staticDataDays:localStorage.getItem("dayDataShort")?JSON.parse(localStorage.getItem("dayDataShort")):{sun:"SUN",mon:"MON",tue:"TUE",wed:"WED",thu:"THU",fri:"FRI",sat:"SAT"},monthNames:localStorage.getItem("monthDataLong")?JSON.parse(localStorage.getItem("monthDataLong")):["January","February","March","April","May","June","July","August","September","October","November","December"]}),async mounted(){console.log("days111:::",JSON.parse(localStorage.getItem("dayDataShort"))),console.log("monthLong111:::",JSON.parse(localStorage.getItem("monthDataLong"))),console.log(this.event,"cal eve",this.dateFormatLanguage);const e=document.querySelector(".calendar"),o=document.querySelector(".light");e.clientY=this.event.clientY,o.right=this.event.clientX+"px";const t=["January","February","March","April","May","June","July","August","September","October","November","December"],a=[];let i=this.startYear;const n=this.endYear;for(;i<=n;)a.push(i++);const l=e.querySelector(".month-list");a.forEach(((e,o)=>{const t=document.createElement("div");t.innerHTML=`<div data-month="${o}" id="year${o}" class="idd${e}">${e}</div>`;let a=(new Date).getFullYear();a+=1,e===a&&(document.getElementById("year"+(o-1)).classList.add("theme-background"),document.getElementById("year"+(o-1)).style.color="white"),t.querySelector("div").onclick=()=>{l.classList.remove("show"),s.value=e,this.selectedMonth=c.value,this.selectedYear=s.value,this.generateCalendar(c.value,s.value)},l.appendChild(t)}));e.querySelector("#year").onclick=()=>{l.classList.add("show"),document.querySelector(".selected-curr-year")?.classList?.remove("selected-curr-year");let e=document.querySelector(".idd"+this.selectedYear);e.classList.add("selected-curr-year"),e.scrollIntoView({behavior:"smooth",block:"start"})};let r="";if(""===this.preValue)r=new Date;else{const e=this.preValue.split("-");r=new Date(e[2],e[1]-1,e[0])}const c={value:r.getMonth()},s={value:r.getFullYear()};this.selectedMonth=c.value,this.selectedYear=s.value,this.generateCalendar(c.value,s.value);const m=document.querySelector(".calendar");340===m.offsetHeight||(m.style.marginTop="0px"),document.querySelector("#prev-year").onclick=()=>{"January"===t[c.value]?(c.value=11,--s.value):--c.value,this.selectedMonth=c.value,this.selectedYear=s.value,this.generateCalendar(c.value,s.value);const e=document.querySelector(".calendar");340===e.offsetHeight||(e.style.marginTop="0")},document.querySelector("#next-year").onclick=()=>{const e=document.querySelector(".calendar");"December"===t[c.value]?(c.value=0,++s.value):++c.value,this.selectedMonth=c.value,this.selectedYear=s.value,this.generateCalendar(c.value,s.value),340===e.offsetHeight||(e.style.marginTop="0")};document.querySelectorAll(".disable-weekend").forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()}))}))},methods:{async translateStaticDataDays(e,o){const t=Object.keys(e).map((o=>e[o])),a=await this.languageTransferArray(t,o),i=Object.keys(e).reduce(((e,o,t)=>(e[o]=a[t],e)),{});return console.log("poiuytrewq:",i),i},log(e){console.log(e.target.innerHTML,"inner html"),""!==e.target.innerHTML&&e.target.innerHTML.length<=2&&(e.target.innerHTML.length<2?this.selectedDay=0+e.target.innerHTML:this.selectedDay=e.target.innerHTML,this.selectedDate=this.selectedDay+"-"+(this.selectedMonth+1<10?"0"+String(this.selectedMonth+1):this.selectedMonth+1)+"-"+this.selectedYear,this.$emit("selectedDate",this.selectedDate))},isLeapYear:e=>e%4==0&&e%100!=0&&e%400!=0||e%100==0&&e%400==0,getFebDays(e){return this.isLeapYear(e)?29:28},generateCalendar(e,o){console.log(e,o,"jui");const t=document.querySelector(".calendar"),a=t.querySelector(".calendar-days"),i=t.querySelector("#year"),n=[31,this.getFebDays(o),31,30,31,30,31,31,30,31,30,31];a.innerHTML="";let l="";if(""===this.preValue)l=new Date;else{const e=this.preValue.split("-");l=new Date(e[2],e[1]-1,e[0])}o||(o=l.getFullYear());const r=`${this.monthNames[e]}`;t.querySelector("#month-picker").innerHTML=r,i.innerHTML=o;const c=new Date(o,e,1);for(let t=0;t<=n[e]+c.getDay()-1;t++){const i=document.createElement("div");if(t>=c.getDay()){i.classList.add("calendar-day-hover");const a=t-c.getDay()+1;if(a>0&&a<=n[e]){const t=`${a}-${e+1}-${o}`;i.classList.add(t),console.log("fkoko",t),i.id="calender-day",this.holidayList.includes(t)&&(i.classList.remove("calendar-day-hover"),i.classList.add("disable-weekend")),i.innerHTML=a,a===l.getDate()&&o===l.getFullYear()&&e===l.getMonth()&&i.classList.add("curr-date")}}a.appendChild(i)}if(!0===this.disableWeekend){const e=document.querySelector(".calendar-days").children,o=[0,6,7,13,14,20,21,27,28,34,35];for(const t in o)e[o[t]]&&""!==e[o[t]].innerHTML&&(e[o[t]].classList.remove("calendar-day-hover"),e[o[t]].classList.add("disable-weekend"))}}}};const G={class:"light"},W={class:"calendar"},Q=o.createStaticVNode('<div class="calendar-header"><div class="year-picker"><span id="prev-year" class="year-change"><p style="margin:0px;"><i class="icon-angle-left-regular"></i></p></span><span><span id="month-picker" class="month-picker">February</span><span id="year">2021</span></span><span id="next-year" class="year-change"><p style="margin:0px;"><i class="icon-angle-right-regular"></i></p></span></div></div>',1),J={class:"calendar-body"},Z={class:"calendar-week-day"},X=o.createElementVNode("div",{class:"month-list"},null,-1);H.render=function(e,t,a,i,n,l){return o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("div",W,[Q,o.createElementVNode("div",J,[o.createElementVNode("div",Z,[o.createElementVNode("div",null,[o.createCommentVNode(" SUN "),o.createTextVNode(" "+o.toDisplayString(n.staticDataDays?.sun),1)]),o.createElementVNode("div",null,[o.createCommentVNode(" MON "),o.createTextVNode(" "+o.toDisplayString(n.staticDataDays?.mon),1)]),o.createElementVNode("div",null,[o.createCommentVNode(" TUE "),o.createTextVNode(" "+o.toDisplayString(n.staticDataDays?.tue),1)]),o.createElementVNode("div",null,[o.createCommentVNode(" WED "),o.createTextVNode(" "+o.toDisplayString(n.staticDataDays?.wed),1)]),o.createElementVNode("div",null,[o.createCommentVNode(" THU "),o.createTextVNode(" "+o.toDisplayString(n.staticDataDays?.thu),1)]),o.createElementVNode("div",null,[o.createCommentVNode(" FRI "),o.createTextVNode(" "+o.toDisplayString(n.staticDataDays?.fri),1)]),o.createElementVNode("div",null,[o.createCommentVNode(" SAT "),o.createTextVNode(" "+o.toDisplayString(n.staticDataDays?.sat),1)])]),o.createElementVNode("div",{class:"calendar-days",onClick:t[0]||(t[0]=(...e)=>l.log&&l.log(...e))})]),o.createCommentVNode(' <div class="calendar-footer">\r\n\r\n </div> '),X])])},H.__file="src/components/CalendarComponent.vue";var Y={name:"HlxCard",components:{},props:{cardTitle:{type:Boolean,default:!1},cardFooter:{type:Boolean,default:!1},width:{type:Number,default:null},hover:{type:Boolean,default:!1},shadow:{type:Boolean,default:!1},padding:{type:Boolean,default:!1},active:{type:Boolean,default:!1},height:{type:Number,default:null}},computed:{headerHeight(){return this.cardTitle?60:0},footerHeight(){return this.cardFooter?60:0}},mounted(){}};const $={key:0,class:"card-title"},ee={key:1,class:"card-footer"};Y.render=function(e,t,a,i,n,l){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["card",{cardhover:a.hover,cardshadow:a.shadow,padding:a.padding,cardActive:a.active}]),style:o.normalizeStyle("width:"+a.width+"px; height:"+a.height+"px;")},[1==a.cardTitle?(o.openBlock(),o.createElementBlock("div",$,[o.createElementVNode("header",null,[o.renderSlot(e.$slots,"card-title",{},(()=>[o.createTextVNode("Card title")]))])])):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{class:"card-body",style:o.normalizeStyle(a.cardTitle&&a.cardFooter?{height:a.height-l.headerHeight-l.footerHeight+"px"}:{height:"100%"})},[o.createCommentVNode(" {{this.card_body}} "),o.createElementVNode("main",null,[o.renderSlot(e.$slots,"card-body",{},(()=>[o.createTextVNode("Card body")]))])],4),1==a.cardFooter?(o.openBlock(),o.createElementBlock("div",ee,[o.createCommentVNode(" {{this.cardFooter}} "),o.createElementVNode("footer",null,[o.renderSlot(e.$slots,"card-footer",{},(()=>[o.createTextVNode("Card footer")]))])])):o.createCommentVNode("v-if",!0)],6)},Y.__file="src/components/CardsComponent.vue";var oe={name:"HlxOverlay",props:{show:{type:Boolean,default:!1},height:{type:Number,default:0},top:{type:Number,default:0},width:{type:Number,default:0},left:{type:Number,default:0},conditionvalue:{type:Number,default:0},conditionup:{type:Number,default:0},conditiondown:{type:Number,default:0},search:{type:String,default:""}},emits:["close-overlay"],data:()=>({unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5),containertop:0,containerwidth:0,containerleft:0,containerheight:0}),watch:{search:{handler(e){1==this.show?this.$nextTick((()=>{this.containerheight=document.querySelector("#container-overlay"+this.unique).offsetHeight,this.containertop=this.top,this.containerleft=this.left,this.containerwidth=this.width,window.innerHeight-this.containertop<this.conditionvalue?this.containertop=this.containertop-(this.containerheight+this.conditionup):this.containertop=this.containertop+this.conditiondown})):(this.containertop=0,this.containerleft=0,this.containerwidth=0,this.containerheight=0)}},show:{handler(e){1==e?this.$nextTick((()=>{this.containerheight=document.querySelector("#container-overlay"+this.unique).offsetHeight,this.containertop=this.top,this.containerleft=this.left,this.containerwidth=this.width,window.innerHeight-this.containertop<this.conditionvalue?this.containertop=this.containertop-(this.containerheight+this.conditionup):this.containertop=this.containertop+this.conditiondown})):(this.containertop=0,this.containerleft=0,this.containerwidth=0,this.containerheight=0)}},top:{handler(e){this.containertop=e,1==this.show?this.$nextTick((()=>{this.containerheight=document.querySelector("#container-overlay"+this.unique).offsetHeight,this.containertop=this.top,this.containerleft=this.left,this.containerwidth=this.width,window.innerHeight-this.containertop<this.conditionvalue?this.containertop=this.containertop-(this.containerheight+this.conditionup):this.containertop=this.containertop+this.conditiondown})):(this.containertop=0,this.containerleft=0,this.containerwidth=0,this.containerheight=0)},immediate:!0,deep:!0},left:{handler(e){this.containerleft=e},immediate:!0,deep:!0},width:{handler(e){this.containerwidth=e},immediate:!0,deep:!0}},methods:{emitfunction(e){console.log(e),this.$emit("close-overlay",e)}}};const te=["id"];oe.render=function(e,t,a,i,n,l){return o.openBlock(),o.createElementBlock("div",{class:"outer-overlay",onClick:t[0]||(t[0]=(...e)=>l.emitfunction&&l.emitfunction(...e))},[o.createElementVNode("div",{id:"container-overlay"+n.unique,class:"container-overlay",style:o.normalizeStyle([{position:"fixed"},["width:"+a.width+"px","top:"+n.containertop+"px","left:"+a.left+"px"]])},[o.renderSlot(e.$slots,"overlay")],12,te)])},oe.__file="src/components/OverlayComponent.vue";var ae={name:"HlxColorPalette",components:{hlxOverlay:oe},props:{preValue:{type:String,default:"#000000"},highlightColor:{type:Boolean,default:!1}},emits:["customChange"],data:()=>({containerleft:0,containertop:0,unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5),colorcontainer:!1,fill_color:!0,colorvalue:"#000000",recent:!1,recentvalue:"",recentcolor:[],colordata:[{"#ffffff":["#f2f2f2","#d9d9d9","#bfbfbf","#a6a6a6","#808080"]},{"#000000":["#808080","#595959","#404040","#262626","#0d0d0d"]},{"#e7e6e6":["#d0cece","#aeaaaa","#757171","#3a3838","#161616"]},{"#44546a":["#d6dce4","#acb9ca","#8497b0","#333f4f","#222b35"]},{"#4472c4":["#d9e1f2","#b4c6e7","#8ea9db","#305496","#203764"]},{"#ed7d31":["#fce4d6","#f8cbad","#f4b084","#c65911","#833c0c"]},{"#a5a5a5":["#ededed","#dbdbdb","#c9c9c9","#7b7b7b","#525252"]},{"#ffc000":["#fff2cc","#ffe699","#ffd966","#bf8f00","#806000"]},{"#5b9bd5":["#ddebf7","#bdd7ee","#9bc2e6","#2f75b5","#1f4e78"]},{"#70ad47":["#e2efda","#c6e0b4","#a9d08e","#548235","#375623"]}],standardcolor:["#c00000","#ff0000","#ffc000","#ffff00","#92d050","#00b050","#00b0f0","#0070c0","#002060","#7030a0"],colorpick:""}),watch:{preValue:{handler(e){""!=e&&(this.colorvalue=e,this.$emit("customChange",this.colorvalue))},immediate:!0,deep:!0}},mounted(){!0===this.highlightColor?this.fill_color=!1:this.fill_color=!0;for(let e=0;e<this.colordata.length;e++)for(let o=0;o<Object.values(this.colordata[e])[0].length;o++);document.addEventListener("click",(e=>{"color-container"!=e.target.className&&"color-container-title"!=e.target.className&&"color-container-specific-color-checkbox-border"!=e.target.className&&"color-container-specific-color-checkbox-border-fill-color"!=e.target.className&&"color-container-specific-color"!=e.target.className&&"color-container-specific-color1"!=e.target.className&&"color-container-specific-color2"!=e.target.className&&"color-container-specific-color1-container"!=e.target.className&&"color-container2323"!=e.target.className&&"favcolor"!=e.target.className&&"color-palette-container"!=e.target.className&&"color-palette-icon"!=e.target.className&&"icon-color-fill"!=e.target.className&&"color-icon-border"!=e.target.className&&"color-palette-open-icon"!=e.target.className&&"icon-angle-down-regular"!=e.target.className&&(this.colorcontainer=!1)}))},methods:{getcolorvalue(e){this.recent=!0,this.colorvalue=e.target.value,this.$emit("customChange",this.colorvalue),1!=this.recentcolor.includes(this.colorvalue)&&(document.querySelectorAll(".color-container-specific-color-checkbox-border").forEach((e=>{e.classList.remove("add-border")})),this.recentvalue=this.colorvalue,this.recentcolor.push(this.colorvalue))},getcolor(e){document.querySelectorAll(".color-container-specific-color-checkbox-border").forEach((e=>{e.classList.remove("add-border")})),"color-container-specific-color-checkbox-border-fill-color"===e.target.className?(this.colorvalue=e.target.style.background,this.$emit("customChange",this.colorvalue),e.target.parentElement.classList.add("add-border"),this.colorcontainer=!1):"color-container-specific-color-checkbox-border"===e.target.className&&(this.colorvalue=e.target.children[0].style.background,this.$emit("customChange",this.colorvalue),e.target.classList.add("add-border"),this.colorcontainer=!1),this.recent=!0,1!=this.recentcolor.includes(this.colorvalue)&&(document.querySelectorAll(".color-container-specific-color-checkbox-border").forEach((e=>{e.classList.remove("add-border")})),this.recentvalue=this.colorvalue,this.recentcolor.push(this.colorvalue))},colorpalette(){this.$nextTick((()=>{this.containerleft=document.getElementById("color-palette-open-icon"+this.unique).getBoundingClientRect().left+5,this.containertop=document.getElementById("color-palette-open-icon"+this.unique).getBoundingClientRect().top+50})),console.log(this.containerleft,"left",this.containertop,"top"),!1===this.colorcontainer?this.colorcontainer=!0:!0===this.colorcontainer&&(this.colorcontainer=!1)},colorpicker(){this.colorpick=!0}}};const ie={class:"color-palette-container"},ne={class:"color-palette-icon"},le={key:0,class:"icon-palette-regular"},re={key:1,class:"highlight-container"},ce={key:0,class:"highlight-icon"},se=["id"],me=[o.createElementVNode("i",{class:"icon-angle-down-regular"},null,-1)],de=["id"],ue=o.createElementVNode("p",{class:"color-container-title"},"Theme Colors",-1),fe={class:"color-container-specific-color"},pe={class:"color-container-specific-color1"},he=o.createElementVNode("p",{class:"color-container-title"},"Standard Colors",-1),ge={class:"color-container-specific-color"},be={class:"color-container2323"},ye=["value"],Ae={key:0,class:"color-container-title"},ve={class:"color-container-specific-color2"};ae.render=function(e,t,a,i,n,l){const r=o.resolveComponent("hlx-overlay");return o.openBlock(),o.createElementBlock("div",ie,[o.createElementVNode("div",ne,[1==n.fill_color?(o.openBlock(),o.createElementBlock("i",le)):o.createCommentVNode("v-if",!0),!0===a.highlightColor?(o.openBlock(),o.createElementBlock("div",re,[!0===a.highlightColor?(o.openBlock(),o.createElementBlock("p",ce,"A")):o.createCommentVNode("v-if",!0),o.createCommentVNode(' <div class="higlight-icon-border" v-if="this.highlightColor === true"></div> ')])):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{class:"color-icon-border",style:o.normalizeStyle({background:n.colorvalue})},null,4)]),o.createElementVNode("button",{id:"color-palette-open-icon"+n.unique,"aria-dis":"",class:"color-palette-open-icon",onClick:t[0]||(t[0]=(...e)=>l.colorpalette&&l.colorpalette(...e))},[...me],8,se),n.colorcontainer?(o.openBlock(),o.createBlock(r,{key:0,show:n.colorcontainer,top:n.containertop,left:n.containerleft,width:100,conditionvalue:150,conditionup:55,onCloseOverlay:e.onClose},{overlay:o.withCtx((()=>[o.createElementVNode("button",{id:"color-container"+n.unique,class:"color-container"},[ue,o.createElementVNode("button",fe,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.colordata,((e,a)=>(o.openBlock(),o.createElementBlock("button",{key:a,class:"color-container-specific-color-checkbox-border",onClick:t[1]||(t[1]=(...e)=>l.getcolor&&l.getcolor(...e))},[o.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:o.normalizeStyle({background:Object.keys(n.colordata[a])[0]})},null,4)])))),128))]),o.createElementVNode("button",pe,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.colordata,((e,a)=>(o.openBlock(),o.createElementBlock("button",{key:a,class:"color-container-specific-color1-container",onClick:t[2]||(t[2]=(...e)=>l.getcolor&&l.getcolor(...e))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.values(n.colordata[a])[0].length,((e,t)=>(o.openBlock(),o.createElementBlock("button",{key:t,class:"color-container-specific-color-checkbox-border"},[o.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:o.normalizeStyle({background:Object.values(n.colordata[a])[0][t]})},null,4)])))),128))])))),128))]),he,o.createElementVNode("button",ge,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.standardcolor,((e,a)=>(o.openBlock(),o.createElementBlock("button",{key:a,class:"color-container-specific-color-checkbox-border",onClick:t[3]||(t[3]=(...e)=>l.getcolor&&l.getcolor(...e))},[o.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:o.normalizeStyle({background:n.standardcolor[a]})},null,4)])))),128))]),o.createElementVNode("button",be,[o.createElementVNode("input",{id:"favcolor",type:"color",name:"favcolor",value:n.recentvalue,class:"favcolor",onChange:t[4]||(t[4]=(...e)=>l.getcolorvalue&&l.getcolorvalue(...e))},null,40,ye),o.createElementVNode("p",{class:"color-container-title",onClick:t[5]||(t[5]=(...e)=>l.colorpicker&&l.colorpicker(...e))}," More Colors ")]),!0===n.recent?(o.openBlock(),o.createElementBlock("p",Ae," Recent color ")):o.createCommentVNode("v-if",!0),o.createElementVNode("button",ve,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.recentcolor,((e,a)=>(o.openBlock(),o.createElementBlock("button",{key:a,class:"color-container-specific-color-checkbox-border",onClick:t[6]||(t[6]=(...e)=>l.getcolor&&l.getcolor(...e))},[o.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:o.normalizeStyle({background:n.recentcolor[a]})},null,4)])))),128))])],8,de)])),_:1},8,["show","top","left","onCloseOverlay"])):o.createCommentVNode("v-if",!0)])},ae.__file="src/components/ColorpaletteComponent.vue";var ke="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we={exports:{}};!function(e){var o,t,a;o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],t="undefined"!=typeof window,a=t&&null!=window.mozInnerScreenX,e.exports=function(e,i,n){if(!t)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var l=n&&n.debug||!1;if(l){var r=document.querySelector("#input-textarea-caret-position-mirror-div");r&&r.parentNode.removeChild(r)}var c=document.createElement("div");c.id="input-textarea-caret-position-mirror-div",document.body.appendChild(c);var s=c.style,m=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,d="INPUT"===e.nodeName;s.whiteSpace="pre-wrap",d||(s.wordWrap="break-word"),s.position="absolute",l||(s.visibility="hidden"),o.forEach((function(e){d&&"lineHeight"===e?s.lineHeight=m.height:s[e]=m[e]})),a?e.scrollHeight>parseInt(m.height)&&(s.overflowY="scroll"):s.overflow="hidden",c.textContent=e.value.substring(0,i),d&&(c.textContent=c.textContent.replace(/\s/g," "));var u=document.createElement("span");u.textContent=e.value.substring(i)||".",c.appendChild(u);var f={top:u.offsetTop+parseInt(m.borderTopWidth),left:u.offsetLeft+parseInt(m.borderLeftWidth),height:parseInt(m.lineHeight)};return l?u.style.backgroundColor="#aaa":document.body.removeChild(c),f}}(we);var Ee=Ce(we.exports);function Se(){return Se=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Se.apply(this,arguments)}var Be,Ne="undefined"!=typeof window&&navigator&&/Win/i.test(navigator.platform),Ve="undefined"!=typeof window&&navigator&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),xe=o.defineComponent({props:{lineNumbers:{type:Boolean,default:!1},autoStyleLineNumbers:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},modelValue:{type:String,default:""},highlight:{type:Function,required:!0},tabSize:{type:Number,default:2},insertSpaces:{type:Boolean,default:!0},ignoreTabKey:{type:Boolean,default:!1},placeholder:{type:String,default:""}},data:function(){return{capture:!0,history:{stack:[],offset:-1},lineNumbersHeight:"20px",codeData:""}},watch:{modelValue:{immediate:!0,handler:function(e){this.codeData=e||""}},content:{immediate:!0,handler:function(){var e=this;this.lineNumbers&&this.$nextTick((function(){e.setLineNumbersHeight()}))}},lineNumbers:function(){var e=this;this.$nextTick((function(){e.styleLineNumbers(),e.setLineNumbersHeight()}))}},computed:{isEmpty:function(){return 0===this.codeData.length},content:function(){return this.highlight(this.codeData)+"<br />"},lineNumbersCount:function(){return this.codeData.split(/\r\n|\n/).length}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(this.lineNumbers&&this.autoStyleLineNumbers){var e=this.$refs.pre,o=this.$el.querySelector(".prism-editor__line-numbers"),t=window.getComputedStyle(e);this.$nextTick((function(){var a="border-top-left-radius",i="border-bottom-left-radius";if(o){o.style[a]=t[a],o.style[i]=t[i],e.style[a]="0",e.style[i]="0";["background-color","margin-top","padding-top","font-family","font-size","line-height"].forEach((function(e){o.style[e]=t[e]})),o.style["margin-bottom"]="-"+t["padding-top"]}}))}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var o=e.value,t=e.selectionStart,a=e.selectionEnd;this._recordChange({value:o,selectionStart:t,selectionEnd:a})}},_getLines:function(e,o){return e.substring(0,o).split("\n")},_applyEdits:function(e){var o=this.$refs.textarea,t=this.history.stack[this.history.offset];t&&o&&(this.history.stack[this.history.offset]=Se({},t,{selectionStart:o.selectionStart,selectionEnd:o.selectionEnd})),this._recordChange(e),this._updateInput(e)},_recordChange:function(e,o){void 0===o&&(o=!1);var t=this.history,a=t.stack,i=t.offset;if(a.length&&i>-1){this.history.stack=a.slice(0,i+1);var n=this.history.stack.length;if(n>100){var l=n-100;this.history.stack=a.slice(l,n),this.history.offset=Math.max(this.history.offset-l,0)}}var r=Date.now();if(o){var c=this.history.stack[this.history.offset];if(c&&r-c.timestamp<3e3){var s,m,d=/[^a-z0-9]([a-z0-9]+)$/i,u=null===(s=this._getLines(c.value,c.selectionStart).pop())||void 0===s?void 0:s.match(d),f=null===(m=this._getLines(e.value,e.selectionStart).pop())||void 0===m?void 0:m.match(d);if(u&&f&&f[1].startsWith(u[1]))return void(this.history.stack[this.history.offset]=Se({},e,{timestamp:r}))}}this.history.stack.push(Se({},e,{timestamp:r})),this.history.offset++},_updateInput:function(e){var o=this.$refs.textarea;o&&(o.value=e.value,o.selectionStart=e.selectionStart,o.selectionEnd=e.selectionEnd,this.$emit("update:modelValue",e.value))},handleChange:function(e){var o=e.target,t=o.value,a=o.selectionStart,i=o.selectionEnd;this._recordChange({value:t,selectionStart:a,selectionEnd:i},!0),this.$emit("update:modelValue",t)},_undoEdit:function(){var e=this.history,o=e.stack,t=e.offset,a=o[t-1];a&&(this._updateInput(a),this.history.offset=Math.max(t-1,0))},_redoEdit:function(){var e=this.history,o=e.stack,t=e.offset,a=o[t+1];a&&(this._updateInput(a),this.history.offset=Math.min(t+1,o.length-1))},handleKeyDown:function(e){var o=this.tabSize,t=this.insertSpaces,a=this.ignoreTabKey;if(this.$emit("keydown",e),!e.defaultPrevented){27===e.keyCode&&(e.target.blur(),this.$emit("blur",e));var i=e.target,n=i.value,l=i.selectionStart,r=i.selectionEnd,c=(t?" ":"\t").repeat(o);if(9===e.keyCode&&!a&&this.capture)if(e.preventDefault(),e.shiftKey){var s=this._getLines(n,l),m=s.length-1,d=this._getLines(n,r).length-1,u=n.split("\n").map((function(e,o){return o>=m&&o<=d&&e.startsWith(c)?e.substring(c.length):e})).join("\n");if(n!==u){var f=s[m];this._applyEdits({value:u,selectionStart:f.startsWith(c)?l-c.length:l,selectionEnd:r-(n.length-u.length)})}}else if(l!==r){var p=this._getLines(n,l),h=p.length-1,g=this._getLines(n,r).length-1,b=p[h];this._applyEdits({value:n.split("\n").map((function(e,o){return o>=h&&o<=g?c+e:e})).join("\n"),selectionStart:/\S/.test(b)?l+c.length:l,selectionEnd:r+c.length*(g-h+1)})}else{var y=l+c.length;this._applyEdits({value:n.substring(0,l)+c+n.substring(r),selectionStart:y,selectionEnd:y})}else if(8===e.keyCode){var A=l!==r;if(n.substring(0,l).endsWith(c)&&!A){e.preventDefault();var v=l-c.length;this._applyEdits({value:n.substring(0,l-c.length)+n.substring(r),selectionStart:v,selectionEnd:v})}}else if(13===e.keyCode){if(l===r){var k=this._getLines(n,l).pop(),C=null==k?void 0:k.match(/^\s+/);if(C&&C[0]){e.preventDefault();var w="\n"+C[0],E=l+w.length;this._applyEdits({value:n.substring(0,l)+w+n.substring(r),selectionStart:E,selectionEnd:E})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var S;57===e.keyCode&&e.shiftKey?S=["(",")"]:219===e.keyCode?S=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?S=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(S=["`","`"]),l!==r&&S&&(e.preventDefault(),this._applyEdits({value:n.substring(0,l)+S[0]+n.substring(l,r)+S[1]+n.substring(r),selectionStart:l,selectionEnd:r+2}))}else!(Ve?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(Ve?e.metaKey&&90===e.keyCode&&e.shiftKey:Ne?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),this._redoEdit()):77!==e.keyCode||!e.ctrlKey||Ve&&!e.shiftKey||(e.preventDefault(),this.capture=!this.capture):(e.preventDefault(),this._undoEdit())}}},render:function(){var e=this,t=o.h("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),a=o.h("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[t,Array.from(Array(this.lineNumbersCount).keys()).map((function(e,t){return o.h("div",{class:"prism-editor__line-number token comment"},""+ ++t)}))]),i=o.h("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(o){e.$emit("click",o)},onKeyup:function(o){e.$emit("keyup",o)},onFocus:function(o){e.$emit("focus",o)},onBlur:function(o){e.$emit("blur",o)},class:{"prism-editor__textarea":!0,"prism-editor__textarea--empty":this.isEmpty},spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false",placeholder:this.placeholder,"data-testid":"textarea",readonly:this.readonly,value:this.codeData}),n=o.h("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),l=o.h("div",{class:"prism-editor__container"},[i,n]);return o.h("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&a,l])}}),Ie={exports:{}},Re={},Me={exports:{}},_e={},Te={};function De(){if(Be)return Te;function e(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function o(e,o){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),o=o||"",e.indent_level>0&&(o=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}function t(t,a){this.__indent_cache=new o(t,a),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return Be=1,e.prototype.clone_empty=function(){var o=new e(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},e.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},e.prototype.has_match=function(e){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(e))return!0;return!1},e.prototype.set_indent=function(e,o){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(e){this.__items.push(e);var o=e.lastIndexOf("\n");-1!==o?this.__character_count=e.length-o:this.__character_count+=e.length},e.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},o.prototype.get_indent_size=function(e,o){var t=this.__base_string_length;return o=o||0,e<0&&(t=0),t+=e*this.__indent_size,t+=o},o.prototype.get_indent_string=function(e,o){var t=this.__base_string;return o=o||0,e<0&&(e=0,t=""),o+=e*this.__indent_size,this.__ensure_cache(o),t+=this.__cache[o]},o.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var e=this.__cache.length,o=0,t="";this.__indent_size&&e>=this.__indent_size&&(e-=(o=Math.floor(e/this.__indent_size))*this.__indent_size,t=new Array(o+1).join(this.__indent_string)),e&&(t+=new Array(e+1).join(" ")),this.__cache.push(t)},t.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},t.prototype.get_line_number=function(){return this.__lines.length},t.prototype.get_indent_string=function(e,o){return this.__indent_cache.get_indent_string(e,o)},t.prototype.get_indent_size=function(e,o){return this.__indent_cache.get_indent_size(e,o)},t.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},t.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},t.prototype.get_code=function(e){this.trim(!0);var o=this.current_line.pop();o&&("\n"===o[o.length-1]&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var t=this.__lines.join("\n");return"\n"!==e&&(t=t.replace(/[\n]/g,e)),t},t.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},t.prototype.set_indent=function(e,o){return e=e||0,o=o||0,this.next_line.set_indent(e,o),this.__lines.length>1?(this.current_line.set_indent(e,o),!0):(this.current_line.set_indent(),!1)},t.prototype.add_raw_token=function(e){for(var o=0;o<e.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},t.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},t.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},t.prototype.remove_indent=function(e){for(var o=this.__lines.length;e<o;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},t.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},t.prototype.just_added_newline=function(){return this.current_line.is_empty()},t.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},t.prototype.ensure_empty_line_above=function(o,t){for(var a=this.__lines.length-2;a>=0;){var i=this.__lines[a];if(i.is_empty())break;if(0!==i.item(0).indexOf(o)&&i.item(-1)!==t){this.__lines.splice(a+1,0,new e(this)),this.previous_