halleyx-ui-framework 11.5.23 → 11.5.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(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"],a):a((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,a,o,t,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 a=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(a,o,t.get?t:{enumerable:!0,get:function(){return e[o]}})}})),a.default=e,Object.freeze(a)}var m=c(t),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:Math.floor(1e3*Math.random()+1)}),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,a,o){0==o?"right icon-angle-right-regular"===document.querySelector("#arrow-"+a).className?(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).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-"+a).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+a).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+a).className&&(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).classList.add("noo-border")),document.querySelector("#arrow-"+a).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+a).style.display="none",this.$emit("accordionclose")):"right icon-angle-right-regular"===document.querySelector("#arrow-"+a).className?(0==this.headerBorder&&document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).classList.add("noo-border"),document.querySelector("#arrow-"+a).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+a).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+a).className&&(document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).classList.remove("noo-border"),document.querySelector("#arrow-"+a).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+a).style.display="none",this.$emit("accordionclose"))}}};const p=["id","multiple"],h=["id"],g={key:0,style:{display:"flex"}},b=["id"],A={style:{width:"100%"}},y={key:1,style:{display:"flex"}},v=["id"],k=["id"];f.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createCommentVNode(' <div class="accordion-container"> '),(a.openBlock(),a.createElementBlock("div",{id:["item-"+n.unique],key:n.unique,class:"accordion-item",multiple:t.multiple},[a.createElementVNode("div",{id:["header-"+n.unique],class:"accordion-header",onClick:o[0]||(o[0]=e=>l.toggleView(e,n.unique,t.multiple))},["left"==t.direction?(a.openBlock(),a.createElementBlock("div",g,[a.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,b)])):a.createCommentVNode("v-if",!0),a.createElementVNode("header",A,[a.renderSlot(e.$slots,"item-title")]),"right"==t.direction?(a.openBlock(),a.createElementBlock("div",y,[a.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,v)])):a.createCommentVNode("v-if",!0)],8,h),a.createElementVNode("div",{id:["content-"+n.unique],class:"accordion-content"},[a.renderSlot(e.$slots,"item-body")],8,k)],8,p)),a.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 a=Math.floor(65536*(1+Math.random())).toString(16).substring(1);Object.keys(e).length>0&&this.push({...e,id:a})},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((a=>a.id&&a.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=[a.createElementVNode("i",{class:"icon-times-filled"},null,-1)];C.render=function(e,o,t,i,n,l){return a.openBlock(),a.createBlock(a.Teleport,{to:"body",class:"alert-not"},[n.notifications.length>0?(a.openBlock(),a.createElementBlock("section",w,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.notifications,(e=>(a.openBlock(),a.createElementBlock("div",{id:"alert"+e.id,ref_for:!0,ref:"hlx-alert-"+e.id,key:e,class:a.normalizeClass(["hlx alert",l.getClass(e)])},[a.createElementVNode("span",S,[a.createElementVNode("i",{class:a.normalizeClass(l.icon(e.type))},null,2)]),a.createElementVNode("div",B,[a.createElementVNode("p",N,a.toDisplayString(e.message),1)]),a.createElementVNode("button",{class:"close","aria-label":"close",onClick:a=>l.closeAlert(e.id)},[...x],8,V)],10,E)))),128))])):a.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,o,t,i,n,l){return a.openBlock(),a.createElementBlock("button",{id:"badge",type:"button",class:"icon-button","aria-label":t.icon},[a.createElementVNode("span",{class:a.normalizeClass(t.icon)},null,2),a.createElementVNode("span",M,a.toDisplayString(t.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:Math.floor(1e3*Math.random()+1)}),computed:{isIconSeparator(){return"object"==typeof this.separator}},methods:{current(e){!0===this.autoRoute&&this.$router.back(),this.$emit("path",e)},tooltipover(e,a){let o=e,t=a;this.ellipsis(o,t)},tooltipleave(e,a){let o=e,t=a;this.ellipses(o,t)},ellipsis(e,a){console.log(e,a),this.$nextTick((()=>{const o=document.querySelector("#"+e);if(null!=o){if(o.clientWidth<o.scrollWidth)if("ellipsis"===(o.currentStyle||window.getComputedStyle(o)).textOverflow){const e=document.querySelector("."+a);console.log(o.getBoundingClientRect().top);let t=o.getBoundingClientRect().top,i=o.getBoundingClientRect().left+77;return e.style.display="block",e.style.top=t+"px",e.style.left=i+"px",!0}return!1}}))},ellipses(e,a){this.$nextTick((()=>{const o=document.querySelector("#"+e);if(null!=o){if(o.clientWidth<o.scrollWidth)if("ellipsis"===(o.currentStyle||window.getComputedStyle(o)).textOverflow){return document.querySelector("."+a).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=a.createElementVNode("i",{style:{"font-weight":"800"},class:"icon-arrow-left-regular"},null,-1);_.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("nav",T,["Pathway-breadcrumb"===t.type?(a.openBlock(),a.createElementBlock("ul",D,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.items,((e,o)=>(a.openBlock(),a.createElementBlock("li",{key:o,onClick:a=>l.current(e)},[null!=e.icon?(a.openBlock(),a.createElementBlock("i",{key:0,"aria-hidden":"true",class:a.normalizeClass(e.icon)},null,2)):a.createCommentVNode("v-if",!0),o===t.items.length-1?(a.openBlock(),a.createElementBlock("a",{key:1,id:"breadcrumb"+o+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"+o+n.unique,"tooltip-textbreadcrumb"+o+n.unique),onMouseleave:e=>l.tooltipleave("breadcrumb"+o+n.unique,"tooltip-textbreadcrumb"+o+n.unique)},[a.createTextVNode(a.toDisplayString(e.label)+" ",1),a.createElementVNode("p",{id:"tooltip-text1",class:a.normalizeClass("tooltip-textbreadcrumb"+o+n.unique)},a.toDisplayString(e.label),3)],40,z)):(a.openBlock(),a.createElementBlock("a",{key:2,id:"breadcrumb"+n.unique+o,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+o,"tooltip-textbreadcrumb"+n.unique+o),onMouseleave:e=>l.tooltipleave("breadcrumb"+n.unique+o,"tooltip-textbreadcrumb"+n.unique+o)},[a.createTextVNode(a.toDisplayString(e.label)+" ",1),a.createElementVNode("p",{id:"tooltip-text1",class:a.normalizeClass("tooltip-textbreadcrumb"+n.unique+o)},a.toDisplayString(e.label),3)],40,O)),a.createCommentVNode(' <router-link :to="item.link" :class="{ disabled: index === items.length - 1 } " >{{ item.label }}</router-link> '),o<t.items.length-1?(a.openBlock(),a.createElementBlock("span",L,[l.isIconSeparator?(a.openBlock(),a.createElementBlock("i",{key:0,"aria-hidden":"true",class:a.normalizeClass(t.separator.icon)},null,2)):(a.openBlock(),a.createElementBlock("span",P,a.toDisplayString(t.separator),1))])):a.createCommentVNode("v-if",!0)],8,q)))),128))])):a.createCommentVNode("v-if",!0),"back-breadcrumb"===t.type?(a.openBlock(),a.createElementBlock("div",{key:1,class:"back-breadcrumb",style:{display:"flex",cursor:"pointer","align-items":"center",gap:"8px","max-width":"100px"},onClick:o[0]||(o[0]=e=>l.current("back"))},[U,a.createElementVNode("p",null,a.toDisplayString(t.labelValue),1)])):a.createCommentVNode("v-if",!0)])},_.__file="src/components/BreadcrumbComponent.vue";var K={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 F=["value","type","name","aria-label"],j=["aria-label","href","target"];K.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("button",{id:"hlx-button-0009",ref:"hlx-button",value:t.value,type:t.type,name:t.name,class:a.normalizeClass([l.primaryClass,"hlx-button"]),"aria-label":t.label,onClick:o[0]||(o[0]=(...e)=>l.clicked&&l.clicked(...e))},[a.renderSlot(e.$slots,"default"),null!=t.href?(a.openBlock(),a.createElementBlock("a",{key:0,ref:"link-ele","aria-label":t.label,href:t.href,target:t.target},null,8,j)):a.createCommentVNode("v-if",!0)],10,F)},K.__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:{en:{sun:"SUN",mon:"MON",tue:"TUE",wed:"WED",thu:"THU",fri:"FRI",sat:"SAT"},es:{sun:"DOM",mon:"LUN",tue:"MAR",wed:"MIÉ",thu:"JUE",fri:"VIE",sat:"SÁB"},fr:{sun:"DIM",mon:"LUN",tue:"MAR",wed:"MER",thu:"JEU",fri:"VEN",sat:"SAM"},de:{sun:"SO",mon:"MO",tue:"DI",wed:"MI",thu:"DO",fri:"FR",sat:"SA"},ta:{sun:"ஞாயி",mon:"திங்கள்",tue:"செவ்வாய்",wed:"புதன்",thu:"வியாழன்",fri:"வெள்ளி",sat:"சனி"},hi:{sun:"रवि",mon:"सोम",tue:"मंगल",wed:"बुध",thu:"गुरु",fri:"शुक्र",sat:"शनि"},ja:{sun:"日",mon:"月",tue:"火",wed:"水",thu:"木",fri:"金",sat:"土"},zh:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},sw:{sun:"Jumapili",mon:"Jumatatu",tue:"Jumanne",wed:"Jumatano",thu:"Alhamisi",fri:"Ijumaa",sat:"Jumamosi"},ar:{sun:"أحد",mon:"اثنين",tue:"ثلاثاء",wed:"أربعاء",thu:"خميس",fri:"جمعة",sat:"سبت"},bn:{sun:"রবি",mon:"সোম",tue:"মঙ্গল",wed:"বুধ",thu:"বৃহস্পতি",fri:"শুক্র",sat:"শনি"},pt:{sun:"Dom",mon:"Seg",tue:"Ter",wed:"Qua",thu:"Qui",fri:"Sex",sat:"Sáb"},ru:{sun:"Вс",mon:"Пн",tue:"Вт",wed:"Ср",thu:"Чт",fri:"Пт",sat:"Сб"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],es:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],fr:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],de:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],ta:["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"],hi:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"],ja:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],zh:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],sw:["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],bn:["জানুয়ারি","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],pt:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],ru:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]}}),mounted(){console.log(this.event,"cal eve",this.dateFormatLanguage);const e=document.querySelector(".calendar"),a=document.querySelector(".light");e.clientY=this.event.clientY,a.right=this.event.clientX+"px";const o=["January","February","March","April","May","June","July","August","September","October","November","December"],t=[];let i=this.startYear;const n=this.endYear;for(;i<=n;)t.push(i++);const l=e.querySelector(".month-list");t.forEach(((e,a)=>{const o=document.createElement("div");o.innerHTML=`<div data-month="${a}" id="year${a}" class="idd${e}">${e}</div>`;let t=(new Date).getFullYear();t+=1,e===t&&(document.getElementById("year"+(a-1)).classList.add("theme-background"),document.getElementById("year"+(a-1)).style.color="white"),o.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(o)}));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"===o[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"===o[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:{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,a){console.log(e,a,"jui");const o=document.querySelector(".calendar"),t=o.querySelector(".calendar-days"),i=o.querySelector("#year"),n=[31,this.getFebDays(a),31,30,31,30,31,31,30,31,30,31];t.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])}a||(a=l.getFullYear());const r=`${this.monthNames[this.dateFormatLanguage][e]}`;o.querySelector("#month-picker").innerHTML=r,i.innerHTML=a;const c=new Date(a,e,1);for(let o=0;o<=n[e]+c.getDay()-1;o++){const i=document.createElement("div");if(o>=c.getDay()){i.classList.add("calendar-day-hover");const t=o-c.getDay()+1;if(t>0&&t<=n[e]){const o=`${t}-${e+1}-${a}`;i.classList.add(o),console.log("fkoko",o),i.id="calender-day",this.holidayList.includes(o)&&(i.classList.remove("calendar-day-hover"),i.classList.add("disable-weekend")),i.innerHTML=t,t===l.getDate()&&a===l.getFullYear()&&e===l.getMonth()&&i.classList.add("curr-date")}}t.appendChild(i)}if(!0===this.disableWeekend){const e=document.querySelector(".calendar-days").children,a=[0,6,7,13,14,20,21,27,28,34,35];for(const o in a)e[a[o]]&&""!==e[a[o]].innerHTML&&(e[a[o]].classList.remove("calendar-day-hover"),e[a[o]].classList.add("disable-weekend"))}}}};const G={class:"light"},W={class:"calendar"},Q=a.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=a.createElementVNode("div",{class:"month-list"},null,-1);H.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("div",G,[a.createElementVNode("div",W,[Q,a.createElementVNode("div",J,[a.createElementVNode("div",Z,[a.createElementVNode("div",null,[a.createCommentVNode(" SUN "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].sun),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" MON "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].mon),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" TUE "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].tue),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" WED "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].wed),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" THU "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].thu),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" FRI "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].fri),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" SAT "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].sat),1)])]),a.createElementVNode("div",{class:"calendar-days",onClick:o[0]||(o[0]=(...e)=>l.log&&l.log(...e))})]),a.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,o,t,i,n,l){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["card",{cardhover:t.hover,cardshadow:t.shadow,padding:t.padding,cardActive:t.active}]),style:a.normalizeStyle("width:"+t.width+"px; height:"+t.height+"px;")},[1==t.cardTitle?(a.openBlock(),a.createElementBlock("div",$,[a.createElementVNode("header",null,[a.renderSlot(e.$slots,"card-title",{},(()=>[a.createTextVNode("Card title")]))])])):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:"card-body",style:a.normalizeStyle(t.cardTitle&&t.cardFooter?{height:t.height-l.headerHeight-l.footerHeight+"px"}:{height:"100%"})},[a.createCommentVNode(" {{this.card_body}} "),a.createElementVNode("main",null,[a.renderSlot(e.$slots,"card-body",{},(()=>[a.createTextVNode("Card body")]))])],4),1==t.cardFooter?(a.openBlock(),a.createElementBlock("div",ee,[a.createCommentVNode(" {{this.cardFooter}} "),a.createElementVNode("footer",null,[a.renderSlot(e.$slots,"card-footer",{},(()=>[a.createTextVNode("Card footer")]))])])):a.createCommentVNode("v-if",!0)],6)},Y.__file="src/components/CardsComponent.vue";var ae={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:Math.floor(1e3*Math.random()+1),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 oe=["id"];ae.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("div",{class:"outer-overlay",onClick:o[0]||(o[0]=(...e)=>l.emitfunction&&l.emitfunction(...e))},[a.createElementVNode("div",{id:"container-overlay"+n.unique,class:"container-overlay",style:a.normalizeStyle([{position:"fixed"},["width:"+t.width+"px","top:"+n.containertop+"px","left:"+t.left+"px"]])},[a.renderSlot(e.$slots,"overlay")],12,oe)])},ae.__file="src/components/OverlayComponent.vue";var te={name:"HlxColorPalette",components:{hlxOverlay:ae},props:{preValue:{type:String,default:"#000000"},highlightColor:{type:Boolean,default:!1}},emits:["customChange"],data:()=>({containerleft:0,containertop:0,unique:Math.floor(1e3*Math.random()+1),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 a=0;a<Object.values(this.colordata[e])[0].length;a++);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=[a.createElementVNode("i",{class:"icon-angle-down-regular"},null,-1)],de=["id"],ue=a.createElementVNode("p",{class:"color-container-title"},"Theme Colors",-1),fe={class:"color-container-specific-color"},pe={class:"color-container-specific-color1"},he=a.createElementVNode("p",{class:"color-container-title"},"Standard Colors",-1),ge={class:"color-container-specific-color"},be={class:"color-container2323"},Ae=["value"],ye={key:0,class:"color-container-title"},ve={class:"color-container-specific-color2"};te.render=function(e,o,t,i,n,l){const r=a.resolveComponent("hlx-overlay");return a.openBlock(),a.createElementBlock("div",ie,[a.createElementVNode("div",ne,[1==n.fill_color?(a.openBlock(),a.createElementBlock("i",le)):a.createCommentVNode("v-if",!0),!0===t.highlightColor?(a.openBlock(),a.createElementBlock("div",re,[!0===t.highlightColor?(a.openBlock(),a.createElementBlock("p",ce,"A")):a.createCommentVNode("v-if",!0),a.createCommentVNode(' <div class="higlight-icon-border" v-if="this.highlightColor === true"></div> ')])):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:"color-icon-border",style:a.normalizeStyle({background:n.colorvalue})},null,4)]),a.createElementVNode("button",{id:"color-palette-open-icon"+n.unique,"aria-dis":"",class:"color-palette-open-icon",onClick:o[0]||(o[0]=(...e)=>l.colorpalette&&l.colorpalette(...e))},[...me],8,se),n.colorcontainer?(a.openBlock(),a.createBlock(r,{key:0,show:n.colorcontainer,top:n.containertop,left:n.containerleft,width:100,conditionvalue:150,conditionup:55,onCloseOverlay:e.onClose},{overlay:a.withCtx((()=>[a.createElementVNode("button",{id:"color-container"+n.unique,class:"color-container"},[ue,a.createElementVNode("button",fe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.colordata,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color-checkbox-border",onClick:o[1]||(o[1]=(...e)=>l.getcolor&&l.getcolor(...e))},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:Object.keys(n.colordata[t])[0]})},null,4)])))),128))]),a.createElementVNode("button",pe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.colordata,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color1-container",onClick:o[2]||(o[2]=(...e)=>l.getcolor&&l.getcolor(...e))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Object.values(n.colordata[t])[0].length,((e,o)=>(a.openBlock(),a.createElementBlock("button",{key:o,class:"color-container-specific-color-checkbox-border"},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:Object.values(n.colordata[t])[0][o]})},null,4)])))),128))])))),128))]),he,a.createElementVNode("button",ge,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.standardcolor,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color-checkbox-border",onClick:o[3]||(o[3]=(...e)=>l.getcolor&&l.getcolor(...e))},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:n.standardcolor[t]})},null,4)])))),128))]),a.createElementVNode("button",be,[a.createElementVNode("input",{id:"favcolor",type:"color",name:"favcolor",value:n.recentvalue,class:"favcolor",onChange:o[4]||(o[4]=(...e)=>l.getcolorvalue&&l.getcolorvalue(...e))},null,40,Ae),a.createElementVNode("p",{class:"color-container-title",onClick:o[5]||(o[5]=(...e)=>l.colorpicker&&l.colorpicker(...e))},"More Colors")]),!0===n.recent?(a.openBlock(),a.createElementBlock("p",ye,"Recent color")):a.createCommentVNode("v-if",!0),a.createElementVNode("button",ve,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.recentcolor,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color-checkbox-border",onClick:o[6]||(o[6]=(...e)=>l.getcolor&&l.getcolor(...e))},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:n.recentcolor[t]})},null,4)])))),128))])],8,de)])),_:1},8,["show","top","left","onCloseOverlay"])):a.createCommentVNode("v-if",!0)])},te.__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 a,o,t;a=["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"],o="undefined"!=typeof window,t=o&&null!=window.mozInnerScreenX,e.exports=function(e,i,n){if(!o)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"),a.forEach((function(e){d&&"lineHeight"===e?s.lineHeight=m.height:s[e]=m[e]})),t?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 a=1;a<arguments.length;a++){var o=arguments[a];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}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=a.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,a=this.$el.querySelector(".prism-editor__line-numbers"),o=window.getComputedStyle(e);this.$nextTick((function(){var t="border-top-left-radius",i="border-bottom-left-radius";if(a){a.style[t]=o[t],a.style[i]=o[i],e.style[t]="0",e.style[i]="0";["background-color","margin-top","padding-top","font-family","font-size","line-height"].forEach((function(e){a.style[e]=o[e]})),a.style["margin-bottom"]="-"+o["padding-top"]}}))}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var a=e.value,o=e.selectionStart,t=e.selectionEnd;this._recordChange({value:a,selectionStart:o,selectionEnd:t})}},_getLines:function(e,a){return e.substring(0,a).split("\n")},_applyEdits:function(e){var a=this.$refs.textarea,o=this.history.stack[this.history.offset];o&&a&&(this.history.stack[this.history.offset]=Se({},o,{selectionStart:a.selectionStart,selectionEnd:a.selectionEnd})),this._recordChange(e),this._updateInput(e)},_recordChange:function(e,a){void 0===a&&(a=!1);var o=this.history,t=o.stack,i=o.offset;if(t.length&&i>-1){this.history.stack=t.slice(0,i+1);var n=this.history.stack.length;if(n>100){var l=n-100;this.history.stack=t.slice(l,n),this.history.offset=Math.max(this.history.offset-l,0)}}var r=Date.now();if(a){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 a=this.$refs.textarea;a&&(a.value=e.value,a.selectionStart=e.selectionStart,a.selectionEnd=e.selectionEnd,this.$emit("update:modelValue",e.value))},handleChange:function(e){var a=e.target,o=a.value,t=a.selectionStart,i=a.selectionEnd;this._recordChange({value:o,selectionStart:t,selectionEnd:i},!0),this.$emit("update:modelValue",o)},_undoEdit:function(){var e=this.history,a=e.stack,o=e.offset,t=a[o-1];t&&(this._updateInput(t),this.history.offset=Math.max(o-1,0))},_redoEdit:function(){var e=this.history,a=e.stack,o=e.offset,t=a[o+1];t&&(this._updateInput(t),this.history.offset=Math.min(o+1,a.length-1))},handleKeyDown:function(e){var a=this.tabSize,o=this.insertSpaces,t=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=(o?" ":"\t").repeat(a);if(9===e.keyCode&&!t&&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,a){return a>=m&&a<=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,a){return a>=h&&a<=g?c+e:e})).join("\n"),selectionStart:/\S/.test(b)?l+c.length:l,selectionEnd:r+c.length*(g-h+1)})}else{var A=l+c.length;this._applyEdits({value:n.substring(0,l)+c+n.substring(r),selectionStart:A,selectionEnd:A})}else if(8===e.keyCode){var y=l!==r;if(n.substring(0,l).endsWith(c)&&!y){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,o=a.h("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),t=a.h("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[o,Array.from(Array(this.lineNumbersCount).keys()).map((function(e,o){return a.h("div",{class:"prism-editor__line-number token comment"},""+ ++o)}))]),i=a.h("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(a){e.$emit("click",a)},onKeyup:function(a){e.$emit("keyup",a)},onFocus:function(a){e.$emit("focus",a)},onBlur:function(a){e.$emit("blur",a)},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=a.h("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),l=a.h("div",{class:"prism-editor__container"},[i,n]);return a.h("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&t,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 a(e,a){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)),a=a||"",e.indent_level>0&&(a=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}function o(o,t){this.__indent_cache=new a(o,t),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.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 a=new e(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},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 a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(e))return!0;return!1},e.prototype.set_indent=function(e,a){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=a||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 a=e.lastIndexOf("\n");-1!==a?this.__character_count=e.length-a: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},a.prototype.get_indent_size=function(e,a){var o=this.__base_string_length;return a=a||0,e<0&&(o=0),o+=e*this.__indent_size,o+=a},a.prototype.get_indent_string=function(e,a){var o=this.__base_string;return a=a||0,e<0&&(e=0,o=""),a+=e*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a]},a.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var e=this.__cache.length,a=0,o="";this.__indent_size&&e>=this.__indent_size&&(e-=(a=Math.floor(e/this.__indent_size))*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),e&&(o+=new Array(e+1).join(" ")),this.__cache.push(o)},o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(e,a){return this.__indent_cache.get_indent_string(e,a)},o.prototype.get_indent_size=function(e,a){return this.__indent_cache.get_indent_size(e,a)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(e){this.trim(!0);var a=this.current_line.pop();a&&("\n"===a[a.length-1]&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join("\n");return"\n"!==e&&(o=o.replace(/[\n]/g,e)),o},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(e,a){return e=e||0,a=a||0,this.next_line.set_indent(e,a),this.__lines.length>1?(this.current_line.set_indent(e,a),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(e){for(var a=0;a<e.newlines;a++)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},o.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()},o.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(" "))},o.prototype.remove_indent=function(e){for(var a=this.__lines.length;e<a;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},o.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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(a,o){for(var t=this.__lines.length-2;t>=0;){var i=this.__lines[t];if(i.is_empty())break;if(0!==i.item(0).indexOf(a)&&i.item(-1)!==o){this.__lines.splice(t+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}t--}},Te.Output=o,Te}var qe,ze={};function Oe(){if(qe)return ze;return qe=1,ze.Token=function(e,a,o,t){this.type=e,this.text=a,this.comments_before=null,this.newlines=o||0,this.whitespace_before=t||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},ze}var Le,Pe={};function Ue(){return Le||(Le=1,function(e){var a="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",t="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",n="(?:"+i+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+o+"])",l="(?:"+i+"|["+a+o+t+"])*";e.identifier=new RegExp(n+l,"g"),e.identifierStart=new RegExp(n),e.identifierMatch=new RegExp("(?:"+i+"|["+a+o+t+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")}(Pe)),Pe}var Ke,Fe,je={},He={};function Ge(){if(Ke)return He;function e(e,o){this.raw_options=a(e,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function a(e,a){var t,i={};for(t in e=o(e))t!==a&&(i[t]=e[t]);if(a&&e[a])for(t in e[a])i[t]=e[a][t];return i}function o(e){var a,o={};for(a in e){o[a.replace(/-/g,"_")]=e[a]}return o}return Ke=1,e.prototype._get_array=function(e,a){var o=this.raw_options[e],t=a||[];return"object"==typeof o?null!==o&&"function"==typeof o.concat&&(t=o.concat()):"string"==typeof o&&(t=o.split(/[^a-zA-Z0-9_\/\-]+/)),t},e.prototype._get_boolean=function(e,a){var o=this.raw_options[e];return void 0===o?!!a:!!o},e.prototype._get_characters=function(e,a){var o=this.raw_options[e],t=a||"";return"string"==typeof o&&(t=o.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),t},e.prototype._get_number=function(e,a){var o=this.raw_options[e];a=parseInt(a,10),isNaN(a)&&(a=0);var t=parseInt(o,10);return isNaN(t)&&(t=a),t},e.prototype._get_selection=function(e,a,o){var t=this._get_selection_list(e,a,o);if(1!==t.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+a+"\nYou passed in: '"+this.raw_options[e]+"'");return t[0]},e.prototype._get_selection_list=function(e,a,o){if(!a||0===a.length)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var t=this._get_array(e,o);if(!this._is_valid_selection(t,a))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+a+"\nYou passed in: '"+this.raw_options[e]+"'");return t},e.prototype._is_valid_selection=function(e,a){return e.length&&a.length&&!e.some((function(e){return-1===a.indexOf(e)}))},He.Options=e,He.normalizeOpts=o,He.mergeOpts=a,He}function We(){if(Fe)return je;Fe=1;var e=Ge().Options,a=["before-newline","after-newline","preserve-newline"];function o(o){e.call(this,o,"js");var t=this.raw_options.brace_style||null;"expand-strict"===t?this.raw_options.brace_style="expand":"collapse-preserve-inline"===t?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n<i.length;n++)"preserve-inline"===i[n]?this.brace_preserve_inline=!0:this.brace_style=i[n];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",a),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return o.prototype=new e,je.Options=o,je}var Qe,Je={},Ze={};function Xe(){if(Qe)return Ze;Qe=1;var e=RegExp.prototype.hasOwnProperty("sticky");function a(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}return a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},a.prototype.peek=function(e){var a=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(a=this.__input.charAt(e)),a},a.prototype.__match=function(a,o){a.lastIndex=o;var t=a.exec(this.__input);return!t||e&&a.sticky||t.index!==o&&(t=null),t},a.prototype.test=function(e,a){return a=a||0,(a+=this.__position)>=0&&a<this.__input_length&&!!this.__match(e,a)},a.prototype.testChar=function(e,a){var o=this.peek(a);return e.lastIndex=0,null!==o&&e.test(o)},a.prototype.match=function(e){var a=this.__match(e,this.__position);return a?this.__position+=a[0].length:a=null,a},a.prototype.read=function(e,a,o){var t,i="";return e&&(t=this.match(e))&&(i+=t[0]),!a||!t&&e||(i+=this.readUntil(a,o)),i},a.prototype.readUntil=function(e,a){var o,t=this.__position;e.lastIndex=this.__position;var i=e.exec(this.__input);return i?(t=i.index,a&&(t+=i[0].length)):t=this.__input_length,o=this.__input.substring(this.__position,t),this.__position=t,o},a.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},a.prototype.get_regexp=function(a,o){var t=null,i="g";return o&&e&&(i="y"),"string"==typeof a&&""!==a?t=new RegExp(a,i):a&&(t=new RegExp(a.source,i)),t},a.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(e){var a=this.__position,o=this.readUntilAfter(e);return this.__position=a,o},a.prototype.lookBack=function(e){var a=this.__position-1;return a>=e.length&&this.__input.substring(a-e.length,a).toLowerCase()===e},Ze.InputScanner=a,Ze}var Ye,$e={},ea={};var aa,oa,ta,ia={},na={};function la(){if(aa)return na;function e(e,a){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,a&&(this._starting_pattern=this._input.get_regexp(a._starting_pattern,!0),this._match_pattern=this._input.get_regexp(a._match_pattern,!0),this._until_pattern=this._input.get_regexp(a._until_pattern),this._until_after=a._until_after)}return aa=1,e.prototype.read=function(){var e=this._input.read(this._starting_pattern);return this._starting_pattern&&!e||(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(e){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(e),a._update(),a},e.prototype.until=function(e){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(e),a._update(),a},e.prototype.starting_with=function(e){var a=this._create();return a._starting_pattern=this._input.get_regexp(e,!0),a._update(),a},e.prototype.matching=function(e){var a=this._create();return a._match_pattern=this._input.get_regexp(e,!0),a._update(),a},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},na.Pattern=e,na}function ra(){if(ta)return $e;ta=1;var e=Xe().InputScanner,a=Oe().Token,o=function(){if(Ye)return ea;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return Ye=1,e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},e.prototype.peek=function(e){var a=null;return e=e||0,(e+=this.__position)>=0&&e<this.__tokens_length&&(a=this.__tokens[e]),a},e.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},ea.TokenStream=e,ea}().TokenStream,t=function(){if(oa)return ia;oa=1;var e=la().Pattern;function a(a,o){e.call(this,a,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return a.prototype=new e,a.prototype.__set_whitespace_patterns=function(e,a){e+="\\t ",a+="\\n\\r",this._match_pattern=this._input.get_regexp("["+e+a+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+a+"]")},a.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var e=this._input.read(this._match_pattern);if(" "===e)this.whitespace_before_token=" ";else if(e){var a=this.__split(this._newline_regexp,e);this.newline_count=a.length-1,this.whitespace_before_token=a[this.newline_count]}return e},a.prototype.matching=function(e,a){var o=this._create();return o.__set_whitespace_patterns(e,a),o._update(),o},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(e,a){e.lastIndex=0;for(var o=0,t=[],i=e.exec(a);i;)t.push(a.substring(o,i.index)),o=i.index+i[0].length,i=e.exec(a);return o<a.length?t.push(a.substring(o,a.length)):t.push(""),t},ia.WhitespacePattern=a,ia}().WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(a,o){this._input=new e(a),this._options=o||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new t(this._input)};return n.prototype.tokenize=function(){var e;this._input.restart(),this.__tokens=new o,this._reset();for(var t=new a(i.START,""),n=null,l=[],r=new o;t.type!==i.EOF;){for(e=this._get_next_token(t,n);this._is_comment(e);)r.add(e),e=this._get_next_token(t,n);r.isEmpty()||(e.comments_before=r,r=new o),e.parent=n,this._is_opening(e)?(l.push(n),n=e):n&&this._is_closing(e,n)&&(e.opened=n,n.closed=e,n=l.pop(),e.parent=n),e.previous=t,t.next=e,this.__tokens.add(e),t=e}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(e,a){this._readWhitespace();var o=this._input.read(/.+/g);return o?this._create_token(i.RAW,o):this._create_token(i.EOF,"")},n.prototype._is_comment=function(e){return!1},n.prototype._is_opening=function(e){return!1},n.prototype._is_closing=function(e,a){return!1},n.prototype._create_token=function(e,o){return new a(e,o,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},$e.Tokenizer=n,$e.TOKEN=i,$e}var ca,sa={};function ma(){if(ca)return sa;function e(e,a){e="string"==typeof e?e:e.source,a="string"==typeof a?a:a.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+a,"g")}return ca=1,e.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(e);o;)a[o[1]]=o[2],o=this.__directive_pattern.exec(e);return a},e.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},sa.Directives=e,sa}var da,ua,fa,pa,ha={};function ga(){if(da)return ha;da=1;var e=la().Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function o(o,t){e.call(this,o,t),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),t&&(this.__template_pattern=this._input.get_regexp(t.__template_pattern),this._excluded=Object.assign(this._excluded,t._excluded),this._disabled=Object.assign(this._disabled,t._disabled));var i=new e(o);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}return o.prototype=new e,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(e){var a=this._create();return a._disabled[e]=!0,a._update(),a},o.prototype.read_options=function(e){var o=this._create();for(var t in a)o._disabled[t]=-1===e.templating.indexOf(t);return o._update(),o},o.prototype.exclude=function(e){var a=this._create();return a._excluded[e]=!0,a._update(),a},o.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),e+=a,a=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},o.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},o.prototype._read_template=function(){var e="",a=this._input.peek();if("<"===a){var o=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==o||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==o||(e=e||this.__patterns.erb.read())}else"{"===a&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},ha.TemplatablePattern=o,ha}function ba(){if(ua)return Je;ua=1;var e=Xe().InputScanner,a=ra().Tokenizer,o=ra().TOKEN,t=ma().Directives,i=Ue(),n=la().Pattern,l=ga().TemplatablePattern;function r(e,a){return-1!==a.indexOf(e)}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},s=new t(/\/\*/,/\*\//),m=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,d=/[0-9]/,u=/[^\d\.]/,f=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=(p="\\?\\.(?!\\d) "+(p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var h,g=new RegExp(p),b="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),A=b.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+A.join("|")+")$"),v=function(e,o){a.call(this,e,o),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var t=new n(this._input),r=new l(this._input).read_options(this._options);this.__patterns={template:r,identifier:r.starting_with(i.identifier).matching(i.identifierMatch),number:t.matching(m),punct:t.matching(g),comment:t.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:t.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:t.matching(/<!--/),html_comment_end:t.matching(/-->/),include:t.starting_with(/#include/).until_after(i.lineBreak),shebang:t.starting_with(/#!/).until_after(i.lineBreak),xml:t.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:r.until(/['\\\n\r\u2028\u2029]/),double_quote:r.until(/["\\\n\r\u2028\u2029]/),template_text:r.until(/[`\\$]/),template_expression:r.until(/[`}\\]/)}};return(v.prototype=new a)._is_comment=function(e){return e.type===c.COMMENT||e.type===c.BLOCK_COMMENT||e.type===c.UNKNOWN},v.prototype._is_opening=function(e){return e.type===c.START_BLOCK||e.type===c.START_EXPR},v.prototype._is_closing=function(e,a){return(e.type===c.END_BLOCK||e.type===c.END_EXPR)&&a&&("]"===e.text&&"["===a.text||")"===e.text&&"("===a.text||"}"===e.text&&"{"===a.text)},v.prototype._reset=function(){h=!1},v.prototype._get_next_token=function(e,a){var o=null;this._readWhitespace();var t=this._input.peek();return null===t?this._create_token(c.EOF,""):o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o||this._read_non_javascript(t))||this._read_string(t))||this._read_pair(t,this._input.peek(1)))||this._read_word(e))||this._read_singles(t))||this._read_comment(t))||this._read_regexp(t,e))||this._read_xml(t,e))||this._read_punctuation())||this._create_token(c.UNKNOWN,this._input.next())},v.prototype._read_word=function(e){var a;return""!==(a=this.__patterns.identifier.read())?(a=a.replace(i.allLineBreaks,"\n"),e.type!==c.DOT&&(e.type!==c.RESERVED||"set"!==e.text&&"get"!==e.text)&&y.test(a)?"in"!==a&&"of"!==a||e.type!==c.WORD&&e.type!==c.STRING?this._create_token(c.RESERVED,a):this._create_token(c.OPERATOR,a):this._create_token(c.WORD,a)):""!==(a=this.__patterns.number.read())?this._create_token(c.WORD,a):void 0},v.prototype._read_singles=function(e){var a=null;return"("===e||"["===e?a=this._create_token(c.START_EXPR,e):")"===e||"]"===e?a=this._create_token(c.END_EXPR,e):"{"===e?a=this._create_token(c.START_BLOCK,e):"}"===e?a=this._create_token(c.END_BLOCK,e):";"===e?a=this._create_token(c.SEMICOLON,e):"."===e&&u.test(this._input.peek(1))?a=this._create_token(c.DOT,e):","===e&&(a=this._create_token(c.COMMA,e)),a&&this._input.next(),a},v.prototype._read_pair=function(e,a){var o=null;return"#"===e&&"{"===a&&(o=this._create_token(c.START_BLOCK,e+a)),o&&(this._input.next(),this._input.next()),o},v.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(c.EQUALS,e):"?."===e?this._create_token(c.DOT,e):this._create_token(c.OPERATOR,e)},v.prototype._read_non_javascript=function(e){var a="";if("#"===e){if(this._is_first_token()&&(a=this.__patterns.shebang.read()))return this._create_token(c.UNKNOWN,a.trim()+"\n");if(a=this.__patterns.include.read())return this._create_token(c.UNKNOWN,a.trim()+"\n");e=this._input.next();var o="#";if(this._input.hasNext()&&this._input.testChar(d)){do{o+=e=this._input.next()}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(o+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(o+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,o)}this._input.back()}else if("<"===e&&this._is_first_token()){if(a=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(i.newline);)a+=this._input.next();return h=!0,this._create_token(c.COMMENT,a)}}else if(h&&"-"===e&&(a=this.__patterns.html_comment_end.read()))return h=!1,this._create_token(c.COMMENT,a);return null},v.prototype._read_comment=function(e){var a=null;if("/"===e){var o="";if("*"===this._input.peek(1)){o=this.__patterns.block_comment.read();var t=s.get_directives(o);t&&"start"===t.ignore&&(o+=s.readIgnored(this._input)),o=o.replace(i.allLineBreaks,"\n"),(a=this._create_token(c.BLOCK_COMMENT,o)).directives=t}else"/"===this._input.peek(1)&&(o=this.__patterns.comment.read(),a=this._create_token(c.COMMENT,o))}return a},v.prototype._read_string=function(a){if("`"===a||"'"===a||'"'===a){var o=this._input.next();return this.has_char_escapes=!1,o+="`"===a?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(a),this.has_char_escapes&&this._options.unescape_strings&&(o=function(a){var o="",t=0,i=new e(a),n=null;for(;i.hasNext();)if((n=i.match(/([\s]|[^\\]|\\\\)+/g))&&(o+=n[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())n=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){o+="\\",i.hasNext()&&(o+=i.next());continue}(n=i.match(/u([0-9A-Fa-f]{4})/g))||(n=i.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!n)return a;if((t=parseInt(n[1],16))>126&&t<=255&&0===n[0].indexOf("x"))return a;o+=t>=0&&t<32||t>1114111?"\\"+n[0]:34===t||39===t||92===t?"\\"+String.fromCharCode(t):String.fromCharCode(t)}return o}(o)),this._input.peek()===a&&(o+=this._input.next()),o=o.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,o)}return null},v.prototype._allow_regexp_or_xml=function(e){return e.type===c.RESERVED&&r(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===c.END_EXPR&&")"===e.text&&e.opened.previous.type===c.RESERVED&&r(e.opened.previous.text,["if","while","for"])||r(e.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},v.prototype._read_regexp=function(e,a){if("/"===e&&this._allow_regexp_or_xml(a)){for(var o=this._input.next(),t=!1,n=!1;this._input.hasNext()&&(t||n||this._input.peek()!==e)&&!this._input.testChar(i.newline);)o+=this._input.peek(),t?t=!1:(t="\\"===this._input.peek(),"["===this._input.peek()?n=!0:"]"===this._input.peek()&&(n=!1)),this._input.next();return this._input.peek()===e&&(o+=this._input.next(),o+=this._input.read(i.identifier)),this._create_token(c.STRING,o)}return null},v.prototype._read_xml=function(e,a){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(a)){var o="",t=this.__patterns.xml.read_match();if(t){for(var n=t[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),l=0===n.indexOf("{"),r=0;t;){var s=!!t[1],m=t[2];if(!(!!t[t.length-1]||"![CDATA["===m.slice(0,8))&&(m===n||l&&m.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--r:++r),o+=t[0],r<=0)break;t=this.__patterns.xml.read_match()}return t||(o+=this._input.match(/[\s\S]*/g)[0]),o=o.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,o)}}return null},v.prototype._read_string_recursive=function(e,a,o){var t,n;"'"===e?n=this.__patterns.single_quote:'"'===e?n=this.__patterns.double_quote:"`"===e?n=this.__patterns.template_text:"}"===e&&(n=this.__patterns.template_expression);for(var l=n.read(),r="";this._input.hasNext();){if((r=this._input.next())===e||!a&&i.newline.test(r)){this._input.back();break}"\\"===r&&this._input.hasNext()?("x"===(t=this._input.peek())||"u"===t?this.has_char_escapes=!0:"\r"===t&&"\n"===this._input.peek(1)&&this._input.next(),r+=this._input.next()):o&&("${"===o&&"$"===r&&"{"===this._input.peek()&&(r+=this._input.next()),o===r&&(r+="`"===e?this._read_string_recursive("}",a,"`"):this._read_string_recursive("`",a,"${"),this._input.hasNext()&&(r+=this._input.next()))),l+=r+=n.read()}return l},Je.Tokenizer=v,Je.TOKEN=c,Je.positionable_operators=f.slice(),Je.line_starters=b.slice(),Je}function Aa(){if(fa)return _e;fa=1;var e=De().Output,a=Oe().Token,o=Ue(),t=We().Options,i=ba().Tokenizer,n=ba().line_starters,l=ba().positionable_operators,r=ba().TOKEN;function c(e,a){return-1!==a.indexOf(e)}function s(e,a){return e&&e.type===r.RESERVED&&e.text===a}function m(e,a){return e&&e.type===r.RESERVED&&c(e.text,a)}var d=["case","return","do","if","throw","else","await","break","continue","async"],u=function(e){for(var a={},o=0;o<e.length;o++)a[e[o].replace(/-/g,"_")]=e[o];return a}(["before-newline","after-newline","preserve-newline"]),f=[u.before_newline,u.preserve_newline],p="BlockStatement",h="Statement",g="ObjectLiteral",b="ArrayLiteral",A="ForInitializer",y="Conditional",v="Expression";function k(e,a){a.multiline_frame||a.mode===A||a.mode===y||e.remove_indent(a.start_line_index)}function C(e){return e===b}function w(e){return c(e,[v,A,y])}function E(e,a){a=a||{},this._source_text=e||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new t(a)}E.prototype.create_flags=function(e,o){var t=0;return e&&(t=e.indentation_level,!this._output.just_added_newline()&&e.line_indent_level>t&&(t=e.line_indent_level)),{mode:o,parent:e,last_token:e?e.last_token:new a(r.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:t,alignment:0,line_indent_level:e?e.line_indent_level:t,start_line_index:this._output.get_line_number(),ternary_depth:0}},E.prototype._reset=function(a){var o=a.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,o),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p);var t=new i(a,this._options);return this._tokens=t.tokenize(),a},E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),a=this._options.eol;"auto"===this._options.eol&&(a="\n",e&&o.lineBreak.test(e||"")&&(a=e.match(o.lineBreak)[0]));for(var t=this._tokens.next();t;)this.handle_token(t),this._last_last_text=this._flags.last_token.text,this._flags.last_token=t,t=this._tokens.next();return this._output.get_code(a)},E.prototype.handle_token=function(e,a){e.type===r.START_EXPR?this.handle_start_expr(e):e.type===r.END_EXPR?this.handle_end_expr(e):e.type===r.START_BLOCK?this.handle_start_block(e):e.type===r.END_BLOCK?this.handle_end_block(e):e.type===r.WORD||e.type===r.RESERVED?this.handle_word(e):e.type===r.SEMICOLON?this.handle_semicolon(e):e.type===r.STRING?this.handle_string(e):e.type===r.EQUALS?this.handle_equals(e):e.type===r.OPERATOR?this.handle_operator(e):e.type===r.COMMA?this.handle_comma(e):e.type===r.BLOCK_COMMENT?this.handle_block_comment(e,a):e.type===r.COMMENT?this.handle_comment(e,a):e.type===r.DOT?this.handle_dot(e):e.type===r.EOF?this.handle_eof(e):(e.type,r.UNKNOWN,this.handle_unknown(e,a))},E.prototype.handle_whitespace_and_comments=function(e,a){var o=e.newlines,t=this._options.keep_array_indentation&&C(this._flags.mode);if(e.comments_before)for(var i=e.comments_before.next();i;)this.handle_whitespace_and_comments(i,a),this.handle_token(i,a),i=e.comments_before.next();if(t)for(var n=0;n<o;n+=1)this.print_newline(n>0,a);else if(this._options.max_preserve_newlines&&o>this._options.max_preserve_newlines&&(o=this._options.max_preserve_newlines),this._options.preserve_newlines&&o>1){this.print_newline(!1,a);for(var l=1;l<o;l+=1)this.print_newline(!0,a)}};var S=["async","break","continue","return","throw","yield"];return E.prototype.allow_wrap_or_preserved_newline=function(e,a){if(a=void 0!==a&&a,!this._output.just_added_newline()){var o=this._options.preserve_newlines&&e.newlines||a;if(c(this._flags.last_token.text,l)||c(e.text,l)){var t=c(this._flags.last_token.text,l)&&c(this._options.operator_position,f)||c(e.text,l);o=o&&t}if(o)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(m(this._flags.last_token,S))return;this._output.set_wrap_point()}}},E.prototype.print_newline=function(e,a){if(!a&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==r.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var o=this._tokens.peek();!(this._flags.mode!==h||this._flags.if_block&&s(o,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(e)&&(this._flags.multiline_frame=!0)},E.prototype.print_token_line_indentation=function(e){this._output.just_added_newline()&&(this._options.keep_array_indentation&&e.newlines&&("["===e.text||C(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(e.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},E.prototype.print_token=function(e){if(this._output.raw)this._output.add_raw_token(e);else{if(this._options.comma_first&&e.previous&&e.previous.type===r.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var a=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(a),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(e),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(e),this._output.non_breaking_space=!0,this._output.add_token(e.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},E.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},E.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},E.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},E.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===h&&k(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},E.prototype.start_of_object_property=function(){return this._flags.parent.mode===g&&this._flags.mode===h&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||m(this._flags.last_token,["get","set"]))},E.prototype.start_of_statement=function(e){var a=!1;return!!(a=(a=(a=(a=(a=(a=(a=a||m(this._flags.last_token,["var","let","const"])&&e.type===r.WORD)||s(this._flags.last_token,"do"))||!(this._flags.parent.mode===g&&this._flags.mode===h)&&m(this._flags.last_token,S)&&!e.newlines)||s(this._flags.last_token,"else")&&!(s(e,"if")&&!e.comments_before))||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===A||this._previous_flags.mode===y))||this._flags.last_token.type===r.WORD&&this._flags.mode===p&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==r.WORD&&e.type!==r.RESERVED)||this._flags.mode===g&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||m(this._flags.last_token,["get","set"])))&&(this.set_mode(h),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,m(e,["do","for","if","while"])),!0)},E.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var a=v;if("["===e.text){if(this._flags.last_token.type===r.WORD||")"===this._flags.last_token.text)return m(this._flags.last_token,n)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(a),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));a=b,C(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,a=A):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,a=y):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(c(this._flags.last_token.text,n)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var o=this._tokens.peek(-3);if(this._options.space_after_named_function&&o){var t=this._tokens.peek(-4);m(o,["async","function"])||"*"===o.text&&m(t,["async","function"])?this._output.space_before_token=!0:this._flags.mode===g?"{"!==o.text&&","!==o.text&&("*"!==o.text||"{"!==t.text&&","!==t.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===r.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===r.START_BLOCK?this.print_newline():this._flags.last_token.type!==r.END_EXPR&&this._flags.last_token.type!==r.START_EXPR&&this._flags.last_token.type!==r.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==r.COMMA||this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(a),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},E.prototype.handle_end_expr=function(e){for(;this._flags.mode===h;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&C(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==r.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),k(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===y&&(this._previous_flags.mode=v,this._flags.do_block=!1,this._flags.do_while=!1)},E.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var a=this._tokens.peek(),o=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(p),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p):o&&(c(o.text,[":",","])&&c(a.type,[r.STRING,r.WORD,r.RESERVED])||c(a.text,["get","set","..."])&&c(o.type,[r.WORD,r.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(o.text,[":",","])?this.set_mode(p):this.set_mode(g):this._flags.last_token.type===r.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(p):c(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||m(this._flags.last_token,["return","throw","import","default"])?this.set_mode(g):this.set_mode(p),this._flags.last_token&&m(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var t=!a.comments_before&&"}"===a.text,i=t&&"function"===this._flags.last_word&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var n=0,l=null;this._flags.inline_frame=!0;do{if(n+=1,(l=this._tokens.peek(n-1)).newlines){this._flags.inline_frame=!1;break}}while(l.type!==r.EOF&&(l.type!==r.END_BLOCK||l.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(i||this._flags.last_token.type===r.EQUALS||m(this._flags.last_token,d)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!C(this._previous_flags.mode)||this._flags.last_token.type!==r.START_EXPR&&this._flags.last_token.type!==r.COMMA||((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(c(this._flags.last_token.type,[r.START_BLOCK,r.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),t||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},E.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===h;)this.restore_mode();var a=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!a?this._output.space_before_token=!0:"expand"===this._options.brace_style?a||this.print_newline():a||(C(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},E.prototype.handle_word=function(e){if(e.type===r.RESERVED)if(c(e.text,["set","get"])&&this._flags.mode!==g)e.type=r.WORD;else if("import"===e.text&&c(this._tokens.peek().text,["(","."]))e.type=r.WORD;else if(c(e.text,["as","from"])&&!this._flags.import_block)e.type=r.WORD;else if(this._flags.mode===g){":"===this._tokens.peek().text&&(e.type=r.WORD)}if(this.start_of_statement(e)?m(this._flags.last_token,["var","let","const"])&&e.type===r.WORD&&(this._flags.declaration_statement=!0):!e.newlines||w(this._flags.mode)||this._flags.last_token.type===r.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===r.EQUALS||!this._options.preserve_newlines&&m(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(s(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&s(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===h;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&m(e,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if(this._flags.last_token.type!==r.COMMA&&this._flags.last_token.type!==r.START_EXPR&&this._flags.last_token.type!==r.EQUALS&&this._flags.last_token.type!==r.OPERATOR||this.start_of_object_property()||c(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===g||this.allow_wrap_or_preserved_newline(e),s(e,"function"))return(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!c(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==r.OPERATOR)&&(this._output.just_added_blankline()||e.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?m(this._flags.last_token,["get","set","new","export"])||m(this._flags.last_token,S)||s(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!w(this._flags.mode)&&!C(this._flags.mode))&&this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var a="NONE";(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?a="SPACE":m(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?a="NEWLINE":(a="SPACE",this._output.space_before_token=!0):a="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===p?a="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&w(this._flags.mode)?a="SPACE":this._flags.last_token.type===r.STRING?a="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","]))?a="SPACE":this._flags.last_token.type===r.START_BLOCK?a=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,a="NEWLINE"),m(e,n)&&")"!==this._flags.last_token.text&&(a=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),m(e,["else","catch","finally"]))?(this._flags.last_token.type!==r.END_BLOCK||this._previous_flags.mode!==p||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===a?m(this._flags.last_token,d)||"declare"===this._flags.last_token.text&&m(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?this._flags.last_token.type===r.START_EXPR&&m(e,["var","let","const"])||":"===this._flags.last_token.text||(s(e,"if")&&s(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):m(e,n)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&C(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===a&&(this._output.space_before_token=!0);!e.previous||e.previous.type!==r.WORD&&e.previous.type!==r.RESERVED||(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===r.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&s(e,"from")&&(this._flags.import_block=!1))},E.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var a=this._tokens.peek();!(this._flags.mode!==h||this._flags.if_block&&s(a,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},E.prototype.handle_string=function(e){(!e.text.startsWith("`")||0!==e.newlines||""!==e.whitespace_before||")"!==e.previous.text&&this._flags.last_token.type!==r.WORD)&&(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):!e.text.startsWith("`")||this._flags.last_token.type!==r.END_EXPR||"]"!==e.previous.text&&")"!==e.previous.text||0!==e.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(e)},E.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},E.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(w(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===g||this._flags.mode===h&&this._flags.parent.mode===g?(this._flags.mode===h&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},E.prototype.handle_operator=function(e){var a="*"===e.text&&(m(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),o=c(e.text,["-","+"])&&(c(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||c(this._flags.last_token.text,n)||","===this._flags.last_token.text);if(this.start_of_statement(e));else{var t=!a;this.handle_whitespace_and_comments(e,t)}if("*"!==e.text||this._flags.last_token.type!==r.DOT)if("::"!==e.text)if(c(e.text,["-","+"])&&this.start_of_object_property())this.print_token(e);else{if(this._flags.last_token.type===r.OPERATOR&&c(this._options.operator_position,f)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==r.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,s=!0,g=!1;if(":"===e.text?0===this._flags.ternary_depth?i=!1:(this._flags.ternary_depth-=1,g=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!o&&!a&&this._options.preserve_newlines&&c(e.text,l)){var b=":"===e.text,A=b&&g,y=b&&!g;switch(this._options.operator_position){case u.before_newline:return this._output.space_before_token=!y,this.print_token(e),b&&!A||this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case u.after_newline:return this._output.space_before_token=!0,!b||A?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case u.preserve_newline:return y||this.allow_wrap_or_preserved_newline(e),i=!(this._output.just_added_newline()||y),this._output.space_before_token=i,this.print_token(e),void(this._output.space_before_token=!0)}}if(a){this.allow_wrap_or_preserved_newline(e),i=!1;var v=this._tokens.peek();s=v&&c(v.type,[r.WORD,r.RESERVED])}else if("..."===e.text)this.allow_wrap_or_preserved_newline(e),i=this._flags.last_token.type===r.START_BLOCK,s=!1;else if(c(e.text,["--","++","!","~"])||o){if(this._flags.last_token.type!==r.COMMA&&this._flags.last_token.type!==r.START_EXPR||this.allow_wrap_or_preserved_newline(e),i=!1,s=!1,e.newlines&&("--"===e.text||"++"===e.text||"~"===e.text)){var k=m(this._flags.last_token,d)&&e.newlines;k&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(k,!0)}";"===this._flags.last_token.text&&w(this._flags.mode)&&(i=!0),this._flags.last_token.type===r.RESERVED?i=!0:this._flags.last_token.type===r.END_EXPR?i=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===r.OPERATOR&&(i=c(e.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(e.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==p||this._flags.inline_frame)&&this._flags.mode!==h||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(e),this._output.space_before_token=s}else this.print_token(e);else this.print_token(e)},E.prototype.handle_block_comment=function(e,a){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,a),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):o.newline.test(e.text)||e.newlines?void this.print_block_commment(e,a):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},E.prototype.print_block_commment=function(e,a){var t,i=function(e){for(var a=[],t=(e=e.replace(o.allLineBreaks,"\n")).indexOf("\n");-1!==t;)a.push(e.substring(0,t)),t=(e=e.substring(t+1)).indexOf("\n");return e.length&&a.push(e),a}(e.text),n=!1,l=!1,r=e.whitespace_before,c=r.length;if(this.print_newline(!1,a),this.print_token_line_indentation(e),this._output.add_token(i[0]),this.print_newline(!1,a),i.length>1){for(n=function(e,a){for(var o=0;o<e.length;o++)if(e[o].trim().charAt(0)!==a)return!1;return!0}(i=i.slice(1),"*"),l=function(e,a){for(var o,t=0,i=e.length;t<i;t++)if((o=e[t])&&0!==o.indexOf(a))return!1;return!0}(i,r),n&&(this._flags.alignment=1),t=0;t<i.length;t++)n?(this.print_token_line_indentation(e),this._output.add_token(i[t].replace(/^\s+/g,""))):l&&i[t]?(this.print_token_line_indentation(e),this._output.add_token(i[t].substring(c))):(this._output.current_line.set_indent(-1),this._output.add_token(i[t])),this.print_newline(!1,a);this._flags.alignment=0}},E.prototype.handle_comment=function(e,a){e.newlines?this.print_newline(!1,a):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(e),this.print_newline(!1,a)},E.prototype.handle_dot=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),m(this._flags.last_token,d)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(e,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(e)},E.prototype.handle_unknown=function(e,a){this.print_token(e),"\n"===e.text[e.text.length-1]&&this.print_newline(!1,a)},E.prototype.handle_eof=function(e){for(;this._flags.mode===h;)this.restore_mode();this.handle_whitespace_and_comments(e)},_e.Beautifier=E,_e}var ya,va,ka,Ca={exports:{}},wa={},Ea={};function Sa(){if(ya)return Ea;ya=1;var e=Ge().Options;function a(a){e.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var t=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i<t.length;i++)"expand"!==t[i]?this.brace_style="collapse":this.brace_style=t[i]}return a.prototype=new e,Ea.Options=a,Ea}function Ba(){if(ka)return Ca.exports;ka=1;var e=function(){if(va)return wa;va=1;var e=Sa().Options,a=De().Output,o=Xe().InputScanner,t=new(0,ma().Directives)(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,l=/\s/,r=/(?:\s|\n)+/g,c=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,s=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function m(a,o){this._source_text=a||"",this._options=new e(o),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return m.prototype.eatString=function(e){var a="";for(this._ch=this._input.next();this._ch;){if(a+=this._ch,"\\"===this._ch)a+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return a},m.prototype.eatWhitespace=function(e){for(var a=l.test(this._input.peek()),o=0;l.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===o||o<this._options.max_preserve_newlines)&&(o++,this._output.add_new_line(!0));return a},m.prototype.foundNestedPseudoClass=function(){for(var e=0,a=1,o=this._input.peek(a);o;){if("{"===o)return!0;if("("===o)e+=1;else if(")"===o){if(0===e)return!1;e-=1}else if(";"===o||"}"===o)return!1;a++,o=this._input.peek(a)}return!1},m.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},m.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},m.prototype.indent=function(){this._indentLevel++},m.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},m.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,m=this._options.eol;"auto"===m&&(m="\n",e&&i.test(e||"")&&(m=e.match(i)[0]));var d=(e=e.replace(n,"\n")).match(/^[\t ]*/)[0];this._output=new a(this._options,d),this._input=new o(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var u,f,p=0,h=!1,g=!1,b=!1,A=!1,y=!1,v=this._ch,k=!1;u=""!==this._input.read(r),f=v,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),v=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var C=this._input.read(c),w=t.get_directives(C);w&&"start"===w.ignore&&(C+=t.readIgnored(this._input)),this.print_string(C),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(s)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(u),this.print_string(this._ch);var E=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);E.match(/[ :]$/)&&(E=this.eatString(": ").replace(/\s+$/,""),this.print_string(E),this._output.space_before_token=!0),0===p&&-1!==E.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(u),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),0===p&&-1!==S.indexOf(":")?(g=!0,this.indent()):S in this.NESTED_AT_RULE?(this._nestedLevel+=1,S in this.CONDITIONAL_GROUP_RULE&&(b=!0)):0!==p||g||(A=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(u),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),A=!1,b?(b=!1,h=this._indentLevel>=this._nestedLevel):h=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&h&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===f?this._output.space_before_token=!1:","!==f&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===f&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),h=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var B=0;B<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;B++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[B])){k=!0;break}!h&&!b||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||A||0!==p?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var N='"'===f||"'"===f;this.preserveSingleSpace(N||u),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)k=!1,0===p?(g&&(this.outdent(),g=!1),A=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),p++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),p&&(p--,this.outdent()));else{var V=!1;this._input.lookBack("with")&&(V=!0),this.preserveSingleSpace(u||V),this.print_string(this._ch),g&&"$"===f&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),p++,this.indent())}else if(")"===this._ch)p&&(p--,this.outdent()),y&&";"===this._input.peek()&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||g&&!y||0!==p||A?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==p)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(u),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),l.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var x='"'===f||"'"===f;this.preserveSingleSpace(x||u),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&k&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&l.test(this._ch)&&(this._ch=""));return this._output.get_code(m)},wa.Beautifier=m,wa}().Beautifier,a=Sa().Options;return Ca.exports=function(a,o){return new e(a,o).beautify()},Ca.exports.defaultOptions=function(){return new a},Ca.exports}var Na,Va={exports:{}},xa={},Ia={};function Ra(){if(Na)return Ia;Na=1;var e=Ge().Options;function a(a){e.call(this,a,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return a.prototype=new e,Ia.Options=a,Ia}var Ma,_a,Ta,Da,qa={};function za(){if(Ma)return qa;Ma=1;var e=ra().Tokenizer,a=ra().TOKEN,o=ma().Directives,t=ga().TemplatablePattern,i=la().Pattern,n={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},l=new o(/<\!--/,/-->/),r=function(a,o){e.call(this,a,o),this._current_tag_name="";var n=new t(this._input).read_options(this._options),l=new i(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),word_control_flow_close_excluded:n.until(/[\n\r\t <}]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),angular_control_flow_start:l.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),handlebars_open:l.until(/[\n\r\t }]/),handlebars_raw_close:l.until(/}}/),comment:l.starting_with(/<!--/).until_after(/-->/),cdata:l.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:l.starting_with(/<!\[/).until_after(/]>/),processing:l.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var r=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=l.matching(r).until_after(r)}};return(r.prototype=new e)._is_comment=function(e){return!1},r.prototype._is_opening=function(e){return e.type===n.TAG_OPEN||e.type===n.CONTROL_FLOW_OPEN},r.prototype._is_closing=function(e,a){return e.type===n.TAG_CLOSE&&a&&((">"===e.text||"/>"===e.text)&&"<"===a.text[0]||"}}"===e.text&&"{"===a.text[0]&&"{"===a.text[1])||e.type===n.CONTROL_FLOW_CLOSE&&"}"===e.text&&a.text.endsWith("{")},r.prototype._reset=function(){this._current_tag_name=""},r.prototype._get_next_token=function(e,a){var o=null;this._readWhitespace();var t=this._input.peek();return null===t?this._create_token(n.EOF,""):o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o||this._read_open_handlebars(t,a))||this._read_attribute(t,e,a))||this._read_close(t,a))||this._read_control_flows(t,a))||this._read_raw_content(t,e,a))||this._read_content_word(t,a))||this._read_comment_or_cdata(t))||this._read_processing(t))||this._read_open(t,a))||this._create_token(n.UNKNOWN,this._input.next())},r.prototype._read_comment_or_cdata=function(e){var a=null,o=null,t=null;"<"===e&&("!"===this._input.peek(1)&&((o=this.__patterns.comment.read())?(t=l.get_directives(o))&&"start"===t.ignore&&(o+=l.readIgnored(this._input)):o=this.__patterns.cdata.read()),o&&((a=this._create_token(n.COMMENT,o)).directives=t));return a},r.prototype._read_processing=function(e){var a=null,o=null;if("<"===e){var t=this._input.peek(1);"!"!==t&&"?"!==t||(o=(o=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),o&&((a=this._create_token(n.COMMENT,o)).directives=null)}return a},r.prototype._read_open=function(e,a){var o=null,t=null;return a&&a.type!==n.CONTROL_FLOW_OPEN||"<"===e&&(o=this._input.next(),"/"===this._input.peek()&&(o+=this._input.next()),o+=this.__patterns.element_name.read(),t=this._create_token(n.TAG_OPEN,o)),t},r.prototype._read_open_handlebars=function(e,a){var o=null,t=null;return a&&a.type!==n.CONTROL_FLOW_OPEN||this._options.indent_handlebars&&"{"===e&&"{"===this._input.peek(1)&&("!"===this._input.peek(2)?(o=(o=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),t=this._create_token(n.COMMENT,o)):(o=this.__patterns.handlebars_open.read(),t=this._create_token(n.TAG_OPEN,o))),t},r.prototype._read_control_flows=function(e,a){var o="",t=null;if(!this._options.templating.includes("angular")||!this._options.indent_handlebars)return t;if("@"===e){if(""===(o=this.__patterns.angular_control_flow_start.read()))return t;for(var i=o.endsWith("(")?1:0,l=0;!o.endsWith("{")||i!==l;){var r=this._input.next();if(null===r)break;"("===r?i++:")"===r&&l++,o+=r}t=this._create_token(n.CONTROL_FLOW_OPEN,o)}else"}"===e&&a&&a.type===n.CONTROL_FLOW_OPEN&&(o=this._input.next(),t=this._create_token(n.CONTROL_FLOW_CLOSE,o));return t},r.prototype._read_close=function(e,a){var o=null,t=null;return a&&a.type===n.TAG_OPEN&&("<"===a.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(o=this._input.next(),"/"===e&&(o+=this._input.next()),t=this._create_token(n.TAG_CLOSE,o)):"{"===a.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),t=this._create_token(n.TAG_CLOSE,"}}"))),t},r.prototype._read_attribute=function(e,a,o){var t=null,i="";if(o&&"<"===o.text[0])if("="===e)t=this._create_token(n.EQUALS,this._input.next());else if('"'===e||"'"===e){var l=this._input.next();l+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),t=this._create_token(n.VALUE,l)}else(i=this.__patterns.attribute.read())&&(t=a.type===n.EQUALS?this._create_token(n.VALUE,i):this._create_token(n.ATTRIBUTE,i));return t},r.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},r.prototype._read_raw_content=function(e,a,o){var t="";if(o&&"{"===o.text[0])t=this.__patterns.handlebars_raw_close.read();else if(a.type===n.TAG_CLOSE&&"<"===a.opened.text[0]&&"/"!==a.text[0]){var i=a.opened.text.substr(1).toLowerCase();if("script"===i||"style"===i){var l=this._read_comment_or_cdata(e);if(l)return l.type=n.TEXT,l;t=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(i)&&(t=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return t?this._create_token(n.TEXT,t):null},r.prototype._read_content_word=function(e,a){var o="";if(this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(o=this.__patterns.unformatted_content_delimiter.read()),o||(o=a&&a.type===n.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),o)return this._create_token(n.TEXT,o)},qa.Tokenizer=r,qa.TOKEN=n,qa}function Oa(){if(_a)return xa;_a=1;var e=Ra().Options,a=De().Output,o=za().Tokenizer,t=za().TOKEN,i=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,l=function(e,o){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new a(e,o)};l.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},l.prototype.set_space_before_token=function(e,a){this._output.space_before_token=e,this._output.non_breaking_space=a},l.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},l.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},l.prototype.print_preserved_newlines=function(e){var a=0;e.type!==t.TEXT&&e.previous.type!==t.TEXT&&(a=e.newlines?1:0),this.preserve_newlines&&(a=e.newlines<this.max_preserve_newlines+1?e.newlines:this.max_preserve_newlines+1);for(var o=0;o<a;o++)this.print_newline(o>0);return 0!==a},l.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},l.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},l.prototype.print_newline=function(e){this._output.add_new_line(e)},l.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},l.prototype.indent=function(){this.indent_level++},l.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},l.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var r=function(e,a){var o=null,i=null;return a.closed?("script"===e?o="text/javascript":"style"===e&&(o="text/css"),o=function(e){for(var a=null,o=e.next;o.type!==t.EOF&&e.closed!==o;){if(o.type===t.ATTRIBUTE&&"type"===o.text){o.next&&o.next.type===t.EQUALS&&o.next.next&&o.next.next.type===t.VALUE&&(a=o.next.next.text);break}o=o.next}return a}(a)||o,o.search("text/css")>-1?i="css":o.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":o.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":o.search(/test\/null/)>-1&&(i="null"),i):null};function c(e,a){return-1!==a.indexOf(e)}function s(e,a,o){this.parent=e||null,this.tag=a?a.tag_name:"",this.indent_level=o||0,this.parser_token=a||null}function m(e){this._printer=e,this._current_frame=null}function d(a,o,t,i){this._source_text=a||"",o=o||{},this._js_beautify=t,this._css_beautify=i,this._tag_stack=null;var n=new e(o,"html");this._options=n,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}m.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},m.prototype.record_tag=function(e){var a=new s(this._current_frame,e,this._printer.indent_level);this._current_frame=a},m.prototype._try_pop_frame=function(e){var a=null;return e&&(a=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),a},m.prototype._get_frame=function(e,a){for(var o=this._current_frame;o&&-1===e.indexOf(o.tag);){if(a&&-1!==a.indexOf(o.tag)){o=null;break}o=o.parent}return o},m.prototype.try_pop=function(e,a){var o=this._get_frame([e],a);return this._try_pop_frame(o)},m.prototype.indent_to_tag=function(e){var a=this._get_frame(e);a&&(this._printer.indent_level=a.indent_level)},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,a=this._options.eol;"auto"===this._options.eol&&(a="\n",e&&i.test(e)&&(a=e.match(i)[0]));var r=(e=e.replace(n,"\n")).match(/^[\t ]*/)[0],c={text:"",type:""},s=new u,d=new l(this._options,r),f=new o(e,this._options).tokenize();this._tag_stack=new m(d);for(var p=null,h=f.next();h.type!==t.EOF;)h.type===t.TAG_OPEN||h.type===t.COMMENT?s=p=this._handle_tag_open(d,h,s,c,f):h.type===t.ATTRIBUTE||h.type===t.EQUALS||h.type===t.VALUE||h.type===t.TEXT&&!s.tag_complete?p=this._handle_inside_tag(d,h,s,c):h.type===t.TAG_CLOSE?p=this._handle_tag_close(d,h,s):h.type===t.TEXT?p=this._handle_text(d,h,s):h.type===t.CONTROL_FLOW_OPEN?p=this._handle_control_flow_open(d,h):h.type===t.CONTROL_FLOW_CLOSE?p=this._handle_control_flow_close(d,h):d.add_raw_token(h),c=p,h=f.next();return d._output.get_code(a)},d.prototype._handle_control_flow_open=function(e,a){var o={text:a.text,type:a.type};return e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),a.newlines?e.print_preserved_newlines(a):e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),e.print_token(a),e.indent(),o},d.prototype._handle_control_flow_close=function(e,a){var o={text:a.text,type:a.type};return e.deindent(),a.newlines?e.print_preserved_newlines(a):e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),e.print_token(a),o},d.prototype._handle_tag_close=function(e,a,o){var t={text:a.text,type:a.type};return e.alignment_size=0,o.tag_complete=!0,e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),o.is_unformatted?e.add_raw_token(a):("<"===o.tag_start_char&&(e.set_space_before_token("/"===a.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&o.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(a)),!o.indent_content||o.is_unformatted||o.is_content_unformatted||(e.indent(),o.indent_content=!1),o.is_inline_element||o.is_unformatted||o.is_content_unformatted||e.set_wrap_point(),t},d.prototype._handle_inside_tag=function(e,a,o,i){var n=o.has_wrapped_attrs,l={text:a.text,type:a.type};return e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),o.is_unformatted?e.add_raw_token(a):"{"===o.tag_start_char&&a.type===t.TEXT?e.print_preserved_newlines(a)?(a.newlines=0,e.add_raw_token(a)):e.print_token(a):(a.type===t.ATTRIBUTE?e.set_space_before_token(!0):(a.type===t.EQUALS||a.type===t.VALUE&&a.previous.type===t.EQUALS)&&e.set_space_before_token(!1),a.type===t.ATTRIBUTE&&"<"===o.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(a),n=n||0!==a.newlines),this._is_wrap_attributes_force&&o.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==t.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(e.print_newline(!1),n=!0)),e.print_token(a),n=n||e.previous_token_wrapped(),o.has_wrapped_attrs=n),l},d.prototype._handle_text=function(e,a,o){var t={text:a.text,type:"TK_CONTENT"};return o.custom_beautifier_name?this._print_custom_beatifier_text(e,a,o):o.is_unformatted||o.is_content_unformatted?e.add_raw_token(a):(e.traverse_whitespace(a),e.print_token(a)),t},d.prototype._print_custom_beatifier_text=function(e,a,o){var t=this;if(""!==a.text){var i,n=a.text,l=1,r="",c="";"javascript"===o.custom_beautifier_name&&"function"==typeof this._js_beautify?i=this._js_beautify:"css"===o.custom_beautifier_name&&"function"==typeof this._css_beautify?i=this._css_beautify:"html"===o.custom_beautifier_name&&(i=function(e,a){return new d(e,a,t._js_beautify,t._css_beautify).beautify()}),"keep"===this._options.indent_scripts?l=0:"separate"===this._options.indent_scripts&&(l=-e.indent_level);var s=e.get_full_indent(l);if(n=n.replace(/\n[ \t]*$/,""),"html"!==o.custom_beautifier_name&&"<"===n[0]&&n.match(/^(<!--|<!\[CDATA\[)/)){var m=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(n);if(!m)return void e.add_raw_token(a);r=s+m[1]+"\n",n=m[4],m[5]&&(c=s+m[5]),n=n.replace(/\n[ \t]*$/,""),(m[2]||-1!==m[3].indexOf("\n"))&&(m=m[3].match(/[ \t]+$/))&&(a.whitespace_before=m[0])}if(n)if(i){var u=function(){this.eol="\n"};u.prototype=this._options.raw_options,n=i(s+n,new u)}else{var f=a.whitespace_before;f&&(n=n.replace(new RegExp("\n("+f+")?","g"),"\n")),n=s+n.replace(/\n/g,"\n"+s)}r&&(n=n?r+n+"\n"+c:r+c),e.print_newline(!1),n&&(a.text=n,a.whitespace_before="",a.newlines=0,e.add_raw_token(a),e.print_newline(!0))}},d.prototype._handle_tag_open=function(e,a,o,i,n){var l=this._get_tag_open_token(a);if(!o.is_unformatted&&!o.is_content_unformatted||o.is_empty_element||a.type!==t.TAG_OPEN||l.is_start_tag?(e.traverse_whitespace(a),this._set_tag_position(e,a,l,o,i),l.is_inline_element||e.set_wrap_point(),e.print_token(a)):(e.add_raw_token(a),l.start_tag_token=this._tag_stack.try_pop(l.tag_name)),l.is_start_tag&&this._is_wrap_attributes_force){var r,c=0;do{(r=n.peek(c)).type===t.ATTRIBUTE&&(l.attr_count+=1),c+=1}while(r.type!==t.EOF&&r.type!==t.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(l.alignment_size=a.text.length+1),l.tag_complete||l.is_unformatted||(e.alignment_size=l.alignment_size),l};var u=function(e,a){if(this.parent=e||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",a){var o;this.tag_start_char=a.text[0],this.text=a.text,"<"===this.tag_start_char?(o=a.text.match(/^<([^\s>]*)/),this.tag_check=o?o[1]:""):(o=a.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=o?o[1]:"",(a.text.startsWith("{{#>")||a.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==a.next?this.tag_check=a.next.text.split(" ")[0]:this.tag_check=a.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),a.type===t.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||a.closed&&"/>"===a.closed.text;var i=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(i=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(i)))}else this.tag_complete=!0};d.prototype._get_tag_open_token=function(e){var a=new u(this._tag_stack.get_parser_token(),e);return a.alignment_size=this._options.wrap_attributes_indent_size,a.is_end_tag=a.is_end_tag||c(a.tag_check,this._options.void_elements),a.is_empty_element=a.tag_complete||a.is_start_tag&&a.is_end_tag,a.is_unformatted=!a.tag_complete&&c(a.tag_check,this._options.unformatted),a.is_content_unformatted=!a.is_empty_element&&c(a.tag_check,this._options.content_unformatted),a.is_inline_element=c(a.tag_name,this._options.inline)||this._options.inline_custom_elements&&a.tag_name.includes("-")||"{"===a.tag_start_char,a},d.prototype._set_tag_position=function(e,a,o,i,n){if(o.is_empty_element||(o.is_end_tag?o.start_tag_token=this._tag_stack.try_pop(o.tag_name):(this._do_optional_end_element(o)&&(o.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(o),"script"!==o.tag_name&&"style"!==o.tag_name||o.is_unformatted||o.is_content_unformatted||(o.custom_beautifier_name=r(o.tag_check,a)))),c(o.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),o.is_empty_element){if("{"===o.tag_start_char&&"else"===o.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),o.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===o.tag_name&&n.type===t.TAG_CLOSE&&i.is_end_tag&&-1===o.text.indexOf("\n")||(o.is_inline_element||o.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,o))}else if(o.is_end_tag){var l=!1;l=(l=o.start_tag_token&&o.start_tag_token.multiline_content)||!o.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(n.type===t.TAG_CLOSE&&o.start_tag_token===i)&&"TK_CONTENT"!==n.type,(o.is_content_unformatted||o.is_unformatted)&&(l=!1),l&&e.print_newline(!1)}else o.indent_content=!o.custom_beautifier_name,"<"===o.tag_start_char&&("html"===o.tag_name?o.indent_content=this._options.indent_inner_html:"head"===o.tag_name?o.indent_content=this._options.indent_head_inner_html:"body"===o.tag_name&&(o.indent_content=this._options.indent_body_inner_html)),o.is_inline_element||o.is_unformatted||"TK_CONTENT"===n.type&&!o.is_content_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,o)},d.prototype._calcluate_parent_multiline=function(e,a){!a.parent||!e._output.just_added_newline()||(a.is_inline_element||a.is_unformatted)&&a.parent.is_inline_element||(a.parent.multiline_content=!0)};var f=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],p=["a","audio","del","ins","map","noscript","video"];return d.prototype._do_optional_end_element=function(e){var a=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)a=a||this._tag_stack.try_pop("head");else if("li"===e.tag_name)a=a||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===e.tag_name||"dt"===e.tag_name)a=(a=a||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==f.indexOf(e.tag_name)){var o=e.parent.parent;o&&-1!==p.indexOf(o.tag_name)||(a=a||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?a=(a=a||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?a=a||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?a=a||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?a=a||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?a=(a=a||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?a=(a=(a=(a=a||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?a=(a=(a=a||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==e.tag_name&&"td"!==e.tag_name||(a=(a=a||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),a}},xa.Beautifier=d,xa}function La(){if(Da)return Re;Da=1;var e=function(){if(pa)return Me.exports;pa=1;var e=Aa().Beautifier,a=We().Options;return Me.exports=function(a,o){return new e(a,o).beautify()},Me.exports.defaultOptions=function(){return new a},Me.exports}(),a=Ba(),o=function(){if(Ta)return Va.exports;Ta=1;var e=Oa().Beautifier,a=Ra().Options;return Va.exports=function(a,o,t,i){return new e(a,o,t,i).beautify()},Va.exports.defaultOptions=function(){return new a},Va.exports}();function t(t,i,n,l){return o(t,i,n=n||e,l=l||a)}return t.defaultOptions=o.defaultOptions,Re.js=e,Re.css=a,Re.html=t,Re}!function(e){!function(e){var a=La();a.js_beautify=a.js,a.css_beautify=a.css,a.html_beautify=a.html,e.exports=function(e,a,o){var t=function(a,o){return e.js_beautify(a,o)};return t.js=e.js_beautify,t.css=a.css_beautify,t.html=o.html_beautify,t.js_beautify=e.js_beautify,t.css_beautify=a.css_beautify,t.html_beautify=o.html_beautify,t}(a,a,a)}(e)}(Ie);var Pa=Ce(Ie.exports),Ua={exports:{}};!function(e){var a=function(e){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,t={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(a){return a instanceof n?new n(a.type,e(a.content),a.alias):Array.isArray(a)?a.map(e):a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++o}),e.__id},clone:function e(a,o){var t,n;switch(o=o||{},i.util.type(a)){case"Object":if(n=i.util.objId(a),o[n])return o[n];for(var l in t={},o[n]=t,a)a.hasOwnProperty(l)&&(t[l]=e(a[l],o));return t;case"Array":return n=i.util.objId(a),o[n]?o[n]:(t=[],o[n]=t,a.forEach((function(a,i){t[i]=e(a,o)})),t);default:return a}},getLanguage:function(e){for(;e;){var o=a.exec(e.className);if(o)return o[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,o){e.className=e.className.replace(RegExp(a,"gi"),""),e.classList.add("language-"+o)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(t){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(t.stack)||[])[1];if(e){var a=document.getElementsByTagName("script");for(var o in a)if(a[o].src==e)return a[o]}return null}},isActive:function(e,a,o){for(var t="no-"+a;e;){var i=e.classList;if(i.contains(a))return!0;if(i.contains(t))return!1;e=e.parentElement}return!!o}},languages:{plain:t,plaintext:t,text:t,txt:t,extend:function(e,a){var o=i.util.clone(i.languages[e]);for(var t in a)o[t]=a[t];return o},insertBefore:function(e,a,o,t){var n=(t=t||i.languages)[e],l={};for(var r in n)if(n.hasOwnProperty(r)){if(r==a)for(var c in o)o.hasOwnProperty(c)&&(l[c]=o[c]);o.hasOwnProperty(r)||(l[r]=n[r])}var s=t[e];return t[e]=l,i.languages.DFS(i.languages,(function(a,o){o===s&&a!=e&&(this[a]=l)})),l},DFS:function e(a,o,t,n){n=n||{};var l=i.util.objId;for(var r in a)if(a.hasOwnProperty(r)){o.call(a,r,a[r],t||r);var c=a[r],s=i.util.type(c);"Object"!==s||n[l(c)]?"Array"!==s||n[l(c)]||(n[l(c)]=!0,e(c,o,r,n)):(n[l(c)]=!0,e(c,o,null,n))}}},plugins:{},highlightAll:function(e,a){i.highlightAllUnder(document,e,a)},highlightAllUnder:function(e,a,o){var t={callback:o,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",t),t.elements=Array.prototype.slice.apply(t.container.querySelectorAll(t.selector)),i.hooks.run("before-all-elements-highlight",t);for(var n,l=0;n=t.elements[l++];)i.highlightElement(n,!0===a,t.callback)},highlightElement:function(a,o,t){var n=i.util.getLanguage(a),l=i.languages[n];i.util.setLanguage(a,n);var r=a.parentElement;r&&"pre"===r.nodeName.toLowerCase()&&i.util.setLanguage(r,n);var c={element:a,language:n,grammar:l,code:a.textContent};function s(e){c.highlightedCode=e,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i.hooks.run("after-highlight",c),i.hooks.run("complete",c),t&&t.call(c.element)}if(i.hooks.run("before-sanity-check",c),(r=c.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!c.code)return i.hooks.run("complete",c),void(t&&t.call(c.element));if(i.hooks.run("before-highlight",c),c.grammar)if(o&&e.Worker){var m=new Worker(i.filename);m.onmessage=function(e){s(e.data)},m.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else s(i.highlight(c.code,c.grammar,c.language));else s(i.util.encode(c.code))},highlight:function(e,a,o){var t={code:e,grammar:a,language:o};if(i.hooks.run("before-tokenize",t),!t.grammar)throw new Error('The language "'+t.language+'" has no grammar.');return t.tokens=i.tokenize(t.code,t.grammar),i.hooks.run("after-tokenize",t),n.stringify(i.util.encode(t.tokens),t.language)},tokenize:function(e,a){var o=a.rest;if(o){for(var t in o)a[t]=o[t];delete a.rest}var i=new c;return s(i,i.head,e),r(e,i,a,i.head,0),function(e){var a=[],o=e.head.next;for(;o!==e.tail;)a.push(o.value),o=o.next;return a}(i)},hooks:{all:{},add:function(e,a){var o=i.hooks.all;o[e]=o[e]||[],o[e].push(a)},run:function(e,a){var o=i.hooks.all[e];if(o&&o.length)for(var t,n=0;t=o[n++];)t(a)}},Token:n};function n(e,a,o,t){this.type=e,this.content=a,this.alias=o,this.length=0|(t||"").length}function l(e,a,o,t){e.lastIndex=a;var i=e.exec(o);if(i&&t&&i[1]){var n=i[1].length;i.index+=n,i[0]=i[0].slice(n)}return i}function r(e,a,o,t,c,d){for(var u in o)if(o.hasOwnProperty(u)&&o[u]){var f=o[u];f=Array.isArray(f)?f:[f];for(var p=0;p<f.length;++p){if(d&&d.cause==u+","+p)return;var h=f[p],g=h.inside,b=!!h.lookbehind,A=!!h.greedy,y=h.alias;if(A&&!h.pattern.global){var v=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}for(var k=h.pattern||h,C=t.next,w=c;C!==a.tail&&!(d&&w>=d.reach);w+=C.value.length,C=C.next){var E=C.value;if(a.length>e.length)return;if(!(E instanceof n)){var S,B=1;if(A){if(!(S=l(k,w,e,b))||S.index>=e.length)break;var N=S.index,V=S.index+S[0].length,x=w;for(x+=C.value.length;N>=x;)x+=(C=C.next).value.length;if(w=x-=C.value.length,C.value instanceof n)continue;for(var I=C;I!==a.tail&&(x<V||"string"==typeof I.value);I=I.next)B++,x+=I.value.length;B--,E=e.slice(w,x),S.index-=w}else if(!(S=l(k,0,E,b)))continue;N=S.index;var R=S[0],M=E.slice(0,N),_=E.slice(N+R.length),T=w+E.length;d&&T>d.reach&&(d.reach=T);var D=C.prev;if(M&&(D=s(a,D,M),w+=M.length),m(a,D,B),C=s(a,D,new n(u,g?i.tokenize(R,g):R,y,R)),_&&s(a,C,_),B>1){var q={cause:u+","+p,reach:T};r(e,a,o,C.prev,w,q),d&&q.reach>d.reach&&(d.reach=q.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},a={value:null,prev:e,next:null};e.next=a,this.head=e,this.tail=a,this.length=0}function s(e,a,o){var t=a.next,i={value:o,prev:a,next:t};return a.next=i,t.prev=i,e.length++,i}function m(e,a,o){for(var t=a.next,i=0;i<o&&t!==e.tail;i++)t=t.next;a.next=t,t.prev=a,e.length-=i}if(e.Prism=i,n.stringify=function e(a,o){if("string"==typeof a)return a;if(Array.isArray(a)){var t="";return a.forEach((function(a){t+=e(a,o)})),t}var n={type:a.type,content:e(a.content,o),tag:"span",classes:["token",a.type],attributes:{},language:o},l=a.alias;l&&(Array.isArray(l)?Array.prototype.push.apply(n.classes,l):n.classes.push(l)),i.hooks.run("wrap",n);var r="";for(var c in n.attributes)r+=" "+c+'="'+(n.attributes[c]||"").replace(/"/g,"&quot;")+'"';return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+r+">"+n.content+"</"+n.tag+">"},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(a){var o=JSON.parse(a.data),t=o.language,n=o.code,l=o.immediateClose;e.postMessage(i.highlight(n,i.languages[t],t)),l&&e.close()}),!1),i):i;var d=i.util.currentScript();function u(){i.manual||i.highlightAll()}if(d&&(i.filename=d.src,d.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
1
+ !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(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"],a):a((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,a,o,t,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 a=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(a,o,t.get?t:{enumerable:!0,get:function(){return e[o]}})}})),a.default=e,Object.freeze(a)}var m=c(t),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:Math.floor(1e3*Math.random()+1)}),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,a,o){0==o?"right icon-angle-right-regular"===document.querySelector("#arrow-"+a).className?(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).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-"+a).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+a).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+a).className&&(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).classList.add("noo-border")),document.querySelector("#arrow-"+a).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+a).style.display="none",this.$emit("accordionclose")):"right icon-angle-right-regular"===document.querySelector("#arrow-"+a).className?(0==this.headerBorder&&document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).classList.add("noo-border"),document.querySelector("#arrow-"+a).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+a).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+a).className&&(document.querySelector("#header-"+a)&&document.querySelector("#header-"+a).classList.remove("noo-border"),document.querySelector("#arrow-"+a).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+a).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+a).style.display="none",this.$emit("accordionclose"))}}};const p=["id","multiple"],h=["id"],g={key:0,style:{display:"flex"}},b=["id"],A={style:{width:"100%"}},y={key:1,style:{display:"flex"}},v=["id"],k=["id"];f.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createCommentVNode(' <div class="accordion-container"> '),(a.openBlock(),a.createElementBlock("div",{id:["item-"+n.unique],key:n.unique,class:"accordion-item",multiple:t.multiple},[a.createElementVNode("div",{id:["header-"+n.unique],class:"accordion-header",onClick:o[0]||(o[0]=e=>l.toggleView(e,n.unique,t.multiple))},["left"==t.direction?(a.openBlock(),a.createElementBlock("div",g,[a.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,b)])):a.createCommentVNode("v-if",!0),a.createElementVNode("header",A,[a.renderSlot(e.$slots,"item-title")]),"right"==t.direction?(a.openBlock(),a.createElementBlock("div",y,[a.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,v)])):a.createCommentVNode("v-if",!0)],8,h),a.createElementVNode("div",{id:["content-"+n.unique],class:"accordion-content"},[a.renderSlot(e.$slots,"item-body")],8,k)],8,p)),a.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 a=Math.floor(65536*(1+Math.random())).toString(16).substring(1);Object.keys(e).length>0&&this.push({...e,id:a})},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((a=>a.id&&a.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=[a.createElementVNode("i",{class:"icon-times-filled"},null,-1)];C.render=function(e,o,t,i,n,l){return a.openBlock(),a.createBlock(a.Teleport,{to:"body",class:"alert-not"},[n.notifications.length>0?(a.openBlock(),a.createElementBlock("section",w,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.notifications,(e=>(a.openBlock(),a.createElementBlock("div",{id:"alert"+e.id,ref_for:!0,ref:"hlx-alert-"+e.id,key:e,class:a.normalizeClass(["hlx alert",l.getClass(e)])},[a.createElementVNode("span",S,[a.createElementVNode("i",{class:a.normalizeClass(l.icon(e.type))},null,2)]),a.createElementVNode("div",B,[a.createElementVNode("p",N,a.toDisplayString(e.message),1)]),a.createElementVNode("button",{class:"close","aria-label":"close",onClick:a=>l.closeAlert(e.id)},[...x],8,V)],10,E)))),128))])):a.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,o,t,i,n,l){return a.openBlock(),a.createElementBlock("button",{id:"badge",type:"button",class:"icon-button","aria-label":t.icon},[a.createElementVNode("span",{class:a.normalizeClass(t.icon)},null,2),a.createElementVNode("span",M,a.toDisplayString(t.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:Math.floor(1e3*Math.random()+1)}),computed:{isIconSeparator(){return"object"==typeof this.separator}},methods:{current(e){!0===this.autoRoute&&this.$router.back(),this.$emit("path",e)},tooltipover(e,a){let o=e,t=a;this.ellipsis(o,t)},tooltipleave(e,a){let o=e,t=a;this.ellipses(o,t)},ellipsis(e,a){console.log(e,a),this.$nextTick((()=>{const o=document.querySelector("#"+e);if(null!=o){if(o.clientWidth<o.scrollWidth)if("ellipsis"===(o.currentStyle||window.getComputedStyle(o)).textOverflow){const e=document.querySelector("."+a);console.log(o.getBoundingClientRect().top);let t=o.getBoundingClientRect().top,i=o.getBoundingClientRect().left+77;return e.style.display="block",e.style.top=t+"px",e.style.left=i+"px",!0}return!1}}))},ellipses(e,a){this.$nextTick((()=>{const o=document.querySelector("#"+e);if(null!=o){if(o.clientWidth<o.scrollWidth)if("ellipsis"===(o.currentStyle||window.getComputedStyle(o)).textOverflow){return document.querySelector("."+a).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=a.createElementVNode("i",{style:{"font-weight":"800"},class:"icon-arrow-left-regular"},null,-1);_.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("nav",T,["Pathway-breadcrumb"===t.type?(a.openBlock(),a.createElementBlock("ul",D,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.items,((e,o)=>(a.openBlock(),a.createElementBlock("li",{key:o,onClick:a=>l.current(e)},[null!=e.icon?(a.openBlock(),a.createElementBlock("i",{key:0,"aria-hidden":"true",class:a.normalizeClass(e.icon)},null,2)):a.createCommentVNode("v-if",!0),o===t.items.length-1?(a.openBlock(),a.createElementBlock("a",{key:1,id:"breadcrumb"+o+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"+o+n.unique,"tooltip-textbreadcrumb"+o+n.unique),onMouseleave:e=>l.tooltipleave("breadcrumb"+o+n.unique,"tooltip-textbreadcrumb"+o+n.unique)},[a.createTextVNode(a.toDisplayString(e.label)+" ",1),a.createElementVNode("p",{id:"tooltip-text1",class:a.normalizeClass("tooltip-textbreadcrumb"+o+n.unique)},a.toDisplayString(e.label),3)],40,z)):(a.openBlock(),a.createElementBlock("a",{key:2,id:"breadcrumb"+n.unique+o,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+o,"tooltip-textbreadcrumb"+n.unique+o),onMouseleave:e=>l.tooltipleave("breadcrumb"+n.unique+o,"tooltip-textbreadcrumb"+n.unique+o)},[a.createTextVNode(a.toDisplayString(e.label)+" ",1),a.createElementVNode("p",{id:"tooltip-text1",class:a.normalizeClass("tooltip-textbreadcrumb"+n.unique+o)},a.toDisplayString(e.label),3)],40,O)),a.createCommentVNode(' <router-link :to="item.link" :class="{ disabled: index === items.length - 1 } " >{{ item.label }}</router-link> '),o<t.items.length-1?(a.openBlock(),a.createElementBlock("span",L,[l.isIconSeparator?(a.openBlock(),a.createElementBlock("i",{key:0,"aria-hidden":"true",class:a.normalizeClass(t.separator.icon)},null,2)):(a.openBlock(),a.createElementBlock("span",P,a.toDisplayString(t.separator),1))])):a.createCommentVNode("v-if",!0)],8,q)))),128))])):a.createCommentVNode("v-if",!0),"back-breadcrumb"===t.type?(a.openBlock(),a.createElementBlock("div",{key:1,class:"back-breadcrumb",style:{display:"flex",cursor:"pointer","align-items":"center",gap:"8px","max-width":"100px"},onClick:o[0]||(o[0]=e=>l.current("back"))},[U,a.createElementVNode("p",null,a.toDisplayString(t.labelValue),1)])):a.createCommentVNode("v-if",!0)])},_.__file="src/components/BreadcrumbComponent.vue";var K={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 F=["value","type","name","aria-label"],j=["aria-label","href","target"];K.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("button",{id:"hlx-button-0009",ref:"hlx-button",value:t.value,type:t.type,name:t.name,class:a.normalizeClass([l.primaryClass,"hlx-button"]),"aria-label":t.label,onClick:o[0]||(o[0]=(...e)=>l.clicked&&l.clicked(...e))},[a.renderSlot(e.$slots,"default"),null!=t.href?(a.openBlock(),a.createElementBlock("a",{key:0,ref:"link-ele","aria-label":t.label,href:t.href,target:t.target},null,8,j)):a.createCommentVNode("v-if",!0)],10,F)},K.__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:{en:{sun:"SUN",mon:"MON",tue:"TUE",wed:"WED",thu:"THU",fri:"FRI",sat:"SAT"},es:{sun:"DOM",mon:"LUN",tue:"MAR",wed:"MIÉ",thu:"JUE",fri:"VIE",sat:"SÁB"},fr:{sun:"DIM",mon:"LUN",tue:"MAR",wed:"MER",thu:"JEU",fri:"VEN",sat:"SAM"},de:{sun:"SO",mon:"MO",tue:"DI",wed:"MI",thu:"DO",fri:"FR",sat:"SA"},ta:{sun:"ஞாயி",mon:"திங்கள்",tue:"செவ்வாய்",wed:"புதன்",thu:"வியாழன்",fri:"வெள்ளி",sat:"சனி"},hi:{sun:"रवि",mon:"सोम",tue:"मंगल",wed:"बुध",thu:"गुरु",fri:"शुक्र",sat:"शनि"},ja:{sun:"日",mon:"月",tue:"火",wed:"水",thu:"木",fri:"金",sat:"土"},zh:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},sw:{sun:"Jumapili",mon:"Jumatatu",tue:"Jumanne",wed:"Jumatano",thu:"Alhamisi",fri:"Ijumaa",sat:"Jumamosi"},ar:{sun:"أحد",mon:"اثنين",tue:"ثلاثاء",wed:"أربعاء",thu:"خميس",fri:"جمعة",sat:"سبت"},bn:{sun:"রবি",mon:"সোম",tue:"মঙ্গল",wed:"বুধ",thu:"বৃহস্পতি",fri:"শুক্র",sat:"শনি"},pt:{sun:"Dom",mon:"Seg",tue:"Ter",wed:"Qua",thu:"Qui",fri:"Sex",sat:"Sáb"},ru:{sun:"Вс",mon:"Пн",tue:"Вт",wed:"Ср",thu:"Чт",fri:"Пт",sat:"Сб"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],es:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],fr:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],de:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],ta:["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"],hi:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"],ja:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],zh:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],sw:["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],bn:["জানুয়ারি","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],pt:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],ru:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]}}),async mounted(){console.log(this.event,"cal eve",this.dateFormatLanguage);const e=document.querySelector(".calendar"),a=document.querySelector(".light");e.clientY=this.event.clientY,a.right=this.event.clientX+"px";const o=["January","February","March","April","May","June","July","August","September","October","November","December"],t=[];let i=this.startYear;const n=this.endYear;for(;i<=n;)t.push(i++);const l=e.querySelector(".month-list");t.forEach(((e,a)=>{const o=document.createElement("div");o.innerHTML=`<div data-month="${a}" id="year${a}" class="idd${e}">${e}</div>`;let t=(new Date).getFullYear();t+=1,e===t&&(document.getElementById("year"+(a-1)).classList.add("theme-background"),document.getElementById("year"+(a-1)).style.color="white"),o.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(o)}));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"===o[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"===o[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:{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,a){console.log(e,a,"jui");const o=document.querySelector(".calendar"),t=o.querySelector(".calendar-days"),i=o.querySelector("#year"),n=[31,this.getFebDays(a),31,30,31,30,31,31,30,31,30,31];t.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])}a||(a=l.getFullYear());const r=`${this.monthNames[this.dateFormatLanguage][e]}`;o.querySelector("#month-picker").innerHTML=r,i.innerHTML=a;const c=new Date(a,e,1);for(let o=0;o<=n[e]+c.getDay()-1;o++){const i=document.createElement("div");if(o>=c.getDay()){i.classList.add("calendar-day-hover");const t=o-c.getDay()+1;if(t>0&&t<=n[e]){const o=`${t}-${e+1}-${a}`;i.classList.add(o),console.log("fkoko",o),i.id="calender-day",this.holidayList.includes(o)&&(i.classList.remove("calendar-day-hover"),i.classList.add("disable-weekend")),i.innerHTML=t,t===l.getDate()&&a===l.getFullYear()&&e===l.getMonth()&&i.classList.add("curr-date")}}t.appendChild(i)}if(!0===this.disableWeekend){const e=document.querySelector(".calendar-days").children,a=[0,6,7,13,14,20,21,27,28,34,35];for(const o in a)e[a[o]]&&""!==e[a[o]].innerHTML&&(e[a[o]].classList.remove("calendar-day-hover"),e[a[o]].classList.add("disable-weekend"))}}}};const G={class:"light"},W={class:"calendar"},Q=a.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=a.createElementVNode("div",{class:"month-list"},null,-1);H.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("div",G,[a.createElementVNode("div",W,[Q,a.createElementVNode("div",J,[a.createElementVNode("div",Z,[a.createElementVNode("div",null,[a.createCommentVNode(" SUN "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].sun),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" MON "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].mon),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" TUE "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].tue),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" WED "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].wed),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" THU "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].thu),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" FRI "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].fri),1)]),a.createElementVNode("div",null,[a.createCommentVNode(" SAT "),a.createTextVNode(" "+a.toDisplayString(n.staticDataDays[t.dateFormatLanguage].sat),1)])]),a.createElementVNode("div",{class:"calendar-days",onClick:o[0]||(o[0]=(...e)=>l.log&&l.log(...e))})]),a.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,o,t,i,n,l){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["card",{cardhover:t.hover,cardshadow:t.shadow,padding:t.padding,cardActive:t.active}]),style:a.normalizeStyle("width:"+t.width+"px; height:"+t.height+"px;")},[1==t.cardTitle?(a.openBlock(),a.createElementBlock("div",$,[a.createElementVNode("header",null,[a.renderSlot(e.$slots,"card-title",{},(()=>[a.createTextVNode("Card title")]))])])):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:"card-body",style:a.normalizeStyle(t.cardTitle&&t.cardFooter?{height:t.height-l.headerHeight-l.footerHeight+"px"}:{height:"100%"})},[a.createCommentVNode(" {{this.card_body}} "),a.createElementVNode("main",null,[a.renderSlot(e.$slots,"card-body",{},(()=>[a.createTextVNode("Card body")]))])],4),1==t.cardFooter?(a.openBlock(),a.createElementBlock("div",ee,[a.createCommentVNode(" {{this.cardFooter}} "),a.createElementVNode("footer",null,[a.renderSlot(e.$slots,"card-footer",{},(()=>[a.createTextVNode("Card footer")]))])])):a.createCommentVNode("v-if",!0)],6)},Y.__file="src/components/CardsComponent.vue";var ae={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:Math.floor(1e3*Math.random()+1),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 oe=["id"];ae.render=function(e,o,t,i,n,l){return a.openBlock(),a.createElementBlock("div",{class:"outer-overlay",onClick:o[0]||(o[0]=(...e)=>l.emitfunction&&l.emitfunction(...e))},[a.createElementVNode("div",{id:"container-overlay"+n.unique,class:"container-overlay",style:a.normalizeStyle([{position:"fixed"},["width:"+t.width+"px","top:"+n.containertop+"px","left:"+t.left+"px"]])},[a.renderSlot(e.$slots,"overlay")],12,oe)])},ae.__file="src/components/OverlayComponent.vue";var te={name:"HlxColorPalette",components:{hlxOverlay:ae},props:{preValue:{type:String,default:"#000000"},highlightColor:{type:Boolean,default:!1}},emits:["customChange"],data:()=>({containerleft:0,containertop:0,unique:Math.floor(1e3*Math.random()+1),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 a=0;a<Object.values(this.colordata[e])[0].length;a++);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=[a.createElementVNode("i",{class:"icon-angle-down-regular"},null,-1)],de=["id"],ue=a.createElementVNode("p",{class:"color-container-title"},"Theme Colors",-1),fe={class:"color-container-specific-color"},pe={class:"color-container-specific-color1"},he=a.createElementVNode("p",{class:"color-container-title"},"Standard Colors",-1),ge={class:"color-container-specific-color"},be={class:"color-container2323"},Ae=["value"],ye={key:0,class:"color-container-title"},ve={class:"color-container-specific-color2"};te.render=function(e,o,t,i,n,l){const r=a.resolveComponent("hlx-overlay");return a.openBlock(),a.createElementBlock("div",ie,[a.createElementVNode("div",ne,[1==n.fill_color?(a.openBlock(),a.createElementBlock("i",le)):a.createCommentVNode("v-if",!0),!0===t.highlightColor?(a.openBlock(),a.createElementBlock("div",re,[!0===t.highlightColor?(a.openBlock(),a.createElementBlock("p",ce,"A")):a.createCommentVNode("v-if",!0),a.createCommentVNode(' <div class="higlight-icon-border" v-if="this.highlightColor === true"></div> ')])):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:"color-icon-border",style:a.normalizeStyle({background:n.colorvalue})},null,4)]),a.createElementVNode("button",{id:"color-palette-open-icon"+n.unique,"aria-dis":"",class:"color-palette-open-icon",onClick:o[0]||(o[0]=(...e)=>l.colorpalette&&l.colorpalette(...e))},[...me],8,se),n.colorcontainer?(a.openBlock(),a.createBlock(r,{key:0,show:n.colorcontainer,top:n.containertop,left:n.containerleft,width:100,conditionvalue:150,conditionup:55,onCloseOverlay:e.onClose},{overlay:a.withCtx((()=>[a.createElementVNode("button",{id:"color-container"+n.unique,class:"color-container"},[ue,a.createElementVNode("button",fe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.colordata,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color-checkbox-border",onClick:o[1]||(o[1]=(...e)=>l.getcolor&&l.getcolor(...e))},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:Object.keys(n.colordata[t])[0]})},null,4)])))),128))]),a.createElementVNode("button",pe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.colordata,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color1-container",onClick:o[2]||(o[2]=(...e)=>l.getcolor&&l.getcolor(...e))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Object.values(n.colordata[t])[0].length,((e,o)=>(a.openBlock(),a.createElementBlock("button",{key:o,class:"color-container-specific-color-checkbox-border"},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:Object.values(n.colordata[t])[0][o]})},null,4)])))),128))])))),128))]),he,a.createElementVNode("button",ge,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.standardcolor,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color-checkbox-border",onClick:o[3]||(o[3]=(...e)=>l.getcolor&&l.getcolor(...e))},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:n.standardcolor[t]})},null,4)])))),128))]),a.createElementVNode("button",be,[a.createElementVNode("input",{id:"favcolor",type:"color",name:"favcolor",value:n.recentvalue,class:"favcolor",onChange:o[4]||(o[4]=(...e)=>l.getcolorvalue&&l.getcolorvalue(...e))},null,40,Ae),a.createElementVNode("p",{class:"color-container-title",onClick:o[5]||(o[5]=(...e)=>l.colorpicker&&l.colorpicker(...e))},"More Colors")]),!0===n.recent?(a.openBlock(),a.createElementBlock("p",ye,"Recent color")):a.createCommentVNode("v-if",!0),a.createElementVNode("button",ve,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.recentcolor,((e,t)=>(a.openBlock(),a.createElementBlock("button",{key:t,class:"color-container-specific-color-checkbox-border",onClick:o[6]||(o[6]=(...e)=>l.getcolor&&l.getcolor(...e))},[a.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:a.normalizeStyle({background:n.recentcolor[t]})},null,4)])))),128))])],8,de)])),_:1},8,["show","top","left","onCloseOverlay"])):a.createCommentVNode("v-if",!0)])},te.__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 a,o,t;a=["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"],o="undefined"!=typeof window,t=o&&null!=window.mozInnerScreenX,e.exports=function(e,i,n){if(!o)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"),a.forEach((function(e){d&&"lineHeight"===e?s.lineHeight=m.height:s[e]=m[e]})),t?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 a=1;a<arguments.length;a++){var o=arguments[a];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}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=a.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,a=this.$el.querySelector(".prism-editor__line-numbers"),o=window.getComputedStyle(e);this.$nextTick((function(){var t="border-top-left-radius",i="border-bottom-left-radius";if(a){a.style[t]=o[t],a.style[i]=o[i],e.style[t]="0",e.style[i]="0";["background-color","margin-top","padding-top","font-family","font-size","line-height"].forEach((function(e){a.style[e]=o[e]})),a.style["margin-bottom"]="-"+o["padding-top"]}}))}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var a=e.value,o=e.selectionStart,t=e.selectionEnd;this._recordChange({value:a,selectionStart:o,selectionEnd:t})}},_getLines:function(e,a){return e.substring(0,a).split("\n")},_applyEdits:function(e){var a=this.$refs.textarea,o=this.history.stack[this.history.offset];o&&a&&(this.history.stack[this.history.offset]=Se({},o,{selectionStart:a.selectionStart,selectionEnd:a.selectionEnd})),this._recordChange(e),this._updateInput(e)},_recordChange:function(e,a){void 0===a&&(a=!1);var o=this.history,t=o.stack,i=o.offset;if(t.length&&i>-1){this.history.stack=t.slice(0,i+1);var n=this.history.stack.length;if(n>100){var l=n-100;this.history.stack=t.slice(l,n),this.history.offset=Math.max(this.history.offset-l,0)}}var r=Date.now();if(a){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 a=this.$refs.textarea;a&&(a.value=e.value,a.selectionStart=e.selectionStart,a.selectionEnd=e.selectionEnd,this.$emit("update:modelValue",e.value))},handleChange:function(e){var a=e.target,o=a.value,t=a.selectionStart,i=a.selectionEnd;this._recordChange({value:o,selectionStart:t,selectionEnd:i},!0),this.$emit("update:modelValue",o)},_undoEdit:function(){var e=this.history,a=e.stack,o=e.offset,t=a[o-1];t&&(this._updateInput(t),this.history.offset=Math.max(o-1,0))},_redoEdit:function(){var e=this.history,a=e.stack,o=e.offset,t=a[o+1];t&&(this._updateInput(t),this.history.offset=Math.min(o+1,a.length-1))},handleKeyDown:function(e){var a=this.tabSize,o=this.insertSpaces,t=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=(o?" ":"\t").repeat(a);if(9===e.keyCode&&!t&&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,a){return a>=m&&a<=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,a){return a>=h&&a<=g?c+e:e})).join("\n"),selectionStart:/\S/.test(b)?l+c.length:l,selectionEnd:r+c.length*(g-h+1)})}else{var A=l+c.length;this._applyEdits({value:n.substring(0,l)+c+n.substring(r),selectionStart:A,selectionEnd:A})}else if(8===e.keyCode){var y=l!==r;if(n.substring(0,l).endsWith(c)&&!y){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,o=a.h("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),t=a.h("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[o,Array.from(Array(this.lineNumbersCount).keys()).map((function(e,o){return a.h("div",{class:"prism-editor__line-number token comment"},""+ ++o)}))]),i=a.h("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(a){e.$emit("click",a)},onKeyup:function(a){e.$emit("keyup",a)},onFocus:function(a){e.$emit("focus",a)},onBlur:function(a){e.$emit("blur",a)},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=a.h("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),l=a.h("div",{class:"prism-editor__container"},[i,n]);return a.h("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&t,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 a(e,a){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)),a=a||"",e.indent_level>0&&(a=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}function o(o,t){this.__indent_cache=new a(o,t),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.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 a=new e(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},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 a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(e))return!0;return!1},e.prototype.set_indent=function(e,a){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=a||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 a=e.lastIndexOf("\n");-1!==a?this.__character_count=e.length-a: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},a.prototype.get_indent_size=function(e,a){var o=this.__base_string_length;return a=a||0,e<0&&(o=0),o+=e*this.__indent_size,o+=a},a.prototype.get_indent_string=function(e,a){var o=this.__base_string;return a=a||0,e<0&&(e=0,o=""),a+=e*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a]},a.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var e=this.__cache.length,a=0,o="";this.__indent_size&&e>=this.__indent_size&&(e-=(a=Math.floor(e/this.__indent_size))*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),e&&(o+=new Array(e+1).join(" ")),this.__cache.push(o)},o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(e,a){return this.__indent_cache.get_indent_string(e,a)},o.prototype.get_indent_size=function(e,a){return this.__indent_cache.get_indent_size(e,a)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(e){this.trim(!0);var a=this.current_line.pop();a&&("\n"===a[a.length-1]&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join("\n");return"\n"!==e&&(o=o.replace(/[\n]/g,e)),o},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(e,a){return e=e||0,a=a||0,this.next_line.set_indent(e,a),this.__lines.length>1?(this.current_line.set_indent(e,a),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(e){for(var a=0;a<e.newlines;a++)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},o.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()},o.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(" "))},o.prototype.remove_indent=function(e){for(var a=this.__lines.length;e<a;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},o.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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(a,o){for(var t=this.__lines.length-2;t>=0;){var i=this.__lines[t];if(i.is_empty())break;if(0!==i.item(0).indexOf(a)&&i.item(-1)!==o){this.__lines.splice(t+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}t--}},Te.Output=o,Te}var qe,ze={};function Oe(){if(qe)return ze;return qe=1,ze.Token=function(e,a,o,t){this.type=e,this.text=a,this.comments_before=null,this.newlines=o||0,this.whitespace_before=t||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},ze}var Le,Pe={};function Ue(){return Le||(Le=1,function(e){var a="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",t="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",n="(?:"+i+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+o+"])",l="(?:"+i+"|["+a+o+t+"])*";e.identifier=new RegExp(n+l,"g"),e.identifierStart=new RegExp(n),e.identifierMatch=new RegExp("(?:"+i+"|["+a+o+t+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")}(Pe)),Pe}var Ke,Fe,je={},He={};function Ge(){if(Ke)return He;function e(e,o){this.raw_options=a(e,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function a(e,a){var t,i={};for(t in e=o(e))t!==a&&(i[t]=e[t]);if(a&&e[a])for(t in e[a])i[t]=e[a][t];return i}function o(e){var a,o={};for(a in e){o[a.replace(/-/g,"_")]=e[a]}return o}return Ke=1,e.prototype._get_array=function(e,a){var o=this.raw_options[e],t=a||[];return"object"==typeof o?null!==o&&"function"==typeof o.concat&&(t=o.concat()):"string"==typeof o&&(t=o.split(/[^a-zA-Z0-9_\/\-]+/)),t},e.prototype._get_boolean=function(e,a){var o=this.raw_options[e];return void 0===o?!!a:!!o},e.prototype._get_characters=function(e,a){var o=this.raw_options[e],t=a||"";return"string"==typeof o&&(t=o.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),t},e.prototype._get_number=function(e,a){var o=this.raw_options[e];a=parseInt(a,10),isNaN(a)&&(a=0);var t=parseInt(o,10);return isNaN(t)&&(t=a),t},e.prototype._get_selection=function(e,a,o){var t=this._get_selection_list(e,a,o);if(1!==t.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+a+"\nYou passed in: '"+this.raw_options[e]+"'");return t[0]},e.prototype._get_selection_list=function(e,a,o){if(!a||0===a.length)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var t=this._get_array(e,o);if(!this._is_valid_selection(t,a))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+a+"\nYou passed in: '"+this.raw_options[e]+"'");return t},e.prototype._is_valid_selection=function(e,a){return e.length&&a.length&&!e.some((function(e){return-1===a.indexOf(e)}))},He.Options=e,He.normalizeOpts=o,He.mergeOpts=a,He}function We(){if(Fe)return je;Fe=1;var e=Ge().Options,a=["before-newline","after-newline","preserve-newline"];function o(o){e.call(this,o,"js");var t=this.raw_options.brace_style||null;"expand-strict"===t?this.raw_options.brace_style="expand":"collapse-preserve-inline"===t?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n<i.length;n++)"preserve-inline"===i[n]?this.brace_preserve_inline=!0:this.brace_style=i[n];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",a),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return o.prototype=new e,je.Options=o,je}var Qe,Je={},Ze={};function Xe(){if(Qe)return Ze;Qe=1;var e=RegExp.prototype.hasOwnProperty("sticky");function a(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}return a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},a.prototype.peek=function(e){var a=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(a=this.__input.charAt(e)),a},a.prototype.__match=function(a,o){a.lastIndex=o;var t=a.exec(this.__input);return!t||e&&a.sticky||t.index!==o&&(t=null),t},a.prototype.test=function(e,a){return a=a||0,(a+=this.__position)>=0&&a<this.__input_length&&!!this.__match(e,a)},a.prototype.testChar=function(e,a){var o=this.peek(a);return e.lastIndex=0,null!==o&&e.test(o)},a.prototype.match=function(e){var a=this.__match(e,this.__position);return a?this.__position+=a[0].length:a=null,a},a.prototype.read=function(e,a,o){var t,i="";return e&&(t=this.match(e))&&(i+=t[0]),!a||!t&&e||(i+=this.readUntil(a,o)),i},a.prototype.readUntil=function(e,a){var o,t=this.__position;e.lastIndex=this.__position;var i=e.exec(this.__input);return i?(t=i.index,a&&(t+=i[0].length)):t=this.__input_length,o=this.__input.substring(this.__position,t),this.__position=t,o},a.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},a.prototype.get_regexp=function(a,o){var t=null,i="g";return o&&e&&(i="y"),"string"==typeof a&&""!==a?t=new RegExp(a,i):a&&(t=new RegExp(a.source,i)),t},a.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(e){var a=this.__position,o=this.readUntilAfter(e);return this.__position=a,o},a.prototype.lookBack=function(e){var a=this.__position-1;return a>=e.length&&this.__input.substring(a-e.length,a).toLowerCase()===e},Ze.InputScanner=a,Ze}var Ye,$e={},ea={};var aa,oa,ta,ia={},na={};function la(){if(aa)return na;function e(e,a){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,a&&(this._starting_pattern=this._input.get_regexp(a._starting_pattern,!0),this._match_pattern=this._input.get_regexp(a._match_pattern,!0),this._until_pattern=this._input.get_regexp(a._until_pattern),this._until_after=a._until_after)}return aa=1,e.prototype.read=function(){var e=this._input.read(this._starting_pattern);return this._starting_pattern&&!e||(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(e){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(e),a._update(),a},e.prototype.until=function(e){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(e),a._update(),a},e.prototype.starting_with=function(e){var a=this._create();return a._starting_pattern=this._input.get_regexp(e,!0),a._update(),a},e.prototype.matching=function(e){var a=this._create();return a._match_pattern=this._input.get_regexp(e,!0),a._update(),a},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},na.Pattern=e,na}function ra(){if(ta)return $e;ta=1;var e=Xe().InputScanner,a=Oe().Token,o=function(){if(Ye)return ea;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return Ye=1,e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},e.prototype.peek=function(e){var a=null;return e=e||0,(e+=this.__position)>=0&&e<this.__tokens_length&&(a=this.__tokens[e]),a},e.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},ea.TokenStream=e,ea}().TokenStream,t=function(){if(oa)return ia;oa=1;var e=la().Pattern;function a(a,o){e.call(this,a,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return a.prototype=new e,a.prototype.__set_whitespace_patterns=function(e,a){e+="\\t ",a+="\\n\\r",this._match_pattern=this._input.get_regexp("["+e+a+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+a+"]")},a.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var e=this._input.read(this._match_pattern);if(" "===e)this.whitespace_before_token=" ";else if(e){var a=this.__split(this._newline_regexp,e);this.newline_count=a.length-1,this.whitespace_before_token=a[this.newline_count]}return e},a.prototype.matching=function(e,a){var o=this._create();return o.__set_whitespace_patterns(e,a),o._update(),o},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(e,a){e.lastIndex=0;for(var o=0,t=[],i=e.exec(a);i;)t.push(a.substring(o,i.index)),o=i.index+i[0].length,i=e.exec(a);return o<a.length?t.push(a.substring(o,a.length)):t.push(""),t},ia.WhitespacePattern=a,ia}().WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(a,o){this._input=new e(a),this._options=o||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new t(this._input)};return n.prototype.tokenize=function(){var e;this._input.restart(),this.__tokens=new o,this._reset();for(var t=new a(i.START,""),n=null,l=[],r=new o;t.type!==i.EOF;){for(e=this._get_next_token(t,n);this._is_comment(e);)r.add(e),e=this._get_next_token(t,n);r.isEmpty()||(e.comments_before=r,r=new o),e.parent=n,this._is_opening(e)?(l.push(n),n=e):n&&this._is_closing(e,n)&&(e.opened=n,n.closed=e,n=l.pop(),e.parent=n),e.previous=t,t.next=e,this.__tokens.add(e),t=e}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(e,a){this._readWhitespace();var o=this._input.read(/.+/g);return o?this._create_token(i.RAW,o):this._create_token(i.EOF,"")},n.prototype._is_comment=function(e){return!1},n.prototype._is_opening=function(e){return!1},n.prototype._is_closing=function(e,a){return!1},n.prototype._create_token=function(e,o){return new a(e,o,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},$e.Tokenizer=n,$e.TOKEN=i,$e}var ca,sa={};function ma(){if(ca)return sa;function e(e,a){e="string"==typeof e?e:e.source,a="string"==typeof a?a:a.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+a,"g")}return ca=1,e.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(e);o;)a[o[1]]=o[2],o=this.__directive_pattern.exec(e);return a},e.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},sa.Directives=e,sa}var da,ua,fa,pa,ha={};function ga(){if(da)return ha;da=1;var e=la().Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function o(o,t){e.call(this,o,t),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),t&&(this.__template_pattern=this._input.get_regexp(t.__template_pattern),this._excluded=Object.assign(this._excluded,t._excluded),this._disabled=Object.assign(this._disabled,t._disabled));var i=new e(o);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}return o.prototype=new e,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(e){var a=this._create();return a._disabled[e]=!0,a._update(),a},o.prototype.read_options=function(e){var o=this._create();for(var t in a)o._disabled[t]=-1===e.templating.indexOf(t);return o._update(),o},o.prototype.exclude=function(e){var a=this._create();return a._excluded[e]=!0,a._update(),a},o.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),e+=a,a=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},o.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},o.prototype._read_template=function(){var e="",a=this._input.peek();if("<"===a){var o=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==o||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==o||(e=e||this.__patterns.erb.read())}else"{"===a&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},ha.TemplatablePattern=o,ha}function ba(){if(ua)return Je;ua=1;var e=Xe().InputScanner,a=ra().Tokenizer,o=ra().TOKEN,t=ma().Directives,i=Ue(),n=la().Pattern,l=ga().TemplatablePattern;function r(e,a){return-1!==a.indexOf(e)}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},s=new t(/\/\*/,/\*\//),m=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,d=/[0-9]/,u=/[^\d\.]/,f=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=(p="\\?\\.(?!\\d) "+(p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var h,g=new RegExp(p),b="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),A=b.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+A.join("|")+")$"),v=function(e,o){a.call(this,e,o),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var t=new n(this._input),r=new l(this._input).read_options(this._options);this.__patterns={template:r,identifier:r.starting_with(i.identifier).matching(i.identifierMatch),number:t.matching(m),punct:t.matching(g),comment:t.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:t.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:t.matching(/<!--/),html_comment_end:t.matching(/-->/),include:t.starting_with(/#include/).until_after(i.lineBreak),shebang:t.starting_with(/#!/).until_after(i.lineBreak),xml:t.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:r.until(/['\\\n\r\u2028\u2029]/),double_quote:r.until(/["\\\n\r\u2028\u2029]/),template_text:r.until(/[`\\$]/),template_expression:r.until(/[`}\\]/)}};return(v.prototype=new a)._is_comment=function(e){return e.type===c.COMMENT||e.type===c.BLOCK_COMMENT||e.type===c.UNKNOWN},v.prototype._is_opening=function(e){return e.type===c.START_BLOCK||e.type===c.START_EXPR},v.prototype._is_closing=function(e,a){return(e.type===c.END_BLOCK||e.type===c.END_EXPR)&&a&&("]"===e.text&&"["===a.text||")"===e.text&&"("===a.text||"}"===e.text&&"{"===a.text)},v.prototype._reset=function(){h=!1},v.prototype._get_next_token=function(e,a){var o=null;this._readWhitespace();var t=this._input.peek();return null===t?this._create_token(c.EOF,""):o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o||this._read_non_javascript(t))||this._read_string(t))||this._read_pair(t,this._input.peek(1)))||this._read_word(e))||this._read_singles(t))||this._read_comment(t))||this._read_regexp(t,e))||this._read_xml(t,e))||this._read_punctuation())||this._create_token(c.UNKNOWN,this._input.next())},v.prototype._read_word=function(e){var a;return""!==(a=this.__patterns.identifier.read())?(a=a.replace(i.allLineBreaks,"\n"),e.type!==c.DOT&&(e.type!==c.RESERVED||"set"!==e.text&&"get"!==e.text)&&y.test(a)?"in"!==a&&"of"!==a||e.type!==c.WORD&&e.type!==c.STRING?this._create_token(c.RESERVED,a):this._create_token(c.OPERATOR,a):this._create_token(c.WORD,a)):""!==(a=this.__patterns.number.read())?this._create_token(c.WORD,a):void 0},v.prototype._read_singles=function(e){var a=null;return"("===e||"["===e?a=this._create_token(c.START_EXPR,e):")"===e||"]"===e?a=this._create_token(c.END_EXPR,e):"{"===e?a=this._create_token(c.START_BLOCK,e):"}"===e?a=this._create_token(c.END_BLOCK,e):";"===e?a=this._create_token(c.SEMICOLON,e):"."===e&&u.test(this._input.peek(1))?a=this._create_token(c.DOT,e):","===e&&(a=this._create_token(c.COMMA,e)),a&&this._input.next(),a},v.prototype._read_pair=function(e,a){var o=null;return"#"===e&&"{"===a&&(o=this._create_token(c.START_BLOCK,e+a)),o&&(this._input.next(),this._input.next()),o},v.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(c.EQUALS,e):"?."===e?this._create_token(c.DOT,e):this._create_token(c.OPERATOR,e)},v.prototype._read_non_javascript=function(e){var a="";if("#"===e){if(this._is_first_token()&&(a=this.__patterns.shebang.read()))return this._create_token(c.UNKNOWN,a.trim()+"\n");if(a=this.__patterns.include.read())return this._create_token(c.UNKNOWN,a.trim()+"\n");e=this._input.next();var o="#";if(this._input.hasNext()&&this._input.testChar(d)){do{o+=e=this._input.next()}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(o+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(o+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,o)}this._input.back()}else if("<"===e&&this._is_first_token()){if(a=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(i.newline);)a+=this._input.next();return h=!0,this._create_token(c.COMMENT,a)}}else if(h&&"-"===e&&(a=this.__patterns.html_comment_end.read()))return h=!1,this._create_token(c.COMMENT,a);return null},v.prototype._read_comment=function(e){var a=null;if("/"===e){var o="";if("*"===this._input.peek(1)){o=this.__patterns.block_comment.read();var t=s.get_directives(o);t&&"start"===t.ignore&&(o+=s.readIgnored(this._input)),o=o.replace(i.allLineBreaks,"\n"),(a=this._create_token(c.BLOCK_COMMENT,o)).directives=t}else"/"===this._input.peek(1)&&(o=this.__patterns.comment.read(),a=this._create_token(c.COMMENT,o))}return a},v.prototype._read_string=function(a){if("`"===a||"'"===a||'"'===a){var o=this._input.next();return this.has_char_escapes=!1,o+="`"===a?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(a),this.has_char_escapes&&this._options.unescape_strings&&(o=function(a){var o="",t=0,i=new e(a),n=null;for(;i.hasNext();)if((n=i.match(/([\s]|[^\\]|\\\\)+/g))&&(o+=n[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())n=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){o+="\\",i.hasNext()&&(o+=i.next());continue}(n=i.match(/u([0-9A-Fa-f]{4})/g))||(n=i.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!n)return a;if((t=parseInt(n[1],16))>126&&t<=255&&0===n[0].indexOf("x"))return a;o+=t>=0&&t<32||t>1114111?"\\"+n[0]:34===t||39===t||92===t?"\\"+String.fromCharCode(t):String.fromCharCode(t)}return o}(o)),this._input.peek()===a&&(o+=this._input.next()),o=o.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,o)}return null},v.prototype._allow_regexp_or_xml=function(e){return e.type===c.RESERVED&&r(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===c.END_EXPR&&")"===e.text&&e.opened.previous.type===c.RESERVED&&r(e.opened.previous.text,["if","while","for"])||r(e.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},v.prototype._read_regexp=function(e,a){if("/"===e&&this._allow_regexp_or_xml(a)){for(var o=this._input.next(),t=!1,n=!1;this._input.hasNext()&&(t||n||this._input.peek()!==e)&&!this._input.testChar(i.newline);)o+=this._input.peek(),t?t=!1:(t="\\"===this._input.peek(),"["===this._input.peek()?n=!0:"]"===this._input.peek()&&(n=!1)),this._input.next();return this._input.peek()===e&&(o+=this._input.next(),o+=this._input.read(i.identifier)),this._create_token(c.STRING,o)}return null},v.prototype._read_xml=function(e,a){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(a)){var o="",t=this.__patterns.xml.read_match();if(t){for(var n=t[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),l=0===n.indexOf("{"),r=0;t;){var s=!!t[1],m=t[2];if(!(!!t[t.length-1]||"![CDATA["===m.slice(0,8))&&(m===n||l&&m.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--r:++r),o+=t[0],r<=0)break;t=this.__patterns.xml.read_match()}return t||(o+=this._input.match(/[\s\S]*/g)[0]),o=o.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,o)}}return null},v.prototype._read_string_recursive=function(e,a,o){var t,n;"'"===e?n=this.__patterns.single_quote:'"'===e?n=this.__patterns.double_quote:"`"===e?n=this.__patterns.template_text:"}"===e&&(n=this.__patterns.template_expression);for(var l=n.read(),r="";this._input.hasNext();){if((r=this._input.next())===e||!a&&i.newline.test(r)){this._input.back();break}"\\"===r&&this._input.hasNext()?("x"===(t=this._input.peek())||"u"===t?this.has_char_escapes=!0:"\r"===t&&"\n"===this._input.peek(1)&&this._input.next(),r+=this._input.next()):o&&("${"===o&&"$"===r&&"{"===this._input.peek()&&(r+=this._input.next()),o===r&&(r+="`"===e?this._read_string_recursive("}",a,"`"):this._read_string_recursive("`",a,"${"),this._input.hasNext()&&(r+=this._input.next()))),l+=r+=n.read()}return l},Je.Tokenizer=v,Je.TOKEN=c,Je.positionable_operators=f.slice(),Je.line_starters=b.slice(),Je}function Aa(){if(fa)return _e;fa=1;var e=De().Output,a=Oe().Token,o=Ue(),t=We().Options,i=ba().Tokenizer,n=ba().line_starters,l=ba().positionable_operators,r=ba().TOKEN;function c(e,a){return-1!==a.indexOf(e)}function s(e,a){return e&&e.type===r.RESERVED&&e.text===a}function m(e,a){return e&&e.type===r.RESERVED&&c(e.text,a)}var d=["case","return","do","if","throw","else","await","break","continue","async"],u=function(e){for(var a={},o=0;o<e.length;o++)a[e[o].replace(/-/g,"_")]=e[o];return a}(["before-newline","after-newline","preserve-newline"]),f=[u.before_newline,u.preserve_newline],p="BlockStatement",h="Statement",g="ObjectLiteral",b="ArrayLiteral",A="ForInitializer",y="Conditional",v="Expression";function k(e,a){a.multiline_frame||a.mode===A||a.mode===y||e.remove_indent(a.start_line_index)}function C(e){return e===b}function w(e){return c(e,[v,A,y])}function E(e,a){a=a||{},this._source_text=e||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new t(a)}E.prototype.create_flags=function(e,o){var t=0;return e&&(t=e.indentation_level,!this._output.just_added_newline()&&e.line_indent_level>t&&(t=e.line_indent_level)),{mode:o,parent:e,last_token:e?e.last_token:new a(r.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:t,alignment:0,line_indent_level:e?e.line_indent_level:t,start_line_index:this._output.get_line_number(),ternary_depth:0}},E.prototype._reset=function(a){var o=a.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,o),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p);var t=new i(a,this._options);return this._tokens=t.tokenize(),a},E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),a=this._options.eol;"auto"===this._options.eol&&(a="\n",e&&o.lineBreak.test(e||"")&&(a=e.match(o.lineBreak)[0]));for(var t=this._tokens.next();t;)this.handle_token(t),this._last_last_text=this._flags.last_token.text,this._flags.last_token=t,t=this._tokens.next();return this._output.get_code(a)},E.prototype.handle_token=function(e,a){e.type===r.START_EXPR?this.handle_start_expr(e):e.type===r.END_EXPR?this.handle_end_expr(e):e.type===r.START_BLOCK?this.handle_start_block(e):e.type===r.END_BLOCK?this.handle_end_block(e):e.type===r.WORD||e.type===r.RESERVED?this.handle_word(e):e.type===r.SEMICOLON?this.handle_semicolon(e):e.type===r.STRING?this.handle_string(e):e.type===r.EQUALS?this.handle_equals(e):e.type===r.OPERATOR?this.handle_operator(e):e.type===r.COMMA?this.handle_comma(e):e.type===r.BLOCK_COMMENT?this.handle_block_comment(e,a):e.type===r.COMMENT?this.handle_comment(e,a):e.type===r.DOT?this.handle_dot(e):e.type===r.EOF?this.handle_eof(e):(e.type,r.UNKNOWN,this.handle_unknown(e,a))},E.prototype.handle_whitespace_and_comments=function(e,a){var o=e.newlines,t=this._options.keep_array_indentation&&C(this._flags.mode);if(e.comments_before)for(var i=e.comments_before.next();i;)this.handle_whitespace_and_comments(i,a),this.handle_token(i,a),i=e.comments_before.next();if(t)for(var n=0;n<o;n+=1)this.print_newline(n>0,a);else if(this._options.max_preserve_newlines&&o>this._options.max_preserve_newlines&&(o=this._options.max_preserve_newlines),this._options.preserve_newlines&&o>1){this.print_newline(!1,a);for(var l=1;l<o;l+=1)this.print_newline(!0,a)}};var S=["async","break","continue","return","throw","yield"];return E.prototype.allow_wrap_or_preserved_newline=function(e,a){if(a=void 0!==a&&a,!this._output.just_added_newline()){var o=this._options.preserve_newlines&&e.newlines||a;if(c(this._flags.last_token.text,l)||c(e.text,l)){var t=c(this._flags.last_token.text,l)&&c(this._options.operator_position,f)||c(e.text,l);o=o&&t}if(o)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(m(this._flags.last_token,S))return;this._output.set_wrap_point()}}},E.prototype.print_newline=function(e,a){if(!a&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==r.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var o=this._tokens.peek();!(this._flags.mode!==h||this._flags.if_block&&s(o,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(e)&&(this._flags.multiline_frame=!0)},E.prototype.print_token_line_indentation=function(e){this._output.just_added_newline()&&(this._options.keep_array_indentation&&e.newlines&&("["===e.text||C(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(e.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},E.prototype.print_token=function(e){if(this._output.raw)this._output.add_raw_token(e);else{if(this._options.comma_first&&e.previous&&e.previous.type===r.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var a=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(a),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(e),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(e),this._output.non_breaking_space=!0,this._output.add_token(e.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},E.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},E.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},E.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},E.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===h&&k(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},E.prototype.start_of_object_property=function(){return this._flags.parent.mode===g&&this._flags.mode===h&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||m(this._flags.last_token,["get","set"]))},E.prototype.start_of_statement=function(e){var a=!1;return!!(a=(a=(a=(a=(a=(a=(a=a||m(this._flags.last_token,["var","let","const"])&&e.type===r.WORD)||s(this._flags.last_token,"do"))||!(this._flags.parent.mode===g&&this._flags.mode===h)&&m(this._flags.last_token,S)&&!e.newlines)||s(this._flags.last_token,"else")&&!(s(e,"if")&&!e.comments_before))||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===A||this._previous_flags.mode===y))||this._flags.last_token.type===r.WORD&&this._flags.mode===p&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==r.WORD&&e.type!==r.RESERVED)||this._flags.mode===g&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||m(this._flags.last_token,["get","set"])))&&(this.set_mode(h),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,m(e,["do","for","if","while"])),!0)},E.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var a=v;if("["===e.text){if(this._flags.last_token.type===r.WORD||")"===this._flags.last_token.text)return m(this._flags.last_token,n)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(a),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));a=b,C(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,a=A):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,a=y):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(c(this._flags.last_token.text,n)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var o=this._tokens.peek(-3);if(this._options.space_after_named_function&&o){var t=this._tokens.peek(-4);m(o,["async","function"])||"*"===o.text&&m(t,["async","function"])?this._output.space_before_token=!0:this._flags.mode===g?"{"!==o.text&&","!==o.text&&("*"!==o.text||"{"!==t.text&&","!==t.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===r.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===r.START_BLOCK?this.print_newline():this._flags.last_token.type!==r.END_EXPR&&this._flags.last_token.type!==r.START_EXPR&&this._flags.last_token.type!==r.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==r.COMMA||this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(a),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},E.prototype.handle_end_expr=function(e){for(;this._flags.mode===h;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&C(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==r.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),k(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===y&&(this._previous_flags.mode=v,this._flags.do_block=!1,this._flags.do_while=!1)},E.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var a=this._tokens.peek(),o=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(p),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p):o&&(c(o.text,[":",","])&&c(a.type,[r.STRING,r.WORD,r.RESERVED])||c(a.text,["get","set","..."])&&c(o.type,[r.WORD,r.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(o.text,[":",","])?this.set_mode(p):this.set_mode(g):this._flags.last_token.type===r.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(p):c(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||m(this._flags.last_token,["return","throw","import","default"])?this.set_mode(g):this.set_mode(p),this._flags.last_token&&m(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var t=!a.comments_before&&"}"===a.text,i=t&&"function"===this._flags.last_word&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var n=0,l=null;this._flags.inline_frame=!0;do{if(n+=1,(l=this._tokens.peek(n-1)).newlines){this._flags.inline_frame=!1;break}}while(l.type!==r.EOF&&(l.type!==r.END_BLOCK||l.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(i||this._flags.last_token.type===r.EQUALS||m(this._flags.last_token,d)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!C(this._previous_flags.mode)||this._flags.last_token.type!==r.START_EXPR&&this._flags.last_token.type!==r.COMMA||((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(c(this._flags.last_token.type,[r.START_BLOCK,r.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),t||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},E.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===h;)this.restore_mode();var a=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!a?this._output.space_before_token=!0:"expand"===this._options.brace_style?a||this.print_newline():a||(C(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},E.prototype.handle_word=function(e){if(e.type===r.RESERVED)if(c(e.text,["set","get"])&&this._flags.mode!==g)e.type=r.WORD;else if("import"===e.text&&c(this._tokens.peek().text,["(","."]))e.type=r.WORD;else if(c(e.text,["as","from"])&&!this._flags.import_block)e.type=r.WORD;else if(this._flags.mode===g){":"===this._tokens.peek().text&&(e.type=r.WORD)}if(this.start_of_statement(e)?m(this._flags.last_token,["var","let","const"])&&e.type===r.WORD&&(this._flags.declaration_statement=!0):!e.newlines||w(this._flags.mode)||this._flags.last_token.type===r.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===r.EQUALS||!this._options.preserve_newlines&&m(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(s(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&s(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===h;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&m(e,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if(this._flags.last_token.type!==r.COMMA&&this._flags.last_token.type!==r.START_EXPR&&this._flags.last_token.type!==r.EQUALS&&this._flags.last_token.type!==r.OPERATOR||this.start_of_object_property()||c(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===g||this.allow_wrap_or_preserved_newline(e),s(e,"function"))return(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!c(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==r.OPERATOR)&&(this._output.just_added_blankline()||e.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?m(this._flags.last_token,["get","set","new","export"])||m(this._flags.last_token,S)||s(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!w(this._flags.mode)&&!C(this._flags.mode))&&this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var a="NONE";(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?a="SPACE":m(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?a="NEWLINE":(a="SPACE",this._output.space_before_token=!0):a="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===p?a="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&w(this._flags.mode)?a="SPACE":this._flags.last_token.type===r.STRING?a="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","]))?a="SPACE":this._flags.last_token.type===r.START_BLOCK?a=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,a="NEWLINE"),m(e,n)&&")"!==this._flags.last_token.text&&(a=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),m(e,["else","catch","finally"]))?(this._flags.last_token.type!==r.END_BLOCK||this._previous_flags.mode!==p||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===a?m(this._flags.last_token,d)||"declare"===this._flags.last_token.text&&m(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?this._flags.last_token.type===r.START_EXPR&&m(e,["var","let","const"])||":"===this._flags.last_token.text||(s(e,"if")&&s(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):m(e,n)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&C(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===a&&(this._output.space_before_token=!0);!e.previous||e.previous.type!==r.WORD&&e.previous.type!==r.RESERVED||(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===r.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&s(e,"from")&&(this._flags.import_block=!1))},E.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var a=this._tokens.peek();!(this._flags.mode!==h||this._flags.if_block&&s(a,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},E.prototype.handle_string=function(e){(!e.text.startsWith("`")||0!==e.newlines||""!==e.whitespace_before||")"!==e.previous.text&&this._flags.last_token.type!==r.WORD)&&(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):!e.text.startsWith("`")||this._flags.last_token.type!==r.END_EXPR||"]"!==e.previous.text&&")"!==e.previous.text||0!==e.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(e)},E.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},E.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(w(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===g||this._flags.mode===h&&this._flags.parent.mode===g?(this._flags.mode===h&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},E.prototype.handle_operator=function(e){var a="*"===e.text&&(m(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),o=c(e.text,["-","+"])&&(c(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||c(this._flags.last_token.text,n)||","===this._flags.last_token.text);if(this.start_of_statement(e));else{var t=!a;this.handle_whitespace_and_comments(e,t)}if("*"!==e.text||this._flags.last_token.type!==r.DOT)if("::"!==e.text)if(c(e.text,["-","+"])&&this.start_of_object_property())this.print_token(e);else{if(this._flags.last_token.type===r.OPERATOR&&c(this._options.operator_position,f)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==r.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,s=!0,g=!1;if(":"===e.text?0===this._flags.ternary_depth?i=!1:(this._flags.ternary_depth-=1,g=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!o&&!a&&this._options.preserve_newlines&&c(e.text,l)){var b=":"===e.text,A=b&&g,y=b&&!g;switch(this._options.operator_position){case u.before_newline:return this._output.space_before_token=!y,this.print_token(e),b&&!A||this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case u.after_newline:return this._output.space_before_token=!0,!b||A?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case u.preserve_newline:return y||this.allow_wrap_or_preserved_newline(e),i=!(this._output.just_added_newline()||y),this._output.space_before_token=i,this.print_token(e),void(this._output.space_before_token=!0)}}if(a){this.allow_wrap_or_preserved_newline(e),i=!1;var v=this._tokens.peek();s=v&&c(v.type,[r.WORD,r.RESERVED])}else if("..."===e.text)this.allow_wrap_or_preserved_newline(e),i=this._flags.last_token.type===r.START_BLOCK,s=!1;else if(c(e.text,["--","++","!","~"])||o){if(this._flags.last_token.type!==r.COMMA&&this._flags.last_token.type!==r.START_EXPR||this.allow_wrap_or_preserved_newline(e),i=!1,s=!1,e.newlines&&("--"===e.text||"++"===e.text||"~"===e.text)){var k=m(this._flags.last_token,d)&&e.newlines;k&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(k,!0)}";"===this._flags.last_token.text&&w(this._flags.mode)&&(i=!0),this._flags.last_token.type===r.RESERVED?i=!0:this._flags.last_token.type===r.END_EXPR?i=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===r.OPERATOR&&(i=c(e.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(e.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==p||this._flags.inline_frame)&&this._flags.mode!==h||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(e),this._output.space_before_token=s}else this.print_token(e);else this.print_token(e)},E.prototype.handle_block_comment=function(e,a){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,a),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):o.newline.test(e.text)||e.newlines?void this.print_block_commment(e,a):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},E.prototype.print_block_commment=function(e,a){var t,i=function(e){for(var a=[],t=(e=e.replace(o.allLineBreaks,"\n")).indexOf("\n");-1!==t;)a.push(e.substring(0,t)),t=(e=e.substring(t+1)).indexOf("\n");return e.length&&a.push(e),a}(e.text),n=!1,l=!1,r=e.whitespace_before,c=r.length;if(this.print_newline(!1,a),this.print_token_line_indentation(e),this._output.add_token(i[0]),this.print_newline(!1,a),i.length>1){for(n=function(e,a){for(var o=0;o<e.length;o++)if(e[o].trim().charAt(0)!==a)return!1;return!0}(i=i.slice(1),"*"),l=function(e,a){for(var o,t=0,i=e.length;t<i;t++)if((o=e[t])&&0!==o.indexOf(a))return!1;return!0}(i,r),n&&(this._flags.alignment=1),t=0;t<i.length;t++)n?(this.print_token_line_indentation(e),this._output.add_token(i[t].replace(/^\s+/g,""))):l&&i[t]?(this.print_token_line_indentation(e),this._output.add_token(i[t].substring(c))):(this._output.current_line.set_indent(-1),this._output.add_token(i[t])),this.print_newline(!1,a);this._flags.alignment=0}},E.prototype.handle_comment=function(e,a){e.newlines?this.print_newline(!1,a):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(e),this.print_newline(!1,a)},E.prototype.handle_dot=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),m(this._flags.last_token,d)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(e,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(e)},E.prototype.handle_unknown=function(e,a){this.print_token(e),"\n"===e.text[e.text.length-1]&&this.print_newline(!1,a)},E.prototype.handle_eof=function(e){for(;this._flags.mode===h;)this.restore_mode();this.handle_whitespace_and_comments(e)},_e.Beautifier=E,_e}var ya,va,ka,Ca={exports:{}},wa={},Ea={};function Sa(){if(ya)return Ea;ya=1;var e=Ge().Options;function a(a){e.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var t=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i<t.length;i++)"expand"!==t[i]?this.brace_style="collapse":this.brace_style=t[i]}return a.prototype=new e,Ea.Options=a,Ea}function Ba(){if(ka)return Ca.exports;ka=1;var e=function(){if(va)return wa;va=1;var e=Sa().Options,a=De().Output,o=Xe().InputScanner,t=new(0,ma().Directives)(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,l=/\s/,r=/(?:\s|\n)+/g,c=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,s=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function m(a,o){this._source_text=a||"",this._options=new e(o),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return m.prototype.eatString=function(e){var a="";for(this._ch=this._input.next();this._ch;){if(a+=this._ch,"\\"===this._ch)a+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return a},m.prototype.eatWhitespace=function(e){for(var a=l.test(this._input.peek()),o=0;l.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===o||o<this._options.max_preserve_newlines)&&(o++,this._output.add_new_line(!0));return a},m.prototype.foundNestedPseudoClass=function(){for(var e=0,a=1,o=this._input.peek(a);o;){if("{"===o)return!0;if("("===o)e+=1;else if(")"===o){if(0===e)return!1;e-=1}else if(";"===o||"}"===o)return!1;a++,o=this._input.peek(a)}return!1},m.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},m.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},m.prototype.indent=function(){this._indentLevel++},m.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},m.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,m=this._options.eol;"auto"===m&&(m="\n",e&&i.test(e||"")&&(m=e.match(i)[0]));var d=(e=e.replace(n,"\n")).match(/^[\t ]*/)[0];this._output=new a(this._options,d),this._input=new o(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var u,f,p=0,h=!1,g=!1,b=!1,A=!1,y=!1,v=this._ch,k=!1;u=""!==this._input.read(r),f=v,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),v=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var C=this._input.read(c),w=t.get_directives(C);w&&"start"===w.ignore&&(C+=t.readIgnored(this._input)),this.print_string(C),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(s)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(u),this.print_string(this._ch);var E=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);E.match(/[ :]$/)&&(E=this.eatString(": ").replace(/\s+$/,""),this.print_string(E),this._output.space_before_token=!0),0===p&&-1!==E.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(u),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),0===p&&-1!==S.indexOf(":")?(g=!0,this.indent()):S in this.NESTED_AT_RULE?(this._nestedLevel+=1,S in this.CONDITIONAL_GROUP_RULE&&(b=!0)):0!==p||g||(A=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(u),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),A=!1,b?(b=!1,h=this._indentLevel>=this._nestedLevel):h=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&h&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===f?this._output.space_before_token=!1:","!==f&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===f&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),h=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var B=0;B<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;B++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[B])){k=!0;break}!h&&!b||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||A||0!==p?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var N='"'===f||"'"===f;this.preserveSingleSpace(N||u),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)k=!1,0===p?(g&&(this.outdent(),g=!1),A=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),p++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),p&&(p--,this.outdent()));else{var V=!1;this._input.lookBack("with")&&(V=!0),this.preserveSingleSpace(u||V),this.print_string(this._ch),g&&"$"===f&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),p++,this.indent())}else if(")"===this._ch)p&&(p--,this.outdent()),y&&";"===this._input.peek()&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||g&&!y||0!==p||A?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==p)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(u),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),l.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var x='"'===f||"'"===f;this.preserveSingleSpace(x||u),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&k&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&l.test(this._ch)&&(this._ch=""));return this._output.get_code(m)},wa.Beautifier=m,wa}().Beautifier,a=Sa().Options;return Ca.exports=function(a,o){return new e(a,o).beautify()},Ca.exports.defaultOptions=function(){return new a},Ca.exports}var Na,Va={exports:{}},xa={},Ia={};function Ra(){if(Na)return Ia;Na=1;var e=Ge().Options;function a(a){e.call(this,a,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return a.prototype=new e,Ia.Options=a,Ia}var Ma,_a,Ta,Da,qa={};function za(){if(Ma)return qa;Ma=1;var e=ra().Tokenizer,a=ra().TOKEN,o=ma().Directives,t=ga().TemplatablePattern,i=la().Pattern,n={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},l=new o(/<\!--/,/-->/),r=function(a,o){e.call(this,a,o),this._current_tag_name="";var n=new t(this._input).read_options(this._options),l=new i(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),word_control_flow_close_excluded:n.until(/[\n\r\t <}]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),angular_control_flow_start:l.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),handlebars_open:l.until(/[\n\r\t }]/),handlebars_raw_close:l.until(/}}/),comment:l.starting_with(/<!--/).until_after(/-->/),cdata:l.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:l.starting_with(/<!\[/).until_after(/]>/),processing:l.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var r=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=l.matching(r).until_after(r)}};return(r.prototype=new e)._is_comment=function(e){return!1},r.prototype._is_opening=function(e){return e.type===n.TAG_OPEN||e.type===n.CONTROL_FLOW_OPEN},r.prototype._is_closing=function(e,a){return e.type===n.TAG_CLOSE&&a&&((">"===e.text||"/>"===e.text)&&"<"===a.text[0]||"}}"===e.text&&"{"===a.text[0]&&"{"===a.text[1])||e.type===n.CONTROL_FLOW_CLOSE&&"}"===e.text&&a.text.endsWith("{")},r.prototype._reset=function(){this._current_tag_name=""},r.prototype._get_next_token=function(e,a){var o=null;this._readWhitespace();var t=this._input.peek();return null===t?this._create_token(n.EOF,""):o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o||this._read_open_handlebars(t,a))||this._read_attribute(t,e,a))||this._read_close(t,a))||this._read_control_flows(t,a))||this._read_raw_content(t,e,a))||this._read_content_word(t,a))||this._read_comment_or_cdata(t))||this._read_processing(t))||this._read_open(t,a))||this._create_token(n.UNKNOWN,this._input.next())},r.prototype._read_comment_or_cdata=function(e){var a=null,o=null,t=null;"<"===e&&("!"===this._input.peek(1)&&((o=this.__patterns.comment.read())?(t=l.get_directives(o))&&"start"===t.ignore&&(o+=l.readIgnored(this._input)):o=this.__patterns.cdata.read()),o&&((a=this._create_token(n.COMMENT,o)).directives=t));return a},r.prototype._read_processing=function(e){var a=null,o=null;if("<"===e){var t=this._input.peek(1);"!"!==t&&"?"!==t||(o=(o=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),o&&((a=this._create_token(n.COMMENT,o)).directives=null)}return a},r.prototype._read_open=function(e,a){var o=null,t=null;return a&&a.type!==n.CONTROL_FLOW_OPEN||"<"===e&&(o=this._input.next(),"/"===this._input.peek()&&(o+=this._input.next()),o+=this.__patterns.element_name.read(),t=this._create_token(n.TAG_OPEN,o)),t},r.prototype._read_open_handlebars=function(e,a){var o=null,t=null;return a&&a.type!==n.CONTROL_FLOW_OPEN||this._options.indent_handlebars&&"{"===e&&"{"===this._input.peek(1)&&("!"===this._input.peek(2)?(o=(o=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),t=this._create_token(n.COMMENT,o)):(o=this.__patterns.handlebars_open.read(),t=this._create_token(n.TAG_OPEN,o))),t},r.prototype._read_control_flows=function(e,a){var o="",t=null;if(!this._options.templating.includes("angular")||!this._options.indent_handlebars)return t;if("@"===e){if(""===(o=this.__patterns.angular_control_flow_start.read()))return t;for(var i=o.endsWith("(")?1:0,l=0;!o.endsWith("{")||i!==l;){var r=this._input.next();if(null===r)break;"("===r?i++:")"===r&&l++,o+=r}t=this._create_token(n.CONTROL_FLOW_OPEN,o)}else"}"===e&&a&&a.type===n.CONTROL_FLOW_OPEN&&(o=this._input.next(),t=this._create_token(n.CONTROL_FLOW_CLOSE,o));return t},r.prototype._read_close=function(e,a){var o=null,t=null;return a&&a.type===n.TAG_OPEN&&("<"===a.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(o=this._input.next(),"/"===e&&(o+=this._input.next()),t=this._create_token(n.TAG_CLOSE,o)):"{"===a.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),t=this._create_token(n.TAG_CLOSE,"}}"))),t},r.prototype._read_attribute=function(e,a,o){var t=null,i="";if(o&&"<"===o.text[0])if("="===e)t=this._create_token(n.EQUALS,this._input.next());else if('"'===e||"'"===e){var l=this._input.next();l+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),t=this._create_token(n.VALUE,l)}else(i=this.__patterns.attribute.read())&&(t=a.type===n.EQUALS?this._create_token(n.VALUE,i):this._create_token(n.ATTRIBUTE,i));return t},r.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},r.prototype._read_raw_content=function(e,a,o){var t="";if(o&&"{"===o.text[0])t=this.__patterns.handlebars_raw_close.read();else if(a.type===n.TAG_CLOSE&&"<"===a.opened.text[0]&&"/"!==a.text[0]){var i=a.opened.text.substr(1).toLowerCase();if("script"===i||"style"===i){var l=this._read_comment_or_cdata(e);if(l)return l.type=n.TEXT,l;t=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(i)&&(t=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return t?this._create_token(n.TEXT,t):null},r.prototype._read_content_word=function(e,a){var o="";if(this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(o=this.__patterns.unformatted_content_delimiter.read()),o||(o=a&&a.type===n.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),o)return this._create_token(n.TEXT,o)},qa.Tokenizer=r,qa.TOKEN=n,qa}function Oa(){if(_a)return xa;_a=1;var e=Ra().Options,a=De().Output,o=za().Tokenizer,t=za().TOKEN,i=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,l=function(e,o){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new a(e,o)};l.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},l.prototype.set_space_before_token=function(e,a){this._output.space_before_token=e,this._output.non_breaking_space=a},l.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},l.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},l.prototype.print_preserved_newlines=function(e){var a=0;e.type!==t.TEXT&&e.previous.type!==t.TEXT&&(a=e.newlines?1:0),this.preserve_newlines&&(a=e.newlines<this.max_preserve_newlines+1?e.newlines:this.max_preserve_newlines+1);for(var o=0;o<a;o++)this.print_newline(o>0);return 0!==a},l.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},l.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},l.prototype.print_newline=function(e){this._output.add_new_line(e)},l.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},l.prototype.indent=function(){this.indent_level++},l.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},l.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var r=function(e,a){var o=null,i=null;return a.closed?("script"===e?o="text/javascript":"style"===e&&(o="text/css"),o=function(e){for(var a=null,o=e.next;o.type!==t.EOF&&e.closed!==o;){if(o.type===t.ATTRIBUTE&&"type"===o.text){o.next&&o.next.type===t.EQUALS&&o.next.next&&o.next.next.type===t.VALUE&&(a=o.next.next.text);break}o=o.next}return a}(a)||o,o.search("text/css")>-1?i="css":o.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":o.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":o.search(/test\/null/)>-1&&(i="null"),i):null};function c(e,a){return-1!==a.indexOf(e)}function s(e,a,o){this.parent=e||null,this.tag=a?a.tag_name:"",this.indent_level=o||0,this.parser_token=a||null}function m(e){this._printer=e,this._current_frame=null}function d(a,o,t,i){this._source_text=a||"",o=o||{},this._js_beautify=t,this._css_beautify=i,this._tag_stack=null;var n=new e(o,"html");this._options=n,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}m.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},m.prototype.record_tag=function(e){var a=new s(this._current_frame,e,this._printer.indent_level);this._current_frame=a},m.prototype._try_pop_frame=function(e){var a=null;return e&&(a=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),a},m.prototype._get_frame=function(e,a){for(var o=this._current_frame;o&&-1===e.indexOf(o.tag);){if(a&&-1!==a.indexOf(o.tag)){o=null;break}o=o.parent}return o},m.prototype.try_pop=function(e,a){var o=this._get_frame([e],a);return this._try_pop_frame(o)},m.prototype.indent_to_tag=function(e){var a=this._get_frame(e);a&&(this._printer.indent_level=a.indent_level)},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,a=this._options.eol;"auto"===this._options.eol&&(a="\n",e&&i.test(e)&&(a=e.match(i)[0]));var r=(e=e.replace(n,"\n")).match(/^[\t ]*/)[0],c={text:"",type:""},s=new u,d=new l(this._options,r),f=new o(e,this._options).tokenize();this._tag_stack=new m(d);for(var p=null,h=f.next();h.type!==t.EOF;)h.type===t.TAG_OPEN||h.type===t.COMMENT?s=p=this._handle_tag_open(d,h,s,c,f):h.type===t.ATTRIBUTE||h.type===t.EQUALS||h.type===t.VALUE||h.type===t.TEXT&&!s.tag_complete?p=this._handle_inside_tag(d,h,s,c):h.type===t.TAG_CLOSE?p=this._handle_tag_close(d,h,s):h.type===t.TEXT?p=this._handle_text(d,h,s):h.type===t.CONTROL_FLOW_OPEN?p=this._handle_control_flow_open(d,h):h.type===t.CONTROL_FLOW_CLOSE?p=this._handle_control_flow_close(d,h):d.add_raw_token(h),c=p,h=f.next();return d._output.get_code(a)},d.prototype._handle_control_flow_open=function(e,a){var o={text:a.text,type:a.type};return e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),a.newlines?e.print_preserved_newlines(a):e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),e.print_token(a),e.indent(),o},d.prototype._handle_control_flow_close=function(e,a){var o={text:a.text,type:a.type};return e.deindent(),a.newlines?e.print_preserved_newlines(a):e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),e.print_token(a),o},d.prototype._handle_tag_close=function(e,a,o){var t={text:a.text,type:a.type};return e.alignment_size=0,o.tag_complete=!0,e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),o.is_unformatted?e.add_raw_token(a):("<"===o.tag_start_char&&(e.set_space_before_token("/"===a.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&o.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(a)),!o.indent_content||o.is_unformatted||o.is_content_unformatted||(e.indent(),o.indent_content=!1),o.is_inline_element||o.is_unformatted||o.is_content_unformatted||e.set_wrap_point(),t},d.prototype._handle_inside_tag=function(e,a,o,i){var n=o.has_wrapped_attrs,l={text:a.text,type:a.type};return e.set_space_before_token(a.newlines||""!==a.whitespace_before,!0),o.is_unformatted?e.add_raw_token(a):"{"===o.tag_start_char&&a.type===t.TEXT?e.print_preserved_newlines(a)?(a.newlines=0,e.add_raw_token(a)):e.print_token(a):(a.type===t.ATTRIBUTE?e.set_space_before_token(!0):(a.type===t.EQUALS||a.type===t.VALUE&&a.previous.type===t.EQUALS)&&e.set_space_before_token(!1),a.type===t.ATTRIBUTE&&"<"===o.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(a),n=n||0!==a.newlines),this._is_wrap_attributes_force&&o.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==t.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(e.print_newline(!1),n=!0)),e.print_token(a),n=n||e.previous_token_wrapped(),o.has_wrapped_attrs=n),l},d.prototype._handle_text=function(e,a,o){var t={text:a.text,type:"TK_CONTENT"};return o.custom_beautifier_name?this._print_custom_beatifier_text(e,a,o):o.is_unformatted||o.is_content_unformatted?e.add_raw_token(a):(e.traverse_whitespace(a),e.print_token(a)),t},d.prototype._print_custom_beatifier_text=function(e,a,o){var t=this;if(""!==a.text){var i,n=a.text,l=1,r="",c="";"javascript"===o.custom_beautifier_name&&"function"==typeof this._js_beautify?i=this._js_beautify:"css"===o.custom_beautifier_name&&"function"==typeof this._css_beautify?i=this._css_beautify:"html"===o.custom_beautifier_name&&(i=function(e,a){return new d(e,a,t._js_beautify,t._css_beautify).beautify()}),"keep"===this._options.indent_scripts?l=0:"separate"===this._options.indent_scripts&&(l=-e.indent_level);var s=e.get_full_indent(l);if(n=n.replace(/\n[ \t]*$/,""),"html"!==o.custom_beautifier_name&&"<"===n[0]&&n.match(/^(<!--|<!\[CDATA\[)/)){var m=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(n);if(!m)return void e.add_raw_token(a);r=s+m[1]+"\n",n=m[4],m[5]&&(c=s+m[5]),n=n.replace(/\n[ \t]*$/,""),(m[2]||-1!==m[3].indexOf("\n"))&&(m=m[3].match(/[ \t]+$/))&&(a.whitespace_before=m[0])}if(n)if(i){var u=function(){this.eol="\n"};u.prototype=this._options.raw_options,n=i(s+n,new u)}else{var f=a.whitespace_before;f&&(n=n.replace(new RegExp("\n("+f+")?","g"),"\n")),n=s+n.replace(/\n/g,"\n"+s)}r&&(n=n?r+n+"\n"+c:r+c),e.print_newline(!1),n&&(a.text=n,a.whitespace_before="",a.newlines=0,e.add_raw_token(a),e.print_newline(!0))}},d.prototype._handle_tag_open=function(e,a,o,i,n){var l=this._get_tag_open_token(a);if(!o.is_unformatted&&!o.is_content_unformatted||o.is_empty_element||a.type!==t.TAG_OPEN||l.is_start_tag?(e.traverse_whitespace(a),this._set_tag_position(e,a,l,o,i),l.is_inline_element||e.set_wrap_point(),e.print_token(a)):(e.add_raw_token(a),l.start_tag_token=this._tag_stack.try_pop(l.tag_name)),l.is_start_tag&&this._is_wrap_attributes_force){var r,c=0;do{(r=n.peek(c)).type===t.ATTRIBUTE&&(l.attr_count+=1),c+=1}while(r.type!==t.EOF&&r.type!==t.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(l.alignment_size=a.text.length+1),l.tag_complete||l.is_unformatted||(e.alignment_size=l.alignment_size),l};var u=function(e,a){if(this.parent=e||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",a){var o;this.tag_start_char=a.text[0],this.text=a.text,"<"===this.tag_start_char?(o=a.text.match(/^<([^\s>]*)/),this.tag_check=o?o[1]:""):(o=a.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=o?o[1]:"",(a.text.startsWith("{{#>")||a.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==a.next?this.tag_check=a.next.text.split(" ")[0]:this.tag_check=a.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),a.type===t.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||a.closed&&"/>"===a.closed.text;var i=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(i=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(i)))}else this.tag_complete=!0};d.prototype._get_tag_open_token=function(e){var a=new u(this._tag_stack.get_parser_token(),e);return a.alignment_size=this._options.wrap_attributes_indent_size,a.is_end_tag=a.is_end_tag||c(a.tag_check,this._options.void_elements),a.is_empty_element=a.tag_complete||a.is_start_tag&&a.is_end_tag,a.is_unformatted=!a.tag_complete&&c(a.tag_check,this._options.unformatted),a.is_content_unformatted=!a.is_empty_element&&c(a.tag_check,this._options.content_unformatted),a.is_inline_element=c(a.tag_name,this._options.inline)||this._options.inline_custom_elements&&a.tag_name.includes("-")||"{"===a.tag_start_char,a},d.prototype._set_tag_position=function(e,a,o,i,n){if(o.is_empty_element||(o.is_end_tag?o.start_tag_token=this._tag_stack.try_pop(o.tag_name):(this._do_optional_end_element(o)&&(o.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(o),"script"!==o.tag_name&&"style"!==o.tag_name||o.is_unformatted||o.is_content_unformatted||(o.custom_beautifier_name=r(o.tag_check,a)))),c(o.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),o.is_empty_element){if("{"===o.tag_start_char&&"else"===o.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),o.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===o.tag_name&&n.type===t.TAG_CLOSE&&i.is_end_tag&&-1===o.text.indexOf("\n")||(o.is_inline_element||o.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,o))}else if(o.is_end_tag){var l=!1;l=(l=o.start_tag_token&&o.start_tag_token.multiline_content)||!o.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(n.type===t.TAG_CLOSE&&o.start_tag_token===i)&&"TK_CONTENT"!==n.type,(o.is_content_unformatted||o.is_unformatted)&&(l=!1),l&&e.print_newline(!1)}else o.indent_content=!o.custom_beautifier_name,"<"===o.tag_start_char&&("html"===o.tag_name?o.indent_content=this._options.indent_inner_html:"head"===o.tag_name?o.indent_content=this._options.indent_head_inner_html:"body"===o.tag_name&&(o.indent_content=this._options.indent_body_inner_html)),o.is_inline_element||o.is_unformatted||"TK_CONTENT"===n.type&&!o.is_content_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,o)},d.prototype._calcluate_parent_multiline=function(e,a){!a.parent||!e._output.just_added_newline()||(a.is_inline_element||a.is_unformatted)&&a.parent.is_inline_element||(a.parent.multiline_content=!0)};var f=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],p=["a","audio","del","ins","map","noscript","video"];return d.prototype._do_optional_end_element=function(e){var a=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)a=a||this._tag_stack.try_pop("head");else if("li"===e.tag_name)a=a||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===e.tag_name||"dt"===e.tag_name)a=(a=a||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==f.indexOf(e.tag_name)){var o=e.parent.parent;o&&-1!==p.indexOf(o.tag_name)||(a=a||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?a=(a=a||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?a=a||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?a=a||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?a=a||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?a=(a=a||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?a=(a=(a=(a=a||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?a=(a=(a=a||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==e.tag_name&&"td"!==e.tag_name||(a=(a=a||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),a}},xa.Beautifier=d,xa}function La(){if(Da)return Re;Da=1;var e=function(){if(pa)return Me.exports;pa=1;var e=Aa().Beautifier,a=We().Options;return Me.exports=function(a,o){return new e(a,o).beautify()},Me.exports.defaultOptions=function(){return new a},Me.exports}(),a=Ba(),o=function(){if(Ta)return Va.exports;Ta=1;var e=Oa().Beautifier,a=Ra().Options;return Va.exports=function(a,o,t,i){return new e(a,o,t,i).beautify()},Va.exports.defaultOptions=function(){return new a},Va.exports}();function t(t,i,n,l){return o(t,i,n=n||e,l=l||a)}return t.defaultOptions=o.defaultOptions,Re.js=e,Re.css=a,Re.html=t,Re}!function(e){!function(e){var a=La();a.js_beautify=a.js,a.css_beautify=a.css,a.html_beautify=a.html,e.exports=function(e,a,o){var t=function(a,o){return e.js_beautify(a,o)};return t.js=e.js_beautify,t.css=a.css_beautify,t.html=o.html_beautify,t.js_beautify=e.js_beautify,t.css_beautify=a.css_beautify,t.html_beautify=o.html_beautify,t}(a,a,a)}(e)}(Ie);var Pa=Ce(Ie.exports),Ua={exports:{}};!function(e){var a=function(e){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,t={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(a){return a instanceof n?new n(a.type,e(a.content),a.alias):Array.isArray(a)?a.map(e):a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++o}),e.__id},clone:function e(a,o){var t,n;switch(o=o||{},i.util.type(a)){case"Object":if(n=i.util.objId(a),o[n])return o[n];for(var l in t={},o[n]=t,a)a.hasOwnProperty(l)&&(t[l]=e(a[l],o));return t;case"Array":return n=i.util.objId(a),o[n]?o[n]:(t=[],o[n]=t,a.forEach((function(a,i){t[i]=e(a,o)})),t);default:return a}},getLanguage:function(e){for(;e;){var o=a.exec(e.className);if(o)return o[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,o){e.className=e.className.replace(RegExp(a,"gi"),""),e.classList.add("language-"+o)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(t){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(t.stack)||[])[1];if(e){var a=document.getElementsByTagName("script");for(var o in a)if(a[o].src==e)return a[o]}return null}},isActive:function(e,a,o){for(var t="no-"+a;e;){var i=e.classList;if(i.contains(a))return!0;if(i.contains(t))return!1;e=e.parentElement}return!!o}},languages:{plain:t,plaintext:t,text:t,txt:t,extend:function(e,a){var o=i.util.clone(i.languages[e]);for(var t in a)o[t]=a[t];return o},insertBefore:function(e,a,o,t){var n=(t=t||i.languages)[e],l={};for(var r in n)if(n.hasOwnProperty(r)){if(r==a)for(var c in o)o.hasOwnProperty(c)&&(l[c]=o[c]);o.hasOwnProperty(r)||(l[r]=n[r])}var s=t[e];return t[e]=l,i.languages.DFS(i.languages,(function(a,o){o===s&&a!=e&&(this[a]=l)})),l},DFS:function e(a,o,t,n){n=n||{};var l=i.util.objId;for(var r in a)if(a.hasOwnProperty(r)){o.call(a,r,a[r],t||r);var c=a[r],s=i.util.type(c);"Object"!==s||n[l(c)]?"Array"!==s||n[l(c)]||(n[l(c)]=!0,e(c,o,r,n)):(n[l(c)]=!0,e(c,o,null,n))}}},plugins:{},highlightAll:function(e,a){i.highlightAllUnder(document,e,a)},highlightAllUnder:function(e,a,o){var t={callback:o,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",t),t.elements=Array.prototype.slice.apply(t.container.querySelectorAll(t.selector)),i.hooks.run("before-all-elements-highlight",t);for(var n,l=0;n=t.elements[l++];)i.highlightElement(n,!0===a,t.callback)},highlightElement:function(a,o,t){var n=i.util.getLanguage(a),l=i.languages[n];i.util.setLanguage(a,n);var r=a.parentElement;r&&"pre"===r.nodeName.toLowerCase()&&i.util.setLanguage(r,n);var c={element:a,language:n,grammar:l,code:a.textContent};function s(e){c.highlightedCode=e,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i.hooks.run("after-highlight",c),i.hooks.run("complete",c),t&&t.call(c.element)}if(i.hooks.run("before-sanity-check",c),(r=c.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!c.code)return i.hooks.run("complete",c),void(t&&t.call(c.element));if(i.hooks.run("before-highlight",c),c.grammar)if(o&&e.Worker){var m=new Worker(i.filename);m.onmessage=function(e){s(e.data)},m.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else s(i.highlight(c.code,c.grammar,c.language));else s(i.util.encode(c.code))},highlight:function(e,a,o){var t={code:e,grammar:a,language:o};if(i.hooks.run("before-tokenize",t),!t.grammar)throw new Error('The language "'+t.language+'" has no grammar.');return t.tokens=i.tokenize(t.code,t.grammar),i.hooks.run("after-tokenize",t),n.stringify(i.util.encode(t.tokens),t.language)},tokenize:function(e,a){var o=a.rest;if(o){for(var t in o)a[t]=o[t];delete a.rest}var i=new c;return s(i,i.head,e),r(e,i,a,i.head,0),function(e){var a=[],o=e.head.next;for(;o!==e.tail;)a.push(o.value),o=o.next;return a}(i)},hooks:{all:{},add:function(e,a){var o=i.hooks.all;o[e]=o[e]||[],o[e].push(a)},run:function(e,a){var o=i.hooks.all[e];if(o&&o.length)for(var t,n=0;t=o[n++];)t(a)}},Token:n};function n(e,a,o,t){this.type=e,this.content=a,this.alias=o,this.length=0|(t||"").length}function l(e,a,o,t){e.lastIndex=a;var i=e.exec(o);if(i&&t&&i[1]){var n=i[1].length;i.index+=n,i[0]=i[0].slice(n)}return i}function r(e,a,o,t,c,d){for(var u in o)if(o.hasOwnProperty(u)&&o[u]){var f=o[u];f=Array.isArray(f)?f:[f];for(var p=0;p<f.length;++p){if(d&&d.cause==u+","+p)return;var h=f[p],g=h.inside,b=!!h.lookbehind,A=!!h.greedy,y=h.alias;if(A&&!h.pattern.global){var v=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}for(var k=h.pattern||h,C=t.next,w=c;C!==a.tail&&!(d&&w>=d.reach);w+=C.value.length,C=C.next){var E=C.value;if(a.length>e.length)return;if(!(E instanceof n)){var S,B=1;if(A){if(!(S=l(k,w,e,b))||S.index>=e.length)break;var N=S.index,V=S.index+S[0].length,x=w;for(x+=C.value.length;N>=x;)x+=(C=C.next).value.length;if(w=x-=C.value.length,C.value instanceof n)continue;for(var I=C;I!==a.tail&&(x<V||"string"==typeof I.value);I=I.next)B++,x+=I.value.length;B--,E=e.slice(w,x),S.index-=w}else if(!(S=l(k,0,E,b)))continue;N=S.index;var R=S[0],M=E.slice(0,N),_=E.slice(N+R.length),T=w+E.length;d&&T>d.reach&&(d.reach=T);var D=C.prev;if(M&&(D=s(a,D,M),w+=M.length),m(a,D,B),C=s(a,D,new n(u,g?i.tokenize(R,g):R,y,R)),_&&s(a,C,_),B>1){var q={cause:u+","+p,reach:T};r(e,a,o,C.prev,w,q),d&&q.reach>d.reach&&(d.reach=q.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},a={value:null,prev:e,next:null};e.next=a,this.head=e,this.tail=a,this.length=0}function s(e,a,o){var t=a.next,i={value:o,prev:a,next:t};return a.next=i,t.prev=i,e.length++,i}function m(e,a,o){for(var t=a.next,i=0;i<o&&t!==e.tail;i++)t=t.next;a.next=t,t.prev=a,e.length-=i}if(e.Prism=i,n.stringify=function e(a,o){if("string"==typeof a)return a;if(Array.isArray(a)){var t="";return a.forEach((function(a){t+=e(a,o)})),t}var n={type:a.type,content:e(a.content,o),tag:"span",classes:["token",a.type],attributes:{},language:o},l=a.alias;l&&(Array.isArray(l)?Array.prototype.push.apply(n.classes,l):n.classes.push(l)),i.hooks.run("wrap",n);var r="";for(var c in n.attributes)r+=" "+c+'="'+(n.attributes[c]||"").replace(/"/g,"&quot;")+'"';return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+r+">"+n.content+"</"+n.tag+">"},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(a){var o=JSON.parse(a.data),t=o.language,n=o.code,l=o.immediateClose;e.postMessage(i.highlight(n,i.languages[t],t)),l&&e.close()}),!1),i):i;var d=i.util.currentScript();function u(){i.manual||i.highlightAll()}if(d&&(i.filename=d.src,d.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
2
2
  /**
3
3
  * Prism: Lightweight, robust, elegant syntax highlighting
4
4
  *