@kubex/zinc 1.1.128 → 1.1.129

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.
package/dist/zn.min.js CHANGED
@@ -1,8 +1,8 @@
1
- import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var Ku=Fn((Ul,Wu)=>{(function(o,i){typeof Ul=="object"&&typeof Wu=="object"?Wu.exports=i():typeof define=="function"&&define.amd?define([],i):typeof Ul=="object"?Ul.AirDatepicker=i():o.AirDatepicker=i()})(Ul,(function(){return(function(){"use strict";var o={d:function(O,x){for(var E in x)o.o(x,E)&&!o.o(O,E)&&Object.defineProperty(O,E,{enumerable:!0,get:x[E]})},o:function(O,x){return Object.prototype.hasOwnProperty.call(O,x)}},i={};o.d(i,{default:function(){return ae}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(O){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof O=="string"?x.querySelector(O):O}function a(){let{tagName:O="div",className:x="",innerHtml:E="",id:w="",attrs:D={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(O);return x&&q.classList.add(...x.split(" ")),w&&(q.id=w),E&&(q.innerHTML=E),D&&s(q,D),q}function s(O,x){for(let[E,w]of Object.entries(x))w!==void 0&&O.setAttribute(E,w);return O}function l(O){return new Date(O.getFullYear(),O.getMonth()+1,0).getDate()}function p(O){let x=O.getHours(),{hours:E,dayPeriod:w}=h(x);return{year:O.getFullYear(),month:O.getMonth(),fullMonth:O.getMonth()+1<10?"0"+(O.getMonth()+1):O.getMonth()+1,date:O.getDate(),fullDate:O.getDate()<10?"0"+O.getDate():O.getDate(),day:O.getDay(),hours:x,fullHours:m(x),hours12:E,dayPeriod:w,fullHours12:m(E),minutes:O.getMinutes(),fullMinutes:O.getMinutes()<10?"0"+O.getMinutes():O.getMinutes()}}function h(O){return{dayPeriod:O>11?"pm":"am",hours:O%12==0?12:O%12}}function m(O){return O<10?"0"+O:O}function f(O){let x=10*Math.floor(O.getFullYear()/10);return[x,x+9]}function b(){let O=[];for(var x=arguments.length,E=new Array(x),w=0;w<x;w++)E[w]=arguments[w];return E.forEach((D=>{if(typeof D=="object")for(let q in D)D[q]&&O.push(q);else D&&O.push(D)})),O.join(" ")}function g(O,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!O||!x)return!1;let w=p(O),D=p(x);return{[t.days]:w.date===D.date&&w.month===D.month&&w.year===D.year,[t.months]:w.month===D.month&&w.year===D.year,[t.years]:w.year===D.year}[E]}function v(O,x,E){let w=S(O,!1).getTime(),D=S(x,!1).getTime();return E?w>=D:w>D}function y(O,x){return!v(O,x,!0)}function S(O){let x=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],E=new Date(O.getTime());return typeof x!="boolean"||x||(function(w){w.setHours(0,0,0,0)})(E),E}function T(O,x,E){O.length?O.forEach((w=>{w.addEventListener(x,E)})):O.addEventListener(x,E)}function N(O,x){return!(!O||O===document||O instanceof DocumentFragment)&&(O.matches(x)?O:N(O.parentNode,x))}function U(O,x,E){return O>E?E:O<x?x:O}function I(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];return E.filter((D=>D)).forEach((D=>{for(let[q,A]of Object.entries(D))if(A!==void 0&&A.toString()==="[object Object]"){let H=O[q]!==void 0?O[q].toString():void 0,j=A.toString(),Q=Array.isArray(A)?[]:{};O[q]=O[q]?H!==j?Q:O[q]:Q,I(O[q],A)}else O[q]=A})),O}function C(O){let x=O;return O instanceof Date||(typeof O=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(O)&&(O+="T00:00:00"),x=new Date(O)),isNaN(x.getTime())&&(console.log(`Unable to convert value "${O}" to Date object`),x=!1),x}function $(O){let x="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+x+")("+O+")($|<|"+x+")","g")}function L(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class W{constructor(){let{type:x,date:E,dp:w,opts:D,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let H=g(A,this.date,this.type);H?this.focus():!H&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=x,this.singleType=this.type.slice(0,-1),this.date=E,this.dp=w,this.opts=D,this.body=q,this.customData=!1,this.init()}init(){var x,E;let{onRenderCell:w}=this.opts;w&&(this.customData=w({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(x=this.customData)!==null&&x!==void 0&&x.disabled?this.dp.disableDate(this.date):((E=this.customData)===null||E===void 0?void 0:E.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var x;let{year:E,month:w,fullMonth:D,date:q,fullDate:A}=p(this.date),H=((x=this.customData)===null||x===void 0?void 0:x.attrs)||{};this.$cell=a({attrs:{"data-year":E,"data-month":w,"data-date":q,"data-iso-date":`${E}-${D}-${A}`,...H}}),this.$cell.adpCell=this}_getClassName(){var x;let E=new Date,{selectOtherMonths:w,selectOtherYears:D}=this.opts,{minDate:q,maxDate:A,isDateDisabled:H}=this.dp,{day:j}=p(this.date),Q=this._isOutOfMinMaxRange(),ie=H(this.date),te=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(E,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),se="";switch(this.type){case t.days:se=b({"-weekend-":this.dp.isWeekend(j),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!w||Q||ie});break;case t.months:se=b({"-disabled-":Q});break;case t.years:se=b({"-other-decade-":this.isOtherDecade,"-disabled-":Q||this.isOtherDecade&&!D})}return b(te,se,(x=this.customData)===null||x===void 0?void 0:x.classes).split(" ")}_getHtml(){var x;let{year:E,month:w,date:D}=p(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((x=this.customData)!==null&&x!==void 0&&x.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":D;case t.months:return this.dp.locale[this.opts.monthsField][w];case t.years:return!A&&this.isOtherDecade?"":E}}_isOutOfMinMaxRange(){let{minDate:x,maxDate:E}=this.dp,{type:w,date:D}=this,{month:q,year:A,date:H}=p(D),j=w===t.days,Q=w===t.years,ie=!!x&&new Date(A,Q?x.getMonth():q,j?H:x.getDate()),te=!!E&&new Date(A,Q?E.getMonth():q,j?H:E.getDate());return x&&E?y(ie,x)||v(te,E):x?y(ie,x):E?v(te,E):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:x,focusDate:E,rangeDateTo:w,rangeDateFrom:D}=this.dp,q=x.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=D,H=w;if(q===1&&E){let se=v(E,x[0]);A=se?x[0]:E,H=se?E:x[0]}let j=b({"-in-range-":A&&H&&(Q=this.date,ie=A,te=H,v(Q,ie)&&y(Q,te)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":H&&g(this.date,H,this.type)});var Q,ie,te;j&&this.$cell.classList.add(...j.split(" "))}_handleSelectedStatus(){let x=this.dp._checkIfDateIsSelected(this.date,this.type);x?this.select():!x&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function oe(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let xe={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},De=".air-datepicker-cell";class Ne{constructor(x){let{dp:E,type:w,opts:D}=x;oe(this,"handleClick",(q=>{let A=q.target.closest(De).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let H=this.dp._checkIfDateIsSelected(A.date,A.type);H?this.dp._handleAlreadySelectedDates(H,A.date):this.dp.selectDate(A.date)})),oe(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),oe(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),oe(this,"onMouseOverCell",(q=>{let A=N(q.target,De);this.dp.setFocusDate(!!A&&A.adpCell.date)})),oe(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),oe(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,H=q.target;H.closest(De)&&this.handleClick(q),A&&H.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),oe(this,"onMouseDown",(q=>{this.pressed=!0;let A=N(q.target,De),H=A&&A.adpCell;g(H.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(H.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),oe(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=N(q.target,De),H=A&&A.adpCell,{selectedDates:j,rangeDateTo:Q,rangeDateFrom:ie}=this.dp;if(!H||H.isDisabled)return;let{date:te}=H;if(j.length===2){if(this.rangeFromFocused&&!v(te,Q)){let{hours:se,minutes:Ct}=p(ie);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateFrom=te,this.dp.replaceDate(ie,te)}if(this.rangeToFocused&&!y(te,ie)){let{hours:se,minutes:Ct}=p(Q);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateTo=te,this.dp.replaceDate(Q,te)}}})),oe(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),oe(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let H=f(q),j=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(H[0]===j[0]&&H[1]===j[1])return}this.render()})),oe(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=E,this.type=w,this.opts=D,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:x,dynamicRange:E}=this.opts;T(this.$el,"mouseover",this.onMouseOverCell),T(this.$el,"mouseout",this.onMouseOutCell),T(this.$el,"click",this.onClickBody),x&&E&&(T(this.$el,"mousedown",this.onMouseDown),T(this.$el,"mousemove",this.onMouseMove),T(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:xe[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,E="",w=this.dp.isWeekend,{onClickDayName:D}=this.opts,q=x,A=0;for(;A<7;){let H=q%7;E+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:w(H),"-clickable-":!!D})}" data-day-index='${H}'>${this.dp.locale.daysMin[H]}</div>`,A++,q++}return E}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(x){let{type:E,dp:w,opts:D}=this;return new W({type:E,dp:w,opts:D,date:x,body:this})}_generateCells(){Ne.getDatesFunction(this.type)(this.dp,(x=>{this.cells.push(this._generateCell(x))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((x=>x.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(x,E){let{viewDate:w,opts:{fixedHeight:D},locale:{firstDay:q}}=x,A=l(w),{year:H,month:j}=p(w),Q=new Date(H,j,1),ie=new Date(H,j,A),te=Q.getDay()-q,se=6-ie.getDay()+q;te=te<0?te+7:te,se=se>6?se-7:se;let Ct=(function(sa,Wh){let{year:td,month:d3,date:p3}=p(sa);return new Date(td,d3,p3-Wh)})(Q,te),Yr=A+te+se,zr=Ct.getDate(),{year:yn,month:fl}=p(Ct),oa=0;D&&(Yr=42);let aa=[];for(;oa<Yr;){let sa=new Date(yn,fl,zr+oa);E&&E(sa),aa.push(sa),oa++}return aa}static getMonthsDates(x,E){let{year:w}=x.parsedViewDate,D=0,q=[];for(;D<12;){let A=new Date(w,D);q.push(A),E&&E(A),D++}return q}static getYearsDates(x,E){let w=f(x.viewDate),D=w[0]-1,q=w[1]+1,A=D,H=[];for(;A<=q;){let j=new Date(A,0);H.push(j),E&&E(j),A++}return H}static getDatesFunction(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:Ne.getDaysDates,[t.months]:Ne.getMonthsDates,[t.years]:Ne.getYearsDates}[x]}}function rt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class er{constructor(x){let{dp:E,opts:w}=x;rt(this,"onClickNav",(D=>{let q=N(D.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),rt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),rt(this,"update",(()=>{let{prevHtml:D,nextHtml:q}=this.opts;this.$prev.innerHTML=D,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),rt(this,"renderDelay",(()=>{setTimeout(this.render)})),rt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(D,q){for(let A in q)q[A]?D.classList.add(A):D.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=E,this.opts=w,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:x,opts:E}=this,w=E.navTitles[x.currentView];return typeof w=="function"?w(x):x.formatDate(x.viewDate,w)}handleNavStatus(){let{disableNavWhenOutOfRange:x}=this.opts,{minDate:E,maxDate:w}=this.dp;if(!E&&!w||!x)return;let{year:D,month:q}=this.dp.parsedViewDate,A=!!E&&p(E),H=!!w&&p(w);switch(this.dp.currentView){case t.days:E&&A.month>=q&&A.year>=D&&this._disableNav("prev"),w&&H.month<=q&&H.year<=D&&this._disableNav("next");break;case t.months:E&&A.year>=D&&this._disableNav("prev"),w&&H.year<=D&&this._disableNav("next");break;case t.years:{let j=f(this.dp.viewDate);E&&A.year>=j[0]&&this._disableNav("prev"),w&&H.year<=j[1]&&this._disableNav("next");break}}}_disableNav(x){n('[data-action="'+x+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(x){for(var E=arguments.length,w=new Array(E>1?E-1:0),D=1;D<E;D++)w[D-1]=arguments[D];x.length?x.forEach((q=>{q.classList.remove(...w)})):x.classList.remove(...w)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:x,nextHtml:E}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${x}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${E}</div>`}get isNavIsFunction(){let{navTitles:x}=this.opts;return Object.keys(x).find((E=>typeof x[E]=="function"))}}var Pr={today:{content:O=>O.locale.today,onClick:O=>O.setViewDate(new Date)},clear:{content:O=>O.locale.clear,onClick:O=>O.clear()}};class wr{constructor(x){let{dp:E,opts:w}=x;this.dp=E,this.opts=w,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:x}=this.opts;Array.isArray(x)||(x=[x]),x.forEach((E=>{let w=E;typeof E=="string"&&Pr[E]&&(w=Pr[E]);let D=this.createButton(w);w.onClick&&this.attachEventToButton(D,w.onClick),this.$el.appendChild(D)}))}attachEventToButton(x,E){x.addEventListener("click",(()=>{E(this.dp)}))}createButton(x){let{content:E,className:w,tagName:D="button",attrs:q={}}=x;return a({tagName:D,innerHtml:`<span tabindex='-1'>${typeof E=="function"?E(this.dp):E}</span>`,className:b("air-datepicker-button",w),attrs:q})}render(){this.generateButtons()}}function Nt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class tr{constructor(){let{opts:x,dp:E}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(this,"toggleTimepickerIsActive",(D=>{this.dp.timepickerIsActive=D})),Nt(this,"onChangeSelectedDate",(D=>{let{date:q,updateTime:A=!1}=D;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),Nt(this,"onChangeLastSelectedDate",(D=>{D&&(this.setTime(D),this.render())})),Nt(this,"onChangeInputRange",(D=>{let q=D.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Nt(this,"onMouseEnterLeave",(D=>{let q=D.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Nt(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Nt(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=x,this.dp=E;let{timeFormat:w}=this.dp.locale;w&&(w.match($("h"))||w.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let x="input";navigator.userAgent.match(/trident/gi)&&(x="change"),T(this.$ranges,x,this.onChangeInputRange),T(this.$ranges,"mouseenter",this.onMouseEnterLeave),T(this.$ranges,"mouseleave",this.onMouseEnterLeave),T(this.$ranges,"focus",this.onFocus),T(this.$ranges,"mousedown",this.onFocus),T(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:x,hours:E,displayHours:w,minutes:D,minHours:q,minMinutes:A,maxHours:H,maxMinutes:j,dayPeriod:Q,opts:{hoursStep:ie,minutesStep:te}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(w)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(D)}</span> `+(x?`<span class='air-datepicker-time--current-ampm'>${Q}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${E}" min="${q}" max="${H}" step="${ie}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${D}" min="${A}" max="${j}" step="${te}"/> </div></div>`}defineDOM(){let x=E=>n(E,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=x('[name="hours"]'),this.$minutes=x('[name="minutes"]'),this.$hoursText=x(".air-datepicker-time--current-hours"),this.$minutesText=x(".air-datepicker-time--current-minutes"),this.$ampm=x(".air-datepicker-time--current-ampm")}setTime(x){this.setMinMaxTime(x),this.setCurrentTime(x)}addTimeToDate(x){x&&(x.setHours(this.hours),x.setMinutes(this.minutes))}setMinMaxTime(x){if(this.setMinMaxTimeFromOptions(),x){let{minDate:E,maxDate:w}=this.dp;E&&g(x,E)&&this.setMinTimeFromMinDate(E),w&&g(x,w)&&this.setMaxTimeFromMaxDate(w)}}setCurrentTime(x){let{hours:E,minutes:w}=x?p(x):this;this.hours=U(E,this.minHours,this.maxHours),this.minutes=U(w,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:x,minMinutes:E,maxHours:w,maxMinutes:D}=this.opts;this.minHours=U(x,0,23),this.minMinutes=U(E,0,59),this.maxHours=U(w,0,23),this.maxMinutes=U(D,0,59)}setMinTimeFromMinDate(x){let{lastSelectedDate:E}=this.dp;this.minHours=x.getHours(),E&&E.getHours()>x.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=x.getMinutes()}setMaxTimeFromMaxDate(x){let{lastSelectedDate:E}=this.dp;this.maxHours=x.getHours(),E&&E.getHours()<x.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=x.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(x){this._hours=x;let{hours:E,dayPeriod:w}=h(x);this.displayHours=this.ampm?E:x,this.dayPeriod=w}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function Mt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class uo{constructor(x){let{dp:E,opts:w}=x;Mt(this,"pressedKeys",new Set),Mt(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],D=>D.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],D=>D.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],D=>D.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],D=>D.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],D=>D.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],D=>D.year-=10],[["Control","Shift","ArrowUp"],(D,q)=>q.up()]])),Mt(this,"handleHotKey",(D=>{let q=this.hotKeys.get(D),A=p(this.getInitialFocusDate());q(A,this.dp);let{year:H,month:j,date:Q}=A,ie=l(new Date(H,j));ie<Q&&(Q=ie);let te=this.dp.getClampedDate(new Date(H,j,Q));this.dp.setFocusDate(te,{viewDateTransition:!0})})),Mt(this,"isHotKeyPressed",(()=>{let D=!1,q=this.pressedKeys.size,A=H=>this.pressedKeys.has(H);for(let[H]of this.hotKeys){if(D)break;if(Array.isArray(H[0]))H.forEach((j=>{D||q!==j.length||(D=j.every(A)&&H)}));else{if(q!==H.length)continue;D=H.every(A)&&H}}return D})),Mt(this,"isArrow",(D=>D>=37&&D<=40)),Mt(this,"onKeyDown",(D=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=D,{dp:H,dp:{focusDate:j},opts:Q}=this;this.registerKey(q);let ie=this.isHotKeyPressed();if(ie)return D.preventDefault(),void this.handleHotKey(ie);if(this.isArrow(A))return D.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(H.currentView!==Q.minView)return void H.down();if(j){let te=H._checkIfDateIsSelected(j);return void(te?H._handleAlreadySelectedDates(te,j):H.selectDate(j))}}q==="Escape"&&this.dp.hide()})),Mt(this,"onKeyUp",(D=>{this.removeKey(D.key)})),this.dp=E,this.opts=w,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:x}=this.dp;x.addEventListener("keydown",this.onKeyDown),x.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:x}=this.dp;x.removeEventListener("keydown",this.onKeyDown),x.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:x,currentView:E,selectedDates:w,parsedViewDate:{year:D,month:q}}=this.dp,A=x||w[w.length-1];if(!A)switch(E){case t.days:A=new Date(D,q,new Date().getDate());break;case t.months:A=new Date(D,q,1);break;case t.years:A=new Date(D,0,1)}return A}focusNextCell(x){let E=this.getInitialFocusDate(),{currentView:w}=this.dp,{days:D,months:q,years:A}=t,H=p(E),j=H.year,Q=H.month,ie=H.date;switch(x){case"ArrowLeft":w===D&&(ie-=1),w===q&&(Q-=1),w===A&&(j-=1);break;case"ArrowUp":w===D&&(ie-=7),w===q&&(Q-=3),w===A&&(j-=4);break;case"ArrowRight":w===D&&(ie+=1),w===q&&(Q+=1),w===A&&(j+=1);break;case"ArrowDown":w===D&&(ie+=7),w===q&&(Q+=3),w===A&&(j+=4)}let te=this.dp.getClampedDate(new Date(j,Q,ie));this.dp.setFocusDate(te,{viewDateTransition:!0})}registerKey(x){this.pressedKeys.add(x)}removeKey(x){this.pressedKeys.delete(x)}}let Qa={on(O,x){this.__events||(this.__events={}),this.__events[O]?this.__events[O].push(x):this.__events[O]=[x]},off(O,x){this.__events&&this.__events[O]&&(this.__events[O]=this.__events[O].filter((E=>E!==x)))},removeAllEvents(){this.__events={}},trigger(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];this.__events&&this.__events[O]&&this.__events[O].forEach((D=>{D(...E)}))}};function ue(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let Yi="",Qi="",he=!1;class ae{static buildGlobalContainer(x){he=!0,Yi=a({className:x,id:x}),n("body").appendChild(Yi)}constructor(x,E){var w=this;if(ue(this,"viewIndexes",[t.days,t.months,t.years]),ue(this,"next",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H+1,1));break;case t.months:this.setViewDate(new Date(A+1,H,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ue(this,"prev",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H-1,1));break;case t.months:this.setViewDate(new Date(A-1,H,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ue(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ue(this,"setPosition",(function(A){let H=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||w.opts.position)=="function")return void(w.customHide=A({$datepicker:w.$datepicker,$target:w.$el,$pointer:w.$pointer,isViewChange:H,done:w._finishHide}));let j,Q,{isMobile:ie}=w.opts,te=w.$el.getBoundingClientRect(),se=w.$el.getBoundingClientRect(),Ct=w.$datepicker.offsetParent,Yr=w.$el.offsetParent,zr=w.$datepicker.getBoundingClientRect(),yn=A.split(" "),fl=window.scrollY,oa=window.scrollX,aa=w.opts.offset,sa=yn[0],Wh=yn[1];if(ie)w.$datepicker.style.cssText="left: 50%; top: 50%";else{if(Ct===Yr&&Ct!==document.body&&(se={top:w.$el.offsetTop,left:w.$el.offsetLeft,width:te.width,height:w.$el.offsetHeight},fl=0,oa=0),Ct!==Yr&&Ct!==document.body){let td=Ct.getBoundingClientRect();se={top:te.top-td.top,left:te.left-td.left,width:te.width,height:te.height},fl=0,oa=0}switch(sa){case"top":j=se.top-zr.height-aa;break;case"right":Q=se.left+se.width+aa;break;case"bottom":j=se.top+se.height+aa;break;case"left":Q=se.left-zr.width-aa}switch(Wh){case"top":j=se.top;break;case"right":Q=se.left+se.width-zr.width;break;case"bottom":j=se.top+se.height-zr.height;break;case"left":Q=se.left;break;case"center":/left|right/.test(sa)?j=se.top+se.height/2-zr.height/2:Q=se.left+se.width/2-zr.width/2}w.$datepicker.style.cssText=`left: ${Q+oa}px; top: ${j+fl}px`}})),ue(this,"_setInputValue",(()=>{let{opts:A,$altField:H,locale:{dateFormat:j}}=this,{altFieldDateFormat:Q,altField:ie}=A;ie&&H&&(H.value=this._getInputValue(Q)),this.$el.value=this._getInputValue(j),this.$el.dispatchEvent(new Event("change"))})),ue(this,"_getInputValue",(A=>{let{selectedDates:H,opts:j}=this,{multipleDates:Q,multipleDatesSeparator:ie}=j;if(!H.length)return"";let te=typeof A=="function",se=te?A(Q?H:H[0]):H.map((Ct=>this.formatDate(Ct,A)));return se=te?se:se.join(ie),se})),ue(this,"_checkIfDateIsSelected",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,j=!1;return w.selectedDates.some((Q=>{let ie=g(A,Q,H);return j=ie&&Q,ie})),j})),ue(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ue(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ue(this,"setViewDate",(A=>{if(!((A=C(A))instanceof Date)||g(A,this.viewDate))return;let H=this.viewDate;this.viewDate=A;let{onChangeViewDate:j}=this.opts;if(j){let{month:Q,year:ie}=this.parsedViewDate;j({month:Q,year:ie,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,H)})),ue(this,"setFocusDate",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=C(A))instanceof Date)&&(w.focusDate=A,w.trigger(t.eventChangeFocusDate,A,H))})),ue(this,"setCurrentView",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w.viewIndexes.includes(A)){if(w.currentView=A,w.elIsInput&&w.visible&&w.setPosition(void 0,!0),w.trigger(t.eventChangeCurrentView,A),!w.views[A]){let j=w.views[A]=new Ne({dp:w,opts:w.opts,type:A});w.shouldUpdateDOM&&w.$content.appendChild(j.$el)}w.opts.onChangeView&&!H.silent&&w.opts.onChangeView(A)}})),ue(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ue(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:H}=this.opts,j=this.$datepicker.parentNode;j&&j.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),H&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ue(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=I({},w.opts),{silent:Q}=H;I(w.opts,A);let{timepicker:ie,buttons:te,range:se,selectedDates:Ct,isMobile:Yr}=w.opts,zr=w.visible||w.treatAsInline;w._createMinMaxDates(),w._limitViewDateByMaxMinDates(),w._handleLocale(),Ct&&(w.selectedDates=[],w.selectDate(Ct,{silent:Q})),A.view&&w.setCurrentView(A.view,{silent:Q}),w._setInputValue(),j.range&&!se?(w.rangeDateTo=!1,w.rangeDateFrom=!1):!j.range&&se&&w.selectedDates.length&&(w.rangeDateFrom=w.selectedDates[0],w.rangeDateTo=w.selectedDates[1]),j.timepicker&&!ie?(zr&&w.timepicker.destroy(),w.timepicker=!1,w.$timepicker.parentNode.removeChild(w.$timepicker)):!j.timepicker&&ie&&w._addTimepicker(),!j.buttons&&te?w._addButtons():j.buttons&&!te?(w.buttons.destroy(),w.$buttons.parentNode.removeChild(w.$buttons)):zr&&j.buttons&&te&&w.buttons.clearHtml().render(),!j.isMobile&&Yr?(w.treatAsInline||Qi||w._createMobileOverlay(),w._addMobileAttributes(),w.visible&&w._showMobileOverlay()):j.isMobile&&!Yr&&(w._removeMobileAttributes(),w.visible&&(Qi.classList.remove("-active-"),typeof w.opts.position!="function"&&w.setPosition())),zr&&(w.nav.update(),w.views[w.currentView].render(),w.currentView===t.days&&w.views[w.currentView].renderDayNames())})),ue(this,"disableDate",((A,H)=>{(Array.isArray(A)?A:[A]).forEach((j=>{let Q=C(j);if(!Q)return;let ie=H?"delete":"add";this.disabledDates[ie](this.formatDate(Q,"yyyy-MM-dd"));let te=this.getCell(Q,this.currentViewSingular);te&&te.adpCell.render()}),[])})),ue(this,"enableDate",(A=>{this.disableDate(A,!0)})),ue(this,"isDateDisabled",(A=>{let H=C(A);return this.disabledDates.has(this.formatDate(H,"yyyy-MM-dd"))})),ue(this,"isOtherMonth",(A=>{let{month:H}=p(A);return H!==this.parsedViewDate.month})),ue(this,"isOtherYear",(A=>{let{year:H}=p(A);return H!==this.parsedViewDate.year})),ue(this,"isOtherDecade",(A=>{let{year:H}=p(A),[j,Q]=f(this.viewDate);return H<j||H>Q})),ue(this,"_onChangeSelectedDate",(A=>{let{silent:H}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!H&&this._triggerOnSelect()}))})),ue(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:H}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let j=!1;H&&(j=w.isOtherMonth(A)||w.isOtherYear(A)||w.isOtherDecade(A)),j&&w.setViewDate(A),w.opts.onFocus&&w.opts.onFocus({datepicker:w,date:A})})),ue(this,"_onChangeTime",(A=>{let{hours:H,minutes:j}=A,Q=new Date,{lastSelectedDate:ie,opts:{onSelect:te}}=this,se=ie;ie||(se=Q);let Ct=this.getCell(se,this.currentViewSingular),Yr=Ct&&Ct.adpCell;Yr&&Yr.isDisabled||(se.setHours(H),se.setMinutes(j),ie?(this._setInputValue(),te&&this._triggerOnSelect()):this.selectDate(se))})),ue(this,"_onFocus",(A=>{this.visible||this.show()})),ue(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ue(this,"_onMouseDown",(A=>{this.inFocus=!0})),ue(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ue(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ue(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ue(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return Ne.getDatesFunction(A)(w)})),ue(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ue(this,"getClampedDate",(A=>{let{minDate:H,maxDate:j}=this,Q=A;return j&&v(A,j)?Q=j:H&&y(A,H)&&(Q=H),Q})),this.$el=n(x),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,E),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:D,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=C(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=D,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:x,treatAsInline:E,opts:{inline:w,isMobile:D,selectedDates:q,keyboardNav:A,onlyTimepicker:H}}=this,j=n("body");(!he||he&&Yi&&!j.contains(Yi))&&!w&&this.elIsInput&&!this.$customContainer&&ae.buildGlobalContainer(ae.defaultGlobalContainerId),!D||Qi||E||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(w||this._bindEvents(),A&&!H&&(this.keyboardNav=new uo({dp:this,opts:x}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!E&&this.show(),D&&!E&&this.$el.setAttribute("readonly",!0),E&&this._createComponents()}_createMobileOverlay(){Qi=a({className:"air-datepicker-overlay"}),Yi.appendChild(Qi)}_createComponents(){let{opts:x,treatAsInline:E,opts:{inline:w,buttons:D,timepicker:q,position:A,classes:H,onlyTimepicker:j,isMobile:Q}}=this;this._buildBaseHtml(),this.elIsInput&&(w||this._setPositionClasses(A)),!w&&this.elIsInput||this.$datepicker.classList.add("-inline-"),H&&this.$datepicker.classList.add(...H.split(" ")),j&&this.$datepicker.classList.add("-only-timepicker-"),Q&&!E&&this._addMobileAttributes(),this.views[this.currentView]=new Ne({dp:this,type:this.currentView,opts:x}),this.nav=new er({dp:this,opts:x}),q&&this._addTimepicker(),D&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let x in this.views)this.views[x].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Qi.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Qi.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:x,maxDate:E}=this.opts;this.minDate=!!x&&C(x),this.maxDate=!!E&&C(E)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new tr({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new wr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:x}=this.opts;var E,w;this.elIsInput?x?(E=this.$datepicker,(w=this.$el).parentNode.insertBefore(E,w.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:x,dateFormat:E,firstDay:w,timepicker:D,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:H}=this.opts;var j;this.locale=(j=x,JSON.parse(JSON.stringify(j))),E&&(this.locale.dateFormat=E),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Q}=this.locale;if(w!==""&&(this.locale.firstDay=w),D&&typeof E!="function"){let ie=Q?H:"";this.locale.dateFormat=[this.locale.dateFormat,Q||""].join(ie)}q&&typeof E!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(x){if(typeof x=="function")return void this.$datepicker.classList.add("-custom-position-");let E=(x=x.split(" "))[0],w=`air-datepicker -${E}-${x[1]}- -from-${E}-`;this.$datepicker.classList.add(...w.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:x,minDate:E,maxDate:w}=this;w&&v(x,w)&&this.setViewDate(w),E&&y(x,E)&&this.setViewDate(E)}formatDate(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,E=arguments.length>1?arguments[1]:void 0;if(x=C(x),!(x instanceof Date))return;let w=E,D=this.locale,q=p(x),A=q.dayPeriod,H=f(x),j=ae.replacer,Q={T:x.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:D.daysShort[q.day],EEEE:D.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:D.monthsShort[q.month],MMMM:D.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:H[0],yyyy2:H[1]};for(let[ie,te]of Object.entries(Q))w=j(w,$(ie),te);return w}down(x){this._handleUpDownActions(x,"down")}up(x){this._handleUpDownActions(x,"up")}selectDate(x){let E,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:D,parsedViewDate:q,selectedDates:A}=this,{updateTime:H,silent:j}=w,{moveToOtherMonthsOnSelect:Q,moveToOtherYearsOnSelect:ie,multipleDates:te,range:se,autoClose:Ct,onBeforeSelect:Yr}=this.opts,zr=A.length;if(Array.isArray(x))return x.forEach((yn=>{this.selectDate(yn,w)})),new Promise((yn=>{setTimeout(yn)}));if((x=C(x))instanceof Date){if(Yr&&!j&&!Yr({date:x,datepicker:this}))return Promise.resolve();if(D===t.days&&x.getMonth()!==q.month&&Q&&(E=new Date(x.getFullYear(),x.getMonth(),1)),D===t.years&&x.getFullYear()!==q.year&&ie&&(E=new Date(x.getFullYear(),0,1)),E&&this.setViewDate(E),te&&!se){if(zr===te)return;this._checkIfDateIsSelected(x)||A.push(x)}else if(se)switch(zr){case 1:A.push(x),this.rangeDateTo||(this.rangeDateTo=x),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=x),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[x],this.rangeDateFrom=x,this.rangeDateTo="";break;default:this.selectedDates=[x],this.rangeDateFrom=x}else this.selectedDates=[x];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:w?.silent,date:x,updateTime:H}),this._updateLastSelectedDate(x),Ct&&!this.timepickerIsActive&&this.visible&&(te||se?se&&zr===1&&this.hide():this.hide()),new Promise((yn=>{setTimeout(yn)}))}}unselectDate(x){let E=this.selectedDates,w=this;if((x=C(x))instanceof Date)return E.some(((D,q)=>{if(g(D,x))return E.splice(q,1),w.selectedDates.length?(w.rangeDateTo="",w.rangeDateFrom=E[0],w._updateLastSelectedDate(w.selectedDates[w.selectedDates.length-1])):(w.rangeDateFrom="",w.rangeDateTo="",w._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:x}),!0}))}replaceDate(x,E){let w=this.selectedDates.find((q=>g(q,x,this.currentView))),D=this.selectedDates.indexOf(w);D<0||g(this.selectedDates[D],E,this.currentView)||(this.selectedDates[D]=E,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:E,updateTime:!0}),this._updateLastSelectedDate(E))}clear(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:x.silent}),new Promise((E=>{setTimeout(E)}))}show(){let{onShow:x,isMobile:E}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,x&&this._scheduleCallAfterTransition(x),E&&this._showMobileOverlay()}hide(){let{onHide:x,isMobile:E}=this.opts,w=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((D=>{!this.customHide&&(D&&w||!D&&!w)&&this._finishHide(),x&&x(D)})),E&&Qi.classList.remove("-active-")}_triggerOnSelect(){let x=[],E=[],{selectedDates:w,locale:D,opts:{onSelect:q,multipleDates:A,range:H}}=this,j=A||H,Q=typeof D.dateFormat=="function";w.length&&(x=w.map(S),E=Q?A?D.dateFormat(x):x.map((ie=>D.dateFormat(ie))):x.map((ie=>this.formatDate(ie,D.dateFormat)))),q({date:j?x:x[0],formattedDate:j?E:E[0],datepicker:this})}_handleAlreadySelectedDates(x,E){let{selectedDates:w,rangeDateFrom:D,rangeDateTo:q}=this,{range:A,toggleSelected:H}=this.opts,j=w.length,Q=typeof H=="function"?H({datepicker:this,date:E}):H,ie=!!(A&&j===1&&x),te=ie?S(E):E;A&&!Q&&(j!==2&&this.selectDate(te),j===2&&g(D,q))||(Q?this.unselectDate(te):this._updateLastSelectedDate(ie?te:x))}_handleUpDownActions(x,E){if(!((x=C(x||this.focusDate||this.viewDate))instanceof Date))return;let w=E==="up"?this.viewIndex+1:this.viewIndex-1;w>2&&(w=2),w<0&&(w=0),this.setViewDate(new Date(x.getFullYear(),x.getMonth(),1)),this.setCurrentView(this.viewIndexes[w])}getCell(x){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((x=C(x))instanceof Date))return;let{year:w,month:D,date:q}=p(x),A=`[data-year="${w}"]`,H=`[data-month="${D}"]`,j={[t.day]:`${A}${H}[data-date="${q}"]`,[t.month]:`${A}${H}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(j[E]):void 0}_showMobileOverlay(){Qi.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((x,E)=>parseFloat(E)+x),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return p(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Yi}static replacer(x,E,w){return x.replace(E,(function(D,q,A,H){return q+w+H}))}}var ze;return ue(ae,"defaults",r),ue(ae,"version","3.6.0"),ue(ae,"defaultGlobalContainerId","air-datepicker-global-container"),ze=ae.prototype,Object.assign(ze,Qa),i.default})()}))});var H1=Fn((Oie,P1)=>{var zi=-1,Br=1,Yt=0;function Wl(o,i,t,r,n){if(o===i)return o?[[Yt,o]]:[];if(t!=null){var a=_8(o,i,t);if(a)return a}var s=hm(o,i),l=o.substring(0,s);o=o.substring(s),i=i.substring(s),s=np(o,i);var p=o.substring(o.length-s);o=o.substring(0,o.length-s),i=i.substring(0,i.length-s);var h=f8(o,i);return l&&h.unshift([Yt,l]),p&&h.push([Yt,p]),um(h,n),r&&v8(h),h}function f8(o,i){var t;if(!o)return[[Br,i]];if(!i)return[[zi,o]];var r=o.length>i.length?o:i,n=o.length>i.length?i:o,a=r.indexOf(n);if(a!==-1)return t=[[Br,r.substring(0,a)],[Yt,n],[Br,r.substring(a+n.length)]],o.length>i.length&&(t[0][0]=t[2][0]=zi),t;if(n.length===1)return[[zi,o],[Br,i]];var s=b8(o,i);if(s){var l=s[0],p=s[1],h=s[2],m=s[3],f=s[4],b=Wl(l,h),g=Wl(p,m);return b.concat([[Yt,f]],g)}return g8(o,i)}function g8(o,i){for(var t=o.length,r=i.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),p=new Array(s),h=0;h<s;h++)l[h]=-1,p[h]=-1;l[a+1]=0,p[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,y=0,S=0;S<n;S++){for(var T=-S+b;T<=S-g;T+=2){var N=a+T,U;T===-S||T!==S&&l[N-1]<l[N+1]?U=l[N+1]:U=l[N-1]+1;for(var I=U-T;U<t&&I<r&&o.charAt(U)===i.charAt(I);)U++,I++;if(l[N]=U,U>t)g+=2;else if(I>r)b+=2;else if(f){var C=a+m-T;if(C>=0&&C<s&&p[C]!==-1){var $=t-p[C];if(U>=$)return A1(o,i,U,I)}}}for(var L=-S+v;L<=S-y;L+=2){var C=a+L,$;L===-S||L!==S&&p[C-1]<p[C+1]?$=p[C+1]:$=p[C-1]+1;for(var W=$-L;$<t&&W<r&&o.charAt(t-$-1)===i.charAt(r-W-1);)$++,W++;if(p[C]=$,$>t)y+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var U=l[N],I=a+U-N;if($=t-$,U>=$)return A1(o,i,U,I)}}}}return[[zi,o],[Br,i]]}function A1(o,i,t,r){var n=o.substring(0,t),a=i.substring(0,r),s=o.substring(t),l=i.substring(r),p=Wl(n,a),h=Wl(s,l);return p.concat(h)}function hm(o,i){if(!o||!i||o.charAt(0)!==i.charAt(0))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(a,n)==i.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return D1(o.charCodeAt(n-1))&&n--,n}function M1(o,i){var t=o.length,r=i.length;if(t==0||r==0)return 0;t>r?o=o.substring(t-r):t<r&&(i=i.substring(0,t));var n=Math.min(t,r);if(o==i)return n;for(var a=0,s=1;;){var l=o.substring(n-s),p=i.indexOf(l);if(p==-1)return a;s+=p,(p==0||o.substring(n-s)==i.substring(0,s))&&(a=s,s++)}}function np(o,i){if(!o||!i||o.slice(-1)!==i.slice(-1))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(o.length-n,o.length-a)==i.substring(i.length-n,i.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return R1(o.charCodeAt(o.length-n))&&n--,n}function b8(o,i){var t=o.length>i.length?o:i,r=o.length>i.length?i:o;if(t.length<4||r.length*2<t.length)return null;function n(g,v,y){for(var S=g.substring(y,y+Math.floor(g.length/4)),T=-1,N="",U,I,C,$;(T=v.indexOf(S,T+1))!==-1;){var L=hm(g.substring(y),v.substring(T)),W=np(g.substring(0,y),v.substring(0,T));N.length<W+L&&(N=v.substring(T-W,T)+v.substring(T,T+L),U=g.substring(0,y-W),I=g.substring(y+L),C=v.substring(0,T-W),$=v.substring(T+L))}return N.length*2>=g.length?[U,I,C,$,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var p,h,m,f;o.length>i.length?(p=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],p=l[2],h=l[3]);var b=l[4];return[p,h,m,f,b]}function v8(o){for(var i=!1,t=[],r=0,n=null,a=0,s=0,l=0,p=0,h=0;a<o.length;)o[a][0]==Yt?(t[r++]=a,s=p,l=h,p=0,h=0,n=o[a][1]):(o[a][0]==Br?p+=o[a][1].length:h+=o[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(p,h)&&(o.splice(t[r-1],0,[zi,n]),o[t[r-1]+1][0]=Br,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,p=0,h=0,n=null,i=!0)),a++;for(i&&um(o),w8(o),a=1;a<o.length;){if(o[a-1][0]==zi&&o[a][0]==Br){var m=o[a-1][1],f=o[a][1],b=M1(m,f),g=M1(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(o.splice(a,0,[Yt,f.substring(0,b)]),o[a-1][1]=m.substring(0,m.length-b),o[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(o.splice(a,0,[Yt,m.substring(0,g)]),o[a-1][0]=Br,o[a-1][1]=f.substring(0,f.length-g),o[a+1][0]=zi,o[a+1][1]=m.substring(g),a++),a++}a++}}var L1=/[^a-zA-Z0-9]/,q1=/\s/,I1=/[\r\n]/,y8=/\n\r?\n$/,x8=/^\r?\n\r?\n/;function w8(o){function i(g,v){if(!g||!v)return 6;var y=g.charAt(g.length-1),S=v.charAt(0),T=y.match(L1),N=S.match(L1),U=T&&y.match(q1),I=N&&S.match(q1),C=U&&y.match(I1),$=I&&S.match(I1),L=C&&g.match(y8),W=$&&v.match(x8);return L||W?5:C||$?4:T&&!U&&I?3:U||I?2:T||N?1:0}for(var t=1;t<o.length-1;){if(o[t-1][0]==Yt&&o[t+1][0]==Yt){var r=o[t-1][1],n=o[t][1],a=o[t+1][1],s=np(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var p=r,h=n,m=a,f=i(r,n)+i(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=i(r,n)+i(n,a);b>=f&&(f=b,p=r,h=n,m=a)}o[t-1][1]!=p&&(p?o[t-1][1]=p:(o.splice(t-1,1),t--),o[t][1]=h,m?o[t+1][1]=m:(o.splice(t+1,1),t--))}t++}}function um(o,i){o.push([Yt,""]);for(var t=0,r=0,n=0,a="",s="",l;t<o.length;){if(t<o.length-1&&!o[t][1]){o.splice(t,1);continue}switch(o[t][0]){case Br:n++,s+=o[t][1],t++;break;case zi:r++,a+=o[t][1],t++;break;case Yt:var p=t-n-r-1;if(i){if(p>=0&&O1(o[p][1])){var h=o[p][1].slice(-1);if(o[p][1]=o[p][1].slice(0,-1),a=h+a,s=h+s,!o[p][1]){o.splice(p,1),t--;var m=p-1;o[m]&&o[m][0]===Br&&(n++,s=o[m][1]+s,m--),o[m]&&o[m][0]===zi&&(r++,a=o[m][1]+a,m--),p=m}}if(N1(o[t][1])){var h=o[t][1].charAt(0);o[t][1]=o[t][1].slice(1),a+=h,s+=h}}if(t<o.length-1&&!o[t][1]){o.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=hm(s,a),l!==0&&(p>=0?o[p][1]+=s.substring(0,l):(o.splice(0,0,[Yt,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=np(s,a),l!==0&&(o[t][1]=s.substring(s.length-l)+o[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(o.splice(t-f,f),t=t-f):a.length===0?(o.splice(t-f,f,[Br,s]),t=t-f+1):s.length===0?(o.splice(t-f,f,[zi,a]),t=t-f+1):(o.splice(t-f,f,[zi,a],[Br,s]),t=t-f+2)}t!==0&&o[t-1][0]===Yt?(o[t-1][1]+=o[t][1],o.splice(t,1)):t++,n=0,r=0,a="",s="";break}}o[o.length-1][1]===""&&o.pop();var b=!1;for(t=1;t<o.length-1;)o[t-1][0]===Yt&&o[t+1][0]===Yt&&(o[t][1].substring(o[t][1].length-o[t-1][1].length)===o[t-1][1]?(o[t][1]=o[t-1][1]+o[t][1].substring(0,o[t][1].length-o[t-1][1].length),o[t+1][1]=o[t-1][1]+o[t+1][1],o.splice(t-1,1),b=!0):o[t][1].substring(0,o[t+1][1].length)==o[t+1][1]&&(o[t-1][1]+=o[t+1][1],o[t][1]=o[t][1].substring(o[t+1][1].length)+o[t+1][1],o.splice(t+1,1),b=!0)),t++;b&&um(o,i)}function D1(o){return o>=55296&&o<=56319}function R1(o){return o>=56320&&o<=57343}function N1(o){return R1(o.charCodeAt(0))}function O1(o){return D1(o.charCodeAt(o.length-1))}function z8(o){for(var i=[],t=0;t<o.length;t++)o[t][1].length>0&&i.push(o[t]);return i}function pm(o,i,t,r){return O1(o)||N1(r)?null:z8([[Yt,o],[zi,i],[Br,t],[Yt,r]])}function _8(o,i,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=o.length,s=i.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,p=o.slice(0,l),h=o.slice(l),m=n?n.index:null;e:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break e;var b=i.slice(0,f),g=i.slice(f);if(g!==h)break e;var v=Math.min(l,f),y=p.slice(0,v),S=b.slice(0,v);if(y!==S)break e;var T=p.slice(v),N=b.slice(v);return pm(y,T,N,h)}e:{if(m!==null&&m!==l)break e;var U=l,b=i.slice(0,U),g=i.slice(U);if(b!==p)break e;var I=Math.min(a-U,s-U),C=h.slice(h.length-I),$=g.slice(g.length-I);if(C!==$)break e;var T=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return pm(p,T,N,C)}}if(r.length>0&&n&&n.length===0)e:{var y=o.slice(0,r.index),C=o.slice(r.index+r.length),v=y.length,I=C.length;if(s<v+I)break e;var S=i.slice(0,v),$=i.slice(s-I);if(y!==S||C!==$)break e;var T=o.slice(v,a-I),N=i.slice(v,s-I);return pm(y,T,N,C)}return null}function op(o,i,t,r){return Wl(o,i,t,r,!0)}op.INSERT=Br;op.DELETE=zi;op.EQUAL=Yt;P1.exports=op});var Tm=Fn((Kl,ys)=>{var k8=200,J1="__lodash_hash_undefined__",Z1=9007199254740991,wm="[object Arguments]",C8="[object Array]",ey="[object Boolean]",ty="[object Date]",S8="[object Error]",zm="[object Function]",ry="[object GeneratorFunction]",ap="[object Map]",iy="[object Number]",_m="[object Object]",F1="[object Promise]",ny="[object RegExp]",sp="[object Set]",oy="[object String]",ay="[object Symbol]",fm="[object WeakMap]",sy="[object ArrayBuffer]",lp="[object DataView]",ly="[object Float32Array]",cy="[object Float64Array]",dy="[object Int8Array]",py="[object Int16Array]",hy="[object Int32Array]",uy="[object Uint8Array]",my="[object Uint8ClampedArray]",fy="[object Uint16Array]",gy="[object Uint32Array]",E8=/[\\^$.*+?()[\]{}|]/g,T8=/\w*$/,$8=/^\[object .+?Constructor\]$/,A8=/^(?:0|[1-9]\d*)$/,et={};et[wm]=et[C8]=et[sy]=et[lp]=et[ey]=et[ty]=et[ly]=et[cy]=et[dy]=et[py]=et[hy]=et[ap]=et[iy]=et[_m]=et[ny]=et[sp]=et[oy]=et[ay]=et[uy]=et[my]=et[fy]=et[gy]=!0;et[S8]=et[zm]=et[fm]=!1;var M8=typeof global=="object"&&global&&global.Object===Object&&global,L8=typeof self=="object"&&self&&self.Object===Object&&self,Kn=M8||L8||Function("return this")(),by=typeof Kl=="object"&&Kl&&!Kl.nodeType&&Kl,B1=by&&typeof ys=="object"&&ys&&!ys.nodeType&&ys,q8=B1&&B1.exports===by;function I8(o,i){return o.set(i[0],i[1]),o}function D8(o,i){return o.add(i),o}function R8(o,i){for(var t=-1,r=o?o.length:0;++t<r&&i(o[t],t,o)!==!1;);return o}function N8(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function vy(o,i,t,r){var n=-1,a=o?o.length:0;for(r&&a&&(t=o[++n]);++n<a;)t=i(t,o[n],n,o);return t}function O8(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function P8(o,i){return o?.[i]}function yy(o){var i=!1;if(o!=null&&typeof o.toString!="function")try{i=!!(o+"")}catch{}return i}function V1(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function km(o,i){return function(t){return o(i(t))}}function U1(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var H8=Array.prototype,F8=Function.prototype,cp=Object.prototype,mm=Kn["__core-js_shared__"],j1=(function(){var o=/[^.]+$/.exec(mm&&mm.keys&&mm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),xy=F8.toString,$o=cp.hasOwnProperty,dp=cp.toString,B8=RegExp("^"+xy.call($o).replace(E8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G1=q8?Kn.Buffer:void 0,W1=Kn.Symbol,K1=Kn.Uint8Array,V8=km(Object.getPrototypeOf,Object),U8=Object.create,j8=cp.propertyIsEnumerable,G8=H8.splice,Y1=Object.getOwnPropertySymbols,W8=G1?G1.isBuffer:void 0,K8=km(Object.keys,Object),gm=zs(Kn,"DataView"),Yl=zs(Kn,"Map"),bm=zs(Kn,"Promise"),vm=zs(Kn,"Set"),ym=zs(Kn,"WeakMap"),Ql=zs(Object,"create"),Y8=Ta(gm),Q8=Ta(Yl),X8=Ta(bm),J8=Ta(vm),Z8=Ta(ym),Q1=W1?W1.prototype:void 0,X1=Q1?Q1.valueOf:void 0;function Ea(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function e9(){this.__data__=Ql?Ql(null):{}}function t9(o){return this.has(o)&&delete this.__data__[o]}function r9(o){var i=this.__data__;if(Ql){var t=i[o];return t===J1?void 0:t}return $o.call(i,o)?i[o]:void 0}function i9(o){var i=this.__data__;return Ql?i[o]!==void 0:$o.call(i,o)}function n9(o,i){var t=this.__data__;return t[o]=Ql&&i===void 0?J1:i,this}Ea.prototype.clear=e9;Ea.prototype.delete=t9;Ea.prototype.get=r9;Ea.prototype.has=i9;Ea.prototype.set=n9;function Yn(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function o9(){this.__data__=[]}function a9(o){var i=this.__data__,t=pp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():G8.call(i,t,1),!0}function s9(o){var i=this.__data__,t=pp(i,o);return t<0?void 0:i[t][1]}function l9(o){return pp(this.__data__,o)>-1}function c9(o,i){var t=this.__data__,r=pp(t,o);return r<0?t.push([o,i]):t[r][1]=i,this}Yn.prototype.clear=o9;Yn.prototype.delete=a9;Yn.prototype.get=s9;Yn.prototype.has=l9;Yn.prototype.set=c9;function xs(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function d9(){this.__data__={hash:new Ea,map:new(Yl||Yn),string:new Ea}}function p9(o){return hp(this,o).delete(o)}function h9(o){return hp(this,o).get(o)}function u9(o){return hp(this,o).has(o)}function m9(o,i){return hp(this,o).set(o,i),this}xs.prototype.clear=d9;xs.prototype.delete=p9;xs.prototype.get=h9;xs.prototype.has=u9;xs.prototype.set=m9;function ws(o){this.__data__=new Yn(o)}function f9(){this.__data__=new Yn}function g9(o){return this.__data__.delete(o)}function b9(o){return this.__data__.get(o)}function v9(o){return this.__data__.has(o)}function y9(o,i){var t=this.__data__;if(t instanceof Yn){var r=t.__data__;if(!Yl||r.length<k8-1)return r.push([o,i]),this;t=this.__data__=new xs(r)}return t.set(o,i),this}ws.prototype.clear=f9;ws.prototype.delete=g9;ws.prototype.get=b9;ws.prototype.has=v9;ws.prototype.set=y9;function x9(o,i){var t=Sm(o)||U9(o)?O8(o.length,String):[],r=t.length,n=!!r;for(var a in o)(i||$o.call(o,a))&&!(n&&(a=="length"||H9(a,r)))&&t.push(a);return t}function wy(o,i,t){var r=o[i];(!($o.call(o,i)&&Cy(r,t))||t===void 0&&!(i in o))&&(o[i]=t)}function pp(o,i){for(var t=o.length;t--;)if(Cy(o[t][0],i))return t;return-1}function w9(o,i){return o&&zy(i,Em(i),o)}function xm(o,i,t,r,n,a,s){var l;if(r&&(l=a?r(o,n,a,s):r(o)),l!==void 0)return l;if(!up(o))return o;var p=Sm(o);if(p){if(l=N9(o),!i)return I9(o,l)}else{var h=Sa(o),m=h==zm||h==ry;if(G9(o))return E9(o,i);if(h==_m||h==wm||m&&!a){if(yy(o))return a?o:{};if(l=O9(m?{}:o),!i)return D9(o,w9(l,o))}else{if(!et[h])return a?o:{};l=P9(o,h,xm,i)}}s||(s=new ws);var f=s.get(o);if(f)return f;if(s.set(o,l),!p)var b=t?R9(o):Em(o);return R8(b||o,function(g,v){b&&(v=g,g=o[v]),wy(l,v,xm(g,i,t,r,v,o,s))}),l}function z9(o){return up(o)?U8(o):{}}function _9(o,i,t){var r=i(o);return Sm(o)?r:N8(r,t(o))}function k9(o){return dp.call(o)}function C9(o){if(!up(o)||B9(o))return!1;var i=Ey(o)||yy(o)?B8:$8;return i.test(Ta(o))}function S9(o){if(!ky(o))return K8(o);var i=[];for(var t in Object(o))$o.call(o,t)&&t!="constructor"&&i.push(t);return i}function E9(o,i){if(i)return o.slice();var t=new o.constructor(o.length);return o.copy(t),t}function Cm(o){var i=new o.constructor(o.byteLength);return new K1(i).set(new K1(o)),i}function T9(o,i){var t=i?Cm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}function $9(o,i,t){var r=i?t(V1(o),!0):V1(o);return vy(r,I8,new o.constructor)}function A9(o){var i=new o.constructor(o.source,T8.exec(o));return i.lastIndex=o.lastIndex,i}function M9(o,i,t){var r=i?t(U1(o),!0):U1(o);return vy(r,D8,new o.constructor)}function L9(o){return X1?Object(X1.call(o)):{}}function q9(o,i){var t=i?Cm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function I9(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}function zy(o,i,t,r){t||(t={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(t[s],o[s],s,t,o):void 0;wy(t,s,l===void 0?o[s]:l)}return t}function D9(o,i){return zy(o,_y(o),i)}function R9(o){return _9(o,Em,_y)}function hp(o,i){var t=o.__data__;return F9(i)?t[typeof i=="string"?"string":"hash"]:t.map}function zs(o,i){var t=P8(o,i);return C9(t)?t:void 0}var _y=Y1?km(Y1,Object):Y9,Sa=k9;(gm&&Sa(new gm(new ArrayBuffer(1)))!=lp||Yl&&Sa(new Yl)!=ap||bm&&Sa(bm.resolve())!=F1||vm&&Sa(new vm)!=sp||ym&&Sa(new ym)!=fm)&&(Sa=function(o){var i=dp.call(o),t=i==_m?o.constructor:void 0,r=t?Ta(t):void 0;if(r)switch(r){case Y8:return lp;case Q8:return ap;case X8:return F1;case J8:return sp;case Z8:return fm}return i});function N9(o){var i=o.length,t=o.constructor(i);return i&&typeof o[0]=="string"&&$o.call(o,"index")&&(t.index=o.index,t.input=o.input),t}function O9(o){return typeof o.constructor=="function"&&!ky(o)?z9(V8(o)):{}}function P9(o,i,t,r){var n=o.constructor;switch(i){case sy:return Cm(o);case ey:case ty:return new n(+o);case lp:return T9(o,r);case ly:case cy:case dy:case py:case hy:case uy:case my:case fy:case gy:return q9(o,r);case ap:return $9(o,r,t);case iy:case oy:return new n(o);case ny:return A9(o);case sp:return M9(o,r,t);case ay:return L9(o)}}function H9(o,i){return i=i??Z1,!!i&&(typeof o=="number"||A8.test(o))&&o>-1&&o%1==0&&o<i}function F9(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function B9(o){return!!j1&&j1 in o}function ky(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||cp;return o===t}function Ta(o){if(o!=null){try{return xy.call(o)}catch{}try{return o+""}catch{}}return""}function V9(o){return xm(o,!0,!0)}function Cy(o,i){return o===i||o!==o&&i!==i}function U9(o){return j9(o)&&$o.call(o,"callee")&&(!j8.call(o,"callee")||dp.call(o)==wm)}var Sm=Array.isArray;function Sy(o){return o!=null&&W9(o.length)&&!Ey(o)}function j9(o){return K9(o)&&Sy(o)}var G9=W8||Q9;function Ey(o){var i=up(o)?dp.call(o):"";return i==zm||i==ry}function W9(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Z1}function up(o){var i=typeof o;return!!o&&(i=="object"||i=="function")}function K9(o){return!!o&&typeof o=="object"}function Em(o){return Sy(o)?x9(o):S9(o)}function Y9(){return[]}function Q9(){return!1}ys.exports=V9});var Hm=Fn((Xl,ks)=>{var X9=200,Pm="__lodash_hash_undefined__",wp=1,Py=2,Hy=9007199254740991,mp="[object Arguments]",Lm="[object Array]",J9="[object AsyncFunction]",Fy="[object Boolean]",By="[object Date]",Vy="[object Error]",Uy="[object Function]",Z9="[object GeneratorFunction]",fp="[object Map]",jy="[object Number]",e6="[object Null]",_s="[object Object]",Ty="[object Promise]",t6="[object Proxy]",Gy="[object RegExp]",gp="[object Set]",Wy="[object String]",r6="[object Symbol]",i6="[object Undefined]",qm="[object WeakMap]",Ky="[object ArrayBuffer]",bp="[object DataView]",n6="[object Float32Array]",o6="[object Float64Array]",a6="[object Int8Array]",s6="[object Int16Array]",l6="[object Int32Array]",c6="[object Uint8Array]",d6="[object Uint8ClampedArray]",p6="[object Uint16Array]",h6="[object Uint32Array]",u6=/[\\^$.*+?()[\]{}|]/g,m6=/^\[object .+?Constructor\]$/,f6=/^(?:0|[1-9]\d*)$/,st={};st[n6]=st[o6]=st[a6]=st[s6]=st[l6]=st[c6]=st[d6]=st[p6]=st[h6]=!0;st[mp]=st[Lm]=st[Ky]=st[Fy]=st[bp]=st[By]=st[Vy]=st[Uy]=st[fp]=st[jy]=st[_s]=st[Gy]=st[gp]=st[Wy]=st[qm]=!1;var Yy=typeof global=="object"&&global&&global.Object===Object&&global,g6=typeof self=="object"&&self&&self.Object===Object&&self,Qn=Yy||g6||Function("return this")(),Qy=typeof Xl=="object"&&Xl&&!Xl.nodeType&&Xl,$y=Qy&&typeof ks=="object"&&ks&&!ks.nodeType&&ks,Xy=$y&&$y.exports===Qy,$m=Xy&&Yy.process,Ay=(function(){try{return $m&&$m.binding&&$m.binding("util")}catch{}})(),My=Ay&&Ay.isTypedArray;function b6(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}function v6(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function y6(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}function x6(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function w6(o){return function(i){return o(i)}}function z6(o,i){return o.has(i)}function _6(o,i){return o?.[i]}function k6(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function C6(o,i){return function(t){return o(i(t))}}function S6(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var E6=Array.prototype,T6=Function.prototype,zp=Object.prototype,Am=Qn["__core-js_shared__"],Jy=T6.toString,$n=zp.hasOwnProperty,Ly=(function(){var o=/[^.]+$/.exec(Am&&Am.keys&&Am.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Zy=zp.toString,$6=RegExp("^"+Jy.call($n).replace(u6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qy=Xy?Qn.Buffer:void 0,vp=Qn.Symbol,Iy=Qn.Uint8Array,ex=zp.propertyIsEnumerable,A6=E6.splice,$a=vp?vp.toStringTag:void 0,Dy=Object.getOwnPropertySymbols,M6=qy?qy.isBuffer:void 0,L6=C6(Object.keys,Object),Im=Cs(Qn,"DataView"),Jl=Cs(Qn,"Map"),Dm=Cs(Qn,"Promise"),Rm=Cs(Qn,"Set"),Nm=Cs(Qn,"WeakMap"),Zl=Cs(Object,"create"),q6=La(Im),I6=La(Jl),D6=La(Dm),R6=La(Rm),N6=La(Nm),Ry=vp?vp.prototype:void 0,Mm=Ry?Ry.valueOf:void 0;function Aa(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function O6(){this.__data__=Zl?Zl(null):{},this.size=0}function P6(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}function H6(o){var i=this.__data__;if(Zl){var t=i[o];return t===Pm?void 0:t}return $n.call(i,o)?i[o]:void 0}function F6(o){var i=this.__data__;return Zl?i[o]!==void 0:$n.call(i,o)}function B6(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Zl&&i===void 0?Pm:i,this}Aa.prototype.clear=O6;Aa.prototype.delete=P6;Aa.prototype.get=H6;Aa.prototype.has=F6;Aa.prototype.set=B6;function Xn(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function V6(){this.__data__=[],this.size=0}function U6(o){var i=this.__data__,t=_p(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():A6.call(i,t,1),--this.size,!0}function j6(o){var i=this.__data__,t=_p(i,o);return t<0?void 0:i[t][1]}function G6(o){return _p(this.__data__,o)>-1}function W6(o,i){var t=this.__data__,r=_p(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}Xn.prototype.clear=V6;Xn.prototype.delete=U6;Xn.prototype.get=j6;Xn.prototype.has=G6;Xn.prototype.set=W6;function Ma(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function K6(){this.size=0,this.__data__={hash:new Aa,map:new(Jl||Xn),string:new Aa}}function Y6(o){var i=kp(this,o).delete(o);return this.size-=i?1:0,i}function Q6(o){return kp(this,o).get(o)}function X6(o){return kp(this,o).has(o)}function J6(o,i){var t=kp(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}Ma.prototype.clear=K6;Ma.prototype.delete=Y6;Ma.prototype.get=Q6;Ma.prototype.has=X6;Ma.prototype.set=J6;function yp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Ma;++i<t;)this.add(o[i])}function Z6(o){return this.__data__.set(o,Pm),this}function eC(o){return this.__data__.has(o)}yp.prototype.add=yp.prototype.push=Z6;yp.prototype.has=eC;function Mo(o){var i=this.__data__=new Xn(o);this.size=i.size}function tC(){this.__data__=new Xn,this.size=0}function rC(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}function iC(o){return this.__data__.get(o)}function nC(o){return this.__data__.has(o)}function oC(o,i){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!Jl||r.length<X9-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Ma(r)}return t.set(o,i),this.size=t.size,this}Mo.prototype.clear=tC;Mo.prototype.delete=rC;Mo.prototype.get=iC;Mo.prototype.has=nC;Mo.prototype.set=oC;function aC(o,i){var t=xp(o),r=!t&&wC(o),n=!t&&!r&&Om(o),a=!t&&!r&&!n&&sx(o),s=t||r||n||a,l=s?x6(o.length,String):[],p=l.length;for(var h in o)(i||$n.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||gC(h,p)))&&l.push(h);return l}function _p(o,i){for(var t=o.length;t--;)if(ix(o[t][0],i))return t;return-1}function sC(o,i,t){var r=i(o);return xp(o)?r:v6(r,t(o))}function tc(o){return o==null?o===void 0?i6:e6:$a&&$a in Object(o)?mC(o):xC(o)}function Ny(o){return ec(o)&&tc(o)==mp}function tx(o,i,t,r,n){return o===i?!0:o==null||i==null||!ec(o)&&!ec(i)?o!==o&&i!==i:lC(o,i,t,r,tx,n)}function lC(o,i,t,r,n,a){var s=xp(o),l=xp(i),p=s?Lm:Ao(o),h=l?Lm:Ao(i);p=p==mp?_s:p,h=h==mp?_s:h;var m=p==_s,f=h==_s,b=p==h;if(b&&Om(o)){if(!Om(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new Mo),s||sx(o)?rx(o,i,t,r,n,a):hC(o,i,p,t,r,n,a);if(!(t&wp)){var g=m&&$n.call(o,"__wrapped__"),v=f&&$n.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new Mo),n(y,S,t,r,a)}}return b?(a||(a=new Mo),uC(o,i,t,r,n,a)):!1}function cC(o){if(!ax(o)||vC(o))return!1;var i=nx(o)?$6:m6;return i.test(La(o))}function dC(o){return ec(o)&&ox(o.length)&&!!st[tc(o)]}function pC(o){if(!yC(o))return L6(o);var i=[];for(var t in Object(o))$n.call(o,t)&&t!="constructor"&&i.push(t);return i}function rx(o,i,t,r,n,a){var s=t&wp,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o);if(h&&a.get(i))return h==i;var m=-1,f=!0,b=t&Py?new yp:void 0;for(a.set(o,i),a.set(i,o);++m<l;){var g=o[m],v=i[m];if(r)var y=s?r(v,g,m,i,o,a):r(g,v,m,o,i,a);if(y!==void 0){if(y)continue;f=!1;break}if(b){if(!y6(i,function(S,T){if(!z6(b,T)&&(g===S||n(g,S,t,r,a)))return b.push(T)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(o),a.delete(i),f}function hC(o,i,t,r,n,a,s){switch(t){case bp:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case Ky:return!(o.byteLength!=i.byteLength||!a(new Iy(o),new Iy(i)));case Fy:case By:case jy:return ix(+o,+i);case Vy:return o.name==i.name&&o.message==i.message;case Gy:case Wy:return o==i+"";case fp:var l=k6;case gp:var p=r&wp;if(l||(l=S6),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=Py,s.set(o,i);var m=rx(l(o),l(i),r,n,a,s);return s.delete(o),m;case r6:if(Mm)return Mm.call(o)==Mm.call(i)}return!1}function uC(o,i,t,r,n,a){var s=t&wp,l=Oy(o),p=l.length,h=Oy(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:$n.call(i,b)))return!1}var g=a.get(o);if(g&&a.get(i))return g==i;var v=!0;a.set(o,i),a.set(i,o);for(var y=s;++f<p;){b=l[f];var S=o[b],T=i[b];if(r)var N=s?r(T,S,b,i,o,a):r(S,T,b,o,i,a);if(!(N===void 0?S===T||n(S,T,t,r,a):N)){v=!1;break}y||(y=b=="constructor")}if(v&&!y){var U=o.constructor,I=i.constructor;U!=I&&"constructor"in o&&"constructor"in i&&!(typeof U=="function"&&U instanceof U&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(o),a.delete(i),v}function Oy(o){return sC(o,kC,fC)}function kp(o,i){var t=o.__data__;return bC(i)?t[typeof i=="string"?"string":"hash"]:t.map}function Cs(o,i){var t=_6(o,i);return cC(t)?t:void 0}function mC(o){var i=$n.call(o,$a),t=o[$a];try{o[$a]=void 0;var r=!0}catch{}var n=Zy.call(o);return r&&(i?o[$a]=t:delete o[$a]),n}var fC=Dy?function(o){return o==null?[]:(o=Object(o),b6(Dy(o),function(i){return ex.call(o,i)}))}:CC,Ao=tc;(Im&&Ao(new Im(new ArrayBuffer(1)))!=bp||Jl&&Ao(new Jl)!=fp||Dm&&Ao(Dm.resolve())!=Ty||Rm&&Ao(new Rm)!=gp||Nm&&Ao(new Nm)!=qm)&&(Ao=function(o){var i=tc(o),t=i==_s?o.constructor:void 0,r=t?La(t):"";if(r)switch(r){case q6:return bp;case I6:return fp;case D6:return Ty;case R6:return gp;case N6:return qm}return i});function gC(o,i){return i=i??Hy,!!i&&(typeof o=="number"||f6.test(o))&&o>-1&&o%1==0&&o<i}function bC(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function vC(o){return!!Ly&&Ly in o}function yC(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||zp;return o===t}function xC(o){return Zy.call(o)}function La(o){if(o!=null){try{return Jy.call(o)}catch{}try{return o+""}catch{}}return""}function ix(o,i){return o===i||o!==o&&i!==i}var wC=Ny((function(){return arguments})())?Ny:function(o){return ec(o)&&$n.call(o,"callee")&&!ex.call(o,"callee")},xp=Array.isArray;function zC(o){return o!=null&&ox(o.length)&&!nx(o)}var Om=M6||SC;function _C(o,i){return tx(o,i)}function nx(o){if(!ax(o))return!1;var i=tc(o);return i==Uy||i==Z9||i==J9||i==t6}function ox(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Hy}function ax(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}function ec(o){return o!=null&&typeof o=="object"}var sx=My?w6(My):dC;function kC(o){return zC(o)?aC(o):pC(o)}function CC(){return[]}function SC(){return!1}ks.exports=_C});var lx=Fn(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var EC=Tm(),TC=Hm(),Fm;(function(o){function i(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let p=EC(s);l||(p=Object.keys(p).reduce((h,m)=>(p[m]!=null&&(h[m]=p[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(p[h]=a[h]);return Object.keys(p).length>0?p:void 0}o.compose=i;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((p,h)=>(TC(a[h],s[h])||(p[h]=s[h]===void 0?null:s[h]),p),{});return Object.keys(l).length>0?l:void 0}o.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((p,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(p[h]=s[h]),p),{});return Object.keys(a).reduce((p,h)=>(a[h]!==s[h]&&s[h]===void 0&&(p[h]=null),p),l)}o.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let p=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(p).length>0?p:void 0}o.transform=n})(Fm||(Fm={}));Bm.default=Fm});var jm=Fn(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var Vm;(function(o){function i(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}o.length=i})(Vm||(Vm={}));Um.default=Vm});var dx=Fn(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});var cx=jm(),Gm=class{constructor(i){this.ops=i,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(i){i||(i=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=cx.default.length(t);if(i>=n-r?(i=n-r,this.index+=1,this.offset=0):this.offset+=i,typeof t.delete=="number")return{delete:i};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=i:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,i):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?cx.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let i=this.ops[this.index];return i?typeof i.delete=="number"?"delete":typeof i.retain=="number"||typeof i.retain=="object"&&i.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let i=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=i,this.index=t,[r].concat(n)}}else return[]}};Wm.default=Gm});var ei=Fn((Zn,Sp)=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.AttributeMap=Zn.OpIterator=Zn.Op=void 0;var Cp=H1(),$C=Tm(),Km=Hm(),qa=lx();Zn.AttributeMap=qa.default;var Jn=jm();Zn.Op=Jn.default;var Ni=dx();Zn.OpIterator=Ni.default;var AC="\0",px=(o,i)=>{if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);let t=Object.keys(o)[0];if(!t||t!==Object.keys(i)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(i)[0]}`);return[t,o[t],i[t]]},eo=class o{constructor(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}static registerEmbed(i,t){this.handlers[i]=t}static unregisterEmbed(i){delete this.handlers[i]}static getHandler(i){let t=this.handlers[i];if(!t)throw new Error(`no handlers for embed type "${i}"`);return t}insert(i,t){let r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(i){return i<=0?this:this.push({delete:i})}retain(i,t){if(typeof i=="number"&&i<=0)return this;let r={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(i){let t=this.ops.length,r=this.ops[t-1];if(i=$C(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(i),this;if(Km(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this}}return t===this.ops.length?this.ops.push(i):this.ops.splice(t,0,i),this}chop(){let i=this.ops[this.ops.length-1];return i&&typeof i.retain=="number"&&!i.attributes&&this.ops.pop(),this}filter(i){return this.ops.filter(i)}forEach(i){this.ops.forEach(i)}map(i){return this.ops.map(i)}partition(i){let t=[],r=[];return this.forEach(n=>{(i(n)?t:r).push(n)}),[t,r]}reduce(i,t){return this.ops.reduce(i,t)}changeLength(){return this.reduce((i,t)=>t.insert?i+Jn.default.length(t):t.delete?i-t.delete:i,0)}length(){return this.reduce((i,t)=>i+Jn.default.length(t),0)}slice(i=0,t=1/0){let r=[],n=new Ni.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<i?s=n.next(i-a):(s=n.next(t-a),r.push(s)),a+=Jn.default.length(s)}return new o(r)}compose(i){let t=new Ni.default(this.ops),r=new Ni.default(i.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new o(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),p=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof p.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")p.retain==null?m.insert=p.insert:m.retain=p.retain;else{let b=p.retain==null?"insert":"retain",[g,v,y]=px(p[b],h.retain),S=o.getHandler(g);m[b]={[g]:S.compose(v,y,b==="retain")}}let f=qa.default.compose(p.attributes,h.attributes,typeof p.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&Km(s.ops[s.ops.length-1],m)){let b=new o(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof p.retain=="number"||typeof p.retain=="object"&&p.retain!==null)&&s.push(h)}return s.chop()}concat(i){let t=new o(this.ops.slice());return i.ops.length>0&&(t.push(i.ops[0]),t.ops=t.ops.concat(i.ops.slice(1))),t}diff(i,t){if(this.ops===i.ops)return new o;let r=[this,i].map(p=>p.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:AC;let m=p===i?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new o,a=Cp(r[0],r[1],t,!0),s=new Ni.default(this.ops),l=new Ni.default(i.ops);return a.forEach(p=>{let h=p[1].length;for(;h>0;){let m=0;switch(p[0]){case Cp.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case Cp.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case Cp.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);Km(f.insert,b.insert)?n.retain(m,qa.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(i,t=`
2
- `){let r=new Ni.default(this.ops),n=new o,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Jn.default.length(s)-r.peekLength(),p=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(p<0)n.push(r.next());else if(p>0)n.push(r.next(p));else{if(i(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new o}}n.length()>0&&i(n,{},a)}invert(i){let t=new o;return this.reduce((r,n)=>{if(n.insert)t.delete(Jn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return i.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Jn.default.length(l),qa.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=i.slice(r,r+1),s=new Ni.default(a.ops).next(),[l,p,h]=px(n.retain,s.insert),m=o.getHandler(l);return t.retain({[l]:m.invert(p,h)},qa.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(i,t=!1){if(t=!!t,typeof i=="number")return this.transformPosition(i,t);let r=i,n=new Ni.default(this.ops),a=new Ni.default(r.ops),s=new o;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Jn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),p=n.next(l),h=a.next(l);if(p.delete)continue;if(h.delete)s.push(h);else{let m=p.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=o.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,qa.default.transform(p.attributes,h.attributes,t))}}return s.chop()}transformPosition(i,t=!1){t=!!t;let r=new Ni.default(this.ops),n=0;for(;r.hasNext()&&n<=i;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){i-=Math.min(a,i-n);continue}else s==="insert"&&(n<i||!t)&&(i+=a);n+=a}return i}};eo.Op=Jn.default;eo.OpIterator=Ni.default;eo.AttributeMap=qa.default;eo.handlers={};Zn.default=eo;typeof Sp=="object"&&(Sp.exports=eo,Sp.exports.default=eo)});var Ez=Fn((Npe,mf)=>{"use strict";var hA=Object.prototype.hasOwnProperty,Ur="~";function hc(){}Object.create&&(hc.prototype=Object.create(null),new hc().__proto__||(Ur=!1));function uA(o,i,t){this.fn=o,this.context=i,this.once=t||!1}function Sz(o,i,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new uA(t,r||o,n),s=Ur?Ur+i:i;return o._events[s]?o._events[s].fn?o._events[s]=[o._events[s],a]:o._events[s].push(a):(o._events[s]=a,o._eventsCount++),o}function Zp(o,i){--o._eventsCount===0?o._events=new hc:delete o._events[i]}function qr(){this._events=new hc,this._eventsCount=0}qr.prototype.eventNames=function(){var i=[],t,r;if(this._eventsCount===0)return i;for(r in t=this._events)hA.call(t,r)&&i.push(Ur?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i};qr.prototype.listeners=function(i){var t=Ur?Ur+i:i,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};qr.prototype.listenerCount=function(i){var t=Ur?Ur+i:i,r=this._events[t];return r?r.fn?1:r.length:0};qr.prototype.emit=function(i,t,r,n,a,s){var l=Ur?Ur+i:i;if(!this._events[l])return!1;var p=this._events[l],h=arguments.length,m,f;if(p.fn){switch(p.once&&this.removeListener(i,p.fn,void 0,!0),h){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,t),!0;case 3:return p.fn.call(p.context,t,r),!0;case 4:return p.fn.call(p.context,t,r,n),!0;case 5:return p.fn.call(p.context,t,r,n,a),!0;case 6:return p.fn.call(p.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];p.fn.apply(p.context,m)}else{var b=p.length,g;for(f=0;f<b;f++)switch(p[f].once&&this.removeListener(i,p[f].fn,void 0,!0),h){case 1:p[f].fn.call(p[f].context);break;case 2:p[f].fn.call(p[f].context,t);break;case 3:p[f].fn.call(p[f].context,t,r);break;case 4:p[f].fn.call(p[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];p[f].fn.apply(p[f].context,m)}}return!0};qr.prototype.on=function(i,t,r){return Sz(this,i,t,r,!1)};qr.prototype.once=function(i,t,r){return Sz(this,i,t,r,!0)};qr.prototype.removeListener=function(i,t,r,n){var a=Ur?Ur+i:i;if(!this._events[a])return this;if(!t)return Zp(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&Zp(this,a);else{for(var l=0,p=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&p.push(s[l]);p.length?this._events[a]=p.length===1?p[0]:p:Zp(this,a)}return this};qr.prototype.removeAllListeners=function(i){var t;return i?(t=Ur?Ur+i:i,this._events[t]&&Zp(this,t)):(this._events=new hc,this._eventsCount=0),this};qr.prototype.off=qr.prototype.removeListener;qr.prototype.addListener=qr.prototype.on;qr.prefixed=Ur;qr.EventEmitter=qr;typeof mf<"u"&&(mf.exports=qr)});var bl=globalThis,Qg=o=>o,rd=bl.trustedTypes,Xg=rd?rd.createPolicy("lit-html",{createHTML:o=>o}):void 0,Yh="$lit$",Bn=`lit$${Math.random().toFixed(9).slice(2)}$`,Qh="?"+Bn,u3=`<${Qh}>`,da=document,vl=()=>da.createComment(""),yl=o=>o===null||typeof o!="object"&&typeof o!="function",Xh=Array.isArray,ib=o=>Xh(o)||typeof o?.[Symbol.iterator]=="function",Kh=`[
3
- \f\r]`,gl=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Jg=/-->/g,Zg=/>/g,la=RegExp(`>|${Kh}(?:([^\\s"'>=/]+)(${Kh}*=${Kh}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),eb=/'/g,tb=/"/g,nb=/^(?:script|style|textarea|title)$/i,Jh=o=>(i,...t)=>({_$litType$:o,strings:i,values:t}),u=Jh(1),Xi=Jh(2),ob=Jh(3),vt=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),rb=new WeakMap,ca=da.createTreeWalker(da,129);function ab(o,i){if(!Xh(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xg!==void 0?Xg.createHTML(i):i}var sb=(o,i)=>{let t=o.length-1,r=[],n,a=i===2?"<svg>":i===3?"<math>":"",s=gl;for(let l=0;l<t;l++){let p=o[l],h,m,f=-1,b=0;for(;b<p.length&&(s.lastIndex=b,m=s.exec(p),m!==null);)b=s.lastIndex,s===gl?m[1]==="!--"?s=Jg:m[1]!==void 0?s=Zg:m[2]!==void 0?(nb.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=la):m[3]!==void 0&&(s=la):s===la?m[0]===">"?(s=n??gl,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?la:m[3]==='"'?tb:eb):s===tb||s===eb?s=la:s===Jg||s===Zg?s=gl:(s=la,n=void 0);let g=s===la&&o[l+1].startsWith("/>")?" ":"";a+=s===gl?p+u3:f>=0?(r.push(h),p.slice(0,f)+Yh+p.slice(f)+Bn+g):p+Bn+(f===-2?l:g)}return[ab(o,a+(o[t]||"<?>")+(i===2?"</svg>":i===3?"</math>":"")),r]},xl=class o{constructor({strings:i,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=i.length-1,p=this.parts,[h,m]=sb(i,t);if(this.el=o.createElement(h,r),ca.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=ca.nextNode())!==null&&p.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Yh)){let b=m[s++],g=n.getAttribute(f).split(Bn),v=/([.?@])?(.*)/.exec(b);p.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?nd:v[1]==="?"?od:v[1]==="@"?ad:ha}),n.removeAttribute(f)}else f.startsWith(Bn)&&(p.push({type:6,index:a}),n.removeAttribute(f));if(nb.test(n.tagName)){let f=n.textContent.split(Bn),b=f.length-1;if(b>0){n.textContent=rd?rd.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],vl()),ca.nextNode(),p.push({type:2,index:++a});n.append(f[b],vl())}}}else if(n.nodeType===8)if(n.data===Qh)p.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Bn,f+1))!==-1;)p.push({type:7,index:a}),f+=Bn.length-1}a++}}static createElement(i,t){let r=da.createElement("template");return r.innerHTML=i,r}};function pa(o,i,t=o,r){if(i===vt)return i;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=yl(i)?void 0:i._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(i=pa(o,n._$AS(o,i.values),n,r)),i}var id=class{constructor(i,t){this._$AV=[],this._$AN=void 0,this._$AD=i,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(i){let{el:{content:t},parts:r}=this._$AD,n=(i?.creationScope??da).importNode(t,!0);ca.currentNode=n;let a=ca.nextNode(),s=0,l=0,p=r[0];for(;p!==void 0;){if(s===p.index){let h;p.type===2?h=new Xa(a,a.nextSibling,this,i):p.type===1?h=new p.ctor(a,p.name,p.strings,this,i):p.type===6&&(h=new sd(a,this,i)),this._$AV.push(h),p=r[++l]}s!==p?.index&&(a=ca.nextNode(),s++)}return ca.currentNode=da,n}p(i){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(i,r,t),t+=r.strings.length-2):r._$AI(i[t])),t++}},Xa=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(i,t,r,n){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=i,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let i=this._$AA.parentNode,t=this._$AM;return t!==void 0&&i?.nodeType===11&&(i=t.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,t=this){i=pa(this,i,t),yl(i)?i===B||i==null||i===""?(this._$AH!==B&&this._$AR(),this._$AH=B):i!==this._$AH&&i!==vt&&this._(i):i._$litType$!==void 0?this.$(i):i.nodeType!==void 0?this.T(i):ib(i)?this.k(i):this._(i)}O(i){return this._$AA.parentNode.insertBefore(i,this._$AB)}T(i){this._$AH!==i&&(this._$AR(),this._$AH=this.O(i))}_(i){this._$AH!==B&&yl(this._$AH)?this._$AA.nextSibling.data=i:this.T(da.createTextNode(i)),this._$AH=i}$(i){let{values:t,_$litType$:r}=i,n=typeof r=="number"?this._$AC(i):(r.el===void 0&&(r.el=xl.createElement(ab(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new id(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(i){let t=rb.get(i.strings);return t===void 0&&rb.set(i.strings,t=new xl(i)),t}k(i){Xh(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of i)n===t.length?t.push(r=new o(this.O(vl()),this.O(vl()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(i=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);i!==this._$AB;){let r=Qg(i).nextSibling;Qg(i).remove(),i=r}}setConnected(i){this._$AM===void 0&&(this._$Cv=i,this._$AP?.(i))}},ha=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(i,t,r,n,a){this.type=1,this._$AH=B,this._$AN=void 0,this.element=i,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=B}_$AI(i,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)i=pa(this,i,t,0),s=!yl(i)||i!==this._$AH&&i!==vt,s&&(this._$AH=i);else{let l=i,p,h;for(i=a[0],p=0;p<a.length-1;p++)h=pa(this,l[r+p],t,p),h===vt&&(h=this._$AH[p]),s||(s=!yl(h)||h!==this._$AH[p]),h===B?i=B:i!==B&&(i+=(h??"")+a[p+1]),this._$AH[p]=h}s&&!n&&this.j(i)}j(i){i===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,i??"")}},nd=class extends ha{constructor(){super(...arguments),this.type=3}j(i){this.element[this.name]=i===B?void 0:i}},od=class extends ha{constructor(){super(...arguments),this.type=4}j(i){this.element.toggleAttribute(this.name,!!i&&i!==B)}},ad=class extends ha{constructor(i,t,r,n,a){super(i,t,r,n,a),this.type=5}_$AI(i,t=this){if((i=pa(this,i,t,0)??B)===vt)return;let r=this._$AH,n=i===B&&r!==B||i.capture!==r.capture||i.once!==r.once||i.passive!==r.passive,a=i!==B&&(r===B||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,i):this._$AH.handleEvent(i)}},sd=class{constructor(i,t,r){this.element=i,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(i){pa(this,i)}},lb={M:Yh,P:Bn,A:Qh,C:1,L:sb,R:id,D:ib,V:pa,I:Xa,H:ha,N:od,U:ad,B:nd,F:sd},m3=bl.litHtmlPolyfillSupport;m3?.(xl,Xa),(bl.litHtmlVersions??(bl.litHtmlVersions=[])).push("3.3.3");var Ja=(o,i,t)=>{let r=t?.renderBefore??i,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Xa(i.insertBefore(vl(),a),a,void 0,t??{})}return n._$AI(o),n};var lr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yt=o=>(...i)=>({_$litDirective$:o,values:i}),rr=class{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,t,r){this._$Ct=i,this._$AM=t,this._$Ci=r}_$AS(i,t){return this.update(i,t)}update(i,t){return this.render(...t)}};var M=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(i=>o[i]).join(" ")+" "}update(o,[i]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in i)i[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(i)}let t=o.element.classList;for(let r of this.st)r in i||(t.remove(r),this.st.delete(r));for(let r in i){let n=!!i[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return vt}});var ld=globalThis,cd=ld.ShadowRoot&&(ld.ShadyCSS===void 0||ld.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zh=Symbol(),cb=new WeakMap,wl=class{constructor(i,t,r){if(this._$cssResult$=!0,r!==Zh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=t}get styleSheet(){let i=this.o,t=this.t;if(cd&&i===void 0){let r=t!==void 0&&t.length===1;r&&(i=cb.get(t)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),r&&cb.set(t,i))}return i}toString(){return this.cssText}},z=o=>new wl(typeof o=="string"?o:o+"",void 0,Zh),_=(o,...i)=>{let t=o.length===1?o[0]:i.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[a+1],o[0]);return new wl(t,o,Zh)},db=(o,i)=>{if(cd)o.adoptedStyleSheets=i.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of i){let r=document.createElement("style"),n=ld.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,o.appendChild(r)}},eu=cd?o=>o:o=>o instanceof CSSStyleSheet?(i=>{let t="";for(let r of i.cssRules)t+=r.cssText;return z(t)})(o):o;var{is:f3,defineProperty:g3,getOwnPropertyDescriptor:b3,getOwnPropertyNames:v3,getOwnPropertySymbols:y3,getPrototypeOf:x3}=Object,mo=globalThis,pb=mo.trustedTypes,w3=pb?pb.emptyScript:"",z3=mo.reactiveElementPolyfillSupport,zl=(o,i)=>o,fo={toAttribute(o,i){switch(i){case Boolean:o=o?w3:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,i){let t=o;switch(i){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Za=(o,i)=>!f3(o,i),hb={attribute:!0,type:String,converter:fo,reflect:!1,useDefault:!1,hasChanged:Za};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),mo.litPropertyMetadata??(mo.litPropertyMetadata=new WeakMap);var Vn=class extends HTMLElement{static addInitializer(i){this._$Ei(),(this.l??(this.l=[])).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,t=hb){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(i,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(i,r,t);n!==void 0&&g3(this.prototype,i,n)}}static getPropertyDescriptor(i,t,r){let{get:n,set:a}=b3(this.prototype,i)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(i,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){return this.elementProperties.get(i)??hb}static _$Ei(){if(this.hasOwnProperty(zl("elementProperties")))return;let i=x3(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(zl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zl("properties"))){let t=this.properties,r=[...v3(t),...y3(t)];for(let n of r)this.createProperty(n,t[n])}let i=this[Symbol.metadata];if(i!==null){let t=litPropertyMetadata.get(i);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let t=[];if(Array.isArray(i)){let r=new Set(i.flat(1/0).reverse());for(let n of r)t.unshift(eu(n))}else i!==void 0&&t.push(eu(i));return t}static _$Eu(i,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(i=>i(this))}addController(i){(this._$EO??(this._$EO=new Set)).add(i),this.renderRoot!==void 0&&this.isConnected&&i.hostConnected?.()}removeController(i){this._$EO?.delete(i)}_$E_(){let i=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(i.set(r,this[r]),delete this[r]);i.size>0&&(this._$Ep=i)}createRenderRoot(){let i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return db(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(i=>i.hostConnected?.())}enableUpdating(i){}disconnectedCallback(){this._$EO?.forEach(i=>i.hostDisconnected?.())}attributeChangedCallback(i,t,r){this._$AK(i,r)}_$ET(i,t){let r=this.constructor.elementProperties.get(i),n=this.constructor._$Eu(i,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:fo).toAttribute(t,r.type);this._$Em=i,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(i,t){let r=this.constructor,n=r._$Eh.get(i);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:fo;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(i,t,r,n=!1,a){if(i!==void 0){let s=this.constructor;if(n===!1&&(a=this[i]),r??(r=s.getPropertyOptions(i)),!((r.hasChanged??Za)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(i)&&!this.hasAttribute(s._$Eu(i,r))))return;this.C(i,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(i)&&(this._$Ej.set(i,s??t??this[i]),a!==!0||s!==void 0)||(this._$AL.has(i)||(this.hasUpdated||r||(t=void 0),this._$AL.set(i,t)),n===!0&&this._$Em!==i&&(this._$Eq??(this._$Eq=new Set)).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let i=!1,t=this._$AL;try{i=this.shouldUpdate(t),i?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw i=!1,this._$EM(),r}i&&this._$AE(t)}willUpdate(i){}_$AE(i){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(i){}firstUpdated(i){}};Vn.elementStyles=[],Vn.shadowRootOptions={mode:"open"},Vn[zl("elementProperties")]=new Map,Vn[zl("finalized")]=new Map,z3?.({ReactiveElement:Vn}),(mo.reactiveElementVersions??(mo.reactiveElementVersions=[])).push("2.1.2");var _l=globalThis,go=class extends Vn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let i=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=i.firstChild),i}update(i){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Do=Ja(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};go._$litElement$=!0,go.finalized=!0,_l.litElementHydrateSupport?.({LitElement:go});var _3=_l.litElementPolyfillSupport;_3?.({LitElement:go});(_l.litElementVersions??(_l.litElementVersions=[])).push("4.2.2");var ub=new WeakMap;function mb(o){let i=ub.get(o);return i||(i=window.getComputedStyle(o,null),ub.set(o,i)),i}function k3(o){if(typeof o.checkVisibility=="function")return o.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let i=mb(o);return i.visibility!=="hidden"&&i.display!=="none"}function C3(o){let i=mb(o),{overflowY:t,overflowX:r}=i;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:o.scrollHeight>o.clientHeight&&t==="auto"||o.scrollWidth>o.clientWidth&&r==="auto"}function S3(o){let i=o.tagName.toLowerCase(),t=Number(o.getAttribute("tabindex"));return o.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||o.hasAttribute("disabled")||o.closest("[inert]")||i==="input"&&o.getAttribute("type")==="radio"&&!o.hasAttribute("checked")||!k3(o)?!1:(i==="audio"||i==="video")&&o.hasAttribute("controls")||o.hasAttribute("tabindex")||o.hasAttribute("contenteditable")&&o.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(i)?!0:C3(o)}function fb(o){let i=tu(o),t=i[0]??null,r=i[i.length-1]??null;return{start:t,end:r}}function E3(o,i){return o.getRootNode({composed:!0})?.host!==i}function tu(o){let i=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||i.has(n))return;i.set(n,!0),!t.includes(n)&&S3(n)&&t.push(n),n instanceof HTMLSlotElement&&E3(n,o)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(o),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var gb=new WeakMap,ru=class{constructor(i){this.handleKeyDown=i=>{if(i.key==="Enter"){if(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||i.isComposing||i.defaultPrevented)return;let r=i.target;if(this.isSelectOption(r)){i.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){i.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}i.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(i.key==="ArrowDown"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusNextControl(t))}}if(i.key==="ArrowUp"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusPreviousControl(t))}}};this.form=i,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(i){let t=i.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&i.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(i){let t=i.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(i){return i.tagName.toLowerCase()==="zn-option"}findParentSelect(i){let t=i;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(i){let t=i;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(i){let t=i.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let i=ua.get(this.form);if(!i)return!0;for(let t of i){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let i=tu(this.form),t=[],r=new Set;for(let n of i){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(i,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===i)return r;let a=i.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(i)||i.contains(n))return r}return-1}focusNextControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let i=this.form.querySelector('[type="submit"]');if(i)i.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function bb(o){let i=gb.get(o);return i||(i=new ru(o),gb.set(o,i)),i}function cr(o){return`#${CSS.escape(o.startsWith("#")?o.slice(1):o)}`}function T3(o,i=document){let t=i.querySelector(o);if(t)return t;for(let r of i.querySelectorAll("*"))if(r.shadowRoot){let n=T3(o,r.shadowRoot);if(n)return n}return null}function $3(o,i=document,t=[]){t.push(...i.querySelectorAll(o));for(let r of i.querySelectorAll("*"))r.shadowRoot&&$3(o,r.shadowRoot,t);return t}function Ge(o,i,t){let r=[],n=(a,s)=>{if(!a||a.nodeType!==Node.ELEMENT_NODE||s&&t&&a.matches(t))return;a.matches(o)&&r.push(a);let l=a.children;if(l.length)for(let h of l)n(h,!0);let p=a.shadowRoot;if(p){let h=p.children;for(let m of h)n(m,!0)}};return n(i,!1),r}var kr=class{constructor(i,t,r=0){this.storage=i,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(i){return!i||i.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+i))}stripTtl(i){if(i===null)return null;let t=i.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(i,t,r){!i||i.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+i,r+","+t))}set(i,t){this.setWithTTL(i,t,this.ttl)}remove(i){this.storage.removeItem(this.prefix+i)}cleanup(){for(let i=0;i<this.storage.length;i++){let t=this.storage.key(i);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var ua=new WeakMap,kl=new WeakMap,Cl=new WeakMap,dd=new WeakMap,iu=new WeakSet,pd=new WeakMap,zb="znform:";function nu(o=!1){try{return o?window.localStorage:window.sessionStorage}catch{return null}}function A3(o=!1,i=0){let t=nu(o);return t?new kr(t,zb,i):null}function vb(o){let i=o?.getAttribute("store-ttl");return i&&Number(i)||0}function yb(o){return!!o?.hasAttribute("local-storage")}function _b(o){return o?.getAttribute("store-key")||""}function M3(o){return o.getAttribute("store-key")||""}function L3(o){return o.getAttribute("name")||("name"in o&&typeof o.name=="string"?o.name:"")}function kb(o,i){let t=M3(o),r=_b(i);if(t)return r?`${r}:${t}`:t;let n=L3(o);return r&&n?`${r}:${n}`:""}function Cb(o,i){let t=yb(o)||yb(i),r=vb(o)||vb(i);return A3(t,r)}function Sb(o,i){let t=kb(o,i),n=(t?Cb(o,i):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function Eb(o,i,t){let r=kb(o,i),n=r?Cb(o,i):null;n&&n.set(r,JSON.stringify(t))}function q3(o){return o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement}function I3(o){return o instanceof HTMLInputElement&&(o.type==="checkbox"||o.type==="radio")?{checked:o.checked,value:o.value}:{value:o.value}}function D3(o){o.querySelectorAll("input, textarea, select").forEach(t=>{let r=Sb(t,o);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function xb(o,i){!q3(o)||o.form!==i||Eb(o,i,I3(o))}function R3(o,i){let t={value:i};return"checked"in o&&typeof o.checked=="boolean"&&(t.checked=o.checked),"indeterminate"in o&&typeof o.indeterminate=="boolean"&&(t.indeterminate=o.indeterminate),t}function wb(o,i){let t=[],r=zb+i;for(let n=0;n<o.length;n++){let a=o.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>o.removeItem(n))}function N3(o){let i=typeof o=="string"?o:_b(o);if(!i)return;let t=nu(!0),r=nu(!1);t&&wb(t,i),r&&r!==t&&wb(r,i)}var re=class{constructor(i,t){this.handleFormData=i=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{i.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?i.formData.append(r,m,g):i.formData.append(r,m)},p=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(p(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(p(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=i=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&ua.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(i.preventDefault(),i.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=i=>{if(i.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),pd.set(this.host,[])};this.handleInteraction=i=>{let t=pd.get(this.host);t.includes(i.type)||t.push(i.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let i=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return i?.setAttribute("disabled","disabled"),!1}return i?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let i=this.form.querySelectorAll("*");for(let t of i)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=i).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(cr(n));if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let i=this.options.form(this.host);i&&this.attachForm(i),pd.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),i&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),pd.delete(this.host),this.options.assumeInteractionOn.forEach(i=>{this.host.removeEventListener(i,this.handleInteraction)})}hostUpdated(){let i=this.options.form(this.host);i||this.detachForm(),i&&this.form!==i&&(this.detachForm(),this.attachForm(i)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(i){if(!i){this.form=void 0;return}this.form=i,ua.has(this.form)?ua.get(this.form).add(this.host):ua.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&bb(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),kl.has(this.form)||(kl.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Cl.has(this.form)||(Cl.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let i=ua.get(this.form);i&&(i.delete(this.host),i.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),kl.has(this.form)&&(this.form.reportValidity=kl.get(this.form),kl.delete(this.form)),Cl.has(this.form)&&(this.form.checkValidity=Cl.get(this.form),Cl.delete(this.form)),this.form=void 0))}attachFormPersistence(i){if(dd.has(i))return;let t=n=>xb(n.target,i),r=n=>xb(n.target,i);i.addEventListener("input",t),i.addEventListener("change",r),dd.set(i,{handleInput:t,handleChange:r}),D3(i)}detachFormPersistence(i){let t=dd.get(i);t&&(i.removeEventListener("input",t.handleInput),i.removeEventListener("change",t.handleChange),dd.delete(i))}restorePersistedValue(){let i=Sb(this.host,this.form);i&&("checked"in this.host&&typeof i.checked=="boolean"?this.options.setValue(this.host,i.checked):"value"in i&&this.options.setValue(this.host,i.value),"indeterminate"in this.host&&typeof i.indeterminate=="boolean"&&(this.host.indeterminate=i.indeterminate))}persistHostValue(){Eb(this.host,this.form,R3(this.host,this.options.value(this.host)))}setUserInteracted(i,t){t?iu.add(i):iu.delete(i),i.requestUpdate()}doAction(i,t){if(this.form){let r=document.createElement("button");r.type=i,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(i){this.doAction("reset",i)}submit(i){this.doAction("submit",i)}setValidity(i){let t=this.host,r=!!iu.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!i),t.toggleAttribute("data-valid",i),t.toggleAttribute("data-user-invalid",!i&&r),t.toggleAttribute("data-user-valid",i&&r)}updateValidity(){let i=this.host;this.setValidity(i.validity?.valid)}emitInvalidEvent(i){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});i||t.preventDefault(),this.host.dispatchEvent(t)||i?.preventDefault()}},pt=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),hd=Object.freeze({...pt,customError:!0,valid:!1}),ud=Object.freeze({...pt,valueMissing:!0,valid:!1});var Y=class{constructor(i,...t){this.slotNames=[];this.handleSlotChange=i=>{let t=i.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=i).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)!==null}test(i){return i==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(i)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(i){return this.host.querySelectorAll(`:scope > [slot="${i}"]`)}};function Tb(o){if(!o)return"";let i=o.assignedNodes({flatten:!0}),t="";return[...i].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var Ab=Symbol.for(""),O3=o=>{if(o?.r===Ab)return o?._$litStatic$};var Ai=(o,...i)=>({_$litStatic$:i.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
5
- take care to ensure page security.`)})(r)+o[n+1],o[0]),r:Ab}),$b=new Map,ou=o=>(i,...t)=>{let r=t.length,n,a,s=[],l=[],p,h=0,m=!1;for(;h<r;){for(p=i[h];h<r&&(a=t[h],(n=O3(a))!==void 0);)p+=n+i[++h],m=!0;h!==r&&l.push(a),s.push(p),h++}if(h===r&&s.push(i[r]),m){let f=s.join("$$lit$$");(i=$b.get(f))===void 0&&(s.raw=s,$b.set(f,i=s)),t=l}return o(i,...t)},ke=ou(u),jD=ou(Xi),GD=ou(ob);var P=o=>o??B;var Mb=o=>(i,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,i)}):customElements.define(o,i)};var P3={attribute:!0,type:String,converter:fo,reflect:!1,hasChanged:Za},H3=(o=P3,i,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(t.name,o),r==="accessor"){let{name:s}=t;return{set(l){let p=i.get.call(this);i.set.call(this,l),this.requestUpdate(s,p,o,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,o,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let p=this[s];i.call(this,l),this.requestUpdate(s,p,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(i,t)=>typeof t=="object"?H3(o,i,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(o,i,t)}function R(o){return d({...o,state:!0,attribute:!1})}function Lb(o){return(i,t)=>{let r=typeof i=="function"?i:i[t];Object.assign(r,o)}}var xn=(o,i,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof i!="object"&&Object.defineProperty(o,i,t),t);function F(o,i){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(o)??null;if(i){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let p=Symbol();return{get(){return this[p]},set(h){this[p]=h}}})();return xn(t,r,{get(){let p=s.call(this);return p===void 0&&(p=a(this),(p!==null||this.hasUpdated)&&l.call(this,p)),p}})}return xn(t,r,{get(){return a(this)}})}}var F3;function es(o){return(i,t)=>xn(i,t,{get(){return(this.renderRoot??F3??(F3=document.createDocumentFragment())).querySelectorAll(o)}})}function qb(o){return(i,t)=>xn(i,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(o)??null}})}function Ib(o){return(i,t)=>{let{slot:r}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return xn(i,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(o)??[]}})}}var Db="important",B3=" !"+Db,xt=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((i,t)=>{let r=o[t];return r==null?i:i+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(o,[i]){let{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(i)),this.render(i);for(let r of this.ft)i[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in i){let n=i[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(B3);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?Db:""):t[r]=n}}return vt}});function K(o,i){let t={waitUntilFirstUpdate:!1,...i};return(r,n)=>{let{update:a}=r,s=Array.isArray(o)?o:[o];r.update=function(l){s.forEach(p=>{let h=p;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var V3=Object.defineProperty,U3=(o,i,t)=>i in o?V3(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,au=(o,i,t)=>(U3(o,typeof i!="symbol"?i+"":i,t),t),j3=(o,i,t)=>{if(!i.has(o))throw TypeError("Cannot "+t)},su=(o,i)=>{if(Object(i)!==i)throw TypeError('Cannot use the "in" operator on this value');return o.has(i)},md=(o,i,t)=>{if(i.has(o))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(o):i.set(o,t)},Rb=(o,i,t)=>(j3(o,i,"access private method"),t);function Nb(o,i){return Object.is(o,i)}var Ot=null,Sl=!1,fd=1,gd=Symbol("SIGNAL");function ts(o){let i=Ot;return Ot=o,i}function G3(){return Ot}function W3(){return Sl}var hu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function bd(o){if(Sl)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ot===null)return;Ot.consumerOnSignalRead(o);let i=Ot.nextProducerIndex++;if(rs(Ot),i<Ot.producerNode.length&&Ot.producerNode[i]!==o&&du(Ot)){let t=Ot.producerNode[i];vd(t,Ot.producerIndexOfThis[i])}Ot.producerNode[i]!==o&&(Ot.producerNode[i]=o,Ot.producerIndexOfThis[i]=du(Ot)?Hb(o,Ot,i):0),Ot.producerLastReadVersion[i]=o.version}function K3(){fd++}function Ob(o){if(!(!o.dirty&&o.lastCleanEpoch===fd)){if(!o.producerMustRecompute(o)&&!Z3(o)){o.dirty=!1,o.lastCleanEpoch=fd;return}o.producerRecomputeValue(o),o.dirty=!1,o.lastCleanEpoch=fd}}function Pb(o){if(o.liveConsumerNode===void 0)return;let i=Sl;Sl=!0;try{for(let t of o.liveConsumerNode)t.dirty||Q3(t)}finally{Sl=i}}function Y3(){return Ot?.consumerAllowSignalWrites!==!1}function Q3(o){var i;o.dirty=!0,Pb(o),(i=o.consumerMarkedDirty)==null||i.call(o.wrapper??o)}function X3(o){return o&&(o.nextProducerIndex=0),ts(o)}function J3(o,i){if(ts(i),!(!o||o.producerNode===void 0||o.producerIndexOfThis===void 0||o.producerLastReadVersion===void 0)){if(du(o))for(let t=o.nextProducerIndex;t<o.producerNode.length;t++)vd(o.producerNode[t],o.producerIndexOfThis[t]);for(;o.producerNode.length>o.nextProducerIndex;)o.producerNode.pop(),o.producerLastReadVersion.pop(),o.producerIndexOfThis.pop()}}function Z3(o){rs(o);for(let i=0;i<o.producerNode.length;i++){let t=o.producerNode[i],r=o.producerLastReadVersion[i];if(r!==t.version||(Ob(t),r!==t.version))return!0}return!1}function Hb(o,i,t){var r;if(uu(o),rs(o),o.liveConsumerNode.length===0){(r=o.watched)==null||r.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)o.producerIndexOfThis[n]=Hb(o.producerNode[n],o,n)}return o.liveConsumerIndexOfThis.push(t),o.liveConsumerNode.push(i)-1}function vd(o,i){var t;if(uu(o),rs(o),typeof ngDevMode<"u"&&ngDevMode&&i>=o.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${i} is out of bounds of ${o.liveConsumerNode.length} consumers)`);if(o.liveConsumerNode.length===1){(t=o.unwatched)==null||t.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)vd(o.producerNode[n],o.producerIndexOfThis[n])}let r=o.liveConsumerNode.length-1;if(o.liveConsumerNode[i]=o.liveConsumerNode[r],o.liveConsumerIndexOfThis[i]=o.liveConsumerIndexOfThis[r],o.liveConsumerNode.length--,o.liveConsumerIndexOfThis.length--,i<o.liveConsumerNode.length){let n=o.liveConsumerIndexOfThis[i],a=o.liveConsumerNode[i];rs(a),a.producerIndexOfThis[n]=i}}function du(o){var i;return o.consumerIsAlwaysLive||(((i=o?.liveConsumerNode)==null?void 0:i.length)??0)>0}function rs(o){o.producerNode??(o.producerNode=[]),o.producerIndexOfThis??(o.producerIndexOfThis=[]),o.producerLastReadVersion??(o.producerLastReadVersion=[])}function uu(o){o.liveConsumerNode??(o.liveConsumerNode=[]),o.liveConsumerIndexOfThis??(o.liveConsumerIndexOfThis=[])}function Fb(o){if(Ob(o),bd(o),o.value===pu)throw o.error;return o.value}function e5(o){let i=Object.create(t5);i.computation=o;let t=()=>Fb(i);return t[gd]=i,t}var lu=Symbol("UNSET"),cu=Symbol("COMPUTING"),pu=Symbol("ERRORED"),t5={...hu,value:lu,dirty:!0,error:null,equal:Nb,producerMustRecompute(o){return o.value===lu||o.value===cu},producerRecomputeValue(o){if(o.value===cu)throw new Error("Detected cycle in computations.");let i=o.value;o.value=cu;let t=X3(o),r,n=!1;try{r=o.computation.call(o.wrapper),n=i!==lu&&i!==pu&&o.equal.call(o.wrapper,i,r)}catch(a){r=pu,o.error=a}finally{J3(o,t)}if(n){o.value=i;return}o.value=r,o.version++}};function r5(){throw new Error}var i5=r5;function n5(){i5()}function o5(o){let i=Object.create(l5);i.value=o;let t=()=>(bd(i),i.value);return t[gd]=i,t}function a5(){return bd(this),this.value}function s5(o,i){Y3()||n5(),o.equal.call(o.wrapper,o.value,i)||(o.value=i,c5(o))}var l5={...hu,equal:Nb,value:void 0};function c5(o){o.version++,K3(),Pb(o)}var dr=Symbol("node"),it;(o=>{var i,t,r,n,a,s;class l{constructor(m,f={}){md(this,t),au(this,i);let g=o5(m)[gd];if(this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return a5.call(this[dr])}set(m){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(W3())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[dr];s5(f,m)}}i=dr,t=new WeakSet,r=function(){},o.isState=h=>typeof h=="object"&&su(t,h),o.State=l;class p{constructor(m,f){md(this,a),au(this,n);let g=e5(m)[gd];if(g.consumerAllowSignalWrites=!0,this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Fb(this[dr])}}n=dr,a=new WeakSet,s=function(){},o.isComputed=h=>typeof h=="object"&&su(a,h),o.Computed=p,(h=>{var m,f,b,g,v;function y($){let L,W=null;try{W=ts(null),L=$()}finally{ts(W)}return L}h.untrack=y;function S($){var L;if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=$[dr].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=S;function T($){var L;if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called introspectSinks without a Signal argument");return((L=$[dr].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=T;function N($){if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called hasSinks without a Signal argument");let L=$[dr].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=N;function U($){if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=$[dr].producerNode;return L?L.length>0:!1}h.hasSources=U;class I{constructor(L){md(this,f),md(this,g),au(this,m);let W=Object.create(hu);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[dr]=W}watch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Rb(this,g,v).call(this,L);let W=this[dr];W.dirty=!1;let oe=ts(W);for(let xe of L)bd(xe[dr]);ts(oe)}unwatch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Rb(this,g,v).call(this,L);let W=this[dr];rs(W);for(let oe=W.producerNode.length-1;oe>=0;oe--)if(L.includes(W.producerNode[oe].wrapper)){vd(W.producerNode[oe],W.producerIndexOfThis[oe]);let xe=W.producerNode.length-1;if(W.producerNode[oe]=W.producerNode[xe],W.producerIndexOfThis[oe]=W.producerIndexOfThis[xe],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,oe<W.producerNode.length){let De=W.producerIndexOfThis[oe],Ne=W.producerNode[oe];uu(Ne),Ne.liveConsumerIndexOfThis[De]=oe}}}getPending(){if(!(0,o.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[dr].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=dr,f=new WeakSet,b=function(){},g=new WeakSet,v=function($){for(let L of $)if(!(0,o.isComputed)(L)&&!(0,o.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},o.isWatcher=$=>su(f,$),h.Watcher=I;function C(){var $;return($=G3())==null?void 0:$.wrapper}h.currentComputed=C,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(o.subtle||(o.subtle={}))})(it||(it={}));var mu=!1,Bb=new it.subtle.Watcher(()=>{mu||(mu=!0,queueMicrotask(()=>{mu=!1;for(let o of Bb.getPending())o.get();Bb.watch()}))}),d5=Symbol("SignalWatcherBrand"),p5=new FinalizationRegistry(o=>{o.unwatch(...it.subtle.introspectSources(o))}),Vb=new WeakMap;function yd(o){return o[d5]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),o):class extends o{constructor(){super(...arguments),this._$St=new Map,this._$So=new it.State(0),this._$Si=!1}_$Sl(){var i,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(i=this.h)===null||i===void 0?void 0:i.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new it.Computed(()=>{this._$So.get(),super.performUpdate()});let i=this.h=new it.subtle.Watcher(function(){let t=Vb.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Vb.set(i,this),p5.register(this,i),i.watch(this._$Su),i.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let i=!1;this.h.unwatch(...it.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),i||(i=!n),n})),i||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(i,t){var r;this._$S_();let n=new it.Computed(()=>{i()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?it.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>it.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:h5}=lb,Ub=o=>o;var xd=o=>o.strings===void 0,jb=()=>document.createComment(""),is=(o,i,t)=>{let r=o._$AA.parentNode,n=i===void 0?o._$AB:i._$AA;if(t===void 0){let a=r.insertBefore(jb(),n),s=r.insertBefore(jb(),n);t=new h5(a,s,o,o.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==o;if(l){let p;t._$AQ?.(o),t._$AM=o,t._$AP!==void 0&&(p=o._$AU)!==s._$AU&&t._$AP(p)}if(a!==n||l){let p=t._$AA;for(;p!==a;){let h=Ub(p).nextSibling;Ub(r).insertBefore(p,n),p=h}}}return t},bo=(o,i,t=o)=>(o._$AI(i,t),o),u5={},ns=(o,i=u5)=>o._$AH=i,Gb=o=>o._$AH,wd=o=>{o._$AR(),o._$AA.remove()};var El=(o,i)=>{let t=o._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(i,!1),El(r,i);return!0},zd=o=>{let i,t;do{if((i=o._$AM)===void 0)break;t=i._$AN,t.delete(o),o=i}while(t?.size===0)},Wb=o=>{for(let i;i=o._$AM;o=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(o))break;t.add(o),g5(i)}};function m5(o){this._$AN!==void 0?(zd(this),this._$AM=o,Wb(this)):this._$AM=o}function f5(o,i=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(i)if(Array.isArray(r))for(let a=t;a<r.length;a++)El(r[a],!1),zd(r[a]);else r!=null&&(El(r,!1),zd(r));else El(this,o)}var g5=o=>{o.type==lr.CHILD&&(o._$AP??(o._$AP=f5),o._$AQ??(o._$AQ=m5))},vo=class extends rr{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,r){super._$AT(i,t,r),Wb(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(El(this,i),zd(this))}setValue(i){if(xd(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var fu=!1,gu=new it.subtle.Watcher(async()=>{fu||(fu=!0,queueMicrotask(()=>{fu=!1;for(let o of gu.getPending())o.get();gu.watch()}))}),_d=class extends vo{_$S_(){var i,t;this._$Sm===void 0&&(this._$Sj=new it.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(i=this._$Sk)===null||i===void 0?void 0:i.h)!==null&&t!==void 0?t:gu,this._$Sm.watch(this._$Sj),it.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(i){return it.subtle.untrack(()=>i.get())}update(i,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=i.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),it.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},bu=yt(_d);var vu=o=>(i,...t)=>o(i,...t.map(r=>r instanceof it.State||r instanceof it.Computed?bu(r):r)),b5=vu(u),v5=vu(Xi);var oN=it.State,aN=it.Computed,yu=(o,i)=>new it.State(o,i);function Yb(o,i){return typeof document>"u"?i:document.documentElement.getAttribute(o)||document.body?.getAttribute(o)||i}function Qb(){return Yb("t","light")}function Xb(){return Yb("m","light")}var kd=yu(Qb()),Cd=yu(Xb()),Kb=!1;function y5(){Kb||typeof window>"u"||(Kb=!0,window.addEventListener("theme-change",o=>{let i=o.detail,t,r;if(typeof i=="string")t=i;else if(i&&typeof i=="object"){let n=i;typeof n.theme=="string"&&(t=n.theme),typeof n.mode=="string"&&(r=n.mode)}t===void 0&&(t=Qb()),r===void 0&&(r=Xb()),t!==kd.get()&&kd.set(t),r!==Cd.get()&&Cd.set(r)}))}y5();var x5=yd(go),k=class extends x5{willUpdate(i){this.t=kd.get(),this.m=Cd.get(),super.willUpdate(i)}static define(i,t=this,r={}){let n=customElements.get(i);if(!n){customElements.define(i,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${i}>${a} but it is already registered as <${i}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([i,t])=>{this.constructor.define(i,t)})}emit(i,t){let r=new CustomEvent(i,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};k.dependencies={},c([d()],k.prototype,"dir",2),c([d()],k.prototype,"lang",2),c([d({reflect:!0})],k.prototype,"t",2),c([d({reflect:!0})],k.prototype,"m",2);var ma=class extends rr{constructor(i){if(super(i),this.it=B,i.type!==lr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(i){if(i===B||i==null)return this._t=void 0,this.it=i;if(i===vt)return i;if(typeof i!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(i===this.it)return this._t;this.it=i;let t=[i];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ma.directiveName="unsafeHTML",ma.resultType=1;var St=yt(ma);function Mi(o,i){return new Promise(t=>{function r(n){n.target===o&&(o.removeEventListener(i,r),t())}o.addEventListener(i,r)})}var xu=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(i){this.openDropdowns.add(i)}unregisterDropdown(i){this.openDropdowns.delete(i)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(i){this.openTooltips.add(i)}unregisterTooltip(i){this.openTooltips.delete(i)}isTooltipOpen(){return this.openTooltips.size>0}},w5=new xu,Un=w5;var Jb=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var Et=class extends k{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,Mi(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,Mi(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>fb(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Un.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Un.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
1
+ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var Ku=Fn((Ul,Wu)=>{(function(o,i){typeof Ul=="object"&&typeof Wu=="object"?Wu.exports=i():typeof define=="function"&&define.amd?define([],i):typeof Ul=="object"?Ul.AirDatepicker=i():o.AirDatepicker=i()})(Ul,(function(){return(function(){"use strict";var o={d:function(O,x){for(var E in x)o.o(x,E)&&!o.o(O,E)&&Object.defineProperty(O,E,{enumerable:!0,get:x[E]})},o:function(O,x){return Object.prototype.hasOwnProperty.call(O,x)}},i={};o.d(i,{default:function(){return ae}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(O){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof O=="string"?x.querySelector(O):O}function a(){let{tagName:O="div",className:x="",innerHtml:E="",id:w="",attrs:D={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(O);return x&&q.classList.add(...x.split(" ")),w&&(q.id=w),E&&(q.innerHTML=E),D&&s(q,D),q}function s(O,x){for(let[E,w]of Object.entries(x))w!==void 0&&O.setAttribute(E,w);return O}function l(O){return new Date(O.getFullYear(),O.getMonth()+1,0).getDate()}function p(O){let x=O.getHours(),{hours:E,dayPeriod:w}=h(x);return{year:O.getFullYear(),month:O.getMonth(),fullMonth:O.getMonth()+1<10?"0"+(O.getMonth()+1):O.getMonth()+1,date:O.getDate(),fullDate:O.getDate()<10?"0"+O.getDate():O.getDate(),day:O.getDay(),hours:x,fullHours:m(x),hours12:E,dayPeriod:w,fullHours12:m(E),minutes:O.getMinutes(),fullMinutes:O.getMinutes()<10?"0"+O.getMinutes():O.getMinutes()}}function h(O){return{dayPeriod:O>11?"pm":"am",hours:O%12==0?12:O%12}}function m(O){return O<10?"0"+O:O}function f(O){let x=10*Math.floor(O.getFullYear()/10);return[x,x+9]}function b(){let O=[];for(var x=arguments.length,E=new Array(x),w=0;w<x;w++)E[w]=arguments[w];return E.forEach((D=>{if(typeof D=="object")for(let q in D)D[q]&&O.push(q);else D&&O.push(D)})),O.join(" ")}function g(O,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!O||!x)return!1;let w=p(O),D=p(x);return{[t.days]:w.date===D.date&&w.month===D.month&&w.year===D.year,[t.months]:w.month===D.month&&w.year===D.year,[t.years]:w.year===D.year}[E]}function v(O,x,E){let w=S(O,!1).getTime(),D=S(x,!1).getTime();return E?w>=D:w>D}function y(O,x){return!v(O,x,!0)}function S(O){let x=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],E=new Date(O.getTime());return typeof x!="boolean"||x||(function(w){w.setHours(0,0,0,0)})(E),E}function T(O,x,E){O.length?O.forEach((w=>{w.addEventListener(x,E)})):O.addEventListener(x,E)}function N(O,x){return!(!O||O===document||O instanceof DocumentFragment)&&(O.matches(x)?O:N(O.parentNode,x))}function U(O,x,E){return O>E?E:O<x?x:O}function I(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];return E.filter((D=>D)).forEach((D=>{for(let[q,A]of Object.entries(D))if(A!==void 0&&A.toString()==="[object Object]"){let H=O[q]!==void 0?O[q].toString():void 0,j=A.toString(),Q=Array.isArray(A)?[]:{};O[q]=O[q]?H!==j?Q:O[q]:Q,I(O[q],A)}else O[q]=A})),O}function C(O){let x=O;return O instanceof Date||(typeof O=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(O)&&(O+="T00:00:00"),x=new Date(O)),isNaN(x.getTime())&&(console.log(`Unable to convert value "${O}" to Date object`),x=!1),x}function $(O){let x="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+x+")("+O+")($|<|"+x+")","g")}function L(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class W{constructor(){let{type:x,date:E,dp:w,opts:D,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let H=g(A,this.date,this.type);H?this.focus():!H&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=x,this.singleType=this.type.slice(0,-1),this.date=E,this.dp=w,this.opts=D,this.body=q,this.customData=!1,this.init()}init(){var x,E;let{onRenderCell:w}=this.opts;w&&(this.customData=w({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(x=this.customData)!==null&&x!==void 0&&x.disabled?this.dp.disableDate(this.date):((E=this.customData)===null||E===void 0?void 0:E.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var x;let{year:E,month:w,fullMonth:D,date:q,fullDate:A}=p(this.date),H=((x=this.customData)===null||x===void 0?void 0:x.attrs)||{};this.$cell=a({attrs:{"data-year":E,"data-month":w,"data-date":q,"data-iso-date":`${E}-${D}-${A}`,...H}}),this.$cell.adpCell=this}_getClassName(){var x;let E=new Date,{selectOtherMonths:w,selectOtherYears:D}=this.opts,{minDate:q,maxDate:A,isDateDisabled:H}=this.dp,{day:j}=p(this.date),Q=this._isOutOfMinMaxRange(),ie=H(this.date),te=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(E,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),se="";switch(this.type){case t.days:se=b({"-weekend-":this.dp.isWeekend(j),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!w||Q||ie});break;case t.months:se=b({"-disabled-":Q});break;case t.years:se=b({"-other-decade-":this.isOtherDecade,"-disabled-":Q||this.isOtherDecade&&!D})}return b(te,se,(x=this.customData)===null||x===void 0?void 0:x.classes).split(" ")}_getHtml(){var x;let{year:E,month:w,date:D}=p(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((x=this.customData)!==null&&x!==void 0&&x.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":D;case t.months:return this.dp.locale[this.opts.monthsField][w];case t.years:return!A&&this.isOtherDecade?"":E}}_isOutOfMinMaxRange(){let{minDate:x,maxDate:E}=this.dp,{type:w,date:D}=this,{month:q,year:A,date:H}=p(D),j=w===t.days,Q=w===t.years,ie=!!x&&new Date(A,Q?x.getMonth():q,j?H:x.getDate()),te=!!E&&new Date(A,Q?E.getMonth():q,j?H:E.getDate());return x&&E?y(ie,x)||v(te,E):x?y(ie,x):E?v(te,E):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:x,focusDate:E,rangeDateTo:w,rangeDateFrom:D}=this.dp,q=x.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=D,H=w;if(q===1&&E){let se=v(E,x[0]);A=se?x[0]:E,H=se?E:x[0]}let j=b({"-in-range-":A&&H&&(Q=this.date,ie=A,te=H,v(Q,ie)&&y(Q,te)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":H&&g(this.date,H,this.type)});var Q,ie,te;j&&this.$cell.classList.add(...j.split(" "))}_handleSelectedStatus(){let x=this.dp._checkIfDateIsSelected(this.date,this.type);x?this.select():!x&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function oe(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let xe={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},De=".air-datepicker-cell";class Ne{constructor(x){let{dp:E,type:w,opts:D}=x;oe(this,"handleClick",(q=>{let A=q.target.closest(De).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let H=this.dp._checkIfDateIsSelected(A.date,A.type);H?this.dp._handleAlreadySelectedDates(H,A.date):this.dp.selectDate(A.date)})),oe(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),oe(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),oe(this,"onMouseOverCell",(q=>{let A=N(q.target,De);this.dp.setFocusDate(!!A&&A.adpCell.date)})),oe(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),oe(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,H=q.target;H.closest(De)&&this.handleClick(q),A&&H.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),oe(this,"onMouseDown",(q=>{this.pressed=!0;let A=N(q.target,De),H=A&&A.adpCell;g(H.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(H.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),oe(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=N(q.target,De),H=A&&A.adpCell,{selectedDates:j,rangeDateTo:Q,rangeDateFrom:ie}=this.dp;if(!H||H.isDisabled)return;let{date:te}=H;if(j.length===2){if(this.rangeFromFocused&&!v(te,Q)){let{hours:se,minutes:Ct}=p(ie);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateFrom=te,this.dp.replaceDate(ie,te)}if(this.rangeToFocused&&!y(te,ie)){let{hours:se,minutes:Ct}=p(Q);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateTo=te,this.dp.replaceDate(Q,te)}}})),oe(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),oe(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let H=f(q),j=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(H[0]===j[0]&&H[1]===j[1])return}this.render()})),oe(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=E,this.type=w,this.opts=D,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:x,dynamicRange:E}=this.opts;T(this.$el,"mouseover",this.onMouseOverCell),T(this.$el,"mouseout",this.onMouseOutCell),T(this.$el,"click",this.onClickBody),x&&E&&(T(this.$el,"mousedown",this.onMouseDown),T(this.$el,"mousemove",this.onMouseMove),T(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:xe[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,E="",w=this.dp.isWeekend,{onClickDayName:D}=this.opts,q=x,A=0;for(;A<7;){let H=q%7;E+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:w(H),"-clickable-":!!D})}" data-day-index='${H}'>${this.dp.locale.daysMin[H]}</div>`,A++,q++}return E}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(x){let{type:E,dp:w,opts:D}=this;return new W({type:E,dp:w,opts:D,date:x,body:this})}_generateCells(){Ne.getDatesFunction(this.type)(this.dp,(x=>{this.cells.push(this._generateCell(x))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((x=>x.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(x,E){let{viewDate:w,opts:{fixedHeight:D},locale:{firstDay:q}}=x,A=l(w),{year:H,month:j}=p(w),Q=new Date(H,j,1),ie=new Date(H,j,A),te=Q.getDay()-q,se=6-ie.getDay()+q;te=te<0?te+7:te,se=se>6?se-7:se;let Ct=(function(la,Wh){let{year:td,month:d3,date:p3}=p(la);return new Date(td,d3,p3-Wh)})(Q,te),Yr=A+te+se,zr=Ct.getDate(),{year:yn,month:fl}=p(Ct),aa=0;D&&(Yr=42);let sa=[];for(;aa<Yr;){let la=new Date(yn,fl,zr+aa);E&&E(la),sa.push(la),aa++}return sa}static getMonthsDates(x,E){let{year:w}=x.parsedViewDate,D=0,q=[];for(;D<12;){let A=new Date(w,D);q.push(A),E&&E(A),D++}return q}static getYearsDates(x,E){let w=f(x.viewDate),D=w[0]-1,q=w[1]+1,A=D,H=[];for(;A<=q;){let j=new Date(A,0);H.push(j),E&&E(j),A++}return H}static getDatesFunction(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:Ne.getDaysDates,[t.months]:Ne.getMonthsDates,[t.years]:Ne.getYearsDates}[x]}}function rt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class er{constructor(x){let{dp:E,opts:w}=x;rt(this,"onClickNav",(D=>{let q=N(D.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),rt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),rt(this,"update",(()=>{let{prevHtml:D,nextHtml:q}=this.opts;this.$prev.innerHTML=D,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),rt(this,"renderDelay",(()=>{setTimeout(this.render)})),rt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(D,q){for(let A in q)q[A]?D.classList.add(A):D.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=E,this.opts=w,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:x,opts:E}=this,w=E.navTitles[x.currentView];return typeof w=="function"?w(x):x.formatDate(x.viewDate,w)}handleNavStatus(){let{disableNavWhenOutOfRange:x}=this.opts,{minDate:E,maxDate:w}=this.dp;if(!E&&!w||!x)return;let{year:D,month:q}=this.dp.parsedViewDate,A=!!E&&p(E),H=!!w&&p(w);switch(this.dp.currentView){case t.days:E&&A.month>=q&&A.year>=D&&this._disableNav("prev"),w&&H.month<=q&&H.year<=D&&this._disableNav("next");break;case t.months:E&&A.year>=D&&this._disableNav("prev"),w&&H.year<=D&&this._disableNav("next");break;case t.years:{let j=f(this.dp.viewDate);E&&A.year>=j[0]&&this._disableNav("prev"),w&&H.year<=j[1]&&this._disableNav("next");break}}}_disableNav(x){n('[data-action="'+x+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(x){for(var E=arguments.length,w=new Array(E>1?E-1:0),D=1;D<E;D++)w[D-1]=arguments[D];x.length?x.forEach((q=>{q.classList.remove(...w)})):x.classList.remove(...w)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:x,nextHtml:E}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${x}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${E}</div>`}get isNavIsFunction(){let{navTitles:x}=this.opts;return Object.keys(x).find((E=>typeof x[E]=="function"))}}var Pr={today:{content:O=>O.locale.today,onClick:O=>O.setViewDate(new Date)},clear:{content:O=>O.locale.clear,onClick:O=>O.clear()}};class wr{constructor(x){let{dp:E,opts:w}=x;this.dp=E,this.opts=w,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:x}=this.opts;Array.isArray(x)||(x=[x]),x.forEach((E=>{let w=E;typeof E=="string"&&Pr[E]&&(w=Pr[E]);let D=this.createButton(w);w.onClick&&this.attachEventToButton(D,w.onClick),this.$el.appendChild(D)}))}attachEventToButton(x,E){x.addEventListener("click",(()=>{E(this.dp)}))}createButton(x){let{content:E,className:w,tagName:D="button",attrs:q={}}=x;return a({tagName:D,innerHtml:`<span tabindex='-1'>${typeof E=="function"?E(this.dp):E}</span>`,className:b("air-datepicker-button",w),attrs:q})}render(){this.generateButtons()}}function Nt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class tr{constructor(){let{opts:x,dp:E}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(this,"toggleTimepickerIsActive",(D=>{this.dp.timepickerIsActive=D})),Nt(this,"onChangeSelectedDate",(D=>{let{date:q,updateTime:A=!1}=D;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),Nt(this,"onChangeLastSelectedDate",(D=>{D&&(this.setTime(D),this.render())})),Nt(this,"onChangeInputRange",(D=>{let q=D.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Nt(this,"onMouseEnterLeave",(D=>{let q=D.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Nt(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Nt(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=x,this.dp=E;let{timeFormat:w}=this.dp.locale;w&&(w.match($("h"))||w.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let x="input";navigator.userAgent.match(/trident/gi)&&(x="change"),T(this.$ranges,x,this.onChangeInputRange),T(this.$ranges,"mouseenter",this.onMouseEnterLeave),T(this.$ranges,"mouseleave",this.onMouseEnterLeave),T(this.$ranges,"focus",this.onFocus),T(this.$ranges,"mousedown",this.onFocus),T(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:x,hours:E,displayHours:w,minutes:D,minHours:q,minMinutes:A,maxHours:H,maxMinutes:j,dayPeriod:Q,opts:{hoursStep:ie,minutesStep:te}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(w)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(D)}</span> `+(x?`<span class='air-datepicker-time--current-ampm'>${Q}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${E}" min="${q}" max="${H}" step="${ie}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${D}" min="${A}" max="${j}" step="${te}"/> </div></div>`}defineDOM(){let x=E=>n(E,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=x('[name="hours"]'),this.$minutes=x('[name="minutes"]'),this.$hoursText=x(".air-datepicker-time--current-hours"),this.$minutesText=x(".air-datepicker-time--current-minutes"),this.$ampm=x(".air-datepicker-time--current-ampm")}setTime(x){this.setMinMaxTime(x),this.setCurrentTime(x)}addTimeToDate(x){x&&(x.setHours(this.hours),x.setMinutes(this.minutes))}setMinMaxTime(x){if(this.setMinMaxTimeFromOptions(),x){let{minDate:E,maxDate:w}=this.dp;E&&g(x,E)&&this.setMinTimeFromMinDate(E),w&&g(x,w)&&this.setMaxTimeFromMaxDate(w)}}setCurrentTime(x){let{hours:E,minutes:w}=x?p(x):this;this.hours=U(E,this.minHours,this.maxHours),this.minutes=U(w,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:x,minMinutes:E,maxHours:w,maxMinutes:D}=this.opts;this.minHours=U(x,0,23),this.minMinutes=U(E,0,59),this.maxHours=U(w,0,23),this.maxMinutes=U(D,0,59)}setMinTimeFromMinDate(x){let{lastSelectedDate:E}=this.dp;this.minHours=x.getHours(),E&&E.getHours()>x.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=x.getMinutes()}setMaxTimeFromMaxDate(x){let{lastSelectedDate:E}=this.dp;this.maxHours=x.getHours(),E&&E.getHours()<x.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=x.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(x){this._hours=x;let{hours:E,dayPeriod:w}=h(x);this.displayHours=this.ampm?E:x,this.dayPeriod=w}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function Mt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class uo{constructor(x){let{dp:E,opts:w}=x;Mt(this,"pressedKeys",new Set),Mt(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],D=>D.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],D=>D.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],D=>D.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],D=>D.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],D=>D.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],D=>D.year-=10],[["Control","Shift","ArrowUp"],(D,q)=>q.up()]])),Mt(this,"handleHotKey",(D=>{let q=this.hotKeys.get(D),A=p(this.getInitialFocusDate());q(A,this.dp);let{year:H,month:j,date:Q}=A,ie=l(new Date(H,j));ie<Q&&(Q=ie);let te=this.dp.getClampedDate(new Date(H,j,Q));this.dp.setFocusDate(te,{viewDateTransition:!0})})),Mt(this,"isHotKeyPressed",(()=>{let D=!1,q=this.pressedKeys.size,A=H=>this.pressedKeys.has(H);for(let[H]of this.hotKeys){if(D)break;if(Array.isArray(H[0]))H.forEach((j=>{D||q!==j.length||(D=j.every(A)&&H)}));else{if(q!==H.length)continue;D=H.every(A)&&H}}return D})),Mt(this,"isArrow",(D=>D>=37&&D<=40)),Mt(this,"onKeyDown",(D=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=D,{dp:H,dp:{focusDate:j},opts:Q}=this;this.registerKey(q);let ie=this.isHotKeyPressed();if(ie)return D.preventDefault(),void this.handleHotKey(ie);if(this.isArrow(A))return D.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(H.currentView!==Q.minView)return void H.down();if(j){let te=H._checkIfDateIsSelected(j);return void(te?H._handleAlreadySelectedDates(te,j):H.selectDate(j))}}q==="Escape"&&this.dp.hide()})),Mt(this,"onKeyUp",(D=>{this.removeKey(D.key)})),this.dp=E,this.opts=w,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:x}=this.dp;x.addEventListener("keydown",this.onKeyDown),x.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:x}=this.dp;x.removeEventListener("keydown",this.onKeyDown),x.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:x,currentView:E,selectedDates:w,parsedViewDate:{year:D,month:q}}=this.dp,A=x||w[w.length-1];if(!A)switch(E){case t.days:A=new Date(D,q,new Date().getDate());break;case t.months:A=new Date(D,q,1);break;case t.years:A=new Date(D,0,1)}return A}focusNextCell(x){let E=this.getInitialFocusDate(),{currentView:w}=this.dp,{days:D,months:q,years:A}=t,H=p(E),j=H.year,Q=H.month,ie=H.date;switch(x){case"ArrowLeft":w===D&&(ie-=1),w===q&&(Q-=1),w===A&&(j-=1);break;case"ArrowUp":w===D&&(ie-=7),w===q&&(Q-=3),w===A&&(j-=4);break;case"ArrowRight":w===D&&(ie+=1),w===q&&(Q+=1),w===A&&(j+=1);break;case"ArrowDown":w===D&&(ie+=7),w===q&&(Q+=3),w===A&&(j+=4)}let te=this.dp.getClampedDate(new Date(j,Q,ie));this.dp.setFocusDate(te,{viewDateTransition:!0})}registerKey(x){this.pressedKeys.add(x)}removeKey(x){this.pressedKeys.delete(x)}}let Qa={on(O,x){this.__events||(this.__events={}),this.__events[O]?this.__events[O].push(x):this.__events[O]=[x]},off(O,x){this.__events&&this.__events[O]&&(this.__events[O]=this.__events[O].filter((E=>E!==x)))},removeAllEvents(){this.__events={}},trigger(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];this.__events&&this.__events[O]&&this.__events[O].forEach((D=>{D(...E)}))}};function ue(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let Yi="",Qi="",he=!1;class ae{static buildGlobalContainer(x){he=!0,Yi=a({className:x,id:x}),n("body").appendChild(Yi)}constructor(x,E){var w=this;if(ue(this,"viewIndexes",[t.days,t.months,t.years]),ue(this,"next",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H+1,1));break;case t.months:this.setViewDate(new Date(A+1,H,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ue(this,"prev",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H-1,1));break;case t.months:this.setViewDate(new Date(A-1,H,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ue(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ue(this,"setPosition",(function(A){let H=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||w.opts.position)=="function")return void(w.customHide=A({$datepicker:w.$datepicker,$target:w.$el,$pointer:w.$pointer,isViewChange:H,done:w._finishHide}));let j,Q,{isMobile:ie}=w.opts,te=w.$el.getBoundingClientRect(),se=w.$el.getBoundingClientRect(),Ct=w.$datepicker.offsetParent,Yr=w.$el.offsetParent,zr=w.$datepicker.getBoundingClientRect(),yn=A.split(" "),fl=window.scrollY,aa=window.scrollX,sa=w.opts.offset,la=yn[0],Wh=yn[1];if(ie)w.$datepicker.style.cssText="left: 50%; top: 50%";else{if(Ct===Yr&&Ct!==document.body&&(se={top:w.$el.offsetTop,left:w.$el.offsetLeft,width:te.width,height:w.$el.offsetHeight},fl=0,aa=0),Ct!==Yr&&Ct!==document.body){let td=Ct.getBoundingClientRect();se={top:te.top-td.top,left:te.left-td.left,width:te.width,height:te.height},fl=0,aa=0}switch(la){case"top":j=se.top-zr.height-sa;break;case"right":Q=se.left+se.width+sa;break;case"bottom":j=se.top+se.height+sa;break;case"left":Q=se.left-zr.width-sa}switch(Wh){case"top":j=se.top;break;case"right":Q=se.left+se.width-zr.width;break;case"bottom":j=se.top+se.height-zr.height;break;case"left":Q=se.left;break;case"center":/left|right/.test(la)?j=se.top+se.height/2-zr.height/2:Q=se.left+se.width/2-zr.width/2}w.$datepicker.style.cssText=`left: ${Q+aa}px; top: ${j+fl}px`}})),ue(this,"_setInputValue",(()=>{let{opts:A,$altField:H,locale:{dateFormat:j}}=this,{altFieldDateFormat:Q,altField:ie}=A;ie&&H&&(H.value=this._getInputValue(Q)),this.$el.value=this._getInputValue(j),this.$el.dispatchEvent(new Event("change"))})),ue(this,"_getInputValue",(A=>{let{selectedDates:H,opts:j}=this,{multipleDates:Q,multipleDatesSeparator:ie}=j;if(!H.length)return"";let te=typeof A=="function",se=te?A(Q?H:H[0]):H.map((Ct=>this.formatDate(Ct,A)));return se=te?se:se.join(ie),se})),ue(this,"_checkIfDateIsSelected",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,j=!1;return w.selectedDates.some((Q=>{let ie=g(A,Q,H);return j=ie&&Q,ie})),j})),ue(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ue(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ue(this,"setViewDate",(A=>{if(!((A=C(A))instanceof Date)||g(A,this.viewDate))return;let H=this.viewDate;this.viewDate=A;let{onChangeViewDate:j}=this.opts;if(j){let{month:Q,year:ie}=this.parsedViewDate;j({month:Q,year:ie,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,H)})),ue(this,"setFocusDate",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=C(A))instanceof Date)&&(w.focusDate=A,w.trigger(t.eventChangeFocusDate,A,H))})),ue(this,"setCurrentView",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w.viewIndexes.includes(A)){if(w.currentView=A,w.elIsInput&&w.visible&&w.setPosition(void 0,!0),w.trigger(t.eventChangeCurrentView,A),!w.views[A]){let j=w.views[A]=new Ne({dp:w,opts:w.opts,type:A});w.shouldUpdateDOM&&w.$content.appendChild(j.$el)}w.opts.onChangeView&&!H.silent&&w.opts.onChangeView(A)}})),ue(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ue(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:H}=this.opts,j=this.$datepicker.parentNode;j&&j.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),H&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ue(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=I({},w.opts),{silent:Q}=H;I(w.opts,A);let{timepicker:ie,buttons:te,range:se,selectedDates:Ct,isMobile:Yr}=w.opts,zr=w.visible||w.treatAsInline;w._createMinMaxDates(),w._limitViewDateByMaxMinDates(),w._handleLocale(),Ct&&(w.selectedDates=[],w.selectDate(Ct,{silent:Q})),A.view&&w.setCurrentView(A.view,{silent:Q}),w._setInputValue(),j.range&&!se?(w.rangeDateTo=!1,w.rangeDateFrom=!1):!j.range&&se&&w.selectedDates.length&&(w.rangeDateFrom=w.selectedDates[0],w.rangeDateTo=w.selectedDates[1]),j.timepicker&&!ie?(zr&&w.timepicker.destroy(),w.timepicker=!1,w.$timepicker.parentNode.removeChild(w.$timepicker)):!j.timepicker&&ie&&w._addTimepicker(),!j.buttons&&te?w._addButtons():j.buttons&&!te?(w.buttons.destroy(),w.$buttons.parentNode.removeChild(w.$buttons)):zr&&j.buttons&&te&&w.buttons.clearHtml().render(),!j.isMobile&&Yr?(w.treatAsInline||Qi||w._createMobileOverlay(),w._addMobileAttributes(),w.visible&&w._showMobileOverlay()):j.isMobile&&!Yr&&(w._removeMobileAttributes(),w.visible&&(Qi.classList.remove("-active-"),typeof w.opts.position!="function"&&w.setPosition())),zr&&(w.nav.update(),w.views[w.currentView].render(),w.currentView===t.days&&w.views[w.currentView].renderDayNames())})),ue(this,"disableDate",((A,H)=>{(Array.isArray(A)?A:[A]).forEach((j=>{let Q=C(j);if(!Q)return;let ie=H?"delete":"add";this.disabledDates[ie](this.formatDate(Q,"yyyy-MM-dd"));let te=this.getCell(Q,this.currentViewSingular);te&&te.adpCell.render()}),[])})),ue(this,"enableDate",(A=>{this.disableDate(A,!0)})),ue(this,"isDateDisabled",(A=>{let H=C(A);return this.disabledDates.has(this.formatDate(H,"yyyy-MM-dd"))})),ue(this,"isOtherMonth",(A=>{let{month:H}=p(A);return H!==this.parsedViewDate.month})),ue(this,"isOtherYear",(A=>{let{year:H}=p(A);return H!==this.parsedViewDate.year})),ue(this,"isOtherDecade",(A=>{let{year:H}=p(A),[j,Q]=f(this.viewDate);return H<j||H>Q})),ue(this,"_onChangeSelectedDate",(A=>{let{silent:H}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!H&&this._triggerOnSelect()}))})),ue(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:H}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let j=!1;H&&(j=w.isOtherMonth(A)||w.isOtherYear(A)||w.isOtherDecade(A)),j&&w.setViewDate(A),w.opts.onFocus&&w.opts.onFocus({datepicker:w,date:A})})),ue(this,"_onChangeTime",(A=>{let{hours:H,minutes:j}=A,Q=new Date,{lastSelectedDate:ie,opts:{onSelect:te}}=this,se=ie;ie||(se=Q);let Ct=this.getCell(se,this.currentViewSingular),Yr=Ct&&Ct.adpCell;Yr&&Yr.isDisabled||(se.setHours(H),se.setMinutes(j),ie?(this._setInputValue(),te&&this._triggerOnSelect()):this.selectDate(se))})),ue(this,"_onFocus",(A=>{this.visible||this.show()})),ue(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ue(this,"_onMouseDown",(A=>{this.inFocus=!0})),ue(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ue(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ue(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ue(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return Ne.getDatesFunction(A)(w)})),ue(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ue(this,"getClampedDate",(A=>{let{minDate:H,maxDate:j}=this,Q=A;return j&&v(A,j)?Q=j:H&&y(A,H)&&(Q=H),Q})),this.$el=n(x),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,E),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:D,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=C(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=D,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:x,treatAsInline:E,opts:{inline:w,isMobile:D,selectedDates:q,keyboardNav:A,onlyTimepicker:H}}=this,j=n("body");(!he||he&&Yi&&!j.contains(Yi))&&!w&&this.elIsInput&&!this.$customContainer&&ae.buildGlobalContainer(ae.defaultGlobalContainerId),!D||Qi||E||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(w||this._bindEvents(),A&&!H&&(this.keyboardNav=new uo({dp:this,opts:x}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!E&&this.show(),D&&!E&&this.$el.setAttribute("readonly",!0),E&&this._createComponents()}_createMobileOverlay(){Qi=a({className:"air-datepicker-overlay"}),Yi.appendChild(Qi)}_createComponents(){let{opts:x,treatAsInline:E,opts:{inline:w,buttons:D,timepicker:q,position:A,classes:H,onlyTimepicker:j,isMobile:Q}}=this;this._buildBaseHtml(),this.elIsInput&&(w||this._setPositionClasses(A)),!w&&this.elIsInput||this.$datepicker.classList.add("-inline-"),H&&this.$datepicker.classList.add(...H.split(" ")),j&&this.$datepicker.classList.add("-only-timepicker-"),Q&&!E&&this._addMobileAttributes(),this.views[this.currentView]=new Ne({dp:this,type:this.currentView,opts:x}),this.nav=new er({dp:this,opts:x}),q&&this._addTimepicker(),D&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let x in this.views)this.views[x].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Qi.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Qi.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:x,maxDate:E}=this.opts;this.minDate=!!x&&C(x),this.maxDate=!!E&&C(E)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new tr({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new wr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:x}=this.opts;var E,w;this.elIsInput?x?(E=this.$datepicker,(w=this.$el).parentNode.insertBefore(E,w.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:x,dateFormat:E,firstDay:w,timepicker:D,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:H}=this.opts;var j;this.locale=(j=x,JSON.parse(JSON.stringify(j))),E&&(this.locale.dateFormat=E),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Q}=this.locale;if(w!==""&&(this.locale.firstDay=w),D&&typeof E!="function"){let ie=Q?H:"";this.locale.dateFormat=[this.locale.dateFormat,Q||""].join(ie)}q&&typeof E!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(x){if(typeof x=="function")return void this.$datepicker.classList.add("-custom-position-");let E=(x=x.split(" "))[0],w=`air-datepicker -${E}-${x[1]}- -from-${E}-`;this.$datepicker.classList.add(...w.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:x,minDate:E,maxDate:w}=this;w&&v(x,w)&&this.setViewDate(w),E&&y(x,E)&&this.setViewDate(E)}formatDate(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,E=arguments.length>1?arguments[1]:void 0;if(x=C(x),!(x instanceof Date))return;let w=E,D=this.locale,q=p(x),A=q.dayPeriod,H=f(x),j=ae.replacer,Q={T:x.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:D.daysShort[q.day],EEEE:D.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:D.monthsShort[q.month],MMMM:D.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:H[0],yyyy2:H[1]};for(let[ie,te]of Object.entries(Q))w=j(w,$(ie),te);return w}down(x){this._handleUpDownActions(x,"down")}up(x){this._handleUpDownActions(x,"up")}selectDate(x){let E,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:D,parsedViewDate:q,selectedDates:A}=this,{updateTime:H,silent:j}=w,{moveToOtherMonthsOnSelect:Q,moveToOtherYearsOnSelect:ie,multipleDates:te,range:se,autoClose:Ct,onBeforeSelect:Yr}=this.opts,zr=A.length;if(Array.isArray(x))return x.forEach((yn=>{this.selectDate(yn,w)})),new Promise((yn=>{setTimeout(yn)}));if((x=C(x))instanceof Date){if(Yr&&!j&&!Yr({date:x,datepicker:this}))return Promise.resolve();if(D===t.days&&x.getMonth()!==q.month&&Q&&(E=new Date(x.getFullYear(),x.getMonth(),1)),D===t.years&&x.getFullYear()!==q.year&&ie&&(E=new Date(x.getFullYear(),0,1)),E&&this.setViewDate(E),te&&!se){if(zr===te)return;this._checkIfDateIsSelected(x)||A.push(x)}else if(se)switch(zr){case 1:A.push(x),this.rangeDateTo||(this.rangeDateTo=x),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=x),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[x],this.rangeDateFrom=x,this.rangeDateTo="";break;default:this.selectedDates=[x],this.rangeDateFrom=x}else this.selectedDates=[x];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:w?.silent,date:x,updateTime:H}),this._updateLastSelectedDate(x),Ct&&!this.timepickerIsActive&&this.visible&&(te||se?se&&zr===1&&this.hide():this.hide()),new Promise((yn=>{setTimeout(yn)}))}}unselectDate(x){let E=this.selectedDates,w=this;if((x=C(x))instanceof Date)return E.some(((D,q)=>{if(g(D,x))return E.splice(q,1),w.selectedDates.length?(w.rangeDateTo="",w.rangeDateFrom=E[0],w._updateLastSelectedDate(w.selectedDates[w.selectedDates.length-1])):(w.rangeDateFrom="",w.rangeDateTo="",w._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:x}),!0}))}replaceDate(x,E){let w=this.selectedDates.find((q=>g(q,x,this.currentView))),D=this.selectedDates.indexOf(w);D<0||g(this.selectedDates[D],E,this.currentView)||(this.selectedDates[D]=E,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:E,updateTime:!0}),this._updateLastSelectedDate(E))}clear(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:x.silent}),new Promise((E=>{setTimeout(E)}))}show(){let{onShow:x,isMobile:E}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,x&&this._scheduleCallAfterTransition(x),E&&this._showMobileOverlay()}hide(){let{onHide:x,isMobile:E}=this.opts,w=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((D=>{!this.customHide&&(D&&w||!D&&!w)&&this._finishHide(),x&&x(D)})),E&&Qi.classList.remove("-active-")}_triggerOnSelect(){let x=[],E=[],{selectedDates:w,locale:D,opts:{onSelect:q,multipleDates:A,range:H}}=this,j=A||H,Q=typeof D.dateFormat=="function";w.length&&(x=w.map(S),E=Q?A?D.dateFormat(x):x.map((ie=>D.dateFormat(ie))):x.map((ie=>this.formatDate(ie,D.dateFormat)))),q({date:j?x:x[0],formattedDate:j?E:E[0],datepicker:this})}_handleAlreadySelectedDates(x,E){let{selectedDates:w,rangeDateFrom:D,rangeDateTo:q}=this,{range:A,toggleSelected:H}=this.opts,j=w.length,Q=typeof H=="function"?H({datepicker:this,date:E}):H,ie=!!(A&&j===1&&x),te=ie?S(E):E;A&&!Q&&(j!==2&&this.selectDate(te),j===2&&g(D,q))||(Q?this.unselectDate(te):this._updateLastSelectedDate(ie?te:x))}_handleUpDownActions(x,E){if(!((x=C(x||this.focusDate||this.viewDate))instanceof Date))return;let w=E==="up"?this.viewIndex+1:this.viewIndex-1;w>2&&(w=2),w<0&&(w=0),this.setViewDate(new Date(x.getFullYear(),x.getMonth(),1)),this.setCurrentView(this.viewIndexes[w])}getCell(x){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((x=C(x))instanceof Date))return;let{year:w,month:D,date:q}=p(x),A=`[data-year="${w}"]`,H=`[data-month="${D}"]`,j={[t.day]:`${A}${H}[data-date="${q}"]`,[t.month]:`${A}${H}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(j[E]):void 0}_showMobileOverlay(){Qi.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((x,E)=>parseFloat(E)+x),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return p(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Yi}static replacer(x,E,w){return x.replace(E,(function(D,q,A,H){return q+w+H}))}}var ze;return ue(ae,"defaults",r),ue(ae,"version","3.6.0"),ue(ae,"defaultGlobalContainerId","air-datepicker-global-container"),ze=ae.prototype,Object.assign(ze,Qa),i.default})()}))});var H1=Fn((Oie,P1)=>{var zi=-1,Br=1,Yt=0;function Wl(o,i,t,r,n){if(o===i)return o?[[Yt,o]]:[];if(t!=null){var a=_8(o,i,t);if(a)return a}var s=hm(o,i),l=o.substring(0,s);o=o.substring(s),i=i.substring(s),s=np(o,i);var p=o.substring(o.length-s);o=o.substring(0,o.length-s),i=i.substring(0,i.length-s);var h=f8(o,i);return l&&h.unshift([Yt,l]),p&&h.push([Yt,p]),um(h,n),r&&v8(h),h}function f8(o,i){var t;if(!o)return[[Br,i]];if(!i)return[[zi,o]];var r=o.length>i.length?o:i,n=o.length>i.length?i:o,a=r.indexOf(n);if(a!==-1)return t=[[Br,r.substring(0,a)],[Yt,n],[Br,r.substring(a+n.length)]],o.length>i.length&&(t[0][0]=t[2][0]=zi),t;if(n.length===1)return[[zi,o],[Br,i]];var s=b8(o,i);if(s){var l=s[0],p=s[1],h=s[2],m=s[3],f=s[4],b=Wl(l,h),g=Wl(p,m);return b.concat([[Yt,f]],g)}return g8(o,i)}function g8(o,i){for(var t=o.length,r=i.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),p=new Array(s),h=0;h<s;h++)l[h]=-1,p[h]=-1;l[a+1]=0,p[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,y=0,S=0;S<n;S++){for(var T=-S+b;T<=S-g;T+=2){var N=a+T,U;T===-S||T!==S&&l[N-1]<l[N+1]?U=l[N+1]:U=l[N-1]+1;for(var I=U-T;U<t&&I<r&&o.charAt(U)===i.charAt(I);)U++,I++;if(l[N]=U,U>t)g+=2;else if(I>r)b+=2;else if(f){var C=a+m-T;if(C>=0&&C<s&&p[C]!==-1){var $=t-p[C];if(U>=$)return A1(o,i,U,I)}}}for(var L=-S+v;L<=S-y;L+=2){var C=a+L,$;L===-S||L!==S&&p[C-1]<p[C+1]?$=p[C+1]:$=p[C-1]+1;for(var W=$-L;$<t&&W<r&&o.charAt(t-$-1)===i.charAt(r-W-1);)$++,W++;if(p[C]=$,$>t)y+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var U=l[N],I=a+U-N;if($=t-$,U>=$)return A1(o,i,U,I)}}}}return[[zi,o],[Br,i]]}function A1(o,i,t,r){var n=o.substring(0,t),a=i.substring(0,r),s=o.substring(t),l=i.substring(r),p=Wl(n,a),h=Wl(s,l);return p.concat(h)}function hm(o,i){if(!o||!i||o.charAt(0)!==i.charAt(0))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(a,n)==i.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return D1(o.charCodeAt(n-1))&&n--,n}function M1(o,i){var t=o.length,r=i.length;if(t==0||r==0)return 0;t>r?o=o.substring(t-r):t<r&&(i=i.substring(0,t));var n=Math.min(t,r);if(o==i)return n;for(var a=0,s=1;;){var l=o.substring(n-s),p=i.indexOf(l);if(p==-1)return a;s+=p,(p==0||o.substring(n-s)==i.substring(0,s))&&(a=s,s++)}}function np(o,i){if(!o||!i||o.slice(-1)!==i.slice(-1))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(o.length-n,o.length-a)==i.substring(i.length-n,i.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return R1(o.charCodeAt(o.length-n))&&n--,n}function b8(o,i){var t=o.length>i.length?o:i,r=o.length>i.length?i:o;if(t.length<4||r.length*2<t.length)return null;function n(g,v,y){for(var S=g.substring(y,y+Math.floor(g.length/4)),T=-1,N="",U,I,C,$;(T=v.indexOf(S,T+1))!==-1;){var L=hm(g.substring(y),v.substring(T)),W=np(g.substring(0,y),v.substring(0,T));N.length<W+L&&(N=v.substring(T-W,T)+v.substring(T,T+L),U=g.substring(0,y-W),I=g.substring(y+L),C=v.substring(0,T-W),$=v.substring(T+L))}return N.length*2>=g.length?[U,I,C,$,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var p,h,m,f;o.length>i.length?(p=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],p=l[2],h=l[3]);var b=l[4];return[p,h,m,f,b]}function v8(o){for(var i=!1,t=[],r=0,n=null,a=0,s=0,l=0,p=0,h=0;a<o.length;)o[a][0]==Yt?(t[r++]=a,s=p,l=h,p=0,h=0,n=o[a][1]):(o[a][0]==Br?p+=o[a][1].length:h+=o[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(p,h)&&(o.splice(t[r-1],0,[zi,n]),o[t[r-1]+1][0]=Br,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,p=0,h=0,n=null,i=!0)),a++;for(i&&um(o),w8(o),a=1;a<o.length;){if(o[a-1][0]==zi&&o[a][0]==Br){var m=o[a-1][1],f=o[a][1],b=M1(m,f),g=M1(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(o.splice(a,0,[Yt,f.substring(0,b)]),o[a-1][1]=m.substring(0,m.length-b),o[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(o.splice(a,0,[Yt,m.substring(0,g)]),o[a-1][0]=Br,o[a-1][1]=f.substring(0,f.length-g),o[a+1][0]=zi,o[a+1][1]=m.substring(g),a++),a++}a++}}var L1=/[^a-zA-Z0-9]/,q1=/\s/,I1=/[\r\n]/,y8=/\n\r?\n$/,x8=/^\r?\n\r?\n/;function w8(o){function i(g,v){if(!g||!v)return 6;var y=g.charAt(g.length-1),S=v.charAt(0),T=y.match(L1),N=S.match(L1),U=T&&y.match(q1),I=N&&S.match(q1),C=U&&y.match(I1),$=I&&S.match(I1),L=C&&g.match(y8),W=$&&v.match(x8);return L||W?5:C||$?4:T&&!U&&I?3:U||I?2:T||N?1:0}for(var t=1;t<o.length-1;){if(o[t-1][0]==Yt&&o[t+1][0]==Yt){var r=o[t-1][1],n=o[t][1],a=o[t+1][1],s=np(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var p=r,h=n,m=a,f=i(r,n)+i(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=i(r,n)+i(n,a);b>=f&&(f=b,p=r,h=n,m=a)}o[t-1][1]!=p&&(p?o[t-1][1]=p:(o.splice(t-1,1),t--),o[t][1]=h,m?o[t+1][1]=m:(o.splice(t+1,1),t--))}t++}}function um(o,i){o.push([Yt,""]);for(var t=0,r=0,n=0,a="",s="",l;t<o.length;){if(t<o.length-1&&!o[t][1]){o.splice(t,1);continue}switch(o[t][0]){case Br:n++,s+=o[t][1],t++;break;case zi:r++,a+=o[t][1],t++;break;case Yt:var p=t-n-r-1;if(i){if(p>=0&&O1(o[p][1])){var h=o[p][1].slice(-1);if(o[p][1]=o[p][1].slice(0,-1),a=h+a,s=h+s,!o[p][1]){o.splice(p,1),t--;var m=p-1;o[m]&&o[m][0]===Br&&(n++,s=o[m][1]+s,m--),o[m]&&o[m][0]===zi&&(r++,a=o[m][1]+a,m--),p=m}}if(N1(o[t][1])){var h=o[t][1].charAt(0);o[t][1]=o[t][1].slice(1),a+=h,s+=h}}if(t<o.length-1&&!o[t][1]){o.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=hm(s,a),l!==0&&(p>=0?o[p][1]+=s.substring(0,l):(o.splice(0,0,[Yt,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=np(s,a),l!==0&&(o[t][1]=s.substring(s.length-l)+o[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(o.splice(t-f,f),t=t-f):a.length===0?(o.splice(t-f,f,[Br,s]),t=t-f+1):s.length===0?(o.splice(t-f,f,[zi,a]),t=t-f+1):(o.splice(t-f,f,[zi,a],[Br,s]),t=t-f+2)}t!==0&&o[t-1][0]===Yt?(o[t-1][1]+=o[t][1],o.splice(t,1)):t++,n=0,r=0,a="",s="";break}}o[o.length-1][1]===""&&o.pop();var b=!1;for(t=1;t<o.length-1;)o[t-1][0]===Yt&&o[t+1][0]===Yt&&(o[t][1].substring(o[t][1].length-o[t-1][1].length)===o[t-1][1]?(o[t][1]=o[t-1][1]+o[t][1].substring(0,o[t][1].length-o[t-1][1].length),o[t+1][1]=o[t-1][1]+o[t+1][1],o.splice(t-1,1),b=!0):o[t][1].substring(0,o[t+1][1].length)==o[t+1][1]&&(o[t-1][1]+=o[t+1][1],o[t][1]=o[t][1].substring(o[t+1][1].length)+o[t+1][1],o.splice(t+1,1),b=!0)),t++;b&&um(o,i)}function D1(o){return o>=55296&&o<=56319}function R1(o){return o>=56320&&o<=57343}function N1(o){return R1(o.charCodeAt(0))}function O1(o){return D1(o.charCodeAt(o.length-1))}function z8(o){for(var i=[],t=0;t<o.length;t++)o[t][1].length>0&&i.push(o[t]);return i}function pm(o,i,t,r){return O1(o)||N1(r)?null:z8([[Yt,o],[zi,i],[Br,t],[Yt,r]])}function _8(o,i,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=o.length,s=i.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,p=o.slice(0,l),h=o.slice(l),m=n?n.index:null;e:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break e;var b=i.slice(0,f),g=i.slice(f);if(g!==h)break e;var v=Math.min(l,f),y=p.slice(0,v),S=b.slice(0,v);if(y!==S)break e;var T=p.slice(v),N=b.slice(v);return pm(y,T,N,h)}e:{if(m!==null&&m!==l)break e;var U=l,b=i.slice(0,U),g=i.slice(U);if(b!==p)break e;var I=Math.min(a-U,s-U),C=h.slice(h.length-I),$=g.slice(g.length-I);if(C!==$)break e;var T=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return pm(p,T,N,C)}}if(r.length>0&&n&&n.length===0)e:{var y=o.slice(0,r.index),C=o.slice(r.index+r.length),v=y.length,I=C.length;if(s<v+I)break e;var S=i.slice(0,v),$=i.slice(s-I);if(y!==S||C!==$)break e;var T=o.slice(v,a-I),N=i.slice(v,s-I);return pm(y,T,N,C)}return null}function op(o,i,t,r){return Wl(o,i,t,r,!0)}op.INSERT=Br;op.DELETE=zi;op.EQUAL=Yt;P1.exports=op});var Tm=Fn((Kl,ys)=>{var k8=200,J1="__lodash_hash_undefined__",Z1=9007199254740991,wm="[object Arguments]",C8="[object Array]",ey="[object Boolean]",ty="[object Date]",S8="[object Error]",zm="[object Function]",ry="[object GeneratorFunction]",ap="[object Map]",iy="[object Number]",_m="[object Object]",F1="[object Promise]",ny="[object RegExp]",sp="[object Set]",oy="[object String]",ay="[object Symbol]",fm="[object WeakMap]",sy="[object ArrayBuffer]",lp="[object DataView]",ly="[object Float32Array]",cy="[object Float64Array]",dy="[object Int8Array]",py="[object Int16Array]",hy="[object Int32Array]",uy="[object Uint8Array]",my="[object Uint8ClampedArray]",fy="[object Uint16Array]",gy="[object Uint32Array]",E8=/[\\^$.*+?()[\]{}|]/g,T8=/\w*$/,$8=/^\[object .+?Constructor\]$/,A8=/^(?:0|[1-9]\d*)$/,et={};et[wm]=et[C8]=et[sy]=et[lp]=et[ey]=et[ty]=et[ly]=et[cy]=et[dy]=et[py]=et[hy]=et[ap]=et[iy]=et[_m]=et[ny]=et[sp]=et[oy]=et[ay]=et[uy]=et[my]=et[fy]=et[gy]=!0;et[S8]=et[zm]=et[fm]=!1;var M8=typeof global=="object"&&global&&global.Object===Object&&global,L8=typeof self=="object"&&self&&self.Object===Object&&self,Kn=M8||L8||Function("return this")(),by=typeof Kl=="object"&&Kl&&!Kl.nodeType&&Kl,B1=by&&typeof ys=="object"&&ys&&!ys.nodeType&&ys,q8=B1&&B1.exports===by;function I8(o,i){return o.set(i[0],i[1]),o}function D8(o,i){return o.add(i),o}function R8(o,i){for(var t=-1,r=o?o.length:0;++t<r&&i(o[t],t,o)!==!1;);return o}function N8(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function vy(o,i,t,r){var n=-1,a=o?o.length:0;for(r&&a&&(t=o[++n]);++n<a;)t=i(t,o[n],n,o);return t}function O8(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function P8(o,i){return o?.[i]}function yy(o){var i=!1;if(o!=null&&typeof o.toString!="function")try{i=!!(o+"")}catch{}return i}function V1(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function km(o,i){return function(t){return o(i(t))}}function U1(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var H8=Array.prototype,F8=Function.prototype,cp=Object.prototype,mm=Kn["__core-js_shared__"],j1=(function(){var o=/[^.]+$/.exec(mm&&mm.keys&&mm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),xy=F8.toString,$o=cp.hasOwnProperty,dp=cp.toString,B8=RegExp("^"+xy.call($o).replace(E8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G1=q8?Kn.Buffer:void 0,W1=Kn.Symbol,K1=Kn.Uint8Array,V8=km(Object.getPrototypeOf,Object),U8=Object.create,j8=cp.propertyIsEnumerable,G8=H8.splice,Y1=Object.getOwnPropertySymbols,W8=G1?G1.isBuffer:void 0,K8=km(Object.keys,Object),gm=zs(Kn,"DataView"),Yl=zs(Kn,"Map"),bm=zs(Kn,"Promise"),vm=zs(Kn,"Set"),ym=zs(Kn,"WeakMap"),Ql=zs(Object,"create"),Y8=$a(gm),Q8=$a(Yl),X8=$a(bm),J8=$a(vm),Z8=$a(ym),Q1=W1?W1.prototype:void 0,X1=Q1?Q1.valueOf:void 0;function Ta(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function e9(){this.__data__=Ql?Ql(null):{}}function t9(o){return this.has(o)&&delete this.__data__[o]}function r9(o){var i=this.__data__;if(Ql){var t=i[o];return t===J1?void 0:t}return $o.call(i,o)?i[o]:void 0}function i9(o){var i=this.__data__;return Ql?i[o]!==void 0:$o.call(i,o)}function n9(o,i){var t=this.__data__;return t[o]=Ql&&i===void 0?J1:i,this}Ta.prototype.clear=e9;Ta.prototype.delete=t9;Ta.prototype.get=r9;Ta.prototype.has=i9;Ta.prototype.set=n9;function Yn(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function o9(){this.__data__=[]}function a9(o){var i=this.__data__,t=pp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():G8.call(i,t,1),!0}function s9(o){var i=this.__data__,t=pp(i,o);return t<0?void 0:i[t][1]}function l9(o){return pp(this.__data__,o)>-1}function c9(o,i){var t=this.__data__,r=pp(t,o);return r<0?t.push([o,i]):t[r][1]=i,this}Yn.prototype.clear=o9;Yn.prototype.delete=a9;Yn.prototype.get=s9;Yn.prototype.has=l9;Yn.prototype.set=c9;function xs(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function d9(){this.__data__={hash:new Ta,map:new(Yl||Yn),string:new Ta}}function p9(o){return hp(this,o).delete(o)}function h9(o){return hp(this,o).get(o)}function u9(o){return hp(this,o).has(o)}function m9(o,i){return hp(this,o).set(o,i),this}xs.prototype.clear=d9;xs.prototype.delete=p9;xs.prototype.get=h9;xs.prototype.has=u9;xs.prototype.set=m9;function ws(o){this.__data__=new Yn(o)}function f9(){this.__data__=new Yn}function g9(o){return this.__data__.delete(o)}function b9(o){return this.__data__.get(o)}function v9(o){return this.__data__.has(o)}function y9(o,i){var t=this.__data__;if(t instanceof Yn){var r=t.__data__;if(!Yl||r.length<k8-1)return r.push([o,i]),this;t=this.__data__=new xs(r)}return t.set(o,i),this}ws.prototype.clear=f9;ws.prototype.delete=g9;ws.prototype.get=b9;ws.prototype.has=v9;ws.prototype.set=y9;function x9(o,i){var t=Sm(o)||U9(o)?O8(o.length,String):[],r=t.length,n=!!r;for(var a in o)(i||$o.call(o,a))&&!(n&&(a=="length"||H9(a,r)))&&t.push(a);return t}function wy(o,i,t){var r=o[i];(!($o.call(o,i)&&Cy(r,t))||t===void 0&&!(i in o))&&(o[i]=t)}function pp(o,i){for(var t=o.length;t--;)if(Cy(o[t][0],i))return t;return-1}function w9(o,i){return o&&zy(i,Em(i),o)}function xm(o,i,t,r,n,a,s){var l;if(r&&(l=a?r(o,n,a,s):r(o)),l!==void 0)return l;if(!up(o))return o;var p=Sm(o);if(p){if(l=N9(o),!i)return I9(o,l)}else{var h=Ea(o),m=h==zm||h==ry;if(G9(o))return E9(o,i);if(h==_m||h==wm||m&&!a){if(yy(o))return a?o:{};if(l=O9(m?{}:o),!i)return D9(o,w9(l,o))}else{if(!et[h])return a?o:{};l=P9(o,h,xm,i)}}s||(s=new ws);var f=s.get(o);if(f)return f;if(s.set(o,l),!p)var b=t?R9(o):Em(o);return R8(b||o,function(g,v){b&&(v=g,g=o[v]),wy(l,v,xm(g,i,t,r,v,o,s))}),l}function z9(o){return up(o)?U8(o):{}}function _9(o,i,t){var r=i(o);return Sm(o)?r:N8(r,t(o))}function k9(o){return dp.call(o)}function C9(o){if(!up(o)||B9(o))return!1;var i=Ey(o)||yy(o)?B8:$8;return i.test($a(o))}function S9(o){if(!ky(o))return K8(o);var i=[];for(var t in Object(o))$o.call(o,t)&&t!="constructor"&&i.push(t);return i}function E9(o,i){if(i)return o.slice();var t=new o.constructor(o.length);return o.copy(t),t}function Cm(o){var i=new o.constructor(o.byteLength);return new K1(i).set(new K1(o)),i}function T9(o,i){var t=i?Cm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}function $9(o,i,t){var r=i?t(V1(o),!0):V1(o);return vy(r,I8,new o.constructor)}function A9(o){var i=new o.constructor(o.source,T8.exec(o));return i.lastIndex=o.lastIndex,i}function M9(o,i,t){var r=i?t(U1(o),!0):U1(o);return vy(r,D8,new o.constructor)}function L9(o){return X1?Object(X1.call(o)):{}}function q9(o,i){var t=i?Cm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function I9(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}function zy(o,i,t,r){t||(t={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(t[s],o[s],s,t,o):void 0;wy(t,s,l===void 0?o[s]:l)}return t}function D9(o,i){return zy(o,_y(o),i)}function R9(o){return _9(o,Em,_y)}function hp(o,i){var t=o.__data__;return F9(i)?t[typeof i=="string"?"string":"hash"]:t.map}function zs(o,i){var t=P8(o,i);return C9(t)?t:void 0}var _y=Y1?km(Y1,Object):Y9,Ea=k9;(gm&&Ea(new gm(new ArrayBuffer(1)))!=lp||Yl&&Ea(new Yl)!=ap||bm&&Ea(bm.resolve())!=F1||vm&&Ea(new vm)!=sp||ym&&Ea(new ym)!=fm)&&(Ea=function(o){var i=dp.call(o),t=i==_m?o.constructor:void 0,r=t?$a(t):void 0;if(r)switch(r){case Y8:return lp;case Q8:return ap;case X8:return F1;case J8:return sp;case Z8:return fm}return i});function N9(o){var i=o.length,t=o.constructor(i);return i&&typeof o[0]=="string"&&$o.call(o,"index")&&(t.index=o.index,t.input=o.input),t}function O9(o){return typeof o.constructor=="function"&&!ky(o)?z9(V8(o)):{}}function P9(o,i,t,r){var n=o.constructor;switch(i){case sy:return Cm(o);case ey:case ty:return new n(+o);case lp:return T9(o,r);case ly:case cy:case dy:case py:case hy:case uy:case my:case fy:case gy:return q9(o,r);case ap:return $9(o,r,t);case iy:case oy:return new n(o);case ny:return A9(o);case sp:return M9(o,r,t);case ay:return L9(o)}}function H9(o,i){return i=i??Z1,!!i&&(typeof o=="number"||A8.test(o))&&o>-1&&o%1==0&&o<i}function F9(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function B9(o){return!!j1&&j1 in o}function ky(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||cp;return o===t}function $a(o){if(o!=null){try{return xy.call(o)}catch{}try{return o+""}catch{}}return""}function V9(o){return xm(o,!0,!0)}function Cy(o,i){return o===i||o!==o&&i!==i}function U9(o){return j9(o)&&$o.call(o,"callee")&&(!j8.call(o,"callee")||dp.call(o)==wm)}var Sm=Array.isArray;function Sy(o){return o!=null&&W9(o.length)&&!Ey(o)}function j9(o){return K9(o)&&Sy(o)}var G9=W8||Q9;function Ey(o){var i=up(o)?dp.call(o):"";return i==zm||i==ry}function W9(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Z1}function up(o){var i=typeof o;return!!o&&(i=="object"||i=="function")}function K9(o){return!!o&&typeof o=="object"}function Em(o){return Sy(o)?x9(o):S9(o)}function Y9(){return[]}function Q9(){return!1}ys.exports=V9});var Hm=Fn((Xl,ks)=>{var X9=200,Pm="__lodash_hash_undefined__",wp=1,Py=2,Hy=9007199254740991,mp="[object Arguments]",Lm="[object Array]",J9="[object AsyncFunction]",Fy="[object Boolean]",By="[object Date]",Vy="[object Error]",Uy="[object Function]",Z9="[object GeneratorFunction]",fp="[object Map]",jy="[object Number]",e6="[object Null]",_s="[object Object]",Ty="[object Promise]",t6="[object Proxy]",Gy="[object RegExp]",gp="[object Set]",Wy="[object String]",r6="[object Symbol]",i6="[object Undefined]",qm="[object WeakMap]",Ky="[object ArrayBuffer]",bp="[object DataView]",n6="[object Float32Array]",o6="[object Float64Array]",a6="[object Int8Array]",s6="[object Int16Array]",l6="[object Int32Array]",c6="[object Uint8Array]",d6="[object Uint8ClampedArray]",p6="[object Uint16Array]",h6="[object Uint32Array]",u6=/[\\^$.*+?()[\]{}|]/g,m6=/^\[object .+?Constructor\]$/,f6=/^(?:0|[1-9]\d*)$/,st={};st[n6]=st[o6]=st[a6]=st[s6]=st[l6]=st[c6]=st[d6]=st[p6]=st[h6]=!0;st[mp]=st[Lm]=st[Ky]=st[Fy]=st[bp]=st[By]=st[Vy]=st[Uy]=st[fp]=st[jy]=st[_s]=st[Gy]=st[gp]=st[Wy]=st[qm]=!1;var Yy=typeof global=="object"&&global&&global.Object===Object&&global,g6=typeof self=="object"&&self&&self.Object===Object&&self,Qn=Yy||g6||Function("return this")(),Qy=typeof Xl=="object"&&Xl&&!Xl.nodeType&&Xl,$y=Qy&&typeof ks=="object"&&ks&&!ks.nodeType&&ks,Xy=$y&&$y.exports===Qy,$m=Xy&&Yy.process,Ay=(function(){try{return $m&&$m.binding&&$m.binding("util")}catch{}})(),My=Ay&&Ay.isTypedArray;function b6(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}function v6(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function y6(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}function x6(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function w6(o){return function(i){return o(i)}}function z6(o,i){return o.has(i)}function _6(o,i){return o?.[i]}function k6(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function C6(o,i){return function(t){return o(i(t))}}function S6(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var E6=Array.prototype,T6=Function.prototype,zp=Object.prototype,Am=Qn["__core-js_shared__"],Jy=T6.toString,$n=zp.hasOwnProperty,Ly=(function(){var o=/[^.]+$/.exec(Am&&Am.keys&&Am.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Zy=zp.toString,$6=RegExp("^"+Jy.call($n).replace(u6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qy=Xy?Qn.Buffer:void 0,vp=Qn.Symbol,Iy=Qn.Uint8Array,ex=zp.propertyIsEnumerable,A6=E6.splice,Aa=vp?vp.toStringTag:void 0,Dy=Object.getOwnPropertySymbols,M6=qy?qy.isBuffer:void 0,L6=C6(Object.keys,Object),Im=Cs(Qn,"DataView"),Jl=Cs(Qn,"Map"),Dm=Cs(Qn,"Promise"),Rm=Cs(Qn,"Set"),Nm=Cs(Qn,"WeakMap"),Zl=Cs(Object,"create"),q6=qa(Im),I6=qa(Jl),D6=qa(Dm),R6=qa(Rm),N6=qa(Nm),Ry=vp?vp.prototype:void 0,Mm=Ry?Ry.valueOf:void 0;function Ma(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function O6(){this.__data__=Zl?Zl(null):{},this.size=0}function P6(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}function H6(o){var i=this.__data__;if(Zl){var t=i[o];return t===Pm?void 0:t}return $n.call(i,o)?i[o]:void 0}function F6(o){var i=this.__data__;return Zl?i[o]!==void 0:$n.call(i,o)}function B6(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Zl&&i===void 0?Pm:i,this}Ma.prototype.clear=O6;Ma.prototype.delete=P6;Ma.prototype.get=H6;Ma.prototype.has=F6;Ma.prototype.set=B6;function Xn(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function V6(){this.__data__=[],this.size=0}function U6(o){var i=this.__data__,t=_p(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():A6.call(i,t,1),--this.size,!0}function j6(o){var i=this.__data__,t=_p(i,o);return t<0?void 0:i[t][1]}function G6(o){return _p(this.__data__,o)>-1}function W6(o,i){var t=this.__data__,r=_p(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}Xn.prototype.clear=V6;Xn.prototype.delete=U6;Xn.prototype.get=j6;Xn.prototype.has=G6;Xn.prototype.set=W6;function La(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function K6(){this.size=0,this.__data__={hash:new Ma,map:new(Jl||Xn),string:new Ma}}function Y6(o){var i=kp(this,o).delete(o);return this.size-=i?1:0,i}function Q6(o){return kp(this,o).get(o)}function X6(o){return kp(this,o).has(o)}function J6(o,i){var t=kp(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}La.prototype.clear=K6;La.prototype.delete=Y6;La.prototype.get=Q6;La.prototype.has=X6;La.prototype.set=J6;function yp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new La;++i<t;)this.add(o[i])}function Z6(o){return this.__data__.set(o,Pm),this}function eC(o){return this.__data__.has(o)}yp.prototype.add=yp.prototype.push=Z6;yp.prototype.has=eC;function Mo(o){var i=this.__data__=new Xn(o);this.size=i.size}function tC(){this.__data__=new Xn,this.size=0}function rC(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}function iC(o){return this.__data__.get(o)}function nC(o){return this.__data__.has(o)}function oC(o,i){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!Jl||r.length<X9-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new La(r)}return t.set(o,i),this.size=t.size,this}Mo.prototype.clear=tC;Mo.prototype.delete=rC;Mo.prototype.get=iC;Mo.prototype.has=nC;Mo.prototype.set=oC;function aC(o,i){var t=xp(o),r=!t&&wC(o),n=!t&&!r&&Om(o),a=!t&&!r&&!n&&sx(o),s=t||r||n||a,l=s?x6(o.length,String):[],p=l.length;for(var h in o)(i||$n.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||gC(h,p)))&&l.push(h);return l}function _p(o,i){for(var t=o.length;t--;)if(ix(o[t][0],i))return t;return-1}function sC(o,i,t){var r=i(o);return xp(o)?r:v6(r,t(o))}function tc(o){return o==null?o===void 0?i6:e6:Aa&&Aa in Object(o)?mC(o):xC(o)}function Ny(o){return ec(o)&&tc(o)==mp}function tx(o,i,t,r,n){return o===i?!0:o==null||i==null||!ec(o)&&!ec(i)?o!==o&&i!==i:lC(o,i,t,r,tx,n)}function lC(o,i,t,r,n,a){var s=xp(o),l=xp(i),p=s?Lm:Ao(o),h=l?Lm:Ao(i);p=p==mp?_s:p,h=h==mp?_s:h;var m=p==_s,f=h==_s,b=p==h;if(b&&Om(o)){if(!Om(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new Mo),s||sx(o)?rx(o,i,t,r,n,a):hC(o,i,p,t,r,n,a);if(!(t&wp)){var g=m&&$n.call(o,"__wrapped__"),v=f&&$n.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new Mo),n(y,S,t,r,a)}}return b?(a||(a=new Mo),uC(o,i,t,r,n,a)):!1}function cC(o){if(!ax(o)||vC(o))return!1;var i=nx(o)?$6:m6;return i.test(qa(o))}function dC(o){return ec(o)&&ox(o.length)&&!!st[tc(o)]}function pC(o){if(!yC(o))return L6(o);var i=[];for(var t in Object(o))$n.call(o,t)&&t!="constructor"&&i.push(t);return i}function rx(o,i,t,r,n,a){var s=t&wp,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o);if(h&&a.get(i))return h==i;var m=-1,f=!0,b=t&Py?new yp:void 0;for(a.set(o,i),a.set(i,o);++m<l;){var g=o[m],v=i[m];if(r)var y=s?r(v,g,m,i,o,a):r(g,v,m,o,i,a);if(y!==void 0){if(y)continue;f=!1;break}if(b){if(!y6(i,function(S,T){if(!z6(b,T)&&(g===S||n(g,S,t,r,a)))return b.push(T)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(o),a.delete(i),f}function hC(o,i,t,r,n,a,s){switch(t){case bp:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case Ky:return!(o.byteLength!=i.byteLength||!a(new Iy(o),new Iy(i)));case Fy:case By:case jy:return ix(+o,+i);case Vy:return o.name==i.name&&o.message==i.message;case Gy:case Wy:return o==i+"";case fp:var l=k6;case gp:var p=r&wp;if(l||(l=S6),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=Py,s.set(o,i);var m=rx(l(o),l(i),r,n,a,s);return s.delete(o),m;case r6:if(Mm)return Mm.call(o)==Mm.call(i)}return!1}function uC(o,i,t,r,n,a){var s=t&wp,l=Oy(o),p=l.length,h=Oy(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:$n.call(i,b)))return!1}var g=a.get(o);if(g&&a.get(i))return g==i;var v=!0;a.set(o,i),a.set(i,o);for(var y=s;++f<p;){b=l[f];var S=o[b],T=i[b];if(r)var N=s?r(T,S,b,i,o,a):r(S,T,b,o,i,a);if(!(N===void 0?S===T||n(S,T,t,r,a):N)){v=!1;break}y||(y=b=="constructor")}if(v&&!y){var U=o.constructor,I=i.constructor;U!=I&&"constructor"in o&&"constructor"in i&&!(typeof U=="function"&&U instanceof U&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(o),a.delete(i),v}function Oy(o){return sC(o,kC,fC)}function kp(o,i){var t=o.__data__;return bC(i)?t[typeof i=="string"?"string":"hash"]:t.map}function Cs(o,i){var t=_6(o,i);return cC(t)?t:void 0}function mC(o){var i=$n.call(o,Aa),t=o[Aa];try{o[Aa]=void 0;var r=!0}catch{}var n=Zy.call(o);return r&&(i?o[Aa]=t:delete o[Aa]),n}var fC=Dy?function(o){return o==null?[]:(o=Object(o),b6(Dy(o),function(i){return ex.call(o,i)}))}:CC,Ao=tc;(Im&&Ao(new Im(new ArrayBuffer(1)))!=bp||Jl&&Ao(new Jl)!=fp||Dm&&Ao(Dm.resolve())!=Ty||Rm&&Ao(new Rm)!=gp||Nm&&Ao(new Nm)!=qm)&&(Ao=function(o){var i=tc(o),t=i==_s?o.constructor:void 0,r=t?qa(t):"";if(r)switch(r){case q6:return bp;case I6:return fp;case D6:return Ty;case R6:return gp;case N6:return qm}return i});function gC(o,i){return i=i??Hy,!!i&&(typeof o=="number"||f6.test(o))&&o>-1&&o%1==0&&o<i}function bC(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function vC(o){return!!Ly&&Ly in o}function yC(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||zp;return o===t}function xC(o){return Zy.call(o)}function qa(o){if(o!=null){try{return Jy.call(o)}catch{}try{return o+""}catch{}}return""}function ix(o,i){return o===i||o!==o&&i!==i}var wC=Ny((function(){return arguments})())?Ny:function(o){return ec(o)&&$n.call(o,"callee")&&!ex.call(o,"callee")},xp=Array.isArray;function zC(o){return o!=null&&ox(o.length)&&!nx(o)}var Om=M6||SC;function _C(o,i){return tx(o,i)}function nx(o){if(!ax(o))return!1;var i=tc(o);return i==Uy||i==Z9||i==J9||i==t6}function ox(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Hy}function ax(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}function ec(o){return o!=null&&typeof o=="object"}var sx=My?w6(My):dC;function kC(o){return zC(o)?aC(o):pC(o)}function CC(){return[]}function SC(){return!1}ks.exports=_C});var lx=Fn(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var EC=Tm(),TC=Hm(),Fm;(function(o){function i(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let p=EC(s);l||(p=Object.keys(p).reduce((h,m)=>(p[m]!=null&&(h[m]=p[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(p[h]=a[h]);return Object.keys(p).length>0?p:void 0}o.compose=i;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((p,h)=>(TC(a[h],s[h])||(p[h]=s[h]===void 0?null:s[h]),p),{});return Object.keys(l).length>0?l:void 0}o.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((p,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(p[h]=s[h]),p),{});return Object.keys(a).reduce((p,h)=>(a[h]!==s[h]&&s[h]===void 0&&(p[h]=null),p),l)}o.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let p=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(p).length>0?p:void 0}o.transform=n})(Fm||(Fm={}));Bm.default=Fm});var jm=Fn(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var Vm;(function(o){function i(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}o.length=i})(Vm||(Vm={}));Um.default=Vm});var dx=Fn(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});var cx=jm(),Gm=class{constructor(i){this.ops=i,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(i){i||(i=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=cx.default.length(t);if(i>=n-r?(i=n-r,this.index+=1,this.offset=0):this.offset+=i,typeof t.delete=="number")return{delete:i};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=i:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,i):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?cx.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let i=this.ops[this.index];return i?typeof i.delete=="number"?"delete":typeof i.retain=="number"||typeof i.retain=="object"&&i.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let i=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=i,this.index=t,[r].concat(n)}}else return[]}};Wm.default=Gm});var ei=Fn((Zn,Sp)=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.AttributeMap=Zn.OpIterator=Zn.Op=void 0;var Cp=H1(),$C=Tm(),Km=Hm(),Ia=lx();Zn.AttributeMap=Ia.default;var Jn=jm();Zn.Op=Jn.default;var Ni=dx();Zn.OpIterator=Ni.default;var AC="\0",px=(o,i)=>{if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);let t=Object.keys(o)[0];if(!t||t!==Object.keys(i)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(i)[0]}`);return[t,o[t],i[t]]},eo=class o{constructor(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}static registerEmbed(i,t){this.handlers[i]=t}static unregisterEmbed(i){delete this.handlers[i]}static getHandler(i){let t=this.handlers[i];if(!t)throw new Error(`no handlers for embed type "${i}"`);return t}insert(i,t){let r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(i){return i<=0?this:this.push({delete:i})}retain(i,t){if(typeof i=="number"&&i<=0)return this;let r={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(i){let t=this.ops.length,r=this.ops[t-1];if(i=$C(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(i),this;if(Km(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this}}return t===this.ops.length?this.ops.push(i):this.ops.splice(t,0,i),this}chop(){let i=this.ops[this.ops.length-1];return i&&typeof i.retain=="number"&&!i.attributes&&this.ops.pop(),this}filter(i){return this.ops.filter(i)}forEach(i){this.ops.forEach(i)}map(i){return this.ops.map(i)}partition(i){let t=[],r=[];return this.forEach(n=>{(i(n)?t:r).push(n)}),[t,r]}reduce(i,t){return this.ops.reduce(i,t)}changeLength(){return this.reduce((i,t)=>t.insert?i+Jn.default.length(t):t.delete?i-t.delete:i,0)}length(){return this.reduce((i,t)=>i+Jn.default.length(t),0)}slice(i=0,t=1/0){let r=[],n=new Ni.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<i?s=n.next(i-a):(s=n.next(t-a),r.push(s)),a+=Jn.default.length(s)}return new o(r)}compose(i){let t=new Ni.default(this.ops),r=new Ni.default(i.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new o(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),p=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof p.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")p.retain==null?m.insert=p.insert:m.retain=p.retain;else{let b=p.retain==null?"insert":"retain",[g,v,y]=px(p[b],h.retain),S=o.getHandler(g);m[b]={[g]:S.compose(v,y,b==="retain")}}let f=Ia.default.compose(p.attributes,h.attributes,typeof p.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&Km(s.ops[s.ops.length-1],m)){let b=new o(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof p.retain=="number"||typeof p.retain=="object"&&p.retain!==null)&&s.push(h)}return s.chop()}concat(i){let t=new o(this.ops.slice());return i.ops.length>0&&(t.push(i.ops[0]),t.ops=t.ops.concat(i.ops.slice(1))),t}diff(i,t){if(this.ops===i.ops)return new o;let r=[this,i].map(p=>p.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:AC;let m=p===i?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new o,a=Cp(r[0],r[1],t,!0),s=new Ni.default(this.ops),l=new Ni.default(i.ops);return a.forEach(p=>{let h=p[1].length;for(;h>0;){let m=0;switch(p[0]){case Cp.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case Cp.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case Cp.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);Km(f.insert,b.insert)?n.retain(m,Ia.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(i,t=`
2
+ `){let r=new Ni.default(this.ops),n=new o,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Jn.default.length(s)-r.peekLength(),p=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(p<0)n.push(r.next());else if(p>0)n.push(r.next(p));else{if(i(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new o}}n.length()>0&&i(n,{},a)}invert(i){let t=new o;return this.reduce((r,n)=>{if(n.insert)t.delete(Jn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return i.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Jn.default.length(l),Ia.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=i.slice(r,r+1),s=new Ni.default(a.ops).next(),[l,p,h]=px(n.retain,s.insert),m=o.getHandler(l);return t.retain({[l]:m.invert(p,h)},Ia.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(i,t=!1){if(t=!!t,typeof i=="number")return this.transformPosition(i,t);let r=i,n=new Ni.default(this.ops),a=new Ni.default(r.ops),s=new o;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Jn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),p=n.next(l),h=a.next(l);if(p.delete)continue;if(h.delete)s.push(h);else{let m=p.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=o.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,Ia.default.transform(p.attributes,h.attributes,t))}}return s.chop()}transformPosition(i,t=!1){t=!!t;let r=new Ni.default(this.ops),n=0;for(;r.hasNext()&&n<=i;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){i-=Math.min(a,i-n);continue}else s==="insert"&&(n<i||!t)&&(i+=a);n+=a}return i}};eo.Op=Jn.default;eo.OpIterator=Ni.default;eo.AttributeMap=Ia.default;eo.handlers={};Zn.default=eo;typeof Sp=="object"&&(Sp.exports=eo,Sp.exports.default=eo)});var Ez=Fn((Npe,mf)=>{"use strict";var hA=Object.prototype.hasOwnProperty,Ur="~";function hc(){}Object.create&&(hc.prototype=Object.create(null),new hc().__proto__||(Ur=!1));function uA(o,i,t){this.fn=o,this.context=i,this.once=t||!1}function Sz(o,i,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new uA(t,r||o,n),s=Ur?Ur+i:i;return o._events[s]?o._events[s].fn?o._events[s]=[o._events[s],a]:o._events[s].push(a):(o._events[s]=a,o._eventsCount++),o}function Zp(o,i){--o._eventsCount===0?o._events=new hc:delete o._events[i]}function qr(){this._events=new hc,this._eventsCount=0}qr.prototype.eventNames=function(){var i=[],t,r;if(this._eventsCount===0)return i;for(r in t=this._events)hA.call(t,r)&&i.push(Ur?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i};qr.prototype.listeners=function(i){var t=Ur?Ur+i:i,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};qr.prototype.listenerCount=function(i){var t=Ur?Ur+i:i,r=this._events[t];return r?r.fn?1:r.length:0};qr.prototype.emit=function(i,t,r,n,a,s){var l=Ur?Ur+i:i;if(!this._events[l])return!1;var p=this._events[l],h=arguments.length,m,f;if(p.fn){switch(p.once&&this.removeListener(i,p.fn,void 0,!0),h){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,t),!0;case 3:return p.fn.call(p.context,t,r),!0;case 4:return p.fn.call(p.context,t,r,n),!0;case 5:return p.fn.call(p.context,t,r,n,a),!0;case 6:return p.fn.call(p.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];p.fn.apply(p.context,m)}else{var b=p.length,g;for(f=0;f<b;f++)switch(p[f].once&&this.removeListener(i,p[f].fn,void 0,!0),h){case 1:p[f].fn.call(p[f].context);break;case 2:p[f].fn.call(p[f].context,t);break;case 3:p[f].fn.call(p[f].context,t,r);break;case 4:p[f].fn.call(p[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];p[f].fn.apply(p[f].context,m)}}return!0};qr.prototype.on=function(i,t,r){return Sz(this,i,t,r,!1)};qr.prototype.once=function(i,t,r){return Sz(this,i,t,r,!0)};qr.prototype.removeListener=function(i,t,r,n){var a=Ur?Ur+i:i;if(!this._events[a])return this;if(!t)return Zp(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&Zp(this,a);else{for(var l=0,p=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&p.push(s[l]);p.length?this._events[a]=p.length===1?p[0]:p:Zp(this,a)}return this};qr.prototype.removeAllListeners=function(i){var t;return i?(t=Ur?Ur+i:i,this._events[t]&&Zp(this,t)):(this._events=new hc,this._eventsCount=0),this};qr.prototype.off=qr.prototype.removeListener;qr.prototype.addListener=qr.prototype.on;qr.prefixed=Ur;qr.EventEmitter=qr;typeof mf<"u"&&(mf.exports=qr)});var bl=globalThis,Qg=o=>o,rd=bl.trustedTypes,Xg=rd?rd.createPolicy("lit-html",{createHTML:o=>o}):void 0,Yh="$lit$",Bn=`lit$${Math.random().toFixed(9).slice(2)}$`,Qh="?"+Bn,u3=`<${Qh}>`,pa=document,vl=()=>pa.createComment(""),yl=o=>o===null||typeof o!="object"&&typeof o!="function",Xh=Array.isArray,ib=o=>Xh(o)||typeof o?.[Symbol.iterator]=="function",Kh=`[
3
+ \f\r]`,gl=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Jg=/-->/g,Zg=/>/g,ca=RegExp(`>|${Kh}(?:([^\\s"'>=/]+)(${Kh}*=${Kh}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),eb=/'/g,tb=/"/g,nb=/^(?:script|style|textarea|title)$/i,Jh=o=>(i,...t)=>({_$litType$:o,strings:i,values:t}),u=Jh(1),Xi=Jh(2),ob=Jh(3),vt=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),rb=new WeakMap,da=pa.createTreeWalker(pa,129);function ab(o,i){if(!Xh(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xg!==void 0?Xg.createHTML(i):i}var sb=(o,i)=>{let t=o.length-1,r=[],n,a=i===2?"<svg>":i===3?"<math>":"",s=gl;for(let l=0;l<t;l++){let p=o[l],h,m,f=-1,b=0;for(;b<p.length&&(s.lastIndex=b,m=s.exec(p),m!==null);)b=s.lastIndex,s===gl?m[1]==="!--"?s=Jg:m[1]!==void 0?s=Zg:m[2]!==void 0?(nb.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=ca):m[3]!==void 0&&(s=ca):s===ca?m[0]===">"?(s=n??gl,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?ca:m[3]==='"'?tb:eb):s===tb||s===eb?s=ca:s===Jg||s===Zg?s=gl:(s=ca,n=void 0);let g=s===ca&&o[l+1].startsWith("/>")?" ":"";a+=s===gl?p+u3:f>=0?(r.push(h),p.slice(0,f)+Yh+p.slice(f)+Bn+g):p+Bn+(f===-2?l:g)}return[ab(o,a+(o[t]||"<?>")+(i===2?"</svg>":i===3?"</math>":"")),r]},xl=class o{constructor({strings:i,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=i.length-1,p=this.parts,[h,m]=sb(i,t);if(this.el=o.createElement(h,r),da.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=da.nextNode())!==null&&p.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Yh)){let b=m[s++],g=n.getAttribute(f).split(Bn),v=/([.?@])?(.*)/.exec(b);p.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?nd:v[1]==="?"?od:v[1]==="@"?ad:ua}),n.removeAttribute(f)}else f.startsWith(Bn)&&(p.push({type:6,index:a}),n.removeAttribute(f));if(nb.test(n.tagName)){let f=n.textContent.split(Bn),b=f.length-1;if(b>0){n.textContent=rd?rd.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],vl()),da.nextNode(),p.push({type:2,index:++a});n.append(f[b],vl())}}}else if(n.nodeType===8)if(n.data===Qh)p.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Bn,f+1))!==-1;)p.push({type:7,index:a}),f+=Bn.length-1}a++}}static createElement(i,t){let r=pa.createElement("template");return r.innerHTML=i,r}};function ha(o,i,t=o,r){if(i===vt)return i;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=yl(i)?void 0:i._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(i=ha(o,n._$AS(o,i.values),n,r)),i}var id=class{constructor(i,t){this._$AV=[],this._$AN=void 0,this._$AD=i,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(i){let{el:{content:t},parts:r}=this._$AD,n=(i?.creationScope??pa).importNode(t,!0);da.currentNode=n;let a=da.nextNode(),s=0,l=0,p=r[0];for(;p!==void 0;){if(s===p.index){let h;p.type===2?h=new Xa(a,a.nextSibling,this,i):p.type===1?h=new p.ctor(a,p.name,p.strings,this,i):p.type===6&&(h=new sd(a,this,i)),this._$AV.push(h),p=r[++l]}s!==p?.index&&(a=da.nextNode(),s++)}return da.currentNode=pa,n}p(i){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(i,r,t),t+=r.strings.length-2):r._$AI(i[t])),t++}},Xa=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(i,t,r,n){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=i,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let i=this._$AA.parentNode,t=this._$AM;return t!==void 0&&i?.nodeType===11&&(i=t.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,t=this){i=ha(this,i,t),yl(i)?i===B||i==null||i===""?(this._$AH!==B&&this._$AR(),this._$AH=B):i!==this._$AH&&i!==vt&&this._(i):i._$litType$!==void 0?this.$(i):i.nodeType!==void 0?this.T(i):ib(i)?this.k(i):this._(i)}O(i){return this._$AA.parentNode.insertBefore(i,this._$AB)}T(i){this._$AH!==i&&(this._$AR(),this._$AH=this.O(i))}_(i){this._$AH!==B&&yl(this._$AH)?this._$AA.nextSibling.data=i:this.T(pa.createTextNode(i)),this._$AH=i}$(i){let{values:t,_$litType$:r}=i,n=typeof r=="number"?this._$AC(i):(r.el===void 0&&(r.el=xl.createElement(ab(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new id(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(i){let t=rb.get(i.strings);return t===void 0&&rb.set(i.strings,t=new xl(i)),t}k(i){Xh(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of i)n===t.length?t.push(r=new o(this.O(vl()),this.O(vl()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(i=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);i!==this._$AB;){let r=Qg(i).nextSibling;Qg(i).remove(),i=r}}setConnected(i){this._$AM===void 0&&(this._$Cv=i,this._$AP?.(i))}},ua=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(i,t,r,n,a){this.type=1,this._$AH=B,this._$AN=void 0,this.element=i,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=B}_$AI(i,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)i=ha(this,i,t,0),s=!yl(i)||i!==this._$AH&&i!==vt,s&&(this._$AH=i);else{let l=i,p,h;for(i=a[0],p=0;p<a.length-1;p++)h=ha(this,l[r+p],t,p),h===vt&&(h=this._$AH[p]),s||(s=!yl(h)||h!==this._$AH[p]),h===B?i=B:i!==B&&(i+=(h??"")+a[p+1]),this._$AH[p]=h}s&&!n&&this.j(i)}j(i){i===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,i??"")}},nd=class extends ua{constructor(){super(...arguments),this.type=3}j(i){this.element[this.name]=i===B?void 0:i}},od=class extends ua{constructor(){super(...arguments),this.type=4}j(i){this.element.toggleAttribute(this.name,!!i&&i!==B)}},ad=class extends ua{constructor(i,t,r,n,a){super(i,t,r,n,a),this.type=5}_$AI(i,t=this){if((i=ha(this,i,t,0)??B)===vt)return;let r=this._$AH,n=i===B&&r!==B||i.capture!==r.capture||i.once!==r.once||i.passive!==r.passive,a=i!==B&&(r===B||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,i):this._$AH.handleEvent(i)}},sd=class{constructor(i,t,r){this.element=i,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(i){ha(this,i)}},lb={M:Yh,P:Bn,A:Qh,C:1,L:sb,R:id,D:ib,V:ha,I:Xa,H:ua,N:od,U:ad,B:nd,F:sd},m3=bl.litHtmlPolyfillSupport;m3?.(xl,Xa),(bl.litHtmlVersions??(bl.litHtmlVersions=[])).push("3.3.3");var Ja=(o,i,t)=>{let r=t?.renderBefore??i,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Xa(i.insertBefore(vl(),a),a,void 0,t??{})}return n._$AI(o),n};var lr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yt=o=>(...i)=>({_$litDirective$:o,values:i}),rr=class{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,t,r){this._$Ct=i,this._$AM=t,this._$Ci=r}_$AS(i,t){return this.update(i,t)}update(i,t){return this.render(...t)}};var M=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(i=>o[i]).join(" ")+" "}update(o,[i]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in i)i[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(i)}let t=o.element.classList;for(let r of this.st)r in i||(t.remove(r),this.st.delete(r));for(let r in i){let n=!!i[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return vt}});var ld=globalThis,cd=ld.ShadowRoot&&(ld.ShadyCSS===void 0||ld.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zh=Symbol(),cb=new WeakMap,wl=class{constructor(i,t,r){if(this._$cssResult$=!0,r!==Zh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=t}get styleSheet(){let i=this.o,t=this.t;if(cd&&i===void 0){let r=t!==void 0&&t.length===1;r&&(i=cb.get(t)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),r&&cb.set(t,i))}return i}toString(){return this.cssText}},z=o=>new wl(typeof o=="string"?o:o+"",void 0,Zh),_=(o,...i)=>{let t=o.length===1?o[0]:i.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[a+1],o[0]);return new wl(t,o,Zh)},db=(o,i)=>{if(cd)o.adoptedStyleSheets=i.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of i){let r=document.createElement("style"),n=ld.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,o.appendChild(r)}},eu=cd?o=>o:o=>o instanceof CSSStyleSheet?(i=>{let t="";for(let r of i.cssRules)t+=r.cssText;return z(t)})(o):o;var{is:f3,defineProperty:g3,getOwnPropertyDescriptor:b3,getOwnPropertyNames:v3,getOwnPropertySymbols:y3,getPrototypeOf:x3}=Object,mo=globalThis,pb=mo.trustedTypes,w3=pb?pb.emptyScript:"",z3=mo.reactiveElementPolyfillSupport,zl=(o,i)=>o,fo={toAttribute(o,i){switch(i){case Boolean:o=o?w3:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,i){let t=o;switch(i){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Za=(o,i)=>!f3(o,i),hb={attribute:!0,type:String,converter:fo,reflect:!1,useDefault:!1,hasChanged:Za};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),mo.litPropertyMetadata??(mo.litPropertyMetadata=new WeakMap);var Vn=class extends HTMLElement{static addInitializer(i){this._$Ei(),(this.l??(this.l=[])).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,t=hb){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(i,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(i,r,t);n!==void 0&&g3(this.prototype,i,n)}}static getPropertyDescriptor(i,t,r){let{get:n,set:a}=b3(this.prototype,i)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(i,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){return this.elementProperties.get(i)??hb}static _$Ei(){if(this.hasOwnProperty(zl("elementProperties")))return;let i=x3(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(zl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zl("properties"))){let t=this.properties,r=[...v3(t),...y3(t)];for(let n of r)this.createProperty(n,t[n])}let i=this[Symbol.metadata];if(i!==null){let t=litPropertyMetadata.get(i);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let t=[];if(Array.isArray(i)){let r=new Set(i.flat(1/0).reverse());for(let n of r)t.unshift(eu(n))}else i!==void 0&&t.push(eu(i));return t}static _$Eu(i,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(i=>i(this))}addController(i){(this._$EO??(this._$EO=new Set)).add(i),this.renderRoot!==void 0&&this.isConnected&&i.hostConnected?.()}removeController(i){this._$EO?.delete(i)}_$E_(){let i=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(i.set(r,this[r]),delete this[r]);i.size>0&&(this._$Ep=i)}createRenderRoot(){let i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return db(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(i=>i.hostConnected?.())}enableUpdating(i){}disconnectedCallback(){this._$EO?.forEach(i=>i.hostDisconnected?.())}attributeChangedCallback(i,t,r){this._$AK(i,r)}_$ET(i,t){let r=this.constructor.elementProperties.get(i),n=this.constructor._$Eu(i,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:fo).toAttribute(t,r.type);this._$Em=i,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(i,t){let r=this.constructor,n=r._$Eh.get(i);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:fo;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(i,t,r,n=!1,a){if(i!==void 0){let s=this.constructor;if(n===!1&&(a=this[i]),r??(r=s.getPropertyOptions(i)),!((r.hasChanged??Za)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(i)&&!this.hasAttribute(s._$Eu(i,r))))return;this.C(i,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(i)&&(this._$Ej.set(i,s??t??this[i]),a!==!0||s!==void 0)||(this._$AL.has(i)||(this.hasUpdated||r||(t=void 0),this._$AL.set(i,t)),n===!0&&this._$Em!==i&&(this._$Eq??(this._$Eq=new Set)).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let i=!1,t=this._$AL;try{i=this.shouldUpdate(t),i?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw i=!1,this._$EM(),r}i&&this._$AE(t)}willUpdate(i){}_$AE(i){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(i){}firstUpdated(i){}};Vn.elementStyles=[],Vn.shadowRootOptions={mode:"open"},Vn[zl("elementProperties")]=new Map,Vn[zl("finalized")]=new Map,z3?.({ReactiveElement:Vn}),(mo.reactiveElementVersions??(mo.reactiveElementVersions=[])).push("2.1.2");var _l=globalThis,go=class extends Vn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let i=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=i.firstChild),i}update(i){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Do=Ja(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};go._$litElement$=!0,go.finalized=!0,_l.litElementHydrateSupport?.({LitElement:go});var _3=_l.litElementPolyfillSupport;_3?.({LitElement:go});(_l.litElementVersions??(_l.litElementVersions=[])).push("4.2.2");var ub=new WeakMap;function mb(o){let i=ub.get(o);return i||(i=window.getComputedStyle(o,null),ub.set(o,i)),i}function k3(o){if(typeof o.checkVisibility=="function")return o.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let i=mb(o);return i.visibility!=="hidden"&&i.display!=="none"}function C3(o){let i=mb(o),{overflowY:t,overflowX:r}=i;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:o.scrollHeight>o.clientHeight&&t==="auto"||o.scrollWidth>o.clientWidth&&r==="auto"}function S3(o){let i=o.tagName.toLowerCase(),t=Number(o.getAttribute("tabindex"));return o.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||o.hasAttribute("disabled")||o.closest("[inert]")||i==="input"&&o.getAttribute("type")==="radio"&&!o.hasAttribute("checked")||!k3(o)?!1:(i==="audio"||i==="video")&&o.hasAttribute("controls")||o.hasAttribute("tabindex")||o.hasAttribute("contenteditable")&&o.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(i)?!0:C3(o)}function fb(o){let i=tu(o),t=i[0]??null,r=i[i.length-1]??null;return{start:t,end:r}}function E3(o,i){return o.getRootNode({composed:!0})?.host!==i}function tu(o){let i=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||i.has(n))return;i.set(n,!0),!t.includes(n)&&S3(n)&&t.push(n),n instanceof HTMLSlotElement&&E3(n,o)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(o),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var gb=new WeakMap,ru=class{constructor(i){this.handleKeyDown=i=>{if(i.key==="Enter"){if(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||i.isComposing||i.defaultPrevented)return;let r=i.target;if(this.isSelectOption(r)){i.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){i.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}i.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(i.key==="ArrowDown"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusNextControl(t))}}if(i.key==="ArrowUp"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusPreviousControl(t))}}};this.form=i,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(i){let t=i.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&i.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(i){let t=i.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(i){return i.tagName.toLowerCase()==="zn-option"}findParentSelect(i){let t=i;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(i){let t=i;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(i){let t=i.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let i=ma.get(this.form);if(!i)return!0;for(let t of i){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let i=tu(this.form),t=[],r=new Set;for(let n of i){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(i,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===i)return r;let a=i.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(i)||i.contains(n))return r}return-1}focusNextControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let i=this.form.querySelector('[type="submit"]');if(i)i.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function bb(o){let i=gb.get(o);return i||(i=new ru(o),gb.set(o,i)),i}function cr(o){return`#${CSS.escape(o.startsWith("#")?o.slice(1):o)}`}function T3(o,i=document){let t=i.querySelector(o);if(t)return t;for(let r of i.querySelectorAll("*"))if(r.shadowRoot){let n=T3(o,r.shadowRoot);if(n)return n}return null}function $3(o,i=document,t=[]){t.push(...i.querySelectorAll(o));for(let r of i.querySelectorAll("*"))r.shadowRoot&&$3(o,r.shadowRoot,t);return t}function Ge(o,i,t){let r=[],n=(a,s)=>{if(!a||a.nodeType!==Node.ELEMENT_NODE||s&&t&&a.matches(t))return;a.matches(o)&&r.push(a);let l=a.children;if(l.length)for(let h of l)n(h,!0);let p=a.shadowRoot;if(p){let h=p.children;for(let m of h)n(m,!0)}};return n(i,!1),r}var kr=class{constructor(i,t,r=0){this.storage=i,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(i){return!i||i.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+i))}stripTtl(i){if(i===null)return null;let t=i.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(i,t,r){!i||i.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+i,r+","+t))}set(i,t){this.setWithTTL(i,t,this.ttl)}remove(i){this.storage.removeItem(this.prefix+i)}cleanup(){for(let i=0;i<this.storage.length;i++){let t=this.storage.key(i);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var ma=new WeakMap,kl=new WeakMap,Cl=new WeakMap,dd=new WeakMap,iu=new WeakSet,pd=new WeakMap,zb="znform:";function nu(o=!1){try{return o?window.localStorage:window.sessionStorage}catch{return null}}function A3(o=!1,i=0){let t=nu(o);return t?new kr(t,zb,i):null}function vb(o){let i=o?.getAttribute("store-ttl");return i&&Number(i)||0}function yb(o){return!!o?.hasAttribute("local-storage")}function _b(o){return o?.getAttribute("store-key")||""}function M3(o){return o.getAttribute("store-key")||""}function L3(o){return o.getAttribute("name")||("name"in o&&typeof o.name=="string"?o.name:"")}function kb(o,i){let t=M3(o),r=_b(i);if(t)return r?`${r}:${t}`:t;let n=L3(o);return r&&n?`${r}:${n}`:""}function Cb(o,i){let t=yb(o)||yb(i),r=vb(o)||vb(i);return A3(t,r)}function Sb(o,i){let t=kb(o,i),n=(t?Cb(o,i):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function Eb(o,i,t){let r=kb(o,i),n=r?Cb(o,i):null;n&&n.set(r,JSON.stringify(t))}function q3(o){return o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement}function I3(o){return o instanceof HTMLInputElement&&(o.type==="checkbox"||o.type==="radio")?{checked:o.checked,value:o.value}:{value:o.value}}function D3(o){o.querySelectorAll("input, textarea, select").forEach(t=>{let r=Sb(t,o);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function xb(o,i){!q3(o)||o.form!==i||Eb(o,i,I3(o))}function R3(o,i){let t={value:i};return"checked"in o&&typeof o.checked=="boolean"&&(t.checked=o.checked),"indeterminate"in o&&typeof o.indeterminate=="boolean"&&(t.indeterminate=o.indeterminate),t}function wb(o,i){let t=[],r=zb+i;for(let n=0;n<o.length;n++){let a=o.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>o.removeItem(n))}function N3(o){let i=typeof o=="string"?o:_b(o);if(!i)return;let t=nu(!0),r=nu(!1);t&&wb(t,i),r&&r!==t&&wb(r,i)}var re=class{constructor(i,t){this.handleFormData=i=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{i.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?i.formData.append(r,m,g):i.formData.append(r,m)},p=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(p(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(p(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=i=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&ma.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(i.preventDefault(),i.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=i=>{if(i.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),pd.set(this.host,[])};this.handleInteraction=i=>{let t=pd.get(this.host);t.includes(i.type)||t.push(i.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let i=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return i?.setAttribute("disabled","disabled"),!1}return i?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let i=this.form.querySelectorAll("*");for(let t of i)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=i).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(cr(n));if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let i=this.options.form(this.host);i&&this.attachForm(i),pd.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),i&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),pd.delete(this.host),this.options.assumeInteractionOn.forEach(i=>{this.host.removeEventListener(i,this.handleInteraction)})}hostUpdated(){let i=this.options.form(this.host);i||this.detachForm(),i&&this.form!==i&&(this.detachForm(),this.attachForm(i)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(i){if(!i){this.form=void 0;return}this.form=i,ma.has(this.form)?ma.get(this.form).add(this.host):ma.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&bb(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),kl.has(this.form)||(kl.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Cl.has(this.form)||(Cl.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let i=ma.get(this.form);i&&(i.delete(this.host),i.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),kl.has(this.form)&&(this.form.reportValidity=kl.get(this.form),kl.delete(this.form)),Cl.has(this.form)&&(this.form.checkValidity=Cl.get(this.form),Cl.delete(this.form)),this.form=void 0))}attachFormPersistence(i){if(dd.has(i))return;let t=n=>xb(n.target,i),r=n=>xb(n.target,i);i.addEventListener("input",t),i.addEventListener("change",r),dd.set(i,{handleInput:t,handleChange:r}),D3(i)}detachFormPersistence(i){let t=dd.get(i);t&&(i.removeEventListener("input",t.handleInput),i.removeEventListener("change",t.handleChange),dd.delete(i))}restorePersistedValue(){let i=Sb(this.host,this.form);i&&("checked"in this.host&&typeof i.checked=="boolean"?this.options.setValue(this.host,i.checked):"value"in i&&this.options.setValue(this.host,i.value),"indeterminate"in this.host&&typeof i.indeterminate=="boolean"&&(this.host.indeterminate=i.indeterminate))}persistHostValue(){Eb(this.host,this.form,R3(this.host,this.options.value(this.host)))}setUserInteracted(i,t){t?iu.add(i):iu.delete(i),i.requestUpdate()}doAction(i,t){if(this.form){let r=document.createElement("button");r.type=i,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(i){this.doAction("reset",i)}submit(i){this.doAction("submit",i)}setValidity(i){let t=this.host,r=!!iu.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!i),t.toggleAttribute("data-valid",i),t.toggleAttribute("data-user-invalid",!i&&r),t.toggleAttribute("data-user-valid",i&&r)}updateValidity(){let i=this.host;this.setValidity(i.validity?.valid)}emitInvalidEvent(i){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});i||t.preventDefault(),this.host.dispatchEvent(t)||i?.preventDefault()}},pt=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),hd=Object.freeze({...pt,customError:!0,valid:!1}),ud=Object.freeze({...pt,valueMissing:!0,valid:!1});var Y=class{constructor(i,...t){this.slotNames=[];this.handleSlotChange=i=>{let t=i.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=i).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)!==null}test(i){return i==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(i)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(i){return this.host.querySelectorAll(`:scope > [slot="${i}"]`)}};function Tb(o){if(!o)return"";let i=o.assignedNodes({flatten:!0}),t="";return[...i].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var Ab=Symbol.for(""),O3=o=>{if(o?.r===Ab)return o?._$litStatic$};var Ai=(o,...i)=>({_$litStatic$:i.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
5
+ take care to ensure page security.`)})(r)+o[n+1],o[0]),r:Ab}),$b=new Map,ou=o=>(i,...t)=>{let r=t.length,n,a,s=[],l=[],p,h=0,m=!1;for(;h<r;){for(p=i[h];h<r&&(a=t[h],(n=O3(a))!==void 0);)p+=n+i[++h],m=!0;h!==r&&l.push(a),s.push(p),h++}if(h===r&&s.push(i[r]),m){let f=s.join("$$lit$$");(i=$b.get(f))===void 0&&(s.raw=s,$b.set(f,i=s)),t=l}return o(i,...t)},ke=ou(u),jD=ou(Xi),GD=ou(ob);var P=o=>o??B;var Mb=o=>(i,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,i)}):customElements.define(o,i)};var P3={attribute:!0,type:String,converter:fo,reflect:!1,hasChanged:Za},H3=(o=P3,i,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(t.name,o),r==="accessor"){let{name:s}=t;return{set(l){let p=i.get.call(this);i.set.call(this,l),this.requestUpdate(s,p,o,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,o,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let p=this[s];i.call(this,l),this.requestUpdate(s,p,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(i,t)=>typeof t=="object"?H3(o,i,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(o,i,t)}function R(o){return d({...o,state:!0,attribute:!1})}function Lb(o){return(i,t)=>{let r=typeof i=="function"?i:i[t];Object.assign(r,o)}}var xn=(o,i,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof i!="object"&&Object.defineProperty(o,i,t),t);function F(o,i){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(o)??null;if(i){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let p=Symbol();return{get(){return this[p]},set(h){this[p]=h}}})();return xn(t,r,{get(){let p=s.call(this);return p===void 0&&(p=a(this),(p!==null||this.hasUpdated)&&l.call(this,p)),p}})}return xn(t,r,{get(){return a(this)}})}}var F3;function es(o){return(i,t)=>xn(i,t,{get(){return(this.renderRoot??F3??(F3=document.createDocumentFragment())).querySelectorAll(o)}})}function qb(o){return(i,t)=>xn(i,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(o)??null}})}function Ib(o){return(i,t)=>{let{slot:r}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return xn(i,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(o)??[]}})}}var Db="important",B3=" !"+Db,xt=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((i,t)=>{let r=o[t];return r==null?i:i+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(o,[i]){let{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(i)),this.render(i);for(let r of this.ft)i[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in i){let n=i[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(B3);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?Db:""):t[r]=n}}return vt}});function K(o,i){let t={waitUntilFirstUpdate:!1,...i};return(r,n)=>{let{update:a}=r,s=Array.isArray(o)?o:[o];r.update=function(l){s.forEach(p=>{let h=p;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var V3=Object.defineProperty,U3=(o,i,t)=>i in o?V3(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,au=(o,i,t)=>(U3(o,typeof i!="symbol"?i+"":i,t),t),j3=(o,i,t)=>{if(!i.has(o))throw TypeError("Cannot "+t)},su=(o,i)=>{if(Object(i)!==i)throw TypeError('Cannot use the "in" operator on this value');return o.has(i)},md=(o,i,t)=>{if(i.has(o))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(o):i.set(o,t)},Rb=(o,i,t)=>(j3(o,i,"access private method"),t);function Nb(o,i){return Object.is(o,i)}var Ot=null,Sl=!1,fd=1,gd=Symbol("SIGNAL");function ts(o){let i=Ot;return Ot=o,i}function G3(){return Ot}function W3(){return Sl}var hu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function bd(o){if(Sl)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ot===null)return;Ot.consumerOnSignalRead(o);let i=Ot.nextProducerIndex++;if(rs(Ot),i<Ot.producerNode.length&&Ot.producerNode[i]!==o&&du(Ot)){let t=Ot.producerNode[i];vd(t,Ot.producerIndexOfThis[i])}Ot.producerNode[i]!==o&&(Ot.producerNode[i]=o,Ot.producerIndexOfThis[i]=du(Ot)?Hb(o,Ot,i):0),Ot.producerLastReadVersion[i]=o.version}function K3(){fd++}function Ob(o){if(!(!o.dirty&&o.lastCleanEpoch===fd)){if(!o.producerMustRecompute(o)&&!Z3(o)){o.dirty=!1,o.lastCleanEpoch=fd;return}o.producerRecomputeValue(o),o.dirty=!1,o.lastCleanEpoch=fd}}function Pb(o){if(o.liveConsumerNode===void 0)return;let i=Sl;Sl=!0;try{for(let t of o.liveConsumerNode)t.dirty||Q3(t)}finally{Sl=i}}function Y3(){return Ot?.consumerAllowSignalWrites!==!1}function Q3(o){var i;o.dirty=!0,Pb(o),(i=o.consumerMarkedDirty)==null||i.call(o.wrapper??o)}function X3(o){return o&&(o.nextProducerIndex=0),ts(o)}function J3(o,i){if(ts(i),!(!o||o.producerNode===void 0||o.producerIndexOfThis===void 0||o.producerLastReadVersion===void 0)){if(du(o))for(let t=o.nextProducerIndex;t<o.producerNode.length;t++)vd(o.producerNode[t],o.producerIndexOfThis[t]);for(;o.producerNode.length>o.nextProducerIndex;)o.producerNode.pop(),o.producerLastReadVersion.pop(),o.producerIndexOfThis.pop()}}function Z3(o){rs(o);for(let i=0;i<o.producerNode.length;i++){let t=o.producerNode[i],r=o.producerLastReadVersion[i];if(r!==t.version||(Ob(t),r!==t.version))return!0}return!1}function Hb(o,i,t){var r;if(uu(o),rs(o),o.liveConsumerNode.length===0){(r=o.watched)==null||r.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)o.producerIndexOfThis[n]=Hb(o.producerNode[n],o,n)}return o.liveConsumerIndexOfThis.push(t),o.liveConsumerNode.push(i)-1}function vd(o,i){var t;if(uu(o),rs(o),typeof ngDevMode<"u"&&ngDevMode&&i>=o.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${i} is out of bounds of ${o.liveConsumerNode.length} consumers)`);if(o.liveConsumerNode.length===1){(t=o.unwatched)==null||t.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)vd(o.producerNode[n],o.producerIndexOfThis[n])}let r=o.liveConsumerNode.length-1;if(o.liveConsumerNode[i]=o.liveConsumerNode[r],o.liveConsumerIndexOfThis[i]=o.liveConsumerIndexOfThis[r],o.liveConsumerNode.length--,o.liveConsumerIndexOfThis.length--,i<o.liveConsumerNode.length){let n=o.liveConsumerIndexOfThis[i],a=o.liveConsumerNode[i];rs(a),a.producerIndexOfThis[n]=i}}function du(o){var i;return o.consumerIsAlwaysLive||(((i=o?.liveConsumerNode)==null?void 0:i.length)??0)>0}function rs(o){o.producerNode??(o.producerNode=[]),o.producerIndexOfThis??(o.producerIndexOfThis=[]),o.producerLastReadVersion??(o.producerLastReadVersion=[])}function uu(o){o.liveConsumerNode??(o.liveConsumerNode=[]),o.liveConsumerIndexOfThis??(o.liveConsumerIndexOfThis=[])}function Fb(o){if(Ob(o),bd(o),o.value===pu)throw o.error;return o.value}function e5(o){let i=Object.create(t5);i.computation=o;let t=()=>Fb(i);return t[gd]=i,t}var lu=Symbol("UNSET"),cu=Symbol("COMPUTING"),pu=Symbol("ERRORED"),t5={...hu,value:lu,dirty:!0,error:null,equal:Nb,producerMustRecompute(o){return o.value===lu||o.value===cu},producerRecomputeValue(o){if(o.value===cu)throw new Error("Detected cycle in computations.");let i=o.value;o.value=cu;let t=X3(o),r,n=!1;try{r=o.computation.call(o.wrapper),n=i!==lu&&i!==pu&&o.equal.call(o.wrapper,i,r)}catch(a){r=pu,o.error=a}finally{J3(o,t)}if(n){o.value=i;return}o.value=r,o.version++}};function r5(){throw new Error}var i5=r5;function n5(){i5()}function o5(o){let i=Object.create(l5);i.value=o;let t=()=>(bd(i),i.value);return t[gd]=i,t}function a5(){return bd(this),this.value}function s5(o,i){Y3()||n5(),o.equal.call(o.wrapper,o.value,i)||(o.value=i,c5(o))}var l5={...hu,equal:Nb,value:void 0};function c5(o){o.version++,K3(),Pb(o)}var dr=Symbol("node"),it;(o=>{var i,t,r,n,a,s;class l{constructor(m,f={}){md(this,t),au(this,i);let g=o5(m)[gd];if(this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return a5.call(this[dr])}set(m){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(W3())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[dr];s5(f,m)}}i=dr,t=new WeakSet,r=function(){},o.isState=h=>typeof h=="object"&&su(t,h),o.State=l;class p{constructor(m,f){md(this,a),au(this,n);let g=e5(m)[gd];if(g.consumerAllowSignalWrites=!0,this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Fb(this[dr])}}n=dr,a=new WeakSet,s=function(){},o.isComputed=h=>typeof h=="object"&&su(a,h),o.Computed=p,(h=>{var m,f,b,g,v;function y($){let L,W=null;try{W=ts(null),L=$()}finally{ts(W)}return L}h.untrack=y;function S($){var L;if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=$[dr].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=S;function T($){var L;if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called introspectSinks without a Signal argument");return((L=$[dr].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=T;function N($){if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called hasSinks without a Signal argument");let L=$[dr].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=N;function U($){if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=$[dr].producerNode;return L?L.length>0:!1}h.hasSources=U;class I{constructor(L){md(this,f),md(this,g),au(this,m);let W=Object.create(hu);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[dr]=W}watch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Rb(this,g,v).call(this,L);let W=this[dr];W.dirty=!1;let oe=ts(W);for(let xe of L)bd(xe[dr]);ts(oe)}unwatch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Rb(this,g,v).call(this,L);let W=this[dr];rs(W);for(let oe=W.producerNode.length-1;oe>=0;oe--)if(L.includes(W.producerNode[oe].wrapper)){vd(W.producerNode[oe],W.producerIndexOfThis[oe]);let xe=W.producerNode.length-1;if(W.producerNode[oe]=W.producerNode[xe],W.producerIndexOfThis[oe]=W.producerIndexOfThis[xe],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,oe<W.producerNode.length){let De=W.producerIndexOfThis[oe],Ne=W.producerNode[oe];uu(Ne),Ne.liveConsumerIndexOfThis[De]=oe}}}getPending(){if(!(0,o.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[dr].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=dr,f=new WeakSet,b=function(){},g=new WeakSet,v=function($){for(let L of $)if(!(0,o.isComputed)(L)&&!(0,o.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},o.isWatcher=$=>su(f,$),h.Watcher=I;function C(){var $;return($=G3())==null?void 0:$.wrapper}h.currentComputed=C,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(o.subtle||(o.subtle={}))})(it||(it={}));var mu=!1,Bb=new it.subtle.Watcher(()=>{mu||(mu=!0,queueMicrotask(()=>{mu=!1;for(let o of Bb.getPending())o.get();Bb.watch()}))}),d5=Symbol("SignalWatcherBrand"),p5=new FinalizationRegistry(o=>{o.unwatch(...it.subtle.introspectSources(o))}),Vb=new WeakMap;function yd(o){return o[d5]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),o):class extends o{constructor(){super(...arguments),this._$St=new Map,this._$So=new it.State(0),this._$Si=!1}_$Sl(){var i,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(i=this.h)===null||i===void 0?void 0:i.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new it.Computed(()=>{this._$So.get(),super.performUpdate()});let i=this.h=new it.subtle.Watcher(function(){let t=Vb.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Vb.set(i,this),p5.register(this,i),i.watch(this._$Su),i.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let i=!1;this.h.unwatch(...it.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),i||(i=!n),n})),i||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(i,t){var r;this._$S_();let n=new it.Computed(()=>{i()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?it.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>it.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:h5}=lb,Ub=o=>o;var xd=o=>o.strings===void 0,jb=()=>document.createComment(""),is=(o,i,t)=>{let r=o._$AA.parentNode,n=i===void 0?o._$AB:i._$AA;if(t===void 0){let a=r.insertBefore(jb(),n),s=r.insertBefore(jb(),n);t=new h5(a,s,o,o.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==o;if(l){let p;t._$AQ?.(o),t._$AM=o,t._$AP!==void 0&&(p=o._$AU)!==s._$AU&&t._$AP(p)}if(a!==n||l){let p=t._$AA;for(;p!==a;){let h=Ub(p).nextSibling;Ub(r).insertBefore(p,n),p=h}}}return t},bo=(o,i,t=o)=>(o._$AI(i,t),o),u5={},ns=(o,i=u5)=>o._$AH=i,Gb=o=>o._$AH,wd=o=>{o._$AR(),o._$AA.remove()};var El=(o,i)=>{let t=o._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(i,!1),El(r,i);return!0},zd=o=>{let i,t;do{if((i=o._$AM)===void 0)break;t=i._$AN,t.delete(o),o=i}while(t?.size===0)},Wb=o=>{for(let i;i=o._$AM;o=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(o))break;t.add(o),g5(i)}};function m5(o){this._$AN!==void 0?(zd(this),this._$AM=o,Wb(this)):this._$AM=o}function f5(o,i=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(i)if(Array.isArray(r))for(let a=t;a<r.length;a++)El(r[a],!1),zd(r[a]);else r!=null&&(El(r,!1),zd(r));else El(this,o)}var g5=o=>{o.type==lr.CHILD&&(o._$AP??(o._$AP=f5),o._$AQ??(o._$AQ=m5))},vo=class extends rr{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,r){super._$AT(i,t,r),Wb(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(El(this,i),zd(this))}setValue(i){if(xd(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var fu=!1,gu=new it.subtle.Watcher(async()=>{fu||(fu=!0,queueMicrotask(()=>{fu=!1;for(let o of gu.getPending())o.get();gu.watch()}))}),_d=class extends vo{_$S_(){var i,t;this._$Sm===void 0&&(this._$Sj=new it.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(i=this._$Sk)===null||i===void 0?void 0:i.h)!==null&&t!==void 0?t:gu,this._$Sm.watch(this._$Sj),it.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(i){return it.subtle.untrack(()=>i.get())}update(i,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=i.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),it.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},bu=yt(_d);var vu=o=>(i,...t)=>o(i,...t.map(r=>r instanceof it.State||r instanceof it.Computed?bu(r):r)),b5=vu(u),v5=vu(Xi);var oN=it.State,aN=it.Computed,yu=(o,i)=>new it.State(o,i);function Yb(o,i){return typeof document>"u"?i:document.documentElement.getAttribute(o)||document.body?.getAttribute(o)||i}function Qb(){return Yb("t","light")}function Xb(){return Yb("m","light")}var kd=yu(Qb()),Cd=yu(Xb()),Kb=!1;function y5(){Kb||typeof window>"u"||(Kb=!0,window.addEventListener("theme-change",o=>{let i=o.detail,t,r;if(typeof i=="string")t=i;else if(i&&typeof i=="object"){let n=i;typeof n.theme=="string"&&(t=n.theme),typeof n.mode=="string"&&(r=n.mode)}t===void 0&&(t=Qb()),r===void 0&&(r=Xb()),t!==kd.get()&&kd.set(t),r!==Cd.get()&&Cd.set(r)}))}y5();var x5=yd(go),k=class extends x5{willUpdate(i){this.t=kd.get(),this.m=Cd.get(),super.willUpdate(i)}static define(i,t=this,r={}){let n=customElements.get(i);if(!n){customElements.define(i,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${i}>${a} but it is already registered as <${i}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([i,t])=>{this.constructor.define(i,t)})}emit(i,t){let r=new CustomEvent(i,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};k.dependencies={},c([d()],k.prototype,"dir",2),c([d()],k.prototype,"lang",2),c([d({reflect:!0})],k.prototype,"t",2),c([d({reflect:!0})],k.prototype,"m",2);var fa=class extends rr{constructor(i){if(super(i),this.it=B,i.type!==lr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(i){if(i===B||i==null)return this._t=void 0,this.it=i;if(i===vt)return i;if(typeof i!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(i===this.it)return this._t;this.it=i;let t=[i];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};fa.directiveName="unsafeHTML",fa.resultType=1;var St=yt(fa);function Mi(o,i){return new Promise(t=>{function r(n){n.target===o&&(o.removeEventListener(i,r),t())}o.addEventListener(i,r)})}var xu=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(i){this.openDropdowns.add(i)}unregisterDropdown(i){this.openDropdowns.delete(i)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(i){this.openTooltips.add(i)}unregisterTooltip(i){this.openTooltips.delete(i)}isTooltipOpen(){return this.openTooltips.size>0}},w5=new xu,Un=w5;var Jb=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var Et=class extends k{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,Mi(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,Mi(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>fb(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Un.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Un.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
6
6
  <zn-popup
7
7
  part="base"
8
8
  exportparts="popup:base__popup"
@@ -36,7 +36,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
36
36
  </div>
37
37
  </zn-popup>
38
38
  `}};Et.styles=z(Jb),c([F(".dropdown")],Et.prototype,"popup",2),c([F(".dropdown__trigger")],Et.prototype,"trigger",2),c([F(".dropdown__panel")],Et.prototype,"panel",2),c([d({type:Boolean,reflect:!0})],Et.prototype,"open",2),c([d({reflect:!0})],Et.prototype,"placement",2),c([d({type:Boolean,reflect:!0})],Et.prototype,"disabled",2),c([d({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],Et.prototype,"stayOpenOnSelect",2),c([d({attribute:!1})],Et.prototype,"containingElement",2),c([d({type:Number})],Et.prototype,"distance",2),c([d({type:Number})],Et.prototype,"skidding",2),c([d({type:Boolean})],Et.prototype,"hoist",2),c([d({reflect:!0})],Et.prototype,"sync",2),c([d()],Et.prototype,"uri",2),c([d({type:String})],Et.prototype,"fetchedContent",2),c([K("open",{waitUntilFirstUpdate:!0})],Et.prototype,"handleOpenChange",1);var pr=Et;Et.define("zn-dropdown");var Zb=(o,i,t)=>{for(let r of i)if(r[0]===o)return(0,r[1])();return t?.()};function ev(o){function i(b,g){return b>>>g|b<<32-g}function t(b){b=b.replace(/\r\n/g,`
39
- `);let g="";for(let v=0;v<b.length;v++){let y=b.charCodeAt(v);y<128?g+=String.fromCharCode(y):y<2048?(g+=String.fromCharCode(y>>6|192),g+=String.fromCharCode(y&63|128)):(g+=String.fromCharCode(y>>12|224),g+=String.fromCharCode(y>>6&63|128),g+=String.fromCharCode(y&63|128))}return g}let r=Math.pow,n=r(2,32),a=[],s=[],l=[],p={},h=0,m=t(o),f=m.length*8;for(let b=2;h<64;b++)if(!p[b]){for(let g=0;g<313;g+=b)p[g]=!0;h<8&&(s[h]=r(b,.5)*n|0),l[h]=r(b,1/3)*n|0,h++}for(m+="\x80";m.length%64!==56;)m+="\0";for(let b=0;b<m.length;b++)a[b>>2]|=m.charCodeAt(b)<<(3-b%4)*8;a[a.length]=f/n|0,a[a.length]=f;for(let b=0;b<a.length;b+=16){let g=s.slice(0,8),v=a.slice(b,b+16);for(let y=16;y<64;y++){let S=v[y-15],T=v[y-2],N=i(S,7)^i(S,18)^S>>>3,U=i(T,17)^i(T,19)^T>>>10;v[y]=v[y-16]+N+v[y-7]+U|0}for(let y=0;y<64;y++){let S=g[0],T=g[1],N=g[2],U=g[3],I=g[4],C=g[5],$=g[6],L=g[7],W=i(I,6)^i(I,11)^i(I,25),oe=I&C^~I&$,xe=L+W+oe+l[y]+v[y]|0,De=i(S,2)^i(S,13)^i(S,22),Ne=S&T^S&N^T&N,rt=De+Ne|0;g[7]=$,g[6]=C,g[5]=I,g[4]=U+xe|0,g[3]=N,g[2]=T,g[1]=S,g[0]=xe+rt|0}for(let y=0;y<8;y++)s[y]=s[y]+g[y]|0}return s.map(b=>(b>>>0).toString(16).padStart(8,"0")).join("")}var Tl=class extends ma{};Tl.directiveName="unsafeSVG",Tl.resultType=2;var tv=yt(Tl);var rv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.lni{display:inline-block;font:normal normal normal 1em/1 "Lineicons";color:inherit;flex-shrink:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lni-sm{font-size:0.8em}.lni-lg{font-size:1.2em}.lni-16{font-size:16px}.lni-32{font-size:32px}.lni-is-spinning{animation:lni-spin 1s infinite linear}@keyframes lni-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.lni-rotate-90{transform:rotate(90deg)}.lni-rotate-180{transform:rotate(180deg)}.lni-rotate-270{transform:rotate(270deg)}.lni-flip-y{transform:scaleY(-1)}.lni-flip-x{transform:scaleX(-1)}.lni-500px::before{content:"\\ea01"}.lni-adobe::before{content:"\\ea02"}.lni-adonis::before{content:"\\ea03"}.lni-aeroplane-1::before{content:"\\ea04"}.lni-agenda::before{content:"\\ea05"}.lni-airbnb::before{content:"\\ea06"}.lni-airtable::before{content:"\\ea07"}.lni-alarm-1::before{content:"\\ea08"}.lni-align-text-center::before{content:"\\ea09"}.lni-align-text-left::before{content:"\\ea0a"}.lni-align-text-right::before{content:"\\ea0b"}.lni-alpinejs::before{content:"\\ea0c"}.lni-amazon::before{content:"\\ea0d"}.lni-amazon-original::before{content:"\\ea0e"}.lni-amazon-pay::before{content:"\\ea0f"}.lni-ambulance-1::before{content:"\\ea10"}.lni-amd::before{content:"\\ea11"}.lni-amex::before{content:"\\ea12"}.lni-anchor::before{content:"\\ea13"}.lni-android::before{content:"\\ea14"}.lni-android-old::before{content:"\\ea15"}.lni-angellist::before{content:"\\ea16"}.lni-angle-double-down::before{content:"\\ea17"}.lni-angle-double-left::before{content:"\\ea18"}.lni-angle-double-right::before{content:"\\ea19"}.lni-angle-double-up::before{content:"\\ea1a"}.lni-angular::before{content:"\\ea1b"}.lni-app-store::before{content:"\\ea1c"}.lni-apple-brand::before{content:"\\ea1d"}.lni-apple-music::before{content:"\\ea1e"}.lni-apple-music-alt::before{content:"\\ea1f"}.lni-apple-pay::before{content:"\\ea20"}.lni-arc-browser::before{content:"\\ea21"}.lni-arrow-all-direction::before{content:"\\ea22"}.lni-arrow-angular-top-left::before{content:"\\ea23"}.lni-arrow-angular-top-right::before{content:"\\ea24"}.lni-arrow-both-direction-horizontal-1::before{content:"\\ea25"}.lni-arrow-both-direction-vertical-1::before{content:"\\ea26"}.lni-arrow-downward::before{content:"\\ea27"}.lni-arrow-left::before{content:"\\ea28"}.lni-arrow-left-circle::before{content:"\\ea29"}.lni-arrow-right::before{content:"\\ea2a"}.lni-arrow-right-circle::before{content:"\\ea2b"}.lni-arrow-upward::before{content:"\\ea2c"}.lni-asana::before{content:"\\ea2d"}.lni-astro::before{content:"\\ea2e"}.lni-atlassian::before{content:"\\ea2f"}.lni-audi::before{content:"\\ea30"}.lni-audi-alt::before{content:"\\ea31"}.lni-aws::before{content:"\\ea32"}.lni-azure::before{content:"\\ea33"}.lni-badge-decagram-percent::before{content:"\\ea34"}.lni-balloons::before{content:"\\ea35"}.lni-ban-2::before{content:"\\ea36"}.lni-bar-chart-4::before{content:"\\ea37"}.lni-bar-chart-dollar::before{content:"\\ea38"}.lni-basket-shopping-3::before{content:"\\ea39"}.lni-beat::before{content:"\\ea3a"}.lni-behance::before{content:"\\ea3b"}.lni-bell-1::before{content:"\\ea3c"}.lni-bike::before{content:"\\ea3d"}.lni-bing::before{content:"\\ea3e"}.lni-bitbucket::before{content:"\\ea3f"}.lni-bitcoin::before{content:"\\ea40"}.lni-bittorrent::before{content:"\\ea41"}.lni-blogger::before{content:"\\ea42"}.lni-blogger-alt::before{content:"\\ea43"}.lni-bluetooth::before{content:"\\ea44"}.lni-bluetooth-logo::before{content:"\\ea45"}.lni-bmw::before{content:"\\ea46"}.lni-board-writing-3::before{content:"\\ea47"}.lni-bold::before{content:"\\ea48"}.lni-bolt-2::before{content:"\\ea49"}.lni-bolt-3::before{content:"\\ea4a"}.lni-book-1::before{content:"\\ea4b"}.lni-bookmark-1::before{content:"\\ea4c"}.lni-bookmark-circle::before{content:"\\ea4d"}.lni-books-2::before{content:"\\ea4e"}.lni-bootstrap-5::before{content:"\\ea4f"}.lni-bootstrap-5-square::before{content:"\\ea50"}.lni-box-archive-1::before{content:"\\ea51"}.lni-box-closed::before{content:"\\ea52"}.lni-box-gift-1::before{content:"\\ea53"}.lni-brave::before{content:"\\ea54"}.lni-bricks::before{content:"\\ea55"}.lni-bridge-3::before{content:"\\ea56"}.lni-briefcase-1::before{content:"\\ea57"}.lni-briefcase-2::before{content:"\\ea58"}.lni-briefcase-plus-1::before{content:"\\ea59"}.lni-brush-1-rotated::before{content:"\\ea5a"}.lni-brush-2::before{content:"\\ea5b"}.lni-btc::before{content:"\\ea5c"}.lni-bug-1::before{content:"\\ea5d"}.lni-buildings-1::before{content:"\\ea5e"}.lni-bulb-2::before{content:"\\ea5f"}.lni-bulb-4::before{content:"\\ea60"}.lni-burger-1::before{content:"\\ea61"}.lni-burger-drink::before{content:"\\ea62"}.lni-bus-1::before{content:"\\ea63"}.lni-busket-ball::before{content:"\\ea64"}.lni-cake-1::before{content:"\\ea65"}.lni-calculator-1::before{content:"\\ea66"}.lni-calculator-2::before{content:"\\ea67"}.lni-calendar-days::before{content:"\\ea68"}.lni-camera-1::before{content:"\\ea69"}.lni-camera-movie-1::before{content:"\\ea6a"}.lni-candy-cane-2::before{content:"\\ea6b"}.lni-candy-round-1::before{content:"\\ea6c"}.lni-canva::before{content:"\\ea6d"}.lni-capsule-1::before{content:"\\ea6e"}.lni-car-2::before{content:"\\ea6f"}.lni-car-4::before{content:"\\ea70"}.lni-car-6::before{content:"\\ea71"}.lni-caravan-1::before{content:"\\ea72"}.lni-cart-1::before{content:"\\ea73"}.lni-cart-2::before{content:"\\ea74"}.lni-cash-app::before{content:"\\ea75"}.lni-certificate-badge-1::before{content:"\\ea76"}.lni-chat-bubble-2::before{content:"\\ea77"}.lni-check::before{content:"\\ea78"}.lni-check-circle-1::before{content:"\\ea79"}.lni-check-square-2::before{content:"\\ea7a"}.lni-chevron-down::before{content:"\\ea7b"}.lni-chevron-down-circle::before{content:"\\ea7c"}.lni-chevron-left::before{content:"\\ea7d"}.lni-chevron-left-circle::before{content:"\\ea7e"}.lni-chevron-right-circle::before{content:"\\ea7f"}.lni-chevron-up::before{content:"\\ea80"}.lni-chevron-up-circle::before{content:"\\ea81"}.lni-chrome::before{content:"\\ea82"}.lni-chromecast::before{content:"\\ea83"}.lni-cisco::before{content:"\\ea84"}.lni-claude::before{content:"\\ea85"}.lni-clickup::before{content:"\\ea86"}.lni-clipboard::before{content:"\\ea87"}.lni-cloud-2::before{content:"\\ea88"}.lni-cloud-bolt-1::before{content:"\\ea89"}.lni-cloud-bolt-2::before{content:"\\ea8a"}.lni-cloud-check-circle::before{content:"\\ea8b"}.lni-cloud-download::before{content:"\\ea8c"}.lni-cloud-iot-2::before{content:"\\ea8d"}.lni-cloud-rain::before{content:"\\ea8e"}.lni-cloud-refresh-clockwise::before{content:"\\ea8f"}.lni-cloud-sun::before{content:"\\ea90"}.lni-cloud-upload::before{content:"\\ea91"}.lni-cloudflare::before{content:"\\ea92"}.lni-code-1::before{content:"\\ea93"}.lni-code-s::before{content:"\\ea94"}.lni-codepen::before{content:"\\ea95"}.lni-coffee-cup-2::before{content:"\\ea96"}.lni-coinbase::before{content:"\\ea97"}.lni-colour-palette-3::before{content:"\\ea98"}.lni-comment-1::before{content:"\\ea99"}.lni-comment-1-share::before{content:"\\ea9a"}.lni-comment-1-text::before{content:"\\ea9b"}.lni-compass-drafting-2::before{content:"\\ea9c"}.lni-connectdevelop::before{content:"\\ea9d"}.lni-copilot::before{content:"\\ea9e"}.lni-coral::before{content:"\\ea9f"}.lni-cpanel::before{content:"\\eaa0"}.lni-crane-4::before{content:"\\eaa1"}.lni-creative-commons::before{content:"\\eaa2"}.lni-credit-card-multiple::before{content:"\\eaa3"}.lni-crop-2::before{content:"\\eaa4"}.lni-crown-3::before{content:"\\eaa5"}.lni-css3::before{content:"\\eaa6"}.lni-dashboard-square-1::before{content:"\\eaa7"}.lni-database-2::before{content:"\\eaa8"}.lni-deno::before{content:"\\eaa9"}.lni-dev::before{content:"\\eaaa"}.lni-dialogflow::before{content:"\\eaab"}.lni-diamonds-1::before{content:"\\eaac"}.lni-diamonds-2::before{content:"\\eaad"}.lni-digitalocean::before{content:"\\eaae"}.lni-diners-club::before{content:"\\eaaf"}.lni-direction-ltr::before{content:"\\eab0"}.lni-direction-rtl::before{content:"\\eab1"}.lni-discord::before{content:"\\eab2"}.lni-discord-chat::before{content:"\\eab3"}.lni-discover::before{content:"\\eab4"}.lni-docker::before{content:"\\eab5"}.lni-dollar::before{content:"\\eab6"}.lni-dollar-circle::before{content:"\\eab7"}.lni-double-quotes-end-1::before{content:"\\eab8"}.lni-download-1::before{content:"\\eab9"}.lni-download-circle-1::before{content:"\\eaba"}.lni-dribbble::before{content:"\\eabb"}.lni-dribbble-symbol::before{content:"\\eabc"}.lni-drizzle::before{content:"\\eabd"}.lni-dropbox::before{content:"\\eabe"}.lni-drupal::before{content:"\\eabf"}.lni-dumbbell-1::before{content:"\\eac0"}.lni-edge::before{content:"\\eac1"}.lni-emoji-expressionless::before{content:"\\eac2"}.lni-emoji-expressionless-flat-eyes::before{content:"\\eac3"}.lni-emoji-grin::before{content:"\\eac4"}.lni-emoji-sad::before{content:"\\eac5"}.lni-emoji-smile::before{content:"\\eac6"}.lni-emoji-smile-side::before{content:"\\eac7"}.lni-emoji-smile-sunglass::before{content:"\\eac8"}.lni-emoji-smile-tongue::before{content:"\\eac9"}.lni-enter::before{content:"\\eaca"}.lni-enter-down::before{content:"\\eacb"}.lni-envato::before{content:"\\eacc"}.lni-envelope-1::before{content:"\\eacd"}.lni-eraser-1::before{content:"\\eace"}.lni-ethereum-logo::before{content:"\\eacf"}.lni-euro::before{content:"\\ead0"}.lni-exit::before{content:"\\ead1"}.lni-exit-up::before{content:"\\ead2"}.lni-expand-arrow-1::before{content:"\\ead3"}.lni-expand-square-4::before{content:"\\ead4"}.lni-expressjs::before{content:"\\ead5"}.lni-eye::before{content:"\\ead6"}.lni-facebook::before{content:"\\ead7"}.lni-facebook-messenger::before{content:"\\ead8"}.lni-facebook-rounded::before{content:"\\ead9"}.lni-facebook-square::before{content:"\\eada"}.lni-facetime::before{content:"\\eadb"}.lni-figma::before{content:"\\eadc"}.lni-file-format-zip::before{content:"\\eadd"}.lni-file-multiple::before{content:"\\eade"}.lni-file-pencil::before{content:"\\eadf"}.lni-file-plus-circle::before{content:"\\eae0"}.lni-file-question::before{content:"\\eae1"}.lni-file-xmark::before{content:"\\eae2"}.lni-firebase::before{content:"\\eae3"}.lni-firefox::before{content:"\\eae4"}.lni-firework-rocket-4::before{content:"\\eae5"}.lni-fitbit::before{content:"\\eae6"}.lni-flag-1::before{content:"\\eae7"}.lni-flag-2::before{content:"\\eae8"}.lni-flickr::before{content:"\\eae9"}.lni-floppy-disk-1::before{content:"\\eaea"}.lni-flower-2::before{content:"\\eaeb"}.lni-flutter::before{content:"\\eaec"}.lni-folder-1::before{content:"\\eaed"}.lni-ford::before{content:"\\eaee"}.lni-framer::before{content:"\\eaef"}.lni-funnel-1::before{content:"\\eaf0"}.lni-gallery::before{content:"\\eaf1"}.lni-game-pad-modern-1::before{content:"\\eaf2"}.lni-gatsby::before{content:"\\eaf3"}.lni-gauge-1::before{content:"\\eaf4"}.lni-gear-1::before{content:"\\eaf5"}.lni-gears-3::before{content:"\\eaf6"}.lni-gemini::before{content:"\\eaf7"}.lni-git::before{content:"\\eaf8"}.lni-github::before{content:"\\eaf9"}.lni-glass-juice-1::before{content:"\\eafa"}.lni-globe-1::before{content:"\\eafb"}.lni-globe-stand::before{content:"\\eafc"}.lni-go::before{content:"\\eafd"}.lni-goodreads::before{content:"\\eafe"}.lni-google::before{content:"\\eaff"}.lni-google-cloud::before{content:"\\eb00"}.lni-google-drive::before{content:"\\eb01"}.lni-google-meet::before{content:"\\eb02"}.lni-google-pay::before{content:"\\eb03"}.lni-google-wallet::before{content:"\\eb04"}.lni-graduation-cap-1::before{content:"\\eb05"}.lni-grammarly::before{content:"\\eb06"}.lni-hacker-news::before{content:"\\eb07"}.lni-hammer-1::before{content:"\\eb08"}.lni-hammer-2::before{content:"\\eb09"}.lni-hand-mic::before{content:"\\eb0a"}.lni-hand-shake::before{content:"\\eb0b"}.lni-hand-stop::before{content:"\\eb0c"}.lni-hand-taking-dollar::before{content:"\\eb0d"}.lni-hand-taking-leaf-1::before{content:"\\eb0e"}.lni-hand-taking-user::before{content:"\\eb0f"}.lni-hashnode::before{content:"\\eb10"}.lni-hat-chef-3::before{content:"\\eb11"}.lni-headphone-1::before{content:"\\eb12"}.lni-heart::before{content:"\\eb13"}.lni-helicopter-2::before{content:"\\eb14"}.lni-helmet-safety-1::before{content:"\\eb15"}.lni-hierarchy-1::before{content:"\\eb16"}.lni-highlighter-1::before{content:"\\eb17"}.lni-highlighter-2::before{content:"\\eb18"}.lni-home-2::before{content:"\\eb19"}.lni-hospital-2::before{content:"\\eb1a"}.lni-hourglass::before{content:"\\eb1b"}.lni-html5::before{content:"\\eb1c"}.lni-ibm::before{content:"\\eb1d"}.lni-id-card::before{content:"\\eb1e"}.lni-imdb::before{content:"\\eb1f"}.lni-indent::before{content:"\\eb20"}.lni-info::before{content:"\\eb21"}.lni-injection-1::before{content:"\\eb22"}.lni-instagram::before{content:"\\eb23"}.lni-instagram-logotype::before{content:"\\eb24"}.lni-intel::before{content:"\\eb25"}.lni-ios::before{content:"\\eb26"}.lni-island-2::before{content:"\\eb27"}.lni-jaguar::before{content:"\\eb28"}.lni-jamstack::before{content:"\\eb29"}.lni-java::before{content:"\\eb2a"}.lni-javascript::before{content:"\\eb2b"}.lni-jcb::before{content:"\\eb2c"}.lni-joomla::before{content:"\\eb2d"}.lni-jsfiddle::before{content:"\\eb2e"}.lni-key-1::before{content:"\\eb2f"}.lni-keyboard::before{content:"\\eb30"}.lni-knife-fork-1::before{content:"\\eb31"}.lni-kubernetes::before{content:"\\eb32"}.lni-label-dollar-2::before{content:"\\eb33"}.lni-laptop-2::before{content:"\\eb34"}.lni-laptop-phone::before{content:"\\eb35"}.lni-laravel::before{content:"\\eb36"}.lni-layers-1::before{content:"\\eb37"}.lni-layout-26::before{content:"\\eb38"}.lni-layout-9::before{content:"\\eb39"}.lni-leaf-1::before{content:"\\eb3a"}.lni-leaf-6::before{content:"\\eb3b"}.lni-lemon-squeezy::before{content:"\\eb3c"}.lni-life-guard-tube-1::before{content:"\\eb3d"}.lni-line::before{content:"\\eb3e"}.lni-line-dashed::before{content:"\\eb3f"}.lni-line-dotted::before{content:"\\eb40"}.lni-line-height::before{content:"\\eb41"}.lni-lineicons::before{content:"\\eb42"}.lni-link-2-angular-right::before{content:"\\eb43"}.lni-linkedin::before{content:"\\eb44"}.lni-location-arrow-right::before{content:"\\eb45"}.lni-locked-1::before{content:"\\eb46"}.lni-locked-2::before{content:"\\eb47"}.lni-loom::before{content:"\\eb48"}.lni-magento::before{content:"\\eb49"}.lni-magnet::before{content:"\\eb4a"}.lni-mailchimp::before{content:"\\eb4b"}.lni-map-marker-1::before{content:"\\eb4c"}.lni-map-marker-5::before{content:"\\eb4d"}.lni-map-pin-5::before{content:"\\eb4e"}.lni-markdown::before{content:"\\eb4f"}.lni-mastercard::before{content:"\\eb50"}.lni-medium::before{content:"\\eb51"}.lni-medium-alt::before{content:"\\eb52"}.lni-megaphone-1::before{content:"\\eb53"}.lni-menu-cheesburger::before{content:"\\eb54"}.lni-menu-hamburger-1::before{content:"\\eb55"}.lni-menu-meatballs-1::before{content:"\\eb56"}.lni-menu-meatballs-2::before{content:"\\eb57"}.lni-mercedes::before{content:"\\eb58"}.lni-message-2::before{content:"\\eb59"}.lni-message-2-question::before{content:"\\eb5a"}.lni-message-3-text::before{content:"\\eb5b"}.lni-meta::before{content:"\\eb5c"}.lni-meta-alt::before{content:"\\eb5d"}.lni-microphone-1::before{content:"\\eb5e"}.lni-microscope::before{content:"\\eb5f"}.lni-microsoft::before{content:"\\eb60"}.lni-microsoft-edge::before{content:"\\eb61"}.lni-microsoft-teams::before{content:"\\eb62"}.lni-minus::before{content:"\\eb63"}.lni-minus-circle::before{content:"\\eb64"}.lni-mongodb::before{content:"\\eb65"}.lni-monitor::before{content:"\\eb66"}.lni-monitor-code::before{content:"\\eb67"}.lni-monitor-mac::before{content:"\\eb68"}.lni-moon-half-right-5::before{content:"\\eb69"}.lni-mountains-2::before{content:"\\eb6a"}.lni-mouse-2::before{content:"\\eb6b"}.lni-mushroom-1::before{content:"\\eb6c"}.lni-mushroom-5::before{content:"\\eb6d"}.lni-music::before{content:"\\eb6e"}.lni-mysql::before{content:"\\eb6f"}.lni-nasa::before{content:"\\eb70"}.lni-netflix::before{content:"\\eb71"}.lni-netlify::before{content:"\\eb72"}.lni-next-step-2::before{content:"\\eb73"}.lni-nextjs::before{content:"\\eb74"}.lni-nike::before{content:"\\eb75"}.lni-nissan::before{content:"\\eb76"}.lni-nodejs::before{content:"\\eb77"}.lni-nodejs-alt::before{content:"\\eb78"}.lni-notebook-1::before{content:"\\eb79"}.lni-notion::before{content:"\\eb7a"}.lni-npm::before{content:"\\eb7b"}.lni-nuxt::before{content:"\\eb7c"}.lni-nvidia::before{content:"\\eb7d"}.lni-oculus::before{content:"\\eb7e"}.lni-open-ai::before{content:"\\eb7f"}.lni-opera-mini::before{content:"\\eb80"}.lni-oracle::before{content:"\\eb81"}.lni-outdent::before{content:"\\eb82"}.lni-paddle::before{content:"\\eb83"}.lni-page-break-1::before{content:"\\eb84"}.lni-pagination::before{content:"\\eb85"}.lni-paint-bucket::before{content:"\\eb86"}.lni-paint-roller-1::before{content:"\\eb87"}.lni-paperclip-1::before{content:"\\eb88"}.lni-party-flags::before{content:"\\eb89"}.lni-party-spray::before{content:"\\eb8a"}.lni-patreon::before{content:"\\eb8b"}.lni-pause::before{content:"\\eb8c"}.lni-payoneer::before{content:"\\eb8d"}.lni-paypal::before{content:"\\eb8e"}.lni-pen-to-square::before{content:"\\eb8f"}.lni-pencil-1::before{content:"\\eb90"}.lni-pepsi::before{content:"\\eb91"}.lni-phone::before{content:"\\eb92"}.lni-photos::before{content:"\\eb93"}.lni-php::before{content:"\\eb94"}.lni-pie-chart-2::before{content:"\\eb95"}.lni-pilcrow::before{content:"\\eb96"}.lni-pimjo-logo::before{content:"\\eb97"}.lni-pimjo-symbol::before{content:"\\eb98"}.lni-pinterest::before{content:"\\eb99"}.lni-pizza-2::before{content:"\\eb9a"}.lni-placeholder-dollar::before{content:"\\eb9b"}.lni-plantscale::before{content:"\\eb9c"}.lni-play::before{content:"\\eb9d"}.lni-play-store::before{content:"\\eb9e"}.lni-playstation::before{content:"\\eb9f"}.lni-plug-1::before{content:"\\eba0"}.lni-plus::before{content:"\\eba1"}.lni-plus-circle::before{content:"\\eba2"}.lni-pnpm::before{content:"\\eba3"}.lni-postgresql::before{content:"\\eba4"}.lni-postman::before{content:"\\eba5"}.lni-pound::before{content:"\\eba6"}.lni-power-button::before{content:"\\eba7"}.lni-previous-step-2::before{content:"\\eba8"}.lni-printer::before{content:"\\eba9"}.lni-prisma::before{content:"\\ebaa"}.lni-producthunt::before{content:"\\ebab"}.lni-proton-mail-logo::before{content:"\\ebac"}.lni-proton-mail-symbol::before{content:"\\ebad"}.lni-python::before{content:"\\ebae"}.lni-question-mark::before{content:"\\ebaf"}.lni-question-mark-circle::before{content:"\\ebb0"}.lni-quora::before{content:"\\ebb1"}.lni-radis::before{content:"\\ebb2"}.lni-react::before{content:"\\ebb3"}.lni-reddit::before{content:"\\ebb4"}.lni-refresh-circle-1-clockwise::before{content:"\\ebb5"}.lni-refresh-dollar-1::before{content:"\\ebb6"}.lni-refresh-user-1::before{content:"\\ebb7"}.lni-remix-js::before{content:"\\ebb8"}.lni-road-1::before{content:"\\ebb9"}.lni-rocket-5::before{content:"\\ebba"}.lni-route-1::before{content:"\\ebbb"}.lni-rss-right::before{content:"\\ebbc"}.lni-ruler-1::before{content:"\\ebbd"}.lni-ruler-pen::before{content:"\\ebbe"}.lni-rupee::before{content:"\\ebbf"}.lni-safari::before{content:"\\ebc0"}.lni-sanity::before{content:"\\ebc1"}.lni-school-bench-1::before{content:"\\ebc2"}.lni-school-bench-2::before{content:"\\ebc3"}.lni-scissors-1-vertical::before{content:"\\ebc4"}.lni-scoter::before{content:"\\ebc5"}.lni-scroll-down-2::before{content:"\\ebc6"}.lni-search-1::before{content:"\\ebc7"}.lni-search-2::before{content:"\\ebc8"}.lni-search-minus::before{content:"\\ebc9"}.lni-search-plus::before{content:"\\ebca"}.lni-search-text::before{content:"\\ebcb"}.lni-select-cursor-1::before{content:"\\ebcc"}.lni-seo-monitor::before{content:"\\ebcd"}.lni-service-bell-1::before{content:"\\ebce"}.lni-share-1::before{content:"\\ebcf"}.lni-share-1-circle::before{content:"\\ebd0"}.lni-share-2::before{content:"\\ebd1"}.lni-shield-2::before{content:"\\ebd2"}.lni-shield-2-check::before{content:"\\ebd3"}.lni-shield-dollar::before{content:"\\ebd4"}.lni-shift-left::before{content:"\\ebd5"}.lni-shift-right::before{content:"\\ebd6"}.lni-ship-1::before{content:"\\ebd7"}.lni-shirt-1::before{content:"\\ebd8"}.lni-shopify::before{content:"\\ebd9"}.lni-shovel::before{content:"\\ebda"}.lni-shuffle::before{content:"\\ebdb"}.lni-sign-post-left::before{content:"\\ebdc"}.lni-signal-app::before{content:"\\ebdd"}.lni-signs-post-2::before{content:"\\ebde"}.lni-sketch::before{content:"\\ebdf"}.lni-skype::before{content:"\\ebe0"}.lni-slack::before{content:"\\ebe1"}.lni-slice-2::before{content:"\\ebe2"}.lni-sliders-horizontal-square-2::before{content:"\\ebe3"}.lni-slideshare::before{content:"\\ebe4"}.lni-snapchat::before{content:"\\ebe5"}.lni-sort-alphabetical::before{content:"\\ebe6"}.lni-sort-high-to-low::before{content:"\\ebe7"}.lni-soundcloud::before{content:"\\ebe8"}.lni-spacex::before{content:"\\ebe9"}.lni-spellcheck::before{content:"\\ebea"}.lni-spinner-2-sacle::before{content:"\\ebeb"}.lni-spinner-3::before{content:"\\ebec"}.lni-sports::before{content:"\\ebed"}.lni-spotify::before{content:"\\ebee"}.lni-spotify-alt::before{content:"\\ebef"}.lni-squarespace::before{content:"\\ebf0"}.lni-stackoverflow::before{content:"\\ebf1"}.lni-stamp::before{content:"\\ebf2"}.lni-star-fat::before{content:"\\ebf3"}.lni-star-fat-half-2::before{content:"\\ebf4"}.lni-star-sharp-disabled::before{content:"\\ebf5"}.lni-statista::before{content:"\\ebf6"}.lni-steam::before{content:"\\ebf7"}.lni-stethoscope-1::before{content:"\\ebf8"}.lni-stopwatch::before{content:"\\ebf9"}.lni-storage-hdd-2::before{content:"\\ebfa"}.lni-strikethrough-1::before{content:"\\ebfb"}.lni-stripe::before{content:"\\ebfc"}.lni-stumbleupon::before{content:"\\ebfd"}.lni-sun-1::before{content:"\\ebfe"}.lni-supabase::before{content:"\\ebff"}.lni-surfboard-2::before{content:"\\ec00"}.lni-svelte::before{content:"\\ec01"}.lni-swift::before{content:"\\ec02"}.lni-tab::before{content:"\\ec03"}.lni-tailwindcss::before{content:"\\ec04"}.lni-target-user::before{content:"\\ec05"}.lni-telegram::before{content:"\\ec06"}.lni-telephone-1::before{content:"\\ec07"}.lni-telephone-3::before{content:"\\ec08"}.lni-tesla::before{content:"\\ec09"}.lni-text-format::before{content:"\\ec0a"}.lni-text-format-remove::before{content:"\\ec0b"}.lni-text-paragraph::before{content:"\\ec0c"}.lni-thumbs-down-3::before{content:"\\ec0d"}.lni-thumbs-up-3::before{content:"\\ec0e"}.lni-ticket-1::before{content:"\\ec0f"}.lni-tickets-3::before{content:"\\ec10"}.lni-tiktok::before{content:"\\ec11"}.lni-tiktok-alt::before{content:"\\ec12"}.lni-tower-broadcast-1::before{content:"\\ec13"}.lni-toyota::before{content:"\\ec14"}.lni-train-1::before{content:"\\ec15"}.lni-train-3::before{content:"\\ec16"}.lni-trash-3::before{content:"\\ec17"}.lni-tree-2::before{content:"\\ec18"}.lni-trees-3::before{content:"\\ec19"}.lni-trello::before{content:"\\ec1a"}.lni-trend-down-1::before{content:"\\ec1b"}.lni-trend-up-1::before{content:"\\ec1c"}.lni-trophy-1::before{content:"\\ec1d"}.lni-trowel-1::before{content:"\\ec1e"}.lni-truck-delivery-1::before{content:"\\ec1f"}.lni-tumblr::before{content:"\\ec20"}.lni-turborepo::before{content:"\\ec21"}.lni-twitch::before{content:"\\ec22"}.lni-twitter-old::before{content:"\\ec23"}.lni-typescript::before{content:"\\ec24"}.lni-uber::before{content:"\\ec25"}.lni-uber-symbol::before{content:"\\ec26"}.lni-ubuntu::before{content:"\\ec27"}.lni-underline::before{content:"\\ec28"}.lni-unlink-2-angular-eft::before{content:"\\ec29"}.lni-unlocked-2::before{content:"\\ec2a"}.lni-unsplash::before{content:"\\ec2b"}.lni-upload-1::before{content:"\\ec2c"}.lni-upload-circle-1::before{content:"\\ec2d"}.lni-user-4::before{content:"\\ec2e"}.lni-user-multiple-4::before{content:"\\ec2f"}.lni-vector-nodes-6::before{content:"\\ec30"}.lni-vector-nodes-7::before{content:"\\ec31"}.lni-vercel::before{content:"\\ec32"}.lni-vimeo::before{content:"\\ec33"}.lni-visa::before{content:"\\ec34"}.lni-vite::before{content:"\\ec35"}.lni-vk::before{content:"\\ec36"}.lni-vmware::before{content:"\\ec37"}.lni-volkswagen::before{content:"\\ec38"}.lni-volume-1::before{content:"\\ec39"}.lni-volume-high::before{content:"\\ec3a"}.lni-volume-low::before{content:"\\ec3b"}.lni-volume-mute::before{content:"\\ec3c"}.lni-volume-off::before{content:"\\ec3d"}.lni-vs-code::before{content:"\\ec3e"}.lni-vuejs::before{content:"\\ec3f"}.lni-wallet-1::before{content:"\\ec40"}.lni-watch-beat-1::before{content:"\\ec41"}.lni-water-drop-1::before{content:"\\ec42"}.lni-webflow::before{content:"\\ec43"}.lni-webhooks::before{content:"\\ec44"}.lni-wechat::before{content:"\\ec45"}.lni-weight-machine-1::before{content:"\\ec46"}.lni-whatsapp::before{content:"\\ec47"}.lni-wheelbarrow-empty::before{content:"\\ec48"}.lni-wheelchair-1::before{content:"\\ec49"}.lni-windows::before{content:"\\ec4a"}.lni-wise::before{content:"\\ec4b"}.lni-wordpress::before{content:"\\ec4c"}.lni-www::before{content:"\\ec4d"}.lni-www-cursor::before{content:"\\ec4e"}.lni-x::before{content:"\\ec4f"}.lni-xampp::before{content:"\\ec50"}.lni-xbox::before{content:"\\ec51"}.lni-xmark::before{content:"\\ec52"}.lni-xmark-circle::before{content:"\\ec53"}.lni-xrp::before{content:"\\ec54"}.lni-yahoo::before{content:"\\ec55"}.lni-yarn::before{content:"\\ec56"}.lni-ycombinator::before{content:"\\ec57"}.lni-yen::before{content:"\\ec58"}.lni-youtube::before{content:"\\ec59"}.lni-youtube-kids::before{content:"\\ec5a"}.lni-youtube-music::before{content:"\\ec5b"}.lni-zapier::before{content:"\\ec5c"}.lni-zero-size::before{content:"\\ec5d"}.lni-zoom::before{content:"\\ec5e"}:host{display:inline-block;box-sizing:content-box !important;--icon-size:24px;--icon-color:inherit}:host([split-pane-focus]) .icon-wrapper{cursor:pointer}.icon-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-family:sans-serif;overflow:hidden;margin:0;padding:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:100%;height:100%}.icon{width:var(--icon-size);height:var(--icon-size);color:var(--icon-color);overflow:hidden;line-height:1}.icon i{font-size:var(--icon-size) !important}.icon--default{--icon-color:rgb(var(--zn-text))}.icon--primary{--icon-color:rgb(var(--zn-primary))}.icon--accent{--icon-color:rgb(var(--zn-accent))}.icon--info{--icon-color:rgb(var(--zn-color-info))}.icon--warning{--icon-color:rgb(var(--zn-color-warning))}.icon--error{--icon-color:rgb(var(--zn-color-error))}.icon--success{--icon-color:rgb(var(--zn-color-success))}.icon--white{--icon-color:rgb(var(--zn-body))}.icon--disabled{--icon-color:rgb(var(--zn-color-disabled))}.icon--red{--icon-color:rgb(var(--zn-red))}.icon--blue{--icon-color:rgb(var(--zn-blue))}.icon--green{--icon-color:rgb(var(--zn-green))}.icon--orange{--icon-color:rgb(var(--zn-orange))}.icon--yellow{--icon-color:rgb(var(--zn-yellow))}.icon--indigo{--icon-color:rgb(var(--zn-indigo))}.icon--violet{--icon-color:rgb(var(--zn-violet))}.icon--pink{--icon-color:rgb(var(--zn-pink))}.icon--grey{--icon-color:rgb(var(--zn-grey))}.icon--filled .lucide{fill:var(--icon-fill,currentColor)}.icon--fill-default{--icon-fill:rgb(var(--zn-text))}.icon--fill-primary{--icon-fill:rgb(var(--zn-primary))}.icon--fill-accent{--icon-fill:rgb(var(--zn-accent))}.icon--fill-info{--icon-fill:rgb(var(--zn-color-info))}.icon--fill-warning{--icon-fill:rgb(var(--zn-color-warning))}.icon--fill-error{--icon-fill:rgb(var(--zn-color-error))}.icon--fill-success{--icon-fill:rgb(var(--zn-color-success))}.icon--fill-white{--icon-fill:rgb(var(--zn-body))}.icon--fill-disabled{--icon-fill:rgb(var(--zn-color-disabled))}.icon--fill-red{--icon-fill:rgb(var(--zn-red))}.icon--fill-blue{--icon-fill:rgb(var(--zn-blue))}.icon--fill-green{--icon-fill:rgb(var(--zn-green))}.icon--fill-orange{--icon-fill:rgb(var(--zn-orange))}.icon--fill-yellow{--icon-fill:rgb(var(--zn-yellow))}.icon--fill-indigo{--icon-fill:rgb(var(--zn-indigo))}.icon--fill-violet{--icon-fill:rgb(var(--zn-violet))}.icon--fill-pink{--icon-fill:rgb(var(--zn-pink))}.icon--fill-grey{--icon-fill:rgb(var(--zn-grey))}.icon--round{border-radius:50%}.icon--tile{border-radius:20%}.icon--depth{position:relative}.icon--depth:before,.icon--depth:after{content:"";position:absolute;inset:0;border-radius:inherit}.icon--depth:before{box-shadow:inset -2px -2px 1px rgba(0,0,0,0.1)}.icon--depth:after{box-shadow:inset 2px 2px 1px rgba(255,255,255,0.2)}.icon--blink{animation:blink-animation 1.5s steps(5,start) infinite}.icon--avatar{background-color:var(--avatar-color,var(--icon-color));color:hsl(from var(--avatar-color,var(--icon-color)) h s 95);display:flex;justify-content:center;align-items:center}.icon--avatar .avatar__text{font-size:calc(var(--icon-size) / 2.4);color:hsl(from var(--avatar-color,var(--icon-color)) h s 95);font-weight:var(--zn-font-weight-semibold)}.icon--padded{padding:var(--zn-spacing-small)}.icon--squared{width:auto !important;height:auto !important;aspect-ratio:1/1;display:block}.icon .mi{font-family:"Material Icons";font-size:inherit;font-weight:300;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0,"wght" 300,"GRAD" 0,"opsz" 24}.icon .mi--outlined{font-family:"Material Icons Outlined"}.icon .mi--round{font-family:"Material Icons Round"}.icon .mi--sharp{font-family:"Material Icons Sharp"}.icon .mi--two-tone{font-family:"Material Icons Two Tone"}.icon .mi--symbol-outlined{font-family:"Material Symbols Outlined"}.icon .kb{font-family:"Kubex Icons Brands";font-style:normal;font-weight:normal !important;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased}.icon .lucide{display:block;width:100%;height:100%;color:currentColor;stroke:currentColor}.icon img{max-width:100%;vertical-align:middle}@keyframes blink-animation{0%,100%{opacity:1}50%{opacity:0.5}}`;var os,wu;function iv(){return wu??(wu=import("./chunks/zn.SBAUMVLL.js").then(o=>{os=o.icons}).catch(o=>{wu=void 0,console.warn("<zn-icon> failed to load the lucide icon chunk",o)})),wu}var hr=class hr extends k{constructor(){super(...arguments);this.size=24;this.round=!1;this.tile=!1;this.depth=!1;this.padded=!1;this.blink=!1;this.squared=!1;this.gravatarOptions="";this.defaultLibrary="material-symbols-outlined";this.libraryAutoSet=!1}isPresetColor(t){return hr.presetColors.has(t)}convertToLibrary(t){return this.convertIndicatorToLibrary(t)??this.defaultLibrary}convertIndicatorToLibrary(t){switch(t){case"material":case"mat":case"m":return"material";case"material-outlined":case"mo":return"material-outlined";case"material-round":case"mr":return"material-round";case"material-sharp":case"ms":return"material-sharp";case"material-two-tone":case"mt":case"m2":return"material-two-tone";case"material-symbols-outlined":case"mso":return"material-symbols-outlined";case"gravatar":case"grav":return"gravatar";case"libravatar":return"libravatar";case"avatar":case"av":return"avatar";case"line":return"line";case"lucide":case"lu":return"lucide";case"brand":case"brands":return"brands"}}connectedCallback(){super.connectedCallback(),Ja(u`
39
+ `);let g="";for(let v=0;v<b.length;v++){let y=b.charCodeAt(v);y<128?g+=String.fromCharCode(y):y<2048?(g+=String.fromCharCode(y>>6|192),g+=String.fromCharCode(y&63|128)):(g+=String.fromCharCode(y>>12|224),g+=String.fromCharCode(y>>6&63|128),g+=String.fromCharCode(y&63|128))}return g}let r=Math.pow,n=r(2,32),a=[],s=[],l=[],p={},h=0,m=t(o),f=m.length*8;for(let b=2;h<64;b++)if(!p[b]){for(let g=0;g<313;g+=b)p[g]=!0;h<8&&(s[h]=r(b,.5)*n|0),l[h]=r(b,1/3)*n|0,h++}for(m+="\x80";m.length%64!==56;)m+="\0";for(let b=0;b<m.length;b++)a[b>>2]|=m.charCodeAt(b)<<(3-b%4)*8;a[a.length]=f/n|0,a[a.length]=f;for(let b=0;b<a.length;b+=16){let g=s.slice(0,8),v=a.slice(b,b+16);for(let y=16;y<64;y++){let S=v[y-15],T=v[y-2],N=i(S,7)^i(S,18)^S>>>3,U=i(T,17)^i(T,19)^T>>>10;v[y]=v[y-16]+N+v[y-7]+U|0}for(let y=0;y<64;y++){let S=g[0],T=g[1],N=g[2],U=g[3],I=g[4],C=g[5],$=g[6],L=g[7],W=i(I,6)^i(I,11)^i(I,25),oe=I&C^~I&$,xe=L+W+oe+l[y]+v[y]|0,De=i(S,2)^i(S,13)^i(S,22),Ne=S&T^S&N^T&N,rt=De+Ne|0;g[7]=$,g[6]=C,g[5]=I,g[4]=U+xe|0,g[3]=N,g[2]=T,g[1]=S,g[0]=xe+rt|0}for(let y=0;y<8;y++)s[y]=s[y]+g[y]|0}return s.map(b=>(b>>>0).toString(16).padStart(8,"0")).join("")}var Tl=class extends fa{};Tl.directiveName="unsafeSVG",Tl.resultType=2;var tv=yt(Tl);var rv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.lni{display:inline-block;font:normal normal normal 1em/1 "Lineicons";color:inherit;flex-shrink:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lni-sm{font-size:0.8em}.lni-lg{font-size:1.2em}.lni-16{font-size:16px}.lni-32{font-size:32px}.lni-is-spinning{animation:lni-spin 1s infinite linear}@keyframes lni-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.lni-rotate-90{transform:rotate(90deg)}.lni-rotate-180{transform:rotate(180deg)}.lni-rotate-270{transform:rotate(270deg)}.lni-flip-y{transform:scaleY(-1)}.lni-flip-x{transform:scaleX(-1)}.lni-500px::before{content:"\\ea01"}.lni-adobe::before{content:"\\ea02"}.lni-adonis::before{content:"\\ea03"}.lni-aeroplane-1::before{content:"\\ea04"}.lni-agenda::before{content:"\\ea05"}.lni-airbnb::before{content:"\\ea06"}.lni-airtable::before{content:"\\ea07"}.lni-alarm-1::before{content:"\\ea08"}.lni-align-text-center::before{content:"\\ea09"}.lni-align-text-left::before{content:"\\ea0a"}.lni-align-text-right::before{content:"\\ea0b"}.lni-alpinejs::before{content:"\\ea0c"}.lni-amazon::before{content:"\\ea0d"}.lni-amazon-original::before{content:"\\ea0e"}.lni-amazon-pay::before{content:"\\ea0f"}.lni-ambulance-1::before{content:"\\ea10"}.lni-amd::before{content:"\\ea11"}.lni-amex::before{content:"\\ea12"}.lni-anchor::before{content:"\\ea13"}.lni-android::before{content:"\\ea14"}.lni-android-old::before{content:"\\ea15"}.lni-angellist::before{content:"\\ea16"}.lni-angle-double-down::before{content:"\\ea17"}.lni-angle-double-left::before{content:"\\ea18"}.lni-angle-double-right::before{content:"\\ea19"}.lni-angle-double-up::before{content:"\\ea1a"}.lni-angular::before{content:"\\ea1b"}.lni-app-store::before{content:"\\ea1c"}.lni-apple-brand::before{content:"\\ea1d"}.lni-apple-music::before{content:"\\ea1e"}.lni-apple-music-alt::before{content:"\\ea1f"}.lni-apple-pay::before{content:"\\ea20"}.lni-arc-browser::before{content:"\\ea21"}.lni-arrow-all-direction::before{content:"\\ea22"}.lni-arrow-angular-top-left::before{content:"\\ea23"}.lni-arrow-angular-top-right::before{content:"\\ea24"}.lni-arrow-both-direction-horizontal-1::before{content:"\\ea25"}.lni-arrow-both-direction-vertical-1::before{content:"\\ea26"}.lni-arrow-downward::before{content:"\\ea27"}.lni-arrow-left::before{content:"\\ea28"}.lni-arrow-left-circle::before{content:"\\ea29"}.lni-arrow-right::before{content:"\\ea2a"}.lni-arrow-right-circle::before{content:"\\ea2b"}.lni-arrow-upward::before{content:"\\ea2c"}.lni-asana::before{content:"\\ea2d"}.lni-astro::before{content:"\\ea2e"}.lni-atlassian::before{content:"\\ea2f"}.lni-audi::before{content:"\\ea30"}.lni-audi-alt::before{content:"\\ea31"}.lni-aws::before{content:"\\ea32"}.lni-azure::before{content:"\\ea33"}.lni-badge-decagram-percent::before{content:"\\ea34"}.lni-balloons::before{content:"\\ea35"}.lni-ban-2::before{content:"\\ea36"}.lni-bar-chart-4::before{content:"\\ea37"}.lni-bar-chart-dollar::before{content:"\\ea38"}.lni-basket-shopping-3::before{content:"\\ea39"}.lni-beat::before{content:"\\ea3a"}.lni-behance::before{content:"\\ea3b"}.lni-bell-1::before{content:"\\ea3c"}.lni-bike::before{content:"\\ea3d"}.lni-bing::before{content:"\\ea3e"}.lni-bitbucket::before{content:"\\ea3f"}.lni-bitcoin::before{content:"\\ea40"}.lni-bittorrent::before{content:"\\ea41"}.lni-blogger::before{content:"\\ea42"}.lni-blogger-alt::before{content:"\\ea43"}.lni-bluetooth::before{content:"\\ea44"}.lni-bluetooth-logo::before{content:"\\ea45"}.lni-bmw::before{content:"\\ea46"}.lni-board-writing-3::before{content:"\\ea47"}.lni-bold::before{content:"\\ea48"}.lni-bolt-2::before{content:"\\ea49"}.lni-bolt-3::before{content:"\\ea4a"}.lni-book-1::before{content:"\\ea4b"}.lni-bookmark-1::before{content:"\\ea4c"}.lni-bookmark-circle::before{content:"\\ea4d"}.lni-books-2::before{content:"\\ea4e"}.lni-bootstrap-5::before{content:"\\ea4f"}.lni-bootstrap-5-square::before{content:"\\ea50"}.lni-box-archive-1::before{content:"\\ea51"}.lni-box-closed::before{content:"\\ea52"}.lni-box-gift-1::before{content:"\\ea53"}.lni-brave::before{content:"\\ea54"}.lni-bricks::before{content:"\\ea55"}.lni-bridge-3::before{content:"\\ea56"}.lni-briefcase-1::before{content:"\\ea57"}.lni-briefcase-2::before{content:"\\ea58"}.lni-briefcase-plus-1::before{content:"\\ea59"}.lni-brush-1-rotated::before{content:"\\ea5a"}.lni-brush-2::before{content:"\\ea5b"}.lni-btc::before{content:"\\ea5c"}.lni-bug-1::before{content:"\\ea5d"}.lni-buildings-1::before{content:"\\ea5e"}.lni-bulb-2::before{content:"\\ea5f"}.lni-bulb-4::before{content:"\\ea60"}.lni-burger-1::before{content:"\\ea61"}.lni-burger-drink::before{content:"\\ea62"}.lni-bus-1::before{content:"\\ea63"}.lni-busket-ball::before{content:"\\ea64"}.lni-cake-1::before{content:"\\ea65"}.lni-calculator-1::before{content:"\\ea66"}.lni-calculator-2::before{content:"\\ea67"}.lni-calendar-days::before{content:"\\ea68"}.lni-camera-1::before{content:"\\ea69"}.lni-camera-movie-1::before{content:"\\ea6a"}.lni-candy-cane-2::before{content:"\\ea6b"}.lni-candy-round-1::before{content:"\\ea6c"}.lni-canva::before{content:"\\ea6d"}.lni-capsule-1::before{content:"\\ea6e"}.lni-car-2::before{content:"\\ea6f"}.lni-car-4::before{content:"\\ea70"}.lni-car-6::before{content:"\\ea71"}.lni-caravan-1::before{content:"\\ea72"}.lni-cart-1::before{content:"\\ea73"}.lni-cart-2::before{content:"\\ea74"}.lni-cash-app::before{content:"\\ea75"}.lni-certificate-badge-1::before{content:"\\ea76"}.lni-chat-bubble-2::before{content:"\\ea77"}.lni-check::before{content:"\\ea78"}.lni-check-circle-1::before{content:"\\ea79"}.lni-check-square-2::before{content:"\\ea7a"}.lni-chevron-down::before{content:"\\ea7b"}.lni-chevron-down-circle::before{content:"\\ea7c"}.lni-chevron-left::before{content:"\\ea7d"}.lni-chevron-left-circle::before{content:"\\ea7e"}.lni-chevron-right-circle::before{content:"\\ea7f"}.lni-chevron-up::before{content:"\\ea80"}.lni-chevron-up-circle::before{content:"\\ea81"}.lni-chrome::before{content:"\\ea82"}.lni-chromecast::before{content:"\\ea83"}.lni-cisco::before{content:"\\ea84"}.lni-claude::before{content:"\\ea85"}.lni-clickup::before{content:"\\ea86"}.lni-clipboard::before{content:"\\ea87"}.lni-cloud-2::before{content:"\\ea88"}.lni-cloud-bolt-1::before{content:"\\ea89"}.lni-cloud-bolt-2::before{content:"\\ea8a"}.lni-cloud-check-circle::before{content:"\\ea8b"}.lni-cloud-download::before{content:"\\ea8c"}.lni-cloud-iot-2::before{content:"\\ea8d"}.lni-cloud-rain::before{content:"\\ea8e"}.lni-cloud-refresh-clockwise::before{content:"\\ea8f"}.lni-cloud-sun::before{content:"\\ea90"}.lni-cloud-upload::before{content:"\\ea91"}.lni-cloudflare::before{content:"\\ea92"}.lni-code-1::before{content:"\\ea93"}.lni-code-s::before{content:"\\ea94"}.lni-codepen::before{content:"\\ea95"}.lni-coffee-cup-2::before{content:"\\ea96"}.lni-coinbase::before{content:"\\ea97"}.lni-colour-palette-3::before{content:"\\ea98"}.lni-comment-1::before{content:"\\ea99"}.lni-comment-1-share::before{content:"\\ea9a"}.lni-comment-1-text::before{content:"\\ea9b"}.lni-compass-drafting-2::before{content:"\\ea9c"}.lni-connectdevelop::before{content:"\\ea9d"}.lni-copilot::before{content:"\\ea9e"}.lni-coral::before{content:"\\ea9f"}.lni-cpanel::before{content:"\\eaa0"}.lni-crane-4::before{content:"\\eaa1"}.lni-creative-commons::before{content:"\\eaa2"}.lni-credit-card-multiple::before{content:"\\eaa3"}.lni-crop-2::before{content:"\\eaa4"}.lni-crown-3::before{content:"\\eaa5"}.lni-css3::before{content:"\\eaa6"}.lni-dashboard-square-1::before{content:"\\eaa7"}.lni-database-2::before{content:"\\eaa8"}.lni-deno::before{content:"\\eaa9"}.lni-dev::before{content:"\\eaaa"}.lni-dialogflow::before{content:"\\eaab"}.lni-diamonds-1::before{content:"\\eaac"}.lni-diamonds-2::before{content:"\\eaad"}.lni-digitalocean::before{content:"\\eaae"}.lni-diners-club::before{content:"\\eaaf"}.lni-direction-ltr::before{content:"\\eab0"}.lni-direction-rtl::before{content:"\\eab1"}.lni-discord::before{content:"\\eab2"}.lni-discord-chat::before{content:"\\eab3"}.lni-discover::before{content:"\\eab4"}.lni-docker::before{content:"\\eab5"}.lni-dollar::before{content:"\\eab6"}.lni-dollar-circle::before{content:"\\eab7"}.lni-double-quotes-end-1::before{content:"\\eab8"}.lni-download-1::before{content:"\\eab9"}.lni-download-circle-1::before{content:"\\eaba"}.lni-dribbble::before{content:"\\eabb"}.lni-dribbble-symbol::before{content:"\\eabc"}.lni-drizzle::before{content:"\\eabd"}.lni-dropbox::before{content:"\\eabe"}.lni-drupal::before{content:"\\eabf"}.lni-dumbbell-1::before{content:"\\eac0"}.lni-edge::before{content:"\\eac1"}.lni-emoji-expressionless::before{content:"\\eac2"}.lni-emoji-expressionless-flat-eyes::before{content:"\\eac3"}.lni-emoji-grin::before{content:"\\eac4"}.lni-emoji-sad::before{content:"\\eac5"}.lni-emoji-smile::before{content:"\\eac6"}.lni-emoji-smile-side::before{content:"\\eac7"}.lni-emoji-smile-sunglass::before{content:"\\eac8"}.lni-emoji-smile-tongue::before{content:"\\eac9"}.lni-enter::before{content:"\\eaca"}.lni-enter-down::before{content:"\\eacb"}.lni-envato::before{content:"\\eacc"}.lni-envelope-1::before{content:"\\eacd"}.lni-eraser-1::before{content:"\\eace"}.lni-ethereum-logo::before{content:"\\eacf"}.lni-euro::before{content:"\\ead0"}.lni-exit::before{content:"\\ead1"}.lni-exit-up::before{content:"\\ead2"}.lni-expand-arrow-1::before{content:"\\ead3"}.lni-expand-square-4::before{content:"\\ead4"}.lni-expressjs::before{content:"\\ead5"}.lni-eye::before{content:"\\ead6"}.lni-facebook::before{content:"\\ead7"}.lni-facebook-messenger::before{content:"\\ead8"}.lni-facebook-rounded::before{content:"\\ead9"}.lni-facebook-square::before{content:"\\eada"}.lni-facetime::before{content:"\\eadb"}.lni-figma::before{content:"\\eadc"}.lni-file-format-zip::before{content:"\\eadd"}.lni-file-multiple::before{content:"\\eade"}.lni-file-pencil::before{content:"\\eadf"}.lni-file-plus-circle::before{content:"\\eae0"}.lni-file-question::before{content:"\\eae1"}.lni-file-xmark::before{content:"\\eae2"}.lni-firebase::before{content:"\\eae3"}.lni-firefox::before{content:"\\eae4"}.lni-firework-rocket-4::before{content:"\\eae5"}.lni-fitbit::before{content:"\\eae6"}.lni-flag-1::before{content:"\\eae7"}.lni-flag-2::before{content:"\\eae8"}.lni-flickr::before{content:"\\eae9"}.lni-floppy-disk-1::before{content:"\\eaea"}.lni-flower-2::before{content:"\\eaeb"}.lni-flutter::before{content:"\\eaec"}.lni-folder-1::before{content:"\\eaed"}.lni-ford::before{content:"\\eaee"}.lni-framer::before{content:"\\eaef"}.lni-funnel-1::before{content:"\\eaf0"}.lni-gallery::before{content:"\\eaf1"}.lni-game-pad-modern-1::before{content:"\\eaf2"}.lni-gatsby::before{content:"\\eaf3"}.lni-gauge-1::before{content:"\\eaf4"}.lni-gear-1::before{content:"\\eaf5"}.lni-gears-3::before{content:"\\eaf6"}.lni-gemini::before{content:"\\eaf7"}.lni-git::before{content:"\\eaf8"}.lni-github::before{content:"\\eaf9"}.lni-glass-juice-1::before{content:"\\eafa"}.lni-globe-1::before{content:"\\eafb"}.lni-globe-stand::before{content:"\\eafc"}.lni-go::before{content:"\\eafd"}.lni-goodreads::before{content:"\\eafe"}.lni-google::before{content:"\\eaff"}.lni-google-cloud::before{content:"\\eb00"}.lni-google-drive::before{content:"\\eb01"}.lni-google-meet::before{content:"\\eb02"}.lni-google-pay::before{content:"\\eb03"}.lni-google-wallet::before{content:"\\eb04"}.lni-graduation-cap-1::before{content:"\\eb05"}.lni-grammarly::before{content:"\\eb06"}.lni-hacker-news::before{content:"\\eb07"}.lni-hammer-1::before{content:"\\eb08"}.lni-hammer-2::before{content:"\\eb09"}.lni-hand-mic::before{content:"\\eb0a"}.lni-hand-shake::before{content:"\\eb0b"}.lni-hand-stop::before{content:"\\eb0c"}.lni-hand-taking-dollar::before{content:"\\eb0d"}.lni-hand-taking-leaf-1::before{content:"\\eb0e"}.lni-hand-taking-user::before{content:"\\eb0f"}.lni-hashnode::before{content:"\\eb10"}.lni-hat-chef-3::before{content:"\\eb11"}.lni-headphone-1::before{content:"\\eb12"}.lni-heart::before{content:"\\eb13"}.lni-helicopter-2::before{content:"\\eb14"}.lni-helmet-safety-1::before{content:"\\eb15"}.lni-hierarchy-1::before{content:"\\eb16"}.lni-highlighter-1::before{content:"\\eb17"}.lni-highlighter-2::before{content:"\\eb18"}.lni-home-2::before{content:"\\eb19"}.lni-hospital-2::before{content:"\\eb1a"}.lni-hourglass::before{content:"\\eb1b"}.lni-html5::before{content:"\\eb1c"}.lni-ibm::before{content:"\\eb1d"}.lni-id-card::before{content:"\\eb1e"}.lni-imdb::before{content:"\\eb1f"}.lni-indent::before{content:"\\eb20"}.lni-info::before{content:"\\eb21"}.lni-injection-1::before{content:"\\eb22"}.lni-instagram::before{content:"\\eb23"}.lni-instagram-logotype::before{content:"\\eb24"}.lni-intel::before{content:"\\eb25"}.lni-ios::before{content:"\\eb26"}.lni-island-2::before{content:"\\eb27"}.lni-jaguar::before{content:"\\eb28"}.lni-jamstack::before{content:"\\eb29"}.lni-java::before{content:"\\eb2a"}.lni-javascript::before{content:"\\eb2b"}.lni-jcb::before{content:"\\eb2c"}.lni-joomla::before{content:"\\eb2d"}.lni-jsfiddle::before{content:"\\eb2e"}.lni-key-1::before{content:"\\eb2f"}.lni-keyboard::before{content:"\\eb30"}.lni-knife-fork-1::before{content:"\\eb31"}.lni-kubernetes::before{content:"\\eb32"}.lni-label-dollar-2::before{content:"\\eb33"}.lni-laptop-2::before{content:"\\eb34"}.lni-laptop-phone::before{content:"\\eb35"}.lni-laravel::before{content:"\\eb36"}.lni-layers-1::before{content:"\\eb37"}.lni-layout-26::before{content:"\\eb38"}.lni-layout-9::before{content:"\\eb39"}.lni-leaf-1::before{content:"\\eb3a"}.lni-leaf-6::before{content:"\\eb3b"}.lni-lemon-squeezy::before{content:"\\eb3c"}.lni-life-guard-tube-1::before{content:"\\eb3d"}.lni-line::before{content:"\\eb3e"}.lni-line-dashed::before{content:"\\eb3f"}.lni-line-dotted::before{content:"\\eb40"}.lni-line-height::before{content:"\\eb41"}.lni-lineicons::before{content:"\\eb42"}.lni-link-2-angular-right::before{content:"\\eb43"}.lni-linkedin::before{content:"\\eb44"}.lni-location-arrow-right::before{content:"\\eb45"}.lni-locked-1::before{content:"\\eb46"}.lni-locked-2::before{content:"\\eb47"}.lni-loom::before{content:"\\eb48"}.lni-magento::before{content:"\\eb49"}.lni-magnet::before{content:"\\eb4a"}.lni-mailchimp::before{content:"\\eb4b"}.lni-map-marker-1::before{content:"\\eb4c"}.lni-map-marker-5::before{content:"\\eb4d"}.lni-map-pin-5::before{content:"\\eb4e"}.lni-markdown::before{content:"\\eb4f"}.lni-mastercard::before{content:"\\eb50"}.lni-medium::before{content:"\\eb51"}.lni-medium-alt::before{content:"\\eb52"}.lni-megaphone-1::before{content:"\\eb53"}.lni-menu-cheesburger::before{content:"\\eb54"}.lni-menu-hamburger-1::before{content:"\\eb55"}.lni-menu-meatballs-1::before{content:"\\eb56"}.lni-menu-meatballs-2::before{content:"\\eb57"}.lni-mercedes::before{content:"\\eb58"}.lni-message-2::before{content:"\\eb59"}.lni-message-2-question::before{content:"\\eb5a"}.lni-message-3-text::before{content:"\\eb5b"}.lni-meta::before{content:"\\eb5c"}.lni-meta-alt::before{content:"\\eb5d"}.lni-microphone-1::before{content:"\\eb5e"}.lni-microscope::before{content:"\\eb5f"}.lni-microsoft::before{content:"\\eb60"}.lni-microsoft-edge::before{content:"\\eb61"}.lni-microsoft-teams::before{content:"\\eb62"}.lni-minus::before{content:"\\eb63"}.lni-minus-circle::before{content:"\\eb64"}.lni-mongodb::before{content:"\\eb65"}.lni-monitor::before{content:"\\eb66"}.lni-monitor-code::before{content:"\\eb67"}.lni-monitor-mac::before{content:"\\eb68"}.lni-moon-half-right-5::before{content:"\\eb69"}.lni-mountains-2::before{content:"\\eb6a"}.lni-mouse-2::before{content:"\\eb6b"}.lni-mushroom-1::before{content:"\\eb6c"}.lni-mushroom-5::before{content:"\\eb6d"}.lni-music::before{content:"\\eb6e"}.lni-mysql::before{content:"\\eb6f"}.lni-nasa::before{content:"\\eb70"}.lni-netflix::before{content:"\\eb71"}.lni-netlify::before{content:"\\eb72"}.lni-next-step-2::before{content:"\\eb73"}.lni-nextjs::before{content:"\\eb74"}.lni-nike::before{content:"\\eb75"}.lni-nissan::before{content:"\\eb76"}.lni-nodejs::before{content:"\\eb77"}.lni-nodejs-alt::before{content:"\\eb78"}.lni-notebook-1::before{content:"\\eb79"}.lni-notion::before{content:"\\eb7a"}.lni-npm::before{content:"\\eb7b"}.lni-nuxt::before{content:"\\eb7c"}.lni-nvidia::before{content:"\\eb7d"}.lni-oculus::before{content:"\\eb7e"}.lni-open-ai::before{content:"\\eb7f"}.lni-opera-mini::before{content:"\\eb80"}.lni-oracle::before{content:"\\eb81"}.lni-outdent::before{content:"\\eb82"}.lni-paddle::before{content:"\\eb83"}.lni-page-break-1::before{content:"\\eb84"}.lni-pagination::before{content:"\\eb85"}.lni-paint-bucket::before{content:"\\eb86"}.lni-paint-roller-1::before{content:"\\eb87"}.lni-paperclip-1::before{content:"\\eb88"}.lni-party-flags::before{content:"\\eb89"}.lni-party-spray::before{content:"\\eb8a"}.lni-patreon::before{content:"\\eb8b"}.lni-pause::before{content:"\\eb8c"}.lni-payoneer::before{content:"\\eb8d"}.lni-paypal::before{content:"\\eb8e"}.lni-pen-to-square::before{content:"\\eb8f"}.lni-pencil-1::before{content:"\\eb90"}.lni-pepsi::before{content:"\\eb91"}.lni-phone::before{content:"\\eb92"}.lni-photos::before{content:"\\eb93"}.lni-php::before{content:"\\eb94"}.lni-pie-chart-2::before{content:"\\eb95"}.lni-pilcrow::before{content:"\\eb96"}.lni-pimjo-logo::before{content:"\\eb97"}.lni-pimjo-symbol::before{content:"\\eb98"}.lni-pinterest::before{content:"\\eb99"}.lni-pizza-2::before{content:"\\eb9a"}.lni-placeholder-dollar::before{content:"\\eb9b"}.lni-plantscale::before{content:"\\eb9c"}.lni-play::before{content:"\\eb9d"}.lni-play-store::before{content:"\\eb9e"}.lni-playstation::before{content:"\\eb9f"}.lni-plug-1::before{content:"\\eba0"}.lni-plus::before{content:"\\eba1"}.lni-plus-circle::before{content:"\\eba2"}.lni-pnpm::before{content:"\\eba3"}.lni-postgresql::before{content:"\\eba4"}.lni-postman::before{content:"\\eba5"}.lni-pound::before{content:"\\eba6"}.lni-power-button::before{content:"\\eba7"}.lni-previous-step-2::before{content:"\\eba8"}.lni-printer::before{content:"\\eba9"}.lni-prisma::before{content:"\\ebaa"}.lni-producthunt::before{content:"\\ebab"}.lni-proton-mail-logo::before{content:"\\ebac"}.lni-proton-mail-symbol::before{content:"\\ebad"}.lni-python::before{content:"\\ebae"}.lni-question-mark::before{content:"\\ebaf"}.lni-question-mark-circle::before{content:"\\ebb0"}.lni-quora::before{content:"\\ebb1"}.lni-radis::before{content:"\\ebb2"}.lni-react::before{content:"\\ebb3"}.lni-reddit::before{content:"\\ebb4"}.lni-refresh-circle-1-clockwise::before{content:"\\ebb5"}.lni-refresh-dollar-1::before{content:"\\ebb6"}.lni-refresh-user-1::before{content:"\\ebb7"}.lni-remix-js::before{content:"\\ebb8"}.lni-road-1::before{content:"\\ebb9"}.lni-rocket-5::before{content:"\\ebba"}.lni-route-1::before{content:"\\ebbb"}.lni-rss-right::before{content:"\\ebbc"}.lni-ruler-1::before{content:"\\ebbd"}.lni-ruler-pen::before{content:"\\ebbe"}.lni-rupee::before{content:"\\ebbf"}.lni-safari::before{content:"\\ebc0"}.lni-sanity::before{content:"\\ebc1"}.lni-school-bench-1::before{content:"\\ebc2"}.lni-school-bench-2::before{content:"\\ebc3"}.lni-scissors-1-vertical::before{content:"\\ebc4"}.lni-scoter::before{content:"\\ebc5"}.lni-scroll-down-2::before{content:"\\ebc6"}.lni-search-1::before{content:"\\ebc7"}.lni-search-2::before{content:"\\ebc8"}.lni-search-minus::before{content:"\\ebc9"}.lni-search-plus::before{content:"\\ebca"}.lni-search-text::before{content:"\\ebcb"}.lni-select-cursor-1::before{content:"\\ebcc"}.lni-seo-monitor::before{content:"\\ebcd"}.lni-service-bell-1::before{content:"\\ebce"}.lni-share-1::before{content:"\\ebcf"}.lni-share-1-circle::before{content:"\\ebd0"}.lni-share-2::before{content:"\\ebd1"}.lni-shield-2::before{content:"\\ebd2"}.lni-shield-2-check::before{content:"\\ebd3"}.lni-shield-dollar::before{content:"\\ebd4"}.lni-shift-left::before{content:"\\ebd5"}.lni-shift-right::before{content:"\\ebd6"}.lni-ship-1::before{content:"\\ebd7"}.lni-shirt-1::before{content:"\\ebd8"}.lni-shopify::before{content:"\\ebd9"}.lni-shovel::before{content:"\\ebda"}.lni-shuffle::before{content:"\\ebdb"}.lni-sign-post-left::before{content:"\\ebdc"}.lni-signal-app::before{content:"\\ebdd"}.lni-signs-post-2::before{content:"\\ebde"}.lni-sketch::before{content:"\\ebdf"}.lni-skype::before{content:"\\ebe0"}.lni-slack::before{content:"\\ebe1"}.lni-slice-2::before{content:"\\ebe2"}.lni-sliders-horizontal-square-2::before{content:"\\ebe3"}.lni-slideshare::before{content:"\\ebe4"}.lni-snapchat::before{content:"\\ebe5"}.lni-sort-alphabetical::before{content:"\\ebe6"}.lni-sort-high-to-low::before{content:"\\ebe7"}.lni-soundcloud::before{content:"\\ebe8"}.lni-spacex::before{content:"\\ebe9"}.lni-spellcheck::before{content:"\\ebea"}.lni-spinner-2-sacle::before{content:"\\ebeb"}.lni-spinner-3::before{content:"\\ebec"}.lni-sports::before{content:"\\ebed"}.lni-spotify::before{content:"\\ebee"}.lni-spotify-alt::before{content:"\\ebef"}.lni-squarespace::before{content:"\\ebf0"}.lni-stackoverflow::before{content:"\\ebf1"}.lni-stamp::before{content:"\\ebf2"}.lni-star-fat::before{content:"\\ebf3"}.lni-star-fat-half-2::before{content:"\\ebf4"}.lni-star-sharp-disabled::before{content:"\\ebf5"}.lni-statista::before{content:"\\ebf6"}.lni-steam::before{content:"\\ebf7"}.lni-stethoscope-1::before{content:"\\ebf8"}.lni-stopwatch::before{content:"\\ebf9"}.lni-storage-hdd-2::before{content:"\\ebfa"}.lni-strikethrough-1::before{content:"\\ebfb"}.lni-stripe::before{content:"\\ebfc"}.lni-stumbleupon::before{content:"\\ebfd"}.lni-sun-1::before{content:"\\ebfe"}.lni-supabase::before{content:"\\ebff"}.lni-surfboard-2::before{content:"\\ec00"}.lni-svelte::before{content:"\\ec01"}.lni-swift::before{content:"\\ec02"}.lni-tab::before{content:"\\ec03"}.lni-tailwindcss::before{content:"\\ec04"}.lni-target-user::before{content:"\\ec05"}.lni-telegram::before{content:"\\ec06"}.lni-telephone-1::before{content:"\\ec07"}.lni-telephone-3::before{content:"\\ec08"}.lni-tesla::before{content:"\\ec09"}.lni-text-format::before{content:"\\ec0a"}.lni-text-format-remove::before{content:"\\ec0b"}.lni-text-paragraph::before{content:"\\ec0c"}.lni-thumbs-down-3::before{content:"\\ec0d"}.lni-thumbs-up-3::before{content:"\\ec0e"}.lni-ticket-1::before{content:"\\ec0f"}.lni-tickets-3::before{content:"\\ec10"}.lni-tiktok::before{content:"\\ec11"}.lni-tiktok-alt::before{content:"\\ec12"}.lni-tower-broadcast-1::before{content:"\\ec13"}.lni-toyota::before{content:"\\ec14"}.lni-train-1::before{content:"\\ec15"}.lni-train-3::before{content:"\\ec16"}.lni-trash-3::before{content:"\\ec17"}.lni-tree-2::before{content:"\\ec18"}.lni-trees-3::before{content:"\\ec19"}.lni-trello::before{content:"\\ec1a"}.lni-trend-down-1::before{content:"\\ec1b"}.lni-trend-up-1::before{content:"\\ec1c"}.lni-trophy-1::before{content:"\\ec1d"}.lni-trowel-1::before{content:"\\ec1e"}.lni-truck-delivery-1::before{content:"\\ec1f"}.lni-tumblr::before{content:"\\ec20"}.lni-turborepo::before{content:"\\ec21"}.lni-twitch::before{content:"\\ec22"}.lni-twitter-old::before{content:"\\ec23"}.lni-typescript::before{content:"\\ec24"}.lni-uber::before{content:"\\ec25"}.lni-uber-symbol::before{content:"\\ec26"}.lni-ubuntu::before{content:"\\ec27"}.lni-underline::before{content:"\\ec28"}.lni-unlink-2-angular-eft::before{content:"\\ec29"}.lni-unlocked-2::before{content:"\\ec2a"}.lni-unsplash::before{content:"\\ec2b"}.lni-upload-1::before{content:"\\ec2c"}.lni-upload-circle-1::before{content:"\\ec2d"}.lni-user-4::before{content:"\\ec2e"}.lni-user-multiple-4::before{content:"\\ec2f"}.lni-vector-nodes-6::before{content:"\\ec30"}.lni-vector-nodes-7::before{content:"\\ec31"}.lni-vercel::before{content:"\\ec32"}.lni-vimeo::before{content:"\\ec33"}.lni-visa::before{content:"\\ec34"}.lni-vite::before{content:"\\ec35"}.lni-vk::before{content:"\\ec36"}.lni-vmware::before{content:"\\ec37"}.lni-volkswagen::before{content:"\\ec38"}.lni-volume-1::before{content:"\\ec39"}.lni-volume-high::before{content:"\\ec3a"}.lni-volume-low::before{content:"\\ec3b"}.lni-volume-mute::before{content:"\\ec3c"}.lni-volume-off::before{content:"\\ec3d"}.lni-vs-code::before{content:"\\ec3e"}.lni-vuejs::before{content:"\\ec3f"}.lni-wallet-1::before{content:"\\ec40"}.lni-watch-beat-1::before{content:"\\ec41"}.lni-water-drop-1::before{content:"\\ec42"}.lni-webflow::before{content:"\\ec43"}.lni-webhooks::before{content:"\\ec44"}.lni-wechat::before{content:"\\ec45"}.lni-weight-machine-1::before{content:"\\ec46"}.lni-whatsapp::before{content:"\\ec47"}.lni-wheelbarrow-empty::before{content:"\\ec48"}.lni-wheelchair-1::before{content:"\\ec49"}.lni-windows::before{content:"\\ec4a"}.lni-wise::before{content:"\\ec4b"}.lni-wordpress::before{content:"\\ec4c"}.lni-www::before{content:"\\ec4d"}.lni-www-cursor::before{content:"\\ec4e"}.lni-x::before{content:"\\ec4f"}.lni-xampp::before{content:"\\ec50"}.lni-xbox::before{content:"\\ec51"}.lni-xmark::before{content:"\\ec52"}.lni-xmark-circle::before{content:"\\ec53"}.lni-xrp::before{content:"\\ec54"}.lni-yahoo::before{content:"\\ec55"}.lni-yarn::before{content:"\\ec56"}.lni-ycombinator::before{content:"\\ec57"}.lni-yen::before{content:"\\ec58"}.lni-youtube::before{content:"\\ec59"}.lni-youtube-kids::before{content:"\\ec5a"}.lni-youtube-music::before{content:"\\ec5b"}.lni-zapier::before{content:"\\ec5c"}.lni-zero-size::before{content:"\\ec5d"}.lni-zoom::before{content:"\\ec5e"}:host{display:inline-block;box-sizing:content-box !important;--icon-size:24px;--icon-color:inherit}:host([split-pane-focus]) .icon-wrapper{cursor:pointer}.icon-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-family:sans-serif;overflow:hidden;margin:0;padding:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:100%;height:100%}.icon{width:var(--icon-size);height:var(--icon-size);color:var(--icon-color);overflow:hidden;line-height:1}.icon i{font-size:var(--icon-size) !important}.icon--default{--icon-color:rgb(var(--zn-text))}.icon--primary{--icon-color:rgb(var(--zn-primary))}.icon--accent{--icon-color:rgb(var(--zn-accent))}.icon--info{--icon-color:rgb(var(--zn-color-info))}.icon--warning{--icon-color:rgb(var(--zn-color-warning))}.icon--error{--icon-color:rgb(var(--zn-color-error))}.icon--success{--icon-color:rgb(var(--zn-color-success))}.icon--white{--icon-color:rgb(var(--zn-body))}.icon--disabled{--icon-color:rgb(var(--zn-color-disabled))}.icon--red{--icon-color:rgb(var(--zn-red))}.icon--blue{--icon-color:rgb(var(--zn-blue))}.icon--green{--icon-color:rgb(var(--zn-green))}.icon--orange{--icon-color:rgb(var(--zn-orange))}.icon--yellow{--icon-color:rgb(var(--zn-yellow))}.icon--indigo{--icon-color:rgb(var(--zn-indigo))}.icon--violet{--icon-color:rgb(var(--zn-violet))}.icon--pink{--icon-color:rgb(var(--zn-pink))}.icon--grey{--icon-color:rgb(var(--zn-grey))}.icon--filled .lucide{fill:var(--icon-fill,currentColor)}.icon--fill-default{--icon-fill:rgb(var(--zn-text))}.icon--fill-primary{--icon-fill:rgb(var(--zn-primary))}.icon--fill-accent{--icon-fill:rgb(var(--zn-accent))}.icon--fill-info{--icon-fill:rgb(var(--zn-color-info))}.icon--fill-warning{--icon-fill:rgb(var(--zn-color-warning))}.icon--fill-error{--icon-fill:rgb(var(--zn-color-error))}.icon--fill-success{--icon-fill:rgb(var(--zn-color-success))}.icon--fill-white{--icon-fill:rgb(var(--zn-body))}.icon--fill-disabled{--icon-fill:rgb(var(--zn-color-disabled))}.icon--fill-red{--icon-fill:rgb(var(--zn-red))}.icon--fill-blue{--icon-fill:rgb(var(--zn-blue))}.icon--fill-green{--icon-fill:rgb(var(--zn-green))}.icon--fill-orange{--icon-fill:rgb(var(--zn-orange))}.icon--fill-yellow{--icon-fill:rgb(var(--zn-yellow))}.icon--fill-indigo{--icon-fill:rgb(var(--zn-indigo))}.icon--fill-violet{--icon-fill:rgb(var(--zn-violet))}.icon--fill-pink{--icon-fill:rgb(var(--zn-pink))}.icon--fill-grey{--icon-fill:rgb(var(--zn-grey))}.icon--round{border-radius:50%}.icon--tile{border-radius:20%}.icon--depth{position:relative}.icon--depth:before,.icon--depth:after{content:"";position:absolute;inset:0;border-radius:inherit}.icon--depth:before{box-shadow:inset -2px -2px 1px rgba(0,0,0,0.1)}.icon--depth:after{box-shadow:inset 2px 2px 1px rgba(255,255,255,0.2)}.icon--blink{animation:blink-animation 1.5s steps(5,start) infinite}.icon--avatar{background-color:var(--avatar-color,var(--icon-color));color:hsl(from var(--avatar-color,var(--icon-color)) h s 95);display:flex;justify-content:center;align-items:center}.icon--avatar .avatar__text{font-size:calc(var(--icon-size) / 2.4);color:hsl(from var(--avatar-color,var(--icon-color)) h s 95);font-weight:var(--zn-font-weight-semibold)}.icon--padded{padding:var(--zn-spacing-small)}.icon--squared{width:auto !important;height:auto !important;aspect-ratio:1/1;display:block}.icon .mi{font-family:"Material Icons";font-size:inherit;font-weight:300;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0,"wght" 300,"GRAD" 0,"opsz" 24}.icon .mi--outlined{font-family:"Material Icons Outlined"}.icon .mi--round{font-family:"Material Icons Round"}.icon .mi--sharp{font-family:"Material Icons Sharp"}.icon .mi--two-tone{font-family:"Material Icons Two Tone"}.icon .mi--symbol-outlined{font-family:"Material Symbols Outlined"}.icon .kb{font-family:"Kubex Icons Brands";font-style:normal;font-weight:normal !important;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased}.icon .lucide{display:block;width:100%;height:100%;color:currentColor;stroke:currentColor}.icon img{max-width:100%;vertical-align:middle}@keyframes blink-animation{0%,100%{opacity:1}50%{opacity:0.5}}`;var os,wu;function iv(){return wu??(wu=import("./chunks/zn.SBAUMVLL.js").then(o=>{os=o.icons}).catch(o=>{wu=void 0,console.warn("<zn-icon> failed to load the lucide icon chunk",o)})),wu}var hr=class hr extends k{constructor(){super(...arguments);this.size=24;this.round=!1;this.tile=!1;this.depth=!1;this.padded=!1;this.blink=!1;this.squared=!1;this.gravatarOptions="";this.defaultLibrary="material-symbols-outlined";this.libraryAutoSet=!1}isPresetColor(t){return hr.presetColors.has(t)}convertToLibrary(t){return this.convertIndicatorToLibrary(t)??this.defaultLibrary}convertIndicatorToLibrary(t){switch(t){case"material":case"mat":case"m":return"material";case"material-outlined":case"mo":return"material-outlined";case"material-round":case"mr":return"material-round";case"material-sharp":case"ms":return"material-sharp";case"material-two-tone":case"mt":case"m2":return"material-two-tone";case"material-symbols-outlined":case"mso":return"material-symbols-outlined";case"gravatar":case"grav":return"gravatar";case"libravatar":return"libravatar";case"avatar":case"av":return"avatar";case"line":return"line";case"lucide":case"lu":return"lucide";case"brand":case"brands":return"brands"}}connectedCallback(){super.connectedCallback(),Ja(u`
40
40
  <link
41
41
  href="https://cdn.jsdelivr.net/gh/kubex/icons@0.0.8/dist/kubex-icons.css"
42
42
  rel="stylesheet">
@@ -136,7 +136,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
136
136
  ${this.loadingText}<span class="loading-countdown"></span>
137
137
  </span>
138
138
  </div>
139
- `:null}`}};le.styles=[z(Sd),z(ov)],le.dependencies={"zn-tooltip":gi,"zn-icon":ne},c([F(".button")],le.prototype,"button",2),c([es(".loading-countdown")],le.prototype,"countdownContainer",2),c([d({})],le.prototype,"color",2),c([d({attribute:"hover-color"})],le.prototype,"hoverColor",2),c([d({type:Boolean})],le.prototype,"text",2),c([d({type:Boolean})],le.prototype,"outline",2),c([d({type:Boolean})],le.prototype,"disabled",2),c([d({type:Boolean})],le.prototype,"grow",2),c([d({type:Boolean})],le.prototype,"square",2),c([d({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],le.prototype,"iconButton",2),c([d({type:Boolean})],le.prototype,"plain",2),c([d({type:Boolean,attribute:"no-hover"})],le.prototype,"noHover",2),c([d({type:Boolean,reflect:!0})],le.prototype,"pill",2),c([d({type:Boolean,attribute:"panel-bg"})],le.prototype,"panelBackground",2),c([d({attribute:"dropdown-closer",type:Boolean})],le.prototype,"dropdownCloser",2),c([d({type:Number})],le.prototype,"notification",2),c([d({attribute:"muted-notifications",type:Boolean})],le.prototype,"mutedNotifications",2),c([d()],le.prototype,"verticalAlign",2),c([d()],le.prototype,"content",2),c([d()],le.prototype,"icon",2),c([d()],le.prototype,"gaid",2),c([d({attribute:"icon-position"})],le.prototype,"iconPosition",2),c([d({attribute:"icon-size"})],le.prototype,"iconSize",2),c([d({attribute:"icon-color"})],le.prototype,"iconColor",2),c([d({attribute:"icon-fill"})],le.prototype,"iconFill",2),c([d({attribute:"icon-library"})],le.prototype,"iconLibrary",2),c([d()],le.prototype,"type",2),c([d()],le.prototype,"name",2),c([d()],le.prototype,"value",2),c([d()],le.prototype,"form",2),c([d({attribute:"formaction"})],le.prototype,"formAction",2),c([d({attribute:"formenctype"})],le.prototype,"formEnctype",2),c([d({attribute:"formmethod"})],le.prototype,"formMethod",2),c([d({attribute:"formnovalidate",type:Boolean})],le.prototype,"formNoValidate",2),c([d({attribute:"formtarget"})],le.prototype,"formTarget",2),c([d()],le.prototype,"href",2),c([d()],le.prototype,"target",2),c([d({attribute:"data-target"})],le.prototype,"dataTarget",2),c([d()],le.prototype,"rel",2),c([d()],le.prototype,"tooltip",2),c([d()],le.prototype,"label",2),c([d({type:Boolean,attribute:"auto-click"})],le.prototype,"autoClick",2),c([d({type:Number,attribute:"auto-click-delay"})],le.prototype,"autoClickDelay",2),c([d({type:String,attribute:"loading-text"})],le.prototype,"loadingText",2),c([d({type:String,attribute:"loading-text-position"})],le.prototype,"loadingTextPosition",2),c([d({type:Boolean})],le.prototype,"loading",2),c([K("autoClick")],le.prototype,"handleAutoClickChange",1);var $e=le;le.define("zn-button");var Oe=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){let i=this.u.takeRecords();(i.length||!this.o&&this.i)&&this.handleChanges(i),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var as=class extends k{constructor(){super();this._resizeFrame=null;new Oe(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(t){super.firstUpdated(t),this.resize()}disconnectedCallback(){super.disconnectedCallback(),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null)}resize(){this._resizeFrame===null&&(this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null;let t=0;Array.from(this.children).forEach(n=>{t+=n.getBoundingClientRect().height});let r=t+"px";this.style.minHeight!==r&&(this.style.minHeight=r)}))}createRenderRoot(){return this}};var z5=as;as.define("zn-absolute-container");var wn=Math.min,Ji=Math.max,Al=Math.round,Ml=Math.floor,zn=o=>({x:o,y:o}),_5={left:"right",right:"left",bottom:"top",top:"bottom"};function _u(o,i,t){return Ji(o,wn(i,t))}function fa(o,i){return typeof o=="function"?o(i):o}function xo(o){return o.split("-")[0]}function ga(o){return o.split("-")[1]}function ku(o){return o==="x"?"y":"x"}function Td(o){return o==="y"?"height":"width"}function _n(o){let i=o[0];return i==="t"||i==="b"?"y":"x"}function $d(o){return ku(_n(o))}function lv(o,i,t){t===void 0&&(t=!1);let r=ga(o),n=$d(o),a=Td(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(s=$l(s)),[s,$l(s)]}function cv(o){let i=$l(o);return[Ed(o),i,Ed(i)]}function Ed(o){return o.includes("start")?o.replace("start","end"):o.replace("end","start")}var av=["left","right"],sv=["right","left"],k5=["top","bottom"],C5=["bottom","top"];function S5(o,i,t){switch(o){case"top":case"bottom":return t?i?sv:av:i?av:sv;case"left":case"right":return i?k5:C5;default:return[]}}function dv(o,i,t,r){let n=ga(o),a=S5(xo(o),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),i&&(a=a.concat(a.map(Ed)))),a}function $l(o){let i=xo(o);return _5[i]+o.slice(i.length)}function E5(o){var i,t,r,n;return{top:(i=o.top)!=null?i:0,right:(t=o.right)!=null?t:0,bottom:(r=o.bottom)!=null?r:0,left:(n=o.left)!=null?n:0}}function Cu(o){return typeof o!="number"?E5(o):{top:o,right:o,bottom:o,left:o}}function ba(o){let{x:i,y:t,width:r,height:n}=o;return{width:r,height:n,top:t,left:i,right:i+r,bottom:t+n,x:i,y:t}}function pv(o,i,t){let{reference:r,floating:n}=o,a=_n(i),s=$d(i),l=Td(s),p=xo(i),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(p){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=ga(i);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function hv(o,i){var t;i===void 0&&(i={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:p}=o,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=fa(i,o),v=Cu(g),S=l[b?f==="floating"?"reference":"floating":f],T=ba(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(S)))==null||t?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:p})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,U=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(U))&&await(a.getScale==null?void 0:a.getScale(U))||{x:1,y:1},C=ba(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:U,strategy:p}):N);return{top:(T.top-C.top+v.top)/I.y,bottom:(C.bottom-T.bottom+v.bottom)/I.y,left:(T.left-C.left+v.left)/I.x,right:(C.right-T.right+v.right)/I.x}}var T5=50,uv=async(o,i,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:hv},p=await(s.isRTL==null?void 0:s.isRTL(i)),h=await s.getElementRects({reference:o,floating:i,strategy:n}),{x:m,y:f}=pv(h,r,p),b=r,g=0,v={};for(let y=0;y<a.length;y++){let S=a[y];if(!S)continue;let{name:T,fn:N}=S,{x:U,y:I,data:C,reset:$}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:o,floating:i}});m=U??m,f=I??f,v[T]={...v[T],...C},$&&g<T5&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:o,floating:i,strategy:n}):$.rects),{x:m,y:f}=pv(h,b,p)),y=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},mv=o=>({name:"arrow",options:o,async fn(i){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:p}=i,{element:h,padding:m=0}=fa(o,i)||{};if(h==null)return{};let f=Cu(m),b={x:t,y:r},g=$d(n),v=Td(g),y=await s.getDimensions(h),S=g==="y",T=S?"top":"left",N=S?"bottom":"right",U=S?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],C=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=$?$[U]:0;(!L||!await(s.isElement==null?void 0:s.isElement($)))&&(L=l.floating[U]||a.floating[v]);let W=I/2-C/2,oe=L/2-y[v]/2-1,xe=wn(f[T],oe),De=wn(f[N],oe),Ne=L-y[v]-De,rt=L/2-y[v]/2+W,er=_u(xe,rt,Ne),Pr=!p.arrow&&ga(n)!=null&&rt!==er&&a.reference[v]/2-(rt<xe?xe:De)-y[v]/2<0,wr=Pr?rt<xe?rt-xe:rt-Ne:0;return{[g]:b[g]+wr,data:{[g]:er,centerOffset:rt-er-wr,...Pr&&{alignmentOffset:wr}},reset:Pr}}});var fv=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(i){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:p,elements:h}=i,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...S}=fa(o,i);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let T=xo(n),N=_n(l),U=xo(l)===l,I=await(p.isRTL==null?void 0:p.isRTL(h.floating)),C=b||(U||!y?[$l(l)]:cv(l)),$=v!=="none";!b&&$&&C.push(...dv(l,y,v,I));let L=[l,...C],W=await p.detectOverflow(i,S),oe=[],xe=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&oe.push(W[T]),f){let er=lv(n,s,I);oe.push(W[er[0]],W[er[1]])}if(xe=[...xe,{placement:n,overflows:oe}],!oe.every(er=>er<=0)){var De,Ne;let er=(((De=a.flip)==null?void 0:De.index)||0)+1,Pr=L[er];if(Pr&&(!(f==="alignment"?N!==_n(Pr):!1)||xe.every(tr=>_n(tr.placement)===N?tr.overflows[0]>0:!0)))return{data:{index:er,overflows:xe},reset:{placement:Pr}};let wr=(Ne=xe.filter(Nt=>Nt.overflows[0]<=0).sort((Nt,tr)=>Nt.overflows[1]-tr.overflows[1])[0])==null?void 0:Ne.placement;if(!wr)switch(g){case"bestFit":{var rt;let Nt=(rt=xe.filter(tr=>{if($){let Mt=_n(tr.placement);return Mt===N||Mt==="y"}return!0}).map(tr=>[tr.placement,tr.overflows.filter(Mt=>Mt>0).reduce((Mt,uo)=>Mt+uo,0)]).sort((tr,Mt)=>tr[1]-Mt[1])[0])==null?void 0:rt[0];Nt&&(wr=Nt);break}case"initialPlacement":wr=l;break}if(n!==wr)return{reset:{placement:wr}}}return{}}}};var $5=new Set(["left","top"]);async function A5(o,i){let{placement:t,platform:r,elements:n}=o,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=xo(t),l=ga(t),p=_n(t)==="y",h=$5.has(s)?-1:1,m=a&&p?-1:1,f=fa(i,o),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),p?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var gv=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(i){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=i,p=await A5(i,o);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+p.x,y:a+p.y,data:{...p,placement:s}}}}},bv=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(i){let{x:t,y:r,placement:n,platform:a}=i,{mainAxis:s=!0,crossAxis:l=!1,limiter:p={fn:N=>{let{x:U,y:I}=N;return{x:U,y:I}}},...h}=fa(o,i),m={x:t,y:r},f=await a.detectOverflow(i,h),b=_n(n),g=ku(b),v=m[g],y=m[b],S=(N,U)=>_u(U+f[N==="y"?"top":"left"],U,U-f[N==="y"?"bottom":"right"]);s&&(v=S(g,v)),l&&(y=S(b,y));let T=p.fn({...i,[g]:v,[b]:y});return{...T,data:{x:T.x-t,y:T.y-r,enabled:{[g]:s,[b]:l}}}}}};var vv=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(i){let{placement:t,rects:r,platform:n,elements:a}=i,{apply:s=()=>{},...l}=fa(o,i),p=await n.detectOverflow(i,l),h=xo(t),m=ga(t),f=_n(t)==="y",{width:b,height:g}=r.floating,v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");let S=g-p.top-p.bottom,T=b-p.left-p.right,N=wn(g-p[v],S),U=wn(b-p[y],T),I=i.middlewareData.shift,C=!I,$=N,L=U;I!=null&&I.enabled.x&&(L=T),I!=null&&I.enabled.y&&($=S),C&&!m&&(f?L=b-2*Ji(p.left,p.right):$=g-2*Ji(p.top,p.bottom)),await s({...i,availableWidth:L,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Ad(){return typeof window<"u"}function ya(o){return xv(o)?(o.nodeName||"").toLowerCase():"#document"}function Hr(o){var i;return(o==null||(i=o.ownerDocument)==null?void 0:i.defaultView)||window}function kn(o){var i;return(i=(xv(o)?o.ownerDocument:o.document)||window.document)==null?void 0:i.documentElement}function xv(o){return Ad()?o instanceof Node||o instanceof Hr(o).Node:!1}function Zi(o){return Ad()?o instanceof Element||o instanceof Hr(o).Element:!1}function jn(o){return Ad()?o instanceof HTMLElement||o instanceof Hr(o).HTMLElement:!1}function yv(o){return!Ad()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof Hr(o).ShadowRoot}function Ll(o){let{overflow:i,overflowX:t,overflowY:r,display:n}=en(o);return/auto|scroll|overlay|hidden|clip/.test(i+r+t)&&n!=="inline"&&n!=="contents"}function wv(o){return/^(table|td|th)$/.test(ya(o))}function ql(o){try{if(o.matches(":popover-open"))return!0}catch{}try{return o.matches(":modal")}catch{return!1}}var M5=/transform|translate|scale|rotate|perspective|filter/,L5=/paint|layout|strict|content/,va=o=>!!o&&o!=="none",Su;function ls(o){let i=Zi(o)?en(o):o;return va(i.transform)||va(i.translate)||va(i.scale)||va(i.rotate)||va(i.perspective)||!Md()&&(va(i.backdropFilter)||va(i.filter))||M5.test(i.willChange||"")||L5.test(i.contain||"")}function zv(o){let i=wo(o);for(;jn(i)&&!cs(i);){if(ls(i))return i;if(ql(i))return null;i=wo(i)}return null}function Md(){return Su==null&&(Su=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Su}function cs(o){return/^(html|body|#document)$/.test(ya(o))}function en(o){return Hr(o).getComputedStyle(o)}function Il(o){return Zi(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function wo(o){if(ya(o)==="html")return o;let i=o.assignedSlot||o.parentNode||yv(o)&&o.host||kn(o);return yv(i)?i.host:i}function _v(o){let i=wo(o);return cs(i)?(o.ownerDocument||o).body:jn(i)&&Ll(i)?i:_v(i)}function ss(o,i,t){var r;i===void 0&&(i=[]),t===void 0&&(t=!0);let n=_v(o),a=n===((r=o.ownerDocument)==null?void 0:r.body),s=Hr(n);if(a){let l=Ld(s);return i.concat(s,s.visualViewport||[],Ll(n)?n:[],l&&t?ss(l):[])}else return i.concat(n,ss(n,[],t))}function Ld(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function Sv(o){let i=en(o),t=parseFloat(i.width)||0,r=parseFloat(i.height)||0,n=jn(o),a=n?o.offsetWidth:t,s=n?o.offsetHeight:r,l=Al(t)!==a||Al(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Tu(o){return Zi(o)?o:o.contextElement}function ds(o){let i=Tu(o);if(!jn(i))return zn(1);let t=i.getBoundingClientRect(),{width:r,height:n,$:a}=Sv(i),s=(a?Al(t.width):t.width)/r,l=(a?Al(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var q5=zn(0);function Ev(o){let i=Hr(o);return!Md()||!i.visualViewport?q5:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function I5(o,i,t){return i===void 0&&(i=!1),!!t&&i&&t===Hr(o)}function xa(o,i,t,r){i===void 0&&(i=!1),t===void 0&&(t=!1);let n=o.getBoundingClientRect(),a=Tu(o),s=zn(1);i&&(r?Zi(r)&&(s=ds(r)):s=ds(o));let l=I5(a,t,r)?Ev(a):zn(0),p=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Hr(a),g=Zi(r)?Hr(r):r,v=b,y=Ld(v);for(;y&&g!==v;){let S=ds(y),T=y.getBoundingClientRect(),N=en(y),U=T.left+(y.clientLeft+parseFloat(N.paddingLeft))*S.x,I=T.top+(y.clientTop+parseFloat(N.paddingTop))*S.y;p*=S.x,h*=S.y,m*=S.x,f*=S.y,p+=U,h+=I,v=Hr(y),y=Ld(v)}}return ba({width:m,height:f,x:p,y:h})}function qd(o,i){let t=Il(o).scrollLeft;return i?i.left+t:xa(kn(o)).left+t}function Tv(o,i){let t=o.getBoundingClientRect(),r=t.left+i.scrollLeft-qd(o,t),n=t.top+i.scrollTop;return{x:r,y:n}}function D5(o){let{elements:i,rect:t,offsetParent:r,strategy:n}=o,a=n==="fixed",s=kn(r),l=i?ql(i.floating):!1;if(r===s||l&&a)return t;let p={scrollLeft:0,scrollTop:0},h=zn(1),m=zn(0),f=jn(r);if((f||!a)&&((ya(r)!=="body"||Ll(s))&&(p=Il(r)),f)){let g=xa(r);h=ds(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Tv(s,p):zn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-p.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-p.scrollTop*h.y+m.y+b.y}}function R5(o){return o.getClientRects?Array.from(o.getClientRects()):[]}function N5(o){let i=Il(o),t=o.ownerDocument.body,r=Ji(o.scrollWidth,o.clientWidth,t.scrollWidth,t.clientWidth),n=Ji(o.scrollHeight,o.clientHeight,t.scrollHeight,t.clientHeight),a=-i.scrollLeft+qd(o),s=-i.scrollTop;return en(t).direction==="rtl"&&(a+=Ji(o.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var O5=25;function P5(o,i,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Hr(o),a=kn(o),s=n.visualViewport,l=a.clientWidth,p=a.clientHeight,h=0,m=0;if(s){let b=!Md()||i==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,p=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(qd(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),y=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(a.clientWidth-g.clientWidth-y),T=getComputedStyle(a).scrollbarGutter==="stable both-edges"?S/2:S;T<=O5&&(l-=T)}return{width:l,height:p,x:h,y:m}}function H5(o,i){let t=xa(o,!0,i==="fixed"),r=t.top+o.clientTop,n=t.left+o.clientLeft,a=ds(o),s=o.clientWidth*a.x,l=o.clientHeight*a.y,p=n*a.x,h=r*a.y;return{width:s,height:l,x:p,y:h}}function kv(o,i,t){let r;if(i==="viewport"||i==="layoutViewport")r=P5(o,t,i);else if(i==="document")r=N5(kn(o));else if(Zi(i))r=H5(i,t);else{let n=Ev(o);r={x:i.x-n.x,y:i.y-n.y,width:i.width,height:i.height}}return ba(r)}function F5(o,i){let t=i.get(o);if(t)return t;let r=ss(o,[],!1).filter(l=>Zi(l)&&ya(l)!=="body"),n=null,a=en(o).position==="fixed",s=a?wo(o):o;for(;Zi(s)&&!cs(s);){let l=en(s),p=ls(s),h=n?n.position:a?"fixed":"";!p&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=wo(s)}return i.set(o,r),r}function B5(o){let{element:i,boundary:t,rootBoundary:r,strategy:n}=o,s=[...t==="clippingAncestors"?ql(i)?[]:F5(i,this._c):[].concat(t),r],l=kv(i,s[0],n),p=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=kv(i,s[b],n);p=Ji(g.top,p),h=wn(g.right,h),m=wn(g.bottom,m),f=Ji(g.left,f)}return{width:h-f,height:m-p,x:f,y:p}}function V5(o){let{width:i,height:t}=Sv(o);return{width:i,height:t}}function U5(o,i,t){let r=jn(i),n=kn(i),a=t==="fixed",s=xa(o,!0,a,i),l={scrollLeft:0,scrollTop:0},p=zn(0);if((r||!a)&&((ya(i)!=="body"||Ll(n))&&(l=Il(i)),r)){let b=xa(i,!0,a,i);p.x=b.x+i.clientLeft,p.y=b.y+i.clientTop}!r&&n&&(p.x=qd(n));let h=n&&!r&&!a?Tv(n,l):zn(0),m=s.left+l.scrollLeft-p.x-h.x,f=s.top+l.scrollTop-p.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function Eu(o){return en(o).position==="static"}function Cv(o,i){if(!jn(o)||en(o).position==="fixed")return null;if(i)return i(o);let t=o.offsetParent;return kn(o)===t&&(t=t.ownerDocument.body),t}function $v(o,i){let t=Hr(o);if(ql(o))return t;if(!jn(o)){let n=wo(o);for(;n&&!cs(n);){if(Zi(n)&&!Eu(n))return n;n=wo(n)}return t}let r=Cv(o,i);for(;r&&wv(r)&&Eu(r);)r=Cv(r,i);return r&&cs(r)&&Eu(r)&&!ls(r)?t:r||zv(o)||t}var j5=async function(o){let i=this.getOffsetParent||$v,t=this.getDimensions,r=await t(o.floating);return{reference:U5(o.reference,await i(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G5(o){return en(o).direction==="rtl"}var Dl={convertOffsetParentRelativeRectToViewportRelativeRect:D5,getDocumentElement:kn,getClippingRect:B5,getOffsetParent:$v,getElementRects:j5,getClientRects:R5,getDimensions:V5,getScale:ds,isElement:Zi,isRTL:G5};function Av(o,i){return o.x===i.x&&o.y===i.y&&o.width===i.width&&o.height===i.height}function W5(o,i,t){let r=null,n,a=kn(o);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=o.getBoundingClientRect(),{left:g,top:v,width:y,height:S}=b;if(m||i(),!y||!S)return;let T=Ml(v),N=Ml(a.clientWidth-(g+y)),U=Ml(a.clientHeight-(v+S)),I=Ml(g),$={rootMargin:-T+"px "+-N+"px "+-U+"px "+-I+"px",threshold:Ji(0,wn(1,f))||1},L=!0;function W(oe){let xe=oe[0].intersectionRatio;if(!Av(b,o.getBoundingClientRect()))return l();if(xe!==f){if(!L)return l();xe?l(!1,xe):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(o)}let p=Hr(o),h=()=>l(t);return p.addEventListener("resize",h),l(!0),()=>{p.removeEventListener("resize",h),s()}}function Id(o,i,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,h=Tu(o),m=n||a?[...h?ss(h):[],...i?ss(i):[]]:[];m.forEach(T=>{n&&T.addEventListener("scroll",t),a&&T.addEventListener("resize",t)});let f=h&&l?W5(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(T=>{let[N]=T;N&&N.target===h&&g&&i&&(g.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var U;(U=g)==null||U.observe(i)})),t()}),h&&!p&&g.observe(h),i&&g.observe(i));let v,y=p?xa(o):null;p&&S();function S(){let T=xa(o);y&&!Av(y,T)&&t(),y=T,v=requestAnimationFrame(S)}return t(),()=>{var T;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),(T=g)==null||T.disconnect(),g=null,p&&cancelAnimationFrame(v)}}var Dd=gv;var Rd=bv,Nd=fv,Rl=vv;var Mv=mv;var Od=(o,i,t)=>{let r=new Map,n=t??{},a={...Dl,...n.platform,_c:r};return uv(o,i,{...n,platform:a})};function Lv(o){return K5(o)}function $u(o){return o.assignedSlot?o.assignedSlot:o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}function K5(o){for(let i=o;i;i=$u(i))if(i instanceof Element&&getComputedStyle(i).display==="none")return null;for(let i=$u(o);i;i=$u(i)){if(!(i instanceof Element))continue;let t=getComputedStyle(i);if(t.display!=="contents"&&(t.position!=="static"||ls(t)||i.tagName==="BODY"))return i}return null}var qv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function Y5(o){return o!==null&&typeof o=="object"&&"getBoundingClientRect"in o&&("contextElement"in o?o instanceof Element:!0)}var Re=class extends k{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,p,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,p=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,p=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,p=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,p=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${p}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||Y5(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup?.(),this.cleanup=Id(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Dd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Rl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Nd({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Rd({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Rl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Mv({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>Dl.getOffsetParent(n,Lv):Dl.getOffsetParent;Od(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...Dl,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let p={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.matches(":popover-open")||this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[p]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
139
+ `:null}`}};le.styles=[z(Sd),z(ov)],le.dependencies={"zn-tooltip":gi,"zn-icon":ne},c([F(".button")],le.prototype,"button",2),c([es(".loading-countdown")],le.prototype,"countdownContainer",2),c([d({})],le.prototype,"color",2),c([d({attribute:"hover-color"})],le.prototype,"hoverColor",2),c([d({type:Boolean})],le.prototype,"text",2),c([d({type:Boolean})],le.prototype,"outline",2),c([d({type:Boolean})],le.prototype,"disabled",2),c([d({type:Boolean})],le.prototype,"grow",2),c([d({type:Boolean})],le.prototype,"square",2),c([d({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],le.prototype,"iconButton",2),c([d({type:Boolean})],le.prototype,"plain",2),c([d({type:Boolean,attribute:"no-hover"})],le.prototype,"noHover",2),c([d({type:Boolean,reflect:!0})],le.prototype,"pill",2),c([d({type:Boolean,attribute:"panel-bg"})],le.prototype,"panelBackground",2),c([d({attribute:"dropdown-closer",type:Boolean})],le.prototype,"dropdownCloser",2),c([d({type:Number})],le.prototype,"notification",2),c([d({attribute:"muted-notifications",type:Boolean})],le.prototype,"mutedNotifications",2),c([d()],le.prototype,"verticalAlign",2),c([d()],le.prototype,"content",2),c([d()],le.prototype,"icon",2),c([d()],le.prototype,"gaid",2),c([d({attribute:"icon-position"})],le.prototype,"iconPosition",2),c([d({attribute:"icon-size"})],le.prototype,"iconSize",2),c([d({attribute:"icon-color"})],le.prototype,"iconColor",2),c([d({attribute:"icon-fill"})],le.prototype,"iconFill",2),c([d({attribute:"icon-library"})],le.prototype,"iconLibrary",2),c([d()],le.prototype,"type",2),c([d()],le.prototype,"name",2),c([d()],le.prototype,"value",2),c([d()],le.prototype,"form",2),c([d({attribute:"formaction"})],le.prototype,"formAction",2),c([d({attribute:"formenctype"})],le.prototype,"formEnctype",2),c([d({attribute:"formmethod"})],le.prototype,"formMethod",2),c([d({attribute:"formnovalidate",type:Boolean})],le.prototype,"formNoValidate",2),c([d({attribute:"formtarget"})],le.prototype,"formTarget",2),c([d()],le.prototype,"href",2),c([d()],le.prototype,"target",2),c([d({attribute:"data-target"})],le.prototype,"dataTarget",2),c([d()],le.prototype,"rel",2),c([d()],le.prototype,"tooltip",2),c([d()],le.prototype,"label",2),c([d({type:Boolean,attribute:"auto-click"})],le.prototype,"autoClick",2),c([d({type:Number,attribute:"auto-click-delay"})],le.prototype,"autoClickDelay",2),c([d({type:String,attribute:"loading-text"})],le.prototype,"loadingText",2),c([d({type:String,attribute:"loading-text-position"})],le.prototype,"loadingTextPosition",2),c([d({type:Boolean})],le.prototype,"loading",2),c([K("autoClick")],le.prototype,"handleAutoClickChange",1);var $e=le;le.define("zn-button");var Oe=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){let i=this.u.takeRecords();(i.length||!this.o&&this.i)&&this.handleChanges(i),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var as=class extends k{constructor(){super();this._resizeFrame=null;new Oe(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(t){super.firstUpdated(t),this.resize()}disconnectedCallback(){super.disconnectedCallback(),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null)}resize(){this._resizeFrame===null&&(this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null;let t=0;Array.from(this.children).forEach(n=>{t+=n.getBoundingClientRect().height});let r=t+"px";this.style.minHeight!==r&&(this.style.minHeight=r)}))}createRenderRoot(){return this}};var z5=as;as.define("zn-absolute-container");var wn=Math.min,Ji=Math.max,Al=Math.round,Ml=Math.floor,zn=o=>({x:o,y:o}),_5={left:"right",right:"left",bottom:"top",top:"bottom"};function _u(o,i,t){return Ji(o,wn(i,t))}function ga(o,i){return typeof o=="function"?o(i):o}function xo(o){return o.split("-")[0]}function ba(o){return o.split("-")[1]}function ku(o){return o==="x"?"y":"x"}function Td(o){return o==="y"?"height":"width"}function _n(o){let i=o[0];return i==="t"||i==="b"?"y":"x"}function $d(o){return ku(_n(o))}function lv(o,i,t){t===void 0&&(t=!1);let r=ba(o),n=$d(o),a=Td(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(s=$l(s)),[s,$l(s)]}function cv(o){let i=$l(o);return[Ed(o),i,Ed(i)]}function Ed(o){return o.includes("start")?o.replace("start","end"):o.replace("end","start")}var av=["left","right"],sv=["right","left"],k5=["top","bottom"],C5=["bottom","top"];function S5(o,i,t){switch(o){case"top":case"bottom":return t?i?sv:av:i?av:sv;case"left":case"right":return i?k5:C5;default:return[]}}function dv(o,i,t,r){let n=ba(o),a=S5(xo(o),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),i&&(a=a.concat(a.map(Ed)))),a}function $l(o){let i=xo(o);return _5[i]+o.slice(i.length)}function E5(o){var i,t,r,n;return{top:(i=o.top)!=null?i:0,right:(t=o.right)!=null?t:0,bottom:(r=o.bottom)!=null?r:0,left:(n=o.left)!=null?n:0}}function Cu(o){return typeof o!="number"?E5(o):{top:o,right:o,bottom:o,left:o}}function va(o){let{x:i,y:t,width:r,height:n}=o;return{width:r,height:n,top:t,left:i,right:i+r,bottom:t+n,x:i,y:t}}function pv(o,i,t){let{reference:r,floating:n}=o,a=_n(i),s=$d(i),l=Td(s),p=xo(i),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(p){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=ba(i);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function hv(o,i){var t;i===void 0&&(i={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:p}=o,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=ga(i,o),v=Cu(g),S=l[b?f==="floating"?"reference":"floating":f],T=va(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(S)))==null||t?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:p})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,U=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(U))&&await(a.getScale==null?void 0:a.getScale(U))||{x:1,y:1},C=va(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:U,strategy:p}):N);return{top:(T.top-C.top+v.top)/I.y,bottom:(C.bottom-T.bottom+v.bottom)/I.y,left:(T.left-C.left+v.left)/I.x,right:(C.right-T.right+v.right)/I.x}}var T5=50,uv=async(o,i,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:hv},p=await(s.isRTL==null?void 0:s.isRTL(i)),h=await s.getElementRects({reference:o,floating:i,strategy:n}),{x:m,y:f}=pv(h,r,p),b=r,g=0,v={};for(let y=0;y<a.length;y++){let S=a[y];if(!S)continue;let{name:T,fn:N}=S,{x:U,y:I,data:C,reset:$}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:o,floating:i}});m=U??m,f=I??f,v[T]={...v[T],...C},$&&g<T5&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:o,floating:i,strategy:n}):$.rects),{x:m,y:f}=pv(h,b,p)),y=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},mv=o=>({name:"arrow",options:o,async fn(i){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:p}=i,{element:h,padding:m=0}=ga(o,i)||{};if(h==null)return{};let f=Cu(m),b={x:t,y:r},g=$d(n),v=Td(g),y=await s.getDimensions(h),S=g==="y",T=S?"top":"left",N=S?"bottom":"right",U=S?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],C=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=$?$[U]:0;(!L||!await(s.isElement==null?void 0:s.isElement($)))&&(L=l.floating[U]||a.floating[v]);let W=I/2-C/2,oe=L/2-y[v]/2-1,xe=wn(f[T],oe),De=wn(f[N],oe),Ne=L-y[v]-De,rt=L/2-y[v]/2+W,er=_u(xe,rt,Ne),Pr=!p.arrow&&ba(n)!=null&&rt!==er&&a.reference[v]/2-(rt<xe?xe:De)-y[v]/2<0,wr=Pr?rt<xe?rt-xe:rt-Ne:0;return{[g]:b[g]+wr,data:{[g]:er,centerOffset:rt-er-wr,...Pr&&{alignmentOffset:wr}},reset:Pr}}});var fv=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(i){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:p,elements:h}=i,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...S}=ga(o,i);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let T=xo(n),N=_n(l),U=xo(l)===l,I=await(p.isRTL==null?void 0:p.isRTL(h.floating)),C=b||(U||!y?[$l(l)]:cv(l)),$=v!=="none";!b&&$&&C.push(...dv(l,y,v,I));let L=[l,...C],W=await p.detectOverflow(i,S),oe=[],xe=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&oe.push(W[T]),f){let er=lv(n,s,I);oe.push(W[er[0]],W[er[1]])}if(xe=[...xe,{placement:n,overflows:oe}],!oe.every(er=>er<=0)){var De,Ne;let er=(((De=a.flip)==null?void 0:De.index)||0)+1,Pr=L[er];if(Pr&&(!(f==="alignment"?N!==_n(Pr):!1)||xe.every(tr=>_n(tr.placement)===N?tr.overflows[0]>0:!0)))return{data:{index:er,overflows:xe},reset:{placement:Pr}};let wr=(Ne=xe.filter(Nt=>Nt.overflows[0]<=0).sort((Nt,tr)=>Nt.overflows[1]-tr.overflows[1])[0])==null?void 0:Ne.placement;if(!wr)switch(g){case"bestFit":{var rt;let Nt=(rt=xe.filter(tr=>{if($){let Mt=_n(tr.placement);return Mt===N||Mt==="y"}return!0}).map(tr=>[tr.placement,tr.overflows.filter(Mt=>Mt>0).reduce((Mt,uo)=>Mt+uo,0)]).sort((tr,Mt)=>tr[1]-Mt[1])[0])==null?void 0:rt[0];Nt&&(wr=Nt);break}case"initialPlacement":wr=l;break}if(n!==wr)return{reset:{placement:wr}}}return{}}}};var $5=new Set(["left","top"]);async function A5(o,i){let{placement:t,platform:r,elements:n}=o,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=xo(t),l=ba(t),p=_n(t)==="y",h=$5.has(s)?-1:1,m=a&&p?-1:1,f=ga(i,o),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),p?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var gv=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(i){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=i,p=await A5(i,o);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+p.x,y:a+p.y,data:{...p,placement:s}}}}},bv=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(i){let{x:t,y:r,placement:n,platform:a}=i,{mainAxis:s=!0,crossAxis:l=!1,limiter:p={fn:N=>{let{x:U,y:I}=N;return{x:U,y:I}}},...h}=ga(o,i),m={x:t,y:r},f=await a.detectOverflow(i,h),b=_n(n),g=ku(b),v=m[g],y=m[b],S=(N,U)=>_u(U+f[N==="y"?"top":"left"],U,U-f[N==="y"?"bottom":"right"]);s&&(v=S(g,v)),l&&(y=S(b,y));let T=p.fn({...i,[g]:v,[b]:y});return{...T,data:{x:T.x-t,y:T.y-r,enabled:{[g]:s,[b]:l}}}}}};var vv=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(i){let{placement:t,rects:r,platform:n,elements:a}=i,{apply:s=()=>{},...l}=ga(o,i),p=await n.detectOverflow(i,l),h=xo(t),m=ba(t),f=_n(t)==="y",{width:b,height:g}=r.floating,v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");let S=g-p.top-p.bottom,T=b-p.left-p.right,N=wn(g-p[v],S),U=wn(b-p[y],T),I=i.middlewareData.shift,C=!I,$=N,L=U;I!=null&&I.enabled.x&&(L=T),I!=null&&I.enabled.y&&($=S),C&&!m&&(f?L=b-2*Ji(p.left,p.right):$=g-2*Ji(p.top,p.bottom)),await s({...i,availableWidth:L,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Ad(){return typeof window<"u"}function xa(o){return xv(o)?(o.nodeName||"").toLowerCase():"#document"}function Hr(o){var i;return(o==null||(i=o.ownerDocument)==null?void 0:i.defaultView)||window}function kn(o){var i;return(i=(xv(o)?o.ownerDocument:o.document)||window.document)==null?void 0:i.documentElement}function xv(o){return Ad()?o instanceof Node||o instanceof Hr(o).Node:!1}function Zi(o){return Ad()?o instanceof Element||o instanceof Hr(o).Element:!1}function jn(o){return Ad()?o instanceof HTMLElement||o instanceof Hr(o).HTMLElement:!1}function yv(o){return!Ad()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof Hr(o).ShadowRoot}function Ll(o){let{overflow:i,overflowX:t,overflowY:r,display:n}=en(o);return/auto|scroll|overlay|hidden|clip/.test(i+r+t)&&n!=="inline"&&n!=="contents"}function wv(o){return/^(table|td|th)$/.test(xa(o))}function ql(o){try{if(o.matches(":popover-open"))return!0}catch{}try{return o.matches(":modal")}catch{return!1}}var M5=/transform|translate|scale|rotate|perspective|filter/,L5=/paint|layout|strict|content/,ya=o=>!!o&&o!=="none",Su;function ls(o){let i=Zi(o)?en(o):o;return ya(i.transform)||ya(i.translate)||ya(i.scale)||ya(i.rotate)||ya(i.perspective)||!Md()&&(ya(i.backdropFilter)||ya(i.filter))||M5.test(i.willChange||"")||L5.test(i.contain||"")}function zv(o){let i=wo(o);for(;jn(i)&&!cs(i);){if(ls(i))return i;if(ql(i))return null;i=wo(i)}return null}function Md(){return Su==null&&(Su=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Su}function cs(o){return/^(html|body|#document)$/.test(xa(o))}function en(o){return Hr(o).getComputedStyle(o)}function Il(o){return Zi(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function wo(o){if(xa(o)==="html")return o;let i=o.assignedSlot||o.parentNode||yv(o)&&o.host||kn(o);return yv(i)?i.host:i}function _v(o){let i=wo(o);return cs(i)?(o.ownerDocument||o).body:jn(i)&&Ll(i)?i:_v(i)}function ss(o,i,t){var r;i===void 0&&(i=[]),t===void 0&&(t=!0);let n=_v(o),a=n===((r=o.ownerDocument)==null?void 0:r.body),s=Hr(n);if(a){let l=Ld(s);return i.concat(s,s.visualViewport||[],Ll(n)?n:[],l&&t?ss(l):[])}else return i.concat(n,ss(n,[],t))}function Ld(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function Sv(o){let i=en(o),t=parseFloat(i.width)||0,r=parseFloat(i.height)||0,n=jn(o),a=n?o.offsetWidth:t,s=n?o.offsetHeight:r,l=Al(t)!==a||Al(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Tu(o){return Zi(o)?o:o.contextElement}function ds(o){let i=Tu(o);if(!jn(i))return zn(1);let t=i.getBoundingClientRect(),{width:r,height:n,$:a}=Sv(i),s=(a?Al(t.width):t.width)/r,l=(a?Al(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var q5=zn(0);function Ev(o){let i=Hr(o);return!Md()||!i.visualViewport?q5:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function I5(o,i,t){return i===void 0&&(i=!1),!!t&&i&&t===Hr(o)}function wa(o,i,t,r){i===void 0&&(i=!1),t===void 0&&(t=!1);let n=o.getBoundingClientRect(),a=Tu(o),s=zn(1);i&&(r?Zi(r)&&(s=ds(r)):s=ds(o));let l=I5(a,t,r)?Ev(a):zn(0),p=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Hr(a),g=Zi(r)?Hr(r):r,v=b,y=Ld(v);for(;y&&g!==v;){let S=ds(y),T=y.getBoundingClientRect(),N=en(y),U=T.left+(y.clientLeft+parseFloat(N.paddingLeft))*S.x,I=T.top+(y.clientTop+parseFloat(N.paddingTop))*S.y;p*=S.x,h*=S.y,m*=S.x,f*=S.y,p+=U,h+=I,v=Hr(y),y=Ld(v)}}return va({width:m,height:f,x:p,y:h})}function qd(o,i){let t=Il(o).scrollLeft;return i?i.left+t:wa(kn(o)).left+t}function Tv(o,i){let t=o.getBoundingClientRect(),r=t.left+i.scrollLeft-qd(o,t),n=t.top+i.scrollTop;return{x:r,y:n}}function D5(o){let{elements:i,rect:t,offsetParent:r,strategy:n}=o,a=n==="fixed",s=kn(r),l=i?ql(i.floating):!1;if(r===s||l&&a)return t;let p={scrollLeft:0,scrollTop:0},h=zn(1),m=zn(0),f=jn(r);if((f||!a)&&((xa(r)!=="body"||Ll(s))&&(p=Il(r)),f)){let g=wa(r);h=ds(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Tv(s,p):zn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-p.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-p.scrollTop*h.y+m.y+b.y}}function R5(o){return o.getClientRects?Array.from(o.getClientRects()):[]}function N5(o){let i=Il(o),t=o.ownerDocument.body,r=Ji(o.scrollWidth,o.clientWidth,t.scrollWidth,t.clientWidth),n=Ji(o.scrollHeight,o.clientHeight,t.scrollHeight,t.clientHeight),a=-i.scrollLeft+qd(o),s=-i.scrollTop;return en(t).direction==="rtl"&&(a+=Ji(o.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var O5=25;function P5(o,i,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Hr(o),a=kn(o),s=n.visualViewport,l=a.clientWidth,p=a.clientHeight,h=0,m=0;if(s){let b=!Md()||i==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,p=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(qd(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),y=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(a.clientWidth-g.clientWidth-y),T=getComputedStyle(a).scrollbarGutter==="stable both-edges"?S/2:S;T<=O5&&(l-=T)}return{width:l,height:p,x:h,y:m}}function H5(o,i){let t=wa(o,!0,i==="fixed"),r=t.top+o.clientTop,n=t.left+o.clientLeft,a=ds(o),s=o.clientWidth*a.x,l=o.clientHeight*a.y,p=n*a.x,h=r*a.y;return{width:s,height:l,x:p,y:h}}function kv(o,i,t){let r;if(i==="viewport"||i==="layoutViewport")r=P5(o,t,i);else if(i==="document")r=N5(kn(o));else if(Zi(i))r=H5(i,t);else{let n=Ev(o);r={x:i.x-n.x,y:i.y-n.y,width:i.width,height:i.height}}return va(r)}function F5(o,i){let t=i.get(o);if(t)return t;let r=ss(o,[],!1).filter(l=>Zi(l)&&xa(l)!=="body"),n=null,a=en(o).position==="fixed",s=a?wo(o):o;for(;Zi(s)&&!cs(s);){let l=en(s),p=ls(s),h=n?n.position:a?"fixed":"";!p&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=wo(s)}return i.set(o,r),r}function B5(o){let{element:i,boundary:t,rootBoundary:r,strategy:n}=o,s=[...t==="clippingAncestors"?ql(i)?[]:F5(i,this._c):[].concat(t),r],l=kv(i,s[0],n),p=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=kv(i,s[b],n);p=Ji(g.top,p),h=wn(g.right,h),m=wn(g.bottom,m),f=Ji(g.left,f)}return{width:h-f,height:m-p,x:f,y:p}}function V5(o){let{width:i,height:t}=Sv(o);return{width:i,height:t}}function U5(o,i,t){let r=jn(i),n=kn(i),a=t==="fixed",s=wa(o,!0,a,i),l={scrollLeft:0,scrollTop:0},p=zn(0);if((r||!a)&&((xa(i)!=="body"||Ll(n))&&(l=Il(i)),r)){let b=wa(i,!0,a,i);p.x=b.x+i.clientLeft,p.y=b.y+i.clientTop}!r&&n&&(p.x=qd(n));let h=n&&!r&&!a?Tv(n,l):zn(0),m=s.left+l.scrollLeft-p.x-h.x,f=s.top+l.scrollTop-p.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function Eu(o){return en(o).position==="static"}function Cv(o,i){if(!jn(o)||en(o).position==="fixed")return null;if(i)return i(o);let t=o.offsetParent;return kn(o)===t&&(t=t.ownerDocument.body),t}function $v(o,i){let t=Hr(o);if(ql(o))return t;if(!jn(o)){let n=wo(o);for(;n&&!cs(n);){if(Zi(n)&&!Eu(n))return n;n=wo(n)}return t}let r=Cv(o,i);for(;r&&wv(r)&&Eu(r);)r=Cv(r,i);return r&&cs(r)&&Eu(r)&&!ls(r)?t:r||zv(o)||t}var j5=async function(o){let i=this.getOffsetParent||$v,t=this.getDimensions,r=await t(o.floating);return{reference:U5(o.reference,await i(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G5(o){return en(o).direction==="rtl"}var Dl={convertOffsetParentRelativeRectToViewportRelativeRect:D5,getDocumentElement:kn,getClippingRect:B5,getOffsetParent:$v,getElementRects:j5,getClientRects:R5,getDimensions:V5,getScale:ds,isElement:Zi,isRTL:G5};function Av(o,i){return o.x===i.x&&o.y===i.y&&o.width===i.width&&o.height===i.height}function W5(o,i,t){let r=null,n,a=kn(o);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=o.getBoundingClientRect(),{left:g,top:v,width:y,height:S}=b;if(m||i(),!y||!S)return;let T=Ml(v),N=Ml(a.clientWidth-(g+y)),U=Ml(a.clientHeight-(v+S)),I=Ml(g),$={rootMargin:-T+"px "+-N+"px "+-U+"px "+-I+"px",threshold:Ji(0,wn(1,f))||1},L=!0;function W(oe){let xe=oe[0].intersectionRatio;if(!Av(b,o.getBoundingClientRect()))return l();if(xe!==f){if(!L)return l();xe?l(!1,xe):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(o)}let p=Hr(o),h=()=>l(t);return p.addEventListener("resize",h),l(!0),()=>{p.removeEventListener("resize",h),s()}}function Id(o,i,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,h=Tu(o),m=n||a?[...h?ss(h):[],...i?ss(i):[]]:[];m.forEach(T=>{n&&T.addEventListener("scroll",t),a&&T.addEventListener("resize",t)});let f=h&&l?W5(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(T=>{let[N]=T;N&&N.target===h&&g&&i&&(g.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var U;(U=g)==null||U.observe(i)})),t()}),h&&!p&&g.observe(h),i&&g.observe(i));let v,y=p?wa(o):null;p&&S();function S(){let T=wa(o);y&&!Av(y,T)&&t(),y=T,v=requestAnimationFrame(S)}return t(),()=>{var T;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),(T=g)==null||T.disconnect(),g=null,p&&cancelAnimationFrame(v)}}var Dd=gv;var Rd=bv,Nd=fv,Rl=vv;var Mv=mv;var Od=(o,i,t)=>{let r=new Map,n=t??{},a={...Dl,...n.platform,_c:r};return uv(o,i,{...n,platform:a})};function Lv(o){return K5(o)}function $u(o){return o.assignedSlot?o.assignedSlot:o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}function K5(o){for(let i=o;i;i=$u(i))if(i instanceof Element&&getComputedStyle(i).display==="none")return null;for(let i=$u(o);i;i=$u(i)){if(!(i instanceof Element))continue;let t=getComputedStyle(i);if(t.display!=="contents"&&(t.position!=="static"||ls(t)||i.tagName==="BODY"))return i}return null}var qv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function Y5(o){return o!==null&&typeof o=="object"&&"getBoundingClientRect"in o&&("contextElement"in o?o instanceof Element:!0)}var Re=class extends k{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,p,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,p=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,p=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,p=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,p=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${p}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||Y5(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup?.(),this.cleanup=Id(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Dd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Rl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Nd({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Rd({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Rl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Mv({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>Dl.getOffsetParent(n,Lv):Dl.getOffsetParent;Od(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...Dl,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let p={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.matches(":popover-open")||this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[p]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
140
140
  <slot class="anchor" name="anchor" @slotchange="${this.handleAnchorChange}"></slot>
141
141
 
142
142
  <span
@@ -179,7 +179,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
179
179
  <slot @slotchange="${this.requestUpdate}"></slot>
180
180
  </div>
181
181
  </div>
182
- </div>`}};Pt.styles=z(Iv),c([d({reflect:!0})],Pt.prototype,"caption",2),c([d({reflect:!0})],Pt.prototype,"description",2),c([d({reflect:!0})],Pt.prototype,"label",2),c([d({type:Boolean,attribute:"show-number",reflect:!0})],Pt.prototype,"showNumber",2),c([d({type:String,attribute:"count-element"})],Pt.prototype,"countElement",2),c([d({type:Boolean,reflect:!0})],Pt.prototype,"expanded",2),c([d({attribute:"default"})],Pt.prototype,"defaultState",2),c([d({attribute:"local-storage",type:Boolean,reflect:!0})],Pt.prototype,"localStorage",2),c([d({attribute:"store-key",reflect:!0})],Pt.prototype,"storeKey",2),c([d({attribute:"store-ttl",type:Number,reflect:!0})],Pt.prototype,"storeTtl",2),c([d({attribute:"flush",type:Boolean,reflect:!0})],Pt.prototype,"flush",2),c([R()],Pt.prototype,"numberOfItems",2),c([R()],Pt.prototype,"animating",2);var wa=Pt;Pt.define("zn-collapsible");var Dv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host,.wrapper{display:flex;justify-content:flex-start;align-items:center;border-radius:10px}:host{background-color:rgba(var(--zn-panel),0.8)}:host([appearance=solid]){background-color:rgb(var(--zn-panel))}.alert-icon{padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small)}p{margin:0}.wrapper{position:relative;border:1px solid rgb(var(--zn-border-color)) !important;width:100%;height:100%}:host([center]) .content{text-align:center}:host([caption]) zn-icon{align-self:flex-start;margin-top:6px}.content{display:flex;flex-direction:column;flex-grow:1;align-self:start;text-align:left;padding:8px}.content>h6{font-size:inherit;font-weight:600;margin:0;padding:0}.actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--zn-spacing-small)}:host .wrapper h6{color:rgb(var(--zn-text))}:host .wrapper{border-color:rgb(var(--zn-border-color)) !important;background:rgba(var(--zn-panel),0.05)}:host([level=primary]) .wrapper h6{color:rgb(var(--zn-primary))}:host([level=primary]) .wrapper{border-color:rgb(var(--zn-primary)) !important;background:rgba(var(--zn-primary),0.05)}:host([level=primary]) .wrapper zn-icon{--icon-color:rgb(var(--zn-primary))}:host([level=error]) .wrapper h6{color:rgb(var(--zn-color-error))}:host([level=error]) .wrapper{border-color:rgb(var(--zn-color-error)) !important;background:rgba(var(--zn-color-error),0.05)}:host([level=error]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-error))}:host([level=info]) .wrapper h6{color:rgb(var(--zn-color-info))}:host([level=info]) .wrapper{border-color:rgb(var(--zn-color-info)) !important;background:rgba(var(--zn-color-info),0.05)}:host([level=info]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-info))}:host([level=warning]) .wrapper h6{color:rgb(var(--zn-color-warning))}:host([level=warning]) .wrapper{border-color:rgb(var(--zn-color-warning)) !important;background:rgba(var(--zn-color-warning),0.05)}:host([level=warning]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-warning))}:host([level=success]) .wrapper h6{color:rgb(var(--zn-color-success))}:host([level=success]) .wrapper{border-color:rgb(var(--zn-color-success)) !important;background:rgba(var(--zn-color-success),0.05)}:host([level=success]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-success))}:host([level=note]) .wrapper h6{color:var(--zn-color-gray-800)}:host([level=note]) .wrapper{border-color:var(--zn-color-gray-500) !important;background:var(--zn-color-gray-100)}:host([level=note]) .wrapper zn-icon{--icon-color:var(--zn-color-gray-800)}.alert--small{padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);font-size:90%}.alert--medium{padding:var(--zn-spacing-x-small) var(--zn-spacing-small);font-size:100%}.alert--large{padding:var(--zn-spacing-small) var(--zn-spacing-medium);font-size:110%}:host([level=cosmic]){border:1px solid transparent}:host([level=cosmic]):before{content:"";z-index:-1;position:absolute;top:-2px;left:-2px;height:calc(100% + 4px);width:calc(100% + 4px);filter:blur(var(--zn-blur,1px));opacity:0.9;border-radius:var(--zn-border-radius);background-image:conic-gradient(from var(--rotate) at 50% 50%,#71d9ff 0%,#a100ff 22%,#71d9ff 44%,#ff00ce 74%,#71d9ff 94%);animation:rotate-gradient 6s linear infinite}:host([level=cosmic]){position:relative;z-index:0}:host([level=cosmic]):before{border-radius:11px}:host([level=cosmic]) .wrapper{border:none !important;background:rgba(var(--zn-panel),0.99)}`;var Qr=class extends k{constructor(){super(...arguments);this.icon="";this.caption="";this.collapse=!1;this.appearance="transparent";this.level="info";this.center=!1;this.size="medium"}render(){let t;this.icon&&(this.collapse?t=this.icon?u`
182
+ </div>`}};Pt.styles=z(Iv),c([d({reflect:!0})],Pt.prototype,"caption",2),c([d({reflect:!0})],Pt.prototype,"description",2),c([d({reflect:!0})],Pt.prototype,"label",2),c([d({type:Boolean,attribute:"show-number",reflect:!0})],Pt.prototype,"showNumber",2),c([d({type:String,attribute:"count-element"})],Pt.prototype,"countElement",2),c([d({type:Boolean,reflect:!0})],Pt.prototype,"expanded",2),c([d({attribute:"default"})],Pt.prototype,"defaultState",2),c([d({attribute:"local-storage",type:Boolean,reflect:!0})],Pt.prototype,"localStorage",2),c([d({attribute:"store-key",reflect:!0})],Pt.prototype,"storeKey",2),c([d({attribute:"store-ttl",type:Number,reflect:!0})],Pt.prototype,"storeTtl",2),c([d({attribute:"flush",type:Boolean,reflect:!0})],Pt.prototype,"flush",2),c([R()],Pt.prototype,"numberOfItems",2),c([R()],Pt.prototype,"animating",2);var za=Pt;Pt.define("zn-collapsible");var Dv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host,.wrapper{display:flex;justify-content:flex-start;align-items:center;border-radius:10px}:host{background-color:rgba(var(--zn-panel),0.8)}:host([appearance=solid]){background-color:rgb(var(--zn-panel))}.alert-icon{padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small)}p{margin:0}.wrapper{position:relative;border:1px solid rgb(var(--zn-border-color)) !important;width:100%;height:100%}:host([center]) .content{text-align:center}:host([caption]) zn-icon{align-self:flex-start;margin-top:6px}.content{display:flex;flex-direction:column;flex-grow:1;align-self:start;text-align:left;padding:8px}.content>h6{font-size:inherit;font-weight:600;margin:0;padding:0}.actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--zn-spacing-small)}:host .wrapper h6{color:rgb(var(--zn-text))}:host .wrapper{border-color:rgb(var(--zn-border-color)) !important;background:rgba(var(--zn-panel),0.05)}:host([level=primary]) .wrapper h6{color:rgb(var(--zn-primary))}:host([level=primary]) .wrapper{border-color:rgb(var(--zn-primary)) !important;background:rgba(var(--zn-primary),0.05)}:host([level=primary]) .wrapper zn-icon{--icon-color:rgb(var(--zn-primary))}:host([level=error]) .wrapper h6{color:rgb(var(--zn-color-error))}:host([level=error]) .wrapper{border-color:rgb(var(--zn-color-error)) !important;background:rgba(var(--zn-color-error),0.05)}:host([level=error]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-error))}:host([level=info]) .wrapper h6{color:rgb(var(--zn-color-info))}:host([level=info]) .wrapper{border-color:rgb(var(--zn-color-info)) !important;background:rgba(var(--zn-color-info),0.05)}:host([level=info]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-info))}:host([level=warning]) .wrapper h6{color:rgb(var(--zn-color-warning))}:host([level=warning]) .wrapper{border-color:rgb(var(--zn-color-warning)) !important;background:rgba(var(--zn-color-warning),0.05)}:host([level=warning]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-warning))}:host([level=success]) .wrapper h6{color:rgb(var(--zn-color-success))}:host([level=success]) .wrapper{border-color:rgb(var(--zn-color-success)) !important;background:rgba(var(--zn-color-success),0.05)}:host([level=success]) .wrapper zn-icon{--icon-color:rgb(var(--zn-color-success))}:host([level=note]) .wrapper h6{color:var(--zn-color-gray-800)}:host([level=note]) .wrapper{border-color:var(--zn-color-gray-500) !important;background:var(--zn-color-gray-100)}:host([level=note]) .wrapper zn-icon{--icon-color:var(--zn-color-gray-800)}.alert--small{padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);font-size:90%}.alert--medium{padding:var(--zn-spacing-x-small) var(--zn-spacing-small);font-size:100%}.alert--large{padding:var(--zn-spacing-small) var(--zn-spacing-medium);font-size:110%}:host([level=cosmic]){border:1px solid transparent}:host([level=cosmic]):before{content:"";z-index:-1;position:absolute;top:-2px;left:-2px;height:calc(100% + 4px);width:calc(100% + 4px);filter:blur(var(--zn-blur,1px));opacity:0.9;border-radius:var(--zn-border-radius);background-image:conic-gradient(from var(--rotate) at 50% 50%,#71d9ff 0%,#a100ff 22%,#71d9ff 44%,#ff00ce 74%,#71d9ff 94%);animation:rotate-gradient 6s linear infinite}:host([level=cosmic]){position:relative;z-index:0}:host([level=cosmic]):before{border-radius:11px}:host([level=cosmic]) .wrapper{border:none !important;background:rgba(var(--zn-panel),0.99)}`;var Qr=class extends k{constructor(){super(...arguments);this.icon="";this.caption="";this.collapse=!1;this.appearance="transparent";this.level="info";this.center=!1;this.size="medium"}render(){let t;this.icon&&(this.collapse?t=this.icon?u`
183
183
  <zn-icon class="alert-icon" src="${this.icon}" id="xy2" @click="${this.hideAlert}"
184
184
  style="cursor: pointer"></zn-icon>`:"":t=this.icon?u`
185
185
  <zn-icon class="alert-icon" src="${this.icon}" id="xy2"></zn-icon>`:"");let r=this.caption?u`<h6>${this.caption}</h6>`:"";return u`
@@ -293,7 +293,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
293
293
  </slot>
294
294
  </button>
295
295
  </zn-tooltip>
296
- `}showStatus(t){let r=t==="success"?this.successIcon:this.errorIcon;this.tooltip.content=t==="success"?"Copied!":"Error!",this.copyIcon.hidden=!0,this.status=t,r.hidden=!1,setTimeout(()=>{this.status="rest",this.copyIcon.hidden=!1,r.hidden=!0,this.tooltip.content=this.copyLabel||"Copy",this.isCopying=!1},1500)}async handleCopy(){if(this.isCopying)return;this.isCopying=!0;let t=this.value||this.textContent;if(this.from){let r=this.getRootNode(),n=this.from.includes("."),a=this.from.includes("[")&&this.from.includes("]"),s=this.from,l="";n?[s,l]=this.from.trim().split("."):a&&([s,l]=this.from.trim().replace(/]$/,"").split("["));let p="getElementById"in r?r.getElementById(s):null;p?a?t=p.getAttribute(l)||"":n?t=p[l]||"":t=p.textContent||"":(console.error("No target element found with id:",s),this.showStatus("error"),this.emit("zn-error"))}if(!t){console.error('No value to copy. Please provide a value or a valid "from" attribute.'),this.showStatus("error"),this.emit("zn-error");return}try{await navigator.clipboard.writeText(t),this.showStatus("success"),this.emit("zn-copy",{detail:{value:t}})}catch(r){console.error("Failed to copy text: ",r),this.showStatus("error"),this.emit("zn-error")}}};nr.styles=z(Vv),c([F('slot[name="copy-icon"')],nr.prototype,"copyIcon",2),c([F('slot[name="success-icon"')],nr.prototype,"successIcon",2),c([F('slot[name="error-icon"')],nr.prototype,"errorIcon",2),c([F("zn-tooltip")],nr.prototype,"tooltip",2),c([R()],nr.prototype,"isCopying",2),c([R()],nr.prototype,"status",2),c([d()],nr.prototype,"value",2),c([d({attribute:"copy-label"})],nr.prototype,"copyLabel",2),c([d()],nr.prototype,"src",2),c([d({type:Number,reflect:!0})],nr.prototype,"size",2),c([d()],nr.prototype,"from",2);var Mu=nr;nr.define("zn-copy-button");var Uv=()=>new qu,qu=class{},Lu=new WeakMap,Pl=yt(class extends vo{render(o){return B}update(o,[i]){let t=i!==this.G;return t&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=i,this.ht=o.options?.host,this.rt(this.ct=o.element)),B}rt(o){if(this.G!==void 0)if(this.isConnected||(o=void 0),typeof this.G=="function"){let i=this.ht??globalThis,t=Lu.get(i);t===void 0&&(t=new WeakMap,Lu.set(i,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Lu.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ht=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.ResizeObserver?(this.u=new ResizeObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}unobserve(i){this.t.delete(i),this.u.unobserve(i)}disconnect(){this.u.disconnect()}target(i){return i4(this,i)}},i4=yt(class extends vo{constructor(){super(...arguments),this.observing=!1}render(o,i){}update(o,[i,t]){this.controller=i,this.part=o,this.observe=t,t===!1?(i.unobserve(o.element),this.observing=!1):this.observing===!1&&(i.observe(o.element),this.observing=!0)}disconnected(){this.controller?.unobserve(this.part.element),this.observing=!1}reconnected(){this.observe!==!1&&this.observing===!1&&(this.controller?.observe(this.part.element),this.observing=!0)}});var jv=Symbol(),Hl=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((i,t)=>{this.o=i,this.h=t})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(i,t,r){this.p=0,this.i=0,(this._=i).addController(this);let n=typeof t=="object"?t:{task:t,args:r};this.v=n.task,this.j=n.args,this.m=n.argsEqual??Gv,this.k=n.onComplete,this.A=n.onError,this.autoRun=n.autoRun??!0,"initialValue"in n&&(this.u=n.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let i=this.j();if(!Array.isArray(i))throw Error("The args function must return an array");return i}async S(){let i=this.T(),t=this.O;this.O=i,i===t||i===void 0||t!==void 0&&this.m(t,i)||await this.run(i)}async run(i){let t,r;i??(i=this.T()),this.O=i,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let n=++this.p;this.q=new AbortController;let a=!1;try{t=await this.v(i,{signal:this.q.signal})}catch(s){a=!0,r=s}if(this.p===n){if(t===jv)this.i=0;else{if(a===!1){try{this.k?.(t)}catch{}this.i=2,this.o?.(t)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=t,this.l=r}this._.requestUpdate()}}abort(i){this.i===1&&this.q?.abort(i)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(i){switch(this.i){case 0:return i.initial?.();case 1:return i.pending?.();case 2:return i.complete?.(this.value);case 3:return i.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},Gv=(o,i)=>o===i||o.length===i.length&&o.every(((t,r)=>!Za(t,i[r])));function Wv(o,i){return{top:Math.round(o.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(o.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Iu=new Set;function n4(){let o=document.documentElement.clientWidth;return Math.abs(window.innerWidth-o)}function Kv(o){if(Iu.add(o),!document.body.classList.contains("zn-scroll-lock")){let i=n4();document.body.classList.add("zn-scroll-lock"),document.body.style.setProperty("--zn-scroll-lock-size",`${i}px`)}}function za(o){Iu.delete(o),Iu.size===0&&(document.body.classList.remove("zn-scroll-lock"),document.body.style.removeProperty("--zn-scroll-lock-size"))}function Yv(o,i,t="vertical",r="smooth"){let n=Wv(o,i),a=n.top+i.scrollTop,s=n.left+i.scrollLeft,l=i.scrollLeft,p=i.scrollLeft+i.offsetWidth,h=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(s<l?i.scrollTo({left:s,behavior:r}):s+o.clientWidth>p&&i.scrollTo({left:s-i.offsetWidth+o.clientWidth,behavior:r})),(t==="vertical"||t==="both")&&(a<h?i.scrollTo({top:a,behavior:r}):a+o.clientHeight>m&&i.scrollTo({top:a-i.offsetHeight+o.clientHeight,behavior:r}))}function Qv(o){let i=[],t=o;for(;t;)t instanceof Element&&t.scrollTop>0&&i.push(t),t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode;return i}function Xv(o,i="auto"){for(let t of o)t.scrollTo({top:0,behavior:i})}var Jv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:30rem;--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-x-small) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.dialog-container{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;border-radius:var(--zn-border-radius);background-color:var(--zn-panel-background-color);margin:2px;overflow:hidden}.dialog__header+.dialog__body{padding-top:0}.dialog{flex-direction:column;z-index:2;width:calc(var(--width) + 1px);overflow:hidden;max-width:calc(100% - var(--zn-spacing-2x-large));max-height:calc(100% - 20vh);background-color:var(--zn-panel-background-color);border-radius:var(--zn-border-radius);box-shadow:var(--zn-shadow-x-large);padding:0;margin:10vh auto}.dialog[open]{display:flex}.dialog__header{flex:0 0 auto;display:flex}.dialog__title{display:flex;flex:1 1 auto;align-items:center;font:inherit;margin:0;width:100%;overflow:hidden}.dialog__header-actions{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:end;align-items:center;gap:var(--zn-spacing-x-small);padding:var(--header-spacing)}.dialog__header-actions zn-button,.dialog__header-actions::slotted(zn-button){flex:0 0 auto;display:flex;align-items:center;font-size:var(--zn-font-size-medium)}.dialog__label{overflow:hidden;word-break:break-word;display:inline-block}.dialog__body{flex:1 1 auto;min-height:0;display:block;padding:var(--body-spacing);overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--footer-spacing)}.dialog__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}.dialog{}.dialog--default .dialog__title,.dialog--warning .dialog__title{color:rgb(var(--zn-text-panel-title));font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-font-size-x-large);padding:var(--header-spacing)}.dialog--announcement .dialog__title{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;align-content:center;color:var(--caption-color);font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-line-height-dense);padding:var(--header-spacing);margin:0}.dialog--default .dialog__title ::slotted(zn-icon),.dialog--warning .dialog__title ::slotted(zn-icon){border-radius:var(--zn-border-radius-pill);padding:var(--zn-spacing-2x-small);margin-right:var(--zn-spacing-small)}.dialog--announcement .dialog__title ::slotted(zn-icon){--icon-size:var(--zn-font-size-3x-large);border-radius:var(--zn-border-radius-pill);padding:var(--zn-spacing-medium);margin-bottom:var(--zn-spacing-medium)}.dialog__title ::slotted(zn-icon){background-color:var(--icon-background-color);color:var(--icon-color)}.dialog--warning .dialog__title{--icon-background-color:rgba(var(--zn-color-warning),.3);--icon-color:rgb(var(--zn-color-warning))}.dialog--announcement .dialog__title ::slotted([slot=announcement-intro]){color:var(--zn-color-neutral-800);font-size:var(--zn-font-size-large);font-weight:var(--zn-font-weight-semibold);padding:var(--zn-spacing-medium) 0}.dialog--announcement .dialog__header-actions{display:none}.dialog--announcement .dialog__body{padding:var(--zn-spacing-x-small) var(--zn-spacing-2x-large)}.dialog--announcement .dialog__title,.dialog--announcement .dialog__body,.dialog--announcement .dialog__footer{text-align:center}.dialog--announcement .dialog__footer ::slotted([slot=footer-text]){color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small);font-weight:var(--zn-font-weight-normal)}.dialog{}.dialog--small{--width:25rem}.dialog--small .dialog__body{color:rgb(var(--zn-text));padding:var(--body-spacing)}.dialog--medium{--width:30rem}.dialog--large{--width:37.5rem}.dialog{}.dialog--announcement .dialog__footer ::slotted([slot=footer-text]){padding:var(--zn-spacing-large)}.dialog__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}.dialog:not(.dialog--has-footer) .dialog__body{padding-bottom:var(--zn-spacing-3x-large)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog--cosmic{border:1px solid transparent}.dialog--cosmic:before{content:"";z-index:-1;position:absolute;top:-2px;left:-2px;height:calc(100% + 4px);width:calc(100% + 4px);filter:blur(var(--zn-blur,1px));opacity:0.9;border-radius:var(--zn-border-radius);background-image:conic-gradient(from var(--rotate) at 50% 50%,#71d9ff 0%,#a100ff 22%,#71d9ff 44%,#ff00ce 74%,#71d9ff 94%);animation:rotate-gradient 6s linear infinite}.dialog--cosmic{position:relative;border:none !important}`;var ur=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","footer");this.variant="default";this.size="medium";this.open=!1;this.cosmic=!1;this.noHeader=!1;this.closeClickHandler=t=>{if(t.target instanceof HTMLElement&&t.target.hasAttribute("dialog-closer")){this.hide();return}for(let r of t.composedPath()){if(r===this)return;if(r instanceof HTMLElement){if(r.hasAttribute("modal-closer")){this.hide();return}if(r.localName==="zn-dialog"||r.localName==="zn-slideout")return}}}}firstUpdated(t){super.firstUpdated(t),this.open&&this.show()}connectedCallback(){if(super.connectedCallback(),this.addEventListener("click",this.closeClickHandler),this.shadowRoot?.addEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentNode?.querySelector(cr(this.trigger));t&&t.addEventListener("click",()=>this.show())}if(window.CSS.registerProperty)try{window.CSS.registerProperty({inherits:!1,initialValue:"0deg",name:"--rotate",syntax:"<angle>"})}catch{}}disconnectedCallback(){if(super.disconnectedCallback(),this.dialog.close(),za(this),this.closeWatcher?.destroy(),this.removeEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentElement?.querySelector(cr(this.trigger));t&&t.removeEventListener("click",()=>this.show())}}requestClose(t){this.emit("zn-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented||this.hide()}addOpenListeners(){"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))}removeOpenListeners(){this.closeWatcher?.destroy()}show(){this.emit("zn-show"),this.addOpenListeners(),this.open=!0,this.dialog.showModal()}hide(){this.emit("zn-close"),this.removeOpenListeners(),this.open=!1,this.dialog.close()}render(){let t=this.hasSlotController.test("footer");return u`
296
+ `}showStatus(t){let r=t==="success"?this.successIcon:this.errorIcon;this.tooltip.content=t==="success"?"Copied!":"Error!",this.copyIcon.hidden=!0,this.status=t,r.hidden=!1,setTimeout(()=>{this.status="rest",this.copyIcon.hidden=!1,r.hidden=!0,this.tooltip.content=this.copyLabel||"Copy",this.isCopying=!1},1500)}async handleCopy(){if(this.isCopying)return;this.isCopying=!0;let t=this.value||this.textContent;if(this.from){let r=this.getRootNode(),n=this.from.includes("."),a=this.from.includes("[")&&this.from.includes("]"),s=this.from,l="";n?[s,l]=this.from.trim().split("."):a&&([s,l]=this.from.trim().replace(/]$/,"").split("["));let p="getElementById"in r?r.getElementById(s):null;p?a?t=p.getAttribute(l)||"":n?t=p[l]||"":t=p.textContent||"":(console.error("No target element found with id:",s),this.showStatus("error"),this.emit("zn-error"))}if(!t){console.error('No value to copy. Please provide a value or a valid "from" attribute.'),this.showStatus("error"),this.emit("zn-error");return}try{await navigator.clipboard.writeText(t),this.showStatus("success"),this.emit("zn-copy",{detail:{value:t}})}catch(r){console.error("Failed to copy text: ",r),this.showStatus("error"),this.emit("zn-error")}}};nr.styles=z(Vv),c([F('slot[name="copy-icon"')],nr.prototype,"copyIcon",2),c([F('slot[name="success-icon"')],nr.prototype,"successIcon",2),c([F('slot[name="error-icon"')],nr.prototype,"errorIcon",2),c([F("zn-tooltip")],nr.prototype,"tooltip",2),c([R()],nr.prototype,"isCopying",2),c([R()],nr.prototype,"status",2),c([d()],nr.prototype,"value",2),c([d({attribute:"copy-label"})],nr.prototype,"copyLabel",2),c([d()],nr.prototype,"src",2),c([d({type:Number,reflect:!0})],nr.prototype,"size",2),c([d()],nr.prototype,"from",2);var Mu=nr;nr.define("zn-copy-button");var Uv=()=>new qu,qu=class{},Lu=new WeakMap,Pl=yt(class extends vo{render(o){return B}update(o,[i]){let t=i!==this.G;return t&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=i,this.ht=o.options?.host,this.rt(this.ct=o.element)),B}rt(o){if(this.G!==void 0)if(this.isConnected||(o=void 0),typeof this.G=="function"){let i=this.ht??globalThis,t=Lu.get(i);t===void 0&&(t=new WeakMap,Lu.set(i,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Lu.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ht=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.ResizeObserver?(this.u=new ResizeObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}unobserve(i){this.t.delete(i),this.u.unobserve(i)}disconnect(){this.u.disconnect()}target(i){return i4(this,i)}},i4=yt(class extends vo{constructor(){super(...arguments),this.observing=!1}render(o,i){}update(o,[i,t]){this.controller=i,this.part=o,this.observe=t,t===!1?(i.unobserve(o.element),this.observing=!1):this.observing===!1&&(i.observe(o.element),this.observing=!0)}disconnected(){this.controller?.unobserve(this.part.element),this.observing=!1}reconnected(){this.observe!==!1&&this.observing===!1&&(this.controller?.observe(this.part.element),this.observing=!0)}});var jv=Symbol(),Hl=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((i,t)=>{this.o=i,this.h=t})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(i,t,r){this.p=0,this.i=0,(this._=i).addController(this);let n=typeof t=="object"?t:{task:t,args:r};this.v=n.task,this.j=n.args,this.m=n.argsEqual??Gv,this.k=n.onComplete,this.A=n.onError,this.autoRun=n.autoRun??!0,"initialValue"in n&&(this.u=n.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let i=this.j();if(!Array.isArray(i))throw Error("The args function must return an array");return i}async S(){let i=this.T(),t=this.O;this.O=i,i===t||i===void 0||t!==void 0&&this.m(t,i)||await this.run(i)}async run(i){let t,r;i??(i=this.T()),this.O=i,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let n=++this.p;this.q=new AbortController;let a=!1;try{t=await this.v(i,{signal:this.q.signal})}catch(s){a=!0,r=s}if(this.p===n){if(t===jv)this.i=0;else{if(a===!1){try{this.k?.(t)}catch{}this.i=2,this.o?.(t)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=t,this.l=r}this._.requestUpdate()}}abort(i){this.i===1&&this.q?.abort(i)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(i){switch(this.i){case 0:return i.initial?.();case 1:return i.pending?.();case 2:return i.complete?.(this.value);case 3:return i.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},Gv=(o,i)=>o===i||o.length===i.length&&o.every(((t,r)=>!Za(t,i[r])));function Wv(o,i){return{top:Math.round(o.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(o.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Iu=new Set;function n4(){let o=document.documentElement.clientWidth;return Math.abs(window.innerWidth-o)}function Kv(o){if(Iu.add(o),!document.body.classList.contains("zn-scroll-lock")){let i=n4();document.body.classList.add("zn-scroll-lock"),document.body.style.setProperty("--zn-scroll-lock-size",`${i}px`)}}function _a(o){Iu.delete(o),Iu.size===0&&(document.body.classList.remove("zn-scroll-lock"),document.body.style.removeProperty("--zn-scroll-lock-size"))}function Yv(o,i,t="vertical",r="smooth"){let n=Wv(o,i),a=n.top+i.scrollTop,s=n.left+i.scrollLeft,l=i.scrollLeft,p=i.scrollLeft+i.offsetWidth,h=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(s<l?i.scrollTo({left:s,behavior:r}):s+o.clientWidth>p&&i.scrollTo({left:s-i.offsetWidth+o.clientWidth,behavior:r})),(t==="vertical"||t==="both")&&(a<h?i.scrollTo({top:a,behavior:r}):a+o.clientHeight>m&&i.scrollTo({top:a-i.offsetHeight+o.clientHeight,behavior:r}))}function Qv(o){let i=[],t=o;for(;t;)t instanceof Element&&t.scrollTop>0&&i.push(t),t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode;return i}function Xv(o,i="auto"){for(let t of o)t.scrollTo({top:0,behavior:i})}var Jv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:30rem;--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-x-small) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.dialog-container{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;border-radius:var(--zn-border-radius);background-color:var(--zn-panel-background-color);margin:2px;overflow:hidden}.dialog__header+.dialog__body{padding-top:0}.dialog{flex-direction:column;z-index:2;width:calc(var(--width) + 1px);overflow:hidden;max-width:calc(100% - var(--zn-spacing-2x-large));max-height:calc(100% - 20vh);background-color:var(--zn-panel-background-color);border-radius:var(--zn-border-radius);box-shadow:var(--zn-shadow-x-large);padding:0;margin:10vh auto}.dialog[open]{display:flex}.dialog__header{flex:0 0 auto;display:flex}.dialog__title{display:flex;flex:1 1 auto;align-items:center;font:inherit;margin:0;width:100%;overflow:hidden}.dialog__header-actions{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:end;align-items:center;gap:var(--zn-spacing-x-small);padding:var(--header-spacing)}.dialog__header-actions zn-button,.dialog__header-actions::slotted(zn-button){flex:0 0 auto;display:flex;align-items:center;font-size:var(--zn-font-size-medium)}.dialog__label{overflow:hidden;word-break:break-word;display:inline-block}.dialog__body{flex:1 1 auto;min-height:0;display:block;padding:var(--body-spacing);overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--footer-spacing)}.dialog__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}.dialog{}.dialog--default .dialog__title,.dialog--warning .dialog__title{color:rgb(var(--zn-text-panel-title));font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-font-size-x-large);padding:var(--header-spacing)}.dialog--announcement .dialog__title{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;align-content:center;color:var(--caption-color);font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-line-height-dense);padding:var(--header-spacing);margin:0}.dialog--default .dialog__title ::slotted(zn-icon),.dialog--warning .dialog__title ::slotted(zn-icon){border-radius:var(--zn-border-radius-pill);padding:var(--zn-spacing-2x-small);margin-right:var(--zn-spacing-small)}.dialog--announcement .dialog__title ::slotted(zn-icon){--icon-size:var(--zn-font-size-3x-large);border-radius:var(--zn-border-radius-pill);padding:var(--zn-spacing-medium);margin-bottom:var(--zn-spacing-medium)}.dialog__title ::slotted(zn-icon){background-color:var(--icon-background-color);color:var(--icon-color)}.dialog--warning .dialog__title{--icon-background-color:rgba(var(--zn-color-warning),.3);--icon-color:rgb(var(--zn-color-warning))}.dialog--announcement .dialog__title ::slotted([slot=announcement-intro]){color:var(--zn-color-neutral-800);font-size:var(--zn-font-size-large);font-weight:var(--zn-font-weight-semibold);padding:var(--zn-spacing-medium) 0}.dialog--announcement .dialog__header-actions{display:none}.dialog--announcement .dialog__body{padding:var(--zn-spacing-x-small) var(--zn-spacing-2x-large)}.dialog--announcement .dialog__title,.dialog--announcement .dialog__body,.dialog--announcement .dialog__footer{text-align:center}.dialog--announcement .dialog__footer ::slotted([slot=footer-text]){color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small);font-weight:var(--zn-font-weight-normal)}.dialog{}.dialog--small{--width:25rem}.dialog--small .dialog__body{color:rgb(var(--zn-text));padding:var(--body-spacing)}.dialog--medium{--width:30rem}.dialog--large{--width:37.5rem}.dialog{}.dialog--announcement .dialog__footer ::slotted([slot=footer-text]){padding:var(--zn-spacing-large)}.dialog__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}.dialog:not(.dialog--has-footer) .dialog__body{padding-bottom:var(--zn-spacing-3x-large)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog--cosmic{border:1px solid transparent}.dialog--cosmic:before{content:"";z-index:-1;position:absolute;top:-2px;left:-2px;height:calc(100% + 4px);width:calc(100% + 4px);filter:blur(var(--zn-blur,1px));opacity:0.9;border-radius:var(--zn-border-radius);background-image:conic-gradient(from var(--rotate) at 50% 50%,#71d9ff 0%,#a100ff 22%,#71d9ff 44%,#ff00ce 74%,#71d9ff 94%);animation:rotate-gradient 6s linear infinite}.dialog--cosmic{position:relative;border:none !important}`;var ur=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","footer");this.variant="default";this.size="medium";this.open=!1;this.cosmic=!1;this.noHeader=!1;this.closeClickHandler=t=>{if(t.target instanceof HTMLElement&&t.target.hasAttribute("dialog-closer")){this.hide();return}for(let r of t.composedPath()){if(r===this)return;if(r instanceof HTMLElement){if(r.hasAttribute("modal-closer")){this.hide();return}if(r.localName==="zn-dialog"||r.localName==="zn-slideout")return}}}}firstUpdated(t){super.firstUpdated(t),this.open&&this.show()}connectedCallback(){if(super.connectedCallback(),this.addEventListener("click",this.closeClickHandler),this.shadowRoot?.addEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentNode?.querySelector(cr(this.trigger));t&&t.addEventListener("click",()=>this.show())}if(window.CSS.registerProperty)try{window.CSS.registerProperty({inherits:!1,initialValue:"0deg",name:"--rotate",syntax:"<angle>"})}catch{}}disconnectedCallback(){if(super.disconnectedCallback(),this.dialog.close(),_a(this),this.closeWatcher?.destroy(),this.removeEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentElement?.querySelector(cr(this.trigger));t&&t.removeEventListener("click",()=>this.show())}}requestClose(t){this.emit("zn-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented||this.hide()}addOpenListeners(){"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))}removeOpenListeners(){this.closeWatcher?.destroy()}show(){this.emit("zn-show"),this.addOpenListeners(),this.open=!0,this.dialog.showModal()}hide(){this.emit("zn-close"),this.removeOpenListeners(),this.open=!1,this.dialog.close()}render(){let t=this.hasSlotController.test("footer");return u`
297
297
  <dialog
298
298
  part="base"
299
299
  role="alertdialog"
@@ -339,7 +339,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
339
339
  </footer>
340
340
  </div>
341
341
  </dialog>
342
- `}};ur.styles=z(Jv),ur.dependencies={"zn-button":$e},c([F(".dialog")],ur.prototype,"dialog",2),c([F(".dialog__close")],ur.prototype,"closer",2),c([d({reflect:!0})],ur.prototype,"variant",2),c([d({reflect:!0})],ur.prototype,"size",2),c([d({type:Boolean,reflect:!0})],ur.prototype,"open",2),c([d({reflect:!0})],ur.prototype,"label",2),c([d({type:Boolean,reflect:!0})],ur.prototype,"cosmic",2),c([d({attribute:"no-header",type:Boolean,reflect:!0})],ur.prototype,"noHeader",2),c([d({type:String,reflect:!0})],ur.prototype,"trigger",2);var _a=ur;ur.define("zn-dialog");var Zv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.confirm-dialog__content{margin:0;text-wrap:auto}.confirm-dialog::part(footer){text-align:right}.confirm-dialog::part(body){text-align:left}.confirm-dialog--has-default-slot .confirm-dialog__content{margin-bottom:var(--zn-spacing-large)}.confirm-dialog--error::part(title){--icon-background-color:rgb(var(--zn-color-error),.3);--icon-color:rgb(var(--zn-color-error),1);--caption-color:rgb(var(--zn-color-error),1)}.confirm-dialog--warning::part(title){--icon-background-color:rgb(var(--zn-color-warning),.3);--icon-color:rgb(var(--zn-color-warning),1);--caption-color:rgb(var(--zn-color-warning),1)}.confirm-dialog--success::part(title){--icon-background-color:rgb(var(--zn-color-success),.3);--icon-color:rgb(var(--zn-color-success),1);--caption-color:rgb(var(--zn-color-success),1)}.confirm-dialog--info::part(title){--icon-background-color:rgb(var(--zn-color-info),.3);--icon-color:rgb(var(--zn-color-info),1);--caption-color:rgb(var(--zn-color-info),1)}`;var ut=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","footer");this.variant="default";this.size="medium";this.type="warning";this.open=!1;this.caption="";this.action="";this.content="";this.confirmText="Confirm";this.cancelText="Cancel";this.hideIcon=!1;this.showLoading=!1;this.announcement="";this.footerText="";this.loading=!1;this.show=(t=void 0)=>{t?.target?.disabled||(this.loading=!1,this.dialog.show())}}firstUpdated(t){super.firstUpdated(t),this.open&&this.dialog.show()}connectedCallback(){super.connectedCallback(),this.hasSlotController.test("trigger")?this.hasSlotController.getSlot("trigger")?.addEventListener("click",this.show):this.trigger&&Ge(cr(this.trigger),this.parentElement,"").forEach(r=>{r.addEventListener("click",this.show)})}updateTriggers(){Ge(cr(this.trigger),this.parentElement,"").forEach(r=>{r.removeEventListener("click",this.show),r.addEventListener("click",this.show)})}hide(){this.loading=!1,this.dialog.hide()}render(){let t={warning:"priority_high",error:"priority_high",success:"check",info:"help"};return u`
342
+ `}};ur.styles=z(Jv),ur.dependencies={"zn-button":$e},c([F(".dialog")],ur.prototype,"dialog",2),c([F(".dialog__close")],ur.prototype,"closer",2),c([d({reflect:!0})],ur.prototype,"variant",2),c([d({reflect:!0})],ur.prototype,"size",2),c([d({type:Boolean,reflect:!0})],ur.prototype,"open",2),c([d({reflect:!0})],ur.prototype,"label",2),c([d({type:Boolean,reflect:!0})],ur.prototype,"cosmic",2),c([d({attribute:"no-header",type:Boolean,reflect:!0})],ur.prototype,"noHeader",2),c([d({type:String,reflect:!0})],ur.prototype,"trigger",2);var ka=ur;ur.define("zn-dialog");var Zv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.confirm-dialog__content{margin:0;text-wrap:auto}.confirm-dialog::part(footer){text-align:right}.confirm-dialog::part(body){text-align:left}.confirm-dialog--has-default-slot .confirm-dialog__content{margin-bottom:var(--zn-spacing-large)}.confirm-dialog--error::part(title){--icon-background-color:rgb(var(--zn-color-error),.3);--icon-color:rgb(var(--zn-color-error),1);--caption-color:rgb(var(--zn-color-error),1)}.confirm-dialog--warning::part(title){--icon-background-color:rgb(var(--zn-color-warning),.3);--icon-color:rgb(var(--zn-color-warning),1);--caption-color:rgb(var(--zn-color-warning),1)}.confirm-dialog--success::part(title){--icon-background-color:rgb(var(--zn-color-success),.3);--icon-color:rgb(var(--zn-color-success),1);--caption-color:rgb(var(--zn-color-success),1)}.confirm-dialog--info::part(title){--icon-background-color:rgb(var(--zn-color-info),.3);--icon-color:rgb(var(--zn-color-info),1);--caption-color:rgb(var(--zn-color-info),1)}`;var ut=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","footer");this.variant="default";this.size="medium";this.type="warning";this.open=!1;this.caption="";this.action="";this.content="";this.confirmText="Confirm";this.cancelText="Cancel";this.hideIcon=!1;this.showLoading=!1;this.announcement="";this.footerText="";this.loading=!1;this.show=(t=void 0)=>{t?.target?.disabled||(this.loading=!1,this.dialog.show())}}firstUpdated(t){super.firstUpdated(t),this.open&&this.dialog.show()}connectedCallback(){super.connectedCallback(),this.hasSlotController.test("trigger")?this.hasSlotController.getSlot("trigger")?.addEventListener("click",this.show):this.trigger&&Ge(cr(this.trigger),this.parentElement,"").forEach(r=>{r.addEventListener("click",this.show)})}updateTriggers(){Ge(cr(this.trigger),this.parentElement,"").forEach(r=>{r.removeEventListener("click",this.show),r.addEventListener("click",this.show)})}hide(){this.loading=!1,this.dialog.hide()}render(){let t={warning:"priority_high",error:"priority_high",success:"check",info:"help"};return u`
343
343
  <slot name="trigger" slot="trigger"></slot>
344
344
  <zn-dialog size="${this.size}" variant="${this.variant}" label=${P(this.caption)} trigger=${this.trigger}
345
345
  class=${M({"confirm-dialog":!0,"confirm-dialog--warning":this.type==="warning","confirm-dialog--error":this.type==="error","confirm-dialog--success":this.type==="success","confirm-dialog--info":this.type==="info","confirm-dialog--has-default-slot":this.hasSlotController.test("[default]")})}>
@@ -364,7 +364,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
364
364
  </zn-button>
365
365
 
366
366
  <slot name="footer-text" slot="footer-text">${this.footerText}</slot>
367
- </zn-dialog>`}submitDialog(){let t=this.querySelector("form");!t&&this.action&&(t=document.createElement("form"),t.action=this.action,t.method="POST",Array.from(this.attributes).forEach(r=>{r.name.startsWith("data-")&&t?.setAttribute(r.name,r.value)}),this.querySelectorAll("input").forEach(r=>{t?.appendChild(r.cloneNode())}),this.appendChild(t)),t&&t.reportValidity()&&(document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:t}})),t.requestSubmit(),this.showLoading?(this.loading=!0,this.dialog.closer.disabled=!0):this.hide())}};ut.styles=z(Zv),ut.dependencies={"zn-dialog":_a},c([d({reflect:!0})],ut.prototype,"variant",2),c([d({reflect:!0})],ut.prototype,"size",2),c([d()],ut.prototype,"type",2),c([d({type:Boolean,reflect:!0})],ut.prototype,"open",2),c([d()],ut.prototype,"caption",2),c([d()],ut.prototype,"action",2),c([d()],ut.prototype,"content",2),c([d()],ut.prototype,"confirmText",2),c([d()],ut.prototype,"cancelText",2),c([d({type:Boolean,attribute:"hide-icon"})],ut.prototype,"hideIcon",2),c([d({type:Boolean,attribute:"show-loading"})],ut.prototype,"showLoading",2),c([d({reflect:!0})],ut.prototype,"trigger",2),c([d()],ut.prototype,"announcement",2),c([d({attribute:"footer-text"})],ut.prototype,"footerText",2),c([F("zn-dialog")],ut.prototype,"dialog",2),c([R()],ut.prototype,"loading",2);var Fl=ut;ut.define("zn-confirm");function qt(o){let i=document.createDocumentFragment();return Ja(o,i),i.firstElementChild}var Ce=(o="value")=>(i,t)=>{let r=i.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let p=r.getPropertyOptions(o),h=typeof p.attribute=="string"?p.attribute:o;if(a===h){let m=p.converter||fo,b=(typeof m=="function"?m:m?.fromAttribute??fo.fromAttribute)(l,p.type);this[o]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var o4=new Map;function Pd(o){return(Array.isArray(o)?o:o.split(",")).reduce((t,r)=>{let n=o4.get(r.trim());return n?[...t,...n]:t},[])}function a4(o){return typeof o=="object"&&o!==null&&typeof o.label=="string"}function zo(o){let i=o?.trim();if(!i)return[];if(i.startsWith("["))try{let t=JSON.parse(i);return Array.isArray(t)?t.filter(a4):[]}catch{return console.warn("slash-items could not be parsed as JSON",i),[]}return i.split(",").map(t=>t.trim()).filter(t=>t!=="").map(t=>{let r=t.indexOf("=");if(r===-1)return{label:t,value:t};let n=t.slice(0,r).trim(),a=t.slice(r+1).trim();return{label:n||a,value:a}}).filter(t=>t.label!=="")}function s4(o){return o.keywords?(Array.isArray(o.keywords)?o.keywords:o.keywords.split(",")).map(t=>t.trim().toLowerCase()).filter(t=>t!==""):[]}function l4(o,i){let t=o.label.toLowerCase();return t.startsWith(i)?0:t.split(/\s+/).some(r=>r.startsWith(i))?1:t.includes(i)?2:s4(o).some(r=>r.includes(i))?3:o.value?.toLowerCase().includes(i)?4:o.description?.toLowerCase().includes(i)?5:-1}function Hd(o,i){let t=i.trim().toLowerCase();return o.map((r,n)=>({item:r,index:n,score:t?l4(r,t):0})).filter(r=>r.score!==-1).sort((r,n)=>r.score-n.score||(r.item.order??r.index)-(n.item.order??n.index)||r.index-n.index).map(r=>r.item)}var Du="zn-slash-recent:",c4=10;function Ru(o){return o.action?`action:${o.action}`:`value:${o.value||o.label}`}function Nu(o){if(!o)return[];try{let i=JSON.parse(localStorage.getItem(Du+o)??"[]");return Array.isArray(i)?i.filter(t=>typeof t=="string"):[]}catch{return[]}}function e0(o,i){if(!o)return[];let t=Ru(i),r=[t,...Nu(o).filter(n=>n!==t)].slice(0,c4);try{localStorage.setItem(Du+o,JSON.stringify(r))}catch{}return r}function t0(o){if(o)try{localStorage.removeItem(Du+o)}catch{}}var r0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{--slash-menu-width:320px;--slash-menu-max-height:260px;--slash-menu-border-radius:12px;--slash-menu-item-border-radius:8px;display:contents}:host(:not([open])) .slash-menu__panel{display:none}.slash-menu__panel{display:flex;flex-direction:column;position:fixed;inset:0 auto auto 0;margin:0;width:var(--slash-menu-width);max-width:var(--auto-size-available-width,none);max-height:min(var(--slash-menu-max-height),var(--auto-size-available-height,100vh));z-index:var(--zn-z-index-dropdown);overflow:hidden;background:var(--zn-panel-background-color);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--slash-menu-border-radius);box-shadow:var(--zn-shadow-medium);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text))}.slash-menu__list{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--zn-spacing-3x-small,2px);min-height:0;overflow-y:auto;overscroll-behavior:none;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px)}.slash-menu__group-heading,.slash-menu__footer,.slash-menu__empty{padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__group-heading{padding-top:var(--zn-spacing-x-small,8px);font-weight:var(--zn-font-weight-semibold);text-transform:uppercase;letter-spacing:0.06em;color:var(--zn-color-neutral-400)}.slash-menu__footer{border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);margin-top:var(--zn-spacing-2x-small,4px)}.slash-menu__divider{height:var(--zn-panel-border-width,1px);margin:var(--zn-spacing-2x-small,4px) 0;background:var(--zn-panel-border-color)}.slash-menu__hints{display:flex;flex:0 0 auto;align-items:center;gap:var(--zn-spacing-small,12px);padding:var(--zn-spacing-x-small,8px) var(--zn-spacing-small,12px);border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__hint{display:flex;align-items:center;gap:var(--zn-spacing-2x-small,4px)}.slash-menu__key{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 var(--zn-spacing-2x-small,4px);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--zn-border-radius,6px);background:var(--zn-panel-background-color);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-2x-small);line-height:1;color:var(--zn-color-neutral-600)}.slash-menu__item{display:flex;align-items:center;gap:var(--zn-spacing-small,12px);width:100%;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);border:none;border-radius:var(--slash-menu-item-border-radius);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.slash-menu__item:hover:not(.slash-menu__item--disabled){background:var(--zn-input-background-color-hover)}.slash-menu__item--active,.slash-menu__item--active:hover:not(.slash-menu__item--disabled){background:rgba(var(--zn-color-primary),0.08)}.slash-menu__item--disabled{opacity:0.5;cursor:not-allowed}.slash-menu__icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;border:solid var(--zn-panel-border-width,1px) rgba(var(--zn-color-primary),0.18);border-radius:var(--slash-menu-item-border-radius);background:rgba(var(--zn-color-primary),0.06);color:var(--zn-color-neutral-700)}.slash-menu__icon--empty{border-color:transparent;background:none}.slash-menu__item--active .slash-menu__icon{border-color:rgba(var(--zn-color-primary),0.3);background:rgba(var(--zn-color-primary),0.14);color:rgb(var(--zn-color-primary))}.slash-menu__text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.slash-menu__label{font-weight:var(--zn-font-weight-semibold);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__description{font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__token{flex:0 1 auto;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--zn-font-mono);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-600)}`;var hs="zn-slash-item-select";function d4(o,i){return!!o&&o.length===i.length&&o.every((t,r)=>t.label===i[r].label&&t.value===i[r].value&&t.disabled===i[r].disabled)}var Je=class extends k{constructor(){super(...arguments);this.open=!1;this.items=[];this.query="";this.heading="Insert";this.emptyText="No matches";this.maxItems=25;this.hideKeys=!1;this.hideHints=!1;this.recentKey="";this.maxRecent=3;this.recentHeading="Recently used";this.anchor=null;this.placement="bottom-start";this.distance=4;this.activeIndex=0;this.recentKeys=[];this.recentCount=0;this.handleItemMouseDown=t=>{t.preventDefault(),t.stopPropagation();let r=Number(t.currentTarget.dataset.index),n=this.visibleItems[r];n&&(this.activeIndex=r,this.selectItem(n))}}get listItems(){return this.maxItems>0?this.items.slice(0,this.maxItems):this.items}get recentItems(){if(!this.recentKey||this.maxRecent<1||this.query.trim()!=="")return[];let t=new Map;for(let n of this.items){let a=Ru(n);!n.disabled&&!t.has(a)&&t.set(a,n)}let r=this.recentKeys.map(n=>t.get(n)).filter(n=>n!==void 0).slice(0,this.maxRecent);return r.length<this.items.length?r:[]}get visibleItems(){return[...this.recentItems,...this.listItems]}get activeItem(){return this.visibleItems[this.activeIndex]}show(){this.open=!0}hide(){this.open=!1}clearRecent(){t0(this.recentKey),this.recentKeys=[]}setActiveIndex(t){let r=this.visibleItems;if(!r.filter(l=>!l.disabled).length){this.activeIndex=-1;return}let a=(t+r.length)%r.length,s=t<this.activeIndex?-1:1;for(;r[a]?.disabled;)a=(a+s+r.length)%r.length;this.activeIndex=a,this.updateComplete.then(()=>this.scrollActiveIntoView())}moveActive(t){this.setActiveIndex(this.activeIndex+t)}selectActive(){let t=this.activeItem;t&&this.selectItem(t)}reposition(){this.position()}connectedCallback(){super.connectedCallback(),this.open&&this.updateComplete.then(()=>this.startPositioner())}disconnectedCallback(){super.disconnectedCallback(),this.stopPositioner(),this.hidePanelPopover()}showPanelPopover(){let t=this.panel;typeof t?.showPopover=="function"&&!t.matches(":popover-open")&&t.showPopover()}hidePanelPopover(){let t=this.panel;typeof t?.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()}startPositioner(){this.stopPositioner(),!(!this.anchor||!this.panel)&&(this.stopAutoUpdate=Id(this.anchor,this.panel,()=>{this.position()}))}stopPositioner(){this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0}async position(){let{anchor:t,panel:r}=this;if(!this.open||!t||!r)return;this.showPanelPopover();let{x:n,y:a}=await Od(t,r,{placement:this.placement,strategy:"fixed",middleware:[Dd(this.distance),Nd({padding:8}),Rd({padding:8}),Rl({padding:8,apply:({availableHeight:s})=>{r.style.setProperty("--auto-size-available-height",`${Math.max(s,0)}px`)}})]});Object.assign(r.style,{left:`${n}px`,top:`${a}px`})}selectItem(t){t.disabled||(this.recentKey&&(this.recentKeys=e0(this.recentKey,t)),this.dispatchEvent(new CustomEvent(hs,{bubbles:!0,cancelable:!0,composed:!1,detail:{item:t,query:this.query}})))}scrollActiveIntoView(){let t=this.renderRoot.querySelector('[data-slash-item][aria-selected="true"]');if(!t)return;let r=this.visibleItems,n=this.list;if(n&&r.slice(0,this.activeIndex).every(a=>a.disabled)){n.scrollTop=0;return}if(n&&r.slice(this.activeIndex+1).every(a=>a.disabled)){n.scrollTop=n.scrollHeight;return}t.scrollIntoView({block:"nearest"})}willUpdate(t){super.willUpdate(t),(t.has("recentKey")||t.has("open")&&this.open)&&(this.recentKeys=Nu(this.recentKey));let r=t.has("items")&&!d4(t.get("items"),this.items),n=this.recentItems.length;(r||n!==this.recentCount)&&(this.recentCount=n,this.activeIndex=this.visibleItems.findIndex(a=>!a.disabled))}updated(t){super.updated(t),(t.has("open")||t.has("anchor"))&&(this.open?this.startPositioner():(this.stopPositioner(),this.hidePanelPopover())),this.open&&this.position(),(t.has("items")||t.has("open")&&this.open)&&this.scrollActiveIntoView()}renderItem(t,r,n){let a=r===this.activeIndex,s=!this.hideKeys&&t.value&&t.value!==t.label&&!t.value.includes(`
367
+ </zn-dialog>`}submitDialog(){let t=this.querySelector("form");!t&&this.action&&(t=document.createElement("form"),t.action=this.action,t.method="POST",Array.from(this.attributes).forEach(r=>{r.name.startsWith("data-")&&t?.setAttribute(r.name,r.value)}),this.querySelectorAll("input").forEach(r=>{t?.appendChild(r.cloneNode())}),this.appendChild(t)),t&&t.reportValidity()&&(document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:t}})),t.requestSubmit(),this.showLoading?(this.loading=!0,this.dialog.closer.disabled=!0):this.hide())}};ut.styles=z(Zv),ut.dependencies={"zn-dialog":ka},c([d({reflect:!0})],ut.prototype,"variant",2),c([d({reflect:!0})],ut.prototype,"size",2),c([d()],ut.prototype,"type",2),c([d({type:Boolean,reflect:!0})],ut.prototype,"open",2),c([d()],ut.prototype,"caption",2),c([d()],ut.prototype,"action",2),c([d()],ut.prototype,"content",2),c([d()],ut.prototype,"confirmText",2),c([d()],ut.prototype,"cancelText",2),c([d({type:Boolean,attribute:"hide-icon"})],ut.prototype,"hideIcon",2),c([d({type:Boolean,attribute:"show-loading"})],ut.prototype,"showLoading",2),c([d({reflect:!0})],ut.prototype,"trigger",2),c([d()],ut.prototype,"announcement",2),c([d({attribute:"footer-text"})],ut.prototype,"footerText",2),c([F("zn-dialog")],ut.prototype,"dialog",2),c([R()],ut.prototype,"loading",2);var Fl=ut;ut.define("zn-confirm");function qt(o){let i=document.createDocumentFragment();return Ja(o,i),i.firstElementChild}var Ce=(o="value")=>(i,t)=>{let r=i.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let p=r.getPropertyOptions(o),h=typeof p.attribute=="string"?p.attribute:o;if(a===h){let m=p.converter||fo,b=(typeof m=="function"?m:m?.fromAttribute??fo.fromAttribute)(l,p.type);this[o]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var o4=new Map;function Pd(o){return(Array.isArray(o)?o:o.split(",")).reduce((t,r)=>{let n=o4.get(r.trim());return n?[...t,...n]:t},[])}function a4(o){return typeof o=="object"&&o!==null&&typeof o.label=="string"}function zo(o){let i=o?.trim();if(!i)return[];if(i.startsWith("["))try{let t=JSON.parse(i);return Array.isArray(t)?t.filter(a4):[]}catch{return console.warn("slash-items could not be parsed as JSON",i),[]}return i.split(",").map(t=>t.trim()).filter(t=>t!=="").map(t=>{let r=t.indexOf("=");if(r===-1)return{label:t,value:t};let n=t.slice(0,r).trim(),a=t.slice(r+1).trim();return{label:n||a,value:a}}).filter(t=>t.label!=="")}function s4(o){return o.keywords?(Array.isArray(o.keywords)?o.keywords:o.keywords.split(",")).map(t=>t.trim().toLowerCase()).filter(t=>t!==""):[]}function l4(o,i){let t=o.label.toLowerCase();return t.startsWith(i)?0:t.split(/\s+/).some(r=>r.startsWith(i))?1:t.includes(i)?2:s4(o).some(r=>r.includes(i))?3:o.value?.toLowerCase().includes(i)?4:o.description?.toLowerCase().includes(i)?5:-1}function Hd(o,i){let t=i.trim().toLowerCase();return o.map((r,n)=>({item:r,index:n,score:t?l4(r,t):0})).filter(r=>r.score!==-1).sort((r,n)=>r.score-n.score||(r.item.order??r.index)-(n.item.order??n.index)||r.index-n.index).map(r=>r.item)}var Du="zn-slash-recent:",c4=10;function Ru(o){return o.action?`action:${o.action}`:`value:${o.value||o.label}`}function Nu(o){if(!o)return[];try{let i=JSON.parse(localStorage.getItem(Du+o)??"[]");return Array.isArray(i)?i.filter(t=>typeof t=="string"):[]}catch{return[]}}function e0(o,i){if(!o)return[];let t=Ru(i),r=[t,...Nu(o).filter(n=>n!==t)].slice(0,c4);try{localStorage.setItem(Du+o,JSON.stringify(r))}catch{}return r}function t0(o){if(o)try{localStorage.removeItem(Du+o)}catch{}}var r0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{--slash-menu-width:320px;--slash-menu-max-height:260px;--slash-menu-border-radius:12px;--slash-menu-item-border-radius:8px;display:contents}:host(:not([open])) .slash-menu__panel{display:none}.slash-menu__panel{display:flex;flex-direction:column;position:fixed;inset:0 auto auto 0;margin:0;width:var(--slash-menu-width);max-width:var(--auto-size-available-width,none);max-height:min(var(--slash-menu-max-height),var(--auto-size-available-height,100vh));z-index:var(--zn-z-index-dropdown);overflow:hidden;background:var(--zn-panel-background-color);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--slash-menu-border-radius);box-shadow:var(--zn-shadow-medium);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text))}.slash-menu__list{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--zn-spacing-3x-small,2px);min-height:0;overflow-y:auto;overscroll-behavior:none;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px)}.slash-menu__group-heading,.slash-menu__footer,.slash-menu__empty{padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__group-heading{padding-top:var(--zn-spacing-x-small,8px);font-weight:var(--zn-font-weight-semibold);text-transform:uppercase;letter-spacing:0.06em;color:var(--zn-color-neutral-400)}.slash-menu__footer{border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);margin-top:var(--zn-spacing-2x-small,4px)}.slash-menu__divider{height:var(--zn-panel-border-width,1px);margin:var(--zn-spacing-2x-small,4px) 0;background:var(--zn-panel-border-color)}.slash-menu__hints{display:flex;flex:0 0 auto;align-items:center;gap:var(--zn-spacing-small,12px);padding:var(--zn-spacing-x-small,8px) var(--zn-spacing-small,12px);border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__hint{display:flex;align-items:center;gap:var(--zn-spacing-2x-small,4px)}.slash-menu__key{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 var(--zn-spacing-2x-small,4px);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--zn-border-radius,6px);background:var(--zn-panel-background-color);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-2x-small);line-height:1;color:var(--zn-color-neutral-600)}.slash-menu__item{display:flex;align-items:center;gap:var(--zn-spacing-small,12px);width:100%;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);border:none;border-radius:var(--slash-menu-item-border-radius);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.slash-menu__item:hover:not(.slash-menu__item--disabled){background:var(--zn-input-background-color-hover)}.slash-menu__item--active,.slash-menu__item--active:hover:not(.slash-menu__item--disabled){background:rgba(var(--zn-color-primary),0.08)}.slash-menu__item--disabled{opacity:0.5;cursor:not-allowed}.slash-menu__icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;border:solid var(--zn-panel-border-width,1px) rgba(var(--zn-color-primary),0.18);border-radius:var(--slash-menu-item-border-radius);background:rgba(var(--zn-color-primary),0.06);color:var(--zn-color-neutral-700)}.slash-menu__icon--empty{border-color:transparent;background:none}.slash-menu__item--active .slash-menu__icon{border-color:rgba(var(--zn-color-primary),0.3);background:rgba(var(--zn-color-primary),0.14);color:rgb(var(--zn-color-primary))}.slash-menu__text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.slash-menu__label{font-weight:var(--zn-font-weight-semibold);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__description{font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__token{flex:0 1 auto;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--zn-font-mono);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-600)}`;var hs="zn-slash-item-select";function d4(o,i){return!!o&&o.length===i.length&&o.every((t,r)=>t.label===i[r].label&&t.value===i[r].value&&t.disabled===i[r].disabled)}var Je=class extends k{constructor(){super(...arguments);this.open=!1;this.items=[];this.query="";this.heading="Insert";this.emptyText="No matches";this.maxItems=25;this.hideKeys=!1;this.hideHints=!1;this.recentKey="";this.maxRecent=3;this.recentHeading="Recently used";this.anchor=null;this.placement="bottom-start";this.distance=4;this.activeIndex=0;this.recentKeys=[];this.recentCount=0;this.handleItemMouseDown=t=>{t.preventDefault(),t.stopPropagation();let r=Number(t.currentTarget.dataset.index),n=this.visibleItems[r];n&&(this.activeIndex=r,this.selectItem(n))}}get listItems(){return this.maxItems>0?this.items.slice(0,this.maxItems):this.items}get recentItems(){if(!this.recentKey||this.maxRecent<1||this.query.trim()!=="")return[];let t=new Map;for(let n of this.items){let a=Ru(n);!n.disabled&&!t.has(a)&&t.set(a,n)}let r=this.recentKeys.map(n=>t.get(n)).filter(n=>n!==void 0).slice(0,this.maxRecent);return r.length<this.items.length?r:[]}get visibleItems(){return[...this.recentItems,...this.listItems]}get activeItem(){return this.visibleItems[this.activeIndex]}show(){this.open=!0}hide(){this.open=!1}clearRecent(){t0(this.recentKey),this.recentKeys=[]}setActiveIndex(t){let r=this.visibleItems;if(!r.filter(l=>!l.disabled).length){this.activeIndex=-1;return}let a=(t+r.length)%r.length,s=t<this.activeIndex?-1:1;for(;r[a]?.disabled;)a=(a+s+r.length)%r.length;this.activeIndex=a,this.updateComplete.then(()=>this.scrollActiveIntoView())}moveActive(t){this.setActiveIndex(this.activeIndex+t)}selectActive(){let t=this.activeItem;t&&this.selectItem(t)}reposition(){this.position()}connectedCallback(){super.connectedCallback(),this.open&&this.updateComplete.then(()=>this.startPositioner())}disconnectedCallback(){super.disconnectedCallback(),this.stopPositioner(),this.hidePanelPopover()}showPanelPopover(){let t=this.panel;typeof t?.showPopover=="function"&&!t.matches(":popover-open")&&t.showPopover()}hidePanelPopover(){let t=this.panel;typeof t?.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()}startPositioner(){this.stopPositioner(),!(!this.anchor||!this.panel)&&(this.stopAutoUpdate=Id(this.anchor,this.panel,()=>{this.position()}))}stopPositioner(){this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0}async position(){let{anchor:t,panel:r}=this;if(!this.open||!t||!r)return;this.showPanelPopover();let{x:n,y:a}=await Od(t,r,{placement:this.placement,strategy:"fixed",middleware:[Dd(this.distance),Nd({padding:8}),Rd({padding:8}),Rl({padding:8,apply:({availableHeight:s})=>{r.style.setProperty("--auto-size-available-height",`${Math.max(s,0)}px`)}})]});Object.assign(r.style,{left:`${n}px`,top:`${a}px`})}selectItem(t){t.disabled||(this.recentKey&&(this.recentKeys=e0(this.recentKey,t)),this.dispatchEvent(new CustomEvent(hs,{bubbles:!0,cancelable:!0,composed:!1,detail:{item:t,query:this.query}})))}scrollActiveIntoView(){let t=this.renderRoot.querySelector('[data-slash-item][aria-selected="true"]');if(!t)return;let r=this.visibleItems,n=this.list;if(n&&r.slice(0,this.activeIndex).every(a=>a.disabled)){n.scrollTop=0;return}if(n&&r.slice(this.activeIndex+1).every(a=>a.disabled)){n.scrollTop=n.scrollHeight;return}t.scrollIntoView({block:"nearest"})}willUpdate(t){super.willUpdate(t),(t.has("recentKey")||t.has("open")&&this.open)&&(this.recentKeys=Nu(this.recentKey));let r=t.has("items")&&!d4(t.get("items"),this.items),n=this.recentItems.length;(r||n!==this.recentCount)&&(this.recentCount=n,this.activeIndex=this.visibleItems.findIndex(a=>!a.disabled))}updated(t){super.updated(t),(t.has("open")||t.has("anchor"))&&(this.open?this.startPositioner():(this.stopPositioner(),this.hidePanelPopover())),this.open&&this.position(),(t.has("items")||t.has("open")&&this.open)&&this.scrollActiveIntoView()}renderItem(t,r,n){let a=r===this.activeIndex,s=!this.hideKeys&&t.value&&t.value!==t.label&&!t.value.includes(`
368
368
  `)?t.value:"";return u`
369
369
  <button
370
370
  type="button"
@@ -421,7 +421,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
421
421
  <div part="footer" class="slash-menu__footer">${t} more — keep typing to narrow</div>`:""}
422
422
  </div>
423
423
  ${this.hideHints?"":this.renderHints()}
424
- </div>`}};Je.styles=z(r0),Je.dependencies={"zn-icon":ne},c([F(".slash-menu__panel")],Je.prototype,"panel",2),c([F(".slash-menu__list")],Je.prototype,"list",2),c([d({type:Boolean,reflect:!0})],Je.prototype,"open",2),c([d({type:Array})],Je.prototype,"items",2),c([d()],Je.prototype,"query",2),c([d()],Je.prototype,"heading",2),c([d({attribute:"empty-text"})],Je.prototype,"emptyText",2),c([d({attribute:"max-items",type:Number})],Je.prototype,"maxItems",2),c([d({attribute:"hide-keys",type:Boolean})],Je.prototype,"hideKeys",2),c([d({attribute:"hide-hints",type:Boolean})],Je.prototype,"hideHints",2),c([d({attribute:"recent-key"})],Je.prototype,"recentKey",2),c([d({attribute:"max-recent",type:Number})],Je.prototype,"maxRecent",2),c([d({attribute:"recent-heading"})],Je.prototype,"recentHeading",2),c([d({attribute:!1})],Je.prototype,"anchor",2),c([d()],Je.prototype,"placement",2),c([d({type:Number})],Je.prototype,"distance",2),c([R()],Je.prototype,"activeIndex",2),c([R()],Je.prototype,"recentKeys",2);var p4=["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"];function h4(o){let i=parseFloat(o.lineHeight);if(!Number.isNaN(i))return i;let t=parseFloat(o.fontSize);return Number.isNaN(t)?16:t*1.2}function Ou(o,i){let t=o.ownerDocument,r=getComputedStyle(o),n=o.nodeName==="INPUT",a=t.createElement("div"),s=a.style,l=r;s.position="absolute",s.visibility="hidden",s.top="0",s.left="-9999px",s.whiteSpace=n?"pre":"pre-wrap",s.overflow="hidden",n||(s.wordWrap="break-word"),p4.forEach(f=>{let b=l[f];typeof b=="string"&&(s[f]=b)}),n&&(s.height="auto");let p=o.value.slice(0,i);a.textContent=n?p.replace(/\s/g,"\xA0"):p;let h=t.createElement("span");h.textContent=o.value.slice(i)||".",a.appendChild(h),t.body.appendChild(a);let m={top:h.offsetTop+(parseFloat(r.borderTopWidth)||0),left:h.offsetLeft+(parseFloat(r.borderLeftWidth)||0),height:h4(r)};return a.remove(),m}function Pu(o,{top:i,left:t,height:r}){let n=o.getBoundingClientRect(),a=Math.max(n.top,n.bottom-r),s=Math.min(Math.max(n.top+i-o.scrollTop,n.top),a),l=Math.min(Math.max(n.left+t-o.scrollLeft,n.left),n.right);return new DOMRect(l,s,1,r)}function JB(o,i){return Pu(o,Ou(o,i))}var u4=40,_o=class{constructor(i,t){this.caretAnchor={getBoundingClientRect:()=>this.caretRect()};this.field=null;this.menu=null;this.triggerIndex=-1;this.query="";this.dismissedIndex=-1;this.resolveToken=0;this.inserting=!1;this.isOpen=!1;this.listening=!1;this.handleInput=()=>this.detect();this.handleCaretMove=()=>this.detect();this.handleKeyUp=i=>{this.isOpen&&(i.key==="ArrowDown"||i.key==="ArrowUp")||(i.key.startsWith("Arrow")||i.key==="Home"||i.key==="End")&&this.detect()};this.handleBlur=()=>this.close();this.handleScroll=()=>{this.isOpen&&this.menu?.reposition()};this.handleKeyDown=i=>{if(!this.isOpen||i.isComposing)return;let t=()=>{i.preventDefault(),i.stopPropagation()};switch(i.key){case"Escape":t(),this.dismissedIndex=this.triggerIndex,this.close();return;case"ArrowDown":t(),this.menu?.moveActive(1);return;case"ArrowUp":t(),this.menu?.moveActive(-1);return;case"Enter":case"Tab":{if(i.shiftKey||i.metaKey||i.ctrlKey||i.altKey)return;let r=this.menu?.activeItem;if(!r){this.close();return}t(),this.select(r)}}};this.handleItemSelect=i=>{let{item:t}=i.detail;t&&this.select(t)};this.host=i,this.options=t,i.addController(this)}get open(){return this.isOpen}hostConnected(){this.addListeners()}hostDisconnected(){this.removeListeners()}attach(i){this.field===i&&this.listening||(this.removeListeners(),this.field=i,this.caretAnchor.contextElement=i,this.addListeners())}detach(){this.removeListeners(),this.field=null}addListeners(){let i=this.field;!i||this.listening||(i.addEventListener("keydown",this.handleKeyDown,{capture:!0}),i.addEventListener("input",this.handleInput),i.addEventListener("keyup",this.handleKeyUp),i.addEventListener("click",this.handleCaretMove),i.addEventListener("blur",this.handleBlur),i.addEventListener("scroll",this.handleScroll),this.listening=!0)}removeListeners(){let i=this.field;!i||!this.listening||(this.close(),i.removeEventListener("keydown",this.handleKeyDown,{capture:!0}),i.removeEventListener("input",this.handleInput),i.removeEventListener("keyup",this.handleKeyUp),i.removeEventListener("click",this.handleCaretMove),i.removeEventListener("blur",this.handleBlur),i.removeEventListener("scroll",this.handleScroll),this.listening=!1)}close(){this.resolveToken++,this.triggerIndex=-1,this.query="",this.isOpen&&(this.isOpen=!1,this.menu?.hide(),this.field?.setAttribute("aria-expanded","false"))}requestOpen(){this.dismissedIndex=-1,this.detect()}caretRect(){let i=this.field;if(!i)return new DOMRect;let t=this.triggerIndex>=0?this.triggerIndex:i.selectionStart??0,r=i.clientWidth,n=this.measured;return(!n||n.index!==t||n.width!==r||n.value!==i.value)&&(this.measured={value:i.value,index:t,width:r,coordinates:Ou(i,t)}),Pu(i,this.measured.coordinates)}detect(){if(this.inserting)return;let i=this.field;if(!i||i.disabled||i.readOnly){this.close();return}let t=this.options.trigger?.()||"/",r=i.selectionStart;if(!t||r===null||i.selectionEnd!==r){this.close();return}let n=i.value,a=n.lastIndexOf(t,Math.max(0,r-t.length));if(a===-1||a+t.length>r){this.close();return}let s=a>0?n.charAt(a-1):"";if(s!==""&&!/\s/.test(s)){this.close();return}let l=n.slice(a+t.length,r);if(l.length>u4||/[\r\n]/.test(l)){this.close();return}if(a===this.dismissedIndex){this.close();return}this.triggerIndex=a,this.query=l,this.resolve(l)}async resolve(i){let t=++this.resolveToken,r=[];try{r=await this.options.items(i)}catch(s){console.warn("slash menu items could not be resolved",s)}if(t!==this.resolveToken)return;let n=Hd(r,i);if(!n.length){this.close();return}let a=await this.options.menu();!a||t!==this.resolveToken||(a!==this.menu&&(this.menu?.removeEventListener(hs,this.handleItemSelect),a.addEventListener(hs,this.handleItemSelect),this.menu=a),a.anchor=this.caretAnchor,a.query=i,a.items=n,this.isOpen||(this.isOpen=!0,this.dismissedIndex=-1,a.show(),this.field?.setAttribute("aria-expanded","true"),this.field?.setAttribute("aria-haspopup","listbox")),await a.updateComplete,this.isOpen&&a.reposition())}select(i){let t=this.field,r=this.triggerIndex,n=t?.selectionStart??r,a=this.query,s=this.options.trigger?.()||"/";if(i.disabled||(this.close(),!t||r<0))return;let l=this.options.onSelect?.(i,a)===!1,p=l?"":i.value??"";t.value.slice(r,n)===s+a&&(this.replace(t,r,n,p,i),!l&&p&&this.options.onInsert?.(i,p))}replace(i,t,r,n,a){this.inserting=!0;try{i.focus({preventScroll:!0}),i.setSelectionRange(t,r);let s=!1;try{s=i.ownerDocument.execCommand("insertText",!1,n)}catch{s=!1}s||(i.setRangeText(n,t,r,"end"),i.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})));let l=Math.min(Math.max(a.caretOffset??n.length,0),n.length);i.setSelectionRange(t+l,t+l)}finally{this.inserting=!1}this.host.requestUpdate()}};var ka=Je;Je.define("zn-slash-menu");var mr=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.PROPERTY&&o.type!==lr.ATTRIBUTE&&o.type!==lr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!xd(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[i]){if(i===vt||i===B)return i;let t=o.element,r=o.name;if(o.type===lr.PROPERTY){if(i===t[r])return vt}else if(o.type===lr.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(r))return vt}else if(o.type===lr.ATTRIBUTE&&t.getAttribute(r)===i+"")return vt;return ns(o),i}});var Hu=new Set,us=new Map,Wn,Fu="ltr",Bu="en",i0=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(i0){let o=new MutationObserver(n0);Fu=document.documentElement.dir||"ltr",Bu=document.documentElement.lang||navigator.language,o.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function Bl(...o){o.map(i=>{let t=i.$code.toLowerCase();us.has(t)?us.set(t,Object.assign(Object.assign({},us.get(t)),i)):us.set(t,i),Wn||(Wn=i)}),n0()}function n0(){i0&&(Fu=document.documentElement.dir||"ltr",Bu=document.documentElement.lang||navigator.language),[...Hu.keys()].map(o=>{typeof o.requestUpdate=="function"&&o.requestUpdate()})}var Fd=class{constructor(i){this.host=i,this.host.addController(this)}hostConnected(){Hu.add(this.host)}hostDisconnected(){Hu.delete(this.host)}dir(){return`${this.host.dir||Fu}`.toLowerCase()}lang(){let i=`${this.host.lang||Bu}`.toLowerCase().replace(/_/g,"-");try{return new Intl.Locale(i),i}catch{return Wn?Wn.$code.toLowerCase():"en"}}getTranslationData(i){var t,r;let n;try{n=new Intl.Locale(i.replace(/_/g,"-"))}catch{return{locale:void 0,language:"",region:"",primary:void 0,secondary:void 0}}let a=n.language.toLowerCase(),s=(r=(t=n.region)===null||t===void 0?void 0:t.toLowerCase())!==null&&r!==void 0?r:"",l=us.get(`${a}-${s}`),p=us.get(a);return{locale:n,language:a,region:s,primary:l,secondary:p}}exists(i,t){var r;let{primary:n,secondary:a}=this.getTranslationData((r=t.lang)!==null&&r!==void 0?r:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[i]||a&&a[i]||t.includeFallback&&Wn&&Wn[i])}term(i,...t){let{primary:r,secondary:n}=this.getTranslationData(this.lang()),a;if(r&&r[i])a=r[i];else if(n&&n[i])a=n[i];else if(Wn&&Wn[i])a=Wn[i];else return console.error(`No translation found for: ${String(i)}`),String(i);return typeof a=="function"?a(...t):a}date(i,t){return i=new Date(i),new Intl.DateTimeFormat(this.lang(),t).format(i)}number(i,t){return i=Number(i),isNaN(i)?"":new Intl.NumberFormat(this.lang(),t).format(i)}relativeTime(i,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(i,t)}};var o0={$code:"en",$name:"English",$dir:"ltr",onChange:"onChange",showPassword:"Show password",hidePassword:"Hide password",clearEntry:"Clear entry",numOptionsSelected:o=>o===0?"No options selected":o===1?"1 option selected":`${o} options selected`,fileButtonText:"Choose a file",fileButtonTextMultiple:"Choose files",folderButtonText:"Choose a folder",fileDragDrop:"Drop files here to upload",folderDragDrop:"Drop folder here to upload",numFilesSelected:o=>o===0?"No files selected":o===1?"1 file selected":`${o} files selected`};Bl(o0);var a0=o0;var Ht=class extends Fd{};Bl(a0);var s0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:none}`;var fr=class extends k{constructor(){super(...arguments);this.label="";this.disabled=!1}toSlashMenuItem(){return{label:this.label||this.insertValue,value:this.insertValue,icon:this.icon,description:this.description,keywords:this.keywords,group:this.group,order:this.order,action:this.action,caretOffset:this.caretOffset,disabled:this.disabled}}get insertValue(){return this.value??(this.textContent??"").trim()}render(){return u`
424
+ </div>`}};Je.styles=z(r0),Je.dependencies={"zn-icon":ne},c([F(".slash-menu__panel")],Je.prototype,"panel",2),c([F(".slash-menu__list")],Je.prototype,"list",2),c([d({type:Boolean,reflect:!0})],Je.prototype,"open",2),c([d({type:Array})],Je.prototype,"items",2),c([d()],Je.prototype,"query",2),c([d()],Je.prototype,"heading",2),c([d({attribute:"empty-text"})],Je.prototype,"emptyText",2),c([d({attribute:"max-items",type:Number})],Je.prototype,"maxItems",2),c([d({attribute:"hide-keys",type:Boolean})],Je.prototype,"hideKeys",2),c([d({attribute:"hide-hints",type:Boolean})],Je.prototype,"hideHints",2),c([d({attribute:"recent-key"})],Je.prototype,"recentKey",2),c([d({attribute:"max-recent",type:Number})],Je.prototype,"maxRecent",2),c([d({attribute:"recent-heading"})],Je.prototype,"recentHeading",2),c([d({attribute:!1})],Je.prototype,"anchor",2),c([d()],Je.prototype,"placement",2),c([d({type:Number})],Je.prototype,"distance",2),c([R()],Je.prototype,"activeIndex",2),c([R()],Je.prototype,"recentKeys",2);var p4=["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"];function h4(o){let i=parseFloat(o.lineHeight);if(!Number.isNaN(i))return i;let t=parseFloat(o.fontSize);return Number.isNaN(t)?16:t*1.2}function Ou(o,i){let t=o.ownerDocument,r=getComputedStyle(o),n=o.nodeName==="INPUT",a=t.createElement("div"),s=a.style,l=r;s.position="absolute",s.visibility="hidden",s.top="0",s.left="-9999px",s.whiteSpace=n?"pre":"pre-wrap",s.overflow="hidden",n||(s.wordWrap="break-word"),p4.forEach(f=>{let b=l[f];typeof b=="string"&&(s[f]=b)}),n&&(s.height="auto");let p=o.value.slice(0,i);a.textContent=n?p.replace(/\s/g,"\xA0"):p;let h=t.createElement("span");h.textContent=o.value.slice(i)||".",a.appendChild(h),t.body.appendChild(a);let m={top:h.offsetTop+(parseFloat(r.borderTopWidth)||0),left:h.offsetLeft+(parseFloat(r.borderLeftWidth)||0),height:h4(r)};return a.remove(),m}function Pu(o,{top:i,left:t,height:r}){let n=o.getBoundingClientRect(),a=Math.max(n.top,n.bottom-r),s=Math.min(Math.max(n.top+i-o.scrollTop,n.top),a),l=Math.min(Math.max(n.left+t-o.scrollLeft,n.left),n.right);return new DOMRect(l,s,1,r)}function JB(o,i){return Pu(o,Ou(o,i))}var u4=40,_o=class{constructor(i,t){this.caretAnchor={getBoundingClientRect:()=>this.caretRect()};this.field=null;this.menu=null;this.triggerIndex=-1;this.query="";this.dismissedIndex=-1;this.resolveToken=0;this.inserting=!1;this.isOpen=!1;this.listening=!1;this.handleInput=()=>this.detect();this.handleCaretMove=()=>this.detect();this.handleKeyUp=i=>{this.isOpen&&(i.key==="ArrowDown"||i.key==="ArrowUp")||(i.key.startsWith("Arrow")||i.key==="Home"||i.key==="End")&&this.detect()};this.handleBlur=()=>this.close();this.handleScroll=()=>{this.isOpen&&this.menu?.reposition()};this.handleKeyDown=i=>{if(!this.isOpen||i.isComposing)return;let t=()=>{i.preventDefault(),i.stopPropagation()};switch(i.key){case"Escape":t(),this.dismissedIndex=this.triggerIndex,this.close();return;case"ArrowDown":t(),this.menu?.moveActive(1);return;case"ArrowUp":t(),this.menu?.moveActive(-1);return;case"Enter":case"Tab":{if(i.shiftKey||i.metaKey||i.ctrlKey||i.altKey)return;let r=this.menu?.activeItem;if(!r){this.close();return}t(),this.select(r)}}};this.handleItemSelect=i=>{let{item:t}=i.detail;t&&this.select(t)};this.host=i,this.options=t,i.addController(this)}get open(){return this.isOpen}hostConnected(){this.addListeners()}hostDisconnected(){this.removeListeners()}attach(i){this.field===i&&this.listening||(this.removeListeners(),this.field=i,this.caretAnchor.contextElement=i,this.addListeners())}detach(){this.removeListeners(),this.field=null}addListeners(){let i=this.field;!i||this.listening||(i.addEventListener("keydown",this.handleKeyDown,{capture:!0}),i.addEventListener("input",this.handleInput),i.addEventListener("keyup",this.handleKeyUp),i.addEventListener("click",this.handleCaretMove),i.addEventListener("blur",this.handleBlur),i.addEventListener("scroll",this.handleScroll),this.listening=!0)}removeListeners(){let i=this.field;!i||!this.listening||(this.close(),i.removeEventListener("keydown",this.handleKeyDown,{capture:!0}),i.removeEventListener("input",this.handleInput),i.removeEventListener("keyup",this.handleKeyUp),i.removeEventListener("click",this.handleCaretMove),i.removeEventListener("blur",this.handleBlur),i.removeEventListener("scroll",this.handleScroll),this.listening=!1)}close(){this.resolveToken++,this.triggerIndex=-1,this.query="",this.isOpen&&(this.isOpen=!1,this.menu?.hide(),this.field?.setAttribute("aria-expanded","false"))}requestOpen(){this.dismissedIndex=-1,this.detect()}caretRect(){let i=this.field;if(!i)return new DOMRect;let t=this.triggerIndex>=0?this.triggerIndex:i.selectionStart??0,r=i.clientWidth,n=this.measured;return(!n||n.index!==t||n.width!==r||n.value!==i.value)&&(this.measured={value:i.value,index:t,width:r,coordinates:Ou(i,t)}),Pu(i,this.measured.coordinates)}detect(){if(this.inserting)return;let i=this.field;if(!i||i.disabled||i.readOnly){this.close();return}let t=this.options.trigger?.()||"/",r=i.selectionStart;if(!t||r===null||i.selectionEnd!==r){this.close();return}let n=i.value,a=n.lastIndexOf(t,Math.max(0,r-t.length));if(a===-1||a+t.length>r){this.close();return}let s=a>0?n.charAt(a-1):"";if(s!==""&&!/\s/.test(s)){this.close();return}let l=n.slice(a+t.length,r);if(l.length>u4||/[\r\n]/.test(l)){this.close();return}if(a===this.dismissedIndex){this.close();return}this.triggerIndex=a,this.query=l,this.resolve(l)}async resolve(i){let t=++this.resolveToken,r=[];try{r=await this.options.items(i)}catch(s){console.warn("slash menu items could not be resolved",s)}if(t!==this.resolveToken)return;let n=Hd(r,i);if(!n.length){this.close();return}let a=await this.options.menu();!a||t!==this.resolveToken||(a!==this.menu&&(this.menu?.removeEventListener(hs,this.handleItemSelect),a.addEventListener(hs,this.handleItemSelect),this.menu=a),a.anchor=this.caretAnchor,a.query=i,a.items=n,this.isOpen||(this.isOpen=!0,this.dismissedIndex=-1,a.show(),this.field?.setAttribute("aria-expanded","true"),this.field?.setAttribute("aria-haspopup","listbox")),await a.updateComplete,this.isOpen&&a.reposition())}select(i){let t=this.field,r=this.triggerIndex,n=t?.selectionStart??r,a=this.query,s=this.options.trigger?.()||"/";if(i.disabled||(this.close(),!t||r<0))return;let l=this.options.onSelect?.(i,a)===!1,p=l?"":i.value??"";t.value.slice(r,n)===s+a&&(this.replace(t,r,n,p,i),!l&&p&&this.options.onInsert?.(i,p))}replace(i,t,r,n,a){this.inserting=!0;try{i.focus({preventScroll:!0}),i.setSelectionRange(t,r);let s=!1;try{s=i.ownerDocument.execCommand("insertText",!1,n)}catch{s=!1}s||(i.setRangeText(n,t,r,"end"),i.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})));let l=Math.min(Math.max(a.caretOffset??n.length,0),n.length);i.setSelectionRange(t+l,t+l)}finally{this.inserting=!1}this.host.requestUpdate()}};var Ca=Je;Je.define("zn-slash-menu");var mr=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.PROPERTY&&o.type!==lr.ATTRIBUTE&&o.type!==lr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!xd(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[i]){if(i===vt||i===B)return i;let t=o.element,r=o.name;if(o.type===lr.PROPERTY){if(i===t[r])return vt}else if(o.type===lr.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(r))return vt}else if(o.type===lr.ATTRIBUTE&&t.getAttribute(r)===i+"")return vt;return ns(o),i}});var Hu=new Set,us=new Map,Wn,Fu="ltr",Bu="en",i0=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(i0){let o=new MutationObserver(n0);Fu=document.documentElement.dir||"ltr",Bu=document.documentElement.lang||navigator.language,o.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function Bl(...o){o.map(i=>{let t=i.$code.toLowerCase();us.has(t)?us.set(t,Object.assign(Object.assign({},us.get(t)),i)):us.set(t,i),Wn||(Wn=i)}),n0()}function n0(){i0&&(Fu=document.documentElement.dir||"ltr",Bu=document.documentElement.lang||navigator.language),[...Hu.keys()].map(o=>{typeof o.requestUpdate=="function"&&o.requestUpdate()})}var Fd=class{constructor(i){this.host=i,this.host.addController(this)}hostConnected(){Hu.add(this.host)}hostDisconnected(){Hu.delete(this.host)}dir(){return`${this.host.dir||Fu}`.toLowerCase()}lang(){let i=`${this.host.lang||Bu}`.toLowerCase().replace(/_/g,"-");try{return new Intl.Locale(i),i}catch{return Wn?Wn.$code.toLowerCase():"en"}}getTranslationData(i){var t,r;let n;try{n=new Intl.Locale(i.replace(/_/g,"-"))}catch{return{locale:void 0,language:"",region:"",primary:void 0,secondary:void 0}}let a=n.language.toLowerCase(),s=(r=(t=n.region)===null||t===void 0?void 0:t.toLowerCase())!==null&&r!==void 0?r:"",l=us.get(`${a}-${s}`),p=us.get(a);return{locale:n,language:a,region:s,primary:l,secondary:p}}exists(i,t){var r;let{primary:n,secondary:a}=this.getTranslationData((r=t.lang)!==null&&r!==void 0?r:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[i]||a&&a[i]||t.includeFallback&&Wn&&Wn[i])}term(i,...t){let{primary:r,secondary:n}=this.getTranslationData(this.lang()),a;if(r&&r[i])a=r[i];else if(n&&n[i])a=n[i];else if(Wn&&Wn[i])a=Wn[i];else return console.error(`No translation found for: ${String(i)}`),String(i);return typeof a=="function"?a(...t):a}date(i,t){return i=new Date(i),new Intl.DateTimeFormat(this.lang(),t).format(i)}number(i,t){return i=Number(i),isNaN(i)?"":new Intl.NumberFormat(this.lang(),t).format(i)}relativeTime(i,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(i,t)}};var o0={$code:"en",$name:"English",$dir:"ltr",onChange:"onChange",showPassword:"Show password",hidePassword:"Hide password",clearEntry:"Clear entry",numOptionsSelected:o=>o===0?"No options selected":o===1?"1 option selected":`${o} options selected`,fileButtonText:"Choose a file",fileButtonTextMultiple:"Choose files",folderButtonText:"Choose a folder",fileDragDrop:"Drop files here to upload",folderDragDrop:"Drop folder here to upload",numFilesSelected:o=>o===0?"No files selected":o===1?"1 file selected":`${o} files selected`};Bl(o0);var a0=o0;var Ht=class extends Fd{};Bl(a0);var s0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:none}`;var fr=class extends k{constructor(){super(...arguments);this.label="";this.disabled=!1}toSlashMenuItem(){return{label:this.label||this.insertValue,value:this.insertValue,icon:this.icon,description:this.description,keywords:this.keywords,group:this.group,order:this.order,action:this.action,caretOffset:this.caretOffset,disabled:this.disabled}}get insertValue(){return this.value??(this.textContent??"").trim()}render(){return u`
425
425
  <slot></slot>`}};fr.styles=z(s0),c([d()],fr.prototype,"label",2),c([d()],fr.prototype,"value",2),c([d()],fr.prototype,"icon",2),c([d()],fr.prototype,"description",2),c([d()],fr.prototype,"keywords",2),c([d()],fr.prototype,"group",2),c([d({type:Number})],fr.prototype,"order",2),c([d({attribute:"caret-offset",type:Number})],fr.prototype,"caretOffset",2),c([d()],fr.prototype,"action",2),c([d({type:Boolean,reflect:!0})],fr.prototype,"disabled",2);var Vl=fr;fr.define("zn-slash-item");var Se=_`.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper,.form-control--radio-contained-wrapper{height:100%}`;var l0=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.input{flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;width:100%;font-family:var(--zn-input-font-family),sans-serif;font-weight:var(--zn-input-font-weight);letter-spacing:var(--zn-input-letter-spacing);vertical-align:middle;overflow:hidden;cursor:text;transition:var(--zn-transition-fast) color,var(--zn-transition-fast) border,var(--zn-transition-fast) background-color}.input--standard{background-color:var(--zn-input-background-color);border:solid var(--zn-input-border-width) var(--zn-input-border-color)}.input--standard:hover:not(.input--disabled,.input--filled){background-color:var(--zn-input-background-color-hover);border-color:var(--zn-input-border-color-hover)}.input--filled:hover:not(.input--disabled){background-color:var(--zn-color-neutral-50);border-color:var(--zn-input-border-color-hover)}.input--standard.input--focused:not(.input--disabled){background-color:var(--zn-input-background-color-focus);border-color:var(--zn-input-border-color-focus)}.input--standard.input--focused:not(.input--disabled):not(.input--x-small){box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled).input--x-small{box-shadow:0 0 0 var(--zn-focus-ring-width-x-small) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled) .input__control{color:var(--zn-input-color-focus)}.input--standard.input--disabled{background-color:var(--zn-input-background-color-disabled);border-color:var(--zn-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.input--standard.input--filled{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.input--standard.input--disabled .input__control{color:var(--zn-input-color-disabled)}.input--standard.input--disabled .input__control::-moz-placeholder{color:var(--zn-input-placeholder-color-disabled)}.input--standard.input--disabled .input__control::placeholder{color:var(--zn-input-placeholder-color-disabled)}.input__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;min-width:0;height:100%;color:var(--zn-input-color);border:none;background:inherit;box-shadow:none;padding:0;margin:0;cursor:inherit;-webkit-appearance:none;line-height:var(--zn-input-line-height)}input[type=text].input__control[data-color-input]{font-family:var(--zn-font-mono,"SFMono-Regular","Consolas","Liberation Mono","Menlo",monospace);font-size:0.9em}.input__control::-webkit-search-decoration,.input__control::-webkit-search-cancel-button,.input__control::-webkit-search-results-button,.input__control::-webkit-search-results-decoration{-webkit-appearance:none}.input__control:-webkit-autofill,.input__control:-webkit-autofill:hover,.input__control:-webkit-autofill:focus,.input__control:-webkit-autofill:active{box-shadow:0 0 0 var(--zn-input-height-large) var(--zn-input-background-color) inset !important;-webkit-text-fill-color:var(--zn-input-color);caret-color:var(--zn-input-color)}.input__control::-moz-placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input__control::placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input:hover:not(.input--disabled) .input__control{color:var(--zn-input-color-hover)}.input__control:focus{outline:none}.input__prefix,.input__suffix{display:inline-flex;flex:0 0 auto;align-items:center;align-self:stretch;height:100%;cursor:default;color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix zn-icon,.input__suffix zn-icon{--icon-size:var(--zn-font-size-x-large);color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix ::slotted(zn-icon),.input__suffix ::slotted(zn-icon){--icon-size:var(--zn-font-size-medium);font-size:var(--zn-font-size-medium);color:var(--zn-input-icon-color)}.input--x-small{border-radius:var(--zn-input-border-radius-x-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-x-small)}.input--x-small .input__control{height:calc(var(--zn-input-height-x-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--x-small .input__clear,.input--x-small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-x-small) * 2)}.input--x-small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-spacing-x-small)}.input--x-small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-x-small)}.input--x-small .input__suffix ::slotted(zn-button),.input--x-small .input__prefix ::slotted(zn-button),.input--x-small .input__suffix ::slotted(zn-checkbox),.input--x-small .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--small{border-radius:var(--zn-input-border-radius-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-small)}.input--small .input__control{height:calc(var(--zn-input-height-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--small .input__clear,.input--small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-small) * 2)}.input--small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(zn-button),.input--small .input__prefix ::slotted(zn-button),.input--small .input__suffix ::slotted(zn-checkbox),.input--small .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--medium{border-radius:var(--zn-input-border-radius-medium);font-size:var(--zn-input-font-size-medium);height:var(--zn-input-height-medium)}.input--medium .input__control{height:calc(var(--zn-input-height-medium) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small) 0 var(--zn-spacing-small)}.input--medium .input__clear,.input--medium .input__password-toggle{width:calc(1em + var(--zn-input-spacing-medium) * 2)}.input--medium .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-spacing-small)}.input--medium .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-spacing-small)}.input--medium .input__suffix ::slotted(zn-button),.input--medium .input__prefix ::slotted(zn-button),.input--medium .input__suffix ::slotted(zn-checkbox),.input--medium .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input__suffix ::slotted(zn-button),.input__prefix ::slotted(zn-button){--zn-button-border-color:rgb(var(--zn-color-border));--zn-button-border-width:0}.input__suffix ::slotted(zn-button){--zn-button-border-left-width:1px}.input__prefix ::slotted(zn-button){--zn-button-border-right-width:1px}.input--large{border-radius:var(--zn-input-border-radius-large);font-size:var(--zn-input-font-size-large);height:var(--zn-input-height-large)}.input--large .input__control{height:calc(var(--zn-input-height-large) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-medium) 0 var(--zn-spacing-small)}.input--large .input__clear,.input--large .input__password-toggle{width:calc(1em + var(--zn-input-spacing-large) * 2)}.input--large .input__suffix ::slotted(zn-button),.input--large .input__prefix ::slotted(zn-button),.input--large .input__suffix ::slotted(zn-checkbox),.input--large .input__prefix ::slotted(zn-checkbox){margin-inline-end:0;margin-inline-start:0}.input--pill.input--x-small{border-radius:var(--zn-input-height-small);padding:0 var(--zn-spacing-x-small)}.input--pill.input--small{border-radius:var(--zn-input-height-small);padding:0 var(--zn-spacing-x-small)}.input--pill.input--medium{border-radius:var(--zn-input-height-medium);padding:0 var(--zn-spacing-x-small)}.input--pill.input--large{border-radius:var(--zn-input-height-large);padding:0 var(--zn-spacing-x-small)}.input__clear:not(.input__clear--visible){visibility:hidden}.input__clear,.input__password-toggle{display:inline-flex;align-items:center;justify-content:center;font-size:var(--zn-font-size-large);color:var(--zn-input-icon-color);border:none;background:none;padding:0;transition:var(--zn-transition-fast) color;cursor:pointer}.input__clear zn-icon,.input__password-toggle zn-icon{--icon-size:var(--zn-font-size-large)}.input__clear:hover,.input__password-toggle:hover{color:var(--zn-input-icon-color-hover)}.input__clear:focus,.input__password-toggle:focus{outline:none}.input--empty .input__clear{visibility:hidden}::-ms-reveal{display:none}.input--no-spin-buttons input[type=number]::-webkit-outer-spin-button,.input--no-spin-buttons input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}.input--no-spin-buttons input[type=number]{-moz-appearance:textfield}input[type=date]::-webkit-calendar-picker-indicator{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="14" width="12.25" viewBox="0 0 448 512"><path fill="%236d7176" d="M128 0c13.3 0 24 10.7 24 24V64H296V24c0-13.3 10.7-24 24-24s24 10.7 24 24V64h40c35.3 0 64 28.7 64 64v16 48V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V192 144 128C0 92.7 28.7 64 64 64h40V24c0-13.3 10.7-24 24-24zM400 192H48V448c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V192zM112 256h96c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16H112c-8.8 0-16-7.2-16-16V272c0-8.8 7.2-16 16-16z"/></svg>')}.input__color-swatch{display:inline-flex;align-self:stretch;border:none;border-inline-start:solid var(--zn-input-border-width) var(--zn-input-border-color);border-radius:0;background-color:var(--zn-color-neutral-0);cursor:pointer;overflow:hidden;position:relative;flex-shrink:0;margin:0}.input__color-swatch:hover .input__color-swatch-inner{filter:brightness(0.95)}.input__color-swatch-inner{width:100%;height:100%;background-color:var(--color-value,#000000);transition:var(--zn-transition-fast) filter}.input--x-small .input__color-swatch{width:calc(var(--zn-input-height-x-small) * 1.2)}.input--small .input__color-swatch{width:calc(var(--zn-input-height-small) * 1.2)}.input--medium .input__color-swatch{width:calc(var(--zn-input-height-medium) * 1.2)}.input--large .input__color-swatch{width:calc(var(--zn-input-height-large) * 1.2)}:host([type=range]) .form-control--has-label .form-control__label,:host([type=range]) .form-control__label-context-note{margin-bottom:0}:host([type=range]) .form-control-input{margin-top:0}.input--standard.input--range{--zn-range-track-height:6px;--zn-range-track-color:var(--zn-color-neutral-200);--zn-range-thumb-size:18px;--zn-range-thumb-color:var(--zn-color-primary-600);--zn-range-thumb-ring-width:4px;align-items:center;height:var(--zn-range-thumb-size);padding:0;overflow:visible;cursor:pointer}.input--standard.input--range,.input--standard.input--range:hover,.input--standard.input--range.input--focused,.input--standard.input--range.input--disabled{border:none;background:none;box-shadow:none}.input--standard.input--range.input--x-small{--zn-range-track-height:4px;--zn-range-thumb-size:14px;--zn-range-thumb-ring-width:3px}.input--standard.input--range.input--small{--zn-range-track-height:5px;--zn-range-thumb-size:16px;--zn-range-thumb-ring-width:3px}.input--standard.input--range.input--large{--zn-range-track-height:7px;--zn-range-thumb-size:20px}.input--range .input__control{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:var(--zn-range-thumb-size);padding:0;margin:0;background:none;cursor:inherit}.input--range .input__control::-webkit-slider-runnable-track{height:var(--zn-range-track-height);border-radius:calc(var(--zn-range-track-height) / 2);background-color:var(--zn-range-track-color)}.input--range .input__control::-moz-range-track{height:var(--zn-range-track-height);border-radius:calc(var(--zn-range-track-height) / 2);background-color:var(--zn-range-track-color)}.input--range .input__control::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:var(--zn-range-thumb-size);height:var(--zn-range-thumb-size);margin-top:calc((var(--zn-range-track-height) - var(--zn-range-thumb-size)) / 2);border:var(--zn-range-thumb-ring-width) solid var(--zn-color-neutral-0);border-radius:50%;background-color:var(--zn-range-thumb-color);box-shadow:0 0 0 1px var(--zn-input-border-color);-webkit-transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color;transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color}.input--range .input__control::-moz-range-thumb{width:var(--zn-range-thumb-size);height:var(--zn-range-thumb-size);box-sizing:border-box;border:var(--zn-range-thumb-ring-width) solid var(--zn-color-neutral-0);border-radius:50%;background-color:var(--zn-range-thumb-color);box-shadow:0 0 0 1px var(--zn-input-border-color);-moz-transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color;transition:var(--zn-transition-fast) box-shadow,var(--zn-transition-fast) background-color}.input--range:hover:not(.input--disabled) .input__control::-webkit-slider-thumb{background-color:var(--zn-color-primary-500);box-shadow:0 0 0 1px var(--zn-input-border-color-hover)}.input--range:hover:not(.input--disabled) .input__control::-moz-range-thumb{background-color:var(--zn-color-primary-500);box-shadow:0 0 0 1px var(--zn-input-border-color-hover)}.input--range .input__control:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--range .input__control:focus-visible::-moz-range-thumb{box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input__color-picker{position:absolute;opacity:0;width:0;height:0;padding:0;margin:0;pointer-events:none;border:none;visibility:hidden}`;var ee=class extends k{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-blur","zn-input"]});this.hasSlotController=new Y(this,"help-text","label","label-tooltip");this.localize=new Ht(this);this.slashController=new _o(this,{menu:()=>this.mountSlashMenu(),items:t=>this.resolveSlashItems(t),trigger:()=>this.slashTrigger,onSelect:(t,r)=>!this.emit("zn-slash-select",{detail:{item:t,query:r}}).defaultPrevented,onInsert:(t,r)=>this.emit("zn-slash-insert",{detail:{item:t,value:r}})});this.hasFocus=!1;this.hasSlashMenu=!1;this.isUserTyping=!1;this.title="";this.__numberInput=Object.assign(document.createElement("input"),{type:"number"});this.__dateInput=Object.assign(document.createElement("input"),{type:"date"});this.type="text";this.name="";this.value="";this.defaultValue="";this.size="medium";this.pill=!1;this.label="";this.labelTooltip="";this.contextNote="";this.helpText="";this.clearable=!1;this.optionalIcon=!1;this.disabled=!1;this.filled=!1;this.placeholder="";this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.noSpinButtons=!1;this.colorFormat="hex";this.valueSuffix="";this.required=!1;this.spellcheck=!0;this.slashItems=[];this.slashPreset="";this.slashTrigger="/";this.slashHeading="Insert";this.slashHideKeys=!1;this.slashRecentKey="";this.triggerSubmit=!1}get valueAsDate(){return this.__dateInput.type=this.type,this.__dateInput.value=this.value,this.input?.valueAsDate||this.__dateInput.valueAsDate}set valueAsDate(t){this.__dateInput.type=this.type,this.__dateInput.valueAsDate=t,this.value=this.__dateInput.value}get valueAsNumber(){return this.__numberInput.value=this.value,this.input?.valueAsNumber||this.__numberInput.valueAsNumber}set valueAsNumber(t){this.__numberInput.valueAsNumber=t,this.value=this.__numberInput.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}validateMinMax(){this.type!=="number"&&this.type!=="date"||(typeof this.min<"u"&&parseInt(this.value)<parseInt(this.min)&&(this.value=this.min.toString()),typeof this.max<"u"&&parseInt(this.value)>parseInt(this.max)&&(this.value=this.max.toString()))}hexToRgb(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16),a=parseInt(r[2],16),s=parseInt(r[3],16);return`rgb(${n}, ${a}, ${s})`}rgbToHex(t){let r=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!r)return"";let n=parseInt(r[1]).toString(16).padStart(2,"0"),a=parseInt(r[2]).toString(16).padStart(2,"0"),s=parseInt(r[3]).toString(16).padStart(2,"0");return`#${n}${a}${s}`}hexToOklch(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16)/255,a=parseInt(r[2],16)/255,s=parseInt(r[3],16)/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;let l=n*.4124564+a*.3575761+s*.1804375,p=n*.2126729+a*.7151522+s*.072175,h=n*.0193339+a*.119192+s*.9503041,m=l/.95047,f=p/1,b=h/1.08883,g=m>.008856?Math.pow(m,1/3):7.787*m+16/116,v=f>.008856?Math.pow(f,1/3):7.787*f+16/116,y=b>.008856?Math.pow(b,1/3):7.787*b+16/116,S=116*v-16,T=500*(g-v),N=200*(v-y),U=Math.sqrt(T*T+N*N),I=Math.atan2(N,T)*180/Math.PI;I<0&&(I+=360);let C=(S/100).toFixed(3),$=(U/150).toFixed(3),L=I.toFixed(1);return`oklch(${C} ${$} ${L})`}oklchToHex(t){let r=t.match(/^oklch\(([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\)$/);if(!r)return"";let n=parseFloat(r[1])*100,a=parseFloat(r[2])*150,s=parseFloat(r[3]),l=a*Math.cos(s*Math.PI/180),p=a*Math.sin(s*Math.PI/180),h=(n+16)/116,m=l/500+h,f=h-p/200,b=m>.206897?Math.pow(m,3):(m-16/116)/7.787,g=h>.206897?Math.pow(h,3):(h-16/116)/7.787,v=f>.206897?Math.pow(f,3):(f-16/116)/7.787,y=b*.95047,S=g*1,T=v*1.08883,N=y*3.2404542+S*-1.5371385+T*-.4985314,U=y*-.969266+S*1.8760108+T*.041556,I=y*.0556434+S*-.2040259+T*1.0572252;N=N>.0031308?1.055*Math.pow(N,1/2.4)-.055:12.92*N,U=U>.0031308?1.055*Math.pow(U,1/2.4)-.055:12.92*U,I=I>.0031308?1.055*Math.pow(I,1/2.4)-.055:12.92*I,N=Math.max(0,Math.min(1,N)),U=Math.max(0,Math.min(1,U)),I=Math.max(0,Math.min(1,I));let C=Math.round(N*255).toString(16).padStart(2,"0"),$=Math.round(U*255).toString(16).padStart(2,"0"),L=Math.round(I*255).toString(16).padStart(2,"0");return`#${C}${$}${L}`}hexToHsl(t){let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!r)return"";let n=parseInt(r[1],16)/255,a=parseInt(r[2],16)/255,s=parseInt(r[3],16)/255,l=Math.max(n,a,s),p=Math.min(n,a,s),h=(l+p)/2,m=0,f=0;if(l!==p){let b=l-p;switch(f=h>.5?b/(2-l-p):b/(l+p),l){case n:m=((a-s)/b+(a<s?6:0))/6;break;case a:m=((s-n)/b+2)/6;break;case s:m=((n-a)/b+4)/6;break}}return`hsl(${Math.round(m*360)}, ${Math.round(f*100)}%, ${Math.round(h*100)}%)`}hslToHex(t){let r=t.match(/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)$/);if(!r)return"";let n=parseInt(r[1])/360,a=parseInt(r[2])/100,s=parseInt(r[3])/100,l,p,h;if(a===0)l=p=h=s;else{let g=(S,T,N)=>(N<0&&(N+=1),N>1&&(N-=1),N<.16666666666666666?S+(T-S)*6*N:N<.5?T:N<.6666666666666666?S+(T-S)*(.6666666666666666-N)*6:S),v=s<.5?s*(1+a):s+a-s*a,y=2*s-v;l=g(y,v,n+1/3),p=g(y,v,n),h=g(y,v,n-1/3)}let m=Math.round(l*255).toString(16).padStart(2,"0"),f=Math.round(p*255).toString(16).padStart(2,"0"),b=Math.round(h*255).toString(16).padStart(2,"0");return`#${m}${f}${b}`}convertToHex(t){return t?t.startsWith("#")?t:t.startsWith("rgb")?this.rgbToHex(t):t.startsWith("hsl")?this.hslToHex(t):t.startsWith("oklch")?this.oklchToHex(t):t:"#000000"}convertFromHex(t){return t?this.colorFormat==="hex"?t:this.colorFormat==="rgb"?this.hexToRgb(t):this.colorFormat==="hsl"?this.hexToHsl(t):this.colorFormat==="oklch"?this.hexToOklch(t):t:""}handleBlur(){if(this.hasFocus=!1,this.isUserTyping=!1,this.validateMinMax(),this.type==="color"&&this.value){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);r!==this.value&&(this.value=r)}}this.emit("zn-blur")}handleChange(){if(this.type==="currency"&&this.input.value)this.value=parseFloat(this.input.value).toFixed(2);else if(this.type==="color"){let t=this.input.value.trim();if(t==="")this.value="";else if(this.colorFormat==="hex"){let r=t;r&&!r.startsWith("#")&&(r="#"+r),/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(r)&&(this.value=r.toLowerCase())}else this.colorFormat==="rgb"?/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(t)&&(this.value=t):this.colorFormat==="hsl"?/^hsl\(\s*\d+\s*,\s*\d+%\s*,\s*\d+%\s*\)$/.test(t)&&(this.value=t):this.colorFormat==="oklch"&&/^oklch\(\s*[0-9.]+\s+[0-9.]+\s+[0-9.]+\s*\)$/.test(t)&&(this.value=t)}else this.value=this.input.value;this.emit("zn-change")}handleClearClick(t){this.value="",this.emit("zn-clear"),this.emit("zn-input"),this.emit("zn-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("zn-focus")}handleInput(){this.isUserTyping=!0,this.type==="color"?this.value=this.input.value:this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleKeyDown(t){if(this.slashController.open)return;if(t.key==="Escape"){this.input.blur(),t.stopPropagation();return}let r=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;if(t.key==="Enter"&&!r&&!t.defaultPrevented&&!t.isComposing){let n=this.formControlController.getForm();if(!this.triggerSubmit&&(n?.hasAttribute("enter-navigation")||n?.hasAttribute("data-enter-navigation")))return;this.formControlController.submit()}}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleColorSwatchClick(){this.type==="color"&&this.colorPicker&&this.colorPicker.click()}handleColorPickerChange(){if(this.type==="color"&&this.colorPicker){let t=this.colorPicker.value;this.value=this.convertFromHex(t),this.emit("zn-change"),this.emit("zn-input")}}focusInput(t){if(this.hasFocus)return;let r=t.target;r.tagName==="ZN-CHECKBOX"&&(r.slot==="prefix"||r.closest('[slot="prefix"]'))||(r.classList.contains("input__prefix")||r.slot==="prefix"||r.hasAttribute("part")&&r.getAttribute("part")==="base")&&(this.handleFocus(),this.input.focus())}firstUpdated(){this.type==="range"&&this.value===""&&(this.value=this.input.value),this.slashController.attach(this.input)}async resolveSlashItems(t=""){let r=[...Pd(this.slashPreset),...this.slashItems,...this.slottedSlashItems()],n=await this.slashItemsProvider?.(t);return n?[...r,...n]:r}async showSlashMenu(){this.focus();let t=this.input.selectionStart??this.input.value.length;this.input.value.slice(t-this.slashTrigger.length,t)!==this.slashTrigger&&this.setRangeText(this.slashTrigger,t,t,"end"),await this.updateComplete,this.slashController.requestOpen()}hideSlashMenu(){this.slashController.close()}slottedSlashItems(){return[...this.querySelectorAll("zn-slash-item")].map(r=>{if(typeof r.toSlashMenuItem=="function")return r.toSlashMenuItem();let n=r.getAttribute("value")??(r.textContent??"").trim(),a=r.getAttribute("order"),s=r.getAttribute("caret-offset");return{label:r.getAttribute("label")??n,value:n,icon:r.getAttribute("icon")??void 0,description:r.getAttribute("description")??void 0,keywords:r.getAttribute("keywords")??void 0,group:r.getAttribute("group")??void 0,action:r.getAttribute("action")??void 0,order:a===null?void 0:Number(a),caretOffset:s===null?void 0:Number(s),disabled:r.hasAttribute("disabled")}})}async mountSlashMenu(){let t=this.querySelector("zn-slash-menu");return t||(this.hasSlashMenu||(this.hasSlashMenu=!0,await this.updateComplete),this.slashMenuElement)}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){if(await this.updateComplete,this.type==="color"&&this.value&&!this.isUserTyping){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);if(r!==this.value){this.value=r,this.emit("zn-change");return}}}this.formControlController.updateValidity(),this.type==="color"&&this.colorPicker&&(this.colorPicker.value=this.convertToHex(this.value)||"#000000")}async handleColorFormatChange(){if(this.type==="color"&&this.value){let t=this.convertToHex(this.value);if(t){let r=this.convertFromHex(t);r!==this.value&&(this.value=r,this.emit("zn-change"))}}}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,r,n="none"){this.input.setSelectionRange(t,r,n)}setRangeText(t,r,n,a="preserve"){let s=r??this.input.selectionStart,l=n??this.input.selectionEnd;this.input.setRangeText(t,s,l,a),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.type==="range",l=this.label?!0:t,p=this.labelTooltip?!0:r,h=this.contextNote||s?!0:n,m=this.helpText?!0:a,f=this.clearable&&!this.disabled&&!this.readonly,b=this.optionalIcon,g=f&&(typeof this.value=="number"||this.value.length>0);return u`
426
426
  <div part="form-control"
427
427
  class="${M({"form-control":!0,"form-control--x-small":this.size==="x-small","form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":l,"form-control--has-label-tooltip":p,"form-control--has-context-note":h,"form-control--has-help-text":m})}">
@@ -561,7 +561,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
561
561
  <slot name="help-text">${this.helpText}</slot>
562
562
  </div>
563
563
 
564
- </div>`}};ee.styles=[z(Se),z(l0)],ee.dependencies={"zn-icon":ne,"zn-slash-item":Vl,"zn-slash-menu":ka,"zn-tooltip":gi},c([F(".input__control")],ee.prototype,"input",2),c([F(".input__color-picker")],ee.prototype,"colorPicker",2),c([F("zn-slash-menu")],ee.prototype,"slashMenuElement",2),c([R()],ee.prototype,"hasFocus",2),c([R()],ee.prototype,"hasSlashMenu",2),c([R()],ee.prototype,"isUserTyping",2),c([d()],ee.prototype,"title",2),c([d({reflect:!0})],ee.prototype,"type",2),c([d()],ee.prototype,"name",2),c([d()],ee.prototype,"value",2),c([Ce()],ee.prototype,"defaultValue",2),c([d({reflect:!0})],ee.prototype,"size",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"pill",2),c([d()],ee.prototype,"label",2),c([d({attribute:"label-tooltip"})],ee.prototype,"labelTooltip",2),c([d({attribute:"context-note"})],ee.prototype,"contextNote",2),c([d({attribute:"help-text"})],ee.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"clearable",2),c([d({attribute:"optional-icon",type:Boolean})],ee.prototype,"optionalIcon",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"filled",2),c([d()],ee.prototype,"placeholder",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"readonly",2),c([d({attribute:"password-toggle",type:Boolean})],ee.prototype,"passwordToggle",2),c([d({attribute:"password-visible",type:Boolean})],ee.prototype,"passwordVisible",2),c([d({attribute:"no-spin-buttons",type:Boolean})],ee.prototype,"noSpinButtons",2),c([d({attribute:"color-format"})],ee.prototype,"colorFormat",2),c([d({attribute:"value-suffix"})],ee.prototype,"valueSuffix",2),c([d({reflect:!0})],ee.prototype,"form",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"required",2),c([d()],ee.prototype,"pattern",2),c([d({type:Number})],ee.prototype,"minlength",2),c([d({type:Number})],ee.prototype,"maxlength",2),c([d()],ee.prototype,"min",2),c([d()],ee.prototype,"max",2),c([d()],ee.prototype,"step",2),c([d()],ee.prototype,"autocapitalize",2),c([d()],ee.prototype,"autocorrect",2),c([d()],ee.prototype,"autocomplete",2),c([d({type:Boolean})],ee.prototype,"autofocus",2),c([d()],ee.prototype,"enterkeyhint",2),c([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],ee.prototype,"spellcheck",2),c([d()],ee.prototype,"inputmode",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],ee.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],ee.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],ee.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],ee.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],ee.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],ee.prototype,"slashRecentKey",2),c([d({attribute:!1})],ee.prototype,"slashItemsProvider",2),c([d({type:Boolean,attribute:"trigger-submit"})],ee.prototype,"triggerSubmit",2),c([K("disabled",{waitUntilFirstUpdate:!0})],ee.prototype,"handleDisabledChange",1),c([K("step",{waitUntilFirstUpdate:!0})],ee.prototype,"handleStepChange",1),c([K("value",{waitUntilFirstUpdate:!0})],ee.prototype,"handleValueChange",1),c([K("colorFormat",{waitUntilFirstUpdate:!0})],ee.prototype,"handleColorFormatChange",1);var nt=ee;ee.define("zn-input");var c0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;-moz-user-select:none;user-select:none;-webkit-user-select:none}:host([hidden]){display:none !important}:host(:focus){outline:none}.option{position:relative;display:flex;align-items:center;font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);line-height:var(--zn-line-height-normal);letter-spacing:var(--zn-letter-spacing-normal);color:var(--zn-input-color);padding:var(--zn-spacing-x-small) var(--zn-spacing-small);transition:var(--zn-transition-fast) fill;cursor:pointer}.option--selected{background-color:var(--zn-color-primary-200)}.option--hover:not(.option--disabled),.option--current,.option--current.option--disabled{background-color:var(--zn-color-primary-100);color:var(--zn-input-color);opacity:1}.option--disabled{outline:none;opacity:0.5;cursor:not-allowed}.option__label{flex:1 1 auto;display:inline-block;font-size:var(--zn-font-size-small);line-height:var(--ts-leading-5)}.option .option__check{flex:0 0 auto;display:flex;align-items:center;justify-content:center;visibility:hidden;padding-inline-start:0.375rem;padding-inline-end:0.375rem}.option--selected .option__check{visibility:visible}.option__prefix,.option__suffix{flex:0 0 auto;display:flex;align-items:center}.option__prefix::slotted(*){margin-inline-end:var(--zn-spacing-small);font-size:var(--zn-font-size-large)}.option__suffix::slotted(*){margin-inline-start:var(--zn-spacing-small)}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .option{outline:dashed 1px SelectedItem;outline-offset:-1px}}`;var Cr=class extends k{constructor(){super(...arguments);this.localize=new Ht(this);this.multiple=!1;this.current=!1;this.hasHover=!1;this.value="";this.disabled=!1;this.selected=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel>"u"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}getTextLabel(){let t=this.childNodes,r="";return[...t].forEach(n=>{n.nodeType===Node.ELEMENT_NODE&&(n.hasAttribute("slot")||(r+=n.textContent)),n.nodeType===Node.TEXT_NODE&&(r+=n.textContent)}),r.trim()}render(){return u`
564
+ </div>`}};ee.styles=[z(Se),z(l0)],ee.dependencies={"zn-icon":ne,"zn-slash-item":Vl,"zn-slash-menu":Ca,"zn-tooltip":gi},c([F(".input__control")],ee.prototype,"input",2),c([F(".input__color-picker")],ee.prototype,"colorPicker",2),c([F("zn-slash-menu")],ee.prototype,"slashMenuElement",2),c([R()],ee.prototype,"hasFocus",2),c([R()],ee.prototype,"hasSlashMenu",2),c([R()],ee.prototype,"isUserTyping",2),c([d()],ee.prototype,"title",2),c([d({reflect:!0})],ee.prototype,"type",2),c([d()],ee.prototype,"name",2),c([d()],ee.prototype,"value",2),c([Ce()],ee.prototype,"defaultValue",2),c([d({reflect:!0})],ee.prototype,"size",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"pill",2),c([d()],ee.prototype,"label",2),c([d({attribute:"label-tooltip"})],ee.prototype,"labelTooltip",2),c([d({attribute:"context-note"})],ee.prototype,"contextNote",2),c([d({attribute:"help-text"})],ee.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"clearable",2),c([d({attribute:"optional-icon",type:Boolean})],ee.prototype,"optionalIcon",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"filled",2),c([d()],ee.prototype,"placeholder",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"readonly",2),c([d({attribute:"password-toggle",type:Boolean})],ee.prototype,"passwordToggle",2),c([d({attribute:"password-visible",type:Boolean})],ee.prototype,"passwordVisible",2),c([d({attribute:"no-spin-buttons",type:Boolean})],ee.prototype,"noSpinButtons",2),c([d({attribute:"color-format"})],ee.prototype,"colorFormat",2),c([d({attribute:"value-suffix"})],ee.prototype,"valueSuffix",2),c([d({reflect:!0})],ee.prototype,"form",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"required",2),c([d()],ee.prototype,"pattern",2),c([d({type:Number})],ee.prototype,"minlength",2),c([d({type:Number})],ee.prototype,"maxlength",2),c([d()],ee.prototype,"min",2),c([d()],ee.prototype,"max",2),c([d()],ee.prototype,"step",2),c([d()],ee.prototype,"autocapitalize",2),c([d()],ee.prototype,"autocorrect",2),c([d()],ee.prototype,"autocomplete",2),c([d({type:Boolean})],ee.prototype,"autofocus",2),c([d()],ee.prototype,"enterkeyhint",2),c([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],ee.prototype,"spellcheck",2),c([d()],ee.prototype,"inputmode",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],ee.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],ee.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],ee.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],ee.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],ee.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],ee.prototype,"slashRecentKey",2),c([d({attribute:!1})],ee.prototype,"slashItemsProvider",2),c([d({type:Boolean,attribute:"trigger-submit"})],ee.prototype,"triggerSubmit",2),c([K("disabled",{waitUntilFirstUpdate:!0})],ee.prototype,"handleDisabledChange",1),c([K("step",{waitUntilFirstUpdate:!0})],ee.prototype,"handleStepChange",1),c([K("value",{waitUntilFirstUpdate:!0})],ee.prototype,"handleValueChange",1),c([K("colorFormat",{waitUntilFirstUpdate:!0})],ee.prototype,"handleColorFormatChange",1);var nt=ee;ee.define("zn-input");var c0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;-moz-user-select:none;user-select:none;-webkit-user-select:none}:host([hidden]){display:none !important}:host(:focus){outline:none}.option{position:relative;display:flex;align-items:center;font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);line-height:var(--zn-line-height-normal);letter-spacing:var(--zn-letter-spacing-normal);color:var(--zn-input-color);padding:var(--zn-spacing-x-small) var(--zn-spacing-small);transition:var(--zn-transition-fast) fill;cursor:pointer}.option--selected{background-color:var(--zn-color-primary-200)}.option--hover:not(.option--disabled),.option--current,.option--current.option--disabled{background-color:var(--zn-color-primary-100);color:var(--zn-input-color);opacity:1}.option--disabled{outline:none;opacity:0.5;cursor:not-allowed}.option__label{flex:1 1 auto;display:inline-block;font-size:var(--zn-font-size-small);line-height:var(--ts-leading-5)}.option .option__check{flex:0 0 auto;display:flex;align-items:center;justify-content:center;visibility:hidden;padding-inline-start:0.375rem;padding-inline-end:0.375rem}.option--selected .option__check{visibility:visible}.option__prefix,.option__suffix{flex:0 0 auto;display:flex;align-items:center}.option__prefix::slotted(*){margin-inline-end:var(--zn-spacing-small);font-size:var(--zn-font-size-large)}.option__suffix::slotted(*){margin-inline-start:var(--zn-spacing-small)}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .option{outline:dashed 1px SelectedItem;outline-offset:-1px}}`;var Cr=class extends k{constructor(){super(...arguments);this.localize=new Ht(this);this.multiple=!1;this.current=!1;this.hasHover=!1;this.value="";this.disabled=!1;this.selected=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel>"u"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}getTextLabel(){let t=this.childNodes,r="";return[...t].forEach(n=>{n.nodeType===Node.ELEMENT_NODE&&(n.hasAttribute("slot")||(r+=n.textContent)),n.nodeType===Node.TEXT_NODE&&(r+=n.textContent)}),r.trim()}render(){return u`
565
565
  <div
566
566
  part="base"
567
567
  class=${M({option:!0,"option--current":this.current,"option--disabled":this.disabled,"option--selected":this.selected,"option--hover":this.hasHover,"option--singular":!this.multiple})}
@@ -1901,7 +1901,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
1901
1901
  </div>
1902
1902
  `:""}
1903
1903
  </div>
1904
- <slot name="bottom" part="bottom"></slot>`}};We.styles=z(e1),We.dependencies={"zn-dropdown":pr},c([d({attribute:"navigation",type:Array})],We.prototype,"navigation",2),c([d({attribute:"full-width",type:Boolean,reflect:!0})],We.prototype,"fullWidth",2),c([d({attribute:"icon-bar",type:Boolean,reflect:!0})],We.prototype,"iconBar",2),c([d({attribute:"slim",type:Boolean,reflect:!0})],We.prototype,"slim",2),c([d({attribute:"border",type:Boolean,reflect:!0})],We.prototype,"border",2),c([d({attribute:"hide-one",type:Boolean,reflect:!0})],We.prototype,"hideOne",2),c([d({attribute:"flush",type:Boolean,reflect:!0})],We.prototype,"flush",2),c([d({attribute:"gutter",type:Boolean,reflect:!0})],We.prototype,"gutter",2),c([d({type:Boolean})],We.prototype,"stacked",2),c([d({type:Array})],We.prototype,"dropdown",2),c([d({attribute:"no-pad",type:Boolean})],We.prototype,"noPad",2),c([d({attribute:"manual-add-items",type:Boolean})],We.prototype,"manualAddItems",2),c([d({type:Boolean})],We.prototype,"isolated",2),c([d({reflect:!0})],We.prototype,"color",2),c([d({attribute:"master-id",reflect:!0})],We.prototype,"masterId",2),c([d({attribute:"store-key",type:String})],We.prototype,"storeKey",2),c([d({attribute:"store-ttl",type:Number,reflect:!0})],We.prototype,"storeTtl",2),c([d({attribute:"local-storage",type:Boolean,reflect:!0})],We.prototype,"localStorage",2),c([d()],We.prototype,"_appended",2);var Ca=We;We.define("zn-navbar");function Qd(o){function i(he,ae){return he<<ae|he>>>32-ae}function t(he,ae){let ze,O,x,E,w;return x=he&2147483648,E=ae&2147483648,ze=he&1073741824,O=ae&1073741824,w=(he&1073741823)+(ae&1073741823),ze&&O?w^2147483648^x^E:ze||O?w?w^3221225472^x^E:w^1073741824^x^E:w^x^E}function r(he,ae,ze){return he&ae|~he&ze}function n(he,ae,ze){return he&ze|ae&~ze}function a(he,ae,ze){return he^ae^ze}function s(he,ae,ze){return ae^(he|~ze)}function l(he,ae,ze,O,x,E,w){return he=t(he,t(t(r(ae,ze,O),x),w)),t(i(he,E),ae)}function p(he,ae,ze,O,x,E,w){return he=t(he,t(t(n(ae,ze,O),x),w)),t(i(he,E),ae)}function h(he,ae,ze,O,x,E,w){return he=t(he,t(t(a(ae,ze,O),x),w)),t(i(he,E),ae)}function m(he,ae,ze,O,x,E,w){return he=t(he,t(t(s(ae,ze,O),x),w)),t(i(he,E),ae)}function f(he){for(var ae,ze=he.length,O=ze+8,x=(O-O%64)/64,E=(x+1)*16,w=Array(E-1),D=0,q=0;q<ze;)ae=(q-q%4)/4,D=q%4*8,w[ae]=w[ae]|he.charCodeAt(q)<<D,q++;return ae=(q-q%4)/4,D=q%4*8,w[ae]=w[ae]|128<<D,w[E-2]=ze<<3,w[E-1]=ze>>>29,w}function b(he){var ae="",ze="",O,x;for(x=0;x<=3;x++)O=he>>>x*8&255,ze="0"+O.toString(16),ae=ae+ze.substr(ze.length-2,2);return ae}function g(he){he=he.replace(/\r\n/g,`
1904
+ <slot name="bottom" part="bottom"></slot>`}};We.styles=z(e1),We.dependencies={"zn-dropdown":pr},c([d({attribute:"navigation",type:Array})],We.prototype,"navigation",2),c([d({attribute:"full-width",type:Boolean,reflect:!0})],We.prototype,"fullWidth",2),c([d({attribute:"icon-bar",type:Boolean,reflect:!0})],We.prototype,"iconBar",2),c([d({attribute:"slim",type:Boolean,reflect:!0})],We.prototype,"slim",2),c([d({attribute:"border",type:Boolean,reflect:!0})],We.prototype,"border",2),c([d({attribute:"hide-one",type:Boolean,reflect:!0})],We.prototype,"hideOne",2),c([d({attribute:"flush",type:Boolean,reflect:!0})],We.prototype,"flush",2),c([d({attribute:"gutter",type:Boolean,reflect:!0})],We.prototype,"gutter",2),c([d({type:Boolean})],We.prototype,"stacked",2),c([d({type:Array})],We.prototype,"dropdown",2),c([d({attribute:"no-pad",type:Boolean})],We.prototype,"noPad",2),c([d({attribute:"manual-add-items",type:Boolean})],We.prototype,"manualAddItems",2),c([d({type:Boolean})],We.prototype,"isolated",2),c([d({reflect:!0})],We.prototype,"color",2),c([d({attribute:"master-id",reflect:!0})],We.prototype,"masterId",2),c([d({attribute:"store-key",type:String})],We.prototype,"storeKey",2),c([d({attribute:"store-ttl",type:Number,reflect:!0})],We.prototype,"storeTtl",2),c([d({attribute:"local-storage",type:Boolean,reflect:!0})],We.prototype,"localStorage",2),c([d()],We.prototype,"_appended",2);var Sa=We;We.define("zn-navbar");function Qd(o){function i(he,ae){return he<<ae|he>>>32-ae}function t(he,ae){let ze,O,x,E,w;return x=he&2147483648,E=ae&2147483648,ze=he&1073741824,O=ae&1073741824,w=(he&1073741823)+(ae&1073741823),ze&&O?w^2147483648^x^E:ze||O?w?w^3221225472^x^E:w^1073741824^x^E:w^x^E}function r(he,ae,ze){return he&ae|~he&ze}function n(he,ae,ze){return he&ze|ae&~ze}function a(he,ae,ze){return he^ae^ze}function s(he,ae,ze){return ae^(he|~ze)}function l(he,ae,ze,O,x,E,w){return he=t(he,t(t(r(ae,ze,O),x),w)),t(i(he,E),ae)}function p(he,ae,ze,O,x,E,w){return he=t(he,t(t(n(ae,ze,O),x),w)),t(i(he,E),ae)}function h(he,ae,ze,O,x,E,w){return he=t(he,t(t(a(ae,ze,O),x),w)),t(i(he,E),ae)}function m(he,ae,ze,O,x,E,w){return he=t(he,t(t(s(ae,ze,O),x),w)),t(i(he,E),ae)}function f(he){for(var ae,ze=he.length,O=ze+8,x=(O-O%64)/64,E=(x+1)*16,w=Array(E-1),D=0,q=0;q<ze;)ae=(q-q%4)/4,D=q%4*8,w[ae]=w[ae]|he.charCodeAt(q)<<D,q++;return ae=(q-q%4)/4,D=q%4*8,w[ae]=w[ae]|128<<D,w[E-2]=ze<<3,w[E-1]=ze>>>29,w}function b(he){var ae="",ze="",O,x;for(x=0;x<=3;x++)O=he>>>x*8&255,ze="0"+O.toString(16),ae=ae+ze.substr(ze.length-2,2);return ae}function g(he){he=he.replace(/\r\n/g,`
1905
1905
  `);let ae="";for(let ze=0;ze<he.length;ze++){let O=he.charCodeAt(ze);O<128?ae+=String.fromCharCode(O):O>127&&O<2048?(ae+=String.fromCharCode(O>>6|192),ae+=String.fromCharCode(O&63|128)):(ae+=String.fromCharCode(O>>12|224),ae+=String.fromCharCode(O>>6&63|128),ae+=String.fromCharCode(O&63|128))}return ae}let v,y,S,T,N,U,I,C,$,L,W=7,oe=12,xe=17,De=22,Ne=5,rt=9,er=14,Pr=20,wr=4,Nt=11,tr=16,Mt=23,uo=6,Qa=10,ue=15,Yi=21;for(o=g(o),v=f(o),I=1732584193,C=4023233417,$=2562383102,L=271733878,y=0;y<v.length;y+=16)S=I,T=C,N=$,U=L,I=l(I,C,$,L,v[y+0],W,3614090360),L=l(L,I,C,$,v[y+1],oe,3905402710),$=l($,L,I,C,v[y+2],xe,606105819),C=l(C,$,L,I,v[y+3],De,3250441966),I=l(I,C,$,L,v[y+4],W,4118548399),L=l(L,I,C,$,v[y+5],oe,1200080426),$=l($,L,I,C,v[y+6],xe,2821735955),C=l(C,$,L,I,v[y+7],De,4249261313),I=l(I,C,$,L,v[y+8],W,1770035416),L=l(L,I,C,$,v[y+9],oe,2336552879),$=l($,L,I,C,v[y+10],xe,4294925233),C=l(C,$,L,I,v[y+11],De,2304563134),I=l(I,C,$,L,v[y+12],W,1804603682),L=l(L,I,C,$,v[y+13],oe,4254626195),$=l($,L,I,C,v[y+14],xe,2792965006),C=l(C,$,L,I,v[y+15],De,1236535329),I=p(I,C,$,L,v[y+1],Ne,4129170786),L=p(L,I,C,$,v[y+6],rt,3225465664),$=p($,L,I,C,v[y+11],er,643717713),C=p(C,$,L,I,v[y+0],Pr,3921069994),I=p(I,C,$,L,v[y+5],Ne,3593408605),L=p(L,I,C,$,v[y+10],rt,38016083),$=p($,L,I,C,v[y+15],er,3634488961),C=p(C,$,L,I,v[y+4],Pr,3889429448),I=p(I,C,$,L,v[y+9],Ne,568446438),L=p(L,I,C,$,v[y+14],rt,3275163606),$=p($,L,I,C,v[y+3],er,4107603335),C=p(C,$,L,I,v[y+8],Pr,1163531501),I=p(I,C,$,L,v[y+13],Ne,2850285829),L=p(L,I,C,$,v[y+2],rt,4243563512),$=p($,L,I,C,v[y+7],er,1735328473),C=p(C,$,L,I,v[y+12],Pr,2368359562),I=h(I,C,$,L,v[y+5],wr,4294588738),L=h(L,I,C,$,v[y+8],Nt,2272392833),$=h($,L,I,C,v[y+11],tr,1839030562),C=h(C,$,L,I,v[y+14],Mt,4259657740),I=h(I,C,$,L,v[y+1],wr,2763975236),L=h(L,I,C,$,v[y+4],Nt,1272893353),$=h($,L,I,C,v[y+7],tr,4139469664),C=h(C,$,L,I,v[y+10],Mt,3200236656),I=h(I,C,$,L,v[y+13],wr,681279174),L=h(L,I,C,$,v[y+0],Nt,3936430074),$=h($,L,I,C,v[y+3],tr,3572445317),C=h(C,$,L,I,v[y+6],Mt,76029189),I=h(I,C,$,L,v[y+9],wr,3654602809),L=h(L,I,C,$,v[y+12],Nt,3873151461),$=h($,L,I,C,v[y+15],tr,530742520),C=h(C,$,L,I,v[y+2],Mt,3299628645),I=m(I,C,$,L,v[y+0],uo,4096336452),L=m(L,I,C,$,v[y+7],Qa,1126891415),$=m($,L,I,C,v[y+14],ue,2878612391),C=m(C,$,L,I,v[y+5],Yi,4237533241),I=m(I,C,$,L,v[y+12],uo,1700485571),L=m(L,I,C,$,v[y+3],Qa,2399980690),$=m($,L,I,C,v[y+10],ue,4293915773),C=m(C,$,L,I,v[y+1],Yi,2240044497),I=m(I,C,$,L,v[y+8],uo,1873313359),L=m(L,I,C,$,v[y+15],Qa,4264355552),$=m($,L,I,C,v[y+6],ue,2734768916),C=m(C,$,L,I,v[y+13],Yi,1309151649),I=m(I,C,$,L,v[y+4],uo,4149444226),L=m(L,I,C,$,v[y+11],Qa,3174756917),$=m($,L,I,C,v[y+2],ue,718787259),C=m(C,$,L,I,v[y+9],Yi,3951481745),I=t(I,S),C=t(C,T),$=t($,N),L=t(L,U);var Qi=b(I)+b(C)+b($)+b(L);return Qi.toLowerCase()}var t1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.expanding-action--fill{padding-inline:var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-2x-small);position:absolute;top:0;left:auto;right:0;bottom:0;background-color:rgb(var(--zn-panel));width:0;transition:width var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),opacity var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),display var(--zn-transition-slow) ease-in-out allow-discrete}@starting-style {.expanding-action--fill.expanding-action--open{width:0}}.expanding-action--fill.expanding-action--open{display:flex;flex-direction:row;align-items:center;gap:10px;height:100%;width:min(100%,800px);overflow:hidden;z-index:100;max-width:800px}.expanding-action--fill.expanding-action--open::before{content:"";position:absolute;left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1);bottom:6px;background-color:rgb(var(--zn-primary));height:2px}.expanding-action--fill.expanding-action--open>zn-icon{display:block;color:rgb(var(--zn-primary))}.expanding-action--fill.expanding-action--closed{display:none;opacity:0}@starting-style {.expanding-action--fill .expanding-action__content{opacity:0}}.expanding-action--fill .expanding-action__content{opacity:1;width:100%;display:flex;flex-direction:column;justify-content:center;padding:0}.expanding-action--drop,.expanding-action--drop .expanding-action__dropdown,.expanding-action--drop .expanding-action__dropdown zn-button[slot=trigger]{height:100%}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar{width:5px;height:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-track{background:transparent}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.expanding-action--drop .expanding-action__frame{--expanding-action-trigger-width:36px;position:relative;display:flex;flex-direction:column;min-width:300px;width:var(--expanding-action-basis,var(--zn-container-smp,320px));max-width:80vw;max-height:var(--expanding-action-max-height,var(--auto-size-available-height,80vh));background-color:rgb(var(--zn-panel));box-shadow:0 8px 16px -6px rgba(33,33,33,0.18);border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius) 0 var(--zn-border-radius) var(--zn-border-radius);padding:0;height:100%}.expanding-action--drop .expanding-action__frame::before{content:"";position:absolute;top:-1px;left:calc(100% - var(--expanding-action-trigger-width) + 2px);right:0;z-index:1;height:2px;background:rgb(var(--zn-panel))}.expanding-action--drop .expanding-action__content{flex:1 1 auto;min-height:0;overflow-y:auto;border-radius:inherit}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame{border-radius:0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius)}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame::before{left:0;right:calc(100% - var(--expanding-action-trigger-width) + 2px)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]{position:relative;z-index:calc(var(--zn-z-index-dropdown) + 1)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::before{content:"";position:absolute;inset:0;z-index:-1;height:41px;background:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-bottom-color:rgb(var(--zn-panel));border-radius:var(--zn-border-radius) var(--zn-border-radius) 0 0}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):hover,:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):active{background:transparent}`;var Kt=class extends k{constructor(){super();this.method="drop";this.prefetch=!1;this.basis="300";this.open=!1;this.fetchStyle="";this.noPrefetch=!1;this._knownUri=new Map;this._actions=[];this._preload=!0;this._metaObserved=!1;this._countObserver=new Oe(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Ge("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="count"]');if(!r)return;let n=r.getAttribute("content"),a=this.shadowRoot?.querySelector(".expanding-action__dropdown zn-button");n&&a&&a.setAttribute("notification",n)}});this._colorObserver=new Oe(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Ge("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="color"]');if(!r)return;let n=r.getAttribute("content");n&&(this.color=n)}});this.handleIconClicked=()=>{this.open=!this.open};this.handleIconCloseClicked=()=>{this.open=!1};this._updateTriggerSide=()=>{let t=this.shadowRoot?.querySelector('.expanding-action__dropdown zn-button[slot="trigger"]'),r=this.shadowRoot?.querySelector("#content");if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.width===0)return;let s=(n.left+n.right)/2,l=(a.left+a.right)/2;this.setAttribute("data-trigger-side",s>l?"right":"left")};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=Math.floor(Math.random()*1e6).toString()),this._preload=!this.noPrefetch,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content")}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerActions()},10),this.contextUri&&setTimeout(()=>{this.fetchContextHeaders().then(r=>r)},10)}_observeMetaData(){if(this._metaObserved)return;let r=Ge("app-content",this,"")[0]?.shadowRoot;r&&(this._countObserver.observe(r),this._colorObserver.observe(r),this._metaObserved=!0)}_registerActions(){Ge("[action-uri]",this,"zn-expanding-action").forEach(t=>{t.getAttribute("action-uri")===""&&(t.setAttribute("action",""),t.removeAttribute("action-uri")),this._addAction(t)})}_addAction(t){this._actions.includes(t)||(this._actions.push(t),this._preload&&t.addEventListener("mouseover",this.fetchUri.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}_uriToId(t){return"action-"+Qd(t).substr(0,8)+"-"+this.masterId}_handleClick(t){let r=t.relatedTarget??t.target;r&&this.clickAction(r)}_createUriPanel(t,r,n){if(t.hasAttribute("action")||t.setAttribute("action",n),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""&&a.setAttribute("data-fetch-style",this.fetchStyle),a.setAttribute("data-self-uri",r),a.setAttribute("data-fetch-style","expanding-action"),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}fetchUri(t){if(!t.hasAttribute("action")&&t.hasAttribute("action-uri")){let r=t.getAttribute("action-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),this._observeMetaData()}}async fetchContextHeaders(){try{let t=await fetch(this.contextUri,{credentials:"same-origin",method:"head",headers:{"x-requested-with":"XMLHttpRequest"}}),r=t.headers.get("x-kubex-count");r&&(this.count=r);let n=t.headers.get("x-kubex-color");n&&(this.color=n)}catch{}}clickAction(t){this.fetchUri(t)}_observePlacement(){let r=this.shadowRoot?.querySelector(".expanding-action__dropdown")?.shadowRoot?.querySelector(".dropdown");if(!r){requestAnimationFrame(()=>this._observePlacement());return}this._updateTriggerSide(),!this._placementObserver&&(this._placementObserver=new MutationObserver(this._updateTriggerSide),this._placementObserver.observe(r,{attributes:!0,attributeFilter:["data-current-placement"]}))}disconnectedCallback(){super.disconnectedCallback(),this._placementObserver?.disconnect(),this._placementObserver=void 0}render(){return u`
1906
1906
  ${this.method==="fill"?u`
1907
1907
  <zn-button class="expanding-action__button"
@@ -2050,7 +2050,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
2050
2050
  </div>
2051
2051
  </div>
2052
2052
  </div>
2053
- `}};or.styles=[ln.styles,z(h1)],or.dependencies={"zn-button":$e,"zn-copy-button":Mu,"zn-expanding-action":om,"zn-icon":ne,"zn-navbar":Ca,"zn-tab":am},c([d()],or.prototype,"caption",2),c([d({attribute:"entity-id"})],or.prototype,"entityId",2),c([d({attribute:"entity-id-show",type:Boolean})],or.prototype,"entityIdShow",2),c([d({attribute:"full-location"})],or.prototype,"fullLocation",2),c([d({type:Boolean,reflect:!0})],or.prototype,"modal",2),c([d({type:Boolean,reflect:!0})],or.prototype,"nested",2),c([d({type:Boolean,reflect:!0})],or.prototype,"primary",2),c([d({attribute:"previous-path"})],or.prototype,"previousPath",2),c([d({attribute:"previous-target"})],or.prototype,"previousTarget",2),c([d()],or.prototype,"summary",2),c([R()],or.prototype,"scrolled",2),c([R()],or.prototype,"tabDefinitions",2),c([R()],or.prototype,"hasExpandingActions",2);var bs=or;var Y4=bs;bs.define("zn-page");var u1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.form-control-input{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}zn-dialog{--width:min(80vw,900px);--icon-color:rgb(var(--zn-text))}.icon-picker__image-trigger{position:relative;flex:1;min-width:0;min-height:180px;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);cursor:pointer;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.icon-picker__image-trigger:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}.icon-picker__image-trigger:not(:focus-visible):hover{border-color:var(--zn-color-primary-700)}:host([disabled]) .icon-picker__image-trigger{cursor:not-allowed;opacity:0.5}.icon-picker__image-trigger-background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:inherit;padding:var(--zn-spacing-large) var(--zn-spacing-medium);box-sizing:border-box;background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.icon-picker__image-trigger-preview{display:block;width:100%;height:150px;-o-object-fit:contain;object-fit:contain}.icon-picker__image-clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.icon-picker__dialog-layout{display:flex;gap:var(--zn-spacing-large);height:40vh}.icon-picker__dialog-main{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}.icon-picker__dialog-sidebar{width:180px;flex-shrink:0}@media (max-width:640px){zn-dialog{--width:100vw}zn-dialog::part(base){max-width:100%;max-height:100%;margin:0;border-radius:0;height:100dvh;width:100vw}.icon-picker__dialog-layout{height:calc(100dvh - 8rem);flex-direction:column}.icon-picker__dialog-sidebar{width:100%;flex-shrink:0}}.icon-picker__mode-switch{display:flex;gap:var(--zn-spacing-x-small);margin-bottom:var(--zn-spacing-small)}.icon-picker__upload{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--zn-spacing-small);border:dashed 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);padding:var(--zn-spacing-large);color:rgb(var(--zn-text-muted))}.icon-picker__upload-preview{max-width:100%;max-height:160px;-o-object-fit:contain;object-fit:contain;border-radius:var(--zn-border-radius)}.icon-picker__upload-filename{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted));word-break:break-all}.icon-picker__dialog-controls{display:flex;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-small)}.icon-picker__library-select{flex:1;min-width:0}.icon-picker__color-input{width:140px;flex-shrink:0}.icon-picker__icon-input{margin-bottom:var(--zn-spacing-small)}.icon-picker__search{margin-bottom:var(--zn-spacing-small)}.icon-picker__free-input{margin-bottom:var(--zn-spacing-small)}.icon-picker__grid{display:flex;flex-wrap:wrap;gap:var(--zn-spacing-x-small);flex:1;overflow-y:auto;align-content:flex-start;border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-small)}.icon-picker__grid-item{display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:2px solid transparent;border-radius:var(--zn-border-radius);background:transparent;color:var(--zn-text-color);cursor:pointer;transition:var(--zn-transition-fast) background-color,var(--zn-transition-fast) border-color}.icon-picker__grid-item:hover{background-color:rgba(var(--zn-color-primary),0.1)}.icon-picker__grid-item--selected{border-color:rgb(var(--zn-color-primary));background-color:rgba(var(--zn-color-primary),0.1)}.icon-picker__no-results{width:100%;text-align:center;padding:var(--zn-spacing-large);color:rgb(var(--zn-text-muted))}.icon-picker__preview{display:flex;flex-direction:column;align-items:center;gap:var(--zn-spacing-small);padding:var(--zn-spacing-medium);background-color:rgba(var(--zn-panel-secondary),0.5);border-radius:var(--zn-border-radius);text-align:center}.icon-picker__preview--empty{color:rgb(var(--zn-text-muted))}.icon-picker__preview-name{font-size:var(--zn-font-size-medium);font-family:var(--zn-font-mono);word-break:break-all}.icon-picker__preview-library{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted))}.icon-picker__preview-hint{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted))}.icon-picker__footer{display:flex;justify-content:flex-end;align-items:center;gap:var(--zn-spacing-small);--icon-color:currentColor}`;var _e=class _e extends k{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-change"],value:t=>t._file??t.icon,setValue:(t,r)=>{t.clearFile(),t.icon=r??""}});this.name="";this.icon="";this.label="";this.library="material-symbols-outlined";this.color="";this.noColor=!1;this.noLibrary=!1;this.helpText="";this.disabled=!1;this.required=!1;this.triggerSubmit=!1;this.allowUpload=!1;this.accept="image/*";this.defaultValue="";this._dialogOpen=!1;this._searchQuery="";this._iconList=[];this._filteredIcons=[];this._pendingIcon="";this._pendingLibrary="";this._pendingColor="";this._pendingFile=null;this._pendingFileUrl=null;this._mode="icon";this._file=null;this._fileUrl=null}get value(){return this.icon}set value(t){this.icon=t}get file(){return this._file}get isImageValue(){return!!this._file||this.icon.includes("/")}get validity(){return this.required&&!this.icon&&!this._file?{valid:!1,valueMissing:!0,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1}:{valid:!0,valueMissing:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1}}get validationMessage(){return this.required&&!this.icon&&!this._file?"Please select an icon.":""}checkValidity(){return this.validity.valid}getForm(){return this.formControlController.getForm()}reportValidity(){return this.checkValidity()}setCustomValidity(t){this.formControlController.updateValidity()}isFreeInputLibrary(t){return _e.freeInputLibraries.has(t)}async getIconsForLibrary(t){try{switch(t){case"brands":return(await import("./chunks/zn.CU5HCKLN.js")).brandIcons;case"line":return(await import("./chunks/zn.7VCR5ZZL.js")).lineIcons;case"lucide":return(await import("./chunks/zn.R2EAU6OS.js")).lucideIcons;default:{let r=await import("./chunks/zn.NKUIXDNI.js");switch(t){case"material-outlined":return r.material_outlinedIcons;case"material-round":return r.material_roundIcons;case"material-sharp":return r.material_sharpIcons;case"material-two-tone":return r.material_two_toneIcons;case"material-symbols-outlined":return r.material_symbols_outlinedIcons;default:return r.materialIcons}}}}catch{return[]}}async openDialog(){this._pendingIcon=this.isImageValue?"":this.icon,this._pendingLibrary=this.library,this._pendingColor=this.color,this._searchQuery="",this._mode=this.allowUpload&&this.isImageValue?"upload":"icon",this._iconList=await this.getIconsForLibrary(this.library),this._filteredIcons=this._iconList.slice(0,200),this._dialogOpen=!0,await this.updateComplete,this._dialog.show()}closeDialog(){this.discardPendingFile(),this._dialog.hide(),this._dialogOpen=!1}handleConfirm(){this._mode==="upload"?this._pendingFile&&(this._fileUrl&&URL.revokeObjectURL(this._fileUrl),this._file=this._pendingFile,this._fileUrl=this._pendingFileUrl,this._pendingFile=null,this._pendingFileUrl=null,this.icon=""):(this.icon=this._pendingIcon,this.library=this._pendingLibrary,this.color=this._pendingColor,this.clearFile()),this.closeDialog(),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}handleCancel(){this.closeDialog()}handleFileSelect(t){let r=t.target,n=r.files?.[0]??null;n&&(this.discardPendingFile(),this._pendingFile=n,this._pendingFileUrl=URL.createObjectURL(n),r.value="")}discardPendingFile(){this._pendingFileUrl&&URL.revokeObjectURL(this._pendingFileUrl),this._pendingFile=null,this._pendingFileUrl=null}clearFile(){this._fileUrl&&URL.revokeObjectURL(this._fileUrl),this._file=null,this._fileUrl=null}disconnectedCallback(){super.disconnectedCallback(),this.discardPendingFile(),this._fileUrl&&URL.revokeObjectURL(this._fileUrl)}syncHiddenInputs(){let t=[["icon",this.icon,!0],["library",this.library,!this.noLibrary],["color",this.color,!this.noColor]];for(let[r,n,a]of t){let s=`${this.name}[${r}]`,l=this.querySelector(`input[type="hidden"][name="${s}"]`);if(!this.name||!a){l?.remove();continue}l||(l=document.createElement("input"),l.type="hidden",l.name=s,this.appendChild(l)),l.value=n??""}}updated(t){super.updated(t),this.syncHiddenInputs()}handleSearchInput(t){let r=t.target;this._searchQuery=r.value.toLowerCase(),this.filterIcons()}filterIcons(){this._searchQuery?this._filteredIcons=this._iconList.filter(t=>t.includes(this._searchQuery)).slice(0,200):this._filteredIcons=this._iconList.slice(0,200)}handleIconSelect(t){this._pendingIcon=t}async handleLibraryChange(t){let r=t.target,n=this.isFreeInputLibrary(this._pendingLibrary);this._pendingLibrary=r.value;let a=this.isFreeInputLibrary(this._pendingLibrary);n!==a&&(this._pendingIcon=""),a||(this._iconList=await this.getIconsForLibrary(this._pendingLibrary),this.filterIcons())}handleColorInput(t){let r=t.target;this._pendingColor=r.value}handleFreeInput(t){let r=t.target;this._pendingIcon=r.value}handleClear(t){t.stopPropagation(),this.icon="",this.color="",this.clearFile(),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}_handleTriggerClick(){this.disabled||this.openDialog()}_handleTriggerKeyDown(t){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._handleTriggerClick())}render(){let t=!!this.label,r=!!this.helpText,n=!!this.icon||!!this._file,a=this._fileUrl??this.icon,s=n&&!this.isImageValue?this.library:B,l=this._pendingFileUrl??(this.isImageValue&&!this._file?this.icon:this._fileUrl);return u`
2053
+ `}};or.styles=[ln.styles,z(h1)],or.dependencies={"zn-button":$e,"zn-copy-button":Mu,"zn-expanding-action":om,"zn-icon":ne,"zn-navbar":Sa,"zn-tab":am},c([d()],or.prototype,"caption",2),c([d({attribute:"entity-id"})],or.prototype,"entityId",2),c([d({attribute:"entity-id-show",type:Boolean})],or.prototype,"entityIdShow",2),c([d({attribute:"full-location"})],or.prototype,"fullLocation",2),c([d({type:Boolean,reflect:!0})],or.prototype,"modal",2),c([d({type:Boolean,reflect:!0})],or.prototype,"nested",2),c([d({type:Boolean,reflect:!0})],or.prototype,"primary",2),c([d({attribute:"previous-path"})],or.prototype,"previousPath",2),c([d({attribute:"previous-target"})],or.prototype,"previousTarget",2),c([d()],or.prototype,"summary",2),c([R()],or.prototype,"scrolled",2),c([R()],or.prototype,"tabDefinitions",2),c([R()],or.prototype,"hasExpandingActions",2);var bs=or;var Y4=bs;bs.define("zn-page");var u1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.form-control-input{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}zn-dialog{--width:min(80vw,900px);--icon-color:rgb(var(--zn-text))}.icon-picker__image-trigger{position:relative;flex:1;min-width:0;min-height:180px;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);cursor:pointer;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.icon-picker__image-trigger:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}.icon-picker__image-trigger:not(:focus-visible):hover{border-color:var(--zn-color-primary-700)}:host([disabled]) .icon-picker__image-trigger{cursor:not-allowed;opacity:0.5}.icon-picker__image-trigger-background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:inherit;padding:var(--zn-spacing-large) var(--zn-spacing-medium);box-sizing:border-box;background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.icon-picker__image-trigger-preview{display:block;width:100%;height:150px;-o-object-fit:contain;object-fit:contain}.icon-picker__image-clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.icon-picker__dialog-layout{display:flex;gap:var(--zn-spacing-large);height:40vh}.icon-picker__dialog-main{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}.icon-picker__dialog-sidebar{width:180px;flex-shrink:0}@media (max-width:640px){zn-dialog{--width:100vw}zn-dialog::part(base){max-width:100%;max-height:100%;margin:0;border-radius:0;height:100dvh;width:100vw}.icon-picker__dialog-layout{height:calc(100dvh - 8rem);flex-direction:column}.icon-picker__dialog-sidebar{width:100%;flex-shrink:0}}.icon-picker__mode-switch{display:flex;gap:var(--zn-spacing-x-small);margin-bottom:var(--zn-spacing-small)}.icon-picker__upload{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--zn-spacing-small);border:dashed 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);padding:var(--zn-spacing-large);color:rgb(var(--zn-text-muted))}.icon-picker__upload-preview{max-width:100%;max-height:160px;-o-object-fit:contain;object-fit:contain;border-radius:var(--zn-border-radius)}.icon-picker__upload-filename{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted));word-break:break-all}.icon-picker__dialog-controls{display:flex;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-small)}.icon-picker__library-select{flex:1;min-width:0}.icon-picker__color-input{width:140px;flex-shrink:0}.icon-picker__icon-input{margin-bottom:var(--zn-spacing-small)}.icon-picker__search{margin-bottom:var(--zn-spacing-small)}.icon-picker__free-input{margin-bottom:var(--zn-spacing-small)}.icon-picker__grid{display:flex;flex-wrap:wrap;gap:var(--zn-spacing-x-small);flex:1;overflow-y:auto;align-content:flex-start;border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-small)}.icon-picker__grid-item{display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:2px solid transparent;border-radius:var(--zn-border-radius);background:transparent;color:var(--zn-text-color);cursor:pointer;transition:var(--zn-transition-fast) background-color,var(--zn-transition-fast) border-color}.icon-picker__grid-item:hover{background-color:rgba(var(--zn-color-primary),0.1)}.icon-picker__grid-item--selected{border-color:rgb(var(--zn-color-primary));background-color:rgba(var(--zn-color-primary),0.1)}.icon-picker__no-results{width:100%;text-align:center;padding:var(--zn-spacing-large);color:rgb(var(--zn-text-muted))}.icon-picker__preview{display:flex;flex-direction:column;align-items:center;gap:var(--zn-spacing-small);padding:var(--zn-spacing-medium);background-color:rgba(var(--zn-panel-secondary),0.5);border-radius:var(--zn-border-radius);text-align:center}.icon-picker__preview--empty{color:rgb(var(--zn-text-muted))}.icon-picker__preview-name{font-size:var(--zn-font-size-medium);font-family:var(--zn-font-mono);word-break:break-all}.icon-picker__preview-library{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted))}.icon-picker__preview-hint{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted))}.icon-picker__footer{display:flex;justify-content:flex-end;align-items:center;gap:var(--zn-spacing-small);--icon-color:currentColor}`;var _e=class _e extends k{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-change"],value:t=>t._file??t.icon,setValue:(t,r)=>{t.clearFile(),t.icon=r??""}});this.name="";this.icon="";this.label="";this.library="material-symbols-outlined";this.color="";this.noColor=!1;this.noLibrary=!1;this.helpText="";this.disabled=!1;this.required=!1;this.triggerSubmit=!1;this.allowUpload=!1;this.accept="image/*";this.defaultValue="";this._dialogOpen=!1;this._searchQuery="";this._iconList=[];this._filteredIcons=[];this._pendingIcon="";this._pendingLibrary="";this._pendingColor="";this._pendingFile=null;this._pendingFileUrl=null;this._mode="icon";this._file=null;this._fileUrl=null}get value(){return this.icon}set value(t){this.icon=t}get file(){return this._file}get isImageValue(){return!!this._file||this.icon.includes("/")}get validity(){return this.required&&!this.icon&&!this._file?{valid:!1,valueMissing:!0,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1}:{valid:!0,valueMissing:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1}}get validationMessage(){return this.required&&!this.icon&&!this._file?"Please select an icon.":""}checkValidity(){return this.validity.valid}getForm(){return this.formControlController.getForm()}reportValidity(){return this.checkValidity()}setCustomValidity(t){this.formControlController.updateValidity()}isFreeInputLibrary(t){return _e.freeInputLibraries.has(t)}async getIconsForLibrary(t){try{switch(t){case"brands":return(await import("./chunks/zn.CU5HCKLN.js")).brandIcons;case"line":return(await import("./chunks/zn.7VCR5ZZL.js")).lineIcons;case"lucide":return(await import("./chunks/zn.R2EAU6OS.js")).lucideIcons;default:{let r=await import("./chunks/zn.NKUIXDNI.js");switch(t){case"material-outlined":return r.material_outlinedIcons;case"material-round":return r.material_roundIcons;case"material-sharp":return r.material_sharpIcons;case"material-two-tone":return r.material_two_toneIcons;case"material-symbols-outlined":return r.material_symbols_outlinedIcons;default:return r.materialIcons}}}}catch{return[]}}async openDialog(){this._pendingIcon=this.isImageValue?"":this.icon,this._pendingLibrary=this.library,this._pendingColor=this.color,this._searchQuery="",this._mode=this.allowUpload&&this.isImageValue?"upload":"icon",this._iconList=await this.getIconsForLibrary(this.library),this._filteredIcons=this._iconList.slice(0,200),this._dialogOpen=!0,await this.updateComplete,this._dialog.show()}closeDialog(){this.discardPendingFile(),this._dialog.hide(),this._dialogOpen=!1}handleConfirm(){this._mode==="upload"?this._pendingFile&&(this._fileUrl&&URL.revokeObjectURL(this._fileUrl),this._file=this._pendingFile,this._fileUrl=this._pendingFileUrl,this._pendingFile=null,this._pendingFileUrl=null,this.icon=""):(this.icon=this._pendingIcon,this.library=this._pendingLibrary,this.color=this._pendingColor,this.clearFile()),this.closeDialog(),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}handleCancel(){this.closeDialog()}handleFileSelect(t){let r=t.target,n=r.files?.[0]??null;n&&(this.discardPendingFile(),this._pendingFile=n,this._pendingFileUrl=URL.createObjectURL(n),r.value="")}discardPendingFile(){this._pendingFileUrl&&URL.revokeObjectURL(this._pendingFileUrl),this._pendingFile=null,this._pendingFileUrl=null}clearFile(){this._fileUrl&&URL.revokeObjectURL(this._fileUrl),this._file=null,this._fileUrl=null}disconnectedCallback(){super.disconnectedCallback(),this.discardPendingFile(),this._fileUrl&&URL.revokeObjectURL(this._fileUrl)}syncHiddenInputs(){let t=[["icon",this.icon,!0],["library",this.library,!this.noLibrary],["color",this.color,!this.noColor]];for(let[r,n,a]of t){let s=`${this.name}[${r}]`,l=this.querySelector(`input[type="hidden"][name="${s}"]`);if(!this.name||!a){l?.remove();continue}l||(l=document.createElement("input"),l.type="hidden",l.name=s,this.appendChild(l)),l.value=n??""}}updated(t){super.updated(t),this.syncHiddenInputs()}handleSearchInput(t){let r=t.target;this._searchQuery=r.value.toLowerCase(),this.filterIcons()}filterIcons(){this._searchQuery?this._filteredIcons=this._iconList.filter(t=>t.includes(this._searchQuery)).slice(0,200):this._filteredIcons=this._iconList.slice(0,200)}handleIconSelect(t){this._pendingIcon=t}async handleLibraryChange(t){let r=t.target,n=this.isFreeInputLibrary(this._pendingLibrary);this._pendingLibrary=r.value;let a=this.isFreeInputLibrary(this._pendingLibrary);n!==a&&(this._pendingIcon=""),a||(this._iconList=await this.getIconsForLibrary(this._pendingLibrary),this.filterIcons())}handleColorInput(t){let r=t.target;this._pendingColor=r.value}handleFreeInput(t){let r=t.target;this._pendingIcon=r.value}handleClear(t){t.stopPropagation(),this.icon="",this.color="",this.clearFile(),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}_handleTriggerClick(){this.disabled||this.openDialog()}_handleTriggerKeyDown(t){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._handleTriggerClick())}render(){let t=!!this.label,r=!!this.helpText,n=!!this.icon||!!this._file,a=this._fileUrl??this.icon,s=n&&!this.isImageValue?this.library:B,l=this._pendingFileUrl??(this.isImageValue&&!this._file?this.icon:this._fileUrl);return u`
2054
2054
  <div part="form-control"
2055
2055
  class="form-control form-control--medium ${t?"form-control--has-label":""} ${r?"form-control--has-help-text":""}">
2056
2056
 
@@ -2274,7 +2274,7 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
2274
2274
  </zn-dialog>
2275
2275
  `:B}
2276
2276
 
2277
- </div>`}};_e.styles=[z(Se),z(u1)],_e.dependencies={"zn-icon":ne,"zn-button":$e,"zn-dialog":_a,"zn-input":nt,"zn-select":Be,"zn-option":ot},_e.freeInputLibraries=new Set(["gravatar","libravatar","avatar"]),c([d()],_e.prototype,"name",2),c([d()],_e.prototype,"icon",2),c([d()],_e.prototype,"label",2),c([d()],_e.prototype,"library",2),c([d()],_e.prototype,"color",2),c([d({type:Boolean,attribute:"no-color"})],_e.prototype,"noColor",2),c([d({type:Boolean,attribute:"no-library"})],_e.prototype,"noLibrary",2),c([d({attribute:"help-text"})],_e.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],_e.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],_e.prototype,"required",2),c([d({type:Boolean,attribute:"trigger-submit"})],_e.prototype,"triggerSubmit",2),c([d({type:Boolean,attribute:"allow-upload"})],_e.prototype,"allowUpload",2),c([d()],_e.prototype,"accept",2),c([d({reflect:!0})],_e.prototype,"form",2),c([Ce("icon")],_e.prototype,"defaultValue",2),c([R()],_e.prototype,"_dialogOpen",2),c([R()],_e.prototype,"_searchQuery",2),c([R()],_e.prototype,"_iconList",2),c([R()],_e.prototype,"_filteredIcons",2),c([R()],_e.prototype,"_pendingIcon",2),c([R()],_e.prototype,"_pendingLibrary",2),c([R()],_e.prototype,"_pendingColor",2),c([R()],_e.prototype,"_pendingFile",2),c([R()],_e.prototype,"_pendingFileUrl",2),c([R()],_e.prototype,"_mode",2),c([R()],_e.prototype,"_file",2),c([R()],_e.prototype,"_fileUrl",2),c([F("zn-dialog")],_e.prototype,"_dialog",2),c([F(".icon-picker__file-input")],_e.prototype,"_fileInput",2);var vs=_e;var Q4=vs;vs.define("zn-icon-picker");var m1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;width:100%}.ai{display:flex;width:100%;flex-direction:row;gap:10px}.ai:not(.ai--editing) .ai__input::part(base),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){background-color:transparent;border-color:transparent;box-shadow:none;opacity:1;cursor:initial}.ai:not(.ai--editing) .ai__input::part(input){line-height:var(--zn-line-height-looser)}.ai:not(.ai--editing) .ai__input::part(display-input){color:rgb(var(--zn-text))}.ai:not(.ai--editing) .ai__input::part(input),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){padding:0;color:rgb(var(--zn-text));text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--editing) .ai__input::part(textarea){padding-top:8px;box-shadow:none;text-decoration:none}.ai:not(.ai--editing) .ai__input::part(expand-icon){display:none}.ai:not(.ai--editing) .ai__input::part(form-control-help-text){display:none}.ai:not(.ai--editing):hover .button--edit{display:inline-block}.ai__input::part(form-control-input){margin:0}.ai__input{height:unset;opacity:1}.ai__input[dir=rtl]::part(input),.ai__input[dir=rtl]::part(textarea),.ai__input[dir=rtl]::part(combobox){text-align:left}.ai:not(.ai--editing) .ai__input::part(input)::-webkit-inner-spin-button,.ai:not(.ai--editing) .ai__input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ai--padded{padding:var(--zn-spacing-large)}.ai--inline{display:flex;flex-direction:row;align-items:start;gap:5px}@container (min-width:480px){.ai--inline{align-items:center}}.ai--inline .ai__input{width:100%}.ai--inline .ai__left{width:100%;display:flex;flex-direction:row;justify-content:flex-end}@container (max-width:479px){.ai--inline .ai__left{justify-content:flex-start;flex-direction:column}}.ai--editing .ai__right{display:flex !important}.ai__left{display:flex;flex-direction:column;gap:5px;width:100%}.ai--masked:not(.ai--editing) .ai__input{display:none}.ai__reveal{line-height:var(--zn-line-height-looser);color:rgb(var(--zn-text))}.ai__reveal::part(base){width:100%;text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--disabled) .ai__left{cursor:pointer}.ai__description{font-size:12px;font-weight:500;line-height:18px;color:rgb(var(--zn-text))}.ai__right{font-size:12px;color:rgb(var(--zn-primary));font-weight:500;cursor:pointer;flex-direction:row;gap:10px;align-items:center;justify-content:flex-end}.ai__right .button--edit{display:none}.ai--disabled:not(.ai--editing) .ai__input::part(input),.ai--disabled:not(.ai--editing) .ai__input::part(combobox),.ai--disabled:not(.ai--editing) .ai__input::part(textarea){text-decoration:none;caret-color:transparent;border-radius:0}.ai--disabled:not(.ai--editing) .ai__reveal::part(base){text-decoration:none}.ai--disabled:not(.ai--editing) .ai__input::part(display-input){cursor:text}.ai--disabled:not(.ai--editing) .ai__right{display:none !important}zn-textarea::part(textarea){resize:none}`;var de=class extends k{constructor(){super(...arguments);this.formControlController=new re(this,{defaultValue:t=>t.defaultValue,value:t=>{if(t.multiple){let r=typeof t.value=="string"?t.value.split(" ").filter(n=>n!==""):t.value;return r.length>0?r:""}return t.value}});this.hasSlotController=new Y(this,"help-text","[default]");this.conditionalController=new ms(this);this.value="";this.displayValue="";this.clearOnEdit=!1;this.conditional="";this.size="medium";this.inputType="text";this.slashItems=[];this.slashPreset="";this.slashTrigger="/";this.slashHeading="Insert";this.slashHideKeys=!1;this.slashRecentKey="";this.options={};this.iconPosition="none";this.helpText="";this.dir="auto";this.mouseEventHandler=t=>{this.isEditing&&!this.contains(t.target)&&((Array.isArray(this.value)?JSON.stringify(this.value)!==JSON.stringify(this._editStartValue):this.value!==this._editStartValue)||(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur()))};this.escKeyHandler=t=>{t.key==="Escape"&&this.isEditing&&(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur())};this.submitKeyHandler=t=>{t.key==="Enter"&&this.isEditing&&!t.shiftKey&&(this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit(),this.input.blur())};this.captureMouseDown=t=>{this.disabled&&!this.isEditing&&t.stopPropagation()};this.captureKeyDown=t=>{this.disabled&&!this.isEditing&&(t.stopPropagation(),t.preventDefault())};this.handleEditClick=t=>{t.preventDefault(),t.stopPropagation(),!this.disabled&&(this.isEditing||(this._valueBeforeEdit=this.value,this.clearOnEdit&&(this.value=this.multiple?[]:""),this._editStartValue=this.value),this.isEditing=!0)};this.handleSubmitClick=t=>{t.preventDefault(),this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit()};this.handleCancelClick=t=>{t.preventDefault(),this.isEditing=!1,this.value=this._valueBeforeEdit};this.handleBlur=()=>{this.hasFocus=!1};this.handleInput=t=>{this.disabled||!this.isEditing||(this.value=t.target.value,this.emit("zn-input"))};this.handleSlotChange=async()=>{await this.updateComplete,this.input instanceof Be&&this.moveSlottedOptionsToSelect()}}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.escKeyHandler),document.addEventListener("keydown",this.submitKeyHandler),document.addEventListener("click",this.mouseEventHandler),this.addEventListener("mousedown",this.captureMouseDown,{capture:!0}),this.addEventListener("keydown",this.captureKeyDown,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.escKeyHandler),document.removeEventListener("keydown",this.submitKeyHandler),document.removeEventListener("click",this.mouseEventHandler),this.removeEventListener("mousedown",this.captureMouseDown,!0),this.removeEventListener("keydown",this.captureKeyDown,!0)}async firstUpdated(){await this.updateComplete,this.input.addEventListener("onclick",this.handleEditClick),this.conditionalController.setup()}willUpdate(t){(t.has("value")||t.has("multiple"))&&(this.multiple&&typeof this.value=="string"?this.value=this.value.split(" ").filter(r=>r!==""):!this.multiple&&Array.isArray(this.value)&&(this.value=this.value.join(" ")))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}async handleIsEditingChange(){await this.updateComplete,this.input instanceof Be&&!this.isEditing&&await this.input.hide(),this.conditionalController.check()}moveSlottedOptionsToSelect(){if(!(this.input instanceof Be))return;Array.from(this.querySelectorAll("zn-option")).forEach(r=>{this.input.appendChild(r)})}render(){let t=this.editText,r=this.hasSlotController.test("help-text"),n=this.helpText?!0:r;Object.keys(this.options).length>0&&(this.inputType="select"),this.selectProvider&&(this.inputType="data-select"),this.freeText&&!this.selectProvider&&(this.inputType="select");let a;switch(this.inputType){case"select":a=this._getSelectInput();break;case"data-select":a=this._getDataSelectInput();break;case"number":a=this._getNumberInput();break;case"textarea":a=this._getTextAreaInput();break;default:a=this._getTextInput()}return u`
2277
+ </div>`}};_e.styles=[z(Se),z(u1)],_e.dependencies={"zn-icon":ne,"zn-button":$e,"zn-dialog":ka,"zn-input":nt,"zn-select":Be,"zn-option":ot},_e.freeInputLibraries=new Set(["gravatar","libravatar","avatar"]),c([d()],_e.prototype,"name",2),c([d()],_e.prototype,"icon",2),c([d()],_e.prototype,"label",2),c([d()],_e.prototype,"library",2),c([d()],_e.prototype,"color",2),c([d({type:Boolean,attribute:"no-color"})],_e.prototype,"noColor",2),c([d({type:Boolean,attribute:"no-library"})],_e.prototype,"noLibrary",2),c([d({attribute:"help-text"})],_e.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],_e.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],_e.prototype,"required",2),c([d({type:Boolean,attribute:"trigger-submit"})],_e.prototype,"triggerSubmit",2),c([d({type:Boolean,attribute:"allow-upload"})],_e.prototype,"allowUpload",2),c([d()],_e.prototype,"accept",2),c([d({reflect:!0})],_e.prototype,"form",2),c([Ce("icon")],_e.prototype,"defaultValue",2),c([R()],_e.prototype,"_dialogOpen",2),c([R()],_e.prototype,"_searchQuery",2),c([R()],_e.prototype,"_iconList",2),c([R()],_e.prototype,"_filteredIcons",2),c([R()],_e.prototype,"_pendingIcon",2),c([R()],_e.prototype,"_pendingLibrary",2),c([R()],_e.prototype,"_pendingColor",2),c([R()],_e.prototype,"_pendingFile",2),c([R()],_e.prototype,"_pendingFileUrl",2),c([R()],_e.prototype,"_mode",2),c([R()],_e.prototype,"_file",2),c([R()],_e.prototype,"_fileUrl",2),c([F("zn-dialog")],_e.prototype,"_dialog",2),c([F(".icon-picker__file-input")],_e.prototype,"_fileInput",2);var vs=_e;var Q4=vs;vs.define("zn-icon-picker");var m1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;width:100%}.ai{display:flex;width:100%;flex-direction:row;gap:10px}.ai:not(.ai--editing) .ai__input::part(base),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){background-color:transparent;border-color:transparent;box-shadow:none;opacity:1;cursor:initial}.ai:not(.ai--editing) .ai__input::part(input){line-height:var(--zn-line-height-looser)}.ai:not(.ai--editing) .ai__input::part(display-input){color:rgb(var(--zn-text))}.ai:not(.ai--editing) .ai__input::part(input),.ai:not(.ai--editing) .ai__input::part(combobox),.ai:not(.ai--editing) .ai__input::part(textarea){padding:0;color:rgb(var(--zn-text));text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--editing) .ai__input::part(textarea){padding-top:8px;box-shadow:none;text-decoration:none}.ai:not(.ai--editing) .ai__input::part(expand-icon){display:none}.ai:not(.ai--editing) .ai__input::part(form-control-help-text){display:none}.ai:not(.ai--editing):hover .button--edit{display:inline-block}.ai__input::part(form-control-input){margin:0}.ai__input{height:unset;opacity:1}.ai__input[dir=rtl]::part(input),.ai__input[dir=rtl]::part(textarea),.ai__input[dir=rtl]::part(combobox){text-align:left}.ai:not(.ai--editing) .ai__input::part(input)::-webkit-inner-spin-button,.ai:not(.ai--editing) .ai__input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ai--padded{padding:var(--zn-spacing-large)}.ai--inline{display:flex;flex-direction:row;align-items:start;gap:5px}@container (min-width:480px){.ai--inline{align-items:center}}.ai--inline .ai__input{width:100%}.ai--inline .ai__left{width:100%;display:flex;flex-direction:row;justify-content:flex-end}@container (max-width:479px){.ai--inline .ai__left{justify-content:flex-start;flex-direction:column}}.ai--editing .ai__right{display:flex !important}.ai__left{display:flex;flex-direction:column;gap:5px;width:100%}.ai--masked:not(.ai--editing) .ai__input{display:none}.ai__reveal{line-height:var(--zn-line-height-looser);color:rgb(var(--zn-text))}.ai__reveal::part(base){width:100%;text-decoration:underline;text-decoration-style:dashed;text-decoration-color:rgb(var(--zn-primary),0.5);text-underline-offset:3px}.ai:not(.ai--disabled) .ai__left{cursor:pointer}.ai__description{font-size:12px;font-weight:500;line-height:18px;color:rgb(var(--zn-text))}.ai__right{font-size:12px;color:rgb(var(--zn-primary));font-weight:500;cursor:pointer;flex-direction:row;gap:10px;align-items:center;justify-content:flex-end}.ai__right .button--edit{display:none}.ai--disabled:not(.ai--editing) .ai__input::part(input),.ai--disabled:not(.ai--editing) .ai__input::part(combobox),.ai--disabled:not(.ai--editing) .ai__input::part(textarea){text-decoration:none;caret-color:transparent;border-radius:0}.ai--disabled:not(.ai--editing) .ai__reveal::part(base){text-decoration:none}.ai--disabled:not(.ai--editing) .ai__input::part(display-input){cursor:text}.ai--disabled:not(.ai--editing) .ai__right{display:none !important}zn-textarea::part(textarea){resize:none}`;var de=class extends k{constructor(){super(...arguments);this.formControlController=new re(this,{defaultValue:t=>t.defaultValue,value:t=>{if(t.multiple){let r=typeof t.value=="string"?t.value.split(" ").filter(n=>n!==""):t.value;return r.length>0?r:""}return t.value}});this.hasSlotController=new Y(this,"help-text","[default]");this.conditionalController=new ms(this);this.value="";this.displayValue="";this.clearOnEdit=!1;this.conditional="";this.size="medium";this.inputType="text";this.slashItems=[];this.slashPreset="";this.slashTrigger="/";this.slashHeading="Insert";this.slashHideKeys=!1;this.slashRecentKey="";this.options={};this.iconPosition="none";this.helpText="";this.dir="auto";this.mouseEventHandler=t=>{this.isEditing&&!this.contains(t.target)&&((Array.isArray(this.value)?JSON.stringify(this.value)!==JSON.stringify(this._editStartValue):this.value!==this._editStartValue)||(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur()))};this.escKeyHandler=t=>{t.key==="Escape"&&this.isEditing&&(this.isEditing=!1,this.value=this._valueBeforeEdit,this.input.blur())};this.submitKeyHandler=t=>{t.key==="Enter"&&this.isEditing&&!t.shiftKey&&(this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit(),this.input.blur())};this.captureMouseDown=t=>{this.disabled&&!this.isEditing&&t.stopPropagation()};this.captureKeyDown=t=>{this.disabled&&!this.isEditing&&(t.stopPropagation(),t.preventDefault())};this.handleEditClick=t=>{t.preventDefault(),t.stopPropagation(),!this.disabled&&(this.isEditing||(this._valueBeforeEdit=this.value,this.clearOnEdit&&(this.value=this.multiple?[]:""),this._editStartValue=this.value),this.isEditing=!0)};this.handleSubmitClick=t=>{t.preventDefault(),this.isEditing=!1,this.emit("zn-submit",{detail:{value:this.value,element:this}}),this.formControlController.submit()};this.handleCancelClick=t=>{t.preventDefault(),this.isEditing=!1,this.value=this._valueBeforeEdit};this.handleBlur=()=>{this.hasFocus=!1};this.handleInput=t=>{this.disabled||!this.isEditing||(this.value=t.target.value,this.emit("zn-input"))};this.handleSlotChange=async()=>{await this.updateComplete,this.input instanceof Be&&this.moveSlottedOptionsToSelect()}}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.escKeyHandler),document.addEventListener("keydown",this.submitKeyHandler),document.addEventListener("click",this.mouseEventHandler),this.addEventListener("mousedown",this.captureMouseDown,{capture:!0}),this.addEventListener("keydown",this.captureKeyDown,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.escKeyHandler),document.removeEventListener("keydown",this.submitKeyHandler),document.removeEventListener("click",this.mouseEventHandler),this.removeEventListener("mousedown",this.captureMouseDown,!0),this.removeEventListener("keydown",this.captureKeyDown,!0)}async firstUpdated(){await this.updateComplete,this.input.addEventListener("onclick",this.handleEditClick),this.conditionalController.setup()}willUpdate(t){(t.has("value")||t.has("multiple"))&&(this.multiple&&typeof this.value=="string"?this.value=this.value.split(" ").filter(r=>r!==""):!this.multiple&&Array.isArray(this.value)&&(this.value=this.value.join(" ")))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}async handleIsEditingChange(){await this.updateComplete,this.input instanceof Be&&!this.isEditing&&await this.input.hide(),this.conditionalController.check()}moveSlottedOptionsToSelect(){if(!(this.input instanceof Be))return;Array.from(this.querySelectorAll("zn-option")).forEach(r=>{this.input.appendChild(r)})}render(){let t=this.editText,r=this.hasSlotController.test("help-text"),n=this.helpText?!0:r;Object.keys(this.options).length>0&&(this.inputType="select"),this.selectProvider&&(this.inputType="data-select"),this.freeText&&!this.selectProvider&&(this.inputType="select");let a;switch(this.inputType){case"select":a=this._getSelectInput();break;case"data-select":a=this._getDataSelectInput();break;case"number":a=this._getNumberInput();break;case"textarea":a=this._getTextAreaInput();break;default:a=this._getTextInput()}return u`
2278
2278
  <div class="${M({ai:!0,"ai--editing":this.isEditing,"ai--focused":this.hasFocus,"ai--disabled":this.disabled,"ai--inline":this.inline,"ai--padded":this.padded,"ai--masked":!!this.displayValue})}" dir="ltr">
2279
2279
 
2280
2280
  <div class="ai__left" @click="${this.disabled?void 0:this.handleEditClick}">
@@ -2858,15 +2858,15 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
2858
2858
  <zn-input type="text"
2859
2859
  class="query-builder__value"
2860
2860
  @zn-input="${a=>this._updateValue(t,a)}">
2861
- </zn-input>`;return qt(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Zr.styles=[z(fs),z($1)],Zr.dependencies={"zn-button":$e,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".bulk-actions")],Zr.prototype,"container",2),c([F(".add-rule")],Zr.prototype,"addRule",2),c([F("input#main-input")],Zr.prototype,"input",2),c([d()],Zr.prototype,"name",2),c([d()],Zr.prototype,"value",2),c([d({type:Array})],Zr.prototype,"actions",2);var u8=Zr;Zr.define("zn-bulk-actions");var m8=()=>{let o="attachment",i=new Date().getTime();return`${o}_${i}`},Gl=class{constructor(i,t){this._attachmentContainer=document.createElement("div");this._quill=i,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let i=this._fileHolder.files[0];this.addAttachment(i)}addAttachment(i,t){let r=m8(),n=a=>{this._insertAttachment({dataUrl:a,file:i,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(i)}typeof this._options.upload=="function"&&this._options.upload(i).then(async({path:a,url:s})=>{await this._uploadAttachment(i,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let i=this._attachmentContainer;i.id="attachment-container",i.style.display="flex",i.style.flexWrap="wrap",i.style.gap="10px",i.style.position="absolute",i.style.bottom="0",i.style.left="0",i.style.right="0",i.style.padding="10px",this._quill.container.appendChild(i)}_insertAttachment({dataUrl:i,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(i,t,r))}_updateAttachment(i,t,r){let n=this._quill.container.querySelector(`#${i}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,p=l?JSON.parse(l):[];p.push(r),s.value=JSON.stringify(p)}}_createAttachment(i,t,r){let n=document.createElement("a");n.setAttribute("href",i),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let i=this._options.attachmentInput;i&&(i.value="")}_removeAttachment(i){let t=this._quill.container.querySelector(`#${i}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(i,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",i.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(i)})}};var E_=_r(ei(),1);var MC=typeof global=="object"&&global&&global.Object===Object&&global,Ep=MC;var LC=typeof self=="object"&&self&&self.Object===Object&&self,qC=Ep||LC||Function("return this")(),Ft=qC;var IC=Ft.Symbol,Oi=IC;var hx=Object.prototype,DC=hx.hasOwnProperty,RC=hx.toString,rc=Oi?Oi.toStringTag:void 0;function NC(o){var i=DC.call(o,rc),t=o[rc];try{o[rc]=void 0;var r=!0}catch{}var n=RC.call(o);return r&&(i?o[rc]=t:delete o[rc]),n}var ux=NC;var OC=Object.prototype,PC=OC.toString;function HC(o){return PC.call(o)}var mx=HC;var FC="[object Null]",BC="[object Undefined]",fx=Oi?Oi.toStringTag:void 0;function VC(o){return o==null?o===void 0?BC:FC:fx&&fx in Object(o)?ux(o):mx(o)}var hn=VC;function UC(o){return o!=null&&typeof o=="object"}var gr=UC;var jC=Array.isArray,Pi=jC;function GC(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}var Ar=GC;function WC(o){return o}var Tp=WC;var KC="[object AsyncFunction]",YC="[object Function]",QC="[object GeneratorFunction]",XC="[object Proxy]";function JC(o){if(!Ar(o))return!1;var i=hn(o);return i==YC||i==QC||i==KC||i==XC}var Ss=JC;var ZC=Ft["__core-js_shared__"],$p=ZC;var gx=(function(){var o=/[^.]+$/.exec($p&&$p.keys&&$p.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function eS(o){return!!gx&&gx in o}var bx=eS;var tS=Function.prototype,rS=tS.toString;function iS(o){if(o!=null){try{return rS.call(o)}catch{}try{return o+""}catch{}}return""}var to=iS;var nS=/[\\^$.*+?()[\]{}|]/g,oS=/^\[object .+?Constructor\]$/,aS=Function.prototype,sS=Object.prototype,lS=aS.toString,cS=sS.hasOwnProperty,dS=RegExp("^"+lS.call(cS).replace(nS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pS(o){if(!Ar(o)||bx(o))return!1;var i=Ss(o)?dS:oS;return i.test(to(o))}var vx=pS;function hS(o,i){return o?.[i]}var yx=hS;function uS(o,i){var t=yx(o,i);return vx(t)?t:void 0}var ti=uS;var mS=ti(Ft,"WeakMap"),Ap=mS;var xx=Object.create,fS=(function(){function o(){}return function(i){if(!Ar(i))return{};if(xx)return xx(i);o.prototype=i;var t=new o;return o.prototype=void 0,t}})(),wx=fS;function gS(o,i,t){switch(t.length){case 0:return o.call(i);case 1:return o.call(i,t[0]);case 2:return o.call(i,t[0],t[1]);case 3:return o.call(i,t[0],t[1],t[2])}return o.apply(i,t)}var zx=gS;function bS(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}var Mp=bS;var vS=800,yS=16,xS=Date.now;function wS(o){var i=0,t=0;return function(){var r=xS(),n=yS-(r-t);if(t=r,n>0){if(++i>=vS)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}var _x=wS;function zS(o){return function(){return o}}var kx=zS;var _S=(function(){try{var o=ti(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Es=_S;var kS=Es?function(o,i){return Es(o,"toString",{configurable:!0,enumerable:!1,value:kx(i),writable:!0})}:Tp,Cx=kS;var CS=_x(Cx),Sx=CS;function SS(o,i){for(var t=-1,r=o==null?0:o.length;++t<r&&i(o[t],t,o)!==!1;);return o}var Ex=SS;var ES=9007199254740991,TS=/^(?:0|[1-9]\d*)$/;function $S(o,i){var t=typeof o;return i=i??ES,!!i&&(t=="number"||t!="symbol"&&TS.test(o))&&o>-1&&o%1==0&&o<i}var Lp=$S;function AS(o,i,t){i=="__proto__"&&Es?Es(o,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[i]=t}var Ts=AS;function MS(o,i){return o===i||o!==o&&i!==i}var An=MS;var LS=Object.prototype,qS=LS.hasOwnProperty;function IS(o,i,t){var r=o[i];(!(qS.call(o,i)&&An(r,t))||t===void 0&&!(i in o))&&Ts(o,i,t)}var qp=IS;function DS(o,i,t,r){var n=!t;t||(t={});for(var a=-1,s=i.length;++a<s;){var l=i[a],p=r?r(t[l],o[l],l,t,o):void 0;p===void 0&&(p=o[l]),n?Ts(t,l,p):qp(t,l,p)}return t}var Mn=DS;var Tx=Math.max;function RS(o,i,t){return i=Tx(i===void 0?o.length-1:i,0),function(){for(var r=arguments,n=-1,a=Tx(r.length-i,0),s=Array(a);++n<a;)s[n]=r[i+n];n=-1;for(var l=Array(i+1);++n<i;)l[n]=r[n];return l[i]=t(s),zx(o,this,l)}}var $x=RS;function NS(o,i){return Sx($x(o,i,Tp),o+"")}var Ax=NS;var OS=9007199254740991;function PS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=OS}var Ip=PS;function HS(o){return o!=null&&Ip(o.length)&&!Ss(o)}var Lo=HS;function FS(o,i,t){if(!Ar(t))return!1;var r=typeof i;return(r=="number"?Lo(t)&&Lp(i,t.length):r=="string"&&i in t)?An(t[i],o):!1}var Mx=FS;function BS(o){return Ax(function(i,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=o.length>3&&typeof a=="function"?(n--,a):void 0,s&&Mx(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),i=Object(i);++r<n;){var l=t[r];l&&o(i,l,r,a)}return i})}var Lx=BS;var VS=Object.prototype;function US(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||VS;return o===t}var $s=US;function jS(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}var qx=jS;var GS="[object Arguments]";function WS(o){return gr(o)&&hn(o)==GS}var Ym=WS;var Ix=Object.prototype,KS=Ix.hasOwnProperty,YS=Ix.propertyIsEnumerable,QS=Ym((function(){return arguments})())?Ym:function(o){return gr(o)&&KS.call(o,"callee")&&!YS.call(o,"callee")},ic=QS;function XS(){return!1}var Dx=XS;var Ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rx=Ox&&typeof module=="object"&&module&&!module.nodeType&&module,JS=Rx&&Rx.exports===Ox,Nx=JS?Ft.Buffer:void 0,ZS=Nx?Nx.isBuffer:void 0,e7=ZS||Dx,ro=e7;var t7="[object Arguments]",r7="[object Array]",i7="[object Boolean]",n7="[object Date]",o7="[object Error]",a7="[object Function]",s7="[object Map]",l7="[object Number]",c7="[object Object]",d7="[object RegExp]",p7="[object Set]",h7="[object String]",u7="[object WeakMap]",m7="[object ArrayBuffer]",f7="[object DataView]",g7="[object Float32Array]",b7="[object Float64Array]",v7="[object Int8Array]",y7="[object Int16Array]",x7="[object Int32Array]",w7="[object Uint8Array]",z7="[object Uint8ClampedArray]",_7="[object Uint16Array]",k7="[object Uint32Array]",lt={};lt[g7]=lt[b7]=lt[v7]=lt[y7]=lt[x7]=lt[w7]=lt[z7]=lt[_7]=lt[k7]=!0;lt[t7]=lt[r7]=lt[m7]=lt[i7]=lt[f7]=lt[n7]=lt[o7]=lt[a7]=lt[s7]=lt[l7]=lt[c7]=lt[d7]=lt[p7]=lt[h7]=lt[u7]=!1;function C7(o){return gr(o)&&Ip(o.length)&&!!lt[hn(o)]}var Px=C7;function S7(o){return function(i){return o(i)}}var As=S7;var Hx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nc=Hx&&typeof module=="object"&&module&&!module.nodeType&&module,E7=nc&&nc.exports===Hx,Qm=E7&&Ep.process,T7=(function(){try{var o=nc&&nc.require&&nc.require("util").types;return o||Qm&&Qm.binding&&Qm.binding("util")}catch{}})(),io=T7;var Fx=io&&io.isTypedArray,$7=Fx?As(Fx):Px,Ms=$7;var A7=Object.prototype,M7=A7.hasOwnProperty;function L7(o,i){var t=Pi(o),r=!t&&ic(o),n=!t&&!r&&ro(o),a=!t&&!r&&!n&&Ms(o),s=t||r||n||a,l=s?qx(o.length,String):[],p=l.length;for(var h in o)(i||M7.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Lp(h,p)))&&l.push(h);return l}var Dp=L7;function q7(o,i){return function(t){return o(i(t))}}var Rp=q7;var I7=Rp(Object.keys,Object),Bx=I7;var D7=Object.prototype,R7=D7.hasOwnProperty;function N7(o){if(!$s(o))return Bx(o);var i=[];for(var t in Object(o))R7.call(o,t)&&t!="constructor"&&i.push(t);return i}var Vx=N7;function O7(o){return Lo(o)?Dp(o):Vx(o)}var Ls=O7;function P7(o){var i=[];if(o!=null)for(var t in Object(o))i.push(t);return i}var Ux=P7;var H7=Object.prototype,F7=H7.hasOwnProperty;function B7(o){if(!Ar(o))return Ux(o);var i=$s(o),t=[];for(var r in o)r=="constructor"&&(i||!F7.call(o,r))||t.push(r);return t}var jx=B7;function V7(o){return Lo(o)?Dp(o,!0):jx(o)}var Ln=V7;var U7=ti(Object,"create"),no=U7;function j7(){this.__data__=no?no(null):{},this.size=0}var Gx=j7;function G7(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}var Wx=G7;var W7="__lodash_hash_undefined__",K7=Object.prototype,Y7=K7.hasOwnProperty;function Q7(o){var i=this.__data__;if(no){var t=i[o];return t===W7?void 0:t}return Y7.call(i,o)?i[o]:void 0}var Kx=Q7;var X7=Object.prototype,J7=X7.hasOwnProperty;function Z7(o){var i=this.__data__;return no?i[o]!==void 0:J7.call(i,o)}var Yx=Z7;var eE="__lodash_hash_undefined__";function tE(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=no&&i===void 0?eE:i,this}var Qx=tE;function qs(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}qs.prototype.clear=Gx;qs.prototype.delete=Wx;qs.prototype.get=Kx;qs.prototype.has=Yx;qs.prototype.set=Qx;var Xm=qs;function rE(){this.__data__=[],this.size=0}var Xx=rE;function iE(o,i){for(var t=o.length;t--;)if(An(o[t][0],i))return t;return-1}var qo=iE;var nE=Array.prototype,oE=nE.splice;function aE(o){var i=this.__data__,t=qo(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():oE.call(i,t,1),--this.size,!0}var Jx=aE;function sE(o){var i=this.__data__,t=qo(i,o);return t<0?void 0:i[t][1]}var Zx=sE;function lE(o){return qo(this.__data__,o)>-1}var ew=lE;function cE(o,i){var t=this.__data__,r=qo(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}var tw=cE;function Is(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Is.prototype.clear=Xx;Is.prototype.delete=Jx;Is.prototype.get=Zx;Is.prototype.has=ew;Is.prototype.set=tw;var Io=Is;var dE=ti(Ft,"Map"),Do=dE;function pE(){this.size=0,this.__data__={hash:new Xm,map:new(Do||Io),string:new Xm}}var rw=pE;function hE(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}var iw=hE;function uE(o,i){var t=o.__data__;return iw(i)?t[typeof i=="string"?"string":"hash"]:t.map}var Ro=uE;function mE(o){var i=Ro(this,o).delete(o);return this.size-=i?1:0,i}var nw=mE;function fE(o){return Ro(this,o).get(o)}var ow=fE;function gE(o){return Ro(this,o).has(o)}var aw=gE;function bE(o,i){var t=Ro(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}var sw=bE;function Ds(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ds.prototype.clear=rw;Ds.prototype.delete=nw;Ds.prototype.get=ow;Ds.prototype.has=aw;Ds.prototype.set=sw;var Np=Ds;function vE(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}var Op=vE;var yE=Rp(Object.getPrototypeOf,Object),Rs=yE;var xE="[object Object]",wE=Function.prototype,zE=Object.prototype,lw=wE.toString,_E=zE.hasOwnProperty,kE=lw.call(Object);function CE(o){if(!gr(o)||hn(o)!=xE)return!1;var i=Rs(o);if(i===null)return!0;var t=_E.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&lw.call(t)==kE}var cw=CE;function SE(){this.__data__=new Io,this.size=0}var dw=SE;function EE(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}var pw=EE;function TE(o){return this.__data__.get(o)}var hw=TE;function $E(o){return this.__data__.has(o)}var uw=$E;var AE=200;function ME(o,i){var t=this.__data__;if(t instanceof Io){var r=t.__data__;if(!Do||r.length<AE-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Np(r)}return t.set(o,i),this.size=t.size,this}var mw=ME;function Ns(o){var i=this.__data__=new Io(o);this.size=i.size}Ns.prototype.clear=dw;Ns.prototype.delete=pw;Ns.prototype.get=hw;Ns.prototype.has=uw;Ns.prototype.set=mw;var No=Ns;function LE(o,i){return o&&Mn(i,Ls(i),o)}var fw=LE;function qE(o,i){return o&&Mn(i,Ln(i),o)}var gw=qE;var xw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bw=xw&&typeof module=="object"&&module&&!module.nodeType&&module,IE=bw&&bw.exports===xw,vw=IE?Ft.Buffer:void 0,yw=vw?vw.allocUnsafe:void 0;function DE(o,i){if(i)return o.slice();var t=o.length,r=yw?yw(t):new o.constructor(t);return o.copy(r),r}var Pp=DE;function RE(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}var ww=RE;function NE(){return[]}var Hp=NE;var OE=Object.prototype,PE=OE.propertyIsEnumerable,zw=Object.getOwnPropertySymbols,HE=zw?function(o){return o==null?[]:(o=Object(o),ww(zw(o),function(i){return PE.call(o,i)}))}:Hp,Os=HE;function FE(o,i){return Mn(o,Os(o),i)}var _w=FE;var BE=Object.getOwnPropertySymbols,VE=BE?function(o){for(var i=[];o;)Op(i,Os(o)),o=Rs(o);return i}:Hp,Fp=VE;function UE(o,i){return Mn(o,Fp(o),i)}var kw=UE;function jE(o,i,t){var r=i(o);return Pi(o)?r:Op(r,t(o))}var Bp=jE;function GE(o){return Bp(o,Ls,Os)}var oc=GE;function WE(o){return Bp(o,Ln,Fp)}var Cw=WE;var KE=ti(Ft,"DataView"),Vp=KE;var YE=ti(Ft,"Promise"),Up=YE;var QE=ti(Ft,"Set"),jp=QE;var Sw="[object Map]",XE="[object Object]",Ew="[object Promise]",Tw="[object Set]",$w="[object WeakMap]",Aw="[object DataView]",JE=to(Vp),ZE=to(Do),eT=to(Up),tT=to(jp),rT=to(Ap),Ia=hn;(Vp&&Ia(new Vp(new ArrayBuffer(1)))!=Aw||Do&&Ia(new Do)!=Sw||Up&&Ia(Up.resolve())!=Ew||jp&&Ia(new jp)!=Tw||Ap&&Ia(new Ap)!=$w)&&(Ia=function(o){var i=hn(o),t=i==XE?o.constructor:void 0,r=t?to(t):"";if(r)switch(r){case JE:return Aw;case ZE:return Sw;case eT:return Ew;case tT:return Tw;case rT:return $w}return i});var oo=Ia;var iT=Object.prototype,nT=iT.hasOwnProperty;function oT(o){var i=o.length,t=new o.constructor(i);return i&&typeof o[0]=="string"&&nT.call(o,"index")&&(t.index=o.index,t.input=o.input),t}var Mw=oT;var aT=Ft.Uint8Array,Ps=aT;function sT(o){var i=new o.constructor(o.byteLength);return new Ps(i).set(new Ps(o)),i}var Hs=sT;function lT(o,i){var t=i?Hs(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}var Lw=lT;var cT=/\w*$/;function dT(o){var i=new o.constructor(o.source,cT.exec(o));return i.lastIndex=o.lastIndex,i}var qw=dT;var Iw=Oi?Oi.prototype:void 0,Dw=Iw?Iw.valueOf:void 0;function pT(o){return Dw?Object(Dw.call(o)):{}}var Rw=pT;function hT(o,i){var t=i?Hs(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}var Gp=hT;var uT="[object Boolean]",mT="[object Date]",fT="[object Map]",gT="[object Number]",bT="[object RegExp]",vT="[object Set]",yT="[object String]",xT="[object Symbol]",wT="[object ArrayBuffer]",zT="[object DataView]",_T="[object Float32Array]",kT="[object Float64Array]",CT="[object Int8Array]",ST="[object Int16Array]",ET="[object Int32Array]",TT="[object Uint8Array]",$T="[object Uint8ClampedArray]",AT="[object Uint16Array]",MT="[object Uint32Array]";function LT(o,i,t){var r=o.constructor;switch(i){case wT:return Hs(o);case uT:case mT:return new r(+o);case zT:return Lw(o,t);case _T:case kT:case CT:case ST:case ET:case TT:case $T:case AT:case MT:return Gp(o,t);case fT:return new r;case gT:case yT:return new r(o);case bT:return qw(o);case vT:return new r;case xT:return Rw(o)}}var Nw=LT;function qT(o){return typeof o.constructor=="function"&&!$s(o)?wx(Rs(o)):{}}var Wp=qT;var IT="[object Map]";function DT(o){return gr(o)&&oo(o)==IT}var Ow=DT;var Pw=io&&io.isMap,RT=Pw?As(Pw):Ow,Hw=RT;var NT="[object Set]";function OT(o){return gr(o)&&oo(o)==NT}var Fw=OT;var Bw=io&&io.isSet,PT=Bw?As(Bw):Fw,Vw=PT;var HT=1,FT=2,BT=4,Uw="[object Arguments]",VT="[object Array]",UT="[object Boolean]",jT="[object Date]",GT="[object Error]",jw="[object Function]",WT="[object GeneratorFunction]",KT="[object Map]",YT="[object Number]",Gw="[object Object]",QT="[object RegExp]",XT="[object Set]",JT="[object String]",ZT="[object Symbol]",e$="[object WeakMap]",t$="[object ArrayBuffer]",r$="[object DataView]",i$="[object Float32Array]",n$="[object Float64Array]",o$="[object Int8Array]",a$="[object Int16Array]",s$="[object Int32Array]",l$="[object Uint8Array]",c$="[object Uint8ClampedArray]",d$="[object Uint16Array]",p$="[object Uint32Array]",tt={};tt[Uw]=tt[VT]=tt[t$]=tt[r$]=tt[UT]=tt[jT]=tt[i$]=tt[n$]=tt[o$]=tt[a$]=tt[s$]=tt[KT]=tt[YT]=tt[Gw]=tt[QT]=tt[XT]=tt[JT]=tt[ZT]=tt[l$]=tt[c$]=tt[d$]=tt[p$]=!0;tt[GT]=tt[jw]=tt[e$]=!1;function Kp(o,i,t,r,n,a){var s,l=i&HT,p=i&FT,h=i&BT;if(t&&(s=n?t(o,r,n,a):t(o)),s!==void 0)return s;if(!Ar(o))return o;var m=Pi(o);if(m){if(s=Mw(o),!l)return Mp(o,s)}else{var f=oo(o),b=f==jw||f==WT;if(ro(o))return Pp(o,l);if(f==Gw||f==Uw||b&&!n){if(s=p||b?{}:Wp(o),!l)return p?kw(o,gw(s,o)):_w(o,fw(s,o))}else{if(!tt[f])return n?o:{};s=Nw(o,f,l)}}a||(a=new No);var g=a.get(o);if(g)return g;a.set(o,s),Vw(o)?o.forEach(function(S){s.add(Kp(S,i,t,S,o,a))}):Hw(o)&&o.forEach(function(S,T){s.set(T,Kp(S,i,t,T,o,a))});var v=h?p?Cw:oc:p?Ln:Ls,y=m?void 0:v(o);return Ex(y||o,function(S,T){y&&(T=S,S=o[T]),qp(s,T,Kp(S,i,t,T,o,a))}),s}var Ww=Kp;var h$=1,u$=4;function m$(o){return Ww(o,h$|u$)}var qn=m$;var f$="__lodash_hash_undefined__";function g$(o){return this.__data__.set(o,f$),this}var Kw=g$;function b$(o){return this.__data__.has(o)}var Yw=b$;function Yp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Np;++i<t;)this.add(o[i])}Yp.prototype.add=Yp.prototype.push=Kw;Yp.prototype.has=Yw;var Qw=Yp;function v$(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}var Xw=v$;function y$(o,i){return o.has(i)}var Jw=y$;var x$=1,w$=2;function z$(o,i,t,r,n,a){var s=t&x$,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o),m=a.get(i);if(h&&m)return h==i&&m==o;var f=-1,b=!0,g=t&w$?new Qw:void 0;for(a.set(o,i),a.set(i,o);++f<l;){var v=o[f],y=i[f];if(r)var S=s?r(y,v,f,i,o,a):r(v,y,f,o,i,a);if(S!==void 0){if(S)continue;b=!1;break}if(g){if(!Xw(i,function(T,N){if(!Jw(g,N)&&(v===T||n(v,T,t,r,a)))return g.push(N)})){b=!1;break}}else if(!(v===y||n(v,y,t,r,a))){b=!1;break}}return a.delete(o),a.delete(i),b}var Qp=z$;function _$(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}var Zw=_$;function k$(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var ez=k$;var C$=1,S$=2,E$="[object Boolean]",T$="[object Date]",$$="[object Error]",A$="[object Map]",M$="[object Number]",L$="[object RegExp]",q$="[object Set]",I$="[object String]",D$="[object Symbol]",R$="[object ArrayBuffer]",N$="[object DataView]",tz=Oi?Oi.prototype:void 0,Jm=tz?tz.valueOf:void 0;function O$(o,i,t,r,n,a,s){switch(t){case N$:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case R$:return!(o.byteLength!=i.byteLength||!a(new Ps(o),new Ps(i)));case E$:case T$:case M$:return An(+o,+i);case $$:return o.name==i.name&&o.message==i.message;case L$:case I$:return o==i+"";case A$:var l=Zw;case q$:var p=r&C$;if(l||(l=ez),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=S$,s.set(o,i);var m=Qp(l(o),l(i),r,n,a,s);return s.delete(o),m;case D$:if(Jm)return Jm.call(o)==Jm.call(i)}return!1}var rz=O$;var P$=1,H$=Object.prototype,F$=H$.hasOwnProperty;function B$(o,i,t,r,n,a){var s=t&P$,l=oc(o),p=l.length,h=oc(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:F$.call(i,b)))return!1}var g=a.get(o),v=a.get(i);if(g&&v)return g==i&&v==o;var y=!0;a.set(o,i),a.set(i,o);for(var S=s;++f<p;){b=l[f];var T=o[b],N=i[b];if(r)var U=s?r(N,T,b,i,o,a):r(T,N,b,o,i,a);if(!(U===void 0?T===N||n(T,N,t,r,a):U)){y=!1;break}S||(S=b=="constructor")}if(y&&!S){var I=o.constructor,C=i.constructor;I!=C&&"constructor"in o&&"constructor"in i&&!(typeof I=="function"&&I instanceof I&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(o),a.delete(i),y}var iz=B$;var V$=1,nz="[object Arguments]",oz="[object Array]",Xp="[object Object]",U$=Object.prototype,az=U$.hasOwnProperty;function j$(o,i,t,r,n,a){var s=Pi(o),l=Pi(i),p=s?oz:oo(o),h=l?oz:oo(i);p=p==nz?Xp:p,h=h==nz?Xp:h;var m=p==Xp,f=h==Xp,b=p==h;if(b&&ro(o)){if(!ro(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new No),s||Ms(o)?Qp(o,i,t,r,n,a):rz(o,i,p,t,r,n,a);if(!(t&V$)){var g=m&&az.call(o,"__wrapped__"),v=f&&az.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new No),n(y,S,t,r,a)}}return b?(a||(a=new No),iz(o,i,t,r,n,a)):!1}var sz=j$;function lz(o,i,t,r,n){return o===i?!0:o==null||i==null||!gr(o)&&!gr(i)?o!==o&&i!==i:sz(o,i,t,r,lz,n)}var cz=lz;function G$(o){return function(i,t,r){for(var n=-1,a=Object(i),s=r(i),l=s.length;l--;){var p=s[o?l:++n];if(t(a[p],p,a)===!1)break}return i}}var dz=G$;var W$=dz(),pz=W$;function K$(o,i,t){(t!==void 0&&!An(o[i],t)||t===void 0&&!(i in o))&&Ts(o,i,t)}var ac=K$;function Y$(o){return gr(o)&&Lo(o)}var hz=Y$;function Q$(o,i){if(!(i==="constructor"&&typeof o[i]=="function")&&i!="__proto__")return o[i]}var sc=Q$;function X$(o){return Mn(o,Ln(o))}var uz=X$;function J$(o,i,t,r,n,a,s){var l=sc(o,t),p=sc(i,t),h=s.get(p);if(h){ac(o,t,h);return}var m=a?a(l,p,t+"",o,i,s):void 0,f=m===void 0;if(f){var b=Pi(p),g=!b&&ro(p),v=!b&&!g&&Ms(p);m=p,b||g||v?Pi(l)?m=l:hz(l)?m=Mp(l):g?(f=!1,m=Pp(p,!0)):v?(f=!1,m=Gp(p,!0)):m=[]:cw(p)||ic(p)?(m=l,ic(l)?m=uz(l):(!Ar(l)||Ss(l))&&(m=Wp(p))):f=!1}f&&(s.set(p,m),n(m,p,r,a,s),s.delete(p)),ac(o,t,m)}var mz=J$;function fz(o,i,t,r,n){o!==i&&pz(i,function(a,s){if(n||(n=new No),Ar(a))mz(o,i,s,t,fz,r,n);else{var l=r?r(sc(o,s),a,s+"",o,i,n):void 0;l===void 0&&(l=a),ac(o,s,l)}},Ln)}var gz=fz;function Z$(o,i){return cz(o,i)}var Da=Z$;var eA=Lx(function(o,i,t){gz(o,i,t)}),ri=eA;var dc={};h3(dc,{Attributor:()=>Vr,AttributorStore:()=>lc,BlockBlot:()=>Ra,ClassAttributor:()=>Bt,ContainerBlot:()=>js,EmbedBlot:()=>wt,InlineBlot:()=>Jp,LeafBlot:()=>Vt,ParentBlot:()=>ii,Registry:()=>Ho,Scope:()=>X,ScrollBlot:()=>cc,StyleAttributor:()=>ni,TextBlot:()=>Gs});var X=(o=>(o[o.TYPE=3]="TYPE",o[o.LEVEL=12]="LEVEL",o[o.ATTRIBUTE=13]="ATTRIBUTE",o[o.BLOT=14]="BLOT",o[o.INLINE=7]="INLINE",o[o.BLOCK=11]="BLOCK",o[o.BLOCK_BLOT=10]="BLOCK_BLOT",o[o.INLINE_BLOT=6]="INLINE_BLOT",o[o.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",o[o.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",o[o.ANY=15]="ANY",o))(X||{}),Vr=class{constructor(i,t,r={}){this.attrName=i,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(i){return Array.from(i.attributes).map(t=>t.name)}add(i,t){return this.canAdd(i,t)?(i.setAttribute(this.keyName,t),!0):!1}canAdd(i,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(i){i.removeAttribute(this.keyName)}value(i){let t=i.getAttribute(this.keyName);return this.canAdd(i,t)&&t?t:""}},Po=class extends Error{constructor(i){i="[Parchment] "+i,super(i),this.message=i,this.name=this.constructor.name}},yz=class ef{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(i,t=!1){if(i==null)return null;if(this.blots.has(i))return this.blots.get(i)||null;if(t){let r=null;try{r=i.parentNode}catch{return null}return this.find(r,t)}return null}create(i,t,r){let n=this.query(t);if(n==null)throw new Po(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(i,s,r);return ef.blots.set(l.domNode,l),l}find(i,t=!1){return ef.find(i,t)}query(i,t=X.ANY){let r;return typeof i=="string"?r=this.types[i]||this.attributes[i]:i instanceof Text||i.nodeType===Node.TEXT_NODE?r=this.types.text:typeof i=="number"?i&X.LEVEL&X.BLOCK?r=this.types.block:i&X.LEVEL&X.INLINE&&(r=this.types.inline):i instanceof Element&&((i.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[i.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...i){return i.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new Po("Invalid definition");if(r&&t.blotName==="abstract")throw new Po("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};yz.blots=new WeakMap;var Ho=yz;function bz(o,i){return(o.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${i}-`)===0)}var tf=class extends Vr{static keys(i){return(i.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(i,t){return this.canAdd(i,t)?(this.remove(i),i.classList.add(`${this.keyName}-${t}`),!0):!1}remove(i){bz(i,this.keyName).forEach(t=>{i.classList.remove(t)}),i.classList.length===0&&i.removeAttribute("class")}value(i){let t=(bz(i,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(i,t)?t:""}},Bt=tf;function Zm(o){let i=o.split("-"),t=i.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return i[0]+t}var rf=class extends Vr{static keys(i){return(i.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(i,t){return this.canAdd(i,t)?(i.style[Zm(this.keyName)]=t,!0):!1}remove(i){i.style[Zm(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")}value(i){let t=i.style[Zm(this.keyName)];return this.canAdd(i,t)?t:""}},ni=rf,nf=class{constructor(i){this.attributes={},this.domNode=i,this.build()}attribute(i,t){t?i.add(this.domNode,t)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])}build(){this.attributes={};let i=Ho.find(this.domNode);if(i==null)return;let t=Vr.keys(this.domNode),r=Bt.keys(this.domNode),n=ni.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=i.scroll.query(a,X.ATTRIBUTE);s instanceof Vr&&(this.attributes[s.attrName]=s)})}copy(i){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);i.format(t,r)})}move(i){this.copy(i),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((i,t)=>(i[t]=this.attributes[t].value(this.domNode),i),{})}},lc=nf,xz=class{constructor(i,t){this.scroll=i,this.domNode=t,Ho.blots.set(t,this),this.prev=null,this.next=null}static create(i){if(this.tagName==null)throw new Po("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof i=="string"?(r=i.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof i=="number"&&(r=i),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let i=this.domNode.cloneNode(!1);return this.scroll.create(i)}detach(){this.parent!=null&&this.parent.removeChild(this),Ho.blots.delete(this.domNode)}deleteAt(i,t){this.isolate(i,t).remove()}formatAt(i,t,r,n){let a=this.isolate(i,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(i,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(i);this.parent.insertBefore(n,a||void 0)}isolate(i,t){let r=this.split(i);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(i=this.parent){return this.parent==null||this===i?0:this.parent.children.offset(this)+this.parent.offset(i)}optimize(i){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(i,t){return i===0?this:this.next}update(i,t){}wrap(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Po(`Cannot wrap ${i}`);return r.appendChild(this),r}};xz.blotName="abstract";var wz=xz,zz=class extends wz{static value(i){return!0}index(i,t){return this.domNode===i||this.domNode.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(i,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return i>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};zz.scope=X.INLINE_BLOT;var tA=zz,Vt=tA,of=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...i){if(this.insertBefore(i[0],null),i.length>1){let t=i.slice(1);this.append(...t)}}at(i){let t=this.iterator(),r=t();for(;r&&i>0;)i-=1,r=t();return r}contains(i){let t=this.iterator(),r=t();for(;r;){if(r===i)return!0;r=t()}return!1}indexOf(i){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===i)return n;n+=1,r=t()}return-1}insertBefore(i,t){i!=null&&(this.remove(i),i.next=t,t!=null?(i.prev=t.prev,t.prev!=null&&(t.prev.next=i),t.prev=i,t===this.head&&(this.head=i)):this.tail!=null?(this.tail.next=i,i.prev=this.tail,this.tail=i):(i.prev=null,this.head=this.tail=i),this.length+=1)}offset(i){let t=0,r=this.head;for(;r!=null;){if(r===i)return t;t+=r.length(),r=r.next}return-1}remove(i){this.contains(i)&&(i.prev!=null&&(i.prev.next=i.next),i.next!=null&&(i.next.prev=i.prev),i===this.head&&(this.head=i.next),i===this.tail&&(this.tail=i.prev),this.length-=1)}iterator(i=this.head){return()=>{let t=i;return i!=null&&(i=i.next),t}}find(i,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(i<a||t&&i===a&&(n.next==null||n.next.length()!==0))return[n,i];i-=a,n=r()}return[null,0]}forEach(i){let t=this.iterator(),r=t();for(;r;)i(r),r=t()}forEachAt(i,t,r){if(t<=0)return;let[n,a]=this.find(i),s=i-a,l=this.iterator(n),p=l();for(;p&&s<i+t;){let h=p.length();i>s?r(p,i-s,Math.min(t,s+h-i)):r(p,0,Math.min(h,i+t-s)),s+=h,p=l()}}map(i){return this.reduce((t,r)=>(t.push(i(r)),t),[])}reduce(i,t){let r=this.iterator(),n=r();for(;n;)t=i(t,n),n=r();return t}};function vz(o,i){let t=i.find(o);if(t)return t;try{return i.create(o)}catch{let r=i.create(X.INLINE);return Array.from(o.childNodes).forEach(n=>{r.domNode.appendChild(n)}),o.parentNode&&o.parentNode.replaceChild(r.domNode,o),r.attach(),r}}var _z=class Oo extends wz{constructor(i,t){super(i,t),this.uiNode=null,this.build()}appendChild(i){this.insertBefore(i)}attach(){super.attach(),this.children.forEach(i=>{i.attach()})}attachUI(i){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=i,Oo.uiClass&&this.uiNode.classList.add(Oo.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new of,Array.from(this.domNode.childNodes).filter(i=>i!==this.uiNode).reverse().forEach(i=>{try{let t=vz(i,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Po)return;throw t}})}deleteAt(i,t){if(i===0&&t===this.length())return this.remove();this.children.forEachAt(i,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(i,t=0){let[r,n]=this.children.find(t);return i.blotName==null&&i(r)||i.blotName!=null&&r instanceof i?[r,n]:r instanceof Oo?r.descendant(i,n):[null,-1]}descendants(i,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,p)=>{(i.blotName==null&&i(s)||i.blotName!=null&&s instanceof i)&&n.push(s),s instanceof Oo&&(n=n.concat(s.descendants(i,l,a))),a-=p}),n}detach(){this.children.forEach(i=>{i.detach()}),super.detach()}enforceAllowedChildren(){let i=!1;this.children.forEach(t=>{i||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),i=!0):t instanceof Oo?t.unwrap():t.remove())})}formatAt(i,t,r,n){this.children.forEachAt(i,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(i,t,r){let[n,a]=this.children.find(i);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(i,t){i.parent!=null&&i.parent.children.remove(i);let r=null;this.children.insertBefore(i,t||null),i.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==i.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(i.domNode,r),i.attach()}length(){return this.children.reduce((i,t)=>i+t.length(),0)}moveChildren(i,t){this.children.forEach(r=>{i.insertBefore(r,t)})}optimize(i){if(super.optimize(i),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(i,t=!1){let[r,n]=this.children.find(i,t),a=[[this,i]];return r instanceof Oo?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(i){this.children.remove(i)}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return r instanceof Oo&&this.moveChildren(r),super.replaceWith(r)}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(i,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(i){let t=this.clone();for(;i.next!=null;)t.appendChild(i.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(i,t){let r=[],n=[];i.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=vz(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};_z.uiClass="";var rA=_z,ii=rA;function iA(o,i){if(Object.keys(o).length!==Object.keys(i).length)return!1;for(let t in o)if(o[t]!==i[t])return!1;return!0}var Fs=class Bs extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(Bs.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new lc(this.domNode)}format(i,t){if(i===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Bs||(r=r.wrap(Bs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(i,X.INLINE);if(r==null)return;r instanceof Vr?this.attributes.attribute(r,t):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t)}}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(i,t).format(r,n):super.formatAt(i,t,r,n)}optimize(i){super.optimize(i);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof Bs&&r.prev===this&&iA(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(i,t){let r=super.wrap(i,t);return r instanceof Bs&&this.attributes.move(r),r}};Fs.allowedChildren=[Fs,Vt],Fs.blotName="inline",Fs.scope=X.INLINE_BLOT,Fs.tagName="SPAN";var nA=Fs,Jp=nA,Vs=class af extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(af.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new lc(this.domNode)}format(i,t){let r=this.scroll.query(i,X.BLOCK);r!=null&&(r instanceof Vr?this.attributes.attribute(r,t):i===this.statics.blotName&&!t?this.replaceWith(af.blotName):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t))}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(i,t,r,n)}insertAt(i,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(i,t,r);else{let n=this.split(i);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Vs.blotName="block",Vs.scope=X.BLOCK_BLOT,Vs.tagName="P",Vs.allowedChildren=[Jp,Vs,Vt];var oA=Vs,Ra=oA,sf=class extends ii{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(i,t){super.deleteAt(i,t),this.enforceAllowedChildren()}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.enforceAllowedChildren()}insertAt(i,t,r){super.insertAt(i,t,r),this.enforceAllowedChildren()}optimize(i){super.optimize(i),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};sf.blotName="container",sf.scope=X.BLOCK_BLOT;var aA=sf,js=aA,lf=class extends Vt{static formats(i,t){}format(i,t){super.formatAt(0,this.length(),i,t)}formatAt(i,t,r,n){i===0&&t===this.length()?this.format(r,n):super.formatAt(i,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},wt=lf,sA={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},lA=100,Us=class extends ii{constructor(i,t){super(null,t),this.registry=i,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,sA),this.attach()}create(i,t){return this.registry.create(this,i,t)}find(i,t=!1){let r=this.registry.find(i,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(i,t=X.ANY){return this.registry.query(i,t)}register(...i){return this.registry.register(...i)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(i,t){this.update(),i===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(i,t)}formatAt(i,t,r,n){this.update(),super.formatAt(i,t,r,n)}insertAt(i,t,r){this.update(),super.insertAt(i,t,r)}optimize(i=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)i.push(n.pop());let a=(p,h=!0)=>{p==null||p===this||p.domNode.parentNode!=null&&(r.has(p.domNode)||r.set(p.domNode,[]),h&&a(p.parent))},s=p=>{r.has(p.domNode)&&(p instanceof ii&&p.children.forEach(s),r.delete(p.domNode),p.optimize(t))},l=i;for(let p=0;l.length>0;p+=1){if(p>=lA)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof ii&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)i.push(n.pop())}}update(i,t={}){i=i||this.observer.takeRecords();let r=new WeakMap;i.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(i,t)}};Us.blotName="scroll",Us.defaultChild=Ra,Us.allowedChildren=[Ra,js],Us.scope=X.BLOCK_BLOT,Us.tagName="DIV";var cA=Us,cc=cA,cf=class kz extends Vt{static create(i){return document.createTextNode(i)}static value(i){return i.data}constructor(i,t){super(i,t),this.text=this.statics.value(this.domNode)}deleteAt(i,t){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+t)}index(i,t){return this.domNode===i?t:-1}insertAt(i,t,r){r==null?(this.text=this.text.slice(0,i)+t+this.text.slice(i),this.domNode.data=this.text):super.insertAt(i,t,r)}length(){return this.text.length}optimize(i){super.optimize(i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof kz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(i,t=!1){return[this.domNode,i]}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(i));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(i,t){i.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};cf.blotName="text",cf.scope=X.INLINE_BLOT;var dA=cf,Gs=dA;var Bo=_r(ei(),1);var zt=_r(ei(),1);var pf=_r(ei(),1);var pc=class extends wt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};pc.blotName="break";pc.tagName="BR";var Mr=pc;var Dt=class extends Gs{},pA={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Na(o){return o.replace(/[&<>"']/g,i=>pA[i])}var In=class In extends Jp{static compare(i,t){let r=In.order.indexOf(i),n=In.order.indexOf(t);return r>=0||n>=0?r-n:i===t?0:i<t?-1:1}formatAt(i,t,r,n){if(In.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(i,t);n&&a.wrap(r,n)}else super.formatAt(i,t,r,n)}optimize(i){if(super.optimize(i),this.parent instanceof In&&In.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};V(In,"allowedChildren",[In,Mr,wt,Dt]),V(In,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var df=In,Lr=df;var Cz=1,Qe=class extends Ra{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=hf(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
2861
+ </zn-input>`;return qt(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Zr.styles=[z(fs),z($1)],Zr.dependencies={"zn-button":$e,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".bulk-actions")],Zr.prototype,"container",2),c([F(".add-rule")],Zr.prototype,"addRule",2),c([F("input#main-input")],Zr.prototype,"input",2),c([d()],Zr.prototype,"name",2),c([d()],Zr.prototype,"value",2),c([d({type:Array})],Zr.prototype,"actions",2);var u8=Zr;Zr.define("zn-bulk-actions");var m8=()=>{let o="attachment",i=new Date().getTime();return`${o}_${i}`},Gl=class{constructor(i,t){this._attachmentContainer=document.createElement("div");this._quill=i,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let i=this._fileHolder.files[0];this.addAttachment(i)}addAttachment(i,t){let r=m8(),n=a=>{this._insertAttachment({dataUrl:a,file:i,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(i)}typeof this._options.upload=="function"&&this._options.upload(i).then(async({path:a,url:s})=>{await this._uploadAttachment(i,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let i=this._attachmentContainer;i.id="attachment-container",i.style.display="flex",i.style.flexWrap="wrap",i.style.gap="10px",i.style.position="absolute",i.style.bottom="0",i.style.left="0",i.style.right="0",i.style.padding="10px",this._quill.container.appendChild(i)}_insertAttachment({dataUrl:i,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(i,t,r))}_updateAttachment(i,t,r){let n=this._quill.container.querySelector(`#${i}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,p=l?JSON.parse(l):[];p.push(r),s.value=JSON.stringify(p)}}_createAttachment(i,t,r){let n=document.createElement("a");n.setAttribute("href",i),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let i=this._options.attachmentInput;i&&(i.value="")}_removeAttachment(i){let t=this._quill.container.querySelector(`#${i}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(i,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",i.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(i)})}};var E_=_r(ei(),1);var MC=typeof global=="object"&&global&&global.Object===Object&&global,Ep=MC;var LC=typeof self=="object"&&self&&self.Object===Object&&self,qC=Ep||LC||Function("return this")(),Ft=qC;var IC=Ft.Symbol,Oi=IC;var hx=Object.prototype,DC=hx.hasOwnProperty,RC=hx.toString,rc=Oi?Oi.toStringTag:void 0;function NC(o){var i=DC.call(o,rc),t=o[rc];try{o[rc]=void 0;var r=!0}catch{}var n=RC.call(o);return r&&(i?o[rc]=t:delete o[rc]),n}var ux=NC;var OC=Object.prototype,PC=OC.toString;function HC(o){return PC.call(o)}var mx=HC;var FC="[object Null]",BC="[object Undefined]",fx=Oi?Oi.toStringTag:void 0;function VC(o){return o==null?o===void 0?BC:FC:fx&&fx in Object(o)?ux(o):mx(o)}var hn=VC;function UC(o){return o!=null&&typeof o=="object"}var gr=UC;var jC=Array.isArray,Pi=jC;function GC(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}var Ar=GC;function WC(o){return o}var Tp=WC;var KC="[object AsyncFunction]",YC="[object Function]",QC="[object GeneratorFunction]",XC="[object Proxy]";function JC(o){if(!Ar(o))return!1;var i=hn(o);return i==YC||i==QC||i==KC||i==XC}var Ss=JC;var ZC=Ft["__core-js_shared__"],$p=ZC;var gx=(function(){var o=/[^.]+$/.exec($p&&$p.keys&&$p.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function eS(o){return!!gx&&gx in o}var bx=eS;var tS=Function.prototype,rS=tS.toString;function iS(o){if(o!=null){try{return rS.call(o)}catch{}try{return o+""}catch{}}return""}var to=iS;var nS=/[\\^$.*+?()[\]{}|]/g,oS=/^\[object .+?Constructor\]$/,aS=Function.prototype,sS=Object.prototype,lS=aS.toString,cS=sS.hasOwnProperty,dS=RegExp("^"+lS.call(cS).replace(nS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pS(o){if(!Ar(o)||bx(o))return!1;var i=Ss(o)?dS:oS;return i.test(to(o))}var vx=pS;function hS(o,i){return o?.[i]}var yx=hS;function uS(o,i){var t=yx(o,i);return vx(t)?t:void 0}var ti=uS;var mS=ti(Ft,"WeakMap"),Ap=mS;var xx=Object.create,fS=(function(){function o(){}return function(i){if(!Ar(i))return{};if(xx)return xx(i);o.prototype=i;var t=new o;return o.prototype=void 0,t}})(),wx=fS;function gS(o,i,t){switch(t.length){case 0:return o.call(i);case 1:return o.call(i,t[0]);case 2:return o.call(i,t[0],t[1]);case 3:return o.call(i,t[0],t[1],t[2])}return o.apply(i,t)}var zx=gS;function bS(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}var Mp=bS;var vS=800,yS=16,xS=Date.now;function wS(o){var i=0,t=0;return function(){var r=xS(),n=yS-(r-t);if(t=r,n>0){if(++i>=vS)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}var _x=wS;function zS(o){return function(){return o}}var kx=zS;var _S=(function(){try{var o=ti(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Es=_S;var kS=Es?function(o,i){return Es(o,"toString",{configurable:!0,enumerable:!1,value:kx(i),writable:!0})}:Tp,Cx=kS;var CS=_x(Cx),Sx=CS;function SS(o,i){for(var t=-1,r=o==null?0:o.length;++t<r&&i(o[t],t,o)!==!1;);return o}var Ex=SS;var ES=9007199254740991,TS=/^(?:0|[1-9]\d*)$/;function $S(o,i){var t=typeof o;return i=i??ES,!!i&&(t=="number"||t!="symbol"&&TS.test(o))&&o>-1&&o%1==0&&o<i}var Lp=$S;function AS(o,i,t){i=="__proto__"&&Es?Es(o,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[i]=t}var Ts=AS;function MS(o,i){return o===i||o!==o&&i!==i}var An=MS;var LS=Object.prototype,qS=LS.hasOwnProperty;function IS(o,i,t){var r=o[i];(!(qS.call(o,i)&&An(r,t))||t===void 0&&!(i in o))&&Ts(o,i,t)}var qp=IS;function DS(o,i,t,r){var n=!t;t||(t={});for(var a=-1,s=i.length;++a<s;){var l=i[a],p=r?r(t[l],o[l],l,t,o):void 0;p===void 0&&(p=o[l]),n?Ts(t,l,p):qp(t,l,p)}return t}var Mn=DS;var Tx=Math.max;function RS(o,i,t){return i=Tx(i===void 0?o.length-1:i,0),function(){for(var r=arguments,n=-1,a=Tx(r.length-i,0),s=Array(a);++n<a;)s[n]=r[i+n];n=-1;for(var l=Array(i+1);++n<i;)l[n]=r[n];return l[i]=t(s),zx(o,this,l)}}var $x=RS;function NS(o,i){return Sx($x(o,i,Tp),o+"")}var Ax=NS;var OS=9007199254740991;function PS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=OS}var Ip=PS;function HS(o){return o!=null&&Ip(o.length)&&!Ss(o)}var Lo=HS;function FS(o,i,t){if(!Ar(t))return!1;var r=typeof i;return(r=="number"?Lo(t)&&Lp(i,t.length):r=="string"&&i in t)?An(t[i],o):!1}var Mx=FS;function BS(o){return Ax(function(i,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=o.length>3&&typeof a=="function"?(n--,a):void 0,s&&Mx(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),i=Object(i);++r<n;){var l=t[r];l&&o(i,l,r,a)}return i})}var Lx=BS;var VS=Object.prototype;function US(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||VS;return o===t}var $s=US;function jS(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}var qx=jS;var GS="[object Arguments]";function WS(o){return gr(o)&&hn(o)==GS}var Ym=WS;var Ix=Object.prototype,KS=Ix.hasOwnProperty,YS=Ix.propertyIsEnumerable,QS=Ym((function(){return arguments})())?Ym:function(o){return gr(o)&&KS.call(o,"callee")&&!YS.call(o,"callee")},ic=QS;function XS(){return!1}var Dx=XS;var Ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rx=Ox&&typeof module=="object"&&module&&!module.nodeType&&module,JS=Rx&&Rx.exports===Ox,Nx=JS?Ft.Buffer:void 0,ZS=Nx?Nx.isBuffer:void 0,e7=ZS||Dx,ro=e7;var t7="[object Arguments]",r7="[object Array]",i7="[object Boolean]",n7="[object Date]",o7="[object Error]",a7="[object Function]",s7="[object Map]",l7="[object Number]",c7="[object Object]",d7="[object RegExp]",p7="[object Set]",h7="[object String]",u7="[object WeakMap]",m7="[object ArrayBuffer]",f7="[object DataView]",g7="[object Float32Array]",b7="[object Float64Array]",v7="[object Int8Array]",y7="[object Int16Array]",x7="[object Int32Array]",w7="[object Uint8Array]",z7="[object Uint8ClampedArray]",_7="[object Uint16Array]",k7="[object Uint32Array]",lt={};lt[g7]=lt[b7]=lt[v7]=lt[y7]=lt[x7]=lt[w7]=lt[z7]=lt[_7]=lt[k7]=!0;lt[t7]=lt[r7]=lt[m7]=lt[i7]=lt[f7]=lt[n7]=lt[o7]=lt[a7]=lt[s7]=lt[l7]=lt[c7]=lt[d7]=lt[p7]=lt[h7]=lt[u7]=!1;function C7(o){return gr(o)&&Ip(o.length)&&!!lt[hn(o)]}var Px=C7;function S7(o){return function(i){return o(i)}}var As=S7;var Hx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nc=Hx&&typeof module=="object"&&module&&!module.nodeType&&module,E7=nc&&nc.exports===Hx,Qm=E7&&Ep.process,T7=(function(){try{var o=nc&&nc.require&&nc.require("util").types;return o||Qm&&Qm.binding&&Qm.binding("util")}catch{}})(),io=T7;var Fx=io&&io.isTypedArray,$7=Fx?As(Fx):Px,Ms=$7;var A7=Object.prototype,M7=A7.hasOwnProperty;function L7(o,i){var t=Pi(o),r=!t&&ic(o),n=!t&&!r&&ro(o),a=!t&&!r&&!n&&Ms(o),s=t||r||n||a,l=s?qx(o.length,String):[],p=l.length;for(var h in o)(i||M7.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Lp(h,p)))&&l.push(h);return l}var Dp=L7;function q7(o,i){return function(t){return o(i(t))}}var Rp=q7;var I7=Rp(Object.keys,Object),Bx=I7;var D7=Object.prototype,R7=D7.hasOwnProperty;function N7(o){if(!$s(o))return Bx(o);var i=[];for(var t in Object(o))R7.call(o,t)&&t!="constructor"&&i.push(t);return i}var Vx=N7;function O7(o){return Lo(o)?Dp(o):Vx(o)}var Ls=O7;function P7(o){var i=[];if(o!=null)for(var t in Object(o))i.push(t);return i}var Ux=P7;var H7=Object.prototype,F7=H7.hasOwnProperty;function B7(o){if(!Ar(o))return Ux(o);var i=$s(o),t=[];for(var r in o)r=="constructor"&&(i||!F7.call(o,r))||t.push(r);return t}var jx=B7;function V7(o){return Lo(o)?Dp(o,!0):jx(o)}var Ln=V7;var U7=ti(Object,"create"),no=U7;function j7(){this.__data__=no?no(null):{},this.size=0}var Gx=j7;function G7(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}var Wx=G7;var W7="__lodash_hash_undefined__",K7=Object.prototype,Y7=K7.hasOwnProperty;function Q7(o){var i=this.__data__;if(no){var t=i[o];return t===W7?void 0:t}return Y7.call(i,o)?i[o]:void 0}var Kx=Q7;var X7=Object.prototype,J7=X7.hasOwnProperty;function Z7(o){var i=this.__data__;return no?i[o]!==void 0:J7.call(i,o)}var Yx=Z7;var eE="__lodash_hash_undefined__";function tE(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=no&&i===void 0?eE:i,this}var Qx=tE;function qs(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}qs.prototype.clear=Gx;qs.prototype.delete=Wx;qs.prototype.get=Kx;qs.prototype.has=Yx;qs.prototype.set=Qx;var Xm=qs;function rE(){this.__data__=[],this.size=0}var Xx=rE;function iE(o,i){for(var t=o.length;t--;)if(An(o[t][0],i))return t;return-1}var qo=iE;var nE=Array.prototype,oE=nE.splice;function aE(o){var i=this.__data__,t=qo(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():oE.call(i,t,1),--this.size,!0}var Jx=aE;function sE(o){var i=this.__data__,t=qo(i,o);return t<0?void 0:i[t][1]}var Zx=sE;function lE(o){return qo(this.__data__,o)>-1}var ew=lE;function cE(o,i){var t=this.__data__,r=qo(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}var tw=cE;function Is(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Is.prototype.clear=Xx;Is.prototype.delete=Jx;Is.prototype.get=Zx;Is.prototype.has=ew;Is.prototype.set=tw;var Io=Is;var dE=ti(Ft,"Map"),Do=dE;function pE(){this.size=0,this.__data__={hash:new Xm,map:new(Do||Io),string:new Xm}}var rw=pE;function hE(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}var iw=hE;function uE(o,i){var t=o.__data__;return iw(i)?t[typeof i=="string"?"string":"hash"]:t.map}var Ro=uE;function mE(o){var i=Ro(this,o).delete(o);return this.size-=i?1:0,i}var nw=mE;function fE(o){return Ro(this,o).get(o)}var ow=fE;function gE(o){return Ro(this,o).has(o)}var aw=gE;function bE(o,i){var t=Ro(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}var sw=bE;function Ds(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ds.prototype.clear=rw;Ds.prototype.delete=nw;Ds.prototype.get=ow;Ds.prototype.has=aw;Ds.prototype.set=sw;var Np=Ds;function vE(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}var Op=vE;var yE=Rp(Object.getPrototypeOf,Object),Rs=yE;var xE="[object Object]",wE=Function.prototype,zE=Object.prototype,lw=wE.toString,_E=zE.hasOwnProperty,kE=lw.call(Object);function CE(o){if(!gr(o)||hn(o)!=xE)return!1;var i=Rs(o);if(i===null)return!0;var t=_E.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&lw.call(t)==kE}var cw=CE;function SE(){this.__data__=new Io,this.size=0}var dw=SE;function EE(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}var pw=EE;function TE(o){return this.__data__.get(o)}var hw=TE;function $E(o){return this.__data__.has(o)}var uw=$E;var AE=200;function ME(o,i){var t=this.__data__;if(t instanceof Io){var r=t.__data__;if(!Do||r.length<AE-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Np(r)}return t.set(o,i),this.size=t.size,this}var mw=ME;function Ns(o){var i=this.__data__=new Io(o);this.size=i.size}Ns.prototype.clear=dw;Ns.prototype.delete=pw;Ns.prototype.get=hw;Ns.prototype.has=uw;Ns.prototype.set=mw;var No=Ns;function LE(o,i){return o&&Mn(i,Ls(i),o)}var fw=LE;function qE(o,i){return o&&Mn(i,Ln(i),o)}var gw=qE;var xw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bw=xw&&typeof module=="object"&&module&&!module.nodeType&&module,IE=bw&&bw.exports===xw,vw=IE?Ft.Buffer:void 0,yw=vw?vw.allocUnsafe:void 0;function DE(o,i){if(i)return o.slice();var t=o.length,r=yw?yw(t):new o.constructor(t);return o.copy(r),r}var Pp=DE;function RE(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}var ww=RE;function NE(){return[]}var Hp=NE;var OE=Object.prototype,PE=OE.propertyIsEnumerable,zw=Object.getOwnPropertySymbols,HE=zw?function(o){return o==null?[]:(o=Object(o),ww(zw(o),function(i){return PE.call(o,i)}))}:Hp,Os=HE;function FE(o,i){return Mn(o,Os(o),i)}var _w=FE;var BE=Object.getOwnPropertySymbols,VE=BE?function(o){for(var i=[];o;)Op(i,Os(o)),o=Rs(o);return i}:Hp,Fp=VE;function UE(o,i){return Mn(o,Fp(o),i)}var kw=UE;function jE(o,i,t){var r=i(o);return Pi(o)?r:Op(r,t(o))}var Bp=jE;function GE(o){return Bp(o,Ls,Os)}var oc=GE;function WE(o){return Bp(o,Ln,Fp)}var Cw=WE;var KE=ti(Ft,"DataView"),Vp=KE;var YE=ti(Ft,"Promise"),Up=YE;var QE=ti(Ft,"Set"),jp=QE;var Sw="[object Map]",XE="[object Object]",Ew="[object Promise]",Tw="[object Set]",$w="[object WeakMap]",Aw="[object DataView]",JE=to(Vp),ZE=to(Do),eT=to(Up),tT=to(jp),rT=to(Ap),Da=hn;(Vp&&Da(new Vp(new ArrayBuffer(1)))!=Aw||Do&&Da(new Do)!=Sw||Up&&Da(Up.resolve())!=Ew||jp&&Da(new jp)!=Tw||Ap&&Da(new Ap)!=$w)&&(Da=function(o){var i=hn(o),t=i==XE?o.constructor:void 0,r=t?to(t):"";if(r)switch(r){case JE:return Aw;case ZE:return Sw;case eT:return Ew;case tT:return Tw;case rT:return $w}return i});var oo=Da;var iT=Object.prototype,nT=iT.hasOwnProperty;function oT(o){var i=o.length,t=new o.constructor(i);return i&&typeof o[0]=="string"&&nT.call(o,"index")&&(t.index=o.index,t.input=o.input),t}var Mw=oT;var aT=Ft.Uint8Array,Ps=aT;function sT(o){var i=new o.constructor(o.byteLength);return new Ps(i).set(new Ps(o)),i}var Hs=sT;function lT(o,i){var t=i?Hs(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}var Lw=lT;var cT=/\w*$/;function dT(o){var i=new o.constructor(o.source,cT.exec(o));return i.lastIndex=o.lastIndex,i}var qw=dT;var Iw=Oi?Oi.prototype:void 0,Dw=Iw?Iw.valueOf:void 0;function pT(o){return Dw?Object(Dw.call(o)):{}}var Rw=pT;function hT(o,i){var t=i?Hs(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}var Gp=hT;var uT="[object Boolean]",mT="[object Date]",fT="[object Map]",gT="[object Number]",bT="[object RegExp]",vT="[object Set]",yT="[object String]",xT="[object Symbol]",wT="[object ArrayBuffer]",zT="[object DataView]",_T="[object Float32Array]",kT="[object Float64Array]",CT="[object Int8Array]",ST="[object Int16Array]",ET="[object Int32Array]",TT="[object Uint8Array]",$T="[object Uint8ClampedArray]",AT="[object Uint16Array]",MT="[object Uint32Array]";function LT(o,i,t){var r=o.constructor;switch(i){case wT:return Hs(o);case uT:case mT:return new r(+o);case zT:return Lw(o,t);case _T:case kT:case CT:case ST:case ET:case TT:case $T:case AT:case MT:return Gp(o,t);case fT:return new r;case gT:case yT:return new r(o);case bT:return qw(o);case vT:return new r;case xT:return Rw(o)}}var Nw=LT;function qT(o){return typeof o.constructor=="function"&&!$s(o)?wx(Rs(o)):{}}var Wp=qT;var IT="[object Map]";function DT(o){return gr(o)&&oo(o)==IT}var Ow=DT;var Pw=io&&io.isMap,RT=Pw?As(Pw):Ow,Hw=RT;var NT="[object Set]";function OT(o){return gr(o)&&oo(o)==NT}var Fw=OT;var Bw=io&&io.isSet,PT=Bw?As(Bw):Fw,Vw=PT;var HT=1,FT=2,BT=4,Uw="[object Arguments]",VT="[object Array]",UT="[object Boolean]",jT="[object Date]",GT="[object Error]",jw="[object Function]",WT="[object GeneratorFunction]",KT="[object Map]",YT="[object Number]",Gw="[object Object]",QT="[object RegExp]",XT="[object Set]",JT="[object String]",ZT="[object Symbol]",e$="[object WeakMap]",t$="[object ArrayBuffer]",r$="[object DataView]",i$="[object Float32Array]",n$="[object Float64Array]",o$="[object Int8Array]",a$="[object Int16Array]",s$="[object Int32Array]",l$="[object Uint8Array]",c$="[object Uint8ClampedArray]",d$="[object Uint16Array]",p$="[object Uint32Array]",tt={};tt[Uw]=tt[VT]=tt[t$]=tt[r$]=tt[UT]=tt[jT]=tt[i$]=tt[n$]=tt[o$]=tt[a$]=tt[s$]=tt[KT]=tt[YT]=tt[Gw]=tt[QT]=tt[XT]=tt[JT]=tt[ZT]=tt[l$]=tt[c$]=tt[d$]=tt[p$]=!0;tt[GT]=tt[jw]=tt[e$]=!1;function Kp(o,i,t,r,n,a){var s,l=i&HT,p=i&FT,h=i&BT;if(t&&(s=n?t(o,r,n,a):t(o)),s!==void 0)return s;if(!Ar(o))return o;var m=Pi(o);if(m){if(s=Mw(o),!l)return Mp(o,s)}else{var f=oo(o),b=f==jw||f==WT;if(ro(o))return Pp(o,l);if(f==Gw||f==Uw||b&&!n){if(s=p||b?{}:Wp(o),!l)return p?kw(o,gw(s,o)):_w(o,fw(s,o))}else{if(!tt[f])return n?o:{};s=Nw(o,f,l)}}a||(a=new No);var g=a.get(o);if(g)return g;a.set(o,s),Vw(o)?o.forEach(function(S){s.add(Kp(S,i,t,S,o,a))}):Hw(o)&&o.forEach(function(S,T){s.set(T,Kp(S,i,t,T,o,a))});var v=h?p?Cw:oc:p?Ln:Ls,y=m?void 0:v(o);return Ex(y||o,function(S,T){y&&(T=S,S=o[T]),qp(s,T,Kp(S,i,t,T,o,a))}),s}var Ww=Kp;var h$=1,u$=4;function m$(o){return Ww(o,h$|u$)}var qn=m$;var f$="__lodash_hash_undefined__";function g$(o){return this.__data__.set(o,f$),this}var Kw=g$;function b$(o){return this.__data__.has(o)}var Yw=b$;function Yp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Np;++i<t;)this.add(o[i])}Yp.prototype.add=Yp.prototype.push=Kw;Yp.prototype.has=Yw;var Qw=Yp;function v$(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}var Xw=v$;function y$(o,i){return o.has(i)}var Jw=y$;var x$=1,w$=2;function z$(o,i,t,r,n,a){var s=t&x$,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o),m=a.get(i);if(h&&m)return h==i&&m==o;var f=-1,b=!0,g=t&w$?new Qw:void 0;for(a.set(o,i),a.set(i,o);++f<l;){var v=o[f],y=i[f];if(r)var S=s?r(y,v,f,i,o,a):r(v,y,f,o,i,a);if(S!==void 0){if(S)continue;b=!1;break}if(g){if(!Xw(i,function(T,N){if(!Jw(g,N)&&(v===T||n(v,T,t,r,a)))return g.push(N)})){b=!1;break}}else if(!(v===y||n(v,y,t,r,a))){b=!1;break}}return a.delete(o),a.delete(i),b}var Qp=z$;function _$(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}var Zw=_$;function k$(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var ez=k$;var C$=1,S$=2,E$="[object Boolean]",T$="[object Date]",$$="[object Error]",A$="[object Map]",M$="[object Number]",L$="[object RegExp]",q$="[object Set]",I$="[object String]",D$="[object Symbol]",R$="[object ArrayBuffer]",N$="[object DataView]",tz=Oi?Oi.prototype:void 0,Jm=tz?tz.valueOf:void 0;function O$(o,i,t,r,n,a,s){switch(t){case N$:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case R$:return!(o.byteLength!=i.byteLength||!a(new Ps(o),new Ps(i)));case E$:case T$:case M$:return An(+o,+i);case $$:return o.name==i.name&&o.message==i.message;case L$:case I$:return o==i+"";case A$:var l=Zw;case q$:var p=r&C$;if(l||(l=ez),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=S$,s.set(o,i);var m=Qp(l(o),l(i),r,n,a,s);return s.delete(o),m;case D$:if(Jm)return Jm.call(o)==Jm.call(i)}return!1}var rz=O$;var P$=1,H$=Object.prototype,F$=H$.hasOwnProperty;function B$(o,i,t,r,n,a){var s=t&P$,l=oc(o),p=l.length,h=oc(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:F$.call(i,b)))return!1}var g=a.get(o),v=a.get(i);if(g&&v)return g==i&&v==o;var y=!0;a.set(o,i),a.set(i,o);for(var S=s;++f<p;){b=l[f];var T=o[b],N=i[b];if(r)var U=s?r(N,T,b,i,o,a):r(T,N,b,o,i,a);if(!(U===void 0?T===N||n(T,N,t,r,a):U)){y=!1;break}S||(S=b=="constructor")}if(y&&!S){var I=o.constructor,C=i.constructor;I!=C&&"constructor"in o&&"constructor"in i&&!(typeof I=="function"&&I instanceof I&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(o),a.delete(i),y}var iz=B$;var V$=1,nz="[object Arguments]",oz="[object Array]",Xp="[object Object]",U$=Object.prototype,az=U$.hasOwnProperty;function j$(o,i,t,r,n,a){var s=Pi(o),l=Pi(i),p=s?oz:oo(o),h=l?oz:oo(i);p=p==nz?Xp:p,h=h==nz?Xp:h;var m=p==Xp,f=h==Xp,b=p==h;if(b&&ro(o)){if(!ro(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new No),s||Ms(o)?Qp(o,i,t,r,n,a):rz(o,i,p,t,r,n,a);if(!(t&V$)){var g=m&&az.call(o,"__wrapped__"),v=f&&az.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new No),n(y,S,t,r,a)}}return b?(a||(a=new No),iz(o,i,t,r,n,a)):!1}var sz=j$;function lz(o,i,t,r,n){return o===i?!0:o==null||i==null||!gr(o)&&!gr(i)?o!==o&&i!==i:sz(o,i,t,r,lz,n)}var cz=lz;function G$(o){return function(i,t,r){for(var n=-1,a=Object(i),s=r(i),l=s.length;l--;){var p=s[o?l:++n];if(t(a[p],p,a)===!1)break}return i}}var dz=G$;var W$=dz(),pz=W$;function K$(o,i,t){(t!==void 0&&!An(o[i],t)||t===void 0&&!(i in o))&&Ts(o,i,t)}var ac=K$;function Y$(o){return gr(o)&&Lo(o)}var hz=Y$;function Q$(o,i){if(!(i==="constructor"&&typeof o[i]=="function")&&i!="__proto__")return o[i]}var sc=Q$;function X$(o){return Mn(o,Ln(o))}var uz=X$;function J$(o,i,t,r,n,a,s){var l=sc(o,t),p=sc(i,t),h=s.get(p);if(h){ac(o,t,h);return}var m=a?a(l,p,t+"",o,i,s):void 0,f=m===void 0;if(f){var b=Pi(p),g=!b&&ro(p),v=!b&&!g&&Ms(p);m=p,b||g||v?Pi(l)?m=l:hz(l)?m=Mp(l):g?(f=!1,m=Pp(p,!0)):v?(f=!1,m=Gp(p,!0)):m=[]:cw(p)||ic(p)?(m=l,ic(l)?m=uz(l):(!Ar(l)||Ss(l))&&(m=Wp(p))):f=!1}f&&(s.set(p,m),n(m,p,r,a,s),s.delete(p)),ac(o,t,m)}var mz=J$;function fz(o,i,t,r,n){o!==i&&pz(i,function(a,s){if(n||(n=new No),Ar(a))mz(o,i,s,t,fz,r,n);else{var l=r?r(sc(o,s),a,s+"",o,i,n):void 0;l===void 0&&(l=a),ac(o,s,l)}},Ln)}var gz=fz;function Z$(o,i){return cz(o,i)}var Ra=Z$;var eA=Lx(function(o,i,t){gz(o,i,t)}),ri=eA;var dc={};h3(dc,{Attributor:()=>Vr,AttributorStore:()=>lc,BlockBlot:()=>Na,ClassAttributor:()=>Bt,ContainerBlot:()=>js,EmbedBlot:()=>wt,InlineBlot:()=>Jp,LeafBlot:()=>Vt,ParentBlot:()=>ii,Registry:()=>Ho,Scope:()=>X,ScrollBlot:()=>cc,StyleAttributor:()=>ni,TextBlot:()=>Gs});var X=(o=>(o[o.TYPE=3]="TYPE",o[o.LEVEL=12]="LEVEL",o[o.ATTRIBUTE=13]="ATTRIBUTE",o[o.BLOT=14]="BLOT",o[o.INLINE=7]="INLINE",o[o.BLOCK=11]="BLOCK",o[o.BLOCK_BLOT=10]="BLOCK_BLOT",o[o.INLINE_BLOT=6]="INLINE_BLOT",o[o.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",o[o.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",o[o.ANY=15]="ANY",o))(X||{}),Vr=class{constructor(i,t,r={}){this.attrName=i,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(i){return Array.from(i.attributes).map(t=>t.name)}add(i,t){return this.canAdd(i,t)?(i.setAttribute(this.keyName,t),!0):!1}canAdd(i,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(i){i.removeAttribute(this.keyName)}value(i){let t=i.getAttribute(this.keyName);return this.canAdd(i,t)&&t?t:""}},Po=class extends Error{constructor(i){i="[Parchment] "+i,super(i),this.message=i,this.name=this.constructor.name}},yz=class ef{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(i,t=!1){if(i==null)return null;if(this.blots.has(i))return this.blots.get(i)||null;if(t){let r=null;try{r=i.parentNode}catch{return null}return this.find(r,t)}return null}create(i,t,r){let n=this.query(t);if(n==null)throw new Po(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(i,s,r);return ef.blots.set(l.domNode,l),l}find(i,t=!1){return ef.find(i,t)}query(i,t=X.ANY){let r;return typeof i=="string"?r=this.types[i]||this.attributes[i]:i instanceof Text||i.nodeType===Node.TEXT_NODE?r=this.types.text:typeof i=="number"?i&X.LEVEL&X.BLOCK?r=this.types.block:i&X.LEVEL&X.INLINE&&(r=this.types.inline):i instanceof Element&&((i.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[i.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...i){return i.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new Po("Invalid definition");if(r&&t.blotName==="abstract")throw new Po("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};yz.blots=new WeakMap;var Ho=yz;function bz(o,i){return(o.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${i}-`)===0)}var tf=class extends Vr{static keys(i){return(i.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(i,t){return this.canAdd(i,t)?(this.remove(i),i.classList.add(`${this.keyName}-${t}`),!0):!1}remove(i){bz(i,this.keyName).forEach(t=>{i.classList.remove(t)}),i.classList.length===0&&i.removeAttribute("class")}value(i){let t=(bz(i,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(i,t)?t:""}},Bt=tf;function Zm(o){let i=o.split("-"),t=i.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return i[0]+t}var rf=class extends Vr{static keys(i){return(i.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(i,t){return this.canAdd(i,t)?(i.style[Zm(this.keyName)]=t,!0):!1}remove(i){i.style[Zm(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")}value(i){let t=i.style[Zm(this.keyName)];return this.canAdd(i,t)?t:""}},ni=rf,nf=class{constructor(i){this.attributes={},this.domNode=i,this.build()}attribute(i,t){t?i.add(this.domNode,t)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])}build(){this.attributes={};let i=Ho.find(this.domNode);if(i==null)return;let t=Vr.keys(this.domNode),r=Bt.keys(this.domNode),n=ni.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=i.scroll.query(a,X.ATTRIBUTE);s instanceof Vr&&(this.attributes[s.attrName]=s)})}copy(i){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);i.format(t,r)})}move(i){this.copy(i),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((i,t)=>(i[t]=this.attributes[t].value(this.domNode),i),{})}},lc=nf,xz=class{constructor(i,t){this.scroll=i,this.domNode=t,Ho.blots.set(t,this),this.prev=null,this.next=null}static create(i){if(this.tagName==null)throw new Po("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof i=="string"?(r=i.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof i=="number"&&(r=i),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let i=this.domNode.cloneNode(!1);return this.scroll.create(i)}detach(){this.parent!=null&&this.parent.removeChild(this),Ho.blots.delete(this.domNode)}deleteAt(i,t){this.isolate(i,t).remove()}formatAt(i,t,r,n){let a=this.isolate(i,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(i,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(i);this.parent.insertBefore(n,a||void 0)}isolate(i,t){let r=this.split(i);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(i=this.parent){return this.parent==null||this===i?0:this.parent.children.offset(this)+this.parent.offset(i)}optimize(i){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(i,t){return i===0?this:this.next}update(i,t){}wrap(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Po(`Cannot wrap ${i}`);return r.appendChild(this),r}};xz.blotName="abstract";var wz=xz,zz=class extends wz{static value(i){return!0}index(i,t){return this.domNode===i||this.domNode.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(i,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return i>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};zz.scope=X.INLINE_BLOT;var tA=zz,Vt=tA,of=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...i){if(this.insertBefore(i[0],null),i.length>1){let t=i.slice(1);this.append(...t)}}at(i){let t=this.iterator(),r=t();for(;r&&i>0;)i-=1,r=t();return r}contains(i){let t=this.iterator(),r=t();for(;r;){if(r===i)return!0;r=t()}return!1}indexOf(i){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===i)return n;n+=1,r=t()}return-1}insertBefore(i,t){i!=null&&(this.remove(i),i.next=t,t!=null?(i.prev=t.prev,t.prev!=null&&(t.prev.next=i),t.prev=i,t===this.head&&(this.head=i)):this.tail!=null?(this.tail.next=i,i.prev=this.tail,this.tail=i):(i.prev=null,this.head=this.tail=i),this.length+=1)}offset(i){let t=0,r=this.head;for(;r!=null;){if(r===i)return t;t+=r.length(),r=r.next}return-1}remove(i){this.contains(i)&&(i.prev!=null&&(i.prev.next=i.next),i.next!=null&&(i.next.prev=i.prev),i===this.head&&(this.head=i.next),i===this.tail&&(this.tail=i.prev),this.length-=1)}iterator(i=this.head){return()=>{let t=i;return i!=null&&(i=i.next),t}}find(i,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(i<a||t&&i===a&&(n.next==null||n.next.length()!==0))return[n,i];i-=a,n=r()}return[null,0]}forEach(i){let t=this.iterator(),r=t();for(;r;)i(r),r=t()}forEachAt(i,t,r){if(t<=0)return;let[n,a]=this.find(i),s=i-a,l=this.iterator(n),p=l();for(;p&&s<i+t;){let h=p.length();i>s?r(p,i-s,Math.min(t,s+h-i)):r(p,0,Math.min(h,i+t-s)),s+=h,p=l()}}map(i){return this.reduce((t,r)=>(t.push(i(r)),t),[])}reduce(i,t){let r=this.iterator(),n=r();for(;n;)t=i(t,n),n=r();return t}};function vz(o,i){let t=i.find(o);if(t)return t;try{return i.create(o)}catch{let r=i.create(X.INLINE);return Array.from(o.childNodes).forEach(n=>{r.domNode.appendChild(n)}),o.parentNode&&o.parentNode.replaceChild(r.domNode,o),r.attach(),r}}var _z=class Oo extends wz{constructor(i,t){super(i,t),this.uiNode=null,this.build()}appendChild(i){this.insertBefore(i)}attach(){super.attach(),this.children.forEach(i=>{i.attach()})}attachUI(i){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=i,Oo.uiClass&&this.uiNode.classList.add(Oo.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new of,Array.from(this.domNode.childNodes).filter(i=>i!==this.uiNode).reverse().forEach(i=>{try{let t=vz(i,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Po)return;throw t}})}deleteAt(i,t){if(i===0&&t===this.length())return this.remove();this.children.forEachAt(i,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(i,t=0){let[r,n]=this.children.find(t);return i.blotName==null&&i(r)||i.blotName!=null&&r instanceof i?[r,n]:r instanceof Oo?r.descendant(i,n):[null,-1]}descendants(i,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,p)=>{(i.blotName==null&&i(s)||i.blotName!=null&&s instanceof i)&&n.push(s),s instanceof Oo&&(n=n.concat(s.descendants(i,l,a))),a-=p}),n}detach(){this.children.forEach(i=>{i.detach()}),super.detach()}enforceAllowedChildren(){let i=!1;this.children.forEach(t=>{i||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),i=!0):t instanceof Oo?t.unwrap():t.remove())})}formatAt(i,t,r,n){this.children.forEachAt(i,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(i,t,r){let[n,a]=this.children.find(i);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(i,t){i.parent!=null&&i.parent.children.remove(i);let r=null;this.children.insertBefore(i,t||null),i.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==i.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(i.domNode,r),i.attach()}length(){return this.children.reduce((i,t)=>i+t.length(),0)}moveChildren(i,t){this.children.forEach(r=>{i.insertBefore(r,t)})}optimize(i){if(super.optimize(i),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(i,t=!1){let[r,n]=this.children.find(i,t),a=[[this,i]];return r instanceof Oo?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(i){this.children.remove(i)}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return r instanceof Oo&&this.moveChildren(r),super.replaceWith(r)}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(i,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(i){let t=this.clone();for(;i.next!=null;)t.appendChild(i.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(i,t){let r=[],n=[];i.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=vz(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};_z.uiClass="";var rA=_z,ii=rA;function iA(o,i){if(Object.keys(o).length!==Object.keys(i).length)return!1;for(let t in o)if(o[t]!==i[t])return!1;return!0}var Fs=class Bs extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(Bs.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new lc(this.domNode)}format(i,t){if(i===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Bs||(r=r.wrap(Bs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(i,X.INLINE);if(r==null)return;r instanceof Vr?this.attributes.attribute(r,t):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t)}}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(i,t).format(r,n):super.formatAt(i,t,r,n)}optimize(i){super.optimize(i);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof Bs&&r.prev===this&&iA(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(i,t){let r=super.wrap(i,t);return r instanceof Bs&&this.attributes.move(r),r}};Fs.allowedChildren=[Fs,Vt],Fs.blotName="inline",Fs.scope=X.INLINE_BLOT,Fs.tagName="SPAN";var nA=Fs,Jp=nA,Vs=class af extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(af.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new lc(this.domNode)}format(i,t){let r=this.scroll.query(i,X.BLOCK);r!=null&&(r instanceof Vr?this.attributes.attribute(r,t):i===this.statics.blotName&&!t?this.replaceWith(af.blotName):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t))}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(i,t,r,n)}insertAt(i,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(i,t,r);else{let n=this.split(i);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Vs.blotName="block",Vs.scope=X.BLOCK_BLOT,Vs.tagName="P",Vs.allowedChildren=[Jp,Vs,Vt];var oA=Vs,Na=oA,sf=class extends ii{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(i,t){super.deleteAt(i,t),this.enforceAllowedChildren()}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.enforceAllowedChildren()}insertAt(i,t,r){super.insertAt(i,t,r),this.enforceAllowedChildren()}optimize(i){super.optimize(i),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};sf.blotName="container",sf.scope=X.BLOCK_BLOT;var aA=sf,js=aA,lf=class extends Vt{static formats(i,t){}format(i,t){super.formatAt(0,this.length(),i,t)}formatAt(i,t,r,n){i===0&&t===this.length()?this.format(r,n):super.formatAt(i,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},wt=lf,sA={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},lA=100,Us=class extends ii{constructor(i,t){super(null,t),this.registry=i,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,sA),this.attach()}create(i,t){return this.registry.create(this,i,t)}find(i,t=!1){let r=this.registry.find(i,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(i,t=X.ANY){return this.registry.query(i,t)}register(...i){return this.registry.register(...i)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(i,t){this.update(),i===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(i,t)}formatAt(i,t,r,n){this.update(),super.formatAt(i,t,r,n)}insertAt(i,t,r){this.update(),super.insertAt(i,t,r)}optimize(i=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)i.push(n.pop());let a=(p,h=!0)=>{p==null||p===this||p.domNode.parentNode!=null&&(r.has(p.domNode)||r.set(p.domNode,[]),h&&a(p.parent))},s=p=>{r.has(p.domNode)&&(p instanceof ii&&p.children.forEach(s),r.delete(p.domNode),p.optimize(t))},l=i;for(let p=0;l.length>0;p+=1){if(p>=lA)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof ii&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)i.push(n.pop())}}update(i,t={}){i=i||this.observer.takeRecords();let r=new WeakMap;i.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(i,t)}};Us.blotName="scroll",Us.defaultChild=Na,Us.allowedChildren=[Na,js],Us.scope=X.BLOCK_BLOT,Us.tagName="DIV";var cA=Us,cc=cA,cf=class kz extends Vt{static create(i){return document.createTextNode(i)}static value(i){return i.data}constructor(i,t){super(i,t),this.text=this.statics.value(this.domNode)}deleteAt(i,t){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+t)}index(i,t){return this.domNode===i?t:-1}insertAt(i,t,r){r==null?(this.text=this.text.slice(0,i)+t+this.text.slice(i),this.domNode.data=this.text):super.insertAt(i,t,r)}length(){return this.text.length}optimize(i){super.optimize(i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof kz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(i,t=!1){return[this.domNode,i]}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(i));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(i,t){i.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};cf.blotName="text",cf.scope=X.INLINE_BLOT;var dA=cf,Gs=dA;var Bo=_r(ei(),1);var zt=_r(ei(),1);var pf=_r(ei(),1);var pc=class extends wt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};pc.blotName="break";pc.tagName="BR";var Mr=pc;var Dt=class extends Gs{},pA={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Oa(o){return o.replace(/[&<>"']/g,i=>pA[i])}var In=class In extends Jp{static compare(i,t){let r=In.order.indexOf(i),n=In.order.indexOf(t);return r>=0||n>=0?r-n:i===t?0:i<t?-1:1}formatAt(i,t,r,n){if(In.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(i,t);n&&a.wrap(r,n)}else super.formatAt(i,t,r,n)}optimize(i){if(super.optimize(i),this.parent instanceof In&&In.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};V(In,"allowedChildren",[In,Mr,wt,Dt]),V(In,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var df=In,Lr=df;var Cz=1,Qe=class extends Na{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=hf(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
2862
2862
  `),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((p,h)=>(l=l.split(p,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof Mr&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Cz),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-Cz)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Qe.blotName="block";Qe.tagName="P";Qe.defaultChild=Mr;Qe.allowedChildren=[Mr,Lr,wt,Dt];var Qt=class extends wt{attach(){super.attach(),this.attributes=new lc(this.domNode)}delta(){return new pf.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(i,t){let r=this.scroll.query(i,X.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(i,t,r,n){this.format(r,n)}insertAt(i,t,r){if(r!=null){super.insertAt(i,t,r);return}let n=t.split(`
2863
2863
  `),a=n.pop(),s=n.map(p=>{let h=this.scroll.create(Qe.blotName);return h.insertAt(0,p),h}),l=this.split(i);s.forEach(p=>{this.parent.insertBefore(p,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}};Qt.scope=X.BLOCK_BLOT;function hf(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return o.descendants(Vt).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),oi(r,{},i)),new pf.default).insert(`
2864
- `,oi(o))}function oi(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return o==null||("formats"in o&&typeof o.formats=="function"&&(i={...i,...o.formats()},t&&delete i["code-token"]),o.parent==null||o.parent.statics.blotName==="scroll"||o.parent.statics.scope!==o.statics.scope)?i:oi(o.parent,i,t)}var Hi=class Hi extends wt{static value(){}constructor(i,t,r){super(i,t),this.selection=r,this.textNode=document.createTextNode(Hi.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(i,t){if(this.savedLength!==0){super.format(i,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Hi.CONTENTS.length,r.optimize(),r.formatAt(n,Hi.CONTENTS.length,i,t),this.savedLength=0)}index(i,t){return i===this.textNode?0:super.index(i,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let i=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Dt?this.prev:null,r=t?t.length():0,n=this.next instanceof Dt?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(Hi.CONTENTS).join("");s.data=Hi.CONTENTS;let p;if(t)p=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)p=n,n.insertAt(0,l);else{let h=document.createTextNode(l);p=this.scroll.create(h),this.parent.insertBefore(p,this)}if(this.remove(),i){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(i.start.node,i.start.offset),f=h(i.end.node,i.end.offset);if(m!==null&&f!==null)return{startNode:p.domNode,startOffset:m,endNode:p.domNode,endOffset:f}}return null}update(i,t){if(i.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(i){super.optimize(i);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Hi.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};V(Hi,"blotName","cursor"),V(Hi,"className","ql-cursor"),V(Hi,"tagName","span"),V(Hi,"CONTENTS","\uFEFF");var uf=Hi,Fo=uf;var ff=_r(Ez(),1);var uc=new WeakMap;var gf=["error","warn","log","info"],bf="warn";function Tz(o){if(bf&&gf.indexOf(o)<=gf.indexOf(bf)){for(var i=arguments.length,t=new Array(i>1?i-1:0),r=1;r<i;r++)t[r-1]=arguments[r];console[o](...t)}}function vf(o){return gf.reduce((i,t)=>(i[t]=Tz.bind(console,t,o),i),{})}vf.level=o=>{bf=o};Tz.level=vf.level;var _i=vf;var yf=_i("quill:events"),mA=["selectionchange","mousedown","mouseup","click"];mA.forEach(o=>{document.addEventListener(o,function(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=uc.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var mc=class extends ff.default{constructor(){super(),this.domListeners={},this.on("error",yf.error)}emit(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];return yf.log.call(yf,...t),super.emit(...t)}handleDOM(i){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[i.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(i.target===s||s.contains(i.target))&&l(i,...r)})}listenDOM(i,t,r){this.domListeners[i]||(this.domListeners[i]=[]),this.domListeners[i].push({node:t,handler:r})}};V(mc,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(mc,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=mc;var xf=_i("quill:selection"),jr=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=i,this.length=t}},zf=class{constructor(i,t){this.emitter=t,this.scroll=i,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new jr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:p}=n.range;this.setNativeRange(a,s,l,p),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let i=this.cursor.restore();if(!i)return;setTimeout(()=>{this.setNativeRange(i.startNode,i.startOffset,i.endNode,i.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(i,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(i,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Vt){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(i,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();i=Math.min(i,r-1),t=Math.min(i+t,r-1)-i;let n,[a,s]=this.scroll.leaf(i);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(i+1);if(m){let[f]=this.scroll.line(i),[b]=this.scroll.line(i+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(i+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let p="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),p="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(p="right")}return{bottom:h.top+h.height,height:h.height,left:h[p],right:h[p],top:h.top,width:0}}getNativeRange(){let i=document.getSelection();if(i==null||i.rangeCount<=0)return null;let t=i.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return xf.info("getNativeRange",r),r}getRange(){let i=this.scroll.domNode;if("isConnected"in i&&!i.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&wf(this.root,document.activeElement)}normalizedToRange(i){let t=[[i.start.node,i.start.offset]];i.native.collapsed||t.push([i.end.node,i.end.offset]);let r=t.map(s=>{let[l,p]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return p===0?m:h instanceof Vt?m+h.index(l,p):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new jr(a,n-a)}normalizeNative(i){if(!wf(this.root,i.startContainer)||!i.collapsed&&!wf(this.root,i.endContainer))return null;let t={start:{node:i.startContainer,offset:i.startOffset},end:{node:i.endContainer,offset:i.endOffset},native:i};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(i){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(i.index,!1),...r(i.index+i.length,!0)]}setNativeRange(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(xf.info("setNativeRange",i,t,r,n),i!=null&&(this.root.parentNode==null||i.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(i!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||i!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){i instanceof Element&&i.tagName==="BR"&&(t=Array.from(i.parentNode.childNodes).indexOf(i),i=i.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let p=document.createRange();p.setStart(i,t),p.setEnd(r,n),s.removeAllRanges(),s.addRange(p)}}else s.removeAllRanges(),this.root.blur()}setRange(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),xf.info("setRange",i),i!=null){let n=this.rangeToNative(i);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!Da(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,qn(this.lastRange),qn(t),i];this.emitter.emit(J.events.EDITOR_CHANGE,...a),i!==J.sources.SILENT&&this.emitter.emit(...a)}}};function wf(o,i){try{i.parentNode}catch{return!1}return o.contains(i)}var $z=zf;var fA=/^[ -~]*$/,kf=class{constructor(i){this.scroll=i,this.delta=this.getDelta()}applyDelta(i){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=Az(i),n=new zt.default;return bA(r.ops.slice()).reduce((s,l)=>{let p=zt.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(p),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
2864
+ `,oi(o))}function oi(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return o==null||("formats"in o&&typeof o.formats=="function"&&(i={...i,...o.formats()},t&&delete i["code-token"]),o.parent==null||o.parent.statics.blotName==="scroll"||o.parent.statics.scope!==o.statics.scope)?i:oi(o.parent,i,t)}var Hi=class Hi extends wt{static value(){}constructor(i,t,r){super(i,t),this.selection=r,this.textNode=document.createTextNode(Hi.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(i,t){if(this.savedLength!==0){super.format(i,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Hi.CONTENTS.length,r.optimize(),r.formatAt(n,Hi.CONTENTS.length,i,t),this.savedLength=0)}index(i,t){return i===this.textNode?0:super.index(i,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let i=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Dt?this.prev:null,r=t?t.length():0,n=this.next instanceof Dt?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(Hi.CONTENTS).join("");s.data=Hi.CONTENTS;let p;if(t)p=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)p=n,n.insertAt(0,l);else{let h=document.createTextNode(l);p=this.scroll.create(h),this.parent.insertBefore(p,this)}if(this.remove(),i){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(i.start.node,i.start.offset),f=h(i.end.node,i.end.offset);if(m!==null&&f!==null)return{startNode:p.domNode,startOffset:m,endNode:p.domNode,endOffset:f}}return null}update(i,t){if(i.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(i){super.optimize(i);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Hi.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};V(Hi,"blotName","cursor"),V(Hi,"className","ql-cursor"),V(Hi,"tagName","span"),V(Hi,"CONTENTS","\uFEFF");var uf=Hi,Fo=uf;var ff=_r(Ez(),1);var uc=new WeakMap;var gf=["error","warn","log","info"],bf="warn";function Tz(o){if(bf&&gf.indexOf(o)<=gf.indexOf(bf)){for(var i=arguments.length,t=new Array(i>1?i-1:0),r=1;r<i;r++)t[r-1]=arguments[r];console[o](...t)}}function vf(o){return gf.reduce((i,t)=>(i[t]=Tz.bind(console,t,o),i),{})}vf.level=o=>{bf=o};Tz.level=vf.level;var _i=vf;var yf=_i("quill:events"),mA=["selectionchange","mousedown","mouseup","click"];mA.forEach(o=>{document.addEventListener(o,function(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=uc.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var mc=class extends ff.default{constructor(){super(),this.domListeners={},this.on("error",yf.error)}emit(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];return yf.log.call(yf,...t),super.emit(...t)}handleDOM(i){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[i.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(i.target===s||s.contains(i.target))&&l(i,...r)})}listenDOM(i,t,r){this.domListeners[i]||(this.domListeners[i]=[]),this.domListeners[i].push({node:t,handler:r})}};V(mc,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(mc,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=mc;var xf=_i("quill:selection"),jr=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=i,this.length=t}},zf=class{constructor(i,t){this.emitter=t,this.scroll=i,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new jr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:p}=n.range;this.setNativeRange(a,s,l,p),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let i=this.cursor.restore();if(!i)return;setTimeout(()=>{this.setNativeRange(i.startNode,i.startOffset,i.endNode,i.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(i,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(i,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Vt){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(i,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();i=Math.min(i,r-1),t=Math.min(i+t,r-1)-i;let n,[a,s]=this.scroll.leaf(i);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(i+1);if(m){let[f]=this.scroll.line(i),[b]=this.scroll.line(i+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(i+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let p="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),p="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(p="right")}return{bottom:h.top+h.height,height:h.height,left:h[p],right:h[p],top:h.top,width:0}}getNativeRange(){let i=document.getSelection();if(i==null||i.rangeCount<=0)return null;let t=i.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return xf.info("getNativeRange",r),r}getRange(){let i=this.scroll.domNode;if("isConnected"in i&&!i.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&wf(this.root,document.activeElement)}normalizedToRange(i){let t=[[i.start.node,i.start.offset]];i.native.collapsed||t.push([i.end.node,i.end.offset]);let r=t.map(s=>{let[l,p]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return p===0?m:h instanceof Vt?m+h.index(l,p):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new jr(a,n-a)}normalizeNative(i){if(!wf(this.root,i.startContainer)||!i.collapsed&&!wf(this.root,i.endContainer))return null;let t={start:{node:i.startContainer,offset:i.startOffset},end:{node:i.endContainer,offset:i.endOffset},native:i};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(i){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(i.index,!1),...r(i.index+i.length,!0)]}setNativeRange(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(xf.info("setNativeRange",i,t,r,n),i!=null&&(this.root.parentNode==null||i.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(i!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||i!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){i instanceof Element&&i.tagName==="BR"&&(t=Array.from(i.parentNode.childNodes).indexOf(i),i=i.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let p=document.createRange();p.setStart(i,t),p.setEnd(r,n),s.removeAllRanges(),s.addRange(p)}}else s.removeAllRanges(),this.root.blur()}setRange(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),xf.info("setRange",i),i!=null){let n=this.rangeToNative(i);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!Ra(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,qn(this.lastRange),qn(t),i];this.emitter.emit(J.events.EDITOR_CHANGE,...a),i!==J.sources.SILENT&&this.emitter.emit(...a)}}};function wf(o,i){try{i.parentNode}catch{return!1}return o.contains(i)}var $z=zf;var fA=/^[ -~]*$/,kf=class{constructor(i){this.scroll=i,this.delta=this.getDelta()}applyDelta(i){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=Az(i),n=new zt.default;return bA(r.ops.slice()).reduce((s,l)=>{let p=zt.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(p),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
2865
2865
  `)&&(t<=s||!!this.scroll.descendant(Qt,s)[0]),this.scroll.insertAt(s,v);let[y,S]=this.scroll.line(s),T=ri({},oi(y));if(y instanceof Qe){let[N]=y.descendant(Vt,S);N&&(T=ri(T,oi(N)))}h=zt.AttributeMap.diff(T,h)||{}}else if(typeof l.insert=="object"){let v=Object.keys(l.insert)[0];if(v==null)return s;let y=this.scroll.query(v,X.INLINE)!=null;if(y)(t<=s||this.scroll.descendant(Qt,s)[0])&&(f=!0);else if(s>0){let[S,T]=this.scroll.descendant(Vt,s-1);S instanceof Dt?S.value()[T]!==`
2866
2866
  `&&(m=!0):S instanceof wt&&S.statics.scope===X.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(s,v,l.insert[v]),y){let[S]=this.scroll.descendant(Vt,s);if(S){let T=ri({},oi(S));h=zt.AttributeMap.diff(T,h)||{}}}}t+=p}else if(n.push(l),l.retain!==null&&typeof l.retain=="object"){let v=Object.keys(l.retain)[0];if(v==null)return s;this.scroll.updateEmbedAt(s,v,l.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(s,p,v,h[v])});let b=m?1:0,g=f?1:0;return t+=b+g,n.retain(b),n.delete(g),s+p+b+g},0),n.reduce((s,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(s,l.delete),s):s+zt.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(i,t){return this.scroll.deleteAt(i,t),this.update(new zt.default().retain(i).delete(t))}formatLine(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(a=>{this.scroll.lines(i,Math.max(t,1)).forEach(s=>{s.format(a,r[a])})}),this.scroll.optimize();let n=new zt.default().retain(i).retain(t,qn(r));return this.update(n)}formatText(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(a=>{this.scroll.formatAt(i,t,a,r[a])});let n=new zt.default().retain(i).retain(t,qn(r));return this.update(n)}getContents(i,t){return this.delta.slice(i,i+t)}getDelta(){return this.scroll.lines().reduce((i,t)=>i.concat(t.delta()),new zt.default)}getFormat(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],n=[];t===0?this.scroll.path(i).forEach(l=>{let[p]=l;p instanceof Qe?r.push(p):p instanceof Vt&&n.push(p)}):(r=this.scroll.lines(i,t),n=this.scroll.descendants(Vt,i,t));let[a,s]=[r,n].map(l=>{let p=l.shift();if(p==null)return{};let h=oi(p);for(;Object.keys(h).length>0;){let m=l.shift();if(m==null)return h;h=gA(oi(m),h)}return h});return{...a,...s}}getHTML(i,t){let[r,n]=this.scroll.line(i);if(r){let a=r.length();return r.length()>=n+t&&!(n===0&&t===a)?fc(r,n,t,!0):fc(this.scroll,i,t,!0)}return""}getText(i,t){return this.getContents(i,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(i,t){let r=Az(t),n=new zt.default().retain(i).concat(r);return this.scroll.insertContents(i,r),this.update(n)}insertEmbed(i,t,r){return this.scroll.insertAt(i,t,r),this.update(new zt.default().retain(i).insert({[t]:r}))}insertText(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
2867
2867
  `).replace(/\r/g,`
2868
2868
  `),this.scroll.insertAt(i,t),Object.keys(r).forEach(n=>{this.scroll.formatAt(i,t.length,n,r[n])}),this.update(new zt.default().retain(i).insert(t,qn(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let i=this.scroll.children.head;if(i?.statics.blotName!==Qe.blotName)return!1;let t=i;return t.children.length>1?!1:t.children.head instanceof Mr}removeFormat(i,t){let r=this.getText(i,t),[n,a]=this.scroll.line(i+t),s=0,l=new zt.default;n!=null&&(s=n.length()-a,l=n.delta().slice(a,a+s-1).insert(`
2869
- `));let h=this.getContents(i,t+s).diff(new zt.default().insert(r).concat(l)),m=new zt.default().retain(i).concat(h);return this.applyDelta(m)}update(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(fA)&&this.scroll.find(t[0].target)){let a=this.scroll.find(t[0].target),s=oi(a),l=a.offset(this.scroll),p=t[0].oldValue.replace(Fo.CONTENTS,""),h=new zt.default().insert(p),m=new zt.default().insert(a.value()),f=r&&{oldRange:Mz(r.oldRange,-l),newRange:Mz(r.newRange,-l)};i=new zt.default().retain(l).concat(h.diff(m,f)).reduce((g,v)=>v.insert?g.insert(v.insert,s):g.push(v),new zt.default),this.delta=n.compose(i)}else this.delta=this.getDelta(),(!i||!Da(n.compose(i),this.delta))&&(i=n.diff(this.delta,r));return i}};function Ws(o,i,t){if(o.length===0){let[g]=_f(t.pop());return i<=0?`</li></${g}>`:`</li></${g}>${Ws([],i-1,t)}`}let[{child:r,offset:n,length:a,indent:s,type:l},...p]=o,[h,m]=_f(l);if(s>i)return t.push(l),s===i+1?`<${h}><li${m}>${fc(r,n,a)}${Ws(p,s,t)}`:`<${h}><li>${Ws(o,i+1,t)}`;let f=t[t.length-1];if(s===i&&l===f)return`</li><li${m}>${fc(r,n,a)}${Ws(p,s,t)}`;let[b]=_f(t.pop());return`</li></${b}>${Ws(o,i-1,t)}`}function fc(o,i,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in o&&typeof o.html=="function")return o.html(i,t);if(o instanceof Dt)return Na(o.value().slice(i,i+t)).replaceAll(" ","&nbsp;");if(o instanceof ii){if(o.statics.blotName==="list-container"){let h=[];return o.children.forEachAt(i,t,(m,f,b)=>{let g="formats"in m&&typeof m.formats=="function"?m.formats():{};h.push({child:m,offset:f,length:b,indent:g.indent||0,type:g.list})}),Ws(h,-1,[])}let n=[];if(o.children.forEachAt(i,t,(h,m,f)=>{n.push(fc(h,m,f))}),r||o.statics.blotName==="list")return n.join("");let{outerHTML:a,innerHTML:s}=o.domNode,[l,p]=a.split(`>${s}<`);return l==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${p}`:`${l}>${n.join("")}<${p}`}return o.domNode instanceof Element?o.domNode.outerHTML:""}function gA(o,i){return Object.keys(i).reduce((t,r)=>{if(o[r]==null)return t;let n=i[r];return n===o[r]?t[r]=n:Array.isArray(n)?n.indexOf(o[r])<0?t[r]=n.concat([o[r]]):t[r]=n:t[r]=[n,o[r]],t},{})}function _f(o){let i=o==="ordered"?"ol":"ul";switch(o){case"checked":return[i,' data-list="checked"'];case"unchecked":return[i,' data-list="unchecked"'];default:return[i,""]}}function Az(o){return o.reduce((i,t)=>{if(typeof t.insert=="string"){let r=t.insert.replace(/\r\n/g,`
2869
+ `));let h=this.getContents(i,t+s).diff(new zt.default().insert(r).concat(l)),m=new zt.default().retain(i).concat(h);return this.applyDelta(m)}update(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(fA)&&this.scroll.find(t[0].target)){let a=this.scroll.find(t[0].target),s=oi(a),l=a.offset(this.scroll),p=t[0].oldValue.replace(Fo.CONTENTS,""),h=new zt.default().insert(p),m=new zt.default().insert(a.value()),f=r&&{oldRange:Mz(r.oldRange,-l),newRange:Mz(r.newRange,-l)};i=new zt.default().retain(l).concat(h.diff(m,f)).reduce((g,v)=>v.insert?g.insert(v.insert,s):g.push(v),new zt.default),this.delta=n.compose(i)}else this.delta=this.getDelta(),(!i||!Ra(n.compose(i),this.delta))&&(i=n.diff(this.delta,r));return i}};function Ws(o,i,t){if(o.length===0){let[g]=_f(t.pop());return i<=0?`</li></${g}>`:`</li></${g}>${Ws([],i-1,t)}`}let[{child:r,offset:n,length:a,indent:s,type:l},...p]=o,[h,m]=_f(l);if(s>i)return t.push(l),s===i+1?`<${h}><li${m}>${fc(r,n,a)}${Ws(p,s,t)}`:`<${h}><li>${Ws(o,i+1,t)}`;let f=t[t.length-1];if(s===i&&l===f)return`</li><li${m}>${fc(r,n,a)}${Ws(p,s,t)}`;let[b]=_f(t.pop());return`</li></${b}>${Ws(o,i-1,t)}`}function fc(o,i,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in o&&typeof o.html=="function")return o.html(i,t);if(o instanceof Dt)return Oa(o.value().slice(i,i+t)).replaceAll(" ","&nbsp;");if(o instanceof ii){if(o.statics.blotName==="list-container"){let h=[];return o.children.forEachAt(i,t,(m,f,b)=>{let g="formats"in m&&typeof m.formats=="function"?m.formats():{};h.push({child:m,offset:f,length:b,indent:g.indent||0,type:g.list})}),Ws(h,-1,[])}let n=[];if(o.children.forEachAt(i,t,(h,m,f)=>{n.push(fc(h,m,f))}),r||o.statics.blotName==="list")return n.join("");let{outerHTML:a,innerHTML:s}=o.domNode,[l,p]=a.split(`>${s}<`);return l==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${p}`:`${l}>${n.join("")}<${p}`}return o.domNode instanceof Element?o.domNode.outerHTML:""}function gA(o,i){return Object.keys(i).reduce((t,r)=>{if(o[r]==null)return t;let n=i[r];return n===o[r]?t[r]=n:Array.isArray(n)?n.indexOf(o[r])<0?t[r]=n.concat([o[r]]):t[r]=n:t[r]=[n,o[r]],t},{})}function _f(o){let i=o==="ordered"?"ol":"ul";switch(o){case"checked":return[i,' data-list="checked"'];case"unchecked":return[i,' data-list="unchecked"'];default:return[i,""]}}function Az(o){return o.reduce((i,t)=>{if(typeof t.insert=="string"){let r=t.insert.replace(/\r\n/g,`
2870
2870
  `).replace(/\r/g,`
2871
2871
  `);return i.insert(r,t.attributes)}return i.push(t)},new zt.default)}function Mz(o,i){let{index:t,length:r}=o;return new jr(t+i,r)}function bA(o){let i=[];return o.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
2872
2872
  `).forEach((n,a)=>{a&&i.push({insert:`
@@ -2877,30 +2877,30 @@ import{a as Fn,b as h3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var K
2877
2877
  `);let b=oi(this.line(i)[0]),g=Bi.AttributeMap.diff(b,a.attributes)||{};Object.keys(g).forEach(v=>{this.formatAt(f-1,1,v,g[v])}),i=f}let[s,l]=this.children.find(i);if(r.length&&(s&&(s=s.split(l),l=0),r.forEach(p=>{if(p.type==="block"){let h=this.createBlock(p.attributes,s||void 0);Af(h,0,p.delta)}else{let h=this.create(p.key,p.value);this.insertBefore(h,s||void 0),Object.keys(p.attributes).forEach(m=>{h.format(m,p.attributes[m])})}})),n.type==="block"&&n.delta.length()){let p=s?s.offset(s.scroll)+l:this.length();Af(this,p,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(i){let t=this.path(i).pop();if(!t)return[null,-1];let[r,n]=t;return r instanceof Vt?[r,n]:[null,-1]}line(i){return i===this.length()?this.line(i-1):this.descendant(Hz,i)}lines(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,r=(n,a,s)=>{let l=[],p=s;return n.children.forEachAt(a,s,(h,m,f)=>{Hz(h)?l.push(h):h instanceof js&&(l=l.concat(r(h,m,p))),p-=f}),l};return r(this,i,t)}optimize(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(i,t),i.length>0&&this.emitter.emit(J.events.SCROLL_OPTIMIZE,i,t))}path(i){return super.path(i).slice(1)}remove(){}update(i){if(this.batch){Array.isArray(i)&&(this.batch=this.batch.concat(i));return}let t=J.sources.USER;typeof i=="string"&&(t=i),Array.isArray(i)||(i=this.observer.takeRecords()),i=i.filter(r=>{let{target:n}=r,a=this.find(n,!0);return a&&!Fz(a)}),i.length>0&&this.emitter.emit(J.events.SCROLL_BEFORE_UPDATE,t,i),super.update(i.concat([])),i.length>0&&this.emitter.emit(J.events.SCROLL_UPDATE,t,i)}updateEmbedAt(i,t,r){let[n]=this.descendant(a=>a instanceof Qt,i);n&&n.statics.blotName===t&&Fz(n)&&n.updateContent(r)}handleDragStart(i){i.preventDefault()}deltaToRenderBlocks(i){let t=[],r=new Bi.default;return i.forEach(n=>{let a=n?.insert;if(a)if(typeof a=="string"){let s=a.split(`
2878
2878
  `);s.slice(0,-1).forEach(p=>{r.insert(p,n.attributes),t.push({type:"block",delta:r,attributes:n.attributes??{}}),r=new Bi.default});let l=s[s.length-1];l&&r.insert(l,n.attributes)}else{let s=Object.keys(a)[0];if(!s)return;this.query(s,X.INLINE)?r.push(n):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new Bi.default,t.push({type:"blockEmbed",key:s,value:a[s],attributes:n.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(i,t){let r,n={};Object.entries(i).forEach(l=>{let[p,h]=l;this.query(p,X.BLOCK&X.BLOT)!=null?r=p:n[p]=h});let a=this.create(r||this.statics.defaultChild.blotName,r?i[r]:void 0);this.insertBefore(a,t||void 0);let s=a.length();return Object.entries(n).forEach(l=>{let[p,h]=l;a.formatAt(0,s,p,h)}),a}};V(Vo,"blotName","scroll"),V(Vo,"className","ql-editor"),V(Vo,"tagName","DIV"),V(Vo,"defaultChild",Qe),V(Vo,"allowedChildren",[Qe,Qt,Fi]);function Af(o,i,t){t.reduce((r,n)=>{let a=Bi.Op.length(n),s=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){let l=n.insert;o.insertAt(r,l);let[p]=o.descendant(Vt,r),h=oi(p);s=Bi.AttributeMap.diff(h,s)||{}}else if(typeof n.insert=="object"){let l=Object.keys(n.insert)[0];if(l==null)return r;if(o.insertAt(r,l,n.insert[l]),o.scroll.query(l,X.INLINE)!=null){let[h]=o.descendant(Vt,r),m=oi(h);s=Bi.AttributeMap.diff(m,s)||{}}}}return Object.keys(s).forEach(l=>{o.formatAt(r,a,l,s[l])}),r+a},i)}var Bz=Vo;var ai=_r(ei(),1);var Mf={scope:X.BLOCK,whitelist:["right","center","justify"]},Vz=new Vr("align","align",Mf),Lf=new Bt("align","ql-align",Mf),nh=new ni("align","text-align",Mf);var bc=class extends ni{value(i){let t=super.value(i);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):t}},Uz=new Bt("color","ql-color",{scope:X.INLINE}),vc=new bc("color","color",{scope:X.INLINE});var jz=new Bt("background","ql-bg",{scope:X.INLINE}),yc=new bc("background","background-color",{scope:X.INLINE});var Dn=class extends Fi{static create(i){let t=super.create(i);return t.setAttribute("spellcheck","false"),t}code(i,t){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
2879
2879
  `).slice(i,i+t)}html(i,t){return`<pre>
2880
- ${Na(this.code(i,t))}
2881
- </pre>`}},Rt=class extends Qe{static register(){G.register(Dn)}};V(Rt,"TAB"," ");var Xs=class extends Lr{};Xs.blotName="code";Xs.tagName="CODE";Rt.blotName="code-block";Rt.className="ql-code-block";Rt.tagName="DIV";Dn.blotName="code-block-container";Dn.className="ql-code-block-container";Dn.tagName="DIV";Dn.allowedChildren=[Rt];Rt.allowedChildren=[Dt,Mr,Fo];Rt.requiredContainer=Dn;var qf={scope:X.BLOCK,whitelist:["rtl"]},oh=new Vr("direction","dir",qf),If=new Bt("direction","ql-direction",qf),ah=new ni("direction","direction",qf);var Gz={scope:X.INLINE,whitelist:["serif","monospace"]},Rf=new Bt("font","ql-font",Gz),Df=class extends ni{value(i){return super.value(i).replace(/["']/g,"")}},sh=new Df("font","font-family",Gz);var Nf=new Bt("size","ql-size",{scope:X.INLINE,whitelist:["small","large","huge"]}),lh=new ni("size","font-size",{scope:X.INLINE,whitelist:["10px","18px","32px"]});var Ir=_r(ei(),1);var CA=_i("quill:keyboard"),SA=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",xc=class o extends mt{static match(i,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==i[r]&&t[r]!==null)?!1:t.key===i.key||t.key===i.which}constructor(i,t){super(i,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=TA(i);if(n==null){CA.warn("Attempted to add invalid keyboard binding",n);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(n.key)?n.key:[n.key]).forEach(s=>{let l={...n,key:s,...t,...r};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",i=>{if(i.defaultPrevented||i.isComposing||i.keyCode===229&&(i.key==="Enter"||i.key==="Backspace"))return;let n=(this.bindings[i.key]||[]).concat(this.bindings[i.which]||[]).filter(T=>o.match(i,T));if(n.length===0)return;let a=G.find(i.target,!0);if(a&&a.scroll!==this.quill.scroll)return;let s=this.quill.getSelection();if(s==null||!this.quill.hasFocus())return;let[l,p]=this.quill.getLine(s.index),[h,m]=this.quill.getLeaf(s.index),[f,b]=s.length===0?[h,m]:this.quill.getLeaf(s.index+s.length),g=h instanceof Gs?h.value().slice(0,m):"",v=f instanceof Gs?f.value().slice(b):"",y={collapsed:s.length===0,empty:s.length===0&&l.length()<=1,format:this.quill.getFormat(s),line:l,offset:p,prefix:g,suffix:v,event:i};n.some(T=>{if(T.collapsed!=null&&T.collapsed!==y.collapsed||T.empty!=null&&T.empty!==y.empty||T.offset!=null&&T.offset!==y.offset)return!1;if(Array.isArray(T.format)){if(T.format.every(N=>y.format[N]==null))return!1}else if(typeof T.format=="object"&&!Object.keys(T.format).every(N=>T.format[N]===!0?y.format[N]!=null:T.format[N]===!1?y.format[N]==null:Da(T.format[N],y.format[N])))return!1;return T.prefix!=null&&!T.prefix.test(y.prefix)||T.suffix!=null&&!T.suffix.test(y.suffix)?!1:T.handler.call(this,s,y,T)!==!0})&&i.preventDefault()})}handleBackspace(i,t){let r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(i.index===0||this.quill.getLength()<=1)return;let n={},[a]=this.quill.getLine(i.index),s=new Ir.default().retain(i.index-r).delete(r);if(t.offset===0){let[l]=this.quill.getLine(i.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){let h=a.formats(),m=this.quill.getFormat(i.index-1,1);if(n=Ir.AttributeMap.diff(h,m)||{},Object.keys(n).length>0){let f=new Ir.default().retain(i.index+a.length()-2).retain(1,n);s=s.compose(f)}}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDelete(i,t){let r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(i.index>=this.quill.getLength()-r)return;let n={},[a]=this.quill.getLine(i.index),s=new Ir.default().retain(i.index).delete(r);if(t.offset>=a.length()-1){let[l]=this.quill.getLine(i.index+1);if(l){let p=a.formats(),h=this.quill.getFormat(i.index,1);n=Ir.AttributeMap.diff(p,h)||{},Object.keys(n).length>0&&(s=s.retain(l.length()-1).retain(1,n))}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDeleteRange(i){wc({range:i,quill:this.quill}),this.quill.focus()}handleEnter(i,t){let r=Object.keys(t.format).reduce((a,s)=>(this.quill.scroll.query(s,X.BLOCK)&&!Array.isArray(t.format[s])&&(a[s]=t.format[s]),a),{}),n=new Ir.default().retain(i.index).delete(i.length).insert(`
2880
+ ${Oa(this.code(i,t))}
2881
+ </pre>`}},Rt=class extends Qe{static register(){G.register(Dn)}};V(Rt,"TAB"," ");var Xs=class extends Lr{};Xs.blotName="code";Xs.tagName="CODE";Rt.blotName="code-block";Rt.className="ql-code-block";Rt.tagName="DIV";Dn.blotName="code-block-container";Dn.className="ql-code-block-container";Dn.tagName="DIV";Dn.allowedChildren=[Rt];Rt.allowedChildren=[Dt,Mr,Fo];Rt.requiredContainer=Dn;var qf={scope:X.BLOCK,whitelist:["rtl"]},oh=new Vr("direction","dir",qf),If=new Bt("direction","ql-direction",qf),ah=new ni("direction","direction",qf);var Gz={scope:X.INLINE,whitelist:["serif","monospace"]},Rf=new Bt("font","ql-font",Gz),Df=class extends ni{value(i){return super.value(i).replace(/["']/g,"")}},sh=new Df("font","font-family",Gz);var Nf=new Bt("size","ql-size",{scope:X.INLINE,whitelist:["small","large","huge"]}),lh=new ni("size","font-size",{scope:X.INLINE,whitelist:["10px","18px","32px"]});var Ir=_r(ei(),1);var CA=_i("quill:keyboard"),SA=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",xc=class o extends mt{static match(i,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==i[r]&&t[r]!==null)?!1:t.key===i.key||t.key===i.which}constructor(i,t){super(i,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=TA(i);if(n==null){CA.warn("Attempted to add invalid keyboard binding",n);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(n.key)?n.key:[n.key]).forEach(s=>{let l={...n,key:s,...t,...r};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",i=>{if(i.defaultPrevented||i.isComposing||i.keyCode===229&&(i.key==="Enter"||i.key==="Backspace"))return;let n=(this.bindings[i.key]||[]).concat(this.bindings[i.which]||[]).filter(T=>o.match(i,T));if(n.length===0)return;let a=G.find(i.target,!0);if(a&&a.scroll!==this.quill.scroll)return;let s=this.quill.getSelection();if(s==null||!this.quill.hasFocus())return;let[l,p]=this.quill.getLine(s.index),[h,m]=this.quill.getLeaf(s.index),[f,b]=s.length===0?[h,m]:this.quill.getLeaf(s.index+s.length),g=h instanceof Gs?h.value().slice(0,m):"",v=f instanceof Gs?f.value().slice(b):"",y={collapsed:s.length===0,empty:s.length===0&&l.length()<=1,format:this.quill.getFormat(s),line:l,offset:p,prefix:g,suffix:v,event:i};n.some(T=>{if(T.collapsed!=null&&T.collapsed!==y.collapsed||T.empty!=null&&T.empty!==y.empty||T.offset!=null&&T.offset!==y.offset)return!1;if(Array.isArray(T.format)){if(T.format.every(N=>y.format[N]==null))return!1}else if(typeof T.format=="object"&&!Object.keys(T.format).every(N=>T.format[N]===!0?y.format[N]!=null:T.format[N]===!1?y.format[N]==null:Ra(T.format[N],y.format[N])))return!1;return T.prefix!=null&&!T.prefix.test(y.prefix)||T.suffix!=null&&!T.suffix.test(y.suffix)?!1:T.handler.call(this,s,y,T)!==!0})&&i.preventDefault()})}handleBackspace(i,t){let r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(i.index===0||this.quill.getLength()<=1)return;let n={},[a]=this.quill.getLine(i.index),s=new Ir.default().retain(i.index-r).delete(r);if(t.offset===0){let[l]=this.quill.getLine(i.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){let h=a.formats(),m=this.quill.getFormat(i.index-1,1);if(n=Ir.AttributeMap.diff(h,m)||{},Object.keys(n).length>0){let f=new Ir.default().retain(i.index+a.length()-2).retain(1,n);s=s.compose(f)}}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDelete(i,t){let r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(i.index>=this.quill.getLength()-r)return;let n={},[a]=this.quill.getLine(i.index),s=new Ir.default().retain(i.index).delete(r);if(t.offset>=a.length()-1){let[l]=this.quill.getLine(i.index+1);if(l){let p=a.formats(),h=this.quill.getFormat(i.index,1);n=Ir.AttributeMap.diff(p,h)||{},Object.keys(n).length>0&&(s=s.retain(l.length()-1).retain(1,n))}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDeleteRange(i){wc({range:i,quill:this.quill}),this.quill.focus()}handleEnter(i,t){let r=Object.keys(t.format).reduce((a,s)=>(this.quill.scroll.query(s,X.BLOCK)&&!Array.isArray(t.format[s])&&(a[s]=t.format[s]),a),{}),n=new Ir.default().retain(i.index).delete(i.length).insert(`
2882
2882
  `,r);this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(i.index+1,G.sources.SILENT),this.quill.focus()}},EA={bindings:{bold:Of("bold"),italic:Of("italic"),underline:Of("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(o,i){return i.collapsed&&i.offset!==0?!0:(this.quill.format("indent","+1",G.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(o,i){return i.collapsed&&i.offset!==0?!0:(this.quill.format("indent","-1",G.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(o,i){i.format.indent!=null?this.quill.format("indent","-1",G.sources.USER):i.format.list!=null&&this.quill.format("list",!1,G.sources.USER)}},"indent code-block":Wz(!0),"outdent code-block":Wz(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(o){this.quill.deleteText(o.index-1,1,G.sources.USER)}},tab:{key:"Tab",handler(o,i){if(i.format.table)return!0;this.quill.history.cutoff();let t=new Ir.default().retain(o.index).delete(o.length).insert(" ");return this.quill.updateContents(t,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index+1,G.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,G.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(o,i){let t={list:!1};i.format.indent&&(t.indent=!1),this.quill.formatLine(o.index,o.length,t,G.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(o){let[i,t]=this.quill.getLine(o.index),r={...i.formats(),list:"checked"},n=new Ir.default().retain(o.index).insert(`
2883
2883
  `,r).retain(i.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(o.index+1,G.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(o,i){let[t,r]=this.quill.getLine(o.index),n=new Ir.default().retain(o.index).insert(`
2884
2884
  `,i.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(o.index+1,G.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(o){let i=this.quill.getModule("table");if(i){let[t,r,n,a]=i.getTable(o),s=$A(t,r,n,a);if(s==null)return;let l=t.offset();if(s<0){let p=new Ir.default().retain(l).insert(`
2885
2885
  `);this.quill.updateContents(p,G.sources.USER),this.quill.setSelection(o.index+1,o.length,G.sources.SILENT)}else if(s>0){l+=t.length();let p=new Ir.default().retain(l).insert(`
2886
2886
  `);this.quill.updateContents(p,G.sources.USER),this.quill.setSelection(l,G.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(o,i){let{event:t,line:r}=i,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,G.sources.USER):this.quill.setSelection(n+r.length(),G.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(o,i){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=i.prefix,[r,n]=this.quill.getLine(o.index);if(n>t)return!0;let a;switch(i.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(o.index," ",G.sources.USER),this.quill.history.cutoff();let s=new Ir.default().retain(o.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index-t,G.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(o){let[i,t]=this.quill.getLine(o.index),r=2,n=i;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new Ir.default().retain(o.index+i.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,G.sources.USER),this.quill.setSelection(o.index-1,G.sources.SILENT),!1}return!0}},"embed left":ch("ArrowLeft",!1),"embed left shift":ch("ArrowLeft",!0),"embed right":ch("ArrowRight",!1),"embed right shift":ch("ArrowRight",!0),"table down":Kz(!1),"table up":Kz(!0)}};xc.DEFAULTS=EA;function Wz(o){return{key:"Tab",shiftKey:!o,format:{"code-block":!0},handler(i,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(i.length===0&&!r.shiftKey){this.quill.insertText(i.index,a,G.sources.USER),this.quill.setSelection(i.index+a.length,G.sources.SILENT);return}let s=i.length===0?this.quill.getLines(i.index,1):this.quill.getLines(i),{index:l,length:p}=i;s.forEach((h,m)=>{o?(h.insertAt(0,a),m===0?l+=a.length:p+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:p-=a.length)}),this.quill.update(G.sources.USER),this.quill.setSelection(l,p,G.sources.SILENT)}}}function ch(o,i){return{key:o,shiftKey:i,altKey:null,[o==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;o==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof wt?(o==="ArrowLeft"?i?this.quill.setSelection(r.index-1,r.length+1,G.sources.USER):this.quill.setSelection(r.index-1,G.sources.USER):i?this.quill.setSelection(r.index,r.length+1,G.sources.USER):this.quill.setSelection(r.index+r.length+1,G.sources.USER),!1):!0}}}function Of(o){return{key:o[0],shortKey:!0,handler(i,t){this.quill.format(o,!t.format[o],G.sources.USER)}}}function Kz(o){return{key:o?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(i,t){let r=o?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let p=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(p,0,G.sources.USER)}}else{let s=n.table()[r];s!=null&&(o?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,G.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,G.sources.USER))}return!1}}}function TA(o){if(typeof o=="string"||typeof o=="number")o={key:o};else if(typeof o=="object")o=qn(o);else return null;return o.shortKey&&(o[SA]=o.shortKey,delete o.shortKey),o}function wc(o){let{quill:i,range:t}=o,r=i.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=Ir.AttributeMap.diff(s,a)||{}}i.deleteText(t,G.sources.USER),Object.keys(n).length>0&&i.formatLine(t.index,1,n,G.sources.USER),i.setSelection(t.index,G.sources.SILENT)}function $A(o,i,t,r){return i.prev==null&&i.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:i.prev==null?-1:i.next==null?1:null}var AA=/font-weight:\s*normal/,MA=["P","OL","UL"],Yz=o=>o&&MA.includes(o.tagName),LA=o=>{Array.from(o.querySelectorAll("br")).filter(i=>Yz(i.previousElementSibling)&&Yz(i.nextElementSibling)).forEach(i=>{i.parentNode?.removeChild(i)})},qA=o=>{Array.from(o.querySelectorAll('b[style*="font-weight"]')).filter(i=>i.getAttribute("style")?.match(AA)).forEach(i=>{let t=o.createDocumentFragment();t.append(...i.childNodes),i.parentNode?.replaceChild(t,i)})};function Pf(o){o.querySelector('[id^="docs-internal-guid-"]')&&(qA(o),LA(o))}var IA=/\bmso-list:[^;]*ignore/i,DA=/\bmso-list:[^;]*\bl(\d+)/i,RA=/\bmso-list:[^;]*\blevel(\d+)/i,NA=(o,i)=>{let t=o.getAttribute("style"),r=t?.match(DA);if(!r)return null;let n=Number(r[1]),a=t?.match(RA),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),p=i.match(l),h=p&&p[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:o}},OA=o=>{let i=Array.from(o.querySelectorAll("[style*=mso-list]")),t=[],r=[];i.forEach(s=>{(s.getAttribute("style")||"").match(IA)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=o.documentElement.innerHTML,a=r.map(s=>NA(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let p=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,p.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(p,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function Hf(o){o.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&OA(o)}var PA=[Hf,Pf],HA=o=>{o.documentElement&&PA.forEach(i=>{i(o)})},Qz=HA;var FA=_i("quill:clipboard"),BA=[[Node.TEXT_NODE,eM],[Node.TEXT_NODE,Jz],["br",WA],[Node.ELEMENT_NODE,Jz],[Node.ELEMENT_NODE,GA],[Node.ELEMENT_NODE,jA],[Node.ELEMENT_NODE,JA],["li",QA],["ol, ul",XA],["pre",KA],["tr",ZA],["b",Ff("bold")],["i",Ff("italic")],["strike",Ff("strike")],["style",YA]],VA=[Vz,oh].reduce((o,i)=>(o[i.keyName]=i,o),{}),Xz=[nh,yc,vc,ah,sh,lh].reduce((o,i)=>(o[i.keyName]=i,o),{}),zc=class extends mt{constructor(i,t){super(i,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],BA.concat(this.options.matchers??[]).forEach(r=>{let[n,a]=r;this.addMatcher(n,a)})}addMatcher(i,t){this.matchers.push([i,t])}convert(i){let{html:t,text:r}=i,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[Rt.blotName])return new ai.default().insert(r||"",{[Rt.blotName]:n[Rt.blotName]});if(!t)return new ai.default().insert(r||"",n);let a=this.convertHTML(t);return _c(a,`
2887
2887
  `)&&(a.ops[a.ops.length-1].attributes==null||n.table)?a.compose(new ai.default().retain(a.length()-1).delete(1)):a}normalizeHTML(i){Qz(i)}convertHTML(i){let t=new DOMParser().parseFromString(i,"text/html");this.normalizeHTML(t);let r=t.body,n=new WeakMap,[a,s]=this.prepareMatching(r,n);return ph(this.quill.scroll,r,a,s,n)}dangerouslyPasteHTML(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:G.sources.API;if(typeof i=="string"){let n=this.convert({html:i,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,G.sources.SILENT)}else{let n=this.convert({html:t,text:""});this.quill.updateContents(new ai.default().retain(i).concat(n),r),this.quill.setSelection(i+n.length(),G.sources.SILENT)}}onCaptureCopy(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i.defaultPrevented)return;i.preventDefault();let[r]=this.quill.selection.getRange();if(r==null)return;let{html:n,text:a}=this.onCopy(r,t);i.clipboardData?.setData("text/plain",a),i.clipboardData?.setData("text/html",n),t&&wc({range:r,quill:this.quill})}normalizeURIList(i){return i.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
2888
- `)}onCapturePaste(i){if(i.defaultPrevented||!this.quill.isEnabled())return;i.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=i.clipboardData?.getData("text/html"),n=i.clipboardData?.getData("text/plain");if(!r&&!n){let s=i.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(i.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(i){let t=this.quill.getText(i);return{html:this.quill.getSemanticHTML(i),text:t}}onPaste(i,t){let{text:r,html:n}=t,a=this.quill.getFormat(i.index),s=this.convert({text:r,html:n},a);FA.log("onPaste",s,{text:r,html:n});let l=new ai.default().retain(i.index).delete(i.length).concat(s);this.quill.updateContents(l,G.sources.USER),this.quill.setSelection(l.length()-i.length,G.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(i,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(i.querySelectorAll(s)).forEach(p=>{t.has(p)?t.get(p)?.push(l):t.set(p,[l])});break}}),[r,n]}};V(zc,"DEFAULTS",{matchers:[]});function Oa(o,i,t,r){return r.query(i)?o.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[i])return n.push(a);let s=t?{[i]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new ai.default):o}function _c(o,i){let t="";for(let r=o.ops.length-1;r>=0&&t.length<i.length;--r){let n=o.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*i.length)===i}function Uo(o,i){if(!(o instanceof Element))return!1;let t=i.query(o);return t&&t.prototype instanceof wt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(o.tagName.toLowerCase())}function UA(o,i){return o.previousElementSibling&&o.nextElementSibling&&!Uo(o.previousElementSibling,i)&&!Uo(o.nextElementSibling,i)}var dh=new WeakMap;function Zz(o){return o==null?!1:(dh.has(o)||(o.tagName==="PRE"?dh.set(o,!0):dh.set(o,Zz(o.parentNode))),dh.get(o))}function ph(o,i,t,r,n){return i.nodeType===i.TEXT_NODE?r.reduce((a,s)=>s(i,a,o),new ai.default):i.nodeType===i.ELEMENT_NODE?Array.from(i.childNodes||[]).reduce((a,s)=>{let l=ph(o,s,t,r,n);return s.nodeType===i.ELEMENT_NODE&&(l=t.reduce((p,h)=>h(s,p,o),l),l=(n.get(s)||[]).reduce((p,h)=>h(s,p,o),l)),a.concat(l)},new ai.default):new ai.default}function Ff(o){return(i,t,r)=>Oa(t,o,!0,r)}function jA(o,i,t){let r=Vr.keys(o),n=Bt.keys(o),a=ni.keys(o),s={};return r.concat(n).concat(a).forEach(l=>{let p=t.query(l,X.ATTRIBUTE);p!=null&&(s[p.attrName]=p.value(o),s[p.attrName])||(p=VA[l],p!=null&&(p.attrName===l||p.keyName===l)&&(s[p.attrName]=p.value(o)||void 0),p=Xz[l],p!=null&&(p.attrName===l||p.keyName===l)&&(p=Xz[l],s[p.attrName]=p.value(o)||void 0))}),Object.entries(s).reduce((l,p)=>{let[h,m]=p;return Oa(l,h,m,t)},i)}function GA(o,i,t){let r=t.query(o);if(r==null)return i;if(r.prototype instanceof wt){let n={},a=r.value(o);if(a!=null)return n[r.blotName]=a,new ai.default().insert(n,r.formats(o,t))}else if(r.prototype instanceof Ra&&!_c(i,`
2888
+ `)}onCapturePaste(i){if(i.defaultPrevented||!this.quill.isEnabled())return;i.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=i.clipboardData?.getData("text/html"),n=i.clipboardData?.getData("text/plain");if(!r&&!n){let s=i.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(i.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(i){let t=this.quill.getText(i);return{html:this.quill.getSemanticHTML(i),text:t}}onPaste(i,t){let{text:r,html:n}=t,a=this.quill.getFormat(i.index),s=this.convert({text:r,html:n},a);FA.log("onPaste",s,{text:r,html:n});let l=new ai.default().retain(i.index).delete(i.length).concat(s);this.quill.updateContents(l,G.sources.USER),this.quill.setSelection(l.length()-i.length,G.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(i,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(i.querySelectorAll(s)).forEach(p=>{t.has(p)?t.get(p)?.push(l):t.set(p,[l])});break}}),[r,n]}};V(zc,"DEFAULTS",{matchers:[]});function Pa(o,i,t,r){return r.query(i)?o.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[i])return n.push(a);let s=t?{[i]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new ai.default):o}function _c(o,i){let t="";for(let r=o.ops.length-1;r>=0&&t.length<i.length;--r){let n=o.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*i.length)===i}function Uo(o,i){if(!(o instanceof Element))return!1;let t=i.query(o);return t&&t.prototype instanceof wt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(o.tagName.toLowerCase())}function UA(o,i){return o.previousElementSibling&&o.nextElementSibling&&!Uo(o.previousElementSibling,i)&&!Uo(o.nextElementSibling,i)}var dh=new WeakMap;function Zz(o){return o==null?!1:(dh.has(o)||(o.tagName==="PRE"?dh.set(o,!0):dh.set(o,Zz(o.parentNode))),dh.get(o))}function ph(o,i,t,r,n){return i.nodeType===i.TEXT_NODE?r.reduce((a,s)=>s(i,a,o),new ai.default):i.nodeType===i.ELEMENT_NODE?Array.from(i.childNodes||[]).reduce((a,s)=>{let l=ph(o,s,t,r,n);return s.nodeType===i.ELEMENT_NODE&&(l=t.reduce((p,h)=>h(s,p,o),l),l=(n.get(s)||[]).reduce((p,h)=>h(s,p,o),l)),a.concat(l)},new ai.default):new ai.default}function Ff(o){return(i,t,r)=>Pa(t,o,!0,r)}function jA(o,i,t){let r=Vr.keys(o),n=Bt.keys(o),a=ni.keys(o),s={};return r.concat(n).concat(a).forEach(l=>{let p=t.query(l,X.ATTRIBUTE);p!=null&&(s[p.attrName]=p.value(o),s[p.attrName])||(p=VA[l],p!=null&&(p.attrName===l||p.keyName===l)&&(s[p.attrName]=p.value(o)||void 0),p=Xz[l],p!=null&&(p.attrName===l||p.keyName===l)&&(p=Xz[l],s[p.attrName]=p.value(o)||void 0))}),Object.entries(s).reduce((l,p)=>{let[h,m]=p;return Pa(l,h,m,t)},i)}function GA(o,i,t){let r=t.query(o);if(r==null)return i;if(r.prototype instanceof wt){let n={},a=r.value(o);if(a!=null)return n[r.blotName]=a,new ai.default().insert(n,r.formats(o,t))}else if(r.prototype instanceof Na&&!_c(i,`
2889
2889
  `)&&i.insert(`
2890
- `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Oa(i,r.blotName,r.formats(o,t),t);return i}function WA(o,i){return _c(i,`
2890
+ `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Pa(i,r.blotName,r.formats(o,t),t);return i}function WA(o,i){return _c(i,`
2891
2891
  `)||i.insert(`
2892
- `),i}function KA(o,i,t){let r=t.query("code-block"),n=r&&"formats"in r&&typeof r.formats=="function"?r.formats(o,t):!0;return Oa(i,"code-block",n,t)}function YA(){return new ai.default}function QA(o,i,t){let r=t.query(o);if(r==null||r.blotName!=="list"||!_c(i,`
2893
- `))return i;let n=-1,a=o.parentNode;for(;a!=null;)["OL","UL"].includes(a.tagName)&&(n+=1),a=a.parentNode;return n<=0?i:i.reduce((s,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?s.push(l):s.insert(l.insert,{indent:n,...l.attributes||{}}):s,new ai.default)}function XA(o,i,t){let r=o,n=r.tagName==="OL"?"ordered":"bullet",a=r.getAttribute("data-checked");return a&&(n=a==="true"?"checked":"unchecked"),Oa(i,"list",n,t)}function Jz(o,i,t){if(!_c(i,`
2892
+ `),i}function KA(o,i,t){let r=t.query("code-block"),n=r&&"formats"in r&&typeof r.formats=="function"?r.formats(o,t):!0;return Pa(i,"code-block",n,t)}function YA(){return new ai.default}function QA(o,i,t){let r=t.query(o);if(r==null||r.blotName!=="list"||!_c(i,`
2893
+ `))return i;let n=-1,a=o.parentNode;for(;a!=null;)["OL","UL"].includes(a.tagName)&&(n+=1),a=a.parentNode;return n<=0?i:i.reduce((s,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?s.push(l):s.insert(l.insert,{indent:n,...l.attributes||{}}):s,new ai.default)}function XA(o,i,t){let r=o,n=r.tagName==="OL"?"ordered":"bullet",a=r.getAttribute("data-checked");return a&&(n=a==="true"?"checked":"unchecked"),Pa(i,"list",n,t)}function Jz(o,i,t){if(!_c(i,`
2894
2894
  `)){if(Uo(o,t)&&(o.childNodes.length>0||o instanceof HTMLParagraphElement))return i.insert(`
2895
2895
  `);if(i.length()>0&&o.nextSibling){let r=o.nextSibling;for(;r!=null;){if(Uo(r,t))return i.insert(`
2896
2896
  `);let n=t.query(r);if(n&&n.prototype instanceof Qt)return i.insert(`
2897
- `);r=r.firstChild}}}return i}function JA(o,i,t){let r={},n=o.style||{};return n.fontStyle==="italic"&&(r.italic=!0),n.textDecoration==="underline"&&(r.underline=!0),n.textDecoration==="line-through"&&(r.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(r.bold=!0),i=Object.entries(r).reduce((a,s)=>{let[l,p]=s;return Oa(a,l,p,t)},i),parseFloat(n.textIndent||0)>0?new ai.default().insert(" ").concat(i):i}function ZA(o,i,t){let r=o.parentElement?.tagName==="TABLE"?o.parentElement:o.parentElement?.parentElement;if(r!=null){let a=Array.from(r.querySelectorAll("tr")).indexOf(o)+1;return Oa(i,"table",a,t)}return i}function eM(o,i,t){let r=o.data;if(o.parentElement?.tagName==="O:P")return i.insert(r.trim());if(!Zz(o)){if(r.trim().length===0&&r.includes(`
2897
+ `);r=r.firstChild}}}return i}function JA(o,i,t){let r={},n=o.style||{};return n.fontStyle==="italic"&&(r.italic=!0),n.textDecoration==="underline"&&(r.underline=!0),n.textDecoration==="line-through"&&(r.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(r.bold=!0),i=Object.entries(r).reduce((a,s)=>{let[l,p]=s;return Pa(a,l,p,t)},i),parseFloat(n.textIndent||0)>0?new ai.default().insert(" ").concat(i):i}function ZA(o,i,t){let r=o.parentElement?.tagName==="TABLE"?o.parentElement:o.parentElement?.parentElement;if(r!=null){let a=Array.from(r.querySelectorAll("tr")).indexOf(o)+1;return Pa(i,"table",a,t)}return i}function eM(o,i,t){let r=o.data;if(o.parentElement?.tagName==="O:P")return i.insert(r.trim());if(!Zz(o)){if(r.trim().length===0&&r.includes(`
2898
2898
  `)&&!UA(o,t))return i;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(o.previousSibling==null&&o.parentElement!=null&&Uo(o.parentElement,t)||o.previousSibling instanceof Element&&Uo(o.previousSibling,t))&&(r=r.replace(/^ /,"")),(o.nextSibling==null&&o.parentElement!=null&&Uo(o.parentElement,t)||o.nextSibling instanceof Element&&Uo(o.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll("\xA0"," ")}return i.insert(r)}var kc=class extends mt{constructor(t,r){super(t,r);V(this,"lastRecorded",0);V(this,"ignoreChange",!1);V(this,"stack",{undo:[],redo:[]});V(this,"currentRange",null);this.quill.on(G.events.EDITOR_CHANGE,(n,a,s,l)=>{n===G.events.SELECTION_CHANGE?a&&l!==G.sources.SILENT&&(this.currentRange=a):n===G.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||l===G.sources.USER?this.record(a,s):this.transform(a)),this.currentRange=Bf(this.currentRange,a))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;let n=this.stack[t].pop();if(!n)return;let a=this.quill.getContents(),s=n.delta.invert(a);this.stack[r].push({delta:s,range:Bf(n.range,s)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,G.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let n=t.invert(r),a=this.currentRange,s=Date.now();if(this.lastRecorded+this.options.delay>s&&this.stack.undo.length>0){let l=this.stack.undo.pop();l&&(n=n.compose(l.delta),a=l.range)}else this.lastRecorded=s;n.length()!==0&&(this.stack.undo.push({delta:n,range:a}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){e_(this.stack.undo,t),e_(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,G.sources.USER);else{let r=rM(this.quill.scroll,t.delta);this.quill.setSelection(r,G.sources.USER)}}};V(kc,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function e_(o,i){let t=i;for(let r=o.length-1;r>=0;r-=1){let n=o[r];o[r]={delta:t.transform(n.delta,!0),range:n.range&&Bf(n.range,t)},t=n.delta.transform(t),o[r].delta.length()===0&&o.splice(r,1)}}function tM(o,i){let t=i.ops[i.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
2899
- `):t.attributes!=null?Object.keys(t.attributes).some(r=>o.query(r,X.BLOCK)!=null):!1}function rM(o,i){let t=i.reduce((n,a)=>n+(a.delete||0),0),r=i.length()-t;return tM(o,i)&&(r-=1),r}function Bf(o,i){if(!o)return o;let t=i.transformPosition(o.index),r=i.transformPosition(o.index+o.length);return{index:t,length:r-t}}var t_=_r(ei(),1);var hh=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&i.selection.normalizeNative(n);if(a){let s=i.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(i,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,i,r)}};hh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(o,i){if(!this.quill.scroll.query("image"))return;let t=i.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new t_.default().retain(o.index).delete(o.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(o.index+r.length,J.sources.SILENT)})}};var r_=hh;var jo=_r(ei(),1);var i_=_r(ei(),1);var iM=["insertText","insertReplacementText"],Vf=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||i.on(G.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(i){wc({range:i,quill:this.quill})}replaceText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(i.length===0)return!1;if(t){let r=this.quill.getFormat(i.index,1);this.deleteRange(i),this.quill.updateContents(new i_.default().retain(i.index).insert(t,r),G.sources.USER)}else this.deleteRange(i);return this.quill.setSelection(i.index+t.length,0,G.sources.SILENT),!0}handleBeforeInput(i){if(this.quill.composition.isComposing||i.defaultPrevented||!iM.includes(i.inputType))return;let t=i.getTargetRanges?i.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=nM(i);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&i.preventDefault()}handleCompositionStart(){let i=this.quill.getSelection();i&&this.replaceText(i)}};function nM(o){return typeof o.data=="string"?o.data:o.dataTransfer?.types.includes("text/plain")?o.dataTransfer.getData("text/plain"):null}var n_=Vf;var oM=/Mac/i.test(navigator.platform),aM=100,sM=o=>!!(o.key==="ArrowLeft"||o.key==="ArrowRight"||o.key==="ArrowUp"||o.key==="ArrowDown"||o.key==="Home"||oM&&o.key==="a"&&o.ctrlKey===!0),Uf=class extends mt{constructor(t,r){super(t,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof ii)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),G.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&sM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+aM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof ii)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},o_=Uf;G.register({"blots/block":Qe,"blots/block/embed":Qt,"blots/break":Mr,"blots/container":Fi,"blots/cursor":Fo,"blots/embed":Ks,"blots/inline":Lr,"blots/scroll":Bz,"blots/text":Dt,"modules/clipboard":zc,"modules/history":kc,"modules/keyboard":xc,"modules/uploader":r_,"modules/input":n_,"modules/uiNode":o_});var uh=G;var jf=class extends Bt{add(i,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(i)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(i),!0):super.add(i,r.toString())}canAdd(i,t){return super.canAdd(i,t)||super.canAdd(i,parseInt(t,10))}value(i){return parseInt(super.value(i),10)||void 0}},lM=new jf("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),a_=lM;var Cc=class extends Qe{};V(Cc,"blotName","blockquote"),V(Cc,"tagName","blockquote");var s_=Cc;var Sc=class extends Qe{static formats(i){return this.tagName.indexOf(i.tagName)+1}};V(Sc,"blotName","header"),V(Sc,"tagName",["H1","H2","H3","H4","H5","H6"]);var l_=Sc;var Pa=class extends Fi{};Pa.blotName="list-container";Pa.tagName="OL";var Go=class extends Qe{static create(i){let t=super.create();return t.setAttribute("data-list",i),t}static formats(i){return i.getAttribute("data-list")||void 0}static register(){G.register(Pa)}constructor(i,t){super(i,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!i.isEnabled())return;let s=this.statics.formats(t,i);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(i,t)}};Go.blotName="list";Go.tagName="LI";Pa.allowedChildren=[Go];Go.requiredContainer=Pa;var Ec=class extends Lr{static create(){return super.create()}static formats(){return!0}optimize(i){super.optimize(i),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};V(Ec,"blotName","bold"),V(Ec,"tagName",["STRONG","B"]);var Js=Ec;var Tc=class extends Js{};V(Tc,"blotName","italic"),V(Tc,"tagName",["EM","I"]);var c_=Tc;var ki=class extends Lr{static create(i){let t=super.create(i);return t.setAttribute("href",this.sanitize(i)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(i){return i.getAttribute("href")}static sanitize(i){return Gf(i,this.PROTOCOL_WHITELIST)?i:this.SANITIZED_URL}format(i,t){i!==this.statics.blotName||!t?super.format(i,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};V(ki,"blotName","link"),V(ki,"tagName","A"),V(ki,"SANITIZED_URL","about:blank"),V(ki,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Gf(o,i){let t=document.createElement("a");t.href=o;let r=t.href.slice(0,t.href.indexOf(":"));return i.indexOf(r)>-1}var $c=class extends Lr{static create(i){return i==="super"?document.createElement("sup"):i==="sub"?document.createElement("sub"):super.create(i)}static formats(i){if(i.tagName==="SUB")return"sub";if(i.tagName==="SUP")return"super"}};V($c,"blotName","script"),V($c,"tagName",["SUB","SUP"]);var d_=$c;var Ac=class extends Js{};V(Ac,"blotName","strike"),V(Ac,"tagName",["S","STRIKE"]);var p_=Ac;var Mc=class extends Lr{};V(Mc,"blotName","underline"),V(Mc,"tagName","U");var h_=Mc;var Zs=class extends Ks{static create(i){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(i);return typeof i=="string"&&(window.katex.render(i,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",i)),t}static value(i){return i.getAttribute("data-value")}html(){let{formula:i}=this.value();return`<span>${i}</span>`}};V(Zs,"blotName","formula"),V(Zs,"className","ql-formula"),V(Zs,"tagName","SPAN");var u_=Zs;var m_=["alt","height","width"],Lc=class extends wt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("src",this.sanitize(i)),t}static formats(i){return m_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static match(i){return/\.(jpe?g|gif|png)$/.test(i)||/^data:image\/.+;base64/.test(i)}static sanitize(i){return Gf(i,["http","https","data"])?i:"//:0"}static value(i){return i.getAttribute("src")}format(i,t){m_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}};V(Lc,"blotName","image"),V(Lc,"tagName","IMG");var f_=Lc;var g_=["height","width"],el=class extends Qt{static create(i){let t=super.create(i);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(i)),t}static formats(i){return g_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static sanitize(i){return ki.sanitize(i)}static value(i){return i.getAttribute("src")}format(i,t){g_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}html(){let{video:i}=this.value();return`<a href="${i}">${i}</a>`}};V(el,"blotName","video"),V(el,"className","ql-video"),V(el,"tagName","IFRAME");var b_=el;var mh=_r(ei(),1);var qc=new Bt("code-token","hljs",{scope:X.INLINE}),so=class o extends Lr{static formats(i,t){for(;i!=null&&i!==t.domNode;){if(i.classList&&i.classList.contains(Rt.className))return super.formats(i,t);i=i.parentNode}}constructor(i,t,r){super(i,t,r),qc.add(this.domNode,r)}format(i,t){i!==o.blotName?super.format(i,t):t?qc.add(this.domNode,t):(qc.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),qc.value(this.domNode)||this.unwrap()}};so.blotName="code-token";so.className="ql-token";var si=class extends Rt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("data-language",i),t}static formats(i){return i.getAttribute("data-language")||"plain"}static register(){}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(i,t)}replaceWith(i,t){return this.formatAt(0,this.length(),so.blotName,!1),super.replaceWith(i,t)}},Ha=class extends Dn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(i,t){i===si.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(i,t)}))}formatAt(i,t,r,n){r===si.blotName&&(this.forceNext=!0),super.formatAt(i,t,r,n)}highlight(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
2899
+ `):t.attributes!=null?Object.keys(t.attributes).some(r=>o.query(r,X.BLOCK)!=null):!1}function rM(o,i){let t=i.reduce((n,a)=>n+(a.delete||0),0),r=i.length()-t;return tM(o,i)&&(r-=1),r}function Bf(o,i){if(!o)return o;let t=i.transformPosition(o.index),r=i.transformPosition(o.index+o.length);return{index:t,length:r-t}}var t_=_r(ei(),1);var hh=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&i.selection.normalizeNative(n);if(a){let s=i.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(i,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,i,r)}};hh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(o,i){if(!this.quill.scroll.query("image"))return;let t=i.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new t_.default().retain(o.index).delete(o.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(o.index+r.length,J.sources.SILENT)})}};var r_=hh;var jo=_r(ei(),1);var i_=_r(ei(),1);var iM=["insertText","insertReplacementText"],Vf=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||i.on(G.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(i){wc({range:i,quill:this.quill})}replaceText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(i.length===0)return!1;if(t){let r=this.quill.getFormat(i.index,1);this.deleteRange(i),this.quill.updateContents(new i_.default().retain(i.index).insert(t,r),G.sources.USER)}else this.deleteRange(i);return this.quill.setSelection(i.index+t.length,0,G.sources.SILENT),!0}handleBeforeInput(i){if(this.quill.composition.isComposing||i.defaultPrevented||!iM.includes(i.inputType))return;let t=i.getTargetRanges?i.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=nM(i);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&i.preventDefault()}handleCompositionStart(){let i=this.quill.getSelection();i&&this.replaceText(i)}};function nM(o){return typeof o.data=="string"?o.data:o.dataTransfer?.types.includes("text/plain")?o.dataTransfer.getData("text/plain"):null}var n_=Vf;var oM=/Mac/i.test(navigator.platform),aM=100,sM=o=>!!(o.key==="ArrowLeft"||o.key==="ArrowRight"||o.key==="ArrowUp"||o.key==="ArrowDown"||o.key==="Home"||oM&&o.key==="a"&&o.ctrlKey===!0),Uf=class extends mt{constructor(t,r){super(t,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof ii)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),G.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&sM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+aM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof ii)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},o_=Uf;G.register({"blots/block":Qe,"blots/block/embed":Qt,"blots/break":Mr,"blots/container":Fi,"blots/cursor":Fo,"blots/embed":Ks,"blots/inline":Lr,"blots/scroll":Bz,"blots/text":Dt,"modules/clipboard":zc,"modules/history":kc,"modules/keyboard":xc,"modules/uploader":r_,"modules/input":n_,"modules/uiNode":o_});var uh=G;var jf=class extends Bt{add(i,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(i)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(i),!0):super.add(i,r.toString())}canAdd(i,t){return super.canAdd(i,t)||super.canAdd(i,parseInt(t,10))}value(i){return parseInt(super.value(i),10)||void 0}},lM=new jf("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),a_=lM;var Cc=class extends Qe{};V(Cc,"blotName","blockquote"),V(Cc,"tagName","blockquote");var s_=Cc;var Sc=class extends Qe{static formats(i){return this.tagName.indexOf(i.tagName)+1}};V(Sc,"blotName","header"),V(Sc,"tagName",["H1","H2","H3","H4","H5","H6"]);var l_=Sc;var Ha=class extends Fi{};Ha.blotName="list-container";Ha.tagName="OL";var Go=class extends Qe{static create(i){let t=super.create();return t.setAttribute("data-list",i),t}static formats(i){return i.getAttribute("data-list")||void 0}static register(){G.register(Ha)}constructor(i,t){super(i,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!i.isEnabled())return;let s=this.statics.formats(t,i);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(i,t)}};Go.blotName="list";Go.tagName="LI";Ha.allowedChildren=[Go];Go.requiredContainer=Ha;var Ec=class extends Lr{static create(){return super.create()}static formats(){return!0}optimize(i){super.optimize(i),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};V(Ec,"blotName","bold"),V(Ec,"tagName",["STRONG","B"]);var Js=Ec;var Tc=class extends Js{};V(Tc,"blotName","italic"),V(Tc,"tagName",["EM","I"]);var c_=Tc;var ki=class extends Lr{static create(i){let t=super.create(i);return t.setAttribute("href",this.sanitize(i)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(i){return i.getAttribute("href")}static sanitize(i){return Gf(i,this.PROTOCOL_WHITELIST)?i:this.SANITIZED_URL}format(i,t){i!==this.statics.blotName||!t?super.format(i,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};V(ki,"blotName","link"),V(ki,"tagName","A"),V(ki,"SANITIZED_URL","about:blank"),V(ki,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Gf(o,i){let t=document.createElement("a");t.href=o;let r=t.href.slice(0,t.href.indexOf(":"));return i.indexOf(r)>-1}var $c=class extends Lr{static create(i){return i==="super"?document.createElement("sup"):i==="sub"?document.createElement("sub"):super.create(i)}static formats(i){if(i.tagName==="SUB")return"sub";if(i.tagName==="SUP")return"super"}};V($c,"blotName","script"),V($c,"tagName",["SUB","SUP"]);var d_=$c;var Ac=class extends Js{};V(Ac,"blotName","strike"),V(Ac,"tagName",["S","STRIKE"]);var p_=Ac;var Mc=class extends Lr{};V(Mc,"blotName","underline"),V(Mc,"tagName","U");var h_=Mc;var Zs=class extends Ks{static create(i){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(i);return typeof i=="string"&&(window.katex.render(i,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",i)),t}static value(i){return i.getAttribute("data-value")}html(){let{formula:i}=this.value();return`<span>${i}</span>`}};V(Zs,"blotName","formula"),V(Zs,"className","ql-formula"),V(Zs,"tagName","SPAN");var u_=Zs;var m_=["alt","height","width"],Lc=class extends wt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("src",this.sanitize(i)),t}static formats(i){return m_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static match(i){return/\.(jpe?g|gif|png)$/.test(i)||/^data:image\/.+;base64/.test(i)}static sanitize(i){return Gf(i,["http","https","data"])?i:"//:0"}static value(i){return i.getAttribute("src")}format(i,t){m_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}};V(Lc,"blotName","image"),V(Lc,"tagName","IMG");var f_=Lc;var g_=["height","width"],el=class extends Qt{static create(i){let t=super.create(i);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(i)),t}static formats(i){return g_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static sanitize(i){return ki.sanitize(i)}static value(i){return i.getAttribute("src")}format(i,t){g_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}html(){let{video:i}=this.value();return`<a href="${i}">${i}</a>`}};V(el,"blotName","video"),V(el,"className","ql-video"),V(el,"tagName","IFRAME");var b_=el;var mh=_r(ei(),1);var qc=new Bt("code-token","hljs",{scope:X.INLINE}),so=class o extends Lr{static formats(i,t){for(;i!=null&&i!==t.domNode;){if(i.classList&&i.classList.contains(Rt.className))return super.formats(i,t);i=i.parentNode}}constructor(i,t,r){super(i,t,r),qc.add(this.domNode,r)}format(i,t){i!==o.blotName?super.format(i,t):t?qc.add(this.domNode,t):(qc.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),qc.value(this.domNode)||this.unwrap()}};so.blotName="code-token";so.className="ql-token";var si=class extends Rt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("data-language",i),t}static formats(i){return i.getAttribute("data-language")||"plain"}static register(){}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(i,t)}replaceWith(i,t){return this.formatAt(0,this.length(),so.blotName,!1),super.replaceWith(i,t)}},Fa=class extends Dn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(i,t){i===si.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(i,t)}))}formatAt(i,t,r,n){r===si.blotName&&(this.forceNext=!0),super.formatAt(i,t,r,n)}highlight(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
2900
2900
  `)}
2901
2901
  `,a=si.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){let s=this.children.reduce((p,h)=>p.concat(hf(h,!1)),new mh.default),l=i(n,a);s.diff(l).reduce((p,h)=>{let{retain:m,attributes:f}=h;return m?(f&&Object.keys(f).forEach(b=>{[si.blotName,so.blotName].includes(b)&&this.formatAt(p,m,b,f[b])}),p+m):p},0)}this.cachedText=n,this.forceNext=!1}}html(i,t){let[r]=this.children.find(i);return`<pre data-language="${r?si.formats(r.domNode):"plain"}">
2902
- ${Na(this.code(i,t))}
2903
- </pre>`}optimize(i){if(super.optimize(i),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let t=si.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}};Ha.allowedChildren=[si];si.requiredContainer=Ha;si.allowedChildren=[so,Fo,Dt,Mr];var cM=(o,i,t)=>{if(typeof o.versionString=="string"){let r=o.versionString.split(".")[0];if(parseInt(r,10)>=11)return o.highlight(t,{language:i}).value}return o.highlight(i,t).value},Ic=class extends mt{static register(){G.register(so,!0),G.register(si,!0),G.register(Ha,!0)}constructor(i,t){if(super(i,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,n)=>{let{key:a}=n;return r[a]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(G.events.SCROLL_BLOT_MOUNT,i=>{if(!(i instanceof Ha))return;let t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:n,label:a}=r,s=t.ownerDocument.createElement("option");s.textContent=a,s.setAttribute("value",n),t.appendChild(s)}),t.addEventListener("change",()=>{i.format(si.blotName,t.value),this.quill.root.focus(),this.highlight(i,!0)}),i.uiNode==null&&(i.attachUI(t),i.children.head&&(t.value=si.formats(i.children.head.domNode)))})}initTimer(){let i=null;this.quill.on(G.events.SCROLL_OPTIMIZE,()=>{i&&clearTimeout(i),i=setTimeout(()=>{this.highlight(),i=null},this.options.interval)})}highlight(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(G.sources.USER);let r=this.quill.getSelection();(i==null?this.quill.scroll.descendants(Ha):[i]).forEach(a=>{a.highlight(this.highlightBlot,t)}),this.quill.update(G.sources.SILENT),r!=null&&this.quill.setSelection(r,G.sources.SILENT)}highlightBlot(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return Na(i).split(`
2902
+ ${Oa(this.code(i,t))}
2903
+ </pre>`}optimize(i){if(super.optimize(i),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let t=si.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}};Fa.allowedChildren=[si];si.requiredContainer=Fa;si.allowedChildren=[so,Fo,Dt,Mr];var cM=(o,i,t)=>{if(typeof o.versionString=="string"){let r=o.versionString.split(".")[0];if(parseInt(r,10)>=11)return o.highlight(t,{language:i}).value}return o.highlight(i,t).value},Ic=class extends mt{static register(){G.register(so,!0),G.register(si,!0),G.register(Fa,!0)}constructor(i,t){if(super(i,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,n)=>{let{key:a}=n;return r[a]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(G.events.SCROLL_BLOT_MOUNT,i=>{if(!(i instanceof Fa))return;let t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:n,label:a}=r,s=t.ownerDocument.createElement("option");s.textContent=a,s.setAttribute("value",n),t.appendChild(s)}),t.addEventListener("change",()=>{i.format(si.blotName,t.value),this.quill.root.focus(),this.highlight(i,!0)}),i.uiNode==null&&(i.attachUI(t),i.children.head&&(t.value=si.formats(i.children.head.domNode)))})}initTimer(){let i=null;this.quill.on(G.events.SCROLL_OPTIMIZE,()=>{i&&clearTimeout(i),i=setTimeout(()=>{this.highlight(),i=null},this.options.interval)})}highlight(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(G.sources.USER);let r=this.quill.getSelection();(i==null?this.quill.scroll.descendants(Fa):[i]).forEach(a=>{a.highlight(this.highlightBlot,t)}),this.quill.update(G.sources.SILENT),r!=null&&this.quill.setSelection(r,G.sources.SILENT)}highlightBlot(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return Oa(i).split(`
2904
2904
  `).reduce((n,a,s)=>(s!==0&&n.insert(`
2905
2905
  `,{[Rt.blotName]:t}),n.insert(a)),new mh.default);let r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(Rt.className),r.innerHTML=cM(this.options.hljs,t,i),ph(this.quill.scroll,r,[(n,a)=>{let s=qc.value(n);return s?a.compose(new mh.default().retain(a.length(),{[so.blotName]:s})):a}],[(n,a)=>n.data.split(`
2906
2906
  `).reduce((s,l,p)=>(p!==0&&s.insert(`
@@ -3070,7 +3070,7 @@ ${Na(this.code(i,t))}
3070
3070
  aria-hidden=${h?"false":"true"}>
3071
3071
  <slot name="help-text">${this.helpText}</slot>
3072
3072
  </div>
3073
- </div>`}};pe.styles=[z(Se),z(P_)],pe.dependencies={"zn-slash-item":Vl,"zn-slash-menu":ka},c([F(".form-control-input")],pe.prototype,"formControl",2),c([F(".textarea__control")],pe.prototype,"input",2),c([F("zn-slash-menu")],pe.prototype,"slashMenuElement",2),c([R()],pe.prototype,"hasFocus",2),c([R()],pe.prototype,"hasSlashMenu",2),c([d()],pe.prototype,"title",2),c([d()],pe.prototype,"name",2),c([d()],pe.prototype,"value",2),c([d({reflect:!0})],pe.prototype,"size",2),c([d()],pe.prototype,"label",2),c([d({attribute:"label-tooltip"})],pe.prototype,"labelTooltip",2),c([d({attribute:"context-note"})],pe.prototype,"contextNote",2),c([d({attribute:"help-text"})],pe.prototype,"helpText",2),c([d()],pe.prototype,"placeholder",2),c([d({attribute:"rows",type:Number})],pe.prototype,"rows",2),c([d()],pe.prototype,"resize",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"readonly",2),c([d({reflect:!0})],pe.prototype,"form",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"flush",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"required",2),c([d({type:Number})],pe.prototype,"minlength",2),c([d({type:Number})],pe.prototype,"maxlength",2),c([d()],pe.prototype,"autocapitalize",2),c([d()],pe.prototype,"autocorrect",2),c([d()],pe.prototype,"autocomplete",2),c([d({type:Boolean})],pe.prototype,"autofocus",2),c([d()],pe.prototype,"enterkeyhint",2),c([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],pe.prototype,"spellcheck",2),c([d()],pe.prototype,"inputmode",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],pe.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],pe.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],pe.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],pe.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],pe.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],pe.prototype,"slashRecentKey",2),c([d({attribute:!1})],pe.prototype,"slashItemsProvider",2),c([Ce()],pe.prototype,"defaultValue",2),c([d({type:Boolean})],pe.prototype,"transparent",2),c([K("disabled",{waitUntilFirstUpdate:!0})],pe.prototype,"handleDisabledChange",1),c([K("rows",{waitUntilFirstUpdate:!0})],pe.prototype,"handleRowsChange",1),c([K("value",{waitUntilFirstUpdate:!0})],pe.prototype,"handleValueChange",1);var Xo=pe;pe.define("zn-textarea");var ng=class{constructor(i,t){this._path="";this._selectedText="";this._prompt="";this._aiResponseContent="";this._onEscapeKey=i=>{i.key==="Escape"&&(this._hide(),this._component.remove(),this._initComponent())};this._quill=i,this._path=t.path,this._initComponent(),this._attachEvents()}_initComponent(){this._component=this._createTooltipComponent(),this._component.addEventListener("click",i=>this._replaceTooltip(i)),this._quill.container.ownerDocument.body.appendChild(this._component)}_attachEvents(){this._quill.on(ce.events.SELECTION_CHANGE,i=>this._updateFromEditor(i))}_latestContent(i){if(i==null&&(i=this._component.shadowRoot?.querySelector(".ai-panel")),i){let t=i.querySelector('[name="editor-response-text"]');if(t instanceof HTMLInputElement||t instanceof Xo)return t.value}return this._aiResponseContent}async processAIRequest(){let i=this._selectedText?this._selectedText:this._quill.getText(),t=this._component.shadowRoot?.querySelector(".ai-panel"),r=await fetch(this._path,{method:"POST",headers:{"Content-Type":"application/json","x-kx-fetch-style":"zn-editor","x-kx-editor-id":this._quill?.container?.getAttribute("x-editor-id")||""},body:JSON.stringify({text:i,prompt:this._prompt})});if(r.ok){let n=await r.text();t&&(t.style.width="500px",t.innerHTML=n,this._aiResponseContent=this._latestContent(t))}else{let n=await r.json();if(typeof n=="string"){let a=this._quill.getSelection();a&&(this._quill.deleteText(a.index,a.length),this._quill.insertText(a.index,n),this._quill.setSelection(a.index+n.length,0))}}}_createTooltipComponent(){let i=u`
3073
+ </div>`}};pe.styles=[z(Se),z(P_)],pe.dependencies={"zn-slash-item":Vl,"zn-slash-menu":Ca},c([F(".form-control-input")],pe.prototype,"formControl",2),c([F(".textarea__control")],pe.prototype,"input",2),c([F("zn-slash-menu")],pe.prototype,"slashMenuElement",2),c([R()],pe.prototype,"hasFocus",2),c([R()],pe.prototype,"hasSlashMenu",2),c([d()],pe.prototype,"title",2),c([d()],pe.prototype,"name",2),c([d()],pe.prototype,"value",2),c([d({reflect:!0})],pe.prototype,"size",2),c([d()],pe.prototype,"label",2),c([d({attribute:"label-tooltip"})],pe.prototype,"labelTooltip",2),c([d({attribute:"context-note"})],pe.prototype,"contextNote",2),c([d({attribute:"help-text"})],pe.prototype,"helpText",2),c([d()],pe.prototype,"placeholder",2),c([d({attribute:"rows",type:Number})],pe.prototype,"rows",2),c([d()],pe.prototype,"resize",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"readonly",2),c([d({reflect:!0})],pe.prototype,"form",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"flush",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"required",2),c([d({type:Number})],pe.prototype,"minlength",2),c([d({type:Number})],pe.prototype,"maxlength",2),c([d()],pe.prototype,"autocapitalize",2),c([d()],pe.prototype,"autocorrect",2),c([d()],pe.prototype,"autocomplete",2),c([d({type:Boolean})],pe.prototype,"autofocus",2),c([d()],pe.prototype,"enterkeyhint",2),c([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],pe.prototype,"spellcheck",2),c([d()],pe.prototype,"inputmode",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],pe.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],pe.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],pe.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],pe.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],pe.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],pe.prototype,"slashRecentKey",2),c([d({attribute:!1})],pe.prototype,"slashItemsProvider",2),c([Ce()],pe.prototype,"defaultValue",2),c([d({type:Boolean})],pe.prototype,"transparent",2),c([K("disabled",{waitUntilFirstUpdate:!0})],pe.prototype,"handleDisabledChange",1),c([K("rows",{waitUntilFirstUpdate:!0})],pe.prototype,"handleRowsChange",1),c([K("value",{waitUntilFirstUpdate:!0})],pe.prototype,"handleValueChange",1);var Xo=pe;pe.define("zn-textarea");var ng=class{constructor(i,t){this._path="";this._selectedText="";this._prompt="";this._aiResponseContent="";this._onEscapeKey=i=>{i.key==="Escape"&&(this._hide(),this._component.remove(),this._initComponent())};this._quill=i,this._path=t.path,this._initComponent(),this._attachEvents()}_initComponent(){this._component=this._createTooltipComponent(),this._component.addEventListener("click",i=>this._replaceTooltip(i)),this._quill.container.ownerDocument.body.appendChild(this._component)}_attachEvents(){this._quill.on(ce.events.SELECTION_CHANGE,i=>this._updateFromEditor(i))}_latestContent(i){if(i==null&&(i=this._component.shadowRoot?.querySelector(".ai-panel")),i){let t=i.querySelector('[name="editor-response-text"]');if(t instanceof HTMLInputElement||t instanceof Xo)return t.value}return this._aiResponseContent}async processAIRequest(){let i=this._selectedText?this._selectedText:this._quill.getText(),t=this._component.shadowRoot?.querySelector(".ai-panel"),r=await fetch(this._path,{method:"POST",headers:{"Content-Type":"application/json","x-kx-fetch-style":"zn-editor","x-kx-editor-id":this._quill?.container?.getAttribute("x-editor-id")||""},body:JSON.stringify({text:i,prompt:this._prompt})});if(r.ok){let n=await r.text();t&&(t.style.width="500px",t.innerHTML=n,this._aiResponseContent=this._latestContent(t))}else{let n=await r.json();if(typeof n=="string"){let a=this._quill.getSelection();a&&(this._quill.deleteText(a.index,a.length),this._quill.insertText(a.index,n),this._quill.setSelection(a.index+n.length,0))}}}_createTooltipComponent(){let i=u`
3074
3074
  <zn-ai-tooltip></zn-ai-tooltip>`;return qt(i)}_createPanelComponent(){let i=u`
3075
3075
  <zn-ai-panel></zn-ai-panel>`;return qt(i)}_replaceTooltip(i){i.preventDefault(),i.stopPropagation(),this._component.remove();let t=this._createPanelComponent();t&&(this._component=t,this._component.requestUpdate(),this._attachPanelEvents(t),this._quill.container.ownerDocument.body.appendChild(this._component),this._show(),this._positionComponent())}_onDocumentClick(i){let t=i.composedPath?i.composedPath():[i.target],r=t.includes(this._component)||t.includes(this._component.shadowRoot),n=this._quill.root.contains(t[0]),a=t.some(s=>s instanceof HTMLElement?s.tagName==="ZN-AI-PANEL":!1);if(this._latestContent(null)&&!a){i.preventDefault(),i.stopPropagation();return}!r&&!n&&!a&&this.resetComponent()}_updateFromEditor(i){this._component instanceof fn||(i?.length>25?(this._selectedText=this._quill.getText(i.index,i.length),this._show(),this._positionComponent()):this.resetComponent())}_positionComponent(){if(!this._component||!this._component.open)return;let i=this._quill.getSelection();if(!i)return;if(this._component instanceof Qo){let r=this._quill.container.getBoundingClientRect(),n=i.index+i.length,a=this._quill.getBounds(n);if(!a)return;let s=r.left+a.left-10,l=r.top+a.bottom+4;this._component.style.left=`${Math.max(0,s)}px`,this._component.style.top=`${l}px`;return}requestAnimationFrame(()=>{let r=this._quill.container.getBoundingClientRect(),n;if(i.length===this._quill.getLength()-1)n=this._quill.getBounds(i.index,i.length);else{let l=i.index+i.length;n=this._quill.getBounds(l)}if(!n)return;let a=r.left+n.right,s=r.top+n.top-8;if(a>window.innerWidth){this._setPanelPosition(window.innerWidth-10,s);return}this._setPanelPosition(a,s)})}_setPanelPosition(i,t){this._component.style.right=`${Math.max(0,window.innerWidth-i)}px`,this._component.style.bottom=`${Math.max(0,window.innerHeight-t)}px`}resetComponent(){this._hide(),this._component.remove(),this._initComponent()}_show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.addEventListener("keydown",this._onEscapeKey))}_hide(){this._component.hide(),this._quill.container.ownerDocument.removeEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.removeEventListener("keydown",this._onEscapeKey)}_attachPanelEvents(i){i.refine=this._enterCustomPrompt.bind(this),i.refineBuiltIn=this._clickPreDefinedEvent.bind(this)}_clickPreDefinedEvent(i){if(i instanceof PointerEvent){let t=i.target;if(this._prompt=t.getAttribute("data-ai-option")||"",this._prompt===""){for(let r of i.composedPath())if(r instanceof HTMLElement&&(this._prompt=r.getAttribute("data-ai-option")||"",this._prompt))break}this.processAIRequest().then(r=>r)}}_enterCustomPrompt(i){this._prompt=i,this.processAIRequest().then(t=>t)}},H_=ng;var Hc=class{constructor(i,t){this._quill=i,this._options=t,this._quill.on("editor-change",this._updateStartTime.bind(this)),this._updateOpenTime()}_updateOpenTime(){this._options.openTimeInput&&!this._openTime&&(this._openTime=Math.floor(new Date().getTime()/1e3),this._options.openTimeInput.value=this._openTime.toString())}_updateStartTime(){this._options.startTimeInput&&!this._startTime&&(this._startTime=Math.floor(new Date().getTime()/1e3),this._options.startTimeInput.value=this._startTime.toString())}};var og=["Red","Blue","Orange","Yellow","Indigo","Violet","Green","Pink","Gray"],kh={getName:"color",getData:Object.entries(og).map(([,o])=>({key:o.toLowerCase(),value:o,prefix:u`<div class="color-icon color-icon--${o.toLowerCase()}"></div>`}))};var F_=_`.toolbar{display:flex;flex-wrap:wrap;align-items:center}.toolbar__group{display:flex;align-items:center;position:relative}.toolbar__group--overflow{display:none}.toolbar__group--empty{display:none}.toolbar__group{}.toolbar__group:not(.toolbar__group--empty):not(.toolbar__group--hidden)+.toolbar__group::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__group{}.toolbar__group--has-prev-visible::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__dropdown-trigger::part(icon){margin-left:4px}.color-icon{width:18px;height:18px;display:block;border-radius:100%;flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}`;var Rn=class extends k{constructor(){super(...arguments);this._featureConfig={};this._resizeId=null;this._resizeObserver=new ht(this,{callback:()=>this.handleResize()});this._movedContent=new Map;this.handleResize=()=>{this.containerWidth=this.getToolbarWidth(),this._resizeId!==null&&cancelAnimationFrame(this._resizeId),this._resizeId=requestAnimationFrame(()=>{this.calculateOverflow(),this._resizeId=null})}}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentElement&&this._resizeObserver.observe(this.parentElement)}disconnectedCallback(){super.disconnectedCallback(),this._resizeId!==null&&(cancelAnimationFrame(this._resizeId),this._resizeId=null),this.restoreMovedContent()}firstUpdated(t){super.firstUpdated(t),this.containerWidth=this.getToolbarWidth(),this.updateEmptyGroups(),this.renderRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this.calculateOverflow()),this.updateComplete.then(()=>this.calculateOverflow())}configureToolbar(t){this._featureConfig=t}getToolbarWidth(){let t=this,r=t.getBoundingClientRect?.().width||t.offsetWidth||0;return(!r||r<=0)&&this._toolbarEl&&(r=this._toolbarEl.getBoundingClientRect().width),r}getOverflowGroupWidth(){let t=50,r=this._overflowGroup;if(!r)return t;let n=r.style.display,a=r.style.visibility;return r.style.display="flex",r.style.visibility="hidden",t=r.offsetWidth||t,r.style.visibility=a,r.style.display=n||"none",t}restoreMovedContent(){this._movedContent.forEach(({placeholder:t,originalParent:r},n)=>{t.parentNode?(r.insertBefore(n,t),t.parentNode.removeChild(t)):r.appendChild(n)}),this._movedContent.clear()}moveContentTo(t,r){if(this._movedContent.has(t)){t.parentElement!==r&&r.appendChild(t);return}let n=t.parentElement;if(!n)return;let a=document.createComment("toolbar-overflow-placeholder");n.insertBefore(a,t),r.appendChild(t),this._movedContent.set(t,{placeholder:a,originalParent:n})}isGroupEmpty(t){let r=t.querySelector("slot");return r?r.assignedElements({flatten:!0}).length===0:t.childElementCount===0}updateEmptyGroups(){Array.from(this._groups||[]).forEach(r=>{let n=this.isGroupEmpty(r);r.classList.toggle("toolbar__group--empty",n)})}_updateDividerClasses(){let t=Array.from(this._groups||[]),r=!1;t.forEach(n=>{let a=n.classList.contains("toolbar__group--empty"),s=n.style.display==="none",l=!a&&!s;n.classList.toggle("toolbar__group--has-prev-visible",l&&r),l&&(r=!0)})}calculateOverflow(){let t=Array.from(this._groups||[]);if(!t.length)return;this.restoreMovedContent(),this.updateEmptyGroups();let r=t.filter(h=>!h.classList.contains("toolbar__group--overflow")&&!h.classList.contains("toolbar__group--empty"));r.forEach(h=>{h.style.display="flex",h.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible")}),this._overflowGroup&&(this._overflowGroup.style.display="none",this._overflowGroup.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible"));let n=this.getToolbarWidth();if(!n||n<=0){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m<=n)a+=m,s++;else break}if(s>=r.length){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let l=this.getOverflowGroupWidth();a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m+l<=n)a+=m,s++;else break}r.forEach((h,m)=>{h.style.display=m<s?"flex":"none"}),r.forEach((h,m)=>{let f=m>=s;h.classList.toggle("toolbar__group--hidden",f)}),this._overflowGroup&&(this._overflowGroup.style.display="flex"),this._updateDividerClasses();let p=r.slice(s);this.populateOverflowMenu(p),this._dispatchOverflowEvent()}_dispatchOverflowEvent(){this.dispatchEvent(new CustomEvent("zn-toolbar-overflow-updated",{bubbles:!0,composed:!0}))}populateOverflowMenu(t){let r=this._overflowMenu;if(!r)return;this.restoreMovedContent(),r.innerHTML="";let n=(h,m,f,b,g={})=>{let v=document.createElement("zn-menu-item");if(v.innerText=m,Object.keys(g).forEach(y=>v.setAttribute(y,g[y])),f){let y=document.createElement("zn-icon");y.setAttribute("src",f),y.setAttribute("size","18"),y.setAttribute("slot","prefix"),v.appendChild(y)}return b&&v.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),b()}),h.appendChild(v),v},a=h=>{let m=document.createElement("zn-menu-item");for(let f of h.attributes)f.name!=="id"&&m.setAttribute(f.name,f.value);return m.innerHTML=h.innerHTML,m},s=h=>{let f=h.querySelector('zn-button[slot="trigger"]')?.querySelector("zn-icon"),b=f?.getAttribute("src");if(!b)return b??void 0;let g=f?.getAttribute("library");return g?`${b}@${g}`:b},l={bold:"Bold",italic:"Italic",underline:"Underline",undo:"Undo",redo:"Redo"},p={"toolbar__header-dropdown":"Text","toolbar__format-dropdown":"Format","toolbar__color-dropdown":"Color","toolbar__list-dropdown":"Lists","toolbar__file-dropdown":"Insert","toolbar__emoji-dropdown":"Emoji","toolbar__date-dropdown":"Date"};t.forEach(h=>{if(Array.from(h.querySelectorAll("zn-dropdown")).forEach(g=>{let v="";for(let U in p)if(g.classList.contains(U)){v=p[U];break}v||(v=g.getAttribute("aria-label")||g.getAttribute("title")||"More");let y=s(g)||"",S=n(r,v,y);g.classList.contains("toolbar__date-dropdown")&&S.setAttribute("data-overflow-source","date");let T=document.createElement("zn-menu");T.setAttribute("slot","submenu"),T.setAttribute("variant","shell");let N=g.querySelectorAll("zn-menu-item");if(N.length)N.forEach(U=>{let I=a(U);T.appendChild(I)});else{let U=Array.from(g.children).filter(C=>{let $=C.getAttribute("slot")==="trigger"||C instanceof $e,L=C instanceof on||C instanceof xi;return!$&&!L}),I=document.createElement("div");I.className="toolbar__submenu-content",U.forEach(C=>this.moveContentTo(C,I)),T.appendChild(I)}S.appendChild(T)}),h.querySelectorAll("zn-button.toolbar__format-button, zn-button.toolbar__action-button").forEach(g=>{let v=g.getAttribute("icon")??"",y=g.getAttribute("data-format")??"",S=g.getAttribute("data-text")??l[y]??(y?y.charAt(0).toUpperCase()+y.slice(1):g.getAttribute("aria-label")??g.textContent?.trim()??"Action"),T={"data-format":y},N=g.getAttribute("data-format-type")??"";N&&(T["data-format-type"]=N),v&&(T["data-icon"]=v),S&&(T["data-text"]=S),n(r,S,v,void 0,T)}),Array.from(h.querySelectorAll("zn-menu-item")).filter(g=>!g.closest("zn-dropdown")).forEach(g=>{let v=a(g);r.appendChild(v)}),h.querySelector("slot")){let g=h.querySelector("slot"),v=g?g.assignedElements({flatten:!0}):[];if(!v.length)return;v.forEach(y=>{if(y instanceof Oc){let S=y.icon,T=y.label,N=y.handler||"dialog",U=y.uri||"",I=y.key||"",C={"data-format":N};U&&(C["data-format-type"]=U),I&&(C["data-toolbar-key"]=I),S&&(C["data-icon"]=S),T&&(C["data-text"]=T),n(r,T,S,void 0,C)}})}})}render(){let t=this._featureConfig.dividersEnabled||this._featureConfig.linksEnabled||this._featureConfig.attachmentsEnabled||this._featureConfig.imagesEnabled||this._featureConfig.videosEnabled,r=t||this._featureConfig.datesEnabled||this._featureConfig.emojisEnabled;return u`
3076
3076
  <div class="toolbar">
@@ -3933,7 +3933,7 @@ ${Na(this.code(i,t))}
3933
3933
  type="file"
3934
3934
  tabindex="-1"
3935
3935
  ?webkitdirectory=${this.webkitdirectory}>
3936
- </div>`}};be.styles=[z(Se),z(t2)],be.dependencies={"zn-dialog":_a},c([R()],be.prototype,"userIsDragging",2),c([R()],be.prototype,"fileObjectUrl",2),c([F(".input__control")],be.prototype,"input",2),c([F(".button")],be.prototype,"button",2),c([F(".droparea")],be.prototype,"dropareaWrapper",2),c([F(".droparea__icon")],be.prototype,"dropareaIcon",2),c([F(".input__value")],be.prototype,"inputChosen",2),c([F(".clear-confirm")],be.prototype,"clearConfirmDialog",2),c([d({type:Object})],be.prototype,"files",1),c([d({type:String})],be.prototype,"name",2),c([d({type:String})],be.prototype,"value",1),c([Ce()],be.prototype,"defaultValue",2),c([d({reflect:!0})],be.prototype,"size",2),c([d()],be.prototype,"label",2),c([d({type:Boolean})],be.prototype,"clearable",2),c([d({attribute:"help-text"})],be.prototype,"helpText",2),c([d({reflect:!0,type:Boolean})],be.prototype,"disabled",2),c([d({type:Boolean})],be.prototype,"droparea",2),c([d({type:String})],be.prototype,"accept",2),c([d({type:String})],be.prototype,"capture",2),c([d({reflect:!0,type:Boolean})],be.prototype,"multiple",2),c([d({reflect:!0,type:Boolean})],be.prototype,"webkitdirectory",2),c([d({reflect:!0})],be.prototype,"form",2),c([d({reflect:!0,type:Boolean})],be.prototype,"required",2),c([d({attribute:"hide-value",type:Boolean})],be.prototype,"hideValue",2),c([d()],be.prototype,"src",2),c([d({type:Boolean,attribute:"trigger-submit"})],be.prototype,"triggerSubmit",2),c([d({type:Boolean,attribute:"show-link"})],be.prototype,"showLink",2),c([d({attribute:"upload-url"})],be.prototype,"uploadUrl",2),c([R()],be.prototype,"uploading",2),c([K("disabled",{waitUntilFirstUpdate:!0})],be.prototype,"handleDisabledChange",1),c([K("value",{waitUntilFirstUpdate:!0})],be.prototype,"handleValueChange",1);Cn("file.iconDrop",{keyframes:[{scale:1},{scale:.7},{scale:1}],options:{duration:600,easing:"ease-out"}});Cn("file.text.disappear",{keyframes:[{opacity:1},{opacity:0,transform:"translateY(-40%)"}],options:{duration:300,easing:"cubic-bezier(0.45, 1.45, 0.8, 1)"}});Cn("file.text.appear",{keyframes:[{opacity:0,transform:"translateY(40%)"},{opacity:1}],options:{duration:300,easing:"cubic-bezier(0.45, 1.45, 0.8, 1)"}});var hL=be;be.define("zn-file");var r2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;line-height:var(--zn-line-height-dense)}:host([horizontal]) .form-control-input{display:flex;flex-wrap:wrap;-moz-column-gap:var(--zn-spacing-2x-large);column-gap:var(--zn-spacing-2x-large);row-gap:var(--zn-spacing-small)}::slotted(zn-checkbox[horizontal]){flex-basis:20%;min-width:100px}:host([contained]) .form-control--has-label .form-control-input{margin-top:var(--zn-spacing-medium)}:host([horizontal][contained]) .form-control-input{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--zn-checkbox-group-column-width,152px)),1fr));align-items:stretch;gap:var(--zn-spacing-small)}::slotted(zn-checkbox){margin-top:var(--zn-spacing-medium)}::slotted(zn-checkbox[horizontal]),::slotted(zn-checkbox[contained]){margin-top:var(--zn-spacing-small)}::slotted(zn-checkbox[horizontal][contained]){margin-top:0;height:100%}:host([horizontal][contained][wrap]) .form-control-input{display:flex;flex-wrap:wrap;align-items:stretch;gap:var(--zn-spacing-x-small)}:host([wrap]) ::slotted(zn-checkbox[horizontal][contained]){flex:1 1 var(--zn-checkbox-group-column-width,152px);min-width:0;height:auto}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}`;var ft=class extends k{constructor(){super(...arguments);this.formControlController=new re(this);this.hasSlotController=new Y(this,"help-text","label");this.customValidityMessage="";this.errorMessage="";this.label="";this.labelTooltip="";this.helpText="";this.name="";this.value=[];this.size="medium";this.horizontal=!1;this.contained=!1;this.square=!1;this.wrap=!1;this.form="";this.required=!1}get validity(){let t=this.value.length>0,r=this.required&&!t;return this.customValidityMessage!==""?hd:r?ud:pt}get validationMessage(){let t=this.value.length>0,r=this.required&&!t;return this.customValidityMessage!==""?this.customValidityMessage:r?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.addEventListenerToCheckboxes(),this.getValueFromCheckboxes()}firstUpdated(){this.updateCheckboxValidity(),this.formControlController.updateValidity()}getAllCheckboxes(){return[...this.querySelectorAll("zn-checkbox")]}handleCheckboxClick(t){t.currentTarget.disabled||(this.getValueFromCheckboxes(),this.updateCheckboxValidity(),this.emit("zn-change"),this.emit("zn-input"),t.stopPropagation())}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async r=>{await r.updateComplete,r.size=this.size,r.horizontal=this.horizontal,this.square&&(r.square=!0),r.classList.add("groupedCheckbox"),t.some(a=>a.contained)?t.forEach(a=>{a.contained=!0}):r.contained=this.contained,this.getValueFromCheckboxes()}))}syncCheckboxes(){customElements.get("zn-checkbox")?this.syncCheckboxElements():customElements.whenDefined("zn-checkbox").then(()=>this.syncCheckboxes())}updateCheckboxValidity(){if(this.required){let t=this.value.length>0,r=this.getAllCheckboxes();this.updateComplete.then(()=>{let n=this.dataset?.userInvalid!==void 0;r.forEach(a=>{a.required=!t,n?a.classList.add("checkbox-user-invalid"):a.classList.remove("checkbox-user-invalid")})})}}getValueFromCheckboxes(){let t=this.getAllCheckboxes();this.value=t.filter(r=>r.checked).map(r=>r.value)}addEventListenerToCheckboxes(){this.getAllCheckboxes().forEach(r=>{r.addEventListener("zn-change",this.handleCheckboxClick.bind(this))})}handleSizeChange(){this.syncCheckboxes()}handleValueChange(){this.hasUpdated&&(this.getValueFromCheckboxes(),this.updateCheckboxValidity())}checkValidity(){let t=this.value.length>0,r=this.required&&!t,n=this.customValidityMessage!=="";return r||n?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity?.valid;return this.errorMessage=this.customValidityMessage||t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.errorMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("help-text"),a=this.label?!0:t,s=this.labelTooltip?!0:r,l=this.helpText?!0:n,p=u`
3936
+ </div>`}};be.styles=[z(Se),z(t2)],be.dependencies={"zn-dialog":ka},c([R()],be.prototype,"userIsDragging",2),c([R()],be.prototype,"fileObjectUrl",2),c([F(".input__control")],be.prototype,"input",2),c([F(".button")],be.prototype,"button",2),c([F(".droparea")],be.prototype,"dropareaWrapper",2),c([F(".droparea__icon")],be.prototype,"dropareaIcon",2),c([F(".input__value")],be.prototype,"inputChosen",2),c([F(".clear-confirm")],be.prototype,"clearConfirmDialog",2),c([d({type:Object})],be.prototype,"files",1),c([d({type:String})],be.prototype,"name",2),c([d({type:String})],be.prototype,"value",1),c([Ce()],be.prototype,"defaultValue",2),c([d({reflect:!0})],be.prototype,"size",2),c([d()],be.prototype,"label",2),c([d({type:Boolean})],be.prototype,"clearable",2),c([d({attribute:"help-text"})],be.prototype,"helpText",2),c([d({reflect:!0,type:Boolean})],be.prototype,"disabled",2),c([d({type:Boolean})],be.prototype,"droparea",2),c([d({type:String})],be.prototype,"accept",2),c([d({type:String})],be.prototype,"capture",2),c([d({reflect:!0,type:Boolean})],be.prototype,"multiple",2),c([d({reflect:!0,type:Boolean})],be.prototype,"webkitdirectory",2),c([d({reflect:!0})],be.prototype,"form",2),c([d({reflect:!0,type:Boolean})],be.prototype,"required",2),c([d({attribute:"hide-value",type:Boolean})],be.prototype,"hideValue",2),c([d()],be.prototype,"src",2),c([d({type:Boolean,attribute:"trigger-submit"})],be.prototype,"triggerSubmit",2),c([d({type:Boolean,attribute:"show-link"})],be.prototype,"showLink",2),c([d({attribute:"upload-url"})],be.prototype,"uploadUrl",2),c([R()],be.prototype,"uploading",2),c([K("disabled",{waitUntilFirstUpdate:!0})],be.prototype,"handleDisabledChange",1),c([K("value",{waitUntilFirstUpdate:!0})],be.prototype,"handleValueChange",1);Cn("file.iconDrop",{keyframes:[{scale:1},{scale:.7},{scale:1}],options:{duration:600,easing:"ease-out"}});Cn("file.text.disappear",{keyframes:[{opacity:1},{opacity:0,transform:"translateY(-40%)"}],options:{duration:300,easing:"cubic-bezier(0.45, 1.45, 0.8, 1)"}});Cn("file.text.appear",{keyframes:[{opacity:0,transform:"translateY(40%)"},{opacity:1}],options:{duration:300,easing:"cubic-bezier(0.45, 1.45, 0.8, 1)"}});var hL=be;be.define("zn-file");var r2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;line-height:var(--zn-line-height-dense)}:host([horizontal]) .form-control-input{display:flex;flex-wrap:wrap;-moz-column-gap:var(--zn-spacing-2x-large);column-gap:var(--zn-spacing-2x-large);row-gap:var(--zn-spacing-small)}::slotted(zn-checkbox[horizontal]){flex-basis:20%;min-width:100px}:host([contained]) .form-control--has-label .form-control-input{margin-top:var(--zn-spacing-medium)}:host([horizontal][contained]) .form-control-input{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--zn-checkbox-group-column-width,152px)),1fr));align-items:stretch;gap:var(--zn-spacing-small)}::slotted(zn-checkbox){margin-top:var(--zn-spacing-medium)}::slotted(zn-checkbox[horizontal]),::slotted(zn-checkbox[contained]){margin-top:var(--zn-spacing-small)}::slotted(zn-checkbox[horizontal][contained]){margin-top:0;height:100%}:host([horizontal][contained][wrap]) .form-control-input{display:flex;flex-wrap:wrap;align-items:stretch;gap:var(--zn-spacing-x-small)}:host([wrap]) ::slotted(zn-checkbox[horizontal][contained]){flex:1 1 var(--zn-checkbox-group-column-width,152px);min-width:0;height:auto}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}`;var ft=class extends k{constructor(){super(...arguments);this.formControlController=new re(this);this.hasSlotController=new Y(this,"help-text","label");this.customValidityMessage="";this.errorMessage="";this.label="";this.labelTooltip="";this.helpText="";this.name="";this.value=[];this.size="medium";this.horizontal=!1;this.contained=!1;this.square=!1;this.wrap=!1;this.form="";this.required=!1}get validity(){let t=this.value.length>0,r=this.required&&!t;return this.customValidityMessage!==""?hd:r?ud:pt}get validationMessage(){let t=this.value.length>0,r=this.required&&!t;return this.customValidityMessage!==""?this.customValidityMessage:r?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.addEventListenerToCheckboxes(),this.getValueFromCheckboxes()}firstUpdated(){this.updateCheckboxValidity(),this.formControlController.updateValidity()}getAllCheckboxes(){return[...this.querySelectorAll("zn-checkbox")]}handleCheckboxClick(t){t.currentTarget.disabled||(this.getValueFromCheckboxes(),this.updateCheckboxValidity(),this.emit("zn-change"),this.emit("zn-input"),t.stopPropagation())}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async r=>{await r.updateComplete,r.size=this.size,r.horizontal=this.horizontal,this.square&&(r.square=!0),r.classList.add("groupedCheckbox"),t.some(a=>a.contained)?t.forEach(a=>{a.contained=!0}):r.contained=this.contained,this.getValueFromCheckboxes()}))}syncCheckboxes(){customElements.get("zn-checkbox")?this.syncCheckboxElements():customElements.whenDefined("zn-checkbox").then(()=>this.syncCheckboxes())}updateCheckboxValidity(){if(this.required){let t=this.value.length>0,r=this.getAllCheckboxes();this.updateComplete.then(()=>{let n=this.dataset?.userInvalid!==void 0;r.forEach(a=>{a.required=!t,n?a.classList.add("checkbox-user-invalid"):a.classList.remove("checkbox-user-invalid")})})}}getValueFromCheckboxes(){let t=this.getAllCheckboxes();this.value=t.filter(r=>r.checked).map(r=>r.value)}addEventListenerToCheckboxes(){this.getAllCheckboxes().forEach(r=>{r.addEventListener("zn-change",this.handleCheckboxClick.bind(this))})}handleSizeChange(){this.syncCheckboxes()}handleValueChange(){this.hasUpdated&&(this.getValueFromCheckboxes(),this.updateCheckboxValidity())}checkValidity(){let t=this.value.length>0,r=this.required&&!t,n=this.customValidityMessage!=="";return r||n?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity?.valid;return this.errorMessage=this.customValidityMessage||t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.errorMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("help-text"),a=this.label?!0:t,s=this.labelTooltip?!0:r,l=this.helpText?!0:n,p=u`
3937
3937
  <slot @slotchange=${this.syncCheckboxes}></slot> `;return u`
3938
3938
  <fieldset
3939
3939
  part="form-control"
@@ -4076,7 +4076,7 @@ ${Na(this.code(i,t))}
4076
4076
  <zn-menu></zn-menu>
4077
4077
  </zn-dropdown>
4078
4078
  <slot></slot>
4079
- </div>`}addButton(t){t&&(t.classList.add("zn-button-menu__added"),this._originalButtons.push({button:t,width:Math.max(t.offsetWidth,150)}),this.calculateVisibleButtons())}setDynamicButtons(t){this.removeAllButtons(),!(!t||t.length===0)&&t.forEach(r=>{this.addButton(r)})}removeButton(t){let r=this.querySelector(`zn-button.${t}`);r&&(this._originalButtons=this._originalButtons.filter(a=>a.button!==r),r.remove());let n=this.querySelector(`zn-menu-item#${t}`);n&&this.shadowRoot?.querySelector("zn-menu")&&n.remove(),this.calculateVisibleButtons()}removeAllButtons(){let t=this.shadowRoot?.querySelectorAll("zn-button.zn-button-menu__added");t&&t.forEach(n=>{n.remove()});let r=this.shadowRoot?.querySelectorAll("zn-menu-item.zn-button-menu__added");r&&r?.forEach(n=>{n.remove()}),this._buttons=[],this._originalButtons=this._originalButtons.filter(n=>!n.button.classList.contains("zn-button-menu__added")),this.calculateVisibleButtons()}};Gr.styles=z(b2),c([d({type:Number,attribute:"max-width"})],Gr.prototype,"maxWidth",2),c([d({type:Number})],Gr.prototype,"containerWidth",2),c([d({type:Number,attribute:"limit"})],Gr.prototype,"limit",2),c([d({type:Number,attribute:"max-level"})],Gr.prototype,"maxLevel",2),c([d({type:Number,attribute:"icon-size",reflect:!0})],Gr.prototype,"iconSize",2),c([d({type:Boolean,attribute:"no-gap"})],Gr.prototype,"noGap",2),c([d({type:Boolean,attribute:"no-padding"})],Gr.prototype,"noPadding",2),c([K("containerWidth",{waitUntilFirstUpdate:!0})],Gr.prototype,"watchContainerMaxWidth",1);var EL=Gr;Gr.define("zn-button-menu");var v2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:min(100vw,46rem);--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-medium) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.slideout{left:unset;top:0;bottom:0;right:0;margin:0;max-height:100%;height:100%;overflow:hidden;overflow-y:auto;flex-direction:column;z-index:2;padding:0;width:1100px;background:rgb(var(--zn-body));box-shadow:0 0 10px 0 rgba(0,0,0,0.1)}.slideout::backdrop{background:var(--zn-overlay-background-color)}.slideout__header{flex:0 0 auto;display:flex;border-bottom:1px solid rgb(var(--zn-border-color));background-color:var(--zn-panel-background-color)}.slideout__title{display:flex;flex:1 1 auto;align-items:center;font:inherit;margin:0;color:rgb(var(--zn-text-panel-title));font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-font-size-x-large);padding:var(--header-spacing)}.slideout__header-actions{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:end;align-items:center;margin-left:auto;gap:var(--zn-spacing-x-small);padding:var(--header-spacing)}.slideout__header-actions zn-button,.slideout__header-actions::slotted(zn-button){flex:0 0 auto;display:flex;align-items:center;font-size:var(--zn-font-size-medium)}.slideout__body{flex:1 1 auto;display:block;padding:var(--body-spacing);overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}.slideout__footer{display:flex;justify-content:space-between;flex:0 0 auto;padding:var(--footer-spacing);border-top:1px solid rgb(var(--zn-border-color))}.slideout__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}`;var ci=class extends k{constructor(){super(...arguments);this.localize=new Ht(this);this.open=!1;this.closeClickHandler=t=>{if(t.target instanceof HTMLElement&&t.target.hasAttribute("slideout-closer")){this.hide();return}for(let r of t.composedPath()){if(r===this)return;if(r instanceof HTMLElement){if(r.hasAttribute("modal-closer")){this.hide();return}if(r.localName==="zn-dialog"||r.localName==="zn-slideout")return}}}}firstUpdated(t){super.firstUpdated(t),this.open&&this.show()}connectedCallback(){if(super.connectedCallback(),this.addEventListener("click",this.closeClickHandler),this.shadowRoot?.addEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentNode?.querySelector(cr(this.trigger));t&&t.addEventListener("click",()=>this.show())}}disconnectedCallback(){if(super.disconnectedCallback(),this.slideout.close(),za(this),this.closeWatcher?.destroy(),this.removeEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentElement?.querySelector(cr(this.trigger));t&&t.removeEventListener("click",()=>this.show())}}requestClose(t){this.emit("zn-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented||this.hide()}addOpenListeners(){"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))}removeOpenListeners(){this.closeWatcher?.destroy()}async show(){this.emit("zn-show"),this.addOpenListeners(),this.open=!0,this.slideout.showModal();let{keyframes:t,options:r}=Sn(this,"slideout.show",{dir:this.localize.dir()});await yi(this.slideout,t,r)}async hide(){this.emit("zn-close"),this.removeOpenListeners();let{keyframes:t,options:r}=Sn(this,"slideout.hide",{dir:this.localize.dir()});await yi(this.slideout,t,r),this.open=!1,this.slideout.close()}render(){return u`
4079
+ </div>`}addButton(t){t&&(t.classList.add("zn-button-menu__added"),this._originalButtons.push({button:t,width:Math.max(t.offsetWidth,150)}),this.calculateVisibleButtons())}setDynamicButtons(t){this.removeAllButtons(),!(!t||t.length===0)&&t.forEach(r=>{this.addButton(r)})}removeButton(t){let r=this.querySelector(`zn-button.${t}`);r&&(this._originalButtons=this._originalButtons.filter(a=>a.button!==r),r.remove());let n=this.querySelector(`zn-menu-item#${t}`);n&&this.shadowRoot?.querySelector("zn-menu")&&n.remove(),this.calculateVisibleButtons()}removeAllButtons(){let t=this.shadowRoot?.querySelectorAll("zn-button.zn-button-menu__added");t&&t.forEach(n=>{n.remove()});let r=this.shadowRoot?.querySelectorAll("zn-menu-item.zn-button-menu__added");r&&r?.forEach(n=>{n.remove()}),this._buttons=[],this._originalButtons=this._originalButtons.filter(n=>!n.button.classList.contains("zn-button-menu__added")),this.calculateVisibleButtons()}};Gr.styles=z(b2),c([d({type:Number,attribute:"max-width"})],Gr.prototype,"maxWidth",2),c([d({type:Number})],Gr.prototype,"containerWidth",2),c([d({type:Number,attribute:"limit"})],Gr.prototype,"limit",2),c([d({type:Number,attribute:"max-level"})],Gr.prototype,"maxLevel",2),c([d({type:Number,attribute:"icon-size",reflect:!0})],Gr.prototype,"iconSize",2),c([d({type:Boolean,attribute:"no-gap"})],Gr.prototype,"noGap",2),c([d({type:Boolean,attribute:"no-padding"})],Gr.prototype,"noPadding",2),c([K("containerWidth",{waitUntilFirstUpdate:!0})],Gr.prototype,"watchContainerMaxWidth",1);var EL=Gr;Gr.define("zn-button-menu");var v2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:min(100vw,46rem);--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-medium) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.slideout{left:unset;top:0;bottom:0;right:0;margin:0;max-height:100%;height:100%;overflow:hidden;overflow-y:auto;flex-direction:column;z-index:2;padding:0;width:1100px;background:rgb(var(--zn-body));box-shadow:0 0 10px 0 rgba(0,0,0,0.1)}.slideout::backdrop{background:var(--zn-overlay-background-color)}.slideout__header{flex:0 0 auto;display:flex;border-bottom:1px solid rgb(var(--zn-border-color));background-color:var(--zn-panel-background-color)}.slideout__title{display:flex;flex:1 1 auto;align-items:center;font:inherit;margin:0;color:rgb(var(--zn-text-panel-title));font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-font-size-x-large);padding:var(--header-spacing)}.slideout__header-actions{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:end;align-items:center;margin-left:auto;gap:var(--zn-spacing-x-small);padding:var(--header-spacing)}.slideout__header-actions zn-button,.slideout__header-actions::slotted(zn-button){flex:0 0 auto;display:flex;align-items:center;font-size:var(--zn-font-size-medium)}.slideout__body{flex:1 1 auto;display:block;padding:var(--body-spacing);overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}.slideout__footer{display:flex;justify-content:space-between;flex:0 0 auto;padding:var(--footer-spacing);border-top:1px solid rgb(var(--zn-border-color))}.slideout__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}`;var ci=class extends k{constructor(){super(...arguments);this.localize=new Ht(this);this.open=!1;this.closeClickHandler=t=>{if(t.target instanceof HTMLElement&&t.target.hasAttribute("slideout-closer")){this.hide();return}for(let r of t.composedPath()){if(r===this)return;if(r instanceof HTMLElement){if(r.hasAttribute("modal-closer")){this.hide();return}if(r.localName==="zn-dialog"||r.localName==="zn-slideout")return}}}}firstUpdated(t){super.firstUpdated(t),this.open&&this.show()}connectedCallback(){if(super.connectedCallback(),this.addEventListener("click",this.closeClickHandler),this.shadowRoot?.addEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentNode?.querySelector(cr(this.trigger));t&&t.addEventListener("click",()=>this.show())}}disconnectedCallback(){if(super.disconnectedCallback(),this.slideout.close(),_a(this),this.closeWatcher?.destroy(),this.removeEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentElement?.querySelector(cr(this.trigger));t&&t.removeEventListener("click",()=>this.show())}}requestClose(t){this.emit("zn-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented||this.hide()}addOpenListeners(){"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))}removeOpenListeners(){this.closeWatcher?.destroy()}async show(){this.emit("zn-show"),this.addOpenListeners(),this.open=!0,this.slideout.showModal();let{keyframes:t,options:r}=Sn(this,"slideout.show",{dir:this.localize.dir()});await yi(this.slideout,t,r)}async hide(){this.emit("zn-close"),this.removeOpenListeners();let{keyframes:t,options:r}=Sn(this,"slideout.hide",{dir:this.localize.dir()});await yi(this.slideout,t,r),this.open=!1,this.slideout.close()}render(){return u`
4080
4080
  <dialog
4081
4081
  part="base"
4082
4082
  role="alertdialog"
@@ -4113,7 +4113,7 @@ ${Na(this.code(i,t))}
4113
4113
  </footer>
4114
4114
 
4115
4115
  </dialog>
4116
- `}};ci.styles=z(v2),ci.dependencies={"zn-button":$e},c([F(".slideout")],ci.prototype,"slideout",2),c([F(".slideout__panel")],ci.prototype,"panel",2),c([F(".slideout__overlay")],ci.prototype,"overlay",2),c([d({type:Boolean,reflect:!0})],ci.prototype,"open",2),c([d({reflect:!0})],ci.prototype,"label",2),c([d({type:String,reflect:!0})],ci.prototype,"trigger",2);Cn("slideout.show",{keyframes:[{transform:"translateX(100%)",opacity:0},{transform:"translateX(0)",opacity:1}],options:{duration:150,easing:"ease"}});Cn("slideout.hide",{keyframes:[{transform:"translateX(0)",opacity:1},{transform:"translateX(100%)",opacity:0}],options:{duration:150,easing:"ease"}});var TL=ci;ci.define("zn-slideout");var y2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.data-table-sort__dropdown{background-color:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);box-shadow:var(--zn-shadow-large);padding:var(--zn-spacing-medium);width:300px}.data-table-sort__header{font-weight:500;color:rgb(var(--zn-text-heading));font-size:var(--zn-font-size-medium)}.data-table-sort__controls{display:flex;flex-direction:column;gap:var(--zn-spacing-small);margin:var(--zn-spacing-small) 0}.data-table-sort__btn-group{display:flex;flex-direction:row;justify-content:space-between;gap:var(--zn-spacing-small)}`;var Fa=class extends k{render(){return u`
4116
+ `}};ci.styles=z(v2),ci.dependencies={"zn-button":$e},c([F(".slideout")],ci.prototype,"slideout",2),c([F(".slideout__panel")],ci.prototype,"panel",2),c([F(".slideout__overlay")],ci.prototype,"overlay",2),c([d({type:Boolean,reflect:!0})],ci.prototype,"open",2),c([d({reflect:!0})],ci.prototype,"label",2),c([d({type:String,reflect:!0})],ci.prototype,"trigger",2);Cn("slideout.show",{keyframes:[{transform:"translateX(100%)",opacity:0},{transform:"translateX(0)",opacity:1}],options:{duration:150,easing:"ease"}});Cn("slideout.hide",{keyframes:[{transform:"translateX(0)",opacity:1},{transform:"translateX(100%)",opacity:0}],options:{duration:150,easing:"ease"}});var TL=ci;ci.define("zn-slideout");var y2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.data-table-sort__dropdown{background-color:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);box-shadow:var(--zn-shadow-large);padding:var(--zn-spacing-medium);width:300px}.data-table-sort__header{font-weight:500;color:rgb(var(--zn-text-heading));font-size:var(--zn-font-size-medium)}.data-table-sort__controls{display:flex;flex-direction:column;gap:var(--zn-spacing-small);margin:var(--zn-spacing-small) 0}.data-table-sort__btn-group{display:flex;flex-direction:row;justify-content:space-between;gap:var(--zn-spacing-small)}`;var Ba=class extends k{render(){return u`
4117
4117
  <zn-dropdown distance="50" placement="bottom-start" class="data-table-sort">
4118
4118
  <zn-button color="transparent" icon="sort" icon-size="22" slot="trigger" tooltip="Open Sort">
4119
4119
  Sort
@@ -4140,7 +4140,7 @@ ${Na(this.code(i,t))}
4140
4140
  <zn-button color="default" slot="footer">Update</zn-button>
4141
4141
  </div>
4142
4142
  </div>
4143
- </zn-dropdown>`}};Fa.styles=z(y2);var $L=Fa;Fa.define("zn-data-table-sort");var x2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative}.action-bar{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-small);padding:0;background-color:rgb(var(--zn-panel));justify-content:space-between}.action-bar__left,.action-bar__right{display:flex;flex-direction:row;align-items:center}.action-bar__right ::slotted(*){padding:0 5px;aspect-ratio:1/1;display:flex;justify-content:center;align-items:center;border-left:solid 1px rgb(var(--zn-border-color))}`;var Ba=class extends k{constructor(){super(...arguments);this.localize=new Ht(this)}render(){return u`
4143
+ </zn-dropdown>`}};Ba.styles=z(y2);var $L=Ba;Ba.define("zn-data-table-sort");var x2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative}.action-bar{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-small);padding:0;background-color:rgb(var(--zn-panel));justify-content:space-between}.action-bar__left,.action-bar__right{display:flex;flex-direction:row;align-items:center}.action-bar__right ::slotted(*){padding:0 5px;aspect-ratio:1/1;display:flex;justify-content:center;align-items:center;border-left:solid 1px rgb(var(--zn-border-color))}`;var Va=class extends k{constructor(){super(...arguments);this.localize=new Ht(this)}render(){return u`
4144
4144
  <div class="action-bar">
4145
4145
  <div class="action-bar__left">
4146
4146
  <slot name="menu"></slot>
@@ -4148,7 +4148,7 @@ ${Na(this.code(i,t))}
4148
4148
  <div class="action-bar__right">
4149
4149
  <slot name="actions"></slot>
4150
4150
  </div>
4151
- </div>`}};Ba.styles=z(x2);var AL=Ba;Ba.define("zn-action-bar");var w2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;position:relative;height:100%;--page-nav-crumb-height:50px;--page-nav-width:240px;--page-nav-animation-duration:0.3s;--page-nav-bg:var(--zn-page-content-background,var(--zn-body))}.breadcrumb{display:none}.tabs{display:flex;flex-direction:row;height:100%;max-height:100%;min-height:100%}.menu-overlay{pointer-events:none;position:absolute;opacity:0;top:0;bottom:0;right:0;left:0;width:100%;transition:opacity var(--page-nav-animation-duration) ease-in-out,left var(--page-nav-animation-duration) ease-in-out,width var(--page-nav-animation-duration) ease-in-out}.navigation{display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;max-width:var(--page-nav-width);width:var(--page-nav-width);background-color:rgb(var(--page-nav-bg));overflow-y:auto;padding:var(--zn-base-gap) 0 var(--zn-base-gap) var(--zn-base-gap)}.navigation ::-webkit-scrollbar{width:5px;height:5px}.navigation{}.navigation ::-webkit-scrollbar-track{background:transparent}.navigation{}.navigation ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.navigation{}.navigation ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.navigation-group{display:flex;flex-direction:column;gap:var(--zn-spacing-medium);padding-top:var(--zn-spacing-medium)}.navigation-group:first-of-type{padding-top:0}.navigation-group h4{margin:0;padding:0;color:rgb(var(--zn-text-heading));font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-semibold)}.navigation-group .navigation-item{color:rgb(var(--zn-text));font-size:var(--zn-font-size-medium);cursor:pointer;display:flex;align-items:center;gap:var(--zn-spacing-small);min-height:var(--zn-icon-size)}.navigation-item.active{color:rgb(var(--zn-primary))}.navigation-group+.navigation-group{margin-top:10px}@container (max-width:767px){.breadcrumb{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid rgb(var(--zn-border-color));width:100%;height:var(--page-nav-crumb-height);background-color:rgb(var(--page-nav-bg));gap:var(--zn-base-px)}.breadcrumb-menu-toggle{cursor:pointer;margin-left:var(--zn-base-gap);display:flex;align-items:center;gap:var(--zn-base-px);height:100%;background:linear-gradient(180deg,rgb(var(--page-nav-bg)) 70%,rgba(0,0,0,0) 100%);width:calc(var(--page-nav-width) - 20px);z-index:calc(var(--zn-z-index-page-nav) + 1)}.breadcrumb-menu-toggle span{color:rgb(var(--zn-text-heading));font-weight:var(--zn-font-weight-semibold);font-size:var(--zn-font-size-medium)}.menu-overlay.active{opacity:0.2;left:var(--page-nav-width);width:calc(100% - var(--page-nav-width));height:100%;background-color:rgb(0,0,0);z-index:calc(var(--zn-z-index-page-nav) + 1);pointer-events:all}.navigation{pointer-events:none;display:block;position:absolute;top:0;padding:60px var(--zn-base-gap) var(--zn-base-gap) var(--zn-base-gap);left:calc(var(--page-nav-width) * -1);max-width:var(--page-nav-width);opacity:0;min-height:400px;height:100%;bottom:0;z-index:var(--zn-z-index-page-nav);transition:left var(--page-nav-animation-duration) ease-in-out,opacity var(--page-nav-animation-duration) ease-in-out}.tabs{height:calc(100% - var(--page-nav-crumb-height));max-height:calc(100% - var(--page-nav-crumb-height));min-height:calc(100% - var(--page-nav-crumb-height))}.navigation.active{pointer-events:all;left:0;opacity:1}}`;var ho=class extends ln{toggleNavigation(){let i=this.shadowRoot?.querySelector(".navigation");i&&i.classList.toggle("active");let t=this.shadowRoot?.querySelector(".menu-overlay");t&&t.classList.toggle("active")}setActiveTab(i,t,r,n=null){super.setActiveTab(i,t,r,n);let a=this.shadowRoot?.querySelector(".navigation-item.active");a?this.breadcrumb=a.textContent?.trim()||"":this.breadcrumb=""}clickTab(i,t,r=!0){super.clickTab(i,t),this.breadcrumb=i.textContent?.trim()||"",r&&this.toggleNavigation()}render(){if(!this.navigation)return u`<p>No navigation data available.</p>`;let i=this.navigation.data.map(t=>u`
4151
+ </div>`}};Va.styles=z(x2);var AL=Va;Va.define("zn-action-bar");var w2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;position:relative;height:100%;--page-nav-crumb-height:50px;--page-nav-width:240px;--page-nav-animation-duration:0.3s;--page-nav-bg:var(--zn-page-content-background,var(--zn-body))}.breadcrumb{display:none}.tabs{display:flex;flex-direction:row;height:100%;max-height:100%;min-height:100%}.menu-overlay{pointer-events:none;position:absolute;opacity:0;top:0;bottom:0;right:0;left:0;width:100%;transition:opacity var(--page-nav-animation-duration) ease-in-out,left var(--page-nav-animation-duration) ease-in-out,width var(--page-nav-animation-duration) ease-in-out}.navigation{display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;max-width:var(--page-nav-width);width:var(--page-nav-width);background-color:rgb(var(--page-nav-bg));overflow-y:auto;padding:var(--zn-base-gap) 0 var(--zn-base-gap) var(--zn-base-gap)}.navigation ::-webkit-scrollbar{width:5px;height:5px}.navigation{}.navigation ::-webkit-scrollbar-track{background:transparent}.navigation{}.navigation ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.navigation{}.navigation ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.navigation-group{display:flex;flex-direction:column;gap:var(--zn-spacing-medium);padding-top:var(--zn-spacing-medium)}.navigation-group:first-of-type{padding-top:0}.navigation-group h4{margin:0;padding:0;color:rgb(var(--zn-text-heading));font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-semibold)}.navigation-group .navigation-item{color:rgb(var(--zn-text));font-size:var(--zn-font-size-medium);cursor:pointer;display:flex;align-items:center;gap:var(--zn-spacing-small);min-height:var(--zn-icon-size)}.navigation-item.active{color:rgb(var(--zn-primary))}.navigation-group+.navigation-group{margin-top:10px}@container (max-width:767px){.breadcrumb{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid rgb(var(--zn-border-color));width:100%;height:var(--page-nav-crumb-height);background-color:rgb(var(--page-nav-bg));gap:var(--zn-base-px)}.breadcrumb-menu-toggle{cursor:pointer;margin-left:var(--zn-base-gap);display:flex;align-items:center;gap:var(--zn-base-px);height:100%;background:linear-gradient(180deg,rgb(var(--page-nav-bg)) 70%,rgba(0,0,0,0) 100%);width:calc(var(--page-nav-width) - 20px);z-index:calc(var(--zn-z-index-page-nav) + 1)}.breadcrumb-menu-toggle span{color:rgb(var(--zn-text-heading));font-weight:var(--zn-font-weight-semibold);font-size:var(--zn-font-size-medium)}.menu-overlay.active{opacity:0.2;left:var(--page-nav-width);width:calc(100% - var(--page-nav-width));height:100%;background-color:rgb(0,0,0);z-index:calc(var(--zn-z-index-page-nav) + 1);pointer-events:all}.navigation{pointer-events:none;display:block;position:absolute;top:0;padding:60px var(--zn-base-gap) var(--zn-base-gap) var(--zn-base-gap);left:calc(var(--page-nav-width) * -1);max-width:var(--page-nav-width);opacity:0;min-height:400px;height:100%;bottom:0;z-index:var(--zn-z-index-page-nav);transition:left var(--page-nav-animation-duration) ease-in-out,opacity var(--page-nav-animation-duration) ease-in-out}.tabs{height:calc(100% - var(--page-nav-crumb-height));max-height:calc(100% - var(--page-nav-crumb-height));min-height:calc(100% - var(--page-nav-crumb-height))}.navigation.active{pointer-events:all;left:0;opacity:1}}`;var ho=class extends ln{toggleNavigation(){let i=this.shadowRoot?.querySelector(".navigation");i&&i.classList.toggle("active");let t=this.shadowRoot?.querySelector(".menu-overlay");t&&t.classList.toggle("active")}setActiveTab(i,t,r,n=null){super.setActiveTab(i,t,r,n);let a=this.shadowRoot?.querySelector(".navigation-item.active");a?this.breadcrumb=a.textContent?.trim()||"":this.breadcrumb=""}clickTab(i,t,r=!0){super.clickTab(i,t),this.breadcrumb=i.textContent?.trim()||"",r&&this.toggleNavigation()}render(){if(!this.navigation)return u`<p>No navigation data available.</p>`;let i=this.navigation.data.map(t=>u`
4152
4152
  <div class="navigation-group">
4153
4153
  ${t.title?u`<h4>${t.title}</h4>`:""}
4154
4154
  ${t.items.map(r=>u`
@@ -4645,12 +4645,12 @@ ${Na(this.code(i,t))}
4645
4645
  <slot name="help-text">${this.helpText}</slot>
4646
4646
  </div>
4647
4647
  </fieldset>
4648
- `}};gt.dependencies={"zn-icon":ne},gt.styles=[z(Se),z(R2)],c([F(".priority-list__hidden-inputs")],gt.prototype,"hiddenInputsContainer",2),c([d()],gt.prototype,"name",2),c([d({type:Array})],gt.prototype,"value",1),c([R()],gt.prototype,"defaultValue",2),c([d()],gt.prototype,"label",2),c([d({attribute:"label-tooltip"})],gt.prototype,"labelTooltip",2),c([d({attribute:"help-text"})],gt.prototype,"helpText",2),c([d({reflect:!0})],gt.prototype,"form",2),c([d({reflect:!0})],gt.prototype,"size",2),c([d({type:Boolean,reflect:!0})],gt.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],gt.prototype,"required",2),c([d({type:Number,attribute:"priority-start"})],gt.prototype,"priorityStart",2),c([d({attribute:"formaction"})],gt.prototype,"formAction",2),c([d()],gt.prototype,"order",2),c([R()],gt.prototype,"draggedKey",2),c([R()],gt.prototype,"isDragging",2);var GL=gt;gt.define("zn-priority-list");function hg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ja=hg();function U2(o){ja=o}var Va={exec:()=>null};function rl(o){let i=[];return t=>{let r=Math.max(0,Math.min(3,t-1)),n=i[r];return n||(n=o(r),i[r]=n),n}}function Te(o,i=""){let t=typeof o=="string"?o:o.source,r={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Dr.caret,"$1"),t=t.replace(n,s),r},getRegex:()=>new RegExp(t,i)};return r}var WL=((o="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+o)}catch{return!1}})(),Dr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:rl(o=>new RegExp(`^ {0,${o}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:rl(o=>new RegExp(`^ {0,${o}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:rl(o=>new RegExp(`^ {0,${o}}(?:\`\`\`|~~~)`)),headingBeginRegex:rl(o=>new RegExp(`^ {0,${o}}#`)),htmlBeginRegex:rl(o=>new RegExp(`^ {0,${o}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:rl(o=>new RegExp(`^ {0,${o}}>`))},KL=/^(?:[ \t]*(?:\n|$))+/,YL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,QL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,XL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ug=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,j2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,G2=Te(j2).replace(/bull/g,ug).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),JL=Te(j2).replace(/bull/g,ug).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),mg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ZL=/^[^\n]+/,fg=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,eq=Te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tq=Te(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ug).getRegex(),Mh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rq=Te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",gg).replace("tag",Mh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W2=o=>Te(mg).replace("hr",Vc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",o).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mh).getRegex(),iq=W2(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),nq=W2(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),oq=Te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nq).getRegex(),bg={blockquote:oq,code:YL,def:eq,fences:QL,heading:XL,hr:Vc,html:rq,lheading:G2,list:tq,newline:KL,paragraph:iq,table:Va,text:ZL},N2=Te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mh).getRegex(),aq={...bg,lheading:JL,table:N2,paragraph:Te(mg).replace("hr",Vc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",N2).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mh).getRegex()},sq={...bg,html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gg).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Va,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Te(mg).replace("hr",Vc).replace("heading",` *#{1,6} *[^
4649
- ]`).replace("lheading",G2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lq=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cq=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,K2=/^( {2,}|\\)\n(?!\s*$)/,dq=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,il=/[\p{P}\p{S}]/u,Lh=/[\s\p{P}\p{S}]/u,vg=/[^\s\p{P}\p{S}]/u,pq=Te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Lh).getRegex(),Y2=/(?!~)[\p{P}\p{S}]/u,hq=/(?!~)[\s\p{P}\p{S}]/u,uq=/(?:[^\s\p{P}\p{S}]|~)/u,mq=Te(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",WL?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Q2=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,fq=Te(Q2,"u").replace(/punct/g,il).getRegex(),gq=Te(Q2,"u").replace(/punct/g,Y2).getRegex(),X2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bq=Te(X2,"gu").replace(/notPunctSpace/g,vg).replace(/punctSpace/g,Lh).replace(/punct/g,il).getRegex(),vq=Te(X2,"gu").replace(/notPunctSpace/g,uq).replace(/punctSpace/g,hq).replace(/punct/g,Y2).getRegex(),yq=Te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vg).replace(/punctSpace/g,Lh).replace(/punct/g,il).getRegex(),xq=Te(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,il).getRegex(),wq="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",zq=Te(wq,"gu").replace(/notPunctSpace/g,vg).replace(/punctSpace/g,Lh).replace(/punct/g,il).getRegex(),_q=Te(/\\(punct)/,"gu").replace(/punct/g,il).getRegex(),kq=Te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cq=Te(gg).replace("(?:-->|$)","-->").getRegex(),Sq=Te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Cq).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Th=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Eq=Te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Th).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J2=Te(/^!?\[(label)\]\[(ref)\]/).replace("label",Th).replace("ref",fg).getRegex(),Z2=Te(/^!?\[(ref)\](?:\[\])?/).replace("ref",fg).getRegex(),Tq=Te("reflink|nolink(?!\\()","g").replace("reflink",J2).replace("nolink",Z2).getRegex(),O2=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yg={_backpedal:Va,anyPunctuation:_q,autolink:kq,blockSkip:mq,br:K2,code:cq,del:Va,delLDelim:Va,delRDelim:Va,emStrongLDelim:fq,emStrongRDelimAst:bq,emStrongRDelimUnd:yq,escape:lq,link:Eq,nolink:Z2,punctuation:pq,reflink:J2,reflinkSearch:Tq,tag:Sq,text:dq,url:Va},$q={...yg,link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",Th).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Th).getRegex()},cg={...yg,emStrongRDelimAst:vq,emStrongLDelim:gq,delLDelim:xq,delRDelim:zq,url:Te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",O2).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Te(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",O2).getRegex()},Aq={...cg,br:Te(K2).replace("{2,}","*").getRegex(),text:Te(cg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sh={normal:bg,gfm:aq,pedantic:sq},Fc={normal:yg,gfm:cg,breaks:Aq,pedantic:$q},Mq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P2=o=>Mq[o];function Pn(o,i){if(i){if(Dr.escapeTest.test(o))return o.replace(Dr.escapeReplace,P2)}else if(Dr.escapeTestNoEncode.test(o))return o.replace(Dr.escapeReplaceNoEncode,P2);return o}function H2(o){try{o=encodeURI(o).replace(Dr.percentDecode,"%")}catch{return null}return o}function F2(o,i){let t=o.replace(Dr.findPipe,(a,s,l)=>{let p=!1,h=s;for(;--h>=0&&l[h]==="\\";)p=!p;return p?"|":" |"}),r=t.split(Dr.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),i)if(r.length>i)r.splice(i);else for(;r.length<i;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(Dr.slashPipe,"|");return r}function ta(o,i,t){let r=o.length;if(r===0)return"";let n=0;for(;n<r;){let a=o.charAt(r-n-1);if(a===i&&!t)n++;else if(a!==i&&t)n++;else break}return o.slice(0,r-n)}function B2(o){let i=o.split(`
4648
+ `}};gt.dependencies={"zn-icon":ne},gt.styles=[z(Se),z(R2)],c([F(".priority-list__hidden-inputs")],gt.prototype,"hiddenInputsContainer",2),c([d()],gt.prototype,"name",2),c([d({type:Array})],gt.prototype,"value",1),c([R()],gt.prototype,"defaultValue",2),c([d()],gt.prototype,"label",2),c([d({attribute:"label-tooltip"})],gt.prototype,"labelTooltip",2),c([d({attribute:"help-text"})],gt.prototype,"helpText",2),c([d({reflect:!0})],gt.prototype,"form",2),c([d({reflect:!0})],gt.prototype,"size",2),c([d({type:Boolean,reflect:!0})],gt.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],gt.prototype,"required",2),c([d({type:Number,attribute:"priority-start"})],gt.prototype,"priorityStart",2),c([d({attribute:"formaction"})],gt.prototype,"formAction",2),c([d()],gt.prototype,"order",2),c([R()],gt.prototype,"draggedKey",2),c([R()],gt.prototype,"isDragging",2);var GL=gt;gt.define("zn-priority-list");function hg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ga=hg();function U2(o){Ga=o}var Ua={exec:()=>null};function rl(o){let i=[];return t=>{let r=Math.max(0,Math.min(3,t-1)),n=i[r];return n||(n=o(r),i[r]=n),n}}function Te(o,i=""){let t=typeof o=="string"?o:o.source,r={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Dr.caret,"$1"),t=t.replace(n,s),r},getRegex:()=>new RegExp(t,i)};return r}var WL=((o="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+o)}catch{return!1}})(),Dr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:rl(o=>new RegExp(`^ {0,${o}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:rl(o=>new RegExp(`^ {0,${o}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:rl(o=>new RegExp(`^ {0,${o}}(?:\`\`\`|~~~)`)),headingBeginRegex:rl(o=>new RegExp(`^ {0,${o}}#`)),htmlBeginRegex:rl(o=>new RegExp(`^ {0,${o}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:rl(o=>new RegExp(`^ {0,${o}}>`))},KL=/^(?:[ \t]*(?:\n|$))+/,YL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,QL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,XL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ug=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,j2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,G2=Te(j2).replace(/bull/g,ug).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),JL=Te(j2).replace(/bull/g,ug).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),mg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ZL=/^[^\n]+/,fg=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,eq=Te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tq=Te(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ug).getRegex(),Mh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rq=Te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",gg).replace("tag",Mh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W2=o=>Te(mg).replace("hr",Vc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",o).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mh).getRegex(),iq=W2(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),nq=W2(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),oq=Te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nq).getRegex(),bg={blockquote:oq,code:YL,def:eq,fences:QL,heading:XL,hr:Vc,html:rq,lheading:G2,list:tq,newline:KL,paragraph:iq,table:Ua,text:ZL},N2=Te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mh).getRegex(),aq={...bg,lheading:JL,table:N2,paragraph:Te(mg).replace("hr",Vc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",N2).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mh).getRegex()},sq={...bg,html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gg).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ua,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Te(mg).replace("hr",Vc).replace("heading",` *#{1,6} *[^
4649
+ ]`).replace("lheading",G2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lq=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cq=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,K2=/^( {2,}|\\)\n(?!\s*$)/,dq=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,il=/[\p{P}\p{S}]/u,Lh=/[\s\p{P}\p{S}]/u,vg=/[^\s\p{P}\p{S}]/u,pq=Te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Lh).getRegex(),Y2=/(?!~)[\p{P}\p{S}]/u,hq=/(?!~)[\s\p{P}\p{S}]/u,uq=/(?:[^\s\p{P}\p{S}]|~)/u,mq=Te(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",WL?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Q2=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,fq=Te(Q2,"u").replace(/punct/g,il).getRegex(),gq=Te(Q2,"u").replace(/punct/g,Y2).getRegex(),X2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bq=Te(X2,"gu").replace(/notPunctSpace/g,vg).replace(/punctSpace/g,Lh).replace(/punct/g,il).getRegex(),vq=Te(X2,"gu").replace(/notPunctSpace/g,uq).replace(/punctSpace/g,hq).replace(/punct/g,Y2).getRegex(),yq=Te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vg).replace(/punctSpace/g,Lh).replace(/punct/g,il).getRegex(),xq=Te(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,il).getRegex(),wq="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",zq=Te(wq,"gu").replace(/notPunctSpace/g,vg).replace(/punctSpace/g,Lh).replace(/punct/g,il).getRegex(),_q=Te(/\\(punct)/,"gu").replace(/punct/g,il).getRegex(),kq=Te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cq=Te(gg).replace("(?:-->|$)","-->").getRegex(),Sq=Te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Cq).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Th=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Eq=Te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Th).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J2=Te(/^!?\[(label)\]\[(ref)\]/).replace("label",Th).replace("ref",fg).getRegex(),Z2=Te(/^!?\[(ref)\](?:\[\])?/).replace("ref",fg).getRegex(),Tq=Te("reflink|nolink(?!\\()","g").replace("reflink",J2).replace("nolink",Z2).getRegex(),O2=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yg={_backpedal:Ua,anyPunctuation:_q,autolink:kq,blockSkip:mq,br:K2,code:cq,del:Ua,delLDelim:Ua,delRDelim:Ua,emStrongLDelim:fq,emStrongRDelimAst:bq,emStrongRDelimUnd:yq,escape:lq,link:Eq,nolink:Z2,punctuation:pq,reflink:J2,reflinkSearch:Tq,tag:Sq,text:dq,url:Ua},$q={...yg,link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",Th).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Th).getRegex()},cg={...yg,emStrongRDelimAst:vq,emStrongLDelim:gq,delLDelim:xq,delRDelim:zq,url:Te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",O2).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Te(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",O2).getRegex()},Aq={...cg,br:Te(K2).replace("{2,}","*").getRegex(),text:Te(cg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sh={normal:bg,gfm:aq,pedantic:sq},Fc={normal:yg,gfm:cg,breaks:Aq,pedantic:$q},Mq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P2=o=>Mq[o];function Pn(o,i){if(i){if(Dr.escapeTest.test(o))return o.replace(Dr.escapeReplace,P2)}else if(Dr.escapeTestNoEncode.test(o))return o.replace(Dr.escapeReplaceNoEncode,P2);return o}function H2(o){try{o=encodeURI(o).replace(Dr.percentDecode,"%")}catch{return null}return o}function F2(o,i){let t=o.replace(Dr.findPipe,(a,s,l)=>{let p=!1,h=s;for(;--h>=0&&l[h]==="\\";)p=!p;return p?"|":" |"}),r=t.split(Dr.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),i)if(r.length>i)r.splice(i);else for(;r.length<i;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(Dr.slashPipe,"|");return r}function ta(o,i,t){let r=o.length;if(r===0)return"";let n=0;for(;n<r;){let a=o.charAt(r-n-1);if(a===i&&!t)n++;else if(a!==i&&t)n++;else break}return o.slice(0,r-n)}function B2(o){let i=o.split(`
4650
4650
  `),t=i.length-1;for(;t>=0&&Dr.blankLine.test(i[t]);)t--;return i.length-t<=2?o:i.slice(0,t+1).join(`
4651
4651
  `)}function Lq(o,i){if(o.indexOf(i[1])===-1)return-1;let t=0;for(let r=0;r<o.length;r++)if(o[r]==="\\")r++;else if(o[r]===i[0])t++;else if(o[r]===i[1]&&(t--,t<0))return r;return t>0?-2:-1}function qq(o,i=0){let t=i,r="";for(let n of o)if(n===" "){let a=4-t%4;r+=" ".repeat(a),t+=a}else r+=n,t++;return r}function V2(o,i,t,r,n){let a=i.href,s=i.title||null,l=o[1].replace(n.other.outputLinkReplace,"$1");r.state.inLink=!0;let p={type:o[0].charAt(0)==="!"?"image":"link",raw:t,href:a,title:s,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,p}function Iq(o,i,t){let r=o.match(t.other.indentCodeCompensation);if(r===null)return i;let n=r[1];return i.split(`
4652
4652
  `).map(a=>{let s=a.match(t.other.beginningSpace);if(s===null)return a;let[l]=s;return l.length>=n.length?a.slice(n.length):a}).join(`
4653
- `)}var $h=class{constructor(o){V(this,"options");V(this,"rules");V(this,"lexer");this.options=o||ja}space(o){let i=this.rules.block.newline.exec(o);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(o){let i=this.rules.block.code.exec(o);if(i){let t=this.options.pedantic?i[0]:B2(i[0]),r=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:r}}}fences(o){let i=this.rules.block.fences.exec(o);if(i){let t=i[0],r=Iq(t,i[3]||"",this.rules);return{type:"code",raw:t,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:r}}}heading(o){let i=this.rules.block.heading.exec(o);if(i){let t=i[2].trim();if(this.rules.other.endingHash.test(t)){let r=ta(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:ta(i[0],`
4653
+ `)}var $h=class{constructor(o){V(this,"options");V(this,"rules");V(this,"lexer");this.options=o||Ga}space(o){let i=this.rules.block.newline.exec(o);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(o){let i=this.rules.block.code.exec(o);if(i){let t=this.options.pedantic?i[0]:B2(i[0]),r=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:r}}}fences(o){let i=this.rules.block.fences.exec(o);if(i){let t=i[0],r=Iq(t,i[3]||"",this.rules);return{type:"code",raw:t,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:r}}}heading(o){let i=this.rules.block.heading.exec(o);if(i){let t=i[2].trim();if(this.rules.other.endingHash.test(t)){let r=ta(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:ta(i[0],`
4654
4654
  `),depth:i[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(o){let i=this.rules.block.hr.exec(o);if(i)return{type:"hr",raw:ta(i[0],`
4655
4655
  `)}}blockquote(o){let i=this.rules.block.blockquote.exec(o);if(i){let t=ta(i[0],`
4656
4656
  `).split(`
@@ -4675,7 +4675,7 @@ ${m}`:m;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
4675
4675
  `):[],a={type:"table",raw:ta(i[0],`
4676
4676
  `),header:[],align:[],rows:[]};if(t.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<t.length;s++)a.header.push({text:t[s],tokens:this.lexer.inline(t[s]),header:!0,align:a.align[s]});for(let s of n)a.rows.push(F2(s,a.header.length).map((l,p)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[p]})));return a}}lheading(o){let i=this.rules.block.lheading.exec(o);if(i){let t=i[1].trim();return{type:"heading",raw:ta(i[0],`
4677
4677
  `),depth:i[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(o){let i=this.rules.block.paragraph.exec(o);if(i){let t=i[1].charAt(i[1].length-1)===`
4678
- `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:t,tokens:this.lexer.inline(t)}}}text(o){let i=this.rules.block.text.exec(o);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(o){let i=this.rules.inline.escape.exec(o);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(o){let i=this.rules.inline.tag.exec(o);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(o){let i=this.rules.inline.link.exec(o);if(i){let t=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let a=ta(t.slice(0,-1),"\\");if((t.length-a.length)%2===0)return}else{let a=Lq(i[2],"()");if(a===-2)return;if(a>-1){let s=(i[0].indexOf("!")===0?5:4)+i[1].length+a;i[2]=i[2].substring(0,a),i[0]=i[0].substring(0,s).trim(),i[3]=""}}let r=i[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],n=a[3])}else n=i[3]?i[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),V2(i,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(o,i){let t;if((t=this.rules.inline.reflink.exec(o))||(t=this.rules.inline.nolink.exec(o))){let r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=i[r.toLowerCase()];if(!n){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return V2(t,n,t[0],this.lexer,this.rules)}}emStrong(o,i,t=""){let r=this.rules.inline.emStrongLDelim.exec(o);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...r[0]].length-1,a,s,l=n,p=0,h=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,i=i.slice(-1*o.length+n);(r=h.exec(i))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){l+=s;continue}else if((r[5]||r[6])&&n%3&&!((n+s)%3)){p+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+p);let m=[...r[0]][0].length,f=o.slice(0,n+r.index+m+s);if(Math.min(n,s)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let b=f.slice(2,-2);return{type:"strong",raw:f,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(o){let i=this.rules.inline.code.exec(o);if(i){let t=i[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:i[0],text:t}}}br(o){let i=this.rules.inline.br.exec(o);if(i)return{type:"br",raw:i[0]}}del(o,i,t=""){let r=this.rules.inline.delLDelim.exec(o);if(r&&(!r[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...r[0]].length-1,a,s,l=n,p=this.rules.inline.delRDelim;for(p.lastIndex=0,i=i.slice(-1*o.length+n);(r=p.exec(i))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==n))continue;if(r[3]||r[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let h=[...r[0]][0].length,m=o.slice(0,n+r.index+h+s),f=m.slice(n,-n);return{type:"del",raw:m,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(o){let i=this.rules.inline.autolink.exec(o);if(i){let t,r;return i[2]==="@"?(t=i[1],r="mailto:"+t):(t=i[1],r=t),{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(o){let i;if(i=this.rules.inline.url.exec(o)){let t,r;if(i[2]==="@")t=i[0],r="mailto:"+t;else{let n;do n=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(n!==i[0]);t=i[0],i[1]==="www."?r="http://"+i[0]:r=i[0]}return{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(o){let i=this.rules.inline.text.exec(o);if(i){let t=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:t}}}},gn=class dg{constructor(i){V(this,"tokens");V(this,"options");V(this,"state");V(this,"inlineQueue");V(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||ja,this.options.tokenizer=this.options.tokenizer||new $h,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Dr,block:Sh.normal,inline:Fc.normal};this.options.pedantic?(t.block=Sh.pedantic,t.inline=Fc.pedantic):this.options.gfm&&(t.block=Sh.gfm,this.options.breaks?t.inline=Fc.breaks:t.inline=Fc.gfm),this.tokenizer.rules=t}static get rules(){return{block:Sh,inline:Fc}}static lex(i,t){return new dg(t).lex(i)}static lexInline(i,t){return new dg(t).inlineTokens(i)}lex(i){i=i.replace(Dr.carriageReturn,`
4678
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:t,tokens:this.lexer.inline(t)}}}text(o){let i=this.rules.block.text.exec(o);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(o){let i=this.rules.inline.escape.exec(o);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(o){let i=this.rules.inline.tag.exec(o);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(o){let i=this.rules.inline.link.exec(o);if(i){let t=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let a=ta(t.slice(0,-1),"\\");if((t.length-a.length)%2===0)return}else{let a=Lq(i[2],"()");if(a===-2)return;if(a>-1){let s=(i[0].indexOf("!")===0?5:4)+i[1].length+a;i[2]=i[2].substring(0,a),i[0]=i[0].substring(0,s).trim(),i[3]=""}}let r=i[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],n=a[3])}else n=i[3]?i[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),V2(i,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(o,i){let t;if((t=this.rules.inline.reflink.exec(o))||(t=this.rules.inline.nolink.exec(o))){let r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=i[r.toLowerCase()];if(!n){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return V2(t,n,t[0],this.lexer,this.rules)}}emStrong(o,i,t=""){let r=this.rules.inline.emStrongLDelim.exec(o);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...r[0]].length-1,a,s,l=n,p=0,h=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,i=i.slice(-1*o.length+n);(r=h.exec(i))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){l+=s;continue}else if((r[5]||r[6])&&n%3&&!((n+s)%3)){p+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+p);let m=[...r[0]][0].length,f=o.slice(0,n+r.index+m+s);if(Math.min(n,s)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let b=f.slice(2,-2);return{type:"strong",raw:f,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(o){let i=this.rules.inline.code.exec(o);if(i){let t=i[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:i[0],text:t}}}br(o){let i=this.rules.inline.br.exec(o);if(i)return{type:"br",raw:i[0]}}del(o,i,t=""){let r=this.rules.inline.delLDelim.exec(o);if(r&&(!r[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...r[0]].length-1,a,s,l=n,p=this.rules.inline.delRDelim;for(p.lastIndex=0,i=i.slice(-1*o.length+n);(r=p.exec(i))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==n))continue;if(r[3]||r[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let h=[...r[0]][0].length,m=o.slice(0,n+r.index+h+s),f=m.slice(n,-n);return{type:"del",raw:m,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(o){let i=this.rules.inline.autolink.exec(o);if(i){let t,r;return i[2]==="@"?(t=i[1],r="mailto:"+t):(t=i[1],r=t),{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(o){let i;if(i=this.rules.inline.url.exec(o)){let t,r;if(i[2]==="@")t=i[0],r="mailto:"+t;else{let n;do n=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(n!==i[0]);t=i[0],i[1]==="www."?r="http://"+i[0]:r=i[0]}return{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(o){let i=this.rules.inline.text.exec(o);if(i){let t=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:t}}}},gn=class dg{constructor(i){V(this,"tokens");V(this,"options");V(this,"state");V(this,"inlineQueue");V(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||Ga,this.options.tokenizer=this.options.tokenizer||new $h,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Dr,block:Sh.normal,inline:Fc.normal};this.options.pedantic?(t.block=Sh.pedantic,t.inline=Fc.pedantic):this.options.gfm&&(t.block=Sh.gfm,this.options.breaks?t.inline=Fc.breaks:t.inline=Fc.gfm),this.tokenizer.rules=t}static get rules(){return{block:Sh,inline:Fc}}static lex(i,t){return new dg(t).lex(i)}static lexInline(i,t){return new dg(t).inlineTokens(i)}lex(i){i=i.replace(Dr.carriageReturn,`
4679
4679
  `),this.blockTokens(i,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let r=this.inlineQueue[t];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,t=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(i=i.replace(Dr.tabCharGlobal," ").replace(Dr.spaceLine,""));let n=1/0;for(;i;){if(i.length<n)n=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}let a;if(this.options.extensions?.block?.some(l=>(a=l.call({lexer:this},i,t))?(i=i.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.space(i)){i=i.substring(a.raw.length);let l=t.at(-1);a.raw.length===1&&l!==void 0?l.raw+=`
4680
4680
  `:t.push(a);continue}if(a=this.tokenizer.code(i)){i=i.substring(a.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
4681
4681
  `)?"":`
@@ -4689,7 +4689,7 @@ ${m}`:m;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
4689
4689
  `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a),r=s.length!==i.length,i=i.substring(a.raw.length);continue}if(a=this.tokenizer.text(i)){i=i.substring(a.raw.length);let l=t.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
4690
4690
  `)?"":`
4691
4691
  `)+a.raw,l.text+=`
4692
- `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return this.state.top=!0,t}inline(i,t=[]){return this.inlineQueue.push({src:i,tokens:t}),t}inlineTokens(i,t=[]){this.tokenizer.lexer=this;let r=i;if(this.tokens.links){let l=Object.keys(this.tokens.links);l.length>0&&(r=r.replace(this.tokenizer.rules.inline.reflinkSearch,p=>l.includes(p.slice(p.lastIndexOf("[")+1,-1))?"["+"a".repeat(p.length-2)+"]":p))}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),r=r.replace(this.tokenizer.rules.inline.blockSkip,(l,p,h)=>{let m=h?h.length:0;return l.slice(0,m)+"["+"a".repeat(l.length-m-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let n=!1,a="",s=1/0;for(;i;){if(i.length<s)s=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}n||(a=""),n=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},i,t))?(i=i.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(l.raw.length);let h=t.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(i,r,a)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(i,r,a)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(i)){i=i.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(i))){i=i.substring(l.raw.length),t.push(l);continue}let p=i;if(this.options.extensions?.startInline){let h=1/0,m=i.slice(1),f;this.options.extensions.startInline.forEach(b=>{f=b.call({lexer:this},m),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(p=i.substring(0,h+1))}if(l=this.tokenizer.inlineText(p)){i=i.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),n=!0;let h=t.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):t.push(l);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return t}infiniteLoopError(i){let t="Infinite loop on byte: "+i;if(this.options.silent)console.error(t);else throw new Error(t)}},Ah=class{constructor(o){V(this,"options");V(this,"parser");this.options=o||ja}space(o){return""}code({text:o,lang:i,escaped:t}){let r=(i||"").match(Dr.notSpaceStart)?.[0],n=o.replace(Dr.endingNewline,"")+`
4692
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return this.state.top=!0,t}inline(i,t=[]){return this.inlineQueue.push({src:i,tokens:t}),t}inlineTokens(i,t=[]){this.tokenizer.lexer=this;let r=i;if(this.tokens.links){let l=Object.keys(this.tokens.links);l.length>0&&(r=r.replace(this.tokenizer.rules.inline.reflinkSearch,p=>l.includes(p.slice(p.lastIndexOf("[")+1,-1))?"["+"a".repeat(p.length-2)+"]":p))}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),r=r.replace(this.tokenizer.rules.inline.blockSkip,(l,p,h)=>{let m=h?h.length:0;return l.slice(0,m)+"["+"a".repeat(l.length-m-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let n=!1,a="",s=1/0;for(;i;){if(i.length<s)s=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}n||(a=""),n=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},i,t))?(i=i.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(l.raw.length);let h=t.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(i,r,a)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(i)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(i,r,a)){i=i.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(i)){i=i.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(i))){i=i.substring(l.raw.length),t.push(l);continue}let p=i;if(this.options.extensions?.startInline){let h=1/0,m=i.slice(1),f;this.options.extensions.startInline.forEach(b=>{f=b.call({lexer:this},m),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(p=i.substring(0,h+1))}if(l=this.tokenizer.inlineText(p)){i=i.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),n=!0;let h=t.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):t.push(l);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return t}infiniteLoopError(i){let t="Infinite loop on byte: "+i;if(this.options.silent)console.error(t);else throw new Error(t)}},Ah=class{constructor(o){V(this,"options");V(this,"parser");this.options=o||Ga}space(o){return""}code({text:o,lang:i,escaped:t}){let r=(i||"").match(Dr.notSpaceStart)?.[0],n=o.replace(Dr.endingNewline,"")+`
4693
4693
  `;return r?'<pre><code class="language-'+Pn(r)+'">'+(t?n:Pn(n,!0))+`</code></pre>
4694
4694
  `:"<pre><code>"+(t?n:Pn(n,!0))+`</code></pre>
4695
4695
  `}blockquote({tokens:o}){return`<blockquote>
@@ -4707,8 +4707,8 @@ ${this.parser.parse(o)}</blockquote>
4707
4707
  `}tablerow({text:o}){return`<tr>
4708
4708
  ${o}</tr>
4709
4709
  `}tablecell(o){let i=this.parser.parseInline(o.tokens),t=o.header?"th":"td";return(o.align?`<${t} align="${o.align}">`:`<${t}>`)+i+`</${t}>
4710
- `}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${Pn(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:i,tokens:t}){let r=this.parser.parseInline(t),n=H2(o);if(n===null)return r;o=n;let a='<a href="'+o+'"';return i&&(a+=' title="'+Pn(i)+'"'),a+=">"+r+"</a>",a}image({href:o,title:i,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let n=H2(o);if(n===null)return Pn(t);o=n;let a=`<img src="${o}" alt="${Pn(t)}"`;return i&&(a+=` title="${Pn(i)}"`),a+=">",a}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:Pn(o.text)}},xg=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}checkbox({raw:o}){return o}},bn=class pg{constructor(i){V(this,"options");V(this,"renderer");V(this,"textRenderer");this.options=i||ja,this.options.renderer=this.options.renderer||new Ah,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xg}static parse(i,t){return new pg(t).parse(i)}static parseInline(i,t){return new pg(t).parseInline(i)}parse(i){this.renderer.parser=this;let t="";for(let r=0;r<i.length;r++){let n=i[r];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=l||"";continue}}let a=n;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(i,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<i.length;n++){let a=i[n];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=l||"";continue}}let s=a;switch(s.type){case"escape":{r+=t.text(s);break}case"html":{r+=t.html(s);break}case"link":{r+=t.link(s);break}case"image":{r+=t.image(s);break}case"checkbox":{r+=t.checkbox(s);break}case"strong":{r+=t.strong(s);break}case"em":{r+=t.em(s);break}case"codespan":{r+=t.codespan(s);break}case"br":{r+=t.br(s);break}case"del":{r+=t.del(s);break}case"text":{r+=t.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Eh,Bc=(Eh=class{constructor(o){V(this,"options");V(this,"block");this.options=o||ja}preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(o=this.block){return o?gn.lex:gn.lexInline}provideParser(o=this.block){return o?bn.parse:bn.parseInline}},V(Eh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),V(Eh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Eh),Dq=class{constructor(...o){V(this,"defaults",hg());V(this,"options",this.setOptions);V(this,"parse",this.parseMarkdown(!0));V(this,"parseInline",this.parseMarkdown(!1));V(this,"Parser",bn);V(this,"Renderer",Ah);V(this,"TextRenderer",xg);V(this,"Lexer",gn);V(this,"Tokenizer",$h);V(this,"Hooks",Bc);this.use(...o)}walkTokens(o,i){let t=[];for(let r of o)switch(t=t.concat(i.call(this,r)),r.type){case"table":{let n=r;for(let a of n.header)t=t.concat(this.walkTokens(a.tokens,i));for(let a of n.rows)for(let s of a)t=t.concat(this.walkTokens(s.tokens,i));break}case"list":{let n=r;t=t.concat(this.walkTokens(n.items,i));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let s=n[a].flat(1/0);t=t.concat(this.walkTokens(s,i))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,i)))}}return t}use(...o){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=i.renderers[n.name];a?i.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=i[n.level];a?a.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&(n.level==="block"?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:n.level==="inline"&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),r.extensions=i),t.renderer){let n=this.defaults.renderer||new Ah(this.defaults);for(let a in t.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=t.renderer[s],p=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m||""}}r.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new $h(this.defaults);for(let a in t.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=t.tokenizer[s],p=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m}}r.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Bc;for(let a in t.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=t.hooks[s],p=n[s];Bc.passThroughHooks.has(a)?n[s]=h=>{if(this.defaults.async&&Bc.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(n,h);return p.call(n,f)})();let m=l.call(n,h);return p.call(n,m)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await p.apply(n,h)),f})();let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m}}r.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,a=t.walkTokens;r.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,i){return gn.lex(o,i??this.defaults)}parser(o,i){return bn.parse(o,i??this.defaults)}parseMarkdown(o){return(i,t)=>{let r={...t},n={...this.defaults,...r},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=o),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(i):i,l=await(n.hooks?await n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(s,n),p=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(p,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(p,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(a);try{n.hooks&&(i=n.hooks.preprocess(i));let s=(n.hooks?n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(i,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(o,i){return t=>{if(t.message+=`
4711
- Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+Pn(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}},Ua=new Dq;function Fe(o,i){return Ua.parse(o,i)}Fe.options=Fe.setOptions=function(o){return Ua.setOptions(o),Fe.defaults=Ua.defaults,U2(Fe.defaults),Fe};Fe.getDefaults=hg;Fe.defaults=ja;Fe.use=function(...o){return Ua.use(...o),Fe.defaults=Ua.defaults,U2(Fe.defaults),Fe};Fe.walkTokens=function(o,i){return Ua.walkTokens(o,i)};Fe.parseInline=Ua.parseInline;Fe.Parser=bn;Fe.parser=bn.parse;Fe.Renderer=Ah;Fe.TextRenderer=xg;Fe.Lexer=gn;Fe.lexer=gn.lex;Fe.Tokenizer=$h;Fe.Hooks=Bc;Fe.parse=Fe;var m5e=Fe.options,f5e=Fe.setOptions,g5e=Fe.use,b5e=Fe.walkTokens,v5e=Fe.parseInline;var y5e=bn.parse,x5e=gn.lex;var ek=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.panel{border:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border-radius:var(--zn-border-radius)}.markdown-editor{display:flex;flex-direction:column;gap:var(--zn-spacing-small);width:100%;height:100%;min-height:0}:host([expanded]){position:absolute;top:10px;bottom:10px;left:var(--zn-sp-padding);right:var(--zn-sp-padding);z-index:var(--zn-z-index-editor-action,1000000)}:host([expanded]) .panel,:host([expanded]) .panel__inner,:host([expanded]) .panel__content,:host([expanded]) .panel__body{height:100%;max-height:100%}:host([expanded]) .markdown-editor{height:100%}.markdown-editor__label{font-size:var(--zn-input-label-font-size-medium);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.markdown-editor__toolbar{display:flex;align-items:end;gap:var(--zn-spacing-small);justify-content:flex-end;flex-wrap:wrap}.markdown-editor__markdown-link{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);margin-right:auto;font-size:var(--zn-input-label-font-size-small);line-height:1;color:var(--zn-color-neutral-500,#656d76);text-decoration:none;cursor:pointer;transition:color 0.15s ease;padding-left:var(--zn-spacing-x-small)}.markdown-editor__markdown-link:hover{color:var(--zn-color-primary-600,#0969da)}.markdown-editor__markdown-link span{white-space:nowrap}.markdown-editor__view-toggle{display:inline-flex}.markdown-editor__body{display:flex;flex:1;min-height:0;gap:var(--zn-spacing-medium)}.markdown-editor__editor,.markdown-editor__preview-wrapper{flex:1;min-width:0;min-height:0;display:flex}.markdown-editor__editor[hidden],.markdown-editor__preview-wrapper[hidden]{display:none}.markdown-editor__editor zn-textarea{flex:1;width:100%}.markdown-editor__preview-wrapper{overflow:hidden}.markdown-editor__preview{flex:1;background:var(--zn-color-neutral-0,white);border:1px solid var(--zn-color-neutral-200);border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-large);overflow-y:auto;font-family:inherit;line-height:1.7;color:var(--zn-color-text,#222)}.markdown-editor__preview h1{font-size:1.8em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.3em}.markdown-editor__preview h2{font-size:1.5em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.2em}.markdown-editor__preview h3{font-size:1.25em;margin:0.7em 0 0.3em}.markdown-editor__preview h4,.markdown-editor__preview h5,.markdown-editor__preview h6{font-size:1.1em;margin:0.6em 0 0.3em}.markdown-editor__preview p{margin:0.6em 0}.markdown-editor__preview ul,.markdown-editor__preview ol{margin:0.6em 0;padding-left:2em;display:block}.markdown-editor__preview ul{list-style-type:disc}.markdown-editor__preview ol{list-style-type:decimal}.markdown-editor__preview ul ul{list-style-type:circle}.markdown-editor__preview ul ul ul{list-style-type:square}.markdown-editor__preview li{margin:0.2em 0;display:list-item}.markdown-editor__preview blockquote{border-left:4px solid var(--zn-color-neutral-300);margin:0.8em 0;padding:0.4em 1em;color:var(--zn-color-neutral-600,#555)}.markdown-editor__preview table{border-collapse:collapse;width:100%;margin:0.8em 0}.markdown-editor__preview th,.markdown-editor__preview td{border:1px solid var(--zn-color-neutral-300);padding:0.4em 0.8em;text-align:left}.markdown-editor__preview th{background:var(--zn-color-neutral-100);font-weight:bold}.markdown-editor__preview code{background:var(--zn-color-neutral-100);padding:0.15em 0.4em;border-radius:3px;font-size:0.9em}.markdown-editor__preview pre{background:var(--zn-color-neutral-100);padding:1em;border-radius:4px;overflow-x:auto}.markdown-editor__preview pre code{background:none;padding:0}.markdown-editor__preview hr{border:none;border-top:1px solid var(--zn-color-neutral-300);margin:1.5em 0}.markdown-editor__preview a{color:var(--zn-color-primary-600)}.markdown-editor__help-text{font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-help-text-color)}`;var Rq=[{mode:"editor",icon:"edit_note",label:"Editor"},{mode:"split",icon:"vertical_split",label:"Split"},{mode:"preview",icon:"visibility",label:"Preview"}],dt=class extends at{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-input","zn-change"]});this.markdownSlotController=new Y(this,"label","help-text","actions","footer");this.debounceTimer=null;this.name="";this.value="";this.defaultValue="";this.label="";this.helpText="";this.placeholder="Enter markdown content...";this.rows=20;this.viewMode="editor";this.storageKey="zn-markdown-editor-view-mode";this.required=!1;this.readonly=!1;this.disabled=!1;this.expanded=!1;this.handleInput=()=>{this.value=this.textarea.value,this.emit("zn-input"),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.renderPreview(),150)};this.handleChange=()=>{this.value=this.textarea.value,this.emit("zn-change"),this.renderPreview()};this.handleViewToggle=t=>{let n=t.target.closest("[data-mode]")?.dataset.mode;!n||n===this.viewMode||(this.viewMode=n)};this.handleExpandToggle=()=>{this.expanded=!this.expanded}}get validity(){return this.textarea?.validity}get validationMessage(){return this.textarea?.validationMessage??""}checkValidity(){return this.textarea?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.textarea?.reportValidity()??!0}setCustomValidity(t){this.textarea?.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.textarea?.focus(t)}blur(){this.textarea?.blur()}connectedCallback(){if(super.connectedCallback(),!this.hasAttribute("value")&&!this.value){let r=Array.from(this.childNodes).filter(s=>s.nodeType===Node.TEXT_NODE),a=r.map(s=>s.textContent??"").join("").replace(/\r\n/g,`
4710
+ `}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${Pn(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:i,tokens:t}){let r=this.parser.parseInline(t),n=H2(o);if(n===null)return r;o=n;let a='<a href="'+o+'"';return i&&(a+=' title="'+Pn(i)+'"'),a+=">"+r+"</a>",a}image({href:o,title:i,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let n=H2(o);if(n===null)return Pn(t);o=n;let a=`<img src="${o}" alt="${Pn(t)}"`;return i&&(a+=` title="${Pn(i)}"`),a+=">",a}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:Pn(o.text)}},xg=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}checkbox({raw:o}){return o}},bn=class pg{constructor(i){V(this,"options");V(this,"renderer");V(this,"textRenderer");this.options=i||Ga,this.options.renderer=this.options.renderer||new Ah,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xg}static parse(i,t){return new pg(t).parse(i)}static parseInline(i,t){return new pg(t).parseInline(i)}parse(i){this.renderer.parser=this;let t="";for(let r=0;r<i.length;r++){let n=i[r];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=l||"";continue}}let a=n;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(i,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<i.length;n++){let a=i[n];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=l||"";continue}}let s=a;switch(s.type){case"escape":{r+=t.text(s);break}case"html":{r+=t.html(s);break}case"link":{r+=t.link(s);break}case"image":{r+=t.image(s);break}case"checkbox":{r+=t.checkbox(s);break}case"strong":{r+=t.strong(s);break}case"em":{r+=t.em(s);break}case"codespan":{r+=t.codespan(s);break}case"br":{r+=t.br(s);break}case"del":{r+=t.del(s);break}case"text":{r+=t.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Eh,Bc=(Eh=class{constructor(o){V(this,"options");V(this,"block");this.options=o||Ga}preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(o=this.block){return o?gn.lex:gn.lexInline}provideParser(o=this.block){return o?bn.parse:bn.parseInline}},V(Eh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),V(Eh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Eh),Dq=class{constructor(...o){V(this,"defaults",hg());V(this,"options",this.setOptions);V(this,"parse",this.parseMarkdown(!0));V(this,"parseInline",this.parseMarkdown(!1));V(this,"Parser",bn);V(this,"Renderer",Ah);V(this,"TextRenderer",xg);V(this,"Lexer",gn);V(this,"Tokenizer",$h);V(this,"Hooks",Bc);this.use(...o)}walkTokens(o,i){let t=[];for(let r of o)switch(t=t.concat(i.call(this,r)),r.type){case"table":{let n=r;for(let a of n.header)t=t.concat(this.walkTokens(a.tokens,i));for(let a of n.rows)for(let s of a)t=t.concat(this.walkTokens(s.tokens,i));break}case"list":{let n=r;t=t.concat(this.walkTokens(n.items,i));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let s=n[a].flat(1/0);t=t.concat(this.walkTokens(s,i))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,i)))}}return t}use(...o){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=i.renderers[n.name];a?i.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=i[n.level];a?a.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&(n.level==="block"?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:n.level==="inline"&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),r.extensions=i),t.renderer){let n=this.defaults.renderer||new Ah(this.defaults);for(let a in t.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=t.renderer[s],p=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m||""}}r.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new $h(this.defaults);for(let a in t.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=t.tokenizer[s],p=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m}}r.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Bc;for(let a in t.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=t.hooks[s],p=n[s];Bc.passThroughHooks.has(a)?n[s]=h=>{if(this.defaults.async&&Bc.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(n,h);return p.call(n,f)})();let m=l.call(n,h);return p.call(n,m)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await p.apply(n,h)),f})();let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m}}r.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,a=t.walkTokens;r.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,i){return gn.lex(o,i??this.defaults)}parser(o,i){return bn.parse(o,i??this.defaults)}parseMarkdown(o){return(i,t)=>{let r={...t},n={...this.defaults,...r},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=o),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(i):i,l=await(n.hooks?await n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(s,n),p=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(p,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(p,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(a);try{n.hooks&&(i=n.hooks.preprocess(i));let s=(n.hooks?n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(i,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(o,i){return t=>{if(t.message+=`
4711
+ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+Pn(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}},ja=new Dq;function Fe(o,i){return ja.parse(o,i)}Fe.options=Fe.setOptions=function(o){return ja.setOptions(o),Fe.defaults=ja.defaults,U2(Fe.defaults),Fe};Fe.getDefaults=hg;Fe.defaults=Ga;Fe.use=function(...o){return ja.use(...o),Fe.defaults=ja.defaults,U2(Fe.defaults),Fe};Fe.walkTokens=function(o,i){return ja.walkTokens(o,i)};Fe.parseInline=ja.parseInline;Fe.Parser=bn;Fe.parser=bn.parse;Fe.Renderer=Ah;Fe.TextRenderer=xg;Fe.Lexer=gn;Fe.lexer=gn.lex;Fe.Tokenizer=$h;Fe.Hooks=Bc;Fe.parse=Fe;var m5e=Fe.options,f5e=Fe.setOptions,g5e=Fe.use,b5e=Fe.walkTokens,v5e=Fe.parseInline;var y5e=bn.parse,x5e=gn.lex;var ek=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.panel{border:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border-radius:var(--zn-border-radius)}.markdown-editor{display:flex;flex-direction:column;gap:var(--zn-spacing-small);width:100%;height:100%;min-height:0}:host([expanded]){position:absolute;top:10px;bottom:10px;left:var(--zn-sp-padding);right:var(--zn-sp-padding);z-index:var(--zn-z-index-editor-action,1000000)}:host([expanded]) .panel,:host([expanded]) .panel__inner,:host([expanded]) .panel__content,:host([expanded]) .panel__body{height:100%;max-height:100%}:host([expanded]) .markdown-editor{height:100%}.markdown-editor__label{font-size:var(--zn-input-label-font-size-medium);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.markdown-editor__toolbar{display:flex;align-items:end;gap:var(--zn-spacing-small);justify-content:flex-end;flex-wrap:wrap}.markdown-editor__markdown-link{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);margin-right:auto;font-size:var(--zn-input-label-font-size-small);line-height:1;color:var(--zn-color-neutral-500,#656d76);text-decoration:none;cursor:pointer;transition:color 0.15s ease;padding-left:var(--zn-spacing-x-small)}.markdown-editor__markdown-link:hover{color:var(--zn-color-primary-600,#0969da)}.markdown-editor__markdown-link span{white-space:nowrap}.markdown-editor__view-toggle{display:inline-flex}.markdown-editor__body{display:flex;flex:1;min-height:0;gap:var(--zn-spacing-medium)}.markdown-editor__editor,.markdown-editor__preview-wrapper{flex:1;min-width:0;min-height:0;display:flex}.markdown-editor__editor[hidden],.markdown-editor__preview-wrapper[hidden]{display:none}.markdown-editor__editor zn-textarea{flex:1;width:100%}.markdown-editor__preview-wrapper{overflow:hidden}.markdown-editor__preview{flex:1;background:var(--zn-color-neutral-0,white);border:1px solid var(--zn-color-neutral-200);border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-large);overflow-y:auto;font-family:inherit;line-height:1.7;color:var(--zn-color-text,#222)}.markdown-editor__preview h1{font-size:1.8em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.3em}.markdown-editor__preview h2{font-size:1.5em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.2em}.markdown-editor__preview h3{font-size:1.25em;margin:0.7em 0 0.3em}.markdown-editor__preview h4,.markdown-editor__preview h5,.markdown-editor__preview h6{font-size:1.1em;margin:0.6em 0 0.3em}.markdown-editor__preview p{margin:0.6em 0}.markdown-editor__preview ul,.markdown-editor__preview ol{margin:0.6em 0;padding-left:2em;display:block}.markdown-editor__preview ul{list-style-type:disc}.markdown-editor__preview ol{list-style-type:decimal}.markdown-editor__preview ul ul{list-style-type:circle}.markdown-editor__preview ul ul ul{list-style-type:square}.markdown-editor__preview li{margin:0.2em 0;display:list-item}.markdown-editor__preview blockquote{border-left:4px solid var(--zn-color-neutral-300);margin:0.8em 0;padding:0.4em 1em;color:var(--zn-color-neutral-600,#555)}.markdown-editor__preview table{border-collapse:collapse;width:100%;margin:0.8em 0}.markdown-editor__preview th,.markdown-editor__preview td{border:1px solid var(--zn-color-neutral-300);padding:0.4em 0.8em;text-align:left}.markdown-editor__preview th{background:var(--zn-color-neutral-100);font-weight:bold}.markdown-editor__preview code{background:var(--zn-color-neutral-100);padding:0.15em 0.4em;border-radius:3px;font-size:0.9em}.markdown-editor__preview pre{background:var(--zn-color-neutral-100);padding:1em;border-radius:4px;overflow-x:auto}.markdown-editor__preview pre code{background:none;padding:0}.markdown-editor__preview hr{border:none;border-top:1px solid var(--zn-color-neutral-300);margin:1.5em 0}.markdown-editor__preview a{color:var(--zn-color-primary-600)}.markdown-editor__help-text{font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-help-text-color)}`;var Rq=[{mode:"editor",icon:"edit_note",label:"Editor"},{mode:"split",icon:"vertical_split",label:"Split"},{mode:"preview",icon:"visibility",label:"Preview"}],dt=class extends at{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-input","zn-change"]});this.markdownSlotController=new Y(this,"label","help-text","actions","footer");this.debounceTimer=null;this.name="";this.value="";this.defaultValue="";this.label="";this.helpText="";this.placeholder="Enter markdown content...";this.rows=20;this.viewMode="editor";this.storageKey="zn-markdown-editor-view-mode";this.required=!1;this.readonly=!1;this.disabled=!1;this.expanded=!1;this.handleInput=()=>{this.value=this.textarea.value,this.emit("zn-input"),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.renderPreview(),150)};this.handleChange=()=>{this.value=this.textarea.value,this.emit("zn-change"),this.renderPreview()};this.handleViewToggle=t=>{let n=t.target.closest("[data-mode]")?.dataset.mode;!n||n===this.viewMode||(this.viewMode=n)};this.handleExpandToggle=()=>{this.expanded=!this.expanded}}get validity(){return this.textarea?.validity}get validationMessage(){return this.textarea?.validationMessage??""}checkValidity(){return this.textarea?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.textarea?.reportValidity()??!0}setCustomValidity(t){this.textarea?.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.textarea?.focus(t)}blur(){this.textarea?.blur()}connectedCallback(){if(super.connectedCallback(),!this.hasAttribute("value")&&!this.value){let r=Array.from(this.childNodes).filter(s=>s.nodeType===Node.TEXT_NODE),a=r.map(s=>s.textContent??"").join("").replace(/\r\n/g,`
4712
4712
  `).trim();a.length>0&&(this.value=a,this.defaultValue=a,r.forEach(s=>{(s.textContent??"").trim().length>0&&s.parentNode?.removeChild(s)}))}let t=this.readStoredViewMode();t&&(this.viewMode=t),this.addEventListener("toggle",this.handleExpandToggle)}disconnectedCallback(){super.disconnectedCallback(),this.debounceTimer&&clearTimeout(this.debounceTimer),this.removeEventListener("toggle",this.handleExpandToggle)}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity(),this.viewMode!=="editor"&&this.renderPreview()}readStoredViewMode(){if(!this.storageKey)return null;try{let t=localStorage.getItem(this.storageKey);if(t==="editor"||t==="split"||t==="preview")return t}catch{}return null}writeStoredViewMode(t){if(this.storageKey)try{localStorage.setItem(this.storageKey,t)}catch{}}renderPreview(){if(this.viewMode==="editor"||!this.previewEl)return;let t=Fe.parse(this.value||"",{async:!1});this.previewEl.innerHTML=typeof t=="string"?t:""}async handleViewModeChange(){await this.updateComplete,this.writeStoredViewMode(this.viewMode),this.renderPreview(),this.dispatchEvent(new CustomEvent("zn-view-mode-change",{bubbles:!0,composed:!0,detail:{mode:this.viewMode}}))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.renderPreview()}handleMarkedReady(){this.renderPreview()}render(){let t=this.markdownSlotController.test("label"),r=this.markdownSlotController.test("help-text"),n=this.markdownSlotController.test("actions"),a=this.markdownSlotController.test("footer"),s=!!this.label||t,l=!!this.helpText||r,p=!!this.caption||n,h=this.viewMode==="editor"||this.viewMode==="split",m=this.viewMode==="preview"||this.viewMode==="split";return u`
4713
4713
  <div part="base" class=${M({panel:!0,"panel--flush":this.flush||this.tabbed,"panel--flush-x":this.flushX,"panel--flush-y":this.flushY,"panel--flush-footer":this.flushFooter,"panel--tabbed":this.tabbed,"panel--transparent":this.transparent,"panel--has-actions":n,"panel--has-footer":a,"panel--has-header":p,"panel--cosmic":this.cosmic,"panel--shadow":this.shadow})}>
4714
4714
 
@@ -4841,7 +4841,7 @@ endif::[]`,caretOffset:9},{key:"inline-formatting",label:"Strong",icon:"bold@lu"
4841
4841
  `)}</div>`}parseCalloutBlock(i){let[,t,r]=i.match(/^<([^>]+)> (.*)$/)??[];return this.index++,`<li class="callout" data-marker="${t}">${this.inline(r)}</li>`}parseId(i){let t=i.slice(2,-2);this.index++;let r=[];for(;this.index<this.lines.length;)r.push(this.lines[this.index]??""),this.index++;return`<div id="${t}"><p>${this.inline(r.join(`
4842
4842
  `))}</p></div>`}parseUnorderedList(){let i=[];for(;this.index<this.lines.length&&/^((\*|-){1,10}) /.test(this.lines[this.index]??"");)i.push((this.lines[this.index]??"").replace(/^((\*|-){1,10}) /,"")),this.index++;return`<ul>${i.map(t=>`<li><p>${this.inline(t)}</p></li>`).join(`
4843
4843
  `)}</ul>`}parseOrderedList(){let i=[];for(;this.index<this.lines.length&&/^((\d*\.)+) /.test(this.lines[this.index]??"");)i.push((this.lines[this.index]??"").replace(/^((\d*\.)+) /,"")),this.index++;let t=r=>{if(r>=i.length)return"";let n=t(r+1);return`<ol><li><p>${this.inline(i[r])}</p>${n?`
4844
- ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for(;this.index<this.lines.length&&this.lines[this.index]!=="|===";){let y=this.lines[this.index]??"";y===""?(n.length&&r.push(n),n=[]):y.startsWith("|")&&n.push(...y.replace(/^\|/,"").split(/\s+\|/).map(S=>this.inline(S.trim())).filter(Boolean)),this.index++}n.length&&r.push(n),this.index<this.lines.length&&this.index++;let a=r[0]??[],s=r.slice(1),l=Fq(t),p=["remarkd-table"];Ga(t,"striped",!1)&&p.push("remarkd-table--striped"),l&&(p.push("pros-cons-table"),Ga(t,"background-colour",!0)&&Ga(t,"background-color",!0)&&p.push("pros-cons-table--background"),Ga(t,"text-colour",!0)&&Ga(t,"text-color",!0)&&p.push("pros-cons-table--text-color"),Ga(t,"header-icons",!0)&&p.push("pros-cons-table--header-icons"));let h=y=>y===0?"pros-cons-cell--con":"pros-cons-cell--pro",m=y=>l?` class="pros-cons-cell ${h(y)}"`:"",f=(y,S)=>{let T=l&&Ga(t,"header-icons",!0)?`${Bq(t,S)} ${y}`:y;return`<th${m(S)}>${T}</th>`},b=(y,S)=>`<td${m(S)}>${y}</td>`,g=`<table class="${p.join(" ")}"><thead><tr>${a.map(f).join("")}</tr></thead><tbody>${s.map(y=>`<tr>${y.map(b).join("")}</tr>`).join("")}</tbody></table>`;return i?`<div class="${l?"table-block pros-cons-block":"table-block"}"><div class="title">${i}</div>${g}</div>`:g}parseTabs(){let i=[];for(;this.index<this.lines.length&&(this.lines[this.index]??"").startsWith("_|_#");){let n=this.lines[this.index]??"",[,a,s]=n.match(/^_\|_#([\w-]+)\s*(.*)$/)??[];this.index++;let l=[];for(;this.index<this.lines.length&&!(this.lines[this.index]??"").startsWith("_|_#");)l.push(this.lines[this.index]??""),this.index++;i.push({id:a,name:nl(s).named.name||Uc(a),content:_g(l.join(`
4844
+ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for(;this.index<this.lines.length&&this.lines[this.index]!=="|===";){let y=this.lines[this.index]??"";y===""?(n.length&&r.push(n),n=[]):y.startsWith("|")&&n.push(...y.replace(/^\|/,"").split(/\s+\|/).map(S=>this.inline(S.trim())).filter(Boolean)),this.index++}n.length&&r.push(n),this.index<this.lines.length&&this.index++;let a=r[0]??[],s=r.slice(1),l=Fq(t),p=["remarkd-table"];Wa(t,"striped",!1)&&p.push("remarkd-table--striped"),l&&(p.push("pros-cons-table"),Wa(t,"background-colour",!0)&&Wa(t,"background-color",!0)&&p.push("pros-cons-table--background"),Wa(t,"text-colour",!0)&&Wa(t,"text-color",!0)&&p.push("pros-cons-table--text-color"),Wa(t,"header-icons",!0)&&p.push("pros-cons-table--header-icons"));let h=y=>y===0?"pros-cons-cell--con":"pros-cons-cell--pro",m=y=>l?` class="pros-cons-cell ${h(y)}"`:"",f=(y,S)=>{let T=l&&Wa(t,"header-icons",!0)?`${Bq(t,S)} ${y}`:y;return`<th${m(S)}>${T}</th>`},b=(y,S)=>`<td${m(S)}>${y}</td>`,g=`<table class="${p.join(" ")}"><thead><tr>${a.map(f).join("")}</tr></thead><tbody>${s.map(y=>`<tr>${y.map(b).join("")}</tr>`).join("")}</tbody></table>`;return i?`<div class="${l?"table-block pros-cons-block":"table-block"}"><div class="title">${i}</div>${g}</div>`:g}parseTabs(){let i=[];for(;this.index<this.lines.length&&(this.lines[this.index]??"").startsWith("_|_#");){let n=this.lines[this.index]??"",[,a,s]=n.match(/^_\|_#([\w-]+)\s*(.*)$/)??[];this.index++;let l=[];for(;this.index<this.lines.length&&!(this.lines[this.index]??"").startsWith("_|_#");)l.push(this.lines[this.index]??""),this.index++;i.push({id:a,name:nl(s).named.name||Uc(a),content:_g(l.join(`
4845
4845
  `),this)})}let t=i.map((n,a)=>`<li><a href="#" data-tab-focus-key="${n.id}"${a===0?' class="active"':""}>${n.name}</a></li>`).join(""),r=i.map(n=>`<div class="tab" data-tab-key="${n.id}"><div class="content">${n.content}</div></div>`).join(`
4846
4846
  `);return`<div class="tab-group"><ul class="tab-header">${t}</ul><div class="tabs">${r}</div></div>`}parseAccordion(){let i=[];for(;this.index<this.lines.length&&(this.lines[this.index]??"").startsWith("_-_#");){let t=this.lines[this.index]??"",[,r,n]=t.match(/^_-_#([\w-]+)\s*(.*)$/)??[];this.index++;let a=[];for(;this.index<this.lines.length&&!(this.lines[this.index]??"").startsWith("_-_#");)a.push(this.lines[this.index]??""),this.index++;i.push({name:nl(n).named.name||Uc(r),content:_g(a.join(`
4847
4847
  `),this)})}return`<div class="accordion-container">${i.map(t=>`<button class="accordion">${t.name}</button><div class="panel">${t.content}</div>`).join(`
@@ -4850,7 +4850,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
4850
4850
  `)}</div></div>`}inline(i){let t=i,r=[],n=a=>{let s=`RMDPASS${r.length}`;return r.push(a),s};return t=t.replace(/\bpass:\[([^\]]*)]/gs,(a,s)=>n(s)).replace(/\+\+\+(.+?)\+\+\+/gs,(a,s)=>n(s)),t=t.replace(/{{([^}: ]+)(?::([^ }]+))?([^}]*)}}/g,(a,s,l="",p="")=>this.renderObject(s,l,nl(p))),t=t.replace(/"`([^`]+)`"/g,"&ldquo;$1&rdquo;"),t=t.replace(/``([^`]+)``/g,(a,s)=>`<span class="monospace">${jc(s)}</span>`),t=t.replace(/`([^`\n]+)`/g,(a,s)=>`<span class="monospace">${jc(s)}</span>`),t=t.replace(/___(.+?)___/g,"<u>$1</u>"),t=t.replace(/\(c\)|\(C\)/g,"\xA9").replace(/\(r\)|\(R\)/g,"\xAE").replace(/\(tm\)|\(TM\)/g,"\u2122").replace(/\(p\)|\(P\)/g,"\xA7").replace(/\(\+-\)/g,"\xB1").replace(/-\.-/g,"&#8226;"),t=t.replace(/:(\S+):/g,(a,s)=>Vq[s.replaceAll("-","_")]||a),t=t.replace(/kbd:\[([^\]]+)]/g,"<kbd>$1</kbd>"),t=t.replace(/[^#&]#([^#]+)#/g,'<mark class="highlight">$1</mark>'),t=t.replace(/{(.*?)}\((.*?)\)/g,'<span class="tooltip" title="$2">$1</span>'),t=t.replace(/!\[([^\]]*)]\((.*?)\s*"([^"]+)"\s*\)/g,(a,s,l,p)=>`<img src="${n(l)}" alt="${n(s)}" title="${n(p)}"/>`),t=t.replace(/!\[([^\]]*)]\(([^)]*)\)/g,(a,s,l)=>s?`<img src="${n(l)}" alt="${n(s)}"/>`:`<img src="${n(l)}"/>`),t=t.replace(/image::([^\[]+)\[([^\]]*)]/g,(a,s,l)=>{let[p,h,m]=l.split(",").map(f=>f.trim());return`<img class="block" src="${n(s)}"${p?` alt="${n(p)}"`:""}${h?` width="${h}"`:""}${m?` height="${m}"`:""}/>`}),t=t.replace(/\[([^\]]*)]\(([^)]*)\)/g,(a,s,l)=>`<a href="${n(l)}">${s}</a>`),t=t.replace(/([^="(])((?:http|ftp|https|mailto):\/\/[\w_-]+(?:(?:\.[\w_-]+)+)[\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])(?:\[([^\]\n]+)])?/g,(a,s,l,p)=>`${s}<a href="${n(l)}">${p||n(l)}</a>`),t=t.replace(/<<([\w\-_]+)(,([^>]+))?>>/g,(a,s,l,p)=>`<a href="#${s.replace(/^_/,"").replace(/_/g,"-")}">${p||Uc(s)}</a>`),t=t.replace(/footnote:\[([^\]]+)]/g,'<sup class="footnote">$1</sup>'),t=t.replace(/\*\*([^*]+?)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__([^_]+?)__/g,"<em>$1</em>"),t=t.replace(/([^\\w])\*([^*]+)\*/g,"$1<strong>$2</strong>"),t=t.replace(/(\s|^)_([^_]+)_/g,"$1<em>$2</em>"),t=t.replace(/~~(.+?)~~/g,"<del>$1</del>"),t=t.replace(/~([^~]+?)~/g,"<sub>$1</sub>"),t=t.replace(/\^([^^]+?)\^/g,"<sup>$1</sup>"),t=t.replace(/\[( |x|_|\*)]/g,(a,s)=>s===" "?'<input type="checkbox" readonly="readonly">':s==="x"?'<input type="checkbox" readonly="readonly" checked>':s==="_"?'<input type="checkbox">':'<input type="checkbox" checked>'),t=t.replace(/(\[[^\]]+])##([^#]+)##/g,(a,s,l)=>`<span class="${nl(s).pos[0]}">${l}</span>`),t=t.replace(/<(\d+|\d+\.\d+)>/g,'<i class="conum" data-value="$1"></i>'),r.reduce((a,s,l)=>a.replaceAll(`RMDPASS${l}`,s),t)}renderObject(i,t,r){switch(i){case"link":{let n=r.named.text||Uc(t),a=r.named.target?` target="${r.named.target}"`:"",s=r.named.hreflang?` hreflang="${r.named.hreflang}"`:"";return`<a href="${r.named.href||t}"${a}${s}>${n}</a>`}case"button":{let n=r.named.text||Uc(t),a=r.named.color||"gray",s=r.named.target?` target="${r.named.target}"`:"";return`<a href="${r.named.href||`#${t}`}" class="btn btn--${a}"${s}>${n}</a>`}case"br":return"<br>";case"anchor":return r.named.name?`<a name="${r.named.name}"></a>`:"[ANCHOR MISSING NAME]";case"meter":{let n=r.named.id||"remarkd-meter-150";return`${r.named.label?`<label for="${n}" class="remarkd-meter-label">${r.named.label}</label>`:""}<meter id="${n}" class="remarkd-meter" min="${r.named.min||"0"}" max="${r.named.max||"100"}" value="${r.named.value||"0"}"">${r.named.text||""}</meter>`}case"video":{let n=r.named.aspect==="4:3"?"75":r.named.aspect==="1:1"?"100":r.named.aspect==="3:2"?"66.66":r.named.aspect==="8:5"?"62.5":"56.25";if(r.named.source==="self")return`<div class="video-container" style="padding-top: ${n}%"><video controls><source src="${t}" type="${r.named.type||"video/mp4"}"></video></div>`;let a=["rel=0"];return r.named.end&&a.unshift(`end=${r.named.end}`),r.named.start&&a.unshift(`start=${r.named.start}`),`<div class="video-container" style="padding-top: ${n}%"><iframe src="https://www.youtube.com/embed/${t}?${a.join(";")}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`}case"ref":{let n={num:this.references.length+1,code:r.named.code||`${this.references.length+1}RM`,content:r.named.content||""};return this.references.push(n),`<sup class="reference"><a id="rmdref-bdy-${n.code}" href="#rmdref-ft-${n.code}">[${n.num}]</a></sup>`}case"reflist":return this.references.length?`<ol class="reference">${this.references.map(n=>`<li id="rmdref-ft-${n.code}"><a href="#rmdref-bdy-${n.code}" class="reference-tobody">^</a> ${this.inline(n.content)}</li>`).join("")}</ol>`:"";case"img":{let n=`display: ${r.named.display||"inline-block"};max-width: ${r.named["max-width"]||"100%"};`;r.named.float&&(n+=`float: ${r.named.float};`);let a=r.pos.filter(s=>s.startsWith(".")).map(s=>s.slice(1));return`<img src="${r.named.src||""}"${r.named.alt?` alt="${r.named.alt}"`:""} style="${n}"${a.length?` class="${a.join(" ")}"`:""} />`}default:return""}}replaceAttrs(i){for(let[t,r]of Object.entries(this.attrs))i=i.replaceAll(`{${t}}`,String(r));return i}addDocumentAttr(i){let t=i.match(/^:(!?[\w.-]+)(!)?:(.*)?$/);t&&(this.attrs[t[1]]=t[3]?.trim()||!t[2])}parseConditional(i){let t=i.match(/^(end)?if(def|ndef|eval|nempty|empty|true|false)?::([^\[]*)\[([^]*)]$/);if(!t)return{handled:!1};if(this.index++,t[1]==="end")return this.conditions.pop(),{handled:!0};let n=!this.conditions.includes(!1)&&this.validateCondition(t[2]||"def",t[3],t[4]);return t[2]!=="eval"&&t[4]?{handled:!0,inline:n?t[4]:void 0}:(this.conditions.push(n),{handled:!0})}validateCondition(i,t,r){return i==="eval"?jq(r):t.split(",").some(a=>a.split("+").every(s=>{let l=this.attrs[s];return i==="def"?l!==void 0:i==="ndef"?l===void 0:i==="true"?l===!0||l==="true"||l==="1":i==="false"?l===!1||l==="false"||l==="0":i==="empty"?l===void 0||l==="":i==="nempty"?l!==void 0&&l!=="":!1}))}isBlockStart(i){return i==="```"||i==="____"||i==="|==="||/^[-=*.!]{4,10}$/.test(i)||/^#{1,6} /.test(i)||/^={2,6} /.test(i)||i.trim()==="<<<"||/^((\d*\.)+) /.test(i)||/^((\*|-){1,10}) /.test(i)||/^(end)?if(def|ndef|eval|nempty|empty|true|false)?::/.test(i)||/^!![\w-]+!!$/.test(i)||/^include::[^\[]+\[.*]\s*$/.test(i)||i.startsWith("_|_#")||i.startsWith("_-_#")||i.startsWith("_|- ")||/^[^:]+:: .+/.test(i)||/^(SUCCESS|WARNING|CAUTION|NOTE|NOTICE|IMPORTANT|DANGER|TIP)([:|)])/.test(i)||/^<(\d+|\d+\.\d+|\w|[^>])> /.test(i)||/^-{3}$/.test(i.trim())}};function ok(o){let i=[];for(let t of o.replace(/\r\n?/g,`
4851
4851
  `).replace(/\n$/,"").split(`
4852
4852
  `)){let r=t.replace(/{!(.*)!}/g,"$1");i.length&&i[i.length-1].endsWith("\\")?i[i.length-1]=i[i.length-1].replace(/[\\ ]+$/,"")+`
4853
- `+r:i.push(r)}return i}function _g(o,i){let t=new ik(o,!1,i.options);return t.attrs=i.attrs,t.parse().replace(/^<div class="remarkd-section section--level0 section--with-content">/,"").replace(/<\/div>$/,"")}function ak(o,i,t=0){if(t>10)return o;let r=[];for(let n of o){let a=n.match(/^t::partial::(.*)$/);if(!a){r.push(n);continue}let[s,l]=Oq(a[1]??""),p=sk(i,s);if(p===null){r.push(`File not found: ${s}`);continue}let h=ok(p);for(Pq(l,"strip-title")&&(h[0]??"").startsWith("=")&&(h=h.slice(1));h.length&&h[h.length-1].trim()==="";)h.pop();let m=Number.parseInt(l["drop-last"]??"0",10);m>0&&h.splice(-m),r.push(...ak(h,i,t+1))}return r}function Oq(o){let i=o.trim(),t={},r=i.match(/^(.*?)\[([^\]]*)]$/);if(r){i=r[1].trim();for(let n of r[2].split(",")){let a=n.trim();if(!a)continue;let s=a.indexOf("=");s===-1?t[a]="true":t[a.slice(0,s).trim()]=a.slice(s+1).trim().replace(/^["']|["']$/g,"")}}return[i,t]}function Pq(o,i){return i in o?!["0","false","no"].includes(o[i].toLowerCase()):!1}function sk(o,i){if(o.partials&&Object.prototype.hasOwnProperty.call(o.partials,i))return o.partials[i];let t=globalThis.process,r=t?.getBuiltinModule?.("node:fs");if(!r?.existsSync||!r?.readFileSync)return null;let n=Hq(o.projectRoot||t?.cwd?.()||"",i);return r.existsSync(n)?r.readFileSync(n,"utf8"):null}function Hq(o,i){return/^(\/|[A-Za-z]:[\\/])/.test(i)||!o?i:`${o.replace(/[\\/]+$/,"")}/${i.replace(/^[\\/]+/,"")}`}function nl(o){let i=o.trim().replace(/^\[/,"").replace(/]$/,""),t=[],r={},n=/(^|[\s,]+)([^, =}]+)(=(("([^"]*)")|([^\s,}]*)))?/g,a;for(;a=n.exec(i);){let s=a[2],l=a[6]||a[7]||"";t.push(s),r[s]=l}return{raw:i,pos:t,named:r}}function Fq(o){return!!o&&(o.pos[0]==="pros-cons"||o.pos[0]==="proscons"||"pros-cons"in o.named||"proscons"in o.named)}function Ga(o,i,t){return!o||!(i in o.named)?t:!["0","false","no","off"].includes((o.named[i]||"").toLowerCase())}function Bq(o,i){let t=i===0?o?.named["con-icon"]||"\u274C":o?.named["pro-icon"]||"\u2705";return`<span class="pros-cons-icon">${jc(t)}</span>`}var Vq={"+1":"\u{1F44D}",thumbsup:"\u{1F44D}","-1":"\u{1F44E}",thumbsdown:"\u{1F44E}",eyes:"\u{1F440}",grinning:"\u{1F600}",grin:"\u{1F601}",joy:"\u{1F602}",smiley:"\u{1F603}",smile:"\u{1F604}",sweat_smile:"\u{1F605}",satisfied:"\u{1F606}",laughing:"\u{1F606}",innocent:"\u{1F607}",smiling_imp:"\u{1F608}",wink:"\u{1F609}",blush:"\u{1F60A}",yum:"\u{1F60B}",relieved:"\u{1F60C}",heart_eyes:"\u{1F60D}",sunglasses:"\u{1F60E}",smirk:"\u{1F60F}",neutral_face:"\u{1F610}",expressionless:"\u{1F611}",unamused:"\u{1F612}",sweat:"\u{1F613}",pensive:"\u{1F614}",confused:"\u{1F615}",confounded:"\u{1F616}",kissing:"\u{1F617}",kissing_heart:"\u{1F618}",kissing_smiling_eyes:"\u{1F619}",kissing_closed_eyes:"\u{1F61A}",stuck_out_tongue:"\u{1F61B}",stuck_out_tongue_winking_eye:"\u{1F61C}",stuck_out_tongue_closed_eyes:"\u{1F61D}",disappointed:"\u{1F61E}",worried:"\u{1F61F}",angry:"\u{1F620}",rage:"\u{1F621}",cry:"\u{1F622}",persevere:"\u{1F623}",triumph:"\u{1F624}",disappointed_relieved:"\u{1F625}",frowning:"\u{1F626}",anguished:"\u{1F627}",fearful:"\u{1F628}",weary:"\u{1F629}",sleepy:"\u{1F62A}",tired_face:"\u{1F62B}"};function Uc(o){return o.replace(/[-_]+/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function Uq(o){return o.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function jq(o){let i=o.trim().match(/^(.+?)\s*(===|==|!=|<=|<|>=|>|in|nin)\s*(.+)$/);if(!i)return!1;let t=i[1].trim(),r=i[2],n=i[3].trim();switch(r){case"===":return t===n;case"==":return t==n;case"!=":return t!=n;case"<=":return t<=n;case"<":return t<n;case">=":return t>=n;case">":return t>n;case"in":return n.split(",").map(a=>a.trim()).includes(t);case"nin":return!n.split(",").map(a=>a.trim()).includes(t);default:return!1}}function jc(o){return o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var qh=class{constructor(i,t){this.visibleCount=1/0;this.resizeRafId=0;this.host=i,this.options=t,i.addController(this),new ht(i,{callback:()=>{this.resizeRafId||(this.resizeRafId=requestAnimationFrame(()=>{this.resizeRafId=0,this.measure()}))}})}hostUpdated(){this.measure()}measure(){let i=this.options.groups(),t=this.options.container();if(!i.length||!t)return;let r=getComputedStyle(t),n=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=[...t.children].filter(m=>!m.classList.contains("toolbar__group")).reduce((m,f)=>m+f.getBoundingClientRect().width,0),s=t.clientWidth-n-a;if(s<=0)return;i.forEach(m=>m.style.display="");let l=i.map(m=>m.getBoundingClientRect().width),h=l.reduce((m,f)=>m+f,0)<=s?i.length:this.countThatFit(l,s-(this.options.reserve??44));i.forEach((m,f)=>m.style.display=f<h?"":"none"),h!==this.visibleCount&&(this.visibleCount=h,this.host.requestUpdate())}countThatFit(i,t){let r=0,n=0;for(let a of i){if(r+a>t)break;r+=a,n++}return n}};var lk=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.remarkd-rendered{--rmd-accent:#2367c8;--rmd-border:#d9dee7;--rmd-muted:#5f6d80;--rmd-soft:#eef5ff;--rmd-code-bg:#0f1626;--rmd-code-text:#f5f8ff;color:#18202f;font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;word-wrap:break-word}.remarkd-rendered>.remarkd-section>:first-child,.remarkd-rendered>:first-child{margin-top:0}.remarkd-rendered p{margin:0 0 12px}.remarkd-rendered h1,.remarkd-rendered h2,.remarkd-rendered h3,.remarkd-rendered h4{line-height:1.2;margin:18px 0 10px}.remarkd-rendered h1{font-size:26px}.remarkd-rendered h2{font-size:21px}.remarkd-rendered h3{font-size:17px}.remarkd-rendered a{color:var(--rmd-accent)}.remarkd-rendered .btn{align-items:center;background:#f4f6f8;border:1px solid #cfd6df;border-radius:6px;color:#263241;cursor:pointer;display:inline-flex;font-weight:600;gap:6px;justify-content:center;line-height:1.2;margin:2px 4px 2px 0;min-height:36px;padding:8px 14px;text-align:center;text-decoration:none;transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease,color 160ms ease;vertical-align:middle}.remarkd-rendered .btn:hover,.remarkd-rendered .btn:focus{background:#e9edf2;border-color:#b9c3cf;color:#182230;text-decoration:none}.remarkd-rendered .btn:focus{box-shadow:0 0 0 3px rgba(35,103,200,0.22);outline:none}.remarkd-rendered .btn--primary{background:#2367c8;border-color:#2367c8;color:#fff}.remarkd-rendered .btn--primary:hover,.remarkd-rendered .btn--primary:focus{background:#1d58ad;border-color:#1d58ad;color:#fff}.remarkd-rendered .btn--secondary{background:#263241;border-color:#263241;color:#fff}.remarkd-rendered .btn--secondary:hover,.remarkd-rendered .btn--secondary:focus{background:#1a2430;border-color:#1a2430;color:#fff}.remarkd-rendered .btn--success{background:#177245;border-color:#177245;color:#fff}.remarkd-rendered .btn--success:hover,.remarkd-rendered .btn--success:focus{background:#105d37;border-color:#105d37;color:#fff}.remarkd-rendered .btn--danger{background:#b42318;border-color:#b42318;color:#fff}.remarkd-rendered .btn--danger:hover,.remarkd-rendered .btn--danger:focus{background:#971b12;border-color:#971b12;color:#fff}.remarkd-rendered .monospace,.remarkd-rendered kbd{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.9em}.remarkd-rendered .monospace{background:#eef2f7;border-radius:4px;padding:1px 5px}.remarkd-rendered kbd{background:#f6f8fb;border:1px solid var(--rmd-border);border-bottom-width:2px;border-radius:5px;padding:1px 6px}.remarkd-rendered mark.highlight{background:#fff3bf;border-radius:3px;padding:0 3px}.remarkd-rendered .tooltip{border-bottom:1px dotted var(--rmd-muted);cursor:help}.remarkd-rendered sup.footnote,.remarkd-rendered sup.reference{color:var(--rmd-accent);font-size:0.75em}.remarkd-rendered ul,.remarkd-rendered ol{margin:0 0 12px;padding-left:24px}.remarkd-rendered li>p{margin:0 0 4px}.remarkd-rendered input[type=checkbox]{margin-right:4px;vertical-align:middle}.remarkd-rendered dl{margin:0 0 12px}.remarkd-rendered dt{font-weight:700}.remarkd-rendered dd{margin:0 0 8px 18px;color:var(--rmd-muted)}.remarkd-rendered blockquote{margin:0 0 12px;padding:4px 16px;border-left:4px solid var(--rmd-border);color:var(--rmd-muted)}.remarkd-rendered .hint-note{margin:0 0 12px;padding:12px 14px;border-left:4px solid var(--rmd-accent);background:var(--rmd-soft);border-radius:0 6px 6px 0}.remarkd-rendered .hint-caption{color:var(--rmd-accent)}.remarkd-rendered .hint-tip,.remarkd-rendered .hint-warning,.remarkd-rendered .hint-important,.remarkd-rendered .hint-caution,.remarkd-rendered .hint-danger,.remarkd-rendered .hint-success,.remarkd-rendered .hint-notice{margin:0 0 12px;padding:12px 14px;border-left:4px solid var(--rmd-accent);background:#f6f8fb;border-radius:0 6px 6px 0}.remarkd-rendered .hint-tip,.remarkd-rendered .hint-success{border-left-color:#1f9d57;background:#eafaf1}.remarkd-rendered .hint-tip .hint-caption,.remarkd-rendered .hint-success .hint-caption{color:#1f7a47}.remarkd-rendered .hint-warning,.remarkd-rendered .hint-caution{border-left-color:#b7791f;background:#fdf6e3}.remarkd-rendered .hint-warning .hint-caption,.remarkd-rendered .hint-caution .hint-caption{color:#8a5a07}.remarkd-rendered .hint-danger{border-left-color:#c0392b;background:#fdecea}.remarkd-rendered .hint-danger .hint-caption{color:#a02b1f}.remarkd-rendered .verse-block{margin:0 0 12px;padding:12px 14px;background:#f6f8fb;border-radius:6px;font-family:inherit;white-space:pre-wrap}.remarkd-rendered code{display:block;margin:0 0 12px;padding:14px 16px;border-radius:8px;background:var(--rmd-code-bg);color:var(--rmd-code-text);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.5;white-space:pre;overflow-x:auto}.remarkd-rendered .listing-block{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px;overflow:hidden}.remarkd-rendered .listing-block .content{padding:14px 16px;background:#f6f8fb;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;white-space:pre-wrap}.remarkd-rendered .callout{list-style:none;margin:0 0 6px;padding-left:28px;position:relative;color:var(--rmd-muted)}.remarkd-rendered .callout::before{content:attr(data-marker);position:absolute;left:0;top:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--rmd-accent);color:#fff;font-size:12px;font-weight:700}.remarkd-rendered .example-block,.remarkd-rendered .sidebar-block{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px}.remarkd-rendered .example-block .content,.remarkd-rendered .sidebar-block .content{padding:14px 16px}.remarkd-rendered .sidebar-block{background:#f6f8fb}.remarkd-rendered .title{display:block;font-weight:700;color:var(--rmd-muted);margin-bottom:6px}.remarkd-rendered .accordion-container{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px;overflow:hidden}.remarkd-rendered button.accordion{display:block;width:100%;text-align:left;padding:11px 14px;border:0;border-top:1px solid var(--rmd-border);background:#f6f8fb;font:inherit;font-weight:650;cursor:pointer}.remarkd-rendered button.accordion:first-child{border-top:0}.remarkd-rendered .accordion-container .panel{padding:12px 14px}.remarkd-rendered .tab-group{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px;overflow:hidden}.remarkd-rendered .tab-header{display:flex;flex-wrap:wrap;gap:4px;margin:0;padding:6px 6px 0;list-style:none;background:#f6f8fb;border-bottom:1px solid var(--rmd-border)}.remarkd-rendered .tab-header a{display:block;padding:7px 12px;border-radius:6px 6px 0 0;text-decoration:none;color:var(--rmd-muted);font-weight:650}.remarkd-rendered .tab-header a.active{background:#fff;color:var(--rmd-accent)}.remarkd-rendered .tabs .tab{padding:14px}.remarkd-rendered .tabs .tab+.tab{border-top:1px dashed var(--rmd-border)}.remarkd-rendered .steps-container{margin:0 0 12px;counter-reset:rmd-step}.remarkd-rendered .step{display:flex;gap:14px;padding:12px 0;border-top:1px solid var(--rmd-border)}.remarkd-rendered .step:first-child{border-top:0}.remarkd-rendered .step-content{flex:1}.remarkd-rendered .step-content h3{margin:0 0 6px;counter-increment:rmd-step}.remarkd-rendered .step-content h3::before{content:counter(rmd-step) ". ";color:var(--rmd-accent)}.remarkd-rendered .step-image img{max-width:120px;border-radius:6px}.remarkd-rendered .table-block{margin:0 0 12px}.remarkd-rendered .remarkd-table{border-collapse:collapse;width:100%}.remarkd-rendered .remarkd-table th,.remarkd-rendered .remarkd-table td{border:1px solid var(--rmd-border);padding:8px 10px;text-align:left}.remarkd-rendered .remarkd-table th{background:#eef2f7}.remarkd-rendered .remarkd-table--striped tbody tr:nth-child(even) td{background:#f8fafc}.remarkd-rendered .pros-cons-table th{background:#2367a6;color:#fff;font-size:1rem}.remarkd-rendered .pros-cons-table{table-layout:fixed}.remarkd-rendered .pros-cons-table .pros-cons-cell{width:50%}.remarkd-rendered .pros-cons-table--background .pros-cons-cell--con{background:#fae9e7}.remarkd-rendered .pros-cons-table--background .pros-cons-cell--pro{background:#e8f4ec}.remarkd-rendered .pros-cons-table--background.remarkd-table--striped tbody tr:nth-child(even) .pros-cons-cell--con{background:#f5d8d5}.remarkd-rendered .pros-cons-table--background.remarkd-table--striped tbody tr:nth-child(even) .pros-cons-cell--pro{background:#d4eadb}.remarkd-rendered .pros-cons-table--text-color .pros-cons-cell--con{color:#a62b25}.remarkd-rendered .pros-cons-table--text-color .pros-cons-cell--pro{color:#155d30}.remarkd-rendered .pros-cons-table .pros-cons-icon{display:inline-block;margin-right:8px}.remarkd-rendered img{max-width:100%}.remarkd-rendered img.block{display:block;margin:0 0 12px}.remarkd-rendered .align-center{text-align:center}.remarkd-rendered .align-right{text-align:right}.remarkd-rendered .align-center img.block{margin-left:auto;margin-right:auto}.remarkd-rendered .align-right img.block{margin-left:auto}.remarkd-rendered .video-container{position:relative;width:100%;margin:0 0 12px;background:#000;border-radius:8px;overflow:hidden}.remarkd-rendered .video-container iframe,.remarkd-rendered .video-container video{position:absolute;inset:0;width:100%;height:100%;border:0}.remarkd-rendered ol.reference{font-size:0.9em;color:var(--rmd-muted)}.remarkd-rendered .reference-tobody{text-decoration:none;margin-right:4px}.remarkd-rendered .remarkd-meter-label{display:block;font-size:0.85em;color:var(--rmd-muted)}.remarkd-rendered .remarkd-meter{width:180px;max-width:100%}.remarkd-rendered hr{border:0;border-top:1px solid var(--rmd-border);margin:18px 0}:host{display:block;overflow:hidden}.remarkd-editor{position:relative;display:flex;flex-direction:column;max-height:var(--remarkd-editor-max-height,100dvh);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.remarkd-editor__toolbar{display:flex;flex:none;gap:2px;flex-wrap:nowrap;padding:var(--zn-spacing-x-small);border-bottom:1px solid rgb(var(--zn-border-color))}.toolbar__group{display:flex;flex-shrink:0;gap:2px;align-items:center}.toolbar__group+.toolbar__group::before{content:"";align-self:stretch;margin-inline:4px;border-left:1px solid rgb(var(--zn-border-color))}.remarkd-editor__toolbar-more zn-menu{--zn-menu-max-height:var(--auto-size-available-height,60dvh)}.remarkd-editor__body{padding:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-large) 52px;min-height:10rem;overflow-y:auto}.remarkd-editor__body--raw{display:flex;padding-left:var(--zn-spacing-large)}.remarkd-editor__raw-toggle{margin-left:auto}.remarkd-editor__raw{flex:1;min-height:10rem;resize:vertical;border:0;background:transparent;color:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.875rem;line-height:1.5;padding:0;outline:none}.remarkd-editor--disabled{opacity:0.6;pointer-events:none}.remarkd-editor__block{position:relative;border-radius:var(--zn-border-radius)}.remarkd-editor__actions{position:absolute;left:-40px;top:4px;display:flex;flex-direction:column;align-items:center;gap:2px;opacity:0;transition:opacity 0.15s ease}.remarkd-editor__block:hover .remarkd-editor__actions,.remarkd-editor__actions:focus-within{opacity:1}.remarkd-editor__delete{position:absolute;top:2px;right:2px;z-index:5;opacity:0;transition:opacity 0.15s ease}.remarkd-editor__block:hover .remarkd-editor__delete,.remarkd-editor__delete:focus-within{opacity:1}.remarkd-editor__drag-handle{display:inline-flex;align-items:center;padding:2px;color:var(--zn-color-neutral-400,#9aa4b2);cursor:grab;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.remarkd-editor__drag-handle:active{cursor:grabbing}.remarkd-editor__ghost{position:fixed;top:0;left:0;z-index:20;pointer-events:none;opacity:0.9;background:var(--zn-color-neutral-0,white);border-radius:var(--zn-border-radius);box-shadow:0 8px 24px rgba(0,0,0,0.15);max-width:50%;max-height:160px;overflow:hidden}.remarkd-editor__block--dragging{opacity:0.4}.remarkd-editor__block--drop-before::before,.remarkd-editor__block--drop-after::after{content:"";position:absolute;left:0;right:0;height:6px;border-radius:3px;background:rgba(var(--zn-primary),0.6);pointer-events:none}.remarkd-editor__block--drop-before::before{top:-4px}.remarkd-editor__block--drop-after::after{bottom:-4px}.remarkd-editor__rendered{padding:var(--zn-spacing-x-small);border-radius:var(--zn-border-radius);cursor:text}.remarkd-editor__rendered:hover{background:var(--zn-color-neutral-100)}.remarkd-editor__edit-shell{border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white);padding:var(--zn-spacing-x-small)}.remarkd-editor__edit-shell:focus-within{border-top-color:rgb(var(--zn-primary));border-right-color:rgb(var(--zn-primary));border-bottom-color:rgb(var(--zn-primary))}.remarkd-editor__edit-shell:not([class*=hint-]):focus-within{border-left-color:rgb(var(--zn-primary))}.remarkd-editor__input{display:block;width:100%;resize:none;overflow:hidden;border:0;background:transparent;color:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.875rem;line-height:1.5;padding:0;outline:none}.remarkd-editor__edit-shell[class*=hint-] .remarkd-editor__input{font:inherit}.remarkd-editor__edit-shell--h1 .remarkd-editor__input,.remarkd-editor__edit-shell--h2 .remarkd-editor__input,.remarkd-editor__edit-shell--h3 .remarkd-editor__input{font-family:inherit;font-weight:700;line-height:1.2}.remarkd-editor__edit-shell--h1 .remarkd-editor__input{font-size:26px}.remarkd-editor__edit-shell--h2 .remarkd-editor__input{font-size:21px}.remarkd-editor__edit-shell--h3 .remarkd-editor__input{font-size:17px}.remarkd-editor__edit-shell--code{background:var(--rmd-code-bg,#0f1626)}.remarkd-editor__edit-shell--code .remarkd-editor__input{color:var(--rmd-code-text,#f5f8ff)}.remarkd-editor__include{display:flex;align-items:center;gap:var(--zn-spacing-small);padding:var(--zn-spacing-small);border:1px dashed rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white)}.remarkd-editor__include-title{font-weight:600}.remarkd-editor__include-meta{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__include--missing{border-style:solid;border-color:rgb(var(--zn-color-error))}.remarkd-editor__include-scope{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__include-link{margin-left:auto;font-size:var(--zn-font-size-small)}.remarkd-editor__conditional{border-left:3px solid rgba(var(--zn-primary),0.5);padding-left:var(--zn-spacing-small)}.remarkd-editor__conditional-label{display:inline-flex;align-items:center;gap:4px;margin-bottom:var(--zn-spacing-x-small);color:rgb(var(--zn-primary));font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em}.remarkd-editor__meta{display:flex;flex-wrap:wrap;gap:var(--zn-spacing-x-small)}.remarkd-editor__variable{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);padding:2px var(--zn-spacing-x-small);border:1px dashed rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);font-size:0.875rem}.remarkd-editor__variable-name{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.remarkd-editor__variable-state{color:rgb(var(--zn-text-body));font-style:italic}.remarkd-editor__var{padding:0 2px;border-radius:3px;background:rgba(var(--zn-primary),0.12);color:rgb(var(--zn-primary));font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.remarkd-editor__include-picker{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white)}.remarkd-editor__include-picker-head{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}.remarkd-editor__include-filter{flex:1 1 auto}.remarkd-editor__include-option{display:flex;justify-content:space-between;gap:var(--zn-spacing-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-small);border:0;border-radius:var(--zn-border-radius);background:none;cursor:pointer;text-align:left}.remarkd-editor__include-option:hover:not(:disabled){background:var(--zn-color-neutral-100)}.remarkd-editor__include-option:disabled{cursor:default;opacity:0.6}.remarkd-editor__include-option-meta,.remarkd-editor__include-picker-empty{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__image-controls{display:flex;flex-direction:column;gap:var(--zn-spacing-small);border:1px solid rgb(var(--zn-primary));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white);padding:var(--zn-spacing-small)}.remarkd-editor__image-controls-preview{text-align:left}.remarkd-editor__image-controls-preview--center{text-align:center}.remarkd-editor__image-controls-preview--right{text-align:right}.remarkd-editor__image-controls-preview img{max-width:100%;max-height:240px}.remarkd-editor__image-row{display:flex;align-items:flex-end;gap:var(--zn-spacing-small);flex-wrap:wrap}.remarkd-editor__image-field{display:flex;flex-direction:column;gap:2px}.remarkd-editor__image-field span{font-size:var(--zn-input-label-font-size-small);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.remarkd-editor__image-field input{border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white);color:inherit;font:inherit;font-size:0.875rem;padding:4px 8px;outline:none}.remarkd-editor__image-field input:focus{border-color:rgb(var(--zn-primary))}.remarkd-editor__image-field:first-child input{width:100%}.remarkd-editor__image-buttons{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}.remarkd-editor__image-buttons-spacer{margin-left:auto}.remarkd-editor__image-picker{display:flex;align-items:flex-start;gap:var(--zn-spacing-x-small);margin:var(--zn-spacing-x-small) 0}.remarkd-editor__image-picker zn-file{flex:1}.remarkd-editor__add{padding:var(--zn-spacing-x-small);min-height:1.8em;color:var(--zn-color-neutral-400,#9aa4b2);cursor:text}.remarkd-editor__edit-wrap{position:relative}.remarkd-editor__validation{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;border:0;padding:0}.remarkd-editor__link-picker{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);margin-top:var(--zn-spacing-x-small);padding:var(--zn-spacing-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white)}.remarkd-editor__link-picker-head{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}.remarkd-editor__link-filter{flex:1 1 auto}.remarkd-editor__link-option{display:flex;justify-content:space-between;gap:var(--zn-spacing-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-small);border:0;border-radius:var(--zn-border-radius);background:none;cursor:pointer;text-align:left}.remarkd-editor__link-option:hover{background:var(--zn-color-neutral-100)}.remarkd-editor__link-option-meta,.remarkd-editor__link-picker-empty{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__link--missing{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-color:rgb(var(--zn-color-error))}`;var ck=/^include::([^[]+)\[(.*)]\s*$/,hk="kb:(?:document|category|page)\\/[A-Za-z0-9_-]+",Gq=new RegExp(`^${hk}$`),Wq=new RegExp(hk,"g"),Kq=/^:([A-Za-z0-9_-]+)(!)?:\s*(.*)$/,Yq=/^\.([^.\s].*)$/,Qq=/^\[.+]$/;function Xq(o){let i=Kq.exec(o);if(i)return{kind:"attribute",name:i[1],value:i[3],unset:!!i[2]};let t=Yq.exec(o);return t?{kind:"title",text:t[1]}:Qq.test(o)?{kind:"bracket",text:o}:null}function Jq(o){let i=o.split(`
4853
+ `+r:i.push(r)}return i}function _g(o,i){let t=new ik(o,!1,i.options);return t.attrs=i.attrs,t.parse().replace(/^<div class="remarkd-section section--level0 section--with-content">/,"").replace(/<\/div>$/,"")}function ak(o,i,t=0){if(t>10)return o;let r=[];for(let n of o){let a=n.match(/^t::partial::(.*)$/);if(!a){r.push(n);continue}let[s,l]=Oq(a[1]??""),p=sk(i,s);if(p===null){r.push(`File not found: ${s}`);continue}let h=ok(p);for(Pq(l,"strip-title")&&(h[0]??"").startsWith("=")&&(h=h.slice(1));h.length&&h[h.length-1].trim()==="";)h.pop();let m=Number.parseInt(l["drop-last"]??"0",10);m>0&&h.splice(-m),r.push(...ak(h,i,t+1))}return r}function Oq(o){let i=o.trim(),t={},r=i.match(/^(.*?)\[([^\]]*)]$/);if(r){i=r[1].trim();for(let n of r[2].split(",")){let a=n.trim();if(!a)continue;let s=a.indexOf("=");s===-1?t[a]="true":t[a.slice(0,s).trim()]=a.slice(s+1).trim().replace(/^["']|["']$/g,"")}}return[i,t]}function Pq(o,i){return i in o?!["0","false","no"].includes(o[i].toLowerCase()):!1}function sk(o,i){if(o.partials&&Object.prototype.hasOwnProperty.call(o.partials,i))return o.partials[i];let t=globalThis.process,r=t?.getBuiltinModule?.("node:fs");if(!r?.existsSync||!r?.readFileSync)return null;let n=Hq(o.projectRoot||t?.cwd?.()||"",i);return r.existsSync(n)?r.readFileSync(n,"utf8"):null}function Hq(o,i){return/^(\/|[A-Za-z]:[\\/])/.test(i)||!o?i:`${o.replace(/[\\/]+$/,"")}/${i.replace(/^[\\/]+/,"")}`}function nl(o){let i=o.trim().replace(/^\[/,"").replace(/]$/,""),t=[],r={},n=/(^|[\s,]+)([^, =}]+)(=(("([^"]*)")|([^\s,}]*)))?/g,a;for(;a=n.exec(i);){let s=a[2],l=a[6]||a[7]||"";t.push(s),r[s]=l}return{raw:i,pos:t,named:r}}function Fq(o){return!!o&&(o.pos[0]==="pros-cons"||o.pos[0]==="proscons"||"pros-cons"in o.named||"proscons"in o.named)}function Wa(o,i,t){return!o||!(i in o.named)?t:!["0","false","no","off"].includes((o.named[i]||"").toLowerCase())}function Bq(o,i){let t=i===0?o?.named["con-icon"]||"\u274C":o?.named["pro-icon"]||"\u2705";return`<span class="pros-cons-icon">${jc(t)}</span>`}var Vq={"+1":"\u{1F44D}",thumbsup:"\u{1F44D}","-1":"\u{1F44E}",thumbsdown:"\u{1F44E}",eyes:"\u{1F440}",grinning:"\u{1F600}",grin:"\u{1F601}",joy:"\u{1F602}",smiley:"\u{1F603}",smile:"\u{1F604}",sweat_smile:"\u{1F605}",satisfied:"\u{1F606}",laughing:"\u{1F606}",innocent:"\u{1F607}",smiling_imp:"\u{1F608}",wink:"\u{1F609}",blush:"\u{1F60A}",yum:"\u{1F60B}",relieved:"\u{1F60C}",heart_eyes:"\u{1F60D}",sunglasses:"\u{1F60E}",smirk:"\u{1F60F}",neutral_face:"\u{1F610}",expressionless:"\u{1F611}",unamused:"\u{1F612}",sweat:"\u{1F613}",pensive:"\u{1F614}",confused:"\u{1F615}",confounded:"\u{1F616}",kissing:"\u{1F617}",kissing_heart:"\u{1F618}",kissing_smiling_eyes:"\u{1F619}",kissing_closed_eyes:"\u{1F61A}",stuck_out_tongue:"\u{1F61B}",stuck_out_tongue_winking_eye:"\u{1F61C}",stuck_out_tongue_closed_eyes:"\u{1F61D}",disappointed:"\u{1F61E}",worried:"\u{1F61F}",angry:"\u{1F620}",rage:"\u{1F621}",cry:"\u{1F622}",persevere:"\u{1F623}",triumph:"\u{1F624}",disappointed_relieved:"\u{1F625}",frowning:"\u{1F626}",anguished:"\u{1F627}",fearful:"\u{1F628}",weary:"\u{1F629}",sleepy:"\u{1F62A}",tired_face:"\u{1F62B}"};function Uc(o){return o.replace(/[-_]+/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function Uq(o){return o.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function jq(o){let i=o.trim().match(/^(.+?)\s*(===|==|!=|<=|<|>=|>|in|nin)\s*(.+)$/);if(!i)return!1;let t=i[1].trim(),r=i[2],n=i[3].trim();switch(r){case"===":return t===n;case"==":return t==n;case"!=":return t!=n;case"<=":return t<=n;case"<":return t<n;case">=":return t>=n;case">":return t>n;case"in":return n.split(",").map(a=>a.trim()).includes(t);case"nin":return!n.split(",").map(a=>a.trim()).includes(t);default:return!1}}function jc(o){return o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var qh=class{constructor(i,t){this.visibleCount=1/0;this.resizeRafId=0;this.host=i,this.options=t,i.addController(this),new ht(i,{callback:()=>{this.resizeRafId||(this.resizeRafId=requestAnimationFrame(()=>{this.resizeRafId=0,this.measure()}))}})}hostUpdated(){this.measure()}measure(){let i=this.options.groups(),t=this.options.container();if(!i.length||!t)return;let r=getComputedStyle(t),n=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=[...t.children].filter(m=>!m.classList.contains("toolbar__group")).reduce((m,f)=>m+f.getBoundingClientRect().width,0),s=t.clientWidth-n-a;if(s<=0)return;i.forEach(m=>m.style.display="");let l=i.map(m=>m.getBoundingClientRect().width),h=l.reduce((m,f)=>m+f,0)<=s?i.length:this.countThatFit(l,s-(this.options.reserve??44));i.forEach((m,f)=>m.style.display=f<h?"":"none"),h!==this.visibleCount&&(this.visibleCount=h,this.host.requestUpdate())}countThatFit(i,t){let r=0,n=0;for(let a of i){if(r+a>t)break;r+=a,n++}return n}};var lk=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.remarkd-rendered{--rmd-accent:#2367c8;--rmd-border:#d9dee7;--rmd-muted:#5f6d80;--rmd-soft:#eef5ff;--rmd-code-bg:#0f1626;--rmd-code-text:#f5f8ff;color:#18202f;font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;word-wrap:break-word}.remarkd-rendered>.remarkd-section>:first-child,.remarkd-rendered>:first-child{margin-top:0}.remarkd-rendered p{margin:0 0 12px}.remarkd-rendered h1,.remarkd-rendered h2,.remarkd-rendered h3,.remarkd-rendered h4{line-height:1.2;margin:18px 0 10px}.remarkd-rendered h1{font-size:26px}.remarkd-rendered h2{font-size:21px}.remarkd-rendered h3{font-size:17px}.remarkd-rendered a{color:var(--rmd-accent)}.remarkd-rendered .btn{align-items:center;background:#f4f6f8;border:1px solid #cfd6df;border-radius:6px;color:#263241;cursor:pointer;display:inline-flex;font-weight:600;gap:6px;justify-content:center;line-height:1.2;margin:2px 4px 2px 0;min-height:36px;padding:8px 14px;text-align:center;text-decoration:none;transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease,color 160ms ease;vertical-align:middle}.remarkd-rendered .btn:hover,.remarkd-rendered .btn:focus{background:#e9edf2;border-color:#b9c3cf;color:#182230;text-decoration:none}.remarkd-rendered .btn:focus{box-shadow:0 0 0 3px rgba(35,103,200,0.22);outline:none}.remarkd-rendered .btn--primary{background:#2367c8;border-color:#2367c8;color:#fff}.remarkd-rendered .btn--primary:hover,.remarkd-rendered .btn--primary:focus{background:#1d58ad;border-color:#1d58ad;color:#fff}.remarkd-rendered .btn--secondary{background:#263241;border-color:#263241;color:#fff}.remarkd-rendered .btn--secondary:hover,.remarkd-rendered .btn--secondary:focus{background:#1a2430;border-color:#1a2430;color:#fff}.remarkd-rendered .btn--success{background:#177245;border-color:#177245;color:#fff}.remarkd-rendered .btn--success:hover,.remarkd-rendered .btn--success:focus{background:#105d37;border-color:#105d37;color:#fff}.remarkd-rendered .btn--danger{background:#b42318;border-color:#b42318;color:#fff}.remarkd-rendered .btn--danger:hover,.remarkd-rendered .btn--danger:focus{background:#971b12;border-color:#971b12;color:#fff}.remarkd-rendered .monospace,.remarkd-rendered kbd{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.9em}.remarkd-rendered .monospace{background:#eef2f7;border-radius:4px;padding:1px 5px}.remarkd-rendered kbd{background:#f6f8fb;border:1px solid var(--rmd-border);border-bottom-width:2px;border-radius:5px;padding:1px 6px}.remarkd-rendered mark.highlight{background:#fff3bf;border-radius:3px;padding:0 3px}.remarkd-rendered .tooltip{border-bottom:1px dotted var(--rmd-muted);cursor:help}.remarkd-rendered sup.footnote,.remarkd-rendered sup.reference{color:var(--rmd-accent);font-size:0.75em}.remarkd-rendered ul,.remarkd-rendered ol{margin:0 0 12px;padding-left:24px}.remarkd-rendered li>p{margin:0 0 4px}.remarkd-rendered input[type=checkbox]{margin-right:4px;vertical-align:middle}.remarkd-rendered dl{margin:0 0 12px}.remarkd-rendered dt{font-weight:700}.remarkd-rendered dd{margin:0 0 8px 18px;color:var(--rmd-muted)}.remarkd-rendered blockquote{margin:0 0 12px;padding:4px 16px;border-left:4px solid var(--rmd-border);color:var(--rmd-muted)}.remarkd-rendered .hint-note{margin:0 0 12px;padding:12px 14px;border-left:4px solid var(--rmd-accent);background:var(--rmd-soft);border-radius:0 6px 6px 0}.remarkd-rendered .hint-caption{color:var(--rmd-accent)}.remarkd-rendered .hint-tip,.remarkd-rendered .hint-warning,.remarkd-rendered .hint-important,.remarkd-rendered .hint-caution,.remarkd-rendered .hint-danger,.remarkd-rendered .hint-success,.remarkd-rendered .hint-notice{margin:0 0 12px;padding:12px 14px;border-left:4px solid var(--rmd-accent);background:#f6f8fb;border-radius:0 6px 6px 0}.remarkd-rendered .hint-tip,.remarkd-rendered .hint-success{border-left-color:#1f9d57;background:#eafaf1}.remarkd-rendered .hint-tip .hint-caption,.remarkd-rendered .hint-success .hint-caption{color:#1f7a47}.remarkd-rendered .hint-warning,.remarkd-rendered .hint-caution{border-left-color:#b7791f;background:#fdf6e3}.remarkd-rendered .hint-warning .hint-caption,.remarkd-rendered .hint-caution .hint-caption{color:#8a5a07}.remarkd-rendered .hint-danger{border-left-color:#c0392b;background:#fdecea}.remarkd-rendered .hint-danger .hint-caption{color:#a02b1f}.remarkd-rendered .verse-block{margin:0 0 12px;padding:12px 14px;background:#f6f8fb;border-radius:6px;font-family:inherit;white-space:pre-wrap}.remarkd-rendered code{display:block;margin:0 0 12px;padding:14px 16px;border-radius:8px;background:var(--rmd-code-bg);color:var(--rmd-code-text);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.5;white-space:pre;overflow-x:auto}.remarkd-rendered .listing-block{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px;overflow:hidden}.remarkd-rendered .listing-block .content{padding:14px 16px;background:#f6f8fb;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;white-space:pre-wrap}.remarkd-rendered .callout{list-style:none;margin:0 0 6px;padding-left:28px;position:relative;color:var(--rmd-muted)}.remarkd-rendered .callout::before{content:attr(data-marker);position:absolute;left:0;top:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--rmd-accent);color:#fff;font-size:12px;font-weight:700}.remarkd-rendered .example-block,.remarkd-rendered .sidebar-block{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px}.remarkd-rendered .example-block .content,.remarkd-rendered .sidebar-block .content{padding:14px 16px}.remarkd-rendered .sidebar-block{background:#f6f8fb}.remarkd-rendered .title{display:block;font-weight:700;color:var(--rmd-muted);margin-bottom:6px}.remarkd-rendered .accordion-container{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px;overflow:hidden}.remarkd-rendered button.accordion{display:block;width:100%;text-align:left;padding:11px 14px;border:0;border-top:1px solid var(--rmd-border);background:#f6f8fb;font:inherit;font-weight:650;cursor:pointer}.remarkd-rendered button.accordion:first-child{border-top:0}.remarkd-rendered .accordion-container .panel{padding:12px 14px}.remarkd-rendered .tab-group{margin:0 0 12px;border:1px solid var(--rmd-border);border-radius:8px;overflow:hidden}.remarkd-rendered .tab-header{display:flex;flex-wrap:wrap;gap:4px;margin:0;padding:6px 6px 0;list-style:none;background:#f6f8fb;border-bottom:1px solid var(--rmd-border)}.remarkd-rendered .tab-header a{display:block;padding:7px 12px;border-radius:6px 6px 0 0;text-decoration:none;color:var(--rmd-muted);font-weight:650}.remarkd-rendered .tab-header a.active{background:#fff;color:var(--rmd-accent)}.remarkd-rendered .tabs .tab{padding:14px}.remarkd-rendered .tabs .tab+.tab{border-top:1px dashed var(--rmd-border)}.remarkd-rendered .steps-container{margin:0 0 12px;counter-reset:rmd-step}.remarkd-rendered .step{display:flex;gap:14px;padding:12px 0;border-top:1px solid var(--rmd-border)}.remarkd-rendered .step:first-child{border-top:0}.remarkd-rendered .step-content{flex:1}.remarkd-rendered .step-content h3{margin:0 0 6px;counter-increment:rmd-step}.remarkd-rendered .step-content h3::before{content:counter(rmd-step) ". ";color:var(--rmd-accent)}.remarkd-rendered .step-image img{max-width:120px;border-radius:6px}.remarkd-rendered .table-block{margin:0 0 12px}.remarkd-rendered .remarkd-table{border-collapse:collapse;width:100%}.remarkd-rendered .remarkd-table th,.remarkd-rendered .remarkd-table td{border:1px solid var(--rmd-border);padding:8px 10px;text-align:left}.remarkd-rendered .remarkd-table th{background:#eef2f7}.remarkd-rendered .remarkd-table--striped tbody tr:nth-child(even) td{background:#f8fafc}.remarkd-rendered .pros-cons-table th{background:#2367a6;color:#fff;font-size:1rem}.remarkd-rendered .pros-cons-table{table-layout:fixed}.remarkd-rendered .pros-cons-table .pros-cons-cell{width:50%}.remarkd-rendered .pros-cons-table--background .pros-cons-cell--con{background:#fae9e7}.remarkd-rendered .pros-cons-table--background .pros-cons-cell--pro{background:#e8f4ec}.remarkd-rendered .pros-cons-table--background.remarkd-table--striped tbody tr:nth-child(even) .pros-cons-cell--con{background:#f5d8d5}.remarkd-rendered .pros-cons-table--background.remarkd-table--striped tbody tr:nth-child(even) .pros-cons-cell--pro{background:#d4eadb}.remarkd-rendered .pros-cons-table--text-color .pros-cons-cell--con{color:#a62b25}.remarkd-rendered .pros-cons-table--text-color .pros-cons-cell--pro{color:#155d30}.remarkd-rendered .pros-cons-table .pros-cons-icon{display:inline-block;margin-right:8px}.remarkd-rendered img{max-width:100%}.remarkd-rendered img.block{display:block;margin:0 0 12px}.remarkd-rendered .align-center{text-align:center}.remarkd-rendered .align-right{text-align:right}.remarkd-rendered .align-center img.block{margin-left:auto;margin-right:auto}.remarkd-rendered .align-right img.block{margin-left:auto}.remarkd-rendered .video-container{position:relative;width:100%;margin:0 0 12px;background:#000;border-radius:8px;overflow:hidden}.remarkd-rendered .video-container iframe,.remarkd-rendered .video-container video{position:absolute;inset:0;width:100%;height:100%;border:0}.remarkd-rendered ol.reference{font-size:0.9em;color:var(--rmd-muted)}.remarkd-rendered .reference-tobody{text-decoration:none;margin-right:4px}.remarkd-rendered .remarkd-meter-label{display:block;font-size:0.85em;color:var(--rmd-muted)}.remarkd-rendered .remarkd-meter{width:180px;max-width:100%}.remarkd-rendered hr{border:0;border-top:1px solid var(--rmd-border);margin:18px 0}:host{display:block;overflow:hidden}.remarkd-editor{position:relative;display:flex;flex-direction:column;max-height:var(--remarkd-editor-max-height,100dvh);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.remarkd-editor__toolbar{display:flex;flex:none;gap:2px;flex-wrap:nowrap;padding:var(--zn-spacing-x-small);border-bottom:1px solid rgb(var(--zn-border-color))}.toolbar__group{display:flex;flex-shrink:0;gap:2px;align-items:center}.toolbar__group+.toolbar__group::before{content:"";align-self:stretch;margin-inline:4px;border-left:1px solid rgb(var(--zn-border-color))}.remarkd-editor__toolbar-more zn-menu{--zn-menu-max-height:var(--auto-size-available-height,60dvh)}.remarkd-editor__body{padding:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-large) 52px;min-height:10rem;overflow-y:auto}.remarkd-editor__body--raw{display:flex;padding-left:var(--zn-spacing-large)}.remarkd-editor__raw-toggle{margin-left:auto}.remarkd-editor__raw{flex:1;min-height:10rem;resize:vertical;border:0;background:transparent;color:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.875rem;line-height:1.5;padding:0;outline:none}.remarkd-editor--disabled{opacity:0.6;pointer-events:none}.remarkd-editor__block{position:relative;border-radius:var(--zn-border-radius)}.remarkd-editor__actions{position:absolute;left:-40px;top:4px;display:flex;flex-direction:column;align-items:center;gap:2px;opacity:0;transition:opacity 0.15s ease}.remarkd-editor__block:hover .remarkd-editor__actions,.remarkd-editor__actions:focus-within{opacity:1}.remarkd-editor__delete{position:absolute;top:2px;right:2px;z-index:5;opacity:0;transition:opacity 0.15s ease}.remarkd-editor__block:hover .remarkd-editor__delete,.remarkd-editor__delete:focus-within{opacity:1}.remarkd-editor__drag-handle{display:inline-flex;align-items:center;padding:2px;color:var(--zn-color-neutral-400,#9aa4b2);cursor:grab;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.remarkd-editor__drag-handle:active{cursor:grabbing}.remarkd-editor__ghost{position:fixed;top:0;left:0;z-index:20;pointer-events:none;opacity:0.9;background:var(--zn-color-neutral-0,white);border-radius:var(--zn-border-radius);box-shadow:0 8px 24px rgba(0,0,0,0.15);max-width:50%;max-height:160px;overflow:hidden}.remarkd-editor__block--dragging{opacity:0.4}.remarkd-editor__block--drop-before::before,.remarkd-editor__block--drop-after::after{content:"";position:absolute;left:0;right:0;height:6px;border-radius:3px;background:rgba(var(--zn-primary),0.6);pointer-events:none}.remarkd-editor__block--drop-before::before{top:-4px}.remarkd-editor__block--drop-after::after{bottom:-4px}.remarkd-editor__rendered{padding:var(--zn-spacing-x-small);border-radius:var(--zn-border-radius);cursor:text}.remarkd-editor__rendered:hover{background:var(--zn-color-neutral-100)}.remarkd-editor__edit-shell{border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white);padding:var(--zn-spacing-x-small)}.remarkd-editor__edit-shell:focus-within{border-top-color:rgb(var(--zn-primary));border-right-color:rgb(var(--zn-primary));border-bottom-color:rgb(var(--zn-primary))}.remarkd-editor__edit-shell:not([class*=hint-]):focus-within{border-left-color:rgb(var(--zn-primary))}.remarkd-editor__input{display:block;width:100%;resize:none;overflow:hidden;border:0;background:transparent;color:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.875rem;line-height:1.5;padding:0;outline:none}.remarkd-editor__edit-shell[class*=hint-] .remarkd-editor__input{font:inherit}.remarkd-editor__edit-shell--h1 .remarkd-editor__input,.remarkd-editor__edit-shell--h2 .remarkd-editor__input,.remarkd-editor__edit-shell--h3 .remarkd-editor__input{font-family:inherit;font-weight:700;line-height:1.2}.remarkd-editor__edit-shell--h1 .remarkd-editor__input{font-size:26px}.remarkd-editor__edit-shell--h2 .remarkd-editor__input{font-size:21px}.remarkd-editor__edit-shell--h3 .remarkd-editor__input{font-size:17px}.remarkd-editor__edit-shell--code{background:var(--rmd-code-bg,#0f1626)}.remarkd-editor__edit-shell--code .remarkd-editor__input{color:var(--rmd-code-text,#f5f8ff)}.remarkd-editor__include{display:flex;align-items:center;gap:var(--zn-spacing-small);padding:var(--zn-spacing-small);border:1px dashed rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white)}.remarkd-editor__include-title{font-weight:600}.remarkd-editor__include-meta{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__include--missing{border-style:solid;border-color:rgb(var(--zn-color-error))}.remarkd-editor__include-scope{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__include-link{margin-left:auto;font-size:var(--zn-font-size-small)}.remarkd-editor__conditional{border-left:3px solid rgba(var(--zn-primary),0.5);padding-left:var(--zn-spacing-small)}.remarkd-editor__conditional-label{display:inline-flex;align-items:center;gap:4px;margin-bottom:var(--zn-spacing-x-small);color:rgb(var(--zn-primary));font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em}.remarkd-editor__meta{display:flex;flex-wrap:wrap;gap:var(--zn-spacing-x-small)}.remarkd-editor__variable{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);padding:2px var(--zn-spacing-x-small);border:1px dashed rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);font-size:0.875rem}.remarkd-editor__variable-name{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.remarkd-editor__variable-state{color:rgb(var(--zn-text-body));font-style:italic}.remarkd-editor__var{padding:0 2px;border-radius:3px;background:rgba(var(--zn-primary),0.12);color:rgb(var(--zn-primary));font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.remarkd-editor__include-picker{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white)}.remarkd-editor__include-picker-head{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}.remarkd-editor__include-filter{flex:1 1 auto}.remarkd-editor__include-option{display:flex;justify-content:space-between;gap:var(--zn-spacing-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-small);border:0;border-radius:var(--zn-border-radius);background:none;cursor:pointer;text-align:left}.remarkd-editor__include-option:hover:not(:disabled){background:var(--zn-color-neutral-100)}.remarkd-editor__include-option:disabled{cursor:default;opacity:0.6}.remarkd-editor__include-option-meta,.remarkd-editor__include-picker-empty{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__image-controls{display:flex;flex-direction:column;gap:var(--zn-spacing-small);border:1px solid rgb(var(--zn-primary));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white);padding:var(--zn-spacing-small)}.remarkd-editor__image-controls-preview{text-align:left}.remarkd-editor__image-controls-preview--center{text-align:center}.remarkd-editor__image-controls-preview--right{text-align:right}.remarkd-editor__image-controls-preview img{max-width:100%;max-height:240px}.remarkd-editor__image-row{display:flex;align-items:flex-end;gap:var(--zn-spacing-small);flex-wrap:wrap}.remarkd-editor__image-field{display:flex;flex-direction:column;gap:2px}.remarkd-editor__image-field span{font-size:var(--zn-input-label-font-size-small);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.remarkd-editor__image-field input{border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white);color:inherit;font:inherit;font-size:0.875rem;padding:4px 8px;outline:none}.remarkd-editor__image-field input:focus{border-color:rgb(var(--zn-primary))}.remarkd-editor__image-field:first-child input{width:100%}.remarkd-editor__image-buttons{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}.remarkd-editor__image-buttons-spacer{margin-left:auto}.remarkd-editor__image-picker{display:flex;align-items:flex-start;gap:var(--zn-spacing-x-small);margin:var(--zn-spacing-x-small) 0}.remarkd-editor__image-picker zn-file{flex:1}.remarkd-editor__add{padding:var(--zn-spacing-x-small);min-height:1.8em;color:var(--zn-color-neutral-400,#9aa4b2);cursor:text}.remarkd-editor__edit-wrap{position:relative}.remarkd-editor__validation{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;border:0;padding:0}.remarkd-editor__link-picker{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);margin-top:var(--zn-spacing-x-small);padding:var(--zn-spacing-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background:var(--zn-color-neutral-0,white)}.remarkd-editor__link-picker-head{display:flex;align-items:center;gap:var(--zn-spacing-x-small)}.remarkd-editor__link-filter{flex:1 1 auto}.remarkd-editor__link-option{display:flex;justify-content:space-between;gap:var(--zn-spacing-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-small);border:0;border-radius:var(--zn-border-radius);background:none;cursor:pointer;text-align:left}.remarkd-editor__link-option:hover{background:var(--zn-color-neutral-100)}.remarkd-editor__link-option-meta,.remarkd-editor__link-picker-empty{color:var(--zn-color-neutral-400,#9aa4b2);font-size:var(--zn-font-size-small)}.remarkd-editor__link--missing{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-color:rgb(var(--zn-color-error))}`;var ck=/^include::([^[]+)\[(.*)]\s*$/,hk="kb:(?:document|category|page)\\/[A-Za-z0-9_-]+",Gq=new RegExp(`^${hk}$`),Wq=new RegExp(hk,"g"),Kq=/^:([A-Za-z0-9_-]+)(!)?:\s*(.*)$/,Yq=/^\.([^.\s].*)$/,Qq=/^\[.+]$/;function Xq(o){let i=Kq.exec(o);if(i)return{kind:"attribute",name:i[1],value:i[3],unset:!!i[2]};let t=Yq.exec(o);return t?{kind:"title",text:t[1]}:Qq.test(o)?{kind:"bracket",text:o}:null}function Jq(o){let i=o.split(`
4854
4854
  `).map(r=>r.trim()).filter(r=>r!=="");if(!i.length)return null;let t=[];for(let r of i){let n=Xq(r);if(!n)return null;t.push(n)}return t}var dk="|===",pk=/^\|={3,}$/,Gc=/^(?:ifdef|ifndef)::[^[]*\[]$/,ol=/^ifeval::\[[^\]]*]$/,uk=/^endif::\[]$/,Zq=/^(ifdef|ifndef|iftrue|iffalse|ifempty|ifnempty)::([^[]+)\[([^\]]+)]\s*$/;function eI(o,i){let t=i.replace(/[\r\n]+/g," ").replace(/\[/g,"(").replace(/]/g,")").trim();return`include::${o}[${t}]`}function tI(o,i){return`[${i.replace(/[\r\n]/g," ").replace(/\[/g,"(").replace(/]/g,")").trim()}](${o})`}var rI=tk(zg),iI=200;function nI(o){let i=o.indexOf("(");if(i===-1||!o.endsWith(")"))return null;let t=o.slice(0,i).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t}\\([^)]*\\)`)}function kg(o){try{return rk(o)}catch{return`<pre class="remarkd-editor__unparsed">${o.replace(/[&<>]/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;"})[i])}</pre>`}}function mk(o,i){let t=1;for(let r=i;r<o.length;r++){let n=o[r].trimEnd();if(Gc.test(n)||ol.test(n))t++;else if(uk.test(n)&&--t===0)return r}return-1}var fk={ifdef:"is defined",ifndef:"is not defined",iftrue:"is true",iffalse:"is false",ifempty:"is empty",ifnempty:"is not empty"};function gk(o){if(ol.test(o))return`shown when ${o.slice(9,-1)}`;let i=o.slice(0,o.indexOf("::"));return`shown when ${o.slice(o.indexOf("::")+2,o.indexOf("["))} ${fk[i]??"is defined"}`}function oI(o,i){return`shown when ${i} ${fk[o]??"is defined"}`}function bk(o){let i=[],t=[],r=()=>{t.length&&i.push({kind:"content",lines:t}),t=[]};for(let n=0;n<o.length;n++){let a=o[n].trimEnd();if(Gc.test(a)||ol.test(a)){r();let s=mk(o,n+1),l=o.slice(n+1,s===-1?void 0:s);i.push({kind:"nested",label:gk(a),parts:bk(l)}),n=s===-1?o.length:s;continue}t.push(o[n])}return r(),i}function aI(o){let i=o.length===1&&o[0].kind==="content"?o[0]:void 0;if(o.length===0||i){let t=i?.lines.join(`
4855
4855
  `).trim()??"";return u`
4856
4856
  <div class="remarkd-editor__conditional-body remarkd-rendered remarkd-editor__rendered--parsed">
@@ -5093,7 +5093,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5093
5093
  <zn-button type="button" icon-button="small" plain icon="x@lu"
5094
5094
  tooltip="Cancel"
5095
5095
  @click=${this.closeImagePicker}></zn-button>
5096
- </div>`}};me.styles=z(lk),me.dependencies={"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":xi,"zn-slash-menu":ka},c([F(".remarkd-editor__validation")],me.prototype,"validationInput",2),c([F("zn-slash-menu")],me.prototype,"slashMenuElement",2),c([R()],me.prototype,"blocks",2),c([R()],me.prototype,"editingIndex",2),c([d({attribute:"slash-recent-key"})],me.prototype,"slashRecentKey",2),c([R()],me.prototype,"hasSlashMenu",2),c([R()],me.prototype,"imagePickerIndex",2),c([R()],me.prototype,"imageEdit",2),c([R()],me.prototype,"dropIndicator",2),c([R()],me.prototype,"dragIndex",2),c([R()],me.prototype,"editShell",2),c([R()],me.prototype,"rawMode",2),c([R()],me.prototype,"includeOptions",2),c([R()],me.prototype,"includeLoadFailed",2),c([R()],me.prototype,"includePickerIndex",2),c([R()],me.prototype,"includeQuery",2),c([R()],me.prototype,"linkPickerOpen",2),c([R()],me.prototype,"linkQuery",2),c([R()],me.prototype,"linkResults",2),c([R()],me.prototype,"linkSearchFailed",2),c([d()],me.prototype,"name",2),c([d()],me.prototype,"value",2),c([Ce()],me.prototype,"defaultValue",2),c([d()],me.prototype,"placeholder",2),c([d({attribute:"attachment-url"})],me.prototype,"attachmentUrl",2),c([d({attribute:"include-url"})],me.prototype,"includeUrl",2),c([d({attribute:"link-url"})],me.prototype,"linkUrl",2),c([d({type:Boolean,attribute:"allow-raw",reflect:!0})],me.prototype,"allowRaw",2),c([d({type:Boolean,reflect:!0})],me.prototype,"required",2),c([d({type:Boolean,reflect:!0})],me.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],me.prototype,"disabled",2),c([K("value")],me.prototype,"handleValueChange",1),c([K("includeUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleIncludeUrlChange",1),c([K("linkUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleLinkUrlChange",1);var lI=me;me.define("zn-remarkd-editor");var cI={},Sg=yt(class extends rr{constructor(){super(...arguments),this.ot=cI}render(o,i){return i()}update(o,[i,t]){if(Array.isArray(i)){if(Array.isArray(this.ot)&&this.ot.length===i.length&&i.every((r,n)=>r===this.ot[n]))return vt}else if(this.ot===i)return vt;return this.ot=Array.isArray(i)?Array.from(i):i,this.render(i,t)}});var dI={eq:"Is Equal To",neq:"Is Not Equal To",gt:"Greater Than",gte:"Greater Than or Equal To",lt:"Less Than",lte:"Less Than or Equal To",is:"Is","is-not":"Is Not",in:"Is One Of","not-in":"Is Not One Of",contains:"Contains","not-contains":"Does Not Contain","starts-with":"Starts With","ends-with":"Ends With",empty:"Is Empty","not-empty":"Is Not Empty",within:"Within the Last",before:"Before the Last",between:"Between",matches:"Matches"};function Eg(o){return o.label??dI[o.value]??o.value}var pI=[];function wk(o){let i=o.data?.conditions;return Array.isArray(i)?i:pI}var vk={id:"in"},Dh={id:"out"},Kc="__new__",al="application/x-zn-flow-type",Ih;function Rh(){return Ih||(Ih=new Image,Ih.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),Ih}var bt=240,ar=60,Tg=bt+80,hI=Tg-bt,uI=40,mI=20,$g=40,fI=40,gI=40,yk=240,bI=20,vI=20,yI=20,xI=240;function Ag(o,i,t,r=!1){let n=o.y+ar,a=n+$g;if(t&&t.y>=n){if(t.y-n>xI)return a;let s=r?n+yI:a,l=Math.round((n+t.y)/2-i/2);return Math.max(s,Math.min(l,t.y-vI-i))}return a+fI}function Nh(o){let i=o.length*7.2,t=Math.max(1,Math.ceil(i/(yk-36)));return{w:Math.min(yk,Math.round(36+i)),h:gI+(t-1)*bI}}var Jt=20;function Rr(o){return Math.round(o/Jt)*Jt}var zk=10,wI=4,zI=20;function Mg(o,i){let t=o.m+i.m;return o.x<i.x+i.w+t&&i.x<o.x+o.w+t&&o.y<i.y+i.h+t&&i.y<o.y+o.h+t}function xk(o,i){return i?bt/2:o.label?Nh(o.label).w/2:mI}function Yc(o,i,t=[]){let r=Zt(o,i(o.type)),n=o.x+bt/2;if(r.length<2)return r.map(()=>n);let a=r.map(m=>t.some(f=>f.source.node===o.id&&f.source.port===m.id)),s=[0];for(let m=1;m<r.length;m++){let f=a[m-1]&&a[m]?hI:uI,b=xk(r[m-1],a[m-1])+xk(r[m],a[m])+f;s.push(s[m-1]+Rr(b))}let l=s.filter((m,f)=>a[f]),p=l.length?l:s,h=(Math.min(...p)+Math.max(...p))/2;return s.map(m=>Math.round(n+m-h))}function Wc(o,i,t,r){let n=[{x:o.x,y:o.y,w:bt,h:ar,m:zk}],a=Zt(o,i(o.type)),s=Yc(o,i,r);return a.forEach((l,p)=>{if(!l.label)return;let h=Nh(l.label),m=r.find(b=>b.source.node===o.id&&b.source.port===l.id),f=m?t.find(b=>b.id===m.target.node):void 0;n.push({x:s[p]-h.w/2,y:Ag(o,h.h,f,a.length===1),w:h.w,h:h.h+zI,m:wI})}),n}function _k(o,i,t,r,n){let a=Wc(o,t,r,n);return Wc(i,t,r,n).some(s=>a.some(l=>Mg(l,s)))}function Oh(o,i,t,r){let n=Wc(o,i,t,r).slice(1);return n.length?t.some(a=>a.id!==o.id&&Wc(a,i,t,r).some(s=>n.some(l=>Mg(l,s)))):!1}function kk(o,i,t,r,n){let a={x:o.x,y:o.y,w:bt,h:ar,m:zk};return Wc(i,t,r,n).some(s=>Mg(a,s))}var Lg=200,qg=120,Ck=120,Sk=80;function Ek(o,i,t,r){return{x:o.x+bt*(t+1)/(r+1),y:o.y+(i==="in"?0:ar)}}function Tk(){return{nodes:[],connections:[],notes:[]}}function Ph(o){return o?o.inputs??[vk]:[vk]}function Ig(o){return o?o.outputs??[Dh]:[Dh]}function ra(o,i){return o.inputs??Ph(i)}function Zt(o,i){return o.outputs??Ig(i)}function Qc(o,i){return ra(o,i)[0]?.id??null}function $k(o,i){let t=new Set,r=n=>{for(let a of o.connections)a.source.node===n&&!t.has(a.target.node)&&(t.add(a.target.node),r(a.target.node))};return r(i),t}function ia(o,i){let t=new Set(o.map(h=>h.id)),r=new Map(o.map(h=>[h.id,[]])),n=new Set;for(let h of i)!t.has(h.source.node)||!t.has(h.target.node)||(r.get(h.source.node).push(h),n.add(h.target.node));let a=new Set,s=new Set,l=new Set,p=h=>{s.add(h),l.add(h);for(let m of r.get(h)??[])l.has(m.target.node)?a.add(m):s.has(m.target.node)||p(m.target.node);l.delete(h)};return o.filter(h=>!n.has(h.id)).forEach(h=>p(h.id)),o.forEach(h=>{s.has(h.id)||p(h.id)}),a}var Ak=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;font-size:0.8125rem}.editor{display:flex;flex-direction:column;gap:14px}.picker{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.picker__head{display:flex;align-items:center;justify-content:space-between;font-weight:600}.picker__back{flex:0 0 auto}.picker__list{display:flex;flex-direction:column}.picker__item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;margin-top:-1px;border:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel));color:rgb(var(--zn-text));font-size:0.8125rem;text-align:left;cursor:pointer}.picker__item:first-child{margin-top:0;border-top-left-radius:8px;border-top-right-radius:8px}.picker__item:last-child{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.picker__item:hover{background:rgb(var(--zn-color-tab))}.picker__item-text{display:flex;flex-direction:column;gap:2px;min-width:0}.picker__item-label{font-weight:500}.picker__item-description{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.picker__empty{margin:0;padding:10px 2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.conditions{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.group{display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:100%;padding:14px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.and-rule{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:flex;align-items:center;gap:10px;width:100%;color:rgb(var(--zn-color-success))}.and-rule::after{content:"";flex:1;height:1px;background:color-mix(in srgb,rgb(var(--zn-color-success)) 50%,transparent)}.or-label{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);margin:2px 0;color:rgb(var(--zn-color-error))}.condition{display:flex;flex-direction:column;gap:10px;width:100%}.condition__head{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.condition__name{font-family:var(--zn-font-sans);font-size:var(--zn-text-heading-section-font-size);font-weight:var(--zn-text-heading-section-font-weight);line-height:var(--zn-text-heading-section-line-height);color:var(--zn-text-heading-section-color);text-transform:var(--zn-text-heading-section-transform);letter-spacing:var(--zn-text-heading-section-letter-spacing,normal)}.condition__remove{flex:0 0 auto}.condition__row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.condition__row-label,.condition__suffix{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap}.control{min-width:0}.control--operator{flex:1 1 0;min-width:120px}.control--number{flex:0 0 auto;width:80px}.control--unit{flex:1 1 0}.control--value{flex:1 1 0;min-width:100px}zn-select.control::part(display-input){text-overflow:ellipsis}.actions{display:flex;align-items:center;gap:8px;margin-top:2px;padding-top:16px;border-top:1px solid rgb(var(--zn-border-color))}`;var Ki=class Ki extends k{constructor(){super(...arguments);this.filters=[];this.value=[];this._draft=[];this._picker=null;this._search="";this._valueJson="";this._save=()=>{this._emit("flow-conditions-save",{conditions:JSON.parse(JSON.stringify(this._draft))})};this._cancel=()=>{this._emit("flow-conditions-cancel")}}willUpdate(t){if(super.willUpdate(t),t.has("value")){let r=JSON.stringify(this.value??[]);r!==this._valueJson&&(this._valueJson=r,this._draft=JSON.parse(r),this._picker=null,this._search="")}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}_cloneDraft(){return this._draft.map(t=>t.map(r=>({...r,values:{...r.values}})))}_addCondition(t){let r={};t.fields.forEach(s=>{r[s.id]={...s.operators?.length?{operator:s.operators[0].value}:{},...s.value!==void 0?{value:s.value}:{},...s.units?.length?{unit:s.units[0].value}:{}}});let n=this._cloneDraft(),a=Math.min(this._picker??0,n.length);a===n.length&&n.push([]),n[a].push({filter:t.id,values:r}),this._draft=n,this._picker=null,this._search=""}_removeCondition(t,r){let n=this._cloneDraft();n[t].splice(r,1),this._draft=n.filter(a=>a.length)}_setField(t,r,n,a){let s=this._cloneDraft(),l=s[t][r];l.values[n]={...l.values[n],...a},this._draft=s}_renderPicker(){let t=this._search.trim().toLowerCase(),r=this.filters.filter(n=>!t||n.label.toLowerCase().includes(t));return u`
5096
+ </div>`}};me.styles=z(lk),me.dependencies={"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":xi,"zn-slash-menu":Ca},c([F(".remarkd-editor__validation")],me.prototype,"validationInput",2),c([F("zn-slash-menu")],me.prototype,"slashMenuElement",2),c([R()],me.prototype,"blocks",2),c([R()],me.prototype,"editingIndex",2),c([d({attribute:"slash-recent-key"})],me.prototype,"slashRecentKey",2),c([R()],me.prototype,"hasSlashMenu",2),c([R()],me.prototype,"imagePickerIndex",2),c([R()],me.prototype,"imageEdit",2),c([R()],me.prototype,"dropIndicator",2),c([R()],me.prototype,"dragIndex",2),c([R()],me.prototype,"editShell",2),c([R()],me.prototype,"rawMode",2),c([R()],me.prototype,"includeOptions",2),c([R()],me.prototype,"includeLoadFailed",2),c([R()],me.prototype,"includePickerIndex",2),c([R()],me.prototype,"includeQuery",2),c([R()],me.prototype,"linkPickerOpen",2),c([R()],me.prototype,"linkQuery",2),c([R()],me.prototype,"linkResults",2),c([R()],me.prototype,"linkSearchFailed",2),c([d()],me.prototype,"name",2),c([d()],me.prototype,"value",2),c([Ce()],me.prototype,"defaultValue",2),c([d()],me.prototype,"placeholder",2),c([d({attribute:"attachment-url"})],me.prototype,"attachmentUrl",2),c([d({attribute:"include-url"})],me.prototype,"includeUrl",2),c([d({attribute:"link-url"})],me.prototype,"linkUrl",2),c([d({type:Boolean,attribute:"allow-raw",reflect:!0})],me.prototype,"allowRaw",2),c([d({type:Boolean,reflect:!0})],me.prototype,"required",2),c([d({type:Boolean,reflect:!0})],me.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],me.prototype,"disabled",2),c([K("value")],me.prototype,"handleValueChange",1),c([K("includeUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleIncludeUrlChange",1),c([K("linkUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleLinkUrlChange",1);var lI=me;me.define("zn-remarkd-editor");var cI={},Sg=yt(class extends rr{constructor(){super(...arguments),this.ot=cI}render(o,i){return i()}update(o,[i,t]){if(Array.isArray(i)){if(Array.isArray(this.ot)&&this.ot.length===i.length&&i.every((r,n)=>r===this.ot[n]))return vt}else if(this.ot===i)return vt;return this.ot=Array.isArray(i)?Array.from(i):i,this.render(i,t)}});var dI={eq:"Is Equal To",neq:"Is Not Equal To",gt:"Greater Than",gte:"Greater Than or Equal To",lt:"Less Than",lte:"Less Than or Equal To",is:"Is","is-not":"Is Not",in:"Is One Of","not-in":"Is Not One Of",contains:"Contains","not-contains":"Does Not Contain","starts-with":"Starts With","ends-with":"Ends With",empty:"Is Empty","not-empty":"Is Not Empty",within:"Within the Last",before:"Before the Last",between:"Between",matches:"Matches"};function Eg(o){return o.label??dI[o.value]??o.value}var pI=[];function wk(o){let i=o.data?.conditions;return Array.isArray(i)?i:pI}var vk={id:"in"},Dh={id:"out"},Kc="__new__",al="application/x-zn-flow-type",Ih;function Rh(){return Ih||(Ih=new Image,Ih.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),Ih}var bt=240,ar=60,Tg=bt+80,hI=Tg-bt,uI=40,mI=20,$g=40,fI=40,gI=40,yk=240,bI=20,vI=20,yI=20,xI=240;function Ag(o,i,t,r=!1){let n=o.y+ar,a=n+$g;if(t&&t.y>=n){if(t.y-n>xI)return a;let s=r?n+yI:a,l=Math.round((n+t.y)/2-i/2);return Math.max(s,Math.min(l,t.y-vI-i))}return a+fI}function Nh(o){let i=o.length*7.2,t=Math.max(1,Math.ceil(i/(yk-36)));return{w:Math.min(yk,Math.round(36+i)),h:gI+(t-1)*bI}}var Jt=20;function Rr(o){return Math.round(o/Jt)*Jt}var zk=10,wI=4,zI=20;function Mg(o,i){let t=o.m+i.m;return o.x<i.x+i.w+t&&i.x<o.x+o.w+t&&o.y<i.y+i.h+t&&i.y<o.y+o.h+t}function xk(o,i){return i?bt/2:o.label?Nh(o.label).w/2:mI}function Yc(o,i,t=[]){let r=Zt(o,i(o.type)),n=o.x+bt/2;if(r.length<2)return r.map(()=>n);let a=r.map(m=>t.some(f=>f.source.node===o.id&&f.source.port===m.id)),s=[0];for(let m=1;m<r.length;m++){let f=a[m-1]&&a[m]?hI:uI,b=xk(r[m-1],a[m-1])+xk(r[m],a[m])+f;s.push(s[m-1]+Rr(b))}let l=s.filter((m,f)=>a[f]),p=l.length?l:s,h=(Math.min(...p)+Math.max(...p))/2;return s.map(m=>Math.round(n+m-h))}function Wc(o,i,t,r){let n=[{x:o.x,y:o.y,w:bt,h:ar,m:zk}],a=Zt(o,i(o.type)),s=Yc(o,i,r);return a.forEach((l,p)=>{if(!l.label)return;let h=Nh(l.label),m=r.find(b=>b.source.node===o.id&&b.source.port===l.id),f=m?t.find(b=>b.id===m.target.node):void 0;n.push({x:s[p]-h.w/2,y:Ag(o,h.h,f,a.length===1),w:h.w,h:h.h+zI,m:wI})}),n}function _k(o,i,t,r,n){let a=Wc(o,t,r,n);return Wc(i,t,r,n).some(s=>a.some(l=>Mg(l,s)))}function Oh(o,i,t,r){let n=Wc(o,i,t,r).slice(1);return n.length?t.some(a=>a.id!==o.id&&Wc(a,i,t,r).some(s=>n.some(l=>Mg(l,s)))):!1}function kk(o,i,t,r,n){let a={x:o.x,y:o.y,w:bt,h:ar,m:zk};return Wc(i,t,r,n).some(s=>Mg(a,s))}var Lg=200,qg=120,Ck=120,Sk=80;function Ek(o,i,t,r){return{x:o.x+bt*(t+1)/(r+1),y:o.y+(i==="in"?0:ar)}}function Tk(){return{nodes:[],connections:[],notes:[]}}function Ph(o){return o?o.inputs??[vk]:[vk]}function Ig(o){return o?o.outputs??[Dh]:[Dh]}function ra(o,i){return o.inputs??Ph(i)}function Zt(o,i){return o.outputs??Ig(i)}function Qc(o,i){return ra(o,i)[0]?.id??null}function $k(o,i){let t=new Set,r=n=>{for(let a of o.connections)a.source.node===n&&!t.has(a.target.node)&&(t.add(a.target.node),r(a.target.node))};return r(i),t}function ia(o,i){let t=new Set(o.map(h=>h.id)),r=new Map(o.map(h=>[h.id,[]])),n=new Set;for(let h of i)!t.has(h.source.node)||!t.has(h.target.node)||(r.get(h.source.node).push(h),n.add(h.target.node));let a=new Set,s=new Set,l=new Set,p=h=>{s.add(h),l.add(h);for(let m of r.get(h)??[])l.has(m.target.node)?a.add(m):s.has(m.target.node)||p(m.target.node);l.delete(h)};return o.filter(h=>!n.has(h.id)).forEach(h=>p(h.id)),o.forEach(h=>{s.has(h.id)||p(h.id)}),a}var Ak=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;font-size:0.8125rem}.editor{display:flex;flex-direction:column;gap:14px}.picker{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.picker__head{display:flex;align-items:center;justify-content:space-between;font-weight:600}.picker__back{flex:0 0 auto}.picker__list{display:flex;flex-direction:column}.picker__item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;margin-top:-1px;border:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel));color:rgb(var(--zn-text));font-size:0.8125rem;text-align:left;cursor:pointer}.picker__item:first-child{margin-top:0;border-top-left-radius:8px;border-top-right-radius:8px}.picker__item:last-child{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.picker__item:hover{background:rgb(var(--zn-color-tab))}.picker__item-text{display:flex;flex-direction:column;gap:2px;min-width:0}.picker__item-label{font-weight:500}.picker__item-description{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.picker__empty{margin:0;padding:10px 2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.conditions{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.group{display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:100%;padding:14px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.and-rule{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:flex;align-items:center;gap:10px;width:100%;color:rgb(var(--zn-color-success))}.and-rule::after{content:"";flex:1;height:1px;background:color-mix(in srgb,rgb(var(--zn-color-success)) 50%,transparent)}.or-label{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);margin:2px 0;color:rgb(var(--zn-color-error))}.condition{display:flex;flex-direction:column;gap:10px;width:100%}.condition__head{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.condition__name{font-family:var(--zn-font-sans);font-size:var(--zn-text-heading-section-font-size);font-weight:var(--zn-text-heading-section-font-weight);line-height:var(--zn-text-heading-section-line-height);color:var(--zn-text-heading-section-color);text-transform:var(--zn-text-heading-section-transform);letter-spacing:var(--zn-text-heading-section-letter-spacing,normal)}.condition__remove{flex:0 0 auto}.condition__row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.condition__row-label,.condition__suffix{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap}.control{min-width:0}.control--operator{flex:1 1 0;min-width:120px}.control--number{flex:0 0 auto;width:80px}.control--unit{flex:1 1 0}.control--value{flex:1 1 0;min-width:100px}zn-select.control::part(display-input){text-overflow:ellipsis}.actions{display:flex;align-items:center;gap:8px;margin-top:2px;padding-top:16px;border-top:1px solid rgb(var(--zn-border-color))}`;var Ki=class Ki extends k{constructor(){super(...arguments);this.filters=[];this.value=[];this._draft=[];this._picker=null;this._search="";this._valueJson="";this._save=()=>{this._emit("flow-conditions-save",{conditions:JSON.parse(JSON.stringify(this._draft))})};this._cancel=()=>{this._emit("flow-conditions-cancel")}}willUpdate(t){if(super.willUpdate(t),t.has("value")){let r=JSON.stringify(this.value??[]);r!==this._valueJson&&(this._valueJson=r,this._draft=JSON.parse(r),this._picker=null,this._search="")}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}_cloneDraft(){return this._draft.map(t=>t.map(r=>({...r,values:{...r.values}})))}_addCondition(t){let r={};t.fields.forEach(s=>{r[s.id]={...s.operators?.length?{operator:s.operators[0].value}:{},...s.value!==void 0?{value:s.value}:{},...s.units?.length?{unit:s.units[0].value}:{}}});let n=this._cloneDraft(),a=Math.min(this._picker??0,n.length);a===n.length&&n.push([]),n[a].push({filter:t.id,values:r}),this._draft=n,this._picker=null,this._search=""}_removeCondition(t,r){let n=this._cloneDraft();n[t].splice(r,1),this._draft=n.filter(a=>a.length)}_setField(t,r,n,a){let s=this._cloneDraft(),l=s[t][r];l.values[n]={...l.values[n],...a},this._draft=s}_renderPicker(){let t=this._search.trim().toLowerCase(),r=this.filters.filter(n=>!t||n.label.toLowerCase().includes(t));return u`
5097
5097
  <div part="picker" class="picker">
5098
5098
  <div class="picker__head">
5099
5099
  <span>Add Filters</span>
@@ -5429,7 +5429,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5429
5429
  <zn-collapsible caption="${this.caption??""}" default="${this.collapsed?"closed":"open"}">
5430
5430
  <slot></slot>
5431
5431
  </zn-collapsible>
5432
- `}};Hn.styles=z(Pk),Hn.dependencies={"zn-collapsible":wa},c([d()],Hn.prototype,"caption",2),c([d({type:Boolean,reflect:!0})],Hn.prototype,"collapsed",2);var Pg=Hn;Hn.define("zn-flow-step-group");var Hh=class{constructor(){this.types=new Map}register(i){return this.types.set(i.type,i),this}registerAll(i){return i.forEach(t=>this.register(t)),this}get(i){return this.types.get(i)}has(i){return this.types.has(i)}all(){return Array.from(this.types.values())}byGroup(i){return this.all().filter(t=>t.group===i)}categories(i){let t=new Map;for(let r of this.byGroup(i)){let n=r.category??"",a=t.get(n)??[];a.push(r),t.set(n,a)}return t}clear(){this.types.clear()}};var Hk=bt+80,Fh=220,Hg=40,Jc=o=>o.reduce((i,t)=>i+t,0)/o.length;function Fk(o,i){let t=new Map,r=o.nodes;if(!r.length)return t;let n=new Map(r.map(C=>[C.id,C])),a=new Map(r.map(C=>[C.id,[]])),s=new Map(r.map(C=>[C.id,[]]));for(let C of o.connections)!n.has(C.source.node)||!n.has(C.target.node)||(a.get(C.target.node).push(C),s.get(C.source.node).push(C));let l=ia(r,o.connections),p=new Map,h=C=>{let $=p.get(C);if($!==void 0)return $;let L=a.get(C).filter(oe=>!l.has(oe)),W=L.length?Math.max(...L.map(oe=>h(oe.source.node)))+1:0;return p.set(C,W),W};r.forEach(C=>h(C.id)),r.forEach(C=>{if(a.get(C.id).some(W=>!l.has(W)))return;let $=s.get(C.id).filter(W=>!l.has(W));if(!$.length)return;let L=Math.min(...$.map(W=>p.get(W.target.node)))-1;L>p.get(C.id)&&p.set(C.id,L)});let m=Array.from({length:Math.max(...p.values())+1},()=>[]);r.forEach(C=>m[p.get(C.id)].push(C));let f=C=>{let $=n.get(C.source.node),L=Zt($,i($.type)),W=Math.max(L.length,1),oe=Math.max(L.findIndex(xe=>xe.id===C.source.port),0);return W===1?0:(oe-(W-1)/2)*Tg},b=new Map,g=C=>{let $=a.get(C.id).filter(L=>!l.has(L)&&b.has(L.source.node));return $.length?Jc($.map(L=>{let W=n.get(L.source.node),oe=Zt(W,i(W.type)),xe=Math.max(oe.length,1),De=Math.max(oe.findIndex(Ne=>Ne.id===L.source.port),0);return b.get(W.id)+(De+1)/(xe+1)-.5})):null},v=C=>{let $=s.get(C.id).filter(L=>!l.has(L)&&b.has(L.target.node));return $.length?Jc($.map(L=>b.get(L.target.node))):null};m[0].sort((C,$)=>C.x-$.x).forEach((C,$)=>b.set(C.id,$));for(let C=1;C<m.length;C++)m[C].sort(($,L)=>(g($)??0)-(g(L)??0)).forEach(($,L)=>b.set($.id,L));for(let C=1;C<m.length;C++){let $=L=>g(L)??v(L)??0;m[C].sort((L,W)=>$(L)-$(W)).forEach((L,W)=>b.set(L.id,W))}let y=new Map,S=(C,$)=>{let L=C.map(De=>$(De)??y.get(De.id)??0),W=-1/0,oe=L.map(De=>W=Math.max(De,W+Hk)),xe=Jc(oe.map((De,Ne)=>De-L[Ne]));C.forEach((De,Ne)=>y.set(De.id,oe[Ne]-xe))},T=C=>{let $=a.get(C.id).filter(L=>!l.has(L)&&y.has(L.source.node));return $.length?Jc($.map(L=>y.get(L.source.node)+f(L))):null},N=C=>{let $=s.get(C.id).filter(L=>!l.has(L)&&y.has(L.target.node));return $.length?Jc($.map(L=>y.get(L.target.node)-f(L))):null};m[0].forEach((C,$)=>y.set(C.id,$*Hk));for(let C=1;C<m.length;C++)S(m[C],T);for(let C=m.length-2;C>=0;C--)S(m[C],N);for(let C=1;C<m.length;C++)S(m[C],T);let U=[...y.values()].filter(Number.isFinite),I=U.length?Math.min(...U):0;return r.forEach(C=>{let $=y.get(C.id);t.set(C.id,{x:Rr(Number.isFinite($)?$-I+Hg:Hg),y:Hg+p.get(C.id)*Fh})}),t}var Bk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;width:100%;height:100%;min-height:480px;color:rgb(var(--zn-text))}.builder{--steps-width:343px;--side-width:500px;display:grid;grid-template-columns:var(--steps-width) minmax(0,1fr) var(--side-width);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden;transition:grid-template-columns 0.2s ease}.builder--steps-collapsed{--steps-width:0px}.builder--steps-collapsed .steps{border-right:none}.builder--side-collapsed{--side-width:0px}.builder--side-collapsed .sidebar,.builder--side-collapsed .inspector{padding:0;border-left:none}.header{grid-row:1;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel))}.header[hidden]{display:none}.header__group{display:flex;align-items:center;gap:8px}.steps,.inspector,.sidebar{grid-row:2;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:rgb(var(--zn-panel))}.canvas-cell{grid-row:2;position:relative;min-width:0;min-height:0}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.panel-toggle--right{right:-12px}.panel-toggle--right.panel-toggle--tucked{right:8px}.steps{--zn-active-nav-background:var(--zn-panel);--navbar-page-inactive-tab-background:rgb(var(--zn-color-tab));--navbar-page-inactive-tab-filter:none;border-right:1px solid rgb(var(--zn-border-color))}.steps-content{flex:1;min-height:0;display:flex;flex-direction:column}.steps-panel{display:flex;flex-direction:column;min-height:0;height:100%}.steps-hint{margin:0;padding:12px var(--zn-base-gap);font-size:0.8125rem;line-height:1.4;color:rgb(var(--zn-color-muted-text))}.steps-scroll ::-webkit-scrollbar{width:5px;height:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-track{background:transparent}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.steps-scroll{flex:1;min-height:0;overflow-y:auto;padding-bottom:16px}.steps-scroll zn-flow-step-group{display:block;border-top:1px solid rgb(var(--zn-border-color))}.steps-uncategorized{padding:8px var(--zn-base-gap)}.steps-empty{padding:16px var(--zn-base-gap);font-size:0.8125rem;color:rgb(var(--zn-color-muted-text))}.declarations{display:none}.title-block{padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.title-block .heading{font-size:0.9375rem;font-weight:600}.title-block .subheading{margin-top:2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.search{padding:12px 12px 8px}.step{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-bottom:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;font-size:0.8125rem;cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.step:hover{border-color:rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.step:active{cursor:grabbing}.step__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.step__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector{border-left:1px solid rgb(var(--zn-border-color));animation:inspector-in 0.18s ease}.inspector-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:100%;padding:24px;text-align:center;color:rgb(var(--zn-color-muted-text));font-size:0.8125rem}.inspector-head{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.inspector-head__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.inspector-head__text{flex:1;min-width:0}.inspector-head__title-row{display:flex;align-items:center;gap:6px;min-width:0}.inspector-head__title-row .inspector-head__title{min-width:0}.inspector-head__title{font-size:0.875rem;font-weight:600}.inspector-head__title,.inspector-head__type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector-head__type{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-body ::-webkit-scrollbar{width:5px;height:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-track{background:transparent}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.inspector-body{display:flex;flex-direction:column;gap:14px;flex:1;min-height:0;overflow-y:auto;padding:16px}.inspector-hint{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-loop-tag{display:inline-flex;align-items:center;flex:0 0 auto;gap:3px;padding:2px 8px;border-radius:999px;font-size:0.6875rem;font-weight:600;line-height:1;color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 14%,transparent)}.inspector-close{display:flex;align-items:center;justify-content:center;flex:0 0 auto;margin-left:auto;width:28px;height:28px;padding:0;border-radius:6px;color:rgb(var(--zn-color-muted-text));background:transparent;cursor:pointer}.inspector-close:hover{background:rgb(var(--zn-color-tab));color:rgb(var(--zn-text))}@keyframes inspector-in{from{transform:translateX(32px);opacity:0.3}to{transform:translateX(0);opacity:1}}.sidebar ::-webkit-scrollbar{width:5px;height:5px}.sidebar{}.sidebar ::-webkit-scrollbar-track{background:transparent}.sidebar{}.sidebar ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.sidebar{}.sidebar ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.sidebar{border-left:1px solid rgb(var(--zn-border-color));overflow-y:auto;padding:16px}.sidebar-section__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:0.8125rem;font-weight:600}.sidebar-count{min-width:20px;padding:0 6px;font-size:0.75rem;line-height:18px;text-align:center;border-radius:9px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-color-tab))}.sidebar-empty{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.sidebar-error{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:6px;padding:8px 10px;font-size:0.8125rem;text-align:left;color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 7%,transparent);border:1px solid color-mix(in srgb,rgb(var(--zn-color-error)) 25%,transparent);border-radius:8px;cursor:pointer}.picker{position:fixed;z-index:21;width:220px;max-height:320px;overflow-y:auto;padding:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 6px 24px rgba(var(--zn-shadow),0.5)}.picker ::-webkit-scrollbar{width:5px;height:5px}.picker{}.picker ::-webkit-scrollbar-track{background:transparent}.picker{}.picker ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.picker{}.picker ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.picker-backdrop{position:fixed;inset:0;z-index:20}.picker-group{padding:8px 8px 4px;font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:rgb(var(--zn-color-muted-text))}.picker-item{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;font-size:0.8125rem;text-align:left;background:transparent;border-radius:6px;cursor:pointer}.picker-item:hover{background:rgb(var(--zn-color-tab))}.picker-item__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:26px;height:26px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.picker-empty{margin:0;padding:10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.save-status{position:absolute;left:16px;bottom:16px;z-index:5;display:flex;align-items:center;gap:6px;padding:5px 10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);pointer-events:none;transition:color 0.15s ease,border-color 0.15s ease}.save-status--saved{color:rgb(var(--zn-color-success));border-color:color-mix(in srgb,rgb(var(--zn-color-success)) 45%,transparent)}.restore-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:8px;width:-moz-max-content;width:max-content;max-width:calc(100% - 32px);padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.restore-banner span{flex:1 1 auto;min-width:min(160px,100%)}.restore-banner button{flex:0 0 auto;padding:3px 10px;font-size:0.75rem;font-weight:600;border-radius:6px;cursor:pointer}.restore-banner__restore{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary))}.restore-banner__restore:hover{filter:brightness(1.1)}.restore-banner__dismiss{color:rgb(var(--zn-color-muted-text));background:transparent}.restore-banner__dismiss:hover{background:rgb(var(--zn-color-tab))}.move-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.move-banner button{padding:2px 8px;font-size:0.75rem;font-weight:600;color:rgb(var(--zn-panel));background:rgba(255,255,255,0.2);border-radius:6px;cursor:pointer}`;var EI=50,Vk=al,TI=5,$I=1440*60*1e3;function Uk(o){let i=Math.floor(o/1e3);if(i<10)return"just now";if(i<60)return`${i}s ago`;let t=Math.floor(i/60);if(t<60)return`${t}m ago`;let r=Math.floor(t/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var jk=[{group:"entrypoint",label:"Entrypoint"},{group:"trigger",label:"Triggers"},{group:"action",label:"Actions"},{group:"rule",label:"Rules"}],we=class we extends k{constructor(){super(...arguments);this.nodeTypes=[];this.heading="";this.subheading="";this.errorNodes=[];this.autoSave=null;this.entrypointsHint="";this.triggersHint="";this.actionsHint="";this.rulesHint="";this.registry=new Hh;this._state=Tk();this._selectedNodeId=null;this._selectedBranch=null;this._search="";this._activeGroup=null;this._hasSlot=new Y(this,"header-left","header-right");this._stepsCollapsed=!1;this._sideCollapsed=!1;this._movingNodeId=null;this._picker=null;this._draggingType=null;this._history=[];this._redo=[];this._seq=0;this._untangleRaf=null;this._untangleSettle=null;this._configRevision=0;this._autoSaveTimer=null;this._statusTimer=null;this._justSavedTimer=null;this._restoring=!1;this._lastSavedAt=null;this._justSaved=!1;this._statusNow=Date.now();this._restorePrompt=null;this._autoSaveTick=()=>{if(this._restorePrompt)return;let t=this.getState();if(!(!t.nodes.length&&!t.connections.length&&!t.notes.length))try{localStorage.setItem(this._autoSaveKey,JSON.stringify({savedAt:Date.now(),state:t})),this._lastSavedAt=Date.now(),this._justSaved=!0,this._justSavedTimer!==null&&clearTimeout(this._justSavedTimer),this._justSavedTimer=window.setTimeout(()=>this._justSaved=!1,2500)}catch{}};this._onKeyDown=t=>{t.key==="Escape"&&(this._movingNodeId||this._picker||this._selectedBranch)&&(this._movingNodeId=null,this._picker=null,this._selectedBranch=null)};this._registerSlottedTypes=()=>{let t=!1;this.querySelectorAll("zn-flow-step").forEach(r=>{let n=this._typeFromStep(r);n&&!this.registry.has(n.type)&&(this.registry.register(n),t=!0)}),t&&this.requestUpdate()};this.undo=()=>{let t=this._history.pop();t&&(this._cancelUntangle(),this._redo.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.redo=()=>{let t=this._redo.pop();t&&(this._cancelUntangle(),this._history.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.untangle=()=>{if(!this._state.nodes.length)return;this._cancelUntangle(),this._pushHistory();let t=Fk(this._state,f=>this.registry.get(f)),r=this._state.nodes.map(f=>({n:f,from:{x:f.x,y:f.y},to:t.get(f.id)})).filter(f=>!!f.to),n=()=>{r.forEach(({n:f,to:b})=>{f.x=b.x,f.y=b.y})},a=()=>{this._untangleSettle=null,n(),this._commit()};if(this._untangleSettle=n,window.matchMedia("(prefers-reduced-motion: reduce)").matches){a();return}let s=500,l=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,p=this.shadowRoot?.querySelector("zn-flow-canvas"),h=performance.now(),m=f=>{let b=Math.min(1,(f-h)/s);if(b>=1){this._untangleRaf=null,a();return}let g=l(b);r.forEach(({n:v,from:y,to:S})=>{v.x=Math.round(y.x+(S.x-y.x)*g),v.y=Math.round(y.y+(S.y-y.y)*g)}),p?.requestUpdate(),this._untangleRaf=requestAnimationFrame(m)};this._untangleRaf=requestAnimationFrame(m)};this._commit=()=>{this._pruneConnections(),this._state={nodes:[...this._state.nodes],connections:[...this._state.connections],notes:[...this._state.notes]},this._restorePrompt=null,this.emit("zn-flow-change",{detail:{state:this.getState()}})};this._onBranchPick=t=>{this._select(null),this._sideCollapsed=!1,this._selectedBranch={nodeId:t.detail.nodeId,port:t.detail.port}};this._onBranchDelete=t=>{let r=this._state.nodes.find(a=>a.id===t.detail.nodeId);if(!r||this.registry.get(r.type)?.fixedOutputs)return;this._pushHistory();let n=Zt(r,this.registry.get(r.type)).filter(a=>a.id!==t.detail.port);r.outputs=n.length?n:[{...Dh}],this._state.connections=this._state.connections.filter(a=>!(a.source.node===r.id&&a.source.port===t.detail.port)),this._selectedBranch?.nodeId===t.detail.nodeId&&this._selectedBranch.port===t.detail.port&&(this._selectedBranch=null),this._commit()};this._onSelect=t=>{if(t.detail.nodeId===null&&this._movingNodeId){this._movingNodeId=null;return}this._select(t.detail.nodeId)};this._onNodeAction=t=>{let{nodeId:r,action:n}=t.detail;n==="delete"?this._deleteNode(r):n==="duplicate"?this._duplicateNode(r):n==="move"&&(this._movingNodeId=r)};this._onInteractionStart=()=>{this._pushHistory()};this._onOutputAssign=t=>{this._addNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.type)};this._onLinkAssign=t=>{this._linkNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.targetId)};this._onWirePick=t=>{this._picker={x:t.detail.clientX,y:t.detail.clientY,target:{kind:"wire",connectionId:t.detail.connectionId}}};this._onWireAssign=t=>{this._insertNodeOnWire(t.detail.connectionId,t.detail.type)};this._onOutputMoveTarget=t=>{let r=this._movingNodeId;if(this._movingNodeId=null,!r)return;let n=t.detail.nodeId;if(n===r)return;let a=this._state.nodes.find(b=>b.id===n),s=this._state.nodes.find(b=>b.id===r);if(!a||!s)return;let l=Qc(s,this.registry.get(s.type));if(l===null||this._refusesBranch(a,t.detail.port))return;this._pushHistory();let p=this._ensureOutput(a,t.detail.port);this._ensureBranchLabel(a,p),this._state.connections=this._state.connections.filter(b=>b.target.node!==r);let h={id:this._id("conn"),source:{node:n,port:p},target:{node:r,port:l}};this._state.connections.push(h);let m=this._positionBelowOutput(a,p),f=this._freePosition(m.x,m.y,r);s.x=f.x,s.y=f.y,this.emit("zn-flow-connect",{detail:{connection:h}}),this._commit()};this._onAddNote=()=>{this._pushHistory(),this._state.notes.push({id:this._id("note"),x:80,y:80,text:""}),this._commit()};this._onNoteChange=t=>{let r=this._state.notes.find(n=>n.id===t.detail.noteId);r&&(r.text=t.detail.text,this._commit())};this._onNoteDelete=t=>{this._pushHistory(),this._state.notes=this._state.notes.filter(r=>r.id!==t.detail.noteId),this._commit()};this._onDragEnd=()=>{this._draggingType=null};this._onStepDrag=t=>{this._draggingType=t.detail.type};this._onCanvasDragOver=t=>{t.preventDefault()};this._onCanvasDrop=t=>{let r=t.dataTransfer?.getData(Vk);if(!r)return;t.preventDefault();let a=this.shadowRoot?.querySelector("zn-flow-canvas")?.screenToCanvas(t.clientX,t.clientY)??{x:t.clientX,y:t.clientY};this._addNode(r,a.x-bt/2,a.y-ar/2)}}get _listeners(){return[["flow-node-select",this._onSelect],["flow-node-action",this._onNodeAction],["flow-interaction-start",this._onInteractionStart],["flow-change-commit",this._commit],["flow-output-assign",this._onOutputAssign],["flow-link-assign",this._onLinkAssign],["flow-output-move-target",this._onOutputMoveTarget],["flow-wire-pick",this._onWirePick],["flow-wire-assign",this._onWireAssign],["flow-branch-pick",this._onBranchPick],["flow-branch-delete",this._onBranchDelete],["flow-step-drag",this._onStepDrag],["flow-step-drag-end",this._onDragEnd],["flow-undo",this.undo],["flow-redo",this.redo],["flow-untangle",this.untangle],["flow-add-note",this._onAddNote],["flow-note-change",this._onNoteChange],["flow-note-delete",this._onNoteDelete]]}connectedCallback(){super.connectedCallback(),this._listeners.forEach(([t,r])=>this.addEventListener(t,r)),document.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){this._listeners.forEach(([t,r])=>this.removeEventListener(t,r)),document.removeEventListener("keydown",this._onKeyDown),this._cancelUntangle(),this._stopAutoSave(),this._justSavedTimer!==null&&(clearTimeout(this._justSavedTimer),this._justSavedTimer=null),super.disconnectedCallback()}get _autoSaveKey(){return`zn-flow-builder:${this.id||this.heading||"flow"}`}_stopAutoSave(){this._autoSaveTimer!==null&&(clearInterval(this._autoSaveTimer),this._autoSaveTimer=null),this._statusTimer!==null&&(clearInterval(this._statusTimer),this._statusTimer=null)}_restartAutoSave(){if(this._stopAutoSave(),this.autoSave===null)return;let t=this._readAutoSave();t&&(this._lastSavedAt=t.savedAt),this._autoSaveTimer=window.setInterval(this._autoSaveTick,this.autoSave*6e4),this._statusTimer=window.setInterval(()=>this._statusNow=Date.now(),3e4)}_readAutoSave(){try{let t=localStorage.getItem(this._autoSaveKey);if(!t)return null;let r=JSON.parse(t);return!r.state||Date.now()-r.savedAt>$I?(localStorage.removeItem(this._autoSaveKey),null):r}catch{return null}}restoreAutoSave(){let t=this._readAutoSave();if(!t)return!1;this._restoring=!0;try{this.setState(t.state)}finally{this._restoring=!1}return this._restorePrompt=null,!0}_offerRestoreIfNewer(){if(this.autoSave===null||this._restoring)return;let t=this._readAutoSave();this._restorePrompt=t&&JSON.stringify(t.state)!==JSON.stringify(this._state)?{savedAt:t.savedAt}:null}willUpdate(t){t.has("nodeTypes")&&this.nodeTypes?.length&&this.registry.registerAll(this.nodeTypes),t.has("autoSave")&&this._restartAutoSave(),super.willUpdate(t)}firstUpdated(t){super.firstUpdated(t),this._registerSlottedTypes()}static _parsePorts(t){if(t===null)return;let r=t.trim();if(r==="")return[];try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{id:a}:a):void 0}catch{return}}static _parseFilterOptions(t){if(t===null)return;let r=t.trim();if(r!==""){if(r.startsWith("["))try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{value:a}:a):void 0}catch{return}return r.split(",").map(n=>n.trim()).filter(Boolean).map(n=>({value:n}))}}static _nestedFilterOptions(t,r){let n=Array.from(t.querySelectorAll(`:scope > ${r}`));if(n.length)return n.map(a=>{let s=a.textContent?.trim()??"",l=a.getAttribute("value");return l!==null&&s?{value:l,label:s}:{value:l??s}})}static _filterFieldFromEl(t){let r=t.getAttribute("id");if(!r)return null;let n=t.getAttribute("value"),a=t.getAttribute("type");return{id:r,label:t.getAttribute("label")??void 0,type:a??void 0,operators:we._nestedFilterOptions(t,"zn-flow-operator")??we._parseFilterOptions(t.getAttribute("operators")),options:we._nestedFilterOptions(t,"zn-flow-option")??we._parseFilterOptions(t.getAttribute("options")),units:we._nestedFilterOptions(t,"zn-flow-unit")??we._parseFilterOptions(t.getAttribute("units")),suffix:t.getAttribute("suffix")??void 0,placeholder:t.getAttribute("placeholder")??void 0,value:n===null?void 0:a==="number"?Number(n):n}}static _parseBranchFilters(t){let r=s=>s?.map(l=>typeof l=="string"?{value:l}:l),n=t.getAttribute("branch-filters");if(n)try{let s=JSON.parse(n);if(Array.isArray(s))return s.map(l=>({...l,fields:(l.fields??[]).map(p=>({...p,...p.operators?{operators:r(p.operators)}:{},...p.options?{options:r(p.options)}:{},...p.units?{units:r(p.units)}:{}}))}))}catch{}let a=Array.from(t.querySelectorAll(":scope > zn-flow-filter")).map(s=>{let l=s.getAttribute("id")??s.getAttribute("label");return l?{id:l,label:s.getAttribute("label")??l,description:s.getAttribute("description")??void 0,fields:Array.from(s.querySelectorAll(":scope > zn-flow-filter-field")).map(p=>we._filterFieldFromEl(p)).filter(p=>!!p)}:null}).filter(s=>!!s);return a.length?a:void 0}_typeFromStep(t){let r=t.getAttribute("type");if(!r)return null;let n=Array.from(t.childNodes).filter(a=>a.nodeType===Node.TEXT_NODE).map(a=>a.textContent??"").join("").trim();return{type:r,label:t.getAttribute("label")??(n||r),group:t.getAttribute("group")??"action",category:t.getAttribute("category")??void 0,icon:t.getAttribute("icon")??void 0,iconLibrary:t.getAttribute("icon-library")??void 0,color:t.getAttribute("color")??void 0,description:t.getAttribute("description")??void 0,inputs:we._parsePorts(t.getAttribute("inputs")),outputs:we._parsePorts(t.getAttribute("outputs")),fixedOutputs:t.hasAttribute("fixed-outputs"),branchFilters:we._parseBranchFilters(t)}}registerNodeType(t){return this.registry.register(t),this.requestUpdate(),this}registerNodeTypes(t){return this.registry.registerAll(t),this.requestUpdate(),this}getState(){return this._clone(this._state)}setState(t){this._cancelUntangle(),this._state=t,this._history=[],this._redo=[],this._selectedNodeId=null,this._configRevision++,this._offerRestoreIfNewer()}get value(){return JSON.stringify(this._state)}set value(t){try{let r=JSON.parse(t);this.setState({nodes:r.nodes??[],connections:r.connections??[],notes:r.notes??[]})}catch{}}toJSON(){return this.getState()}_cancelUntangle(){this._untangleRaf!==null&&(cancelAnimationFrame(this._untangleRaf),this._untangleRaf=null),this._untangleSettle?.(),this._untangleSettle=null}_clone(t){return JSON.parse(JSON.stringify(t))}_pushHistory(){this._history.push(this._clone(this._state)),this._history.length>EI&&this._history.shift(),this._redo=[]}_pruneConnections(){let t=new Map(this._state.nodes.map(r=>[r.id,r]));this._state.connections=this._state.connections.filter(r=>{let n=t.get(r.source.node),a=t.get(r.target.node);if(!n||!a)return!1;let s=Zt(n,this.registry.get(n.type)).some(p=>p.id===r.source.port),l=ra(a,this.registry.get(a.type)).some(p=>p.id===r.target.port);return s&&l})}_syncSelection(){this._selectedNodeId&&!this._state.nodes.some(t=>t.id===this._selectedNodeId)&&(this._selectedNodeId=null),this._selectedBranch&&!this._branchSelection()&&(this._selectedBranch=null)}_branchSelection(){if(!this._selectedBranch)return null;let t=this._state.nodes.find(n=>n.id===this._selectedBranch.nodeId);if(!t)return null;let r=Zt(t,this.registry.get(t.type)).find(n=>n.id===this._selectedBranch.port);return r?{node:t,port:r}:null}_id(t){return`${t}-${Date.now().toString(36)}-${++this._seq}`}_freePosition(t,r,n){let a=new Set(this._state.connections.filter(p=>n&&p.target.node===n&&p.source.node!==n).map(p=>p.source.node)),s=(p,h)=>{let m=n?this._state.nodes.map(b=>b.id===n?{...b,x:p,y:h}:b):this._state.nodes,f=b=>this.registry.get(b);return m.some(b=>b.id!==n&&kk({x:p,y:h},b,f,m,this._state.connections))?!0:[...a].some(b=>{let g=m.find(v=>v.id===b);return!!g&&Oh(g,f,m,this._state.connections)})};if(t=Rr(t),r=Rr(r),!s(t,r))return{x:t,y:r};let l=Jt*2;for(let p=1;p<40;p++)for(let h=-p;h<=p;h++)for(let m=-p;m<=p;m++)if(Math.max(Math.abs(m),Math.abs(h))===p&&!s(t+m*l,r+h*l))return{x:t+m*l,y:r+h*l};return{x:t,y:r}}_addNode(t,r,n){let a=this.registry.get(t);if(!a)return;this._pushHistory();let s=this._freePosition(r,n),l={id:this._id("node"),type:t,x:s.x,y:s.y,data:{...a.defaultData??{}}};this._state.nodes.push(l),this._select(l.id),this._commit()}_deleteNode(t){this._pushHistory(),this._state.nodes=this._state.nodes.filter(r=>r.id!==t),this._state.connections=this._state.connections.filter(r=>r.source.node!==t&&r.target.node!==t),this._selectedNodeId===t&&this._select(null),this._commit()}_duplicateNode(t){let r=this._state.nodes.find(s=>s.id===t);if(!r)return;this._pushHistory();let n=this._freePosition(r.x+Jt*2,r.y+Jt*2),a={...this._clone({nodes:[r],connections:[],notes:[]}).nodes[0],id:this._id("node"),x:n.x,y:n.y};this._state.nodes.push(a),this._select(a.id),this._commit()}_positionBelowOutput(t,r){let n=Zt(t,this.registry.get(t.type)),a=Math.max(n.findIndex(l=>l.id===r),0),s=Yc(t,l=>this.registry.get(l),this._state.connections)[a];return{x:Math.round(s-bt/2),y:t.y+Fh}}_refusesBranch(t,r){return r===Kc&&!!this.registry.get(t.type)?.fixedOutputs}_ensureOutput(t,r){if(r!==Kc)return r;let n=Zt(t,this.registry.get(t.type)).map(s=>({...s})),a=this._id("branch");return n.push({id:a,label:"Branch"}),t.outputs=n,a}_ensureBranchLabel(t,r){let n=Zt(t,this.registry.get(t.type)).map(s=>({...s})),a=n.find(s=>s.id===r);a&&!a.label&&(a.label="Branch",t.outputs=n)}_addNodeAtOutput(t,r,n){let a=this._state.nodes.find(b=>b.id===t),s=this.registry.get(n);if(!a||!s)return;let l=Ph(s)[0]?.id;if(!l||this._refusesBranch(a,r))return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let p=this._positionBelowOutput(a,r),h=this._freePosition(p.x,p.y),m={id:this._id("node"),type:n,x:h.x,y:h.y,data:{...s.defaultData??{}}},f={id:this._id("conn"),source:{node:t,port:r},target:{node:m.id,port:l}};this._state.nodes.push(m),this._state.connections.push(f),this.emit("zn-flow-connect",{detail:{connection:f}}),this._select(m.id),this._commit()}_linkNodeAtOutput(t,r,n){let a=this._state.nodes.find(h=>h.id===t),s=this._state.nodes.find(h=>h.id===n);if(!a||!s||t===n)return;let l=Qc(s,this.registry.get(s.type));if(l===null||this._refusesBranch(a,r))return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let p={id:this._id("conn"),source:{node:t,port:r},target:{node:n,port:l}};this._state.connections.push(p),this.emit("zn-flow-connect",{detail:{connection:p}}),this._select(null),this._selectedBranch={nodeId:t,port:r},this._commit()}_insertNodeOnWire(t,r){let n=this._state.connections.find(S=>S.id===t),a=this.registry.get(r);if(!n||!a)return;let s=this._state.nodes.find(S=>S.id===n.source.node),l=this._state.nodes.find(S=>S.id===n.target.node);if(!s||!l)return;let p=Ph(a)[0]?.id;if(!p)return;this._pushHistory();let h=Ig(a).map(S=>({...S}));h.length||h.push({id:this._id("branch")}),h[0].label||(h[0].label="Branch");let m=this._positionBelowOutput(s,n.source.port),f=m.y+Fh;if(l.y<f){let S=f-l.y,T=$k(this._state,l.id);T.add(l.id),this._state.nodes.forEach(N=>{T.has(N.id)&&(N.y+=S)})}let b=this._freePosition(m.x,m.y),g={id:this._id("node"),type:r,x:b.x,y:b.y,outputs:h,data:{...a.defaultData??{}}},v=n.target.port;n.target={node:g.id,port:p};let y={id:this._id("conn"),source:{node:g.id,port:h[0].id},target:{node:l.id,port:v}};this._state.nodes.push(g),this._state.connections.push(y),this.emit("zn-flow-connect",{detail:{connection:y}}),this._select(g.id),this._commit()}_select(t){this._selectedBranch=null,t&&(this._sideCollapsed=!1),this._selectedNodeId!==t&&(this._selectedNodeId=t,this.emit("zn-flow-selection-change",{detail:{nodeId:t}}))}_onDragStart(t,r){t.dataTransfer&&(this._draggingType=r,t.dataTransfer.setData(Vk,r),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage(Rh(),0,0))}_renderSteps(){return u`
5432
+ `}};Hn.styles=z(Pk),Hn.dependencies={"zn-collapsible":za},c([d()],Hn.prototype,"caption",2),c([d({type:Boolean,reflect:!0})],Hn.prototype,"collapsed",2);var Pg=Hn;Hn.define("zn-flow-step-group");var Hh=class{constructor(){this.types=new Map}register(i){return this.types.set(i.type,i),this}registerAll(i){return i.forEach(t=>this.register(t)),this}get(i){return this.types.get(i)}has(i){return this.types.has(i)}all(){return Array.from(this.types.values())}byGroup(i){return this.all().filter(t=>t.group===i)}categories(i){let t=new Map;for(let r of this.byGroup(i)){let n=r.category??"",a=t.get(n)??[];a.push(r),t.set(n,a)}return t}clear(){this.types.clear()}};var Hk=bt+80,Fh=220,Hg=40,Jc=o=>o.reduce((i,t)=>i+t,0)/o.length;function Fk(o,i){let t=new Map,r=o.nodes;if(!r.length)return t;let n=new Map(r.map(C=>[C.id,C])),a=new Map(r.map(C=>[C.id,[]])),s=new Map(r.map(C=>[C.id,[]]));for(let C of o.connections)!n.has(C.source.node)||!n.has(C.target.node)||(a.get(C.target.node).push(C),s.get(C.source.node).push(C));let l=ia(r,o.connections),p=new Map,h=C=>{let $=p.get(C);if($!==void 0)return $;let L=a.get(C).filter(oe=>!l.has(oe)),W=L.length?Math.max(...L.map(oe=>h(oe.source.node)))+1:0;return p.set(C,W),W};r.forEach(C=>h(C.id)),r.forEach(C=>{if(a.get(C.id).some(W=>!l.has(W)))return;let $=s.get(C.id).filter(W=>!l.has(W));if(!$.length)return;let L=Math.min(...$.map(W=>p.get(W.target.node)))-1;L>p.get(C.id)&&p.set(C.id,L)});let m=Array.from({length:Math.max(...p.values())+1},()=>[]);r.forEach(C=>m[p.get(C.id)].push(C));let f=C=>{let $=n.get(C.source.node),L=Zt($,i($.type)),W=Math.max(L.length,1),oe=Math.max(L.findIndex(xe=>xe.id===C.source.port),0);return W===1?0:(oe-(W-1)/2)*Tg},b=new Map,g=C=>{let $=a.get(C.id).filter(L=>!l.has(L)&&b.has(L.source.node));return $.length?Jc($.map(L=>{let W=n.get(L.source.node),oe=Zt(W,i(W.type)),xe=Math.max(oe.length,1),De=Math.max(oe.findIndex(Ne=>Ne.id===L.source.port),0);return b.get(W.id)+(De+1)/(xe+1)-.5})):null},v=C=>{let $=s.get(C.id).filter(L=>!l.has(L)&&b.has(L.target.node));return $.length?Jc($.map(L=>b.get(L.target.node))):null};m[0].sort((C,$)=>C.x-$.x).forEach((C,$)=>b.set(C.id,$));for(let C=1;C<m.length;C++)m[C].sort(($,L)=>(g($)??0)-(g(L)??0)).forEach(($,L)=>b.set($.id,L));for(let C=1;C<m.length;C++){let $=L=>g(L)??v(L)??0;m[C].sort((L,W)=>$(L)-$(W)).forEach((L,W)=>b.set(L.id,W))}let y=new Map,S=(C,$)=>{let L=C.map(De=>$(De)??y.get(De.id)??0),W=-1/0,oe=L.map(De=>W=Math.max(De,W+Hk)),xe=Jc(oe.map((De,Ne)=>De-L[Ne]));C.forEach((De,Ne)=>y.set(De.id,oe[Ne]-xe))},T=C=>{let $=a.get(C.id).filter(L=>!l.has(L)&&y.has(L.source.node));return $.length?Jc($.map(L=>y.get(L.source.node)+f(L))):null},N=C=>{let $=s.get(C.id).filter(L=>!l.has(L)&&y.has(L.target.node));return $.length?Jc($.map(L=>y.get(L.target.node)-f(L))):null};m[0].forEach((C,$)=>y.set(C.id,$*Hk));for(let C=1;C<m.length;C++)S(m[C],T);for(let C=m.length-2;C>=0;C--)S(m[C],N);for(let C=1;C<m.length;C++)S(m[C],T);let U=[...y.values()].filter(Number.isFinite),I=U.length?Math.min(...U):0;return r.forEach(C=>{let $=y.get(C.id);t.set(C.id,{x:Rr(Number.isFinite($)?$-I+Hg:Hg),y:Hg+p.get(C.id)*Fh})}),t}var Bk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;width:100%;height:100%;min-height:480px;color:rgb(var(--zn-text))}.builder{--steps-width:343px;--side-width:500px;display:grid;grid-template-columns:var(--steps-width) minmax(0,1fr) var(--side-width);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden;transition:grid-template-columns 0.2s ease}.builder--steps-collapsed{--steps-width:0px}.builder--steps-collapsed .steps{border-right:none}.builder--side-collapsed{--side-width:0px}.builder--side-collapsed .sidebar,.builder--side-collapsed .inspector{padding:0;border-left:none}.header{grid-row:1;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel))}.header[hidden]{display:none}.header__group{display:flex;align-items:center;gap:8px}.steps,.inspector,.sidebar{grid-row:2;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:rgb(var(--zn-panel))}.canvas-cell{grid-row:2;position:relative;min-width:0;min-height:0}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.panel-toggle--right{right:-12px}.panel-toggle--right.panel-toggle--tucked{right:8px}.steps{--zn-active-nav-background:var(--zn-panel);--navbar-page-inactive-tab-background:rgb(var(--zn-color-tab));--navbar-page-inactive-tab-filter:none;border-right:1px solid rgb(var(--zn-border-color))}.steps-content{flex:1;min-height:0;display:flex;flex-direction:column}.steps-panel{display:flex;flex-direction:column;min-height:0;height:100%}.steps-hint{margin:0;padding:12px var(--zn-base-gap);font-size:0.8125rem;line-height:1.4;color:rgb(var(--zn-color-muted-text))}.steps-scroll ::-webkit-scrollbar{width:5px;height:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-track{background:transparent}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.steps-scroll{}.steps-scroll ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.steps-scroll{flex:1;min-height:0;overflow-y:auto;padding-bottom:16px}.steps-scroll zn-flow-step-group{display:block;border-top:1px solid rgb(var(--zn-border-color))}.steps-uncategorized{padding:8px var(--zn-base-gap)}.steps-empty{padding:16px var(--zn-base-gap);font-size:0.8125rem;color:rgb(var(--zn-color-muted-text))}.declarations{display:none}.title-block{padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.title-block .heading{font-size:0.9375rem;font-weight:600}.title-block .subheading{margin-top:2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.search{padding:12px 12px 8px}.step{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-bottom:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;font-size:0.8125rem;cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.step:hover{border-color:rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.step:active{cursor:grabbing}.step__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.step__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector{border-left:1px solid rgb(var(--zn-border-color));animation:inspector-in 0.18s ease}.inspector-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:100%;padding:24px;text-align:center;color:rgb(var(--zn-color-muted-text));font-size:0.8125rem}.inspector-head{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.inspector-head__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.inspector-head__text{flex:1;min-width:0}.inspector-head__title-row{display:flex;align-items:center;gap:6px;min-width:0}.inspector-head__title-row .inspector-head__title{min-width:0}.inspector-head__title{font-size:0.875rem;font-weight:600}.inspector-head__title,.inspector-head__type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector-head__type{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-body ::-webkit-scrollbar{width:5px;height:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-track{background:transparent}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.inspector-body{}.inspector-body ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.inspector-body{display:flex;flex-direction:column;gap:14px;flex:1;min-height:0;overflow-y:auto;padding:16px}.inspector-hint{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-loop-tag{display:inline-flex;align-items:center;flex:0 0 auto;gap:3px;padding:2px 8px;border-radius:999px;font-size:0.6875rem;font-weight:600;line-height:1;color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 14%,transparent)}.inspector-close{display:flex;align-items:center;justify-content:center;flex:0 0 auto;margin-left:auto;width:28px;height:28px;padding:0;border-radius:6px;color:rgb(var(--zn-color-muted-text));background:transparent;cursor:pointer}.inspector-close:hover{background:rgb(var(--zn-color-tab));color:rgb(var(--zn-text))}@keyframes inspector-in{from{transform:translateX(32px);opacity:0.3}to{transform:translateX(0);opacity:1}}.sidebar ::-webkit-scrollbar{width:5px;height:5px}.sidebar{}.sidebar ::-webkit-scrollbar-track{background:transparent}.sidebar{}.sidebar ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.sidebar{}.sidebar ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.sidebar{border-left:1px solid rgb(var(--zn-border-color));overflow-y:auto;padding:16px}.sidebar-section__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:0.8125rem;font-weight:600}.sidebar-count{min-width:20px;padding:0 6px;font-size:0.75rem;line-height:18px;text-align:center;border-radius:9px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-color-tab))}.sidebar-empty{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.sidebar-error{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:6px;padding:8px 10px;font-size:0.8125rem;text-align:left;color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 7%,transparent);border:1px solid color-mix(in srgb,rgb(var(--zn-color-error)) 25%,transparent);border-radius:8px;cursor:pointer}.picker{position:fixed;z-index:21;width:220px;max-height:320px;overflow-y:auto;padding:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 6px 24px rgba(var(--zn-shadow),0.5)}.picker ::-webkit-scrollbar{width:5px;height:5px}.picker{}.picker ::-webkit-scrollbar-track{background:transparent}.picker{}.picker ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.picker{}.picker ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.picker-backdrop{position:fixed;inset:0;z-index:20}.picker-group{padding:8px 8px 4px;font-size:0.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:rgb(var(--zn-color-muted-text))}.picker-item{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;font-size:0.8125rem;text-align:left;background:transparent;border-radius:6px;cursor:pointer}.picker-item:hover{background:rgb(var(--zn-color-tab))}.picker-item__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:26px;height:26px;border-radius:6px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.picker-empty{margin:0;padding:10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.save-status{position:absolute;left:16px;bottom:16px;z-index:5;display:flex;align-items:center;gap:6px;padding:5px 10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);pointer-events:none;transition:color 0.15s ease,border-color 0.15s ease}.save-status--saved{color:rgb(var(--zn-color-success));border-color:color-mix(in srgb,rgb(var(--zn-color-success)) 45%,transparent)}.restore-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:8px;width:-moz-max-content;width:max-content;max-width:calc(100% - 32px);padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.restore-banner span{flex:1 1 auto;min-width:min(160px,100%)}.restore-banner button{flex:0 0 auto;padding:3px 10px;font-size:0.75rem;font-weight:600;border-radius:6px;cursor:pointer}.restore-banner__restore{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary))}.restore-banner__restore:hover{filter:brightness(1.1)}.restore-banner__dismiss{color:rgb(var(--zn-color-muted-text));background:transparent}.restore-banner__dismiss:hover{background:rgb(var(--zn-color-tab))}.move-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.move-banner button{padding:2px 8px;font-size:0.75rem;font-weight:600;color:rgb(var(--zn-panel));background:rgba(255,255,255,0.2);border-radius:6px;cursor:pointer}`;var EI=50,Vk=al,TI=5,$I=1440*60*1e3;function Uk(o){let i=Math.floor(o/1e3);if(i<10)return"just now";if(i<60)return`${i}s ago`;let t=Math.floor(i/60);if(t<60)return`${t}m ago`;let r=Math.floor(t/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var jk=[{group:"entrypoint",label:"Entrypoint"},{group:"trigger",label:"Triggers"},{group:"action",label:"Actions"},{group:"rule",label:"Rules"}],we=class we extends k{constructor(){super(...arguments);this.nodeTypes=[];this.heading="";this.subheading="";this.errorNodes=[];this.autoSave=null;this.entrypointsHint="";this.triggersHint="";this.actionsHint="";this.rulesHint="";this.registry=new Hh;this._state=Tk();this._selectedNodeId=null;this._selectedBranch=null;this._search="";this._activeGroup=null;this._hasSlot=new Y(this,"header-left","header-right");this._stepsCollapsed=!1;this._sideCollapsed=!1;this._movingNodeId=null;this._picker=null;this._draggingType=null;this._history=[];this._redo=[];this._seq=0;this._untangleRaf=null;this._untangleSettle=null;this._configRevision=0;this._autoSaveTimer=null;this._statusTimer=null;this._justSavedTimer=null;this._restoring=!1;this._lastSavedAt=null;this._justSaved=!1;this._statusNow=Date.now();this._restorePrompt=null;this._autoSaveTick=()=>{if(this._restorePrompt)return;let t=this.getState();if(!(!t.nodes.length&&!t.connections.length&&!t.notes.length))try{localStorage.setItem(this._autoSaveKey,JSON.stringify({savedAt:Date.now(),state:t})),this._lastSavedAt=Date.now(),this._justSaved=!0,this._justSavedTimer!==null&&clearTimeout(this._justSavedTimer),this._justSavedTimer=window.setTimeout(()=>this._justSaved=!1,2500)}catch{}};this._onKeyDown=t=>{t.key==="Escape"&&(this._movingNodeId||this._picker||this._selectedBranch)&&(this._movingNodeId=null,this._picker=null,this._selectedBranch=null)};this._registerSlottedTypes=()=>{let t=!1;this.querySelectorAll("zn-flow-step").forEach(r=>{let n=this._typeFromStep(r);n&&!this.registry.has(n.type)&&(this.registry.register(n),t=!0)}),t&&this.requestUpdate()};this.undo=()=>{let t=this._history.pop();t&&(this._cancelUntangle(),this._redo.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.redo=()=>{let t=this._redo.pop();t&&(this._cancelUntangle(),this._history.push(this._clone(this._state)),this._state=t,this._configRevision++,this._syncSelection(),this._commit())};this.untangle=()=>{if(!this._state.nodes.length)return;this._cancelUntangle(),this._pushHistory();let t=Fk(this._state,f=>this.registry.get(f)),r=this._state.nodes.map(f=>({n:f,from:{x:f.x,y:f.y},to:t.get(f.id)})).filter(f=>!!f.to),n=()=>{r.forEach(({n:f,to:b})=>{f.x=b.x,f.y=b.y})},a=()=>{this._untangleSettle=null,n(),this._commit()};if(this._untangleSettle=n,window.matchMedia("(prefers-reduced-motion: reduce)").matches){a();return}let s=500,l=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,p=this.shadowRoot?.querySelector("zn-flow-canvas"),h=performance.now(),m=f=>{let b=Math.min(1,(f-h)/s);if(b>=1){this._untangleRaf=null,a();return}let g=l(b);r.forEach(({n:v,from:y,to:S})=>{v.x=Math.round(y.x+(S.x-y.x)*g),v.y=Math.round(y.y+(S.y-y.y)*g)}),p?.requestUpdate(),this._untangleRaf=requestAnimationFrame(m)};this._untangleRaf=requestAnimationFrame(m)};this._commit=()=>{this._pruneConnections(),this._state={nodes:[...this._state.nodes],connections:[...this._state.connections],notes:[...this._state.notes]},this._restorePrompt=null,this.emit("zn-flow-change",{detail:{state:this.getState()}})};this._onBranchPick=t=>{this._select(null),this._sideCollapsed=!1,this._selectedBranch={nodeId:t.detail.nodeId,port:t.detail.port}};this._onBranchDelete=t=>{let r=this._state.nodes.find(a=>a.id===t.detail.nodeId);if(!r||this.registry.get(r.type)?.fixedOutputs)return;this._pushHistory();let n=Zt(r,this.registry.get(r.type)).filter(a=>a.id!==t.detail.port);r.outputs=n.length?n:[{...Dh}],this._state.connections=this._state.connections.filter(a=>!(a.source.node===r.id&&a.source.port===t.detail.port)),this._selectedBranch?.nodeId===t.detail.nodeId&&this._selectedBranch.port===t.detail.port&&(this._selectedBranch=null),this._commit()};this._onSelect=t=>{if(t.detail.nodeId===null&&this._movingNodeId){this._movingNodeId=null;return}this._select(t.detail.nodeId)};this._onNodeAction=t=>{let{nodeId:r,action:n}=t.detail;n==="delete"?this._deleteNode(r):n==="duplicate"?this._duplicateNode(r):n==="move"&&(this._movingNodeId=r)};this._onInteractionStart=()=>{this._pushHistory()};this._onOutputAssign=t=>{this._addNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.type)};this._onLinkAssign=t=>{this._linkNodeAtOutput(t.detail.nodeId,t.detail.port,t.detail.targetId)};this._onWirePick=t=>{this._picker={x:t.detail.clientX,y:t.detail.clientY,target:{kind:"wire",connectionId:t.detail.connectionId}}};this._onWireAssign=t=>{this._insertNodeOnWire(t.detail.connectionId,t.detail.type)};this._onOutputMoveTarget=t=>{let r=this._movingNodeId;if(this._movingNodeId=null,!r)return;let n=t.detail.nodeId;if(n===r)return;let a=this._state.nodes.find(b=>b.id===n),s=this._state.nodes.find(b=>b.id===r);if(!a||!s)return;let l=Qc(s,this.registry.get(s.type));if(l===null||this._refusesBranch(a,t.detail.port))return;this._pushHistory();let p=this._ensureOutput(a,t.detail.port);this._ensureBranchLabel(a,p),this._state.connections=this._state.connections.filter(b=>b.target.node!==r);let h={id:this._id("conn"),source:{node:n,port:p},target:{node:r,port:l}};this._state.connections.push(h);let m=this._positionBelowOutput(a,p),f=this._freePosition(m.x,m.y,r);s.x=f.x,s.y=f.y,this.emit("zn-flow-connect",{detail:{connection:h}}),this._commit()};this._onAddNote=()=>{this._pushHistory(),this._state.notes.push({id:this._id("note"),x:80,y:80,text:""}),this._commit()};this._onNoteChange=t=>{let r=this._state.notes.find(n=>n.id===t.detail.noteId);r&&(r.text=t.detail.text,this._commit())};this._onNoteDelete=t=>{this._pushHistory(),this._state.notes=this._state.notes.filter(r=>r.id!==t.detail.noteId),this._commit()};this._onDragEnd=()=>{this._draggingType=null};this._onStepDrag=t=>{this._draggingType=t.detail.type};this._onCanvasDragOver=t=>{t.preventDefault()};this._onCanvasDrop=t=>{let r=t.dataTransfer?.getData(Vk);if(!r)return;t.preventDefault();let a=this.shadowRoot?.querySelector("zn-flow-canvas")?.screenToCanvas(t.clientX,t.clientY)??{x:t.clientX,y:t.clientY};this._addNode(r,a.x-bt/2,a.y-ar/2)}}get _listeners(){return[["flow-node-select",this._onSelect],["flow-node-action",this._onNodeAction],["flow-interaction-start",this._onInteractionStart],["flow-change-commit",this._commit],["flow-output-assign",this._onOutputAssign],["flow-link-assign",this._onLinkAssign],["flow-output-move-target",this._onOutputMoveTarget],["flow-wire-pick",this._onWirePick],["flow-wire-assign",this._onWireAssign],["flow-branch-pick",this._onBranchPick],["flow-branch-delete",this._onBranchDelete],["flow-step-drag",this._onStepDrag],["flow-step-drag-end",this._onDragEnd],["flow-undo",this.undo],["flow-redo",this.redo],["flow-untangle",this.untangle],["flow-add-note",this._onAddNote],["flow-note-change",this._onNoteChange],["flow-note-delete",this._onNoteDelete]]}connectedCallback(){super.connectedCallback(),this._listeners.forEach(([t,r])=>this.addEventListener(t,r)),document.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){this._listeners.forEach(([t,r])=>this.removeEventListener(t,r)),document.removeEventListener("keydown",this._onKeyDown),this._cancelUntangle(),this._stopAutoSave(),this._justSavedTimer!==null&&(clearTimeout(this._justSavedTimer),this._justSavedTimer=null),super.disconnectedCallback()}get _autoSaveKey(){return`zn-flow-builder:${this.id||this.heading||"flow"}`}_stopAutoSave(){this._autoSaveTimer!==null&&(clearInterval(this._autoSaveTimer),this._autoSaveTimer=null),this._statusTimer!==null&&(clearInterval(this._statusTimer),this._statusTimer=null)}_restartAutoSave(){if(this._stopAutoSave(),this.autoSave===null)return;let t=this._readAutoSave();t&&(this._lastSavedAt=t.savedAt),this._autoSaveTimer=window.setInterval(this._autoSaveTick,this.autoSave*6e4),this._statusTimer=window.setInterval(()=>this._statusNow=Date.now(),3e4)}_readAutoSave(){try{let t=localStorage.getItem(this._autoSaveKey);if(!t)return null;let r=JSON.parse(t);return!r.state||Date.now()-r.savedAt>$I?(localStorage.removeItem(this._autoSaveKey),null):r}catch{return null}}restoreAutoSave(){let t=this._readAutoSave();if(!t)return!1;this._restoring=!0;try{this.setState(t.state)}finally{this._restoring=!1}return this._restorePrompt=null,!0}_offerRestoreIfNewer(){if(this.autoSave===null||this._restoring)return;let t=this._readAutoSave();this._restorePrompt=t&&JSON.stringify(t.state)!==JSON.stringify(this._state)?{savedAt:t.savedAt}:null}willUpdate(t){t.has("nodeTypes")&&this.nodeTypes?.length&&this.registry.registerAll(this.nodeTypes),t.has("autoSave")&&this._restartAutoSave(),super.willUpdate(t)}firstUpdated(t){super.firstUpdated(t),this._registerSlottedTypes()}static _parsePorts(t){if(t===null)return;let r=t.trim();if(r==="")return[];try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{id:a}:a):void 0}catch{return}}static _parseFilterOptions(t){if(t===null)return;let r=t.trim();if(r!==""){if(r.startsWith("["))try{let n=JSON.parse(r);return Array.isArray(n)?n.map(a=>typeof a=="string"?{value:a}:a):void 0}catch{return}return r.split(",").map(n=>n.trim()).filter(Boolean).map(n=>({value:n}))}}static _nestedFilterOptions(t,r){let n=Array.from(t.querySelectorAll(`:scope > ${r}`));if(n.length)return n.map(a=>{let s=a.textContent?.trim()??"",l=a.getAttribute("value");return l!==null&&s?{value:l,label:s}:{value:l??s}})}static _filterFieldFromEl(t){let r=t.getAttribute("id");if(!r)return null;let n=t.getAttribute("value"),a=t.getAttribute("type");return{id:r,label:t.getAttribute("label")??void 0,type:a??void 0,operators:we._nestedFilterOptions(t,"zn-flow-operator")??we._parseFilterOptions(t.getAttribute("operators")),options:we._nestedFilterOptions(t,"zn-flow-option")??we._parseFilterOptions(t.getAttribute("options")),units:we._nestedFilterOptions(t,"zn-flow-unit")??we._parseFilterOptions(t.getAttribute("units")),suffix:t.getAttribute("suffix")??void 0,placeholder:t.getAttribute("placeholder")??void 0,value:n===null?void 0:a==="number"?Number(n):n}}static _parseBranchFilters(t){let r=s=>s?.map(l=>typeof l=="string"?{value:l}:l),n=t.getAttribute("branch-filters");if(n)try{let s=JSON.parse(n);if(Array.isArray(s))return s.map(l=>({...l,fields:(l.fields??[]).map(p=>({...p,...p.operators?{operators:r(p.operators)}:{},...p.options?{options:r(p.options)}:{},...p.units?{units:r(p.units)}:{}}))}))}catch{}let a=Array.from(t.querySelectorAll(":scope > zn-flow-filter")).map(s=>{let l=s.getAttribute("id")??s.getAttribute("label");return l?{id:l,label:s.getAttribute("label")??l,description:s.getAttribute("description")??void 0,fields:Array.from(s.querySelectorAll(":scope > zn-flow-filter-field")).map(p=>we._filterFieldFromEl(p)).filter(p=>!!p)}:null}).filter(s=>!!s);return a.length?a:void 0}_typeFromStep(t){let r=t.getAttribute("type");if(!r)return null;let n=Array.from(t.childNodes).filter(a=>a.nodeType===Node.TEXT_NODE).map(a=>a.textContent??"").join("").trim();return{type:r,label:t.getAttribute("label")??(n||r),group:t.getAttribute("group")??"action",category:t.getAttribute("category")??void 0,icon:t.getAttribute("icon")??void 0,iconLibrary:t.getAttribute("icon-library")??void 0,color:t.getAttribute("color")??void 0,description:t.getAttribute("description")??void 0,inputs:we._parsePorts(t.getAttribute("inputs")),outputs:we._parsePorts(t.getAttribute("outputs")),fixedOutputs:t.hasAttribute("fixed-outputs"),branchFilters:we._parseBranchFilters(t)}}registerNodeType(t){return this.registry.register(t),this.requestUpdate(),this}registerNodeTypes(t){return this.registry.registerAll(t),this.requestUpdate(),this}getState(){return this._clone(this._state)}setState(t){this._cancelUntangle(),this._state=t,this._history=[],this._redo=[],this._selectedNodeId=null,this._configRevision++,this._offerRestoreIfNewer()}get value(){return JSON.stringify(this._state)}set value(t){try{let r=JSON.parse(t);this.setState({nodes:r.nodes??[],connections:r.connections??[],notes:r.notes??[]})}catch{}}toJSON(){return this.getState()}_cancelUntangle(){this._untangleRaf!==null&&(cancelAnimationFrame(this._untangleRaf),this._untangleRaf=null),this._untangleSettle?.(),this._untangleSettle=null}_clone(t){return JSON.parse(JSON.stringify(t))}_pushHistory(){this._history.push(this._clone(this._state)),this._history.length>EI&&this._history.shift(),this._redo=[]}_pruneConnections(){let t=new Map(this._state.nodes.map(r=>[r.id,r]));this._state.connections=this._state.connections.filter(r=>{let n=t.get(r.source.node),a=t.get(r.target.node);if(!n||!a)return!1;let s=Zt(n,this.registry.get(n.type)).some(p=>p.id===r.source.port),l=ra(a,this.registry.get(a.type)).some(p=>p.id===r.target.port);return s&&l})}_syncSelection(){this._selectedNodeId&&!this._state.nodes.some(t=>t.id===this._selectedNodeId)&&(this._selectedNodeId=null),this._selectedBranch&&!this._branchSelection()&&(this._selectedBranch=null)}_branchSelection(){if(!this._selectedBranch)return null;let t=this._state.nodes.find(n=>n.id===this._selectedBranch.nodeId);if(!t)return null;let r=Zt(t,this.registry.get(t.type)).find(n=>n.id===this._selectedBranch.port);return r?{node:t,port:r}:null}_id(t){return`${t}-${Date.now().toString(36)}-${++this._seq}`}_freePosition(t,r,n){let a=new Set(this._state.connections.filter(p=>n&&p.target.node===n&&p.source.node!==n).map(p=>p.source.node)),s=(p,h)=>{let m=n?this._state.nodes.map(b=>b.id===n?{...b,x:p,y:h}:b):this._state.nodes,f=b=>this.registry.get(b);return m.some(b=>b.id!==n&&kk({x:p,y:h},b,f,m,this._state.connections))?!0:[...a].some(b=>{let g=m.find(v=>v.id===b);return!!g&&Oh(g,f,m,this._state.connections)})};if(t=Rr(t),r=Rr(r),!s(t,r))return{x:t,y:r};let l=Jt*2;for(let p=1;p<40;p++)for(let h=-p;h<=p;h++)for(let m=-p;m<=p;m++)if(Math.max(Math.abs(m),Math.abs(h))===p&&!s(t+m*l,r+h*l))return{x:t+m*l,y:r+h*l};return{x:t,y:r}}_addNode(t,r,n){let a=this.registry.get(t);if(!a)return;this._pushHistory();let s=this._freePosition(r,n),l={id:this._id("node"),type:t,x:s.x,y:s.y,data:{...a.defaultData??{}}};this._state.nodes.push(l),this._select(l.id),this._commit()}_deleteNode(t){this._pushHistory(),this._state.nodes=this._state.nodes.filter(r=>r.id!==t),this._state.connections=this._state.connections.filter(r=>r.source.node!==t&&r.target.node!==t),this._selectedNodeId===t&&this._select(null),this._commit()}_duplicateNode(t){let r=this._state.nodes.find(s=>s.id===t);if(!r)return;this._pushHistory();let n=this._freePosition(r.x+Jt*2,r.y+Jt*2),a={...this._clone({nodes:[r],connections:[],notes:[]}).nodes[0],id:this._id("node"),x:n.x,y:n.y};this._state.nodes.push(a),this._select(a.id),this._commit()}_positionBelowOutput(t,r){let n=Zt(t,this.registry.get(t.type)),a=Math.max(n.findIndex(l=>l.id===r),0),s=Yc(t,l=>this.registry.get(l),this._state.connections)[a];return{x:Math.round(s-bt/2),y:t.y+Fh}}_refusesBranch(t,r){return r===Kc&&!!this.registry.get(t.type)?.fixedOutputs}_ensureOutput(t,r){if(r!==Kc)return r;let n=Zt(t,this.registry.get(t.type)).map(s=>({...s})),a=this._id("branch");return n.push({id:a,label:"Branch"}),t.outputs=n,a}_ensureBranchLabel(t,r){let n=Zt(t,this.registry.get(t.type)).map(s=>({...s})),a=n.find(s=>s.id===r);a&&!a.label&&(a.label="Branch",t.outputs=n)}_addNodeAtOutput(t,r,n){let a=this._state.nodes.find(b=>b.id===t),s=this.registry.get(n);if(!a||!s)return;let l=Ph(s)[0]?.id;if(!l||this._refusesBranch(a,r))return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let p=this._positionBelowOutput(a,r),h=this._freePosition(p.x,p.y),m={id:this._id("node"),type:n,x:h.x,y:h.y,data:{...s.defaultData??{}}},f={id:this._id("conn"),source:{node:t,port:r},target:{node:m.id,port:l}};this._state.nodes.push(m),this._state.connections.push(f),this.emit("zn-flow-connect",{detail:{connection:f}}),this._select(m.id),this._commit()}_linkNodeAtOutput(t,r,n){let a=this._state.nodes.find(h=>h.id===t),s=this._state.nodes.find(h=>h.id===n);if(!a||!s||t===n)return;let l=Qc(s,this.registry.get(s.type));if(l===null||this._refusesBranch(a,r))return;this._pushHistory(),r=this._ensureOutput(a,r),this._ensureBranchLabel(a,r);let p={id:this._id("conn"),source:{node:t,port:r},target:{node:n,port:l}};this._state.connections.push(p),this.emit("zn-flow-connect",{detail:{connection:p}}),this._select(null),this._selectedBranch={nodeId:t,port:r},this._commit()}_insertNodeOnWire(t,r){let n=this._state.connections.find(S=>S.id===t),a=this.registry.get(r);if(!n||!a)return;let s=this._state.nodes.find(S=>S.id===n.source.node),l=this._state.nodes.find(S=>S.id===n.target.node);if(!s||!l)return;let p=Ph(a)[0]?.id;if(!p)return;this._pushHistory();let h=Ig(a).map(S=>({...S}));h.length||h.push({id:this._id("branch")}),h[0].label||(h[0].label="Branch");let m=this._positionBelowOutput(s,n.source.port),f=m.y+Fh;if(l.y<f){let S=f-l.y,T=$k(this._state,l.id);T.add(l.id),this._state.nodes.forEach(N=>{T.has(N.id)&&(N.y+=S)})}let b=this._freePosition(m.x,m.y),g={id:this._id("node"),type:r,x:b.x,y:b.y,outputs:h,data:{...a.defaultData??{}}},v=n.target.port;n.target={node:g.id,port:p};let y={id:this._id("conn"),source:{node:g.id,port:h[0].id},target:{node:l.id,port:v}};this._state.nodes.push(g),this._state.connections.push(y),this.emit("zn-flow-connect",{detail:{connection:y}}),this._select(g.id),this._commit()}_select(t){this._selectedBranch=null,t&&(this._sideCollapsed=!1),this._selectedNodeId!==t&&(this._selectedNodeId=t,this.emit("zn-flow-selection-change",{detail:{nodeId:t}}))}_onDragStart(t,r){t.dataTransfer&&(this._draggingType=r,t.dataTransfer.setData(Vk,r),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage(Rh(),0,0))}_renderSteps(){return u`
5433
5433
  <aside part="steps" class="steps">
5434
5434
  <div class="title-block">
5435
5435
  <div class="heading">${this.heading||"Flow Builder"}</div>
@@ -5660,7 +5660,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5660
5660
  </div>
5661
5661
  ${this._renderRightPanel()}
5662
5662
  </div>
5663
- `}};we.styles=z(Bk),we.dependencies={"zn-icon":ne,"zn-input":nt,"zn-tabs":ln,"zn-navbar":Ca,"zn-flow-branch-conditions":Dg,"zn-flow-canvas":Ok,"zn-flow-step-group":Pg},c([d({attribute:!1})],we.prototype,"nodeTypes",2),c([d({reflect:!0})],we.prototype,"heading",2),c([d({attribute:"subheading",reflect:!0})],we.prototype,"subheading",2),c([d({attribute:!1})],we.prototype,"errorNodes",2),c([d({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:TI},toAttribute:t=>t===null?null:String(t)}})],we.prototype,"autoSave",2),c([d({attribute:"entrypoints-hint"})],we.prototype,"entrypointsHint",2),c([d({attribute:"triggers-hint"})],we.prototype,"triggersHint",2),c([d({attribute:"actions-hint"})],we.prototype,"actionsHint",2),c([d({attribute:"rules-hint"})],we.prototype,"rulesHint",2),c([R()],we.prototype,"_state",2),c([R()],we.prototype,"_selectedNodeId",2),c([R()],we.prototype,"_selectedBranch",2),c([R()],we.prototype,"_search",2),c([R()],we.prototype,"_activeGroup",2),c([R()],we.prototype,"_stepsCollapsed",2),c([R()],we.prototype,"_sideCollapsed",2),c([R()],we.prototype,"_movingNodeId",2),c([R()],we.prototype,"_picker",2),c([R()],we.prototype,"_draggingType",2),c([R()],we.prototype,"_lastSavedAt",2),c([R()],we.prototype,"_justSaved",2),c([R()],we.prototype,"_statusNow",2),c([R()],we.prototype,"_restorePrompt",2);var cl=we;var AI=cl;cl.define("zn-flow-builder");var Gk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:flex;flex-direction:column;min-height:0;height:100%;--zn-active-nav-background:var(--zn-panel)}.search{padding:12px var(--zn-base-gap) 8px}.body{display:flex;flex-direction:column;flex:1;min-height:0}`;var vn=class extends k{constructor(){super(...arguments);this.searchable=!0;this.searchPlaceholder="Search by step name";this._search="";this._tabObserver=new MutationObserver(()=>this._applyFilter())}connectedCallback(){super.connectedCallback(),this._tabObserver.observe(this,{subtree:!0,attributeFilter:["selected"]})}disconnectedCallback(){this._tabObserver.disconnect(),super.disconnectedCallback()}updated(t){super.updated(t),this._applyFilter()}_inActiveTab(t){return!t.closest("zn-tabs")||!!t.closest("[selected]")}_applyFilter(){let t=this._search.trim().toLowerCase();this.querySelectorAll("zn-flow-step").forEach(r=>{r.hidden=t!==""&&this._inActiveTab(r)&&!(r.textContent??"").toLowerCase().includes(t)}),this.querySelectorAll("zn-flow-step-group").forEach(r=>{let n=Array.from(r.querySelectorAll("zn-flow-step"));r.hidden=t!==""&&this._inActiveTab(r)&&n.length>0&&n.every(a=>a.hidden)})}render(){return u`
5663
+ `}};we.styles=z(Bk),we.dependencies={"zn-icon":ne,"zn-input":nt,"zn-tabs":ln,"zn-navbar":Sa,"zn-flow-branch-conditions":Dg,"zn-flow-canvas":Ok,"zn-flow-step-group":Pg},c([d({attribute:!1})],we.prototype,"nodeTypes",2),c([d({reflect:!0})],we.prototype,"heading",2),c([d({attribute:"subheading",reflect:!0})],we.prototype,"subheading",2),c([d({attribute:!1})],we.prototype,"errorNodes",2),c([d({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:TI},toAttribute:t=>t===null?null:String(t)}})],we.prototype,"autoSave",2),c([d({attribute:"entrypoints-hint"})],we.prototype,"entrypointsHint",2),c([d({attribute:"triggers-hint"})],we.prototype,"triggersHint",2),c([d({attribute:"actions-hint"})],we.prototype,"actionsHint",2),c([d({attribute:"rules-hint"})],we.prototype,"rulesHint",2),c([R()],we.prototype,"_state",2),c([R()],we.prototype,"_selectedNodeId",2),c([R()],we.prototype,"_selectedBranch",2),c([R()],we.prototype,"_search",2),c([R()],we.prototype,"_activeGroup",2),c([R()],we.prototype,"_stepsCollapsed",2),c([R()],we.prototype,"_sideCollapsed",2),c([R()],we.prototype,"_movingNodeId",2),c([R()],we.prototype,"_picker",2),c([R()],we.prototype,"_draggingType",2),c([R()],we.prototype,"_lastSavedAt",2),c([R()],we.prototype,"_justSaved",2),c([R()],we.prototype,"_statusNow",2),c([R()],we.prototype,"_restorePrompt",2);var cl=we;var AI=cl;cl.define("zn-flow-builder");var Gk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:flex;flex-direction:column;min-height:0;height:100%;--zn-active-nav-background:var(--zn-panel)}.search{padding:12px var(--zn-base-gap) 8px}.body{display:flex;flex-direction:column;flex:1;min-height:0}`;var vn=class extends k{constructor(){super(...arguments);this.searchable=!0;this.searchPlaceholder="Search by step name";this._search="";this._tabObserver=new MutationObserver(()=>this._applyFilter())}connectedCallback(){super.connectedCallback(),this._tabObserver.observe(this,{subtree:!0,attributeFilter:["selected"]})}disconnectedCallback(){this._tabObserver.disconnect(),super.disconnectedCallback()}updated(t){super.updated(t),this._applyFilter()}_inActiveTab(t){return!t.closest("zn-tabs")||!!t.closest("[selected]")}_applyFilter(){let t=this._search.trim().toLowerCase();this.querySelectorAll("zn-flow-step").forEach(r=>{r.hidden=t!==""&&this._inActiveTab(r)&&!(r.textContent??"").toLowerCase().includes(t)}),this.querySelectorAll("zn-flow-step-group").forEach(r=>{let n=Array.from(r.querySelectorAll("zn-flow-step"));r.hidden=t!==""&&this._inActiveTab(r)&&n.length>0&&n.every(a=>a.hidden)})}render(){return u`
5664
5664
  ${this.searchable?u`
5665
5665
  <zn-input
5666
5666
  part="search"
@@ -5680,7 +5680,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5680
5680
  <zn-icon src="${this.icon??"circle"}" library="${P(this.iconLibrary)}" size="16"></zn-icon>
5681
5681
  </span>
5682
5682
  <span class="item__label"><slot>${this.label??""}</slot></span>
5683
- `}};xr.styles=z(Wk),xr.dependencies={"zn-icon":ne},c([d()],xr.prototype,"type",2),c([d()],xr.prototype,"label",2),c([d()],xr.prototype,"icon",2),c([d({attribute:"icon-library"})],xr.prototype,"iconLibrary",2),c([d()],xr.prototype,"color",2),c([d()],xr.prototype,"description",2),c([d()],xr.prototype,"inputs",2),c([d()],xr.prototype,"outputs",2),c([d({attribute:"fixed-outputs",type:Boolean})],xr.prototype,"fixedOutputs",2);var LI=xr;xr.define("zn-flow-step");function Wa(o,i){let t=i.slots??0;return i.slotsMax===void 0?t:Math.min(Math.max(o.columns??t,i.slotsMin??1),i.slotsMax)}function Bh(o,i){let t=Wa(o,i);if(t<1)return 0;let r=o.children?.reduce((s,l,p)=>l?p+1:s,0)??0,n=Math.ceil(r/t)||1,a=o.children?.slice((n-1)*t,n*t).filter(Boolean).length===t;return Math.min(t*(a?n+1:n),Math.floor(24/t)*t)}function Zc(o,i){return Array.from({length:Bh(o,i)},(t,r)=>o.children?.[r]??null)}var dl="application/x-zn-page-type",ed="application/x-zn-page-section";function Fg(){return{sections:[]}}var qI=0;function na(){return`s-${Date.now().toString(36)}-${(qI++).toString(36)}`}function II(o,i,t){let r=o?.configTemplate?.content.querySelector(`[name="${CSS.escape(i)}"]`),n=CSS.escape(t);return r?.querySelector(`option[value="${n}"], zn-option[value="${n}"]`)?.textContent?.trim()??""}function Kk(o,i){let t=Object.entries(o.data).filter(r=>typeof r[1]=="string"&&r[1].trim()!=="");for(let[r,n]of t){let a=II(i,r,n);if(a)return a}return t[0]?.[1]??i?.description??""}var Vh=class{constructor(){this.types=new Map}register(i){return this.types.set(i.type,i),this}registerAll(i){return i.forEach(t=>this.register(t)),this}get(i){return this.types.get(i)}has(i){return this.types.has(i)}all(){return Array.from(this.types.values())}categories(){let i=new Map;for(let t of this.all()){let r=t.category??"",n=i.get(r)??[];n.push(t),i.set(r,n)}return i}clear(){this.types.clear()}};var Yk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--section-accent:rgb(var(--zn-color-primary));display:block}:host([hidden]){display:none}.item{display:flex;align-items:center;gap:10px;padding:8px 10px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden;cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.item:hover{border-color:rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}:host(:active) .item{cursor:grabbing}.item__icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;border-radius:6px;background:color-mix(in srgb,var(--section-accent) 15%,transparent);color:var(--section-accent)}.item__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.item__label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:0.8125rem}.item__description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;font-size:0.75rem;line-height:1.3;color:rgb(var(--zn-color-muted-text))}`;var mi=class extends k{constructor(){super(...arguments);this._onDragStart=t=>{!t.dataTransfer||!this.type||(t.dataTransfer.setData(dl,this.type),t.dataTransfer.effectAllowed="copy")}}connectedCallback(){super.connectedCallback(),this.draggable=!0,this.addEventListener("dragstart",this._onDragStart)}disconnectedCallback(){this.removeEventListener("dragstart",this._onDragStart),super.disconnectedCallback()}updated(t){super.updated(t),this.style.setProperty("--section-accent",this.color??"rgb(var(--zn-color-primary))")}render(){return u`
5683
+ `}};xr.styles=z(Wk),xr.dependencies={"zn-icon":ne},c([d()],xr.prototype,"type",2),c([d()],xr.prototype,"label",2),c([d()],xr.prototype,"icon",2),c([d({attribute:"icon-library"})],xr.prototype,"iconLibrary",2),c([d()],xr.prototype,"color",2),c([d()],xr.prototype,"description",2),c([d()],xr.prototype,"inputs",2),c([d()],xr.prototype,"outputs",2),c([d({attribute:"fixed-outputs",type:Boolean})],xr.prototype,"fixedOutputs",2);var LI=xr;xr.define("zn-flow-step");function na(o,i){let t=i.slots??0;if(i.slotsMax===void 0)return t;let r=Math.round(Number(o.columns??NaN));return Math.min(Math.max(Number.isFinite(r)?r:t,i.slotsMin??1),i.slotsMax)}function Bh(o,i){let t=na(o,i);if(t<1)return 0;let r=o.children?.reduce((s,l,p)=>l?p+1:s,0)??0,n=Math.ceil(r/t)||1,a=o.children?.slice((n-1)*t,n*t).filter(Boolean).length===t;return Math.min(t*(a?n+1:n),Math.floor(24/t)*t)}function Zc(o,i){return Array.from({length:Bh(o,i)},(t,r)=>o.children?.[r]??null)}var dl="application/x-zn-page-type",ed="application/x-zn-page-section";function Fg(){return{sections:[]}}var qI=0;function oa(){return`s-${Date.now().toString(36)}-${(qI++).toString(36)}`}function II(o,i,t){let r=o?.configTemplate?.content.querySelector(`[name="${CSS.escape(i)}"]`),n=CSS.escape(t);return r?.querySelector(`option[value="${n}"], zn-option[value="${n}"]`)?.textContent?.trim()??""}function Kk(o,i){let t=Object.entries(o.data).filter(r=>typeof r[1]=="string"&&r[1].trim()!=="");for(let[r,n]of t){let a=II(i,r,n);if(a)return a}return t[0]?.[1]??i?.description??""}var Vh=class{constructor(){this.types=new Map}register(i){return this.types.set(i.type,i),this}registerAll(i){return i.forEach(t=>this.register(t)),this}get(i){return this.types.get(i)}has(i){return this.types.has(i)}all(){return Array.from(this.types.values())}categories(){let i=new Map;for(let t of this.all()){let r=t.category??"",n=i.get(r)??[];n.push(t),i.set(r,n)}return i}clear(){this.types.clear()}};var Yk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--section-accent:rgb(var(--zn-color-primary));display:block}:host([hidden]){display:none}.item{display:flex;align-items:center;gap:10px;padding:8px 10px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden;cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.item:hover{border-color:rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}:host(:active) .item{cursor:grabbing}.item__icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;border-radius:6px;background:color-mix(in srgb,var(--section-accent) 15%,transparent);color:var(--section-accent)}.item__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.item__label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:0.8125rem}.item__description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;font-size:0.75rem;line-height:1.3;color:rgb(var(--zn-color-muted-text))}`;var mi=class extends k{constructor(){super(...arguments);this._onDragStart=t=>{!t.dataTransfer||!this.type||(t.dataTransfer.setData(dl,this.type),t.dataTransfer.effectAllowed="copy")}}connectedCallback(){super.connectedCallback(),this.draggable=!0,this.addEventListener("dragstart",this._onDragStart)}disconnectedCallback(){this.removeEventListener("dragstart",this._onDragStart),super.disconnectedCallback()}updated(t){super.updated(t),this.style.setProperty("--section-accent",this.color??"rgb(var(--zn-color-primary))")}render(){return u`
5684
5684
  <div part="base" class="item">
5685
5685
  <span class="item__icon">
5686
5686
  <zn-icon src="${this.icon??"widgets"}" library="${P(this.iconLibrary)}" size="16"></zn-icon>
@@ -5725,7 +5725,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5725
5725
  @click="${t=>this._action(t,"page-card-remove")}"></zn-button>`}
5726
5726
  </span>
5727
5727
  </div>
5728
- `}};Nr.styles=z(Qk),Nr.dependencies={"zn-button":$e,"zn-icon":ne},c([d()],Nr.prototype,"label",2),c([d()],Nr.prototype,"summary",2),c([d()],Nr.prototype,"icon",2),c([d({attribute:"icon-library"})],Nr.prototype,"iconLibrary",2),c([d()],Nr.prototype,"color",2),c([d({type:Boolean,reflect:!0})],Nr.prototype,"selected",2),c([d({type:Boolean,reflect:!0})],Nr.prototype,"unknown",2),c([d({type:Boolean,reflect:!0})],Nr.prototype,"locked",2);var Vg=Nr;Nr.define("zn-page-section-card");var Xk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{--pb-card-width:1024px;display:block;width:100%;height:100%;min-height:480px;color:rgb(var(--zn-text));container-type:inline-size}.builder{--palette-col:343px;--inspector-col:343px;display:grid;grid-template-columns:var(--palette-col) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden}.builder--inspecting{grid-template-columns:var(--palette-col) minmax(0,1fr) var(--inspector-col)}.builder{transition:grid-template-columns 0.2s ease}.builder--palette-collapsed{--palette-col:0px}.builder--palette-collapsed .palette{border-right:none}.builder--inspector-collapsed{--inspector-col:0px}.builder--inspector-collapsed .inspector{border-left:none}@container (max-width:768px){.builder:not(.builder--palette-collapsed){--palette-col:240px}.builder:not(.builder--inspector-collapsed){--inspector-col:300px}}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.panel-toggle--right{right:-12px}.panel-toggle--right.panel-toggle--tucked{right:8px}.header{grid-row:1;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid rgb(var(--zn-border-color))}.header[hidden]{display:none}.header__group{display:flex;align-items:center;gap:8px}.palette,.canvas-cell,.inspector{grid-row:2;min-height:0;min-width:0;overflow:hidden}.canvas-cell{position:relative;overflow:visible}.palette{display:flex;flex-direction:column;border-right:1px solid rgb(var(--zn-border-color))}.palette__title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.palette__text{min-width:0}.palette__heading{font-size:0.9375rem;font-weight:600}.palette__subheading{margin-top:2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.palette__search{padding:12px 12px 8px}.palette__search::part(form-control-label){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.palette__scroll{flex:1;min-height:0;overflow-y:auto;padding-bottom:16px}.palette__category{display:block;border-top:1px solid rgb(var(--zn-border-color))}.palette__category::part(header){align-items:center !important;padding-block:calc(var(--zn-base-px) * 2) !important}.palette__category::part(caption){font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}.palette__uncategorized{padding:8px var(--zn-base-gap)}zn-page-palette-item{margin-bottom:6px}.canvas{width:100%;height:100%;display:flex;flex-direction:column;align-items:stretch;padding:24px;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),0.08) 1px,transparent 1px) 0 0/20px 20px,rgb(var(--zn-body))}.inspector{display:flex;flex-direction:column;border-left:1px solid rgb(var(--zn-border-color));overflow:hidden;animation:inspector-in 0.18s ease}.inspector-head{display:flex;align-items:center;gap:12px;flex:0 0 auto;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.inspector-head__icon{--section-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:34px;height:34px;border-radius:8px;color:var(--section-accent);background:color-mix(in srgb,var(--section-accent) 15%,transparent)}.inspector-head__text{flex:1 1 auto;min-width:0}.inspector-head__title{font-size:0.875rem;font-weight:600}.inspector-head__type{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-head__title,.inspector-head__type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector-body{--pb-field-label-size:0.8125rem;--pb-field-note-size:0.75rem;--pb-field-gap:22px;--pb-label-gap:6px;--pb-note-gap:5px;--zn-input-label-font-size-medium:var(--pb-field-label-size);--zn-input-label-font-weight:600;--zn-input-label-line-height:1.3;--zn-input-label-color:rgb(var(--zn-text));--zn-input-help-text-font-size-medium:var(--pb-field-note-size);--zn-input-help-text-color:rgb(var(--zn-color-muted-text));--zn-toggle-margin:0;display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:18px 16px 24px;gap:var(--pb-field-gap)}.inspector-body ::part(form-control-label){margin-bottom:var(--pb-label-gap)}.inspector-body ::part(form-control-input){margin:0}.inspector-body ::part(form-control-help-text){margin-top:var(--pb-note-gap)}.inspector-body zn-toggle::part(label){font-size:var(--pb-field-label-size);font-weight:600}.inspector-body zn-toggle::part(description){font-size:var(--pb-field-note-size);margin-top:var(--pb-note-gap)}.inspector-body zn-icon-picker::part(trigger){flex:1 1 auto}.inspector-body>*,.inspector-body .inspector__form>*{margin-block:0}.inspector-body>.inspector__form{display:flex;flex-direction:column;gap:var(--pb-field-gap)}.inspector-hint{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-close{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;padding:0;border:none;border-radius:6px;color:rgb(var(--zn-color-muted-text));background:transparent;cursor:pointer}.inspector-close:hover{color:rgb(var(--zn-text));background:rgb(var(--zn-color-tab))}@keyframes inspector-in{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}.declarations{display:none}.canvas__empty{margin:auto auto 8px;font-size:13px;opacity:0.6}.canvas__empty[hidden]{display:none}.drop{position:relative;display:flex;align-items:center;justify-content:center;width:100%;max-width:var(--pb-card-width);margin:0 auto;min-height:28px;transition:min-height 0.12s ease}.drop--active{min-height:72px}.drop--solo{margin:0 auto auto}.drop--solo.drop--active{margin:auto;min-height:96px}.drop--active::before{content:"";position:absolute;inset:6px 0;border:2px dashed rgb(var(--zn-color-primary));border-radius:8px;background:rgba(var(--zn-color-primary),0.06)}.drop__add{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border:1px solid rgb(var(--zn-border-color));border-radius:50%;background:rgb(var(--zn-panel));color:rgb(var(--zn-text));cursor:pointer;opacity:0;transition:opacity 0.12s ease}.drop:hover .drop__add,.drop--active .drop__add{opacity:1}.container{width:100%;max-width:var(--pb-card-width);margin:0 auto;display:flex;flex-direction:column;gap:8px}.slots{display:grid;grid-template-columns:repeat(var(--pb-slot-columns,3),minmax(0,1fr));gap:8px}.slot{position:relative;min-height:64px}.slot--empty{display:flex;align-items:center;justify-content:center;border:1px dashed rgb(var(--zn-border-color));border-radius:8px;color:rgba(var(--zn-text),0.4);cursor:pointer;transition:border-color 0.12s ease,background 0.12s ease}.slot--empty:hover{border-color:rgb(var(--zn-color-border-active));color:rgba(var(--zn-text),0.7)}.slot--active{border-color:rgb(var(--zn-color-primary));border-style:dashed;background:rgba(var(--zn-color-primary),0.06)}.picker{position:absolute;top:calc(100% - 2px);z-index:2;display:flex;flex-direction:column;min-width:220px;max-height:260px;overflow-y:auto;padding:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 4px 12px rgba(var(--zn-shadow),0.4)}.picker__item{display:flex;align-items:center;gap:8px;padding:7px 8px;border:none;border-radius:6px;background:transparent;color:rgb(var(--zn-text));font-size:13px;text-align:left;cursor:pointer}.picker__item:hover{background:rgba(var(--zn-text),0.08)}.save-status{position:absolute;left:16px;bottom:16px;z-index:5;display:flex;align-items:center;gap:6px;padding:5px 10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);pointer-events:none;transition:color 0.15s ease,border-color 0.15s ease}.save-status--saved{color:rgb(var(--zn-color-success));border-color:color-mix(in srgb,rgb(var(--zn-color-success)) 45%,transparent)}.restore-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:8px;max-width:calc(100% - 32px);padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.restore-banner button{flex:0 0 auto;padding:3px 10px;font-size:0.75rem;font-weight:600;border-radius:6px;cursor:pointer}.restore-banner__restore{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border:none}.restore-banner__restore:hover{filter:brightness(1.1)}.restore-banner__dismiss{color:rgb(var(--zn-color-muted-text));background:transparent;border:none}.restore-banner__dismiss:hover{background:rgb(var(--zn-color-tab))}`;var DI=50,Ug=500,RI=768,NI=5,OI=1440*60*1e3;function Jk(o){let i=Math.floor(o/1e3);if(i<10)return"just now";if(i<60)return`${i}s ago`;let t=Math.floor(i/60);if(t<60)return`${t}m ago`;let r=Math.floor(t/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Ae=class extends k{constructor(){super(...arguments);this.formControlController=new re(this);this.name="";this.form="";this.config="";this.heading="";this.subheading="";this.requiredFirst="";this.sectionTypes=[];this.paletteCollapsed=!1;this.inspectorCollapsed=!1;this.autoSave=null;this.registry=new Vh;this._state=Fg();this._selectedId=null;this._search="";this._pickerIndex=null;this._dragOverIndex=null;this._slotDragOver=null;this._slotPicker=null;this._form=null;this._hasSlot=new Y(this,"header-left","header-right");this._history=[];this._redoStack=[];this.defaultValue=JSON.stringify(Fg());this._wasNarrow=!1;this._resizeObserver=new ResizeObserver(t=>{let r=t[0]?.contentRect.width??0;if(r<=0)return;let n=r<RI;n&&!this._wasNarrow&&(this.paletteCollapsed=!0),this._wasNarrow=n});this._autoSaveTimer=null;this._statusTimer=null;this._justSavedTimer=null;this._restoring=!1;this._lastSavedAt=null;this._justSaved=!1;this._statusNow=Date.now();this._restorePrompt=null;this._autoSaveTick=()=>{if(!(!this._state.sections.length||this._restorePrompt))try{localStorage.setItem(this._autoSaveKey,JSON.stringify({savedAt:Date.now(),state:this._state})),this._lastSavedAt=Date.now(),this._justSaved=!0,this._justSavedTimer!==null&&clearTimeout(this._justSavedTimer),this._justSavedTimer=window.setTimeout(()=>this._justSaved=!1,2500)}catch{}};this.restoreAutoSave=()=>{let t=this._readAutoSave();if(!t)return!1;this._restoring=!0;try{this._applyExternalState(t.state)}finally{this._restoring=!1}return this._restorePrompt=null,!0};this._registerSlottedTemplates=()=>{let t=!1;this.querySelectorAll('template[slot="config"][type]').forEach(r=>{let n=this._typeFromTemplate(r);n&&!this.registry.has(n.type)&&(this.registry.register(n),t=!0)}),t&&this.requestUpdate()};this.undo=()=>{let t=this._history.pop();t&&(this._redoStack.push(structuredClone(this._state)),this._select(null),this._commit(t))};this.redo=()=>{let t=this._redoStack.pop();t&&(this._history.push(structuredClone(this._state)),this._select(null),this._commit(t))};this._onCanvasDragOver=t=>{this._isPageDrag(t)&&(t.preventDefault(),this._dragOverIndex=this._state.sections.length)};this._onCanvasDrop=t=>{this._onZoneDrop(t,this._state.sections.length)};this._onInspectorInput=t=>{let r=this._selectedSection();if(!r)return;let n=t.target,a=n.getAttribute?.("name");if(!a)return;let s=this._isBooleanControl(n,r.data[a])?!!n.checked:n.value;n.getAttribute("type")==="number"&&s!==""&&s!==null&&s!==void 0&&(s=Number(s)),!(typeof s=="number"&&Number.isNaN(s))&&r.data[a]!==s&&this._updateSectionData(r.id,{[a]:s})}}get state(){return structuredClone(this._state)}set state(t){try{this._applyExternalState(t)}catch{console.warn("<zn-page-builder> invalid state")}}get value(){return JSON.stringify(this._state)}set value(t){if(t)try{this._applyExternalState(JSON.parse(t))}catch{console.warn("<zn-page-builder> invalid value JSON")}}get validity(){return pt}get validationMessage(){return""}checkValidity(){return!0}getForm(){return this.formControlController.getForm()}reportValidity(){return!0}setCustomValidity(t=""){}handleConfigChange(){if(this.config)try{this._applyExternalState(JSON.parse(this.config))}catch{console.warn("<zn-page-builder> invalid config JSON")}}handleRequiredFirstChange(){let t=this._requireFirst(this._state.sections);t!==this._state.sections&&(this._state={sections:t},this.defaultValue=JSON.stringify(this._state))}handleSectionTypesChange(){this.registry.registerAll(this.sectionTypes??[]),this.requestUpdate()}registerSectionType(t){return this.registry.register(t),this.requestUpdate(),this}registerSectionTypes(t){return this.registry.registerAll(t),this.requestUpdate(),this}connectedCallback(){super.connectedCallback(),this._registerSlottedTemplates(),this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect(),this._stopAutoSave(),this._justSavedTimer!==null&&(clearTimeout(this._justSavedTimer),this._justSavedTimer=null),super.disconnectedCallback()}get _autoSaveKey(){return`zn-page-builder:${this.id||this.heading||"page"}`}_stopAutoSave(){this._autoSaveTimer!==null&&(clearInterval(this._autoSaveTimer),this._autoSaveTimer=null),this._statusTimer!==null&&(clearInterval(this._statusTimer),this._statusTimer=null)}_restartAutoSave(){if(this._stopAutoSave(),this.autoSave===null)return;let t=this._readAutoSave();t&&(this._lastSavedAt=t.savedAt),this._autoSaveTimer=window.setInterval(this._autoSaveTick,this.autoSave*6e4),this._statusTimer=window.setInterval(()=>this._statusNow=Date.now(),3e4)}_readAutoSave(){try{let t=localStorage.getItem(this._autoSaveKey);if(!t)return null;let r=JSON.parse(t);return!r.state||Date.now()-r.savedAt>OI?(localStorage.removeItem(this._autoSaveKey),null):r}catch{return null}}_offerRestoreIfNewer(){if(this.autoSave===null||this._restoring)return;let t=this._readAutoSave();this._restorePrompt=t&&JSON.stringify(t.state)!==JSON.stringify(this._state)?{savedAt:t.savedAt}:null}willUpdate(t){super.willUpdate(t),t.has("_selectedId")&&this._buildInspectorForm(),t.has("autoSave")&&this._restartAutoSave()}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity()}_typeFromTemplate(t){let r=t.getAttribute("type");return r?{type:r,label:t.getAttribute("label")??r,icon:t.getAttribute("icon")??void 0,iconLibrary:t.getAttribute("icon-library")??void 0,color:t.getAttribute("color")??void 0,category:t.getAttribute("category")??void 0,description:t.getAttribute("description")??void 0,configTemplate:t,...this._slotsFromAttributes(t),accepts:t.getAttribute("accepts")?.split(",").map(n=>n.trim()).filter(Boolean)}:null}_slotsFromAttributes(t){let r=s=>{let l=parseInt(t.getAttribute(s)??"",10);return l>0&&l<=24?l:void 0},n=r("slots");if(!n)return{};let a=r("slots-max");return a===void 0||a<n?{slots:n}:{slots:n,slotsMin:Math.min(r("slots-min")??1,n),slotsMax:a}}_applyExternalState(t){let r=new Set,n=!1,a=(p,h)=>{let m=!p.id||r.has(p.id)?na():p.id;r.add(m),h===0&&(p.children?.length??0)>24&&(n=!0);let f=this.registry.get(p.type),b=f?.slotsMax===void 0?void 0:Wa(p,f);return{id:m,type:p.type,label:p.label,...b===void 0?{}:{columns:b},data:structuredClone(p.data??{}),...p.children&&h===0?{children:p.children.slice(0,24).map(g=>g&&typeof g.type=="string"?a(g,h+1):null)}:{}}},s=(t?.sections??[]).filter(p=>p&&typeof p.type=="string");s.length>Ug&&console.warn(`<zn-page-builder> config has ${s.length} sections; keeping the first ${Ug}`);let l=s.slice(0,Ug).map(p=>a(p,0));n&&console.warn(`<zn-page-builder> some sections had more than ${24} children; extras were dropped`),this._history=[],this._redoStack=[],this._state={sections:this._requireFirst(l)},this.defaultValue=JSON.stringify(this._state),this._selectedId=null,this._pickerIndex=null,this._offerRestoreIfNewer()}get _pinnedId(){let t=this._state.sections[0];return this.requiredFirst&&t?.type===this.requiredFirst?t.id:null}_isPinned(t){return this._pinnedId===t}get _firstFreeIndex(){return this._pinnedId===null?0:1}_requireFirst(t){if(!this.requiredFirst||t[0]?.type===this.requiredFirst)return t;let r=t.findIndex(a=>a.type===this.requiredFirst);if(r===-1)return[{id:na(),type:this.requiredFirst,data:{}},...t];let n=[...t];return n.unshift(...n.splice(r,1)),n}_findSection(t){if(t)for(let r of this._state.sections){if(r.id===t)return r;let n=r.children?.find(a=>a?.id===t);if(n)return n}}_patchSection(t,r){return this._state.sections.map(n=>n.id===t?r(n):n.children?.some(a=>a?.id===t)?{...n,children:n.children.map(a=>a?.id===t?r(a):a)}:n)}_extract(t){let r,n=[];for(let a of this._state.sections){if(a.id===t){r=a;continue}let s=a.children?.findIndex(l=>l?.id===t)??-1;s!==-1?(r=a.children[s]??void 0,n.push({...a,children:a.children.map((l,p)=>p===s?null:l)})):n.push(a)}return[r,n]}_commit(t){this._state=t,this.emit("zn-page-change",{detail:{state:this.state}})}_selectedSection(){return this._findSection(this._selectedId)}_select(t){this._selectedId!==t&&(this._selectedId=t,this._pickerIndex=null,this._slotPicker=null,this.emit("zn-page-selection-change",{detail:{sectionId:t}}))}_pushHistory(){this._history.push(structuredClone(this._state)),this._history.length>DI&&this._history.shift(),this._redoStack=[]}addSection(t,r){if(!this.registry.has(t))return null;this._pushHistory();let n={id:na(),type:t,data:{}},a=[...this._state.sections];return a.splice(Math.max(r??a.length,this._firstFreeIndex),0,n),this._commit({sections:a}),this._select(n.id),n}addSectionToSlot(t,r,n){let a=this.registry.get(t),s=this._findSection(r),l=s?this.registry.get(s.type):void 0;if(!a||a.slots||!s||!l?.slots||n<0||n>=Bh(s,l)||l.accepts&&!l.accepts.includes(t))return null;let p=Zc(s,l);if(p[n])return null;let h={id:na(),type:t,data:{}};return p[n]=h,this._pushHistory(),this._commit({sections:this._patchSection(r,m=>({...m,children:p}))}),this._select(h.id),h}setSectionColumns(t,r){let n=this._findSection(t),a=n?this.registry.get(n.type):void 0;if(!n||a?.slotsMax===void 0)return;let s=Wa({...n,columns:r},a);s!==Wa(n,a)&&(this._pushHistory(),this._commit({sections:this._patchSection(t,l=>({...l,columns:s}))}))}_removeSection(t){if(this._isPinned(t))return;let[r,n]=this._extract(t);r&&(this._pushHistory(),(this._selectedId===t||r.children?.some(a=>a?.id===this._selectedId))&&this._select(null),this._commit({sections:n}))}_duplicateSection(t){let r=this._state.sections.findIndex(n=>n.id===t);if(r!==-1){this._pushHistory();let n=structuredClone(this._state.sections[r]);n.id=na(),n.children=n.children?.map(s=>s?{...s,id:na()}:null);let a=[...this._state.sections];a.splice(r+1,0,n),this._commit({sections:a}),this._select(n.id);return}for(let n of this._state.sections){let a=n.children?.findIndex(m=>m?.id===t)??-1;if(a===-1)continue;let s=this.registry.get(n.type);if(!s?.slots)return;let l=Zc(n,s),p=l.findIndex(m=>!m);if(p===-1)return;let h=structuredClone(l[a]);h.id=na(),l[p]=h,this._pushHistory(),this._commit({sections:this._patchSection(n.id,m=>({...m,children:l}))}),this._select(h.id);return}}_moveSection(t,r){if(this._isPinned(t))return;r=Math.max(r,this._firstFreeIndex);let n=this._state.sections.findIndex(l=>l.id===t);if(n!==-1){let l=r>n?r-1:r;if(l===n)return;this._pushHistory();let p=[...this._state.sections],[h]=p.splice(n,1);p.splice(l,0,h),this._commit({sections:p});return}let[a,s]=this._extract(t);a&&(this._pushHistory(),s.splice(r,0,a),this._commit({sections:s}))}_moveToSlot(t,r,n){let a=this._findSection(t),s=this._findSection(r),l=s?this.registry.get(s.type):void 0;if(!a||!s||!l?.slots||t===r||this._isPinned(t)||this.registry.get(a.type)?.slots||l.accepts&&!l.accepts.includes(a.type)||n<0||n>=Bh(s,l))return;let p=s.children?.[n]??null;if(p?.id===t)return;let h=this._state.sections.some(g=>g.id===t);if(p&&h)return;this._pushHistory();let m=structuredClone(this._state.sections),f=m.find(g=>g.id===r);f.children=Zc(f,l);let b=structuredClone(a);if(h)m.splice(m.findIndex(g=>g.id===t),1);else for(let g of m){let v=g.children?.findIndex(y=>y?.id===t)??-1;if(v!==-1){g.children[v]=p?structuredClone(p):null;break}}f.children[n]=b,this._commit({sections:m})}_onCardDragStart(t,r){t.dataTransfer&&(t.stopPropagation(),t.dataTransfer.setData(ed,r),t.dataTransfer.effectAllowed="move")}_isPageDrag(t){let r=t.dataTransfer?Array.from(t.dataTransfer.types):[];return r.includes(dl)||r.includes(ed)}_onSlotDragOver(t,r,n){this._isPageDrag(t)&&(t.preventDefault(),t.stopPropagation(),this._dragOverIndex=null,this._slotDragOver={containerId:r,index:n})}_onSlotDrop(t,r,n){t.preventDefault(),t.stopPropagation(),this._slotDragOver=null;let a=t.dataTransfer?.getData(dl),s=t.dataTransfer?.getData(ed);a?this.addSectionToSlot(a,r,n):s&&this._moveToSlot(s,r,n)}_onZoneDragOver(t,r){this._isPageDrag(t)&&(t.preventDefault(),t.stopPropagation(),this._dragOverIndex=r)}_onZoneDrop(t,r){t.preventDefault(),t.stopPropagation(),this._dragOverIndex=null;let n=t.dataTransfer?.getData(dl),a=t.dataTransfer?.getData(ed);n?this.addSection(n,r):a&&this._moveSection(a,r)}_onCardKeydown(t,r){t.key==="Delete"||t.key==="Backspace"?(t.preventDefault(),this._removeSection(r)):(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._select(r))}_renderPalette(){let t=this._search.trim().toLowerCase(),r=new Map;for(let[n,a]of this.registry.categories()){let s=t?a.filter(l=>l.label.toLowerCase().includes(t)):a;s.length&&r.set(n,s)}return u`
5728
+ `}};Nr.styles=z(Qk),Nr.dependencies={"zn-button":$e,"zn-icon":ne},c([d()],Nr.prototype,"label",2),c([d()],Nr.prototype,"summary",2),c([d()],Nr.prototype,"icon",2),c([d({attribute:"icon-library"})],Nr.prototype,"iconLibrary",2),c([d()],Nr.prototype,"color",2),c([d({type:Boolean,reflect:!0})],Nr.prototype,"selected",2),c([d({type:Boolean,reflect:!0})],Nr.prototype,"unknown",2),c([d({type:Boolean,reflect:!0})],Nr.prototype,"locked",2);var Vg=Nr;Nr.define("zn-page-section-card");var Xk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{--pb-card-width:1024px;display:block;width:100%;height:100%;min-height:480px;color:rgb(var(--zn-text));container-type:inline-size}.builder{--palette-col:343px;--inspector-col:343px;display:grid;grid-template-columns:var(--palette-col) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden}.builder--inspecting{grid-template-columns:var(--palette-col) minmax(0,1fr) var(--inspector-col)}.builder{transition:grid-template-columns 0.2s ease}.builder--palette-collapsed{--palette-col:0px}.builder--palette-collapsed .palette{border-right:none}.builder--inspector-collapsed{--inspector-col:0px}.builder--inspector-collapsed .inspector{border-left:none}@container (max-width:768px){.builder:not(.builder--palette-collapsed){--palette-col:240px}.builder:not(.builder--inspector-collapsed){--inspector-col:300px}}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.panel-toggle--right{right:-12px}.panel-toggle--right.panel-toggle--tucked{right:8px}.header{grid-row:1;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid rgb(var(--zn-border-color))}.header[hidden]{display:none}.header__group{display:flex;align-items:center;gap:8px}.palette,.canvas-cell,.inspector{grid-row:2;min-height:0;min-width:0;overflow:hidden}.canvas-cell{position:relative;overflow:visible}.palette{display:flex;flex-direction:column;border-right:1px solid rgb(var(--zn-border-color))}.palette__title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.palette__text{min-width:0}.palette__heading{font-size:0.9375rem;font-weight:600}.palette__subheading{margin-top:2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.palette__search{padding:12px 12px 8px}.palette__search::part(form-control-label){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.palette__scroll{flex:1;min-height:0;overflow-y:auto;padding-bottom:16px}.palette__category{display:block;border-top:1px solid rgb(var(--zn-border-color))}.palette__category::part(header){align-items:center !important;padding-block:calc(var(--zn-base-px) * 2) !important}.palette__category::part(caption){font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}.palette__uncategorized{padding:8px var(--zn-base-gap)}zn-page-palette-item{margin-bottom:6px}.canvas{width:100%;height:100%;display:flex;flex-direction:column;align-items:stretch;padding:24px;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),0.08) 1px,transparent 1px) 0 0/20px 20px,rgb(var(--zn-body))}.inspector{display:flex;flex-direction:column;border-left:1px solid rgb(var(--zn-border-color));overflow:hidden;animation:inspector-in 0.18s ease}.inspector-head{display:flex;align-items:center;gap:12px;flex:0 0 auto;padding:16px;border-bottom:1px solid rgb(var(--zn-border-color))}.inspector-head__icon{--section-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:34px;height:34px;border-radius:8px;color:var(--section-accent);background:color-mix(in srgb,var(--section-accent) 15%,transparent)}.inspector-head__text{flex:1 1 auto;min-width:0}.inspector-head__title{font-size:0.875rem;font-weight:600}.inspector-head__type{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-head__title,.inspector-head__type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspector-body{--pb-field-label-size:0.8125rem;--pb-field-note-size:0.75rem;--pb-field-gap:22px;--pb-label-gap:6px;--pb-note-gap:5px;--zn-input-label-font-size-medium:var(--pb-field-label-size);--zn-input-label-font-weight:600;--zn-input-label-line-height:1.3;--zn-input-label-color:rgb(var(--zn-text));--zn-input-help-text-font-size-medium:var(--pb-field-note-size);--zn-input-help-text-color:rgb(var(--zn-color-muted-text));--zn-toggle-margin:0;display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:18px 16px 24px;gap:var(--pb-field-gap)}.inspector-body ::part(form-control-label){margin-bottom:var(--pb-label-gap)}.inspector-body ::part(form-control-input){margin:0}.inspector-body ::part(form-control-help-text){margin-top:var(--pb-note-gap)}.inspector-body zn-toggle::part(label){font-size:var(--pb-field-label-size);font-weight:600}.inspector-body zn-toggle::part(description){font-size:var(--pb-field-note-size);margin-top:var(--pb-note-gap)}.inspector-body zn-icon-picker::part(trigger){flex:1 1 auto}.inspector-body>*,.inspector-body .inspector__form>*{margin-block:0}.inspector-body>.inspector__form{display:flex;flex-direction:column;gap:var(--pb-field-gap)}.inspector-hint{margin:0;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.inspector-close{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;padding:0;border:none;border-radius:6px;color:rgb(var(--zn-color-muted-text));background:transparent;cursor:pointer}.inspector-close:hover{color:rgb(var(--zn-text));background:rgb(var(--zn-color-tab))}@keyframes inspector-in{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}.declarations{display:none}.canvas__empty{margin:auto auto 8px;font-size:13px;opacity:0.6}.canvas__empty[hidden]{display:none}.drop{position:relative;display:flex;align-items:center;justify-content:center;width:100%;max-width:var(--pb-card-width);margin:0 auto;min-height:28px;transition:min-height 0.12s ease}.drop--active{min-height:72px}.drop--solo{margin:0 auto auto}.drop--solo.drop--active{margin:auto;min-height:96px}.drop--active::before{content:"";position:absolute;inset:6px 0;border:2px dashed rgb(var(--zn-color-primary));border-radius:8px;background:rgba(var(--zn-color-primary),0.06)}.drop__add{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border:1px solid rgb(var(--zn-border-color));border-radius:50%;background:rgb(var(--zn-panel));color:rgb(var(--zn-text));cursor:pointer;opacity:0;transition:opacity 0.12s ease}.drop:hover .drop__add,.drop--active .drop__add{opacity:1}.container{width:100%;max-width:var(--pb-card-width);margin:0 auto;display:flex;flex-direction:column;gap:8px}.slots{display:grid;grid-template-columns:repeat(var(--pb-slot-columns,3),minmax(0,1fr));gap:8px}.slot{position:relative;min-height:64px}.slot--empty{display:flex;align-items:center;justify-content:center;border:1px dashed rgb(var(--zn-border-color));border-radius:8px;color:rgba(var(--zn-text),0.4);cursor:pointer;transition:border-color 0.12s ease,background 0.12s ease}.slot--empty:hover{border-color:rgb(var(--zn-color-border-active));color:rgba(var(--zn-text),0.7)}.slot--active{border-color:rgb(var(--zn-color-primary));border-style:dashed;background:rgba(var(--zn-color-primary),0.06)}.picker{position:absolute;top:calc(100% - 2px);z-index:2;display:flex;flex-direction:column;min-width:220px;max-height:260px;overflow-y:auto;padding:6px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 4px 12px rgba(var(--zn-shadow),0.4)}.picker__item{display:flex;align-items:center;gap:8px;padding:7px 8px;border:none;border-radius:6px;background:transparent;color:rgb(var(--zn-text));font-size:13px;text-align:left;cursor:pointer}.picker__item:hover{background:rgba(var(--zn-text),0.08)}.save-status{position:absolute;left:16px;bottom:16px;z-index:5;display:flex;align-items:center;gap:6px;padding:5px 10px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);pointer-events:none;transition:color 0.15s ease,border-color 0.15s ease}.save-status--saved{color:rgb(var(--zn-color-success));border-color:color-mix(in srgb,rgb(var(--zn-color-success)) 45%,transparent)}.restore-banner{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:8px;max-width:calc(100% - 32px);padding:8px 12px;font-size:0.8125rem;color:rgb(var(--zn-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 2px 8px rgba(var(--zn-shadow),0.5)}.restore-banner button{flex:0 0 auto;padding:3px 10px;font-size:0.75rem;font-weight:600;border-radius:6px;cursor:pointer}.restore-banner__restore{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border:none}.restore-banner__restore:hover{filter:brightness(1.1)}.restore-banner__dismiss{color:rgb(var(--zn-color-muted-text));background:transparent;border:none}.restore-banner__dismiss:hover{background:rgb(var(--zn-color-tab))}`;var DI=50,Ug=500,RI=768,NI=5,OI=1440*60*1e3;function Jk(o){let i=Math.floor(o/1e3);if(i<10)return"just now";if(i<60)return`${i}s ago`;let t=Math.floor(i/60);if(t<60)return`${t}m ago`;let r=Math.floor(t/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Ae=class extends k{constructor(){super(...arguments);this.formControlController=new re(this);this.name="";this.form="";this.config="";this.heading="";this.subheading="";this.requiredFirst="";this.sectionTypes=[];this.paletteCollapsed=!1;this.inspectorCollapsed=!1;this.autoSave=null;this.registry=new Vh;this._state=Fg();this._selectedId=null;this._search="";this._pickerIndex=null;this._dragOverIndex=null;this._slotDragOver=null;this._slotPicker=null;this._form=null;this._hasSlot=new Y(this,"header-left","header-right");this._history=[];this._redoStack=[];this.defaultValue=JSON.stringify(Fg());this._wasNarrow=!1;this._resizeObserver=new ResizeObserver(t=>{let r=t[0]?.contentRect.width??0;if(r<=0)return;let n=r<RI;n&&!this._wasNarrow&&(this.paletteCollapsed=!0),this._wasNarrow=n});this._autoSaveTimer=null;this._statusTimer=null;this._justSavedTimer=null;this._restoring=!1;this._lastSavedAt=null;this._justSaved=!1;this._statusNow=Date.now();this._restorePrompt=null;this._autoSaveTick=()=>{if(!(!this._state.sections.length||this._restorePrompt))try{localStorage.setItem(this._autoSaveKey,JSON.stringify({savedAt:Date.now(),state:this._state})),this._lastSavedAt=Date.now(),this._justSaved=!0,this._justSavedTimer!==null&&clearTimeout(this._justSavedTimer),this._justSavedTimer=window.setTimeout(()=>this._justSaved=!1,2500)}catch{}};this.restoreAutoSave=()=>{let t=this._readAutoSave();if(!t)return!1;this._restoring=!0;try{this._applyExternalState(t.state)}finally{this._restoring=!1}return this._restorePrompt=null,!0};this._registerSlottedTemplates=()=>{let t=!1;this.querySelectorAll('template[slot="config"][type]').forEach(r=>{let n=this._typeFromTemplate(r);n&&!this.registry.has(n.type)&&(this.registry.register(n),t=!0)}),t&&this.requestUpdate()};this.undo=()=>{let t=this._history.pop();t&&(this._redoStack.push(structuredClone(this._state)),this._select(null),this._commit(t))};this.redo=()=>{let t=this._redoStack.pop();t&&(this._history.push(structuredClone(this._state)),this._select(null),this._commit(t))};this._onCanvasDragOver=t=>{this._isPageDrag(t)&&(t.preventDefault(),this._dragOverIndex=this._state.sections.length)};this._onCanvasDrop=t=>{this._onZoneDrop(t,this._state.sections.length)};this._onInspectorInput=t=>{let r=this._selectedSection();if(!r)return;let n=t.target,a=n.getAttribute?.("name");if(!a)return;let s=this._isBooleanControl(n,r.data[a])?!!n.checked:n.value;n.getAttribute("type")==="number"&&s!==""&&s!==null&&s!==void 0&&(s=Number(s)),!(typeof s=="number"&&Number.isNaN(s))&&r.data[a]!==s&&this._updateSectionData(r.id,{[a]:s})}}get state(){return structuredClone(this._state)}set state(t){try{this._applyExternalState(t)}catch{console.warn("<zn-page-builder> invalid state")}}get value(){return JSON.stringify(this._state)}set value(t){if(t)try{this._applyExternalState(JSON.parse(t))}catch{console.warn("<zn-page-builder> invalid value JSON")}}get validity(){return pt}get validationMessage(){return""}checkValidity(){return!0}getForm(){return this.formControlController.getForm()}reportValidity(){return!0}setCustomValidity(t=""){}handleConfigChange(){if(this.config)try{this._applyExternalState(JSON.parse(this.config))}catch{console.warn("<zn-page-builder> invalid config JSON")}}handleRequiredFirstChange(){let t=this._requireFirst(this._state.sections);t!==this._state.sections&&(this._state={sections:t},this.defaultValue=JSON.stringify(this._state))}handleSectionTypesChange(){this.registry.registerAll(this.sectionTypes??[]),this.requestUpdate()}registerSectionType(t){return this.registry.register(t),this.requestUpdate(),this}registerSectionTypes(t){return this.registry.registerAll(t),this.requestUpdate(),this}connectedCallback(){super.connectedCallback(),this._registerSlottedTemplates(),this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect(),this._stopAutoSave(),this._justSavedTimer!==null&&(clearTimeout(this._justSavedTimer),this._justSavedTimer=null),super.disconnectedCallback()}get _autoSaveKey(){return`zn-page-builder:${this.id||this.heading||"page"}`}_stopAutoSave(){this._autoSaveTimer!==null&&(clearInterval(this._autoSaveTimer),this._autoSaveTimer=null),this._statusTimer!==null&&(clearInterval(this._statusTimer),this._statusTimer=null)}_restartAutoSave(){if(this._stopAutoSave(),this.autoSave===null)return;let t=this._readAutoSave();t&&(this._lastSavedAt=t.savedAt),this._autoSaveTimer=window.setInterval(this._autoSaveTick,this.autoSave*6e4),this._statusTimer=window.setInterval(()=>this._statusNow=Date.now(),3e4)}_readAutoSave(){try{let t=localStorage.getItem(this._autoSaveKey);if(!t)return null;let r=JSON.parse(t);return!r.state||Date.now()-r.savedAt>OI?(localStorage.removeItem(this._autoSaveKey),null):r}catch{return null}}_offerRestoreIfNewer(){if(this.autoSave===null||this._restoring)return;let t=this._readAutoSave();this._restorePrompt=t&&JSON.stringify(t.state)!==JSON.stringify(this._state)?{savedAt:t.savedAt}:null}willUpdate(t){super.willUpdate(t),t.has("_selectedId")&&this._buildInspectorForm(),t.has("autoSave")&&this._restartAutoSave()}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity()}_typeFromTemplate(t){let r=t.getAttribute("type");return r?{type:r,label:t.getAttribute("label")??r,icon:t.getAttribute("icon")??void 0,iconLibrary:t.getAttribute("icon-library")??void 0,color:t.getAttribute("color")??void 0,category:t.getAttribute("category")??void 0,description:t.getAttribute("description")??void 0,configTemplate:t,...this._slotsFromAttributes(t),accepts:t.getAttribute("accepts")?.split(",").map(n=>n.trim()).filter(Boolean)}:null}_slotsFromAttributes(t){let r=s=>{let l=parseInt(t.getAttribute(s)??"",10);return l>0&&l<=24?l:void 0},n=r("slots");if(!n)return{};let a=r("slots-max");return a===void 0||a<n?{slots:n}:{slots:n,slotsMin:Math.min(r("slots-min")??1,n),slotsMax:a}}_applyExternalState(t){let r=new Set,n=!1,a=(p,h)=>{let m=!p.id||r.has(p.id)?oa():p.id;r.add(m),h===0&&(p.children?.length??0)>24&&(n=!0);let f=this.registry.get(p.type),b=f?.slotsMax===void 0?void 0:na(p,f);return{id:m,type:p.type,label:p.label,...b===void 0?{}:{columns:b},data:structuredClone(p.data??{}),...p.children&&h===0?{children:p.children.slice(0,24).map(g=>g&&typeof g.type=="string"?a(g,h+1):null)}:{}}},s=(t?.sections??[]).filter(p=>p&&typeof p.type=="string");s.length>Ug&&console.warn(`<zn-page-builder> config has ${s.length} sections; keeping the first ${Ug}`);let l=s.slice(0,Ug).map(p=>a(p,0));n&&console.warn(`<zn-page-builder> some sections had more than ${24} children; extras were dropped`),this._history=[],this._redoStack=[],this._state={sections:this._requireFirst(l)},this.defaultValue=JSON.stringify(this._state),this._selectedId=null,this._pickerIndex=null,this._offerRestoreIfNewer()}get _pinnedId(){let t=this._state.sections[0];return this.requiredFirst&&t?.type===this.requiredFirst?t.id:null}_isPinned(t){return this._pinnedId===t}get _firstFreeIndex(){return this._pinnedId===null?0:1}_requireFirst(t){if(!this.requiredFirst||t[0]?.type===this.requiredFirst)return t;let r=t.findIndex(a=>a.type===this.requiredFirst);if(r===-1)return[{id:oa(),type:this.requiredFirst,data:{}},...t];let n=[...t];return n.unshift(...n.splice(r,1)),n}_findSection(t){if(t)for(let r of this._state.sections){if(r.id===t)return r;let n=r.children?.find(a=>a?.id===t);if(n)return n}}_patchSection(t,r){return this._state.sections.map(n=>n.id===t?r(n):n.children?.some(a=>a?.id===t)?{...n,children:n.children.map(a=>a?.id===t?r(a):a)}:n)}_extract(t){let r,n=[];for(let a of this._state.sections){if(a.id===t){r=a;continue}let s=a.children?.findIndex(l=>l?.id===t)??-1;s!==-1?(r=a.children[s]??void 0,n.push({...a,children:a.children.map((l,p)=>p===s?null:l)})):n.push(a)}return[r,n]}_commit(t){this._state=t,this.emit("zn-page-change",{detail:{state:this.state}})}_selectedSection(){return this._findSection(this._selectedId)}_select(t){this._selectedId!==t&&(this._selectedId=t,this._pickerIndex=null,this._slotPicker=null,this.emit("zn-page-selection-change",{detail:{sectionId:t}}))}_pushHistory(){this._history.push(structuredClone(this._state)),this._history.length>DI&&this._history.shift(),this._redoStack=[]}addSection(t,r){if(!this.registry.has(t))return null;this._pushHistory();let n={id:oa(),type:t,data:{}},a=[...this._state.sections];return a.splice(Math.max(r??a.length,this._firstFreeIndex),0,n),this._commit({sections:a}),this._select(n.id),n}addSectionToSlot(t,r,n){let a=this.registry.get(t),s=this._findSection(r),l=s?this.registry.get(s.type):void 0;if(!a||a.slots||!s||!l?.slots||n<0||n>=Bh(s,l)||l.accepts&&!l.accepts.includes(t))return null;let p=Zc(s,l);if(p[n])return null;let h={id:oa(),type:t,data:{}};return p[n]=h,this._pushHistory(),this._commit({sections:this._patchSection(r,m=>({...m,children:p}))}),this._select(h.id),h}setSectionColumns(t,r){let n=this._findSection(t),a=n?this.registry.get(n.type):void 0;if(!n||a?.slotsMax===void 0)return;let s=na({...n,columns:r},a);s!==na(n,a)&&(this._pushHistory(),this._commit({sections:this._patchSection(t,l=>({...l,columns:s}))}))}_onColumnsEntered(t,r){let n=this.registry.get(t.type);if(n?.slotsMax===void 0)return;let a=na({...t,columns:Number(r.value)},n);r.value=String(a),this.setSectionColumns(t.id,a)}_removeSection(t){if(this._isPinned(t))return;let[r,n]=this._extract(t);r&&(this._pushHistory(),(this._selectedId===t||r.children?.some(a=>a?.id===this._selectedId))&&this._select(null),this._commit({sections:n}))}_duplicateSection(t){let r=this._state.sections.findIndex(n=>n.id===t);if(r!==-1){this._pushHistory();let n=structuredClone(this._state.sections[r]);n.id=oa(),n.children=n.children?.map(s=>s?{...s,id:oa()}:null);let a=[...this._state.sections];a.splice(r+1,0,n),this._commit({sections:a}),this._select(n.id);return}for(let n of this._state.sections){let a=n.children?.findIndex(m=>m?.id===t)??-1;if(a===-1)continue;let s=this.registry.get(n.type);if(!s?.slots)return;let l=Zc(n,s),p=l.findIndex(m=>!m);if(p===-1)return;let h=structuredClone(l[a]);h.id=oa(),l[p]=h,this._pushHistory(),this._commit({sections:this._patchSection(n.id,m=>({...m,children:l}))}),this._select(h.id);return}}_moveSection(t,r){if(this._isPinned(t))return;r=Math.max(r,this._firstFreeIndex);let n=this._state.sections.findIndex(l=>l.id===t);if(n!==-1){let l=r>n?r-1:r;if(l===n)return;this._pushHistory();let p=[...this._state.sections],[h]=p.splice(n,1);p.splice(l,0,h),this._commit({sections:p});return}let[a,s]=this._extract(t);a&&(this._pushHistory(),s.splice(r,0,a),this._commit({sections:s}))}_moveToSlot(t,r,n){let a=this._findSection(t),s=this._findSection(r),l=s?this.registry.get(s.type):void 0;if(!a||!s||!l?.slots||t===r||this._isPinned(t)||this.registry.get(a.type)?.slots||l.accepts&&!l.accepts.includes(a.type)||n<0||n>=Bh(s,l))return;let p=s.children?.[n]??null;if(p?.id===t)return;let h=this._state.sections.some(g=>g.id===t);if(p&&h)return;this._pushHistory();let m=structuredClone(this._state.sections),f=m.find(g=>g.id===r);f.children=Zc(f,l);let b=structuredClone(a);if(h)m.splice(m.findIndex(g=>g.id===t),1);else for(let g of m){let v=g.children?.findIndex(y=>y?.id===t)??-1;if(v!==-1){g.children[v]=p?structuredClone(p):null;break}}f.children[n]=b,this._commit({sections:m})}_onCardDragStart(t,r){t.dataTransfer&&(t.stopPropagation(),t.dataTransfer.setData(ed,r),t.dataTransfer.effectAllowed="move")}_isPageDrag(t){let r=t.dataTransfer?Array.from(t.dataTransfer.types):[];return r.includes(dl)||r.includes(ed)}_onSlotDragOver(t,r,n){this._isPageDrag(t)&&(t.preventDefault(),t.stopPropagation(),this._dragOverIndex=null,this._slotDragOver={containerId:r,index:n})}_onSlotDrop(t,r,n){t.preventDefault(),t.stopPropagation(),this._slotDragOver=null;let a=t.dataTransfer?.getData(dl),s=t.dataTransfer?.getData(ed);a?this.addSectionToSlot(a,r,n):s&&this._moveToSlot(s,r,n)}_onZoneDragOver(t,r){this._isPageDrag(t)&&(t.preventDefault(),t.stopPropagation(),this._dragOverIndex=r)}_onZoneDrop(t,r){t.preventDefault(),t.stopPropagation(),this._dragOverIndex=null;let n=t.dataTransfer?.getData(dl),a=t.dataTransfer?.getData(ed);n?this.addSection(n,r):a&&this._moveSection(a,r)}_onCardKeydown(t,r){t.key==="Delete"||t.key==="Backspace"?(t.preventDefault(),this._removeSection(r)):(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._select(r))}_renderPalette(){let t=this._search.trim().toLowerCase(),r=new Map;for(let[n,a]of this.registry.categories()){let s=t?a.filter(l=>l.label.toLowerCase().includes(t)):a;s.length&&r.set(n,s)}return u`
5729
5729
  <aside part="palette" class="palette">
5730
5730
  <div class="palette__title">
5731
5731
  <div class="palette__text">
@@ -5826,7 +5826,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5826
5826
  @page-card-remove="${()=>this._removeSection(t.id)}"></zn-page-section-card>`}_renderCard(t,r){let n=this.registry.get(t.type),a=this._renderSectionCard(t,{over:s=>this._onZoneDragOver(s,r+1),drop:s=>this._onZoneDrop(s,r+1)});return n?.slots?u`
5827
5827
  <div class="container">
5828
5828
  ${a}
5829
- <div class="slots" style="--pb-slot-columns:${Wa(t,n)}">
5829
+ <div class="slots" style="--pb-slot-columns:${na(t,n)}">
5830
5830
  ${Zc(t,n).map((s,l)=>this._renderSlot(t,s,l))}
5831
5831
  </div>
5832
5832
  </div>`:a}_renderSlot(t,r,n){if(r)return this._renderSectionCard(r,{over:l=>this._onSlotDragOver(l,t.id,n),drop:l=>this._onSlotDrop(l,t.id,n)},"slot__card");let a=this._slotDragOver?.containerId===t.id&&this._slotDragOver.index===n,s=this._slotPicker?.containerId===t.id&&this._slotPicker.index===n;return u`
@@ -5903,9 +5903,9 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5903
5903
  label="Slots per row"
5904
5904
  min="${r.slotsMin??1}"
5905
5905
  max="${r.slotsMax}"
5906
- help-text="A new row is added as the last one fills."
5907
- .value="${String(Wa(t,r))}"
5908
- @zn-change="${l=>this.setSectionColumns(t.id,Number(l.target.value))}"></zn-input>`}
5906
+ help-text="Between ${r.slotsMin??1} and ${r.slotsMax}. A new row is added as the last one fills."
5907
+ .value="${String(na(t,r))}"
5908
+ @zn-change="${l=>this._onColumnsEntered(t,l.target)}"></zn-input>`}
5909
5909
  ${r?.renderConfig?r.renderConfig(t,l=>this._updateSectionData(t.id,l)):this._form}
5910
5910
  ${n?"":u`
5911
5911
  <p class="inspector-hint">This section type has no settings.</p>`}
@@ -5928,7 +5928,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
5928
5928
  ${this._renderInspector()}
5929
5929
  <slot name="config" class="declarations" @slotchange="${this._registerSlottedTemplates}"></slot>
5930
5930
  </div>
5931
- `}};Ae.styles=z(Xk),Ae.dependencies={"zn-collapsible":wa,"zn-icon":ne,"zn-input":nt,"zn-page-palette-item":Bg,"zn-page-section-card":Vg},c([d()],Ae.prototype,"name",2),c([d({reflect:!0})],Ae.prototype,"form",2),c([d()],Ae.prototype,"config",2),c([d({reflect:!0})],Ae.prototype,"heading",2),c([d({reflect:!0})],Ae.prototype,"subheading",2),c([d({attribute:"required-first",reflect:!0})],Ae.prototype,"requiredFirst",2),c([d({attribute:!1})],Ae.prototype,"sectionTypes",2),c([d({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],Ae.prototype,"paletteCollapsed",2),c([d({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],Ae.prototype,"inspectorCollapsed",2),c([d({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:NI},toAttribute:t=>t===null?null:String(t)}})],Ae.prototype,"autoSave",2),c([R()],Ae.prototype,"_state",2),c([R()],Ae.prototype,"_selectedId",2),c([R()],Ae.prototype,"_search",2),c([R()],Ae.prototype,"_pickerIndex",2),c([R()],Ae.prototype,"_dragOverIndex",2),c([R()],Ae.prototype,"_slotDragOver",2),c([R()],Ae.prototype,"_slotPicker",2),c([R()],Ae.prototype,"_form",2),c([K("config")],Ae.prototype,"handleConfigChange",1),c([K("requiredFirst")],Ae.prototype,"handleRequiredFirstChange",1),c([K("sectionTypes")],Ae.prototype,"handleSectionTypesChange",1),c([R()],Ae.prototype,"_lastSavedAt",2),c([R()],Ae.prototype,"_justSaved",2),c([R()],Ae.prototype,"_statusNow",2),c([R()],Ae.prototype,"_restorePrompt",2);var PI=Ae;Ae.define("zn-page-builder");var Zk=_`:host{display:block}:host([fill]){flex:1 1 auto;min-height:0}.preview{position:relative;width:100%;overflow-x:hidden;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),var(--zn-preview-frame-dot-opacity,0.08)) 1px,transparent 1px) 0 0/var(--zn-preview-frame-dot-spacing,20px) var(--zn-preview-frame-dot-spacing,20px),rgb(var(--zn-body))}:host([backdrop=panel]) .preview{background:rgb(var(--zn-panel))}.preview__stage{height:100%;max-width:100%;margin:0 auto;overflow:hidden}iframe{display:block;width:100%;border:0;pointer-events:none;background:rgb(var(--zn-body))}:host([interactive]) iframe{pointer-events:auto}.preview__error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:1rem;text-align:center;background:rgba(0,0,0,0.65);color:#fff}`;var e3={desktop:"100%",tablet:"768px",mobile:"390px"},$t=class extends k{constructor(){super(...arguments);this.src="";this.frameOrigin="";this.dataUri="";this.watch="form[data-auto-save]";this.refreshOn="form";this.debounce=400;this.zoom=1;this.minHeight=480;this.fill=!1;this.device="desktop";this.backdrop="dots";this.interactive=!1;this.error="";this._contentHeight=0;this._generation=0;this._watchedForms=new Set;this._debounceTimers=new Map;this._shellSaveRoots=[];this._formObserver=new Oe(this,{target:null,config:{subtree:!0,childList:!0},callback:()=>this._attachForms()});this._onMessage=t=>{if(t.origin!==this.frameOrigin||!this.frame||t.source!==this.frame.contentWindow)return;let r=t.data;switch(r?.type){case"hp-preview:ready":this._sendConfig().then(()=>this._postTheme());break;case"hp-preview:rendered":this.error="",this._applyContentHeight(r.height);break;case"hp-preview:height":this._applyContentHeight(r.height);break;case"hp-preview:error":this._fail(String(r.message??"Preview failed to render"));break}};this._onFrameLoad=()=>{this._contentObserver?.disconnect(),this._contentObserver=void 0;let t;try{t=this.frame?.contentDocument?.documentElement}catch{return}if(!t)return;let r=()=>{let n=t.getBoundingClientRect().height;n>(this.frame?.clientHeight??0)&&this._applyContentHeight(n)};r(),this._contentObserver=new ResizeObserver(r),this._contentObserver.observe(t)};this._onShellSave=t=>{if(t===this._lastShellSave||(this._lastShellSave=t,!this.refreshOn))return;let r=t.composedPath()[0];!(r instanceof HTMLFormElement)||!r.matches(this.refreshOn)||this._watchedForms.has(r)||this._sendConfig()};this._onChange=t=>{let r=t.currentTarget,n=this._debounceTimers.get(r);n&&window.clearTimeout(n),this._debounceTimers.set(r,window.setTimeout(()=>{this._debounceTimers.delete(r),r.isConnected&&r.requestSubmit()},this.debounce))};this._onSubmit=t=>{t.preventDefault(),t.stopImmediatePropagation(),this._save(t.currentTarget)}}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this._onMessage),this._attachForms();let t=this.getRootNode();this._shellSaveRoots=t instanceof ShadowRoot?[document,t]:[document],this._shellSaveRoots.forEach(r=>r.addEventListener("complete",this._onShellSave)),t instanceof Document?this._formObserver.observe(t.body):t instanceof ShadowRoot&&this._formObserver.observe(t)}willUpdate(t){t.has("src")&&this._resetContentHeight()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this._onMessage),this._contentObserver?.disconnect(),this._contentObserver=void 0,this._watchedForms.forEach(t=>this._detachForm(t)),this._watchedForms.clear(),this._shellSaveRoots.forEach(t=>t.removeEventListener("complete",this._onShellSave)),this._shellSaveRoots=[]}_applyContentHeight(t){let r=Math.round(Number(t));!Number.isFinite(r)||r<=0||(this._contentHeight=r)}_resetContentHeight(){this._contentHeight=0,this._contentObserver?.disconnect(),this._contentObserver=void 0}refresh(){return this._sendConfig()}setTheme(t){this._theme=t,this._postTheme()}_postTheme(){!this._theme||!this.frameOrigin||this.frame?.contentWindow?.postMessage({type:"hp-preview:theme",...this._theme},this.frameOrigin)}async _sendConfig(){if(!this.dataUri||!this.frameOrigin)return;let t=++this._generation;try{let r=await fetch(this.dataUri,{credentials:"same-origin",headers:{"x-kx-fetch-style":"download"}});if(!r.ok)throw new Error(await r.text()||r.statusText);let n=await r.json();if(t!==this._generation)return;this.frame?.contentWindow?.postMessage({type:"hp-preview:config",...n},this.frameOrigin)}catch(r){t===this._generation&&this._fail(r instanceof Error?r.message:String(r))}}_attachForms(){let t=this.getRootNode(),r=new Set;t.querySelectorAll(this.watch).forEach(n=>{n instanceof HTMLFormElement&&r.add(n)}),this._watchedForms.forEach(n=>{r.has(n)||(this._detachForm(n),this._watchedForms.delete(n))}),r.forEach(n=>{this._watchedForms.has(n)||(this._watchedForms.add(n),n.addEventListener("submit",this._onSubmit,{capture:!0}),n.addEventListener("zn-change",this._onChange),n.addEventListener("zn-input",this._onChange),n.addEventListener("change",this._onChange))})}_detachForm(t){t.removeEventListener("submit",this._onSubmit,{capture:!0}),t.removeEventListener("zn-change",this._onChange),t.removeEventListener("zn-input",this._onChange),t.removeEventListener("change",this._onChange);let r=this._debounceTimers.get(t);r&&window.clearTimeout(r),this._debounceTimers.delete(t)}async _save(t){try{let r=await fetch(t.getAttribute("action")||"",{method:"POST",credentials:"same-origin",headers:{"x-kx-fetch-style":"download"},body:new FormData(t)}),n=r.headers.get("x-kubex-alert-danger");if(n)throw new Error(n);if(!r.ok)throw new Error(await r.text()||r.statusText);await this._sendConfig()}catch(r){this._fail(r instanceof Error?r.message:String(r))}}_fail(t){this.error=t,this.emit("zn-error",{detail:{message:t}})}render(){let t=this.zoom>0&&this.zoom<=1?this.zoom:1,r=this.error||this.interactive?0:this._contentHeight,n=this.fill?{width:"100%",height:r?`max(${r}px, 100%)`:"100%"}:{width:`${100/t}%`,height:`${Math.max(r,this.minHeight/t)}px`,transform:`scale(${t})`,transformOrigin:"0 0"},a=this.fill?{height:"100%",minHeight:`${this.minHeight}px`}:{height:`${this.minHeight}px`},s={width:e3[this.device]??e3.desktop};return r&&(s.height=this.fill?`max(${r}px, 100%)`:`${Math.max(r*t,this.minHeight)}px`),u`
5931
+ `}};Ae.styles=z(Xk),Ae.dependencies={"zn-collapsible":za,"zn-icon":ne,"zn-input":nt,"zn-page-palette-item":Bg,"zn-page-section-card":Vg},c([d()],Ae.prototype,"name",2),c([d({reflect:!0})],Ae.prototype,"form",2),c([d()],Ae.prototype,"config",2),c([d({reflect:!0})],Ae.prototype,"heading",2),c([d({reflect:!0})],Ae.prototype,"subheading",2),c([d({attribute:"required-first",reflect:!0})],Ae.prototype,"requiredFirst",2),c([d({attribute:!1})],Ae.prototype,"sectionTypes",2),c([d({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],Ae.prototype,"paletteCollapsed",2),c([d({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],Ae.prototype,"inspectorCollapsed",2),c([d({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:NI},toAttribute:t=>t===null?null:String(t)}})],Ae.prototype,"autoSave",2),c([R()],Ae.prototype,"_state",2),c([R()],Ae.prototype,"_selectedId",2),c([R()],Ae.prototype,"_search",2),c([R()],Ae.prototype,"_pickerIndex",2),c([R()],Ae.prototype,"_dragOverIndex",2),c([R()],Ae.prototype,"_slotDragOver",2),c([R()],Ae.prototype,"_slotPicker",2),c([R()],Ae.prototype,"_form",2),c([K("config")],Ae.prototype,"handleConfigChange",1),c([K("requiredFirst")],Ae.prototype,"handleRequiredFirstChange",1),c([K("sectionTypes")],Ae.prototype,"handleSectionTypesChange",1),c([R()],Ae.prototype,"_lastSavedAt",2),c([R()],Ae.prototype,"_justSaved",2),c([R()],Ae.prototype,"_statusNow",2),c([R()],Ae.prototype,"_restorePrompt",2);var PI=Ae;Ae.define("zn-page-builder");var Zk=_`:host{display:block}:host([fill]){flex:1 1 auto;min-height:0}.preview{position:relative;width:100%;overflow-x:hidden;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),var(--zn-preview-frame-dot-opacity,0.08)) 1px,transparent 1px) 0 0/var(--zn-preview-frame-dot-spacing,20px) var(--zn-preview-frame-dot-spacing,20px),rgb(var(--zn-body))}:host([backdrop=panel]) .preview{background:rgb(var(--zn-panel))}.preview__stage{height:100%;max-width:100%;margin:0 auto;overflow:hidden}iframe{display:block;width:100%;border:0;pointer-events:none;background:rgb(var(--zn-body))}:host([interactive]) iframe{pointer-events:auto}.preview__error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:1rem;text-align:center;background:rgba(0,0,0,0.65);color:#fff}`;var e3={desktop:"100%",tablet:"768px",mobile:"390px"},$t=class extends k{constructor(){super(...arguments);this.src="";this.frameOrigin="";this.dataUri="";this.watch="form[data-auto-save]";this.refreshOn="form";this.debounce=400;this.zoom=1;this.minHeight=480;this.fill=!1;this.device="desktop";this.backdrop="dots";this.interactive=!1;this.error="";this._contentHeight=0;this._generation=0;this._watchedForms=new Set;this._debounceTimers=new Map;this._shellSaveRoots=[];this._formObserver=new Oe(this,{target:null,config:{subtree:!0,childList:!0},callback:()=>this._attachForms()});this._onMessage=t=>{if(t.origin!==this.frameOrigin||!this.frame||t.source!==this.frame.contentWindow)return;let r=t.data;switch(r?.type){case"hp-preview:ready":this._sendConfig().then(()=>this._postTheme());break;case"hp-preview:rendered":this.error="",this._applyContentHeight(r.height);break;case"hp-preview:height":this._applyContentHeight(r.height);break;case"hp-preview:error":this._fail(String(r.message??"Preview failed to render"));break}};this._onFrameLoad=()=>{this._contentObserver?.disconnect(),this._contentObserver=void 0;let t;try{t=this.frame?.contentDocument?.documentElement}catch{return}if(!t)return;let r=()=>{let n=t.getBoundingClientRect().height;n>(this.frame?.clientHeight??0)&&this._applyContentHeight(n)};r(),this._contentObserver=new ResizeObserver(r),this._contentObserver.observe(t)};this._onShellSave=t=>{if(t===this._lastShellSave||(this._lastShellSave=t,!this.refreshOn))return;let r=t.composedPath()[0];!(r instanceof HTMLFormElement)||!r.matches(this.refreshOn)||this._watchedForms.has(r)||this._sendConfig()};this._onChange=t=>{let r=t.currentTarget,n=this._debounceTimers.get(r);n&&window.clearTimeout(n),this._debounceTimers.set(r,window.setTimeout(()=>{this._debounceTimers.delete(r),r.isConnected&&r.requestSubmit()},this.debounce))};this._onSubmit=t=>{t.preventDefault(),t.stopImmediatePropagation(),this._save(t.currentTarget)}}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this._onMessage),this._attachForms();let t=this.getRootNode();this._shellSaveRoots=t instanceof ShadowRoot?[document,t]:[document],this._shellSaveRoots.forEach(r=>r.addEventListener("complete",this._onShellSave)),t instanceof Document?this._formObserver.observe(t.body):t instanceof ShadowRoot&&this._formObserver.observe(t)}willUpdate(t){t.has("src")&&this._resetContentHeight()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this._onMessage),this._contentObserver?.disconnect(),this._contentObserver=void 0,this._watchedForms.forEach(t=>this._detachForm(t)),this._watchedForms.clear(),this._shellSaveRoots.forEach(t=>t.removeEventListener("complete",this._onShellSave)),this._shellSaveRoots=[]}_applyContentHeight(t){let r=Math.round(Number(t));!Number.isFinite(r)||r<=0||(this._contentHeight=r)}_resetContentHeight(){this._contentHeight=0,this._contentObserver?.disconnect(),this._contentObserver=void 0}refresh(){return this._sendConfig()}setTheme(t){this._theme=t,this._postTheme()}_postTheme(){!this._theme||!this.frameOrigin||this.frame?.contentWindow?.postMessage({type:"hp-preview:theme",...this._theme},this.frameOrigin)}async _sendConfig(){if(!this.dataUri||!this.frameOrigin)return;let t=++this._generation;try{let r=await fetch(this.dataUri,{credentials:"same-origin",headers:{"x-kx-fetch-style":"download"}});if(!r.ok)throw new Error(await r.text()||r.statusText);let n=await r.json();if(t!==this._generation)return;this.frame?.contentWindow?.postMessage({type:"hp-preview:config",...n},this.frameOrigin)}catch(r){t===this._generation&&this._fail(r instanceof Error?r.message:String(r))}}_attachForms(){let t=this.getRootNode(),r=new Set;t.querySelectorAll(this.watch).forEach(n=>{n instanceof HTMLFormElement&&r.add(n)}),this._watchedForms.forEach(n=>{r.has(n)||(this._detachForm(n),this._watchedForms.delete(n))}),r.forEach(n=>{this._watchedForms.has(n)||(this._watchedForms.add(n),n.addEventListener("submit",this._onSubmit,{capture:!0}),n.addEventListener("zn-change",this._onChange),n.addEventListener("zn-input",this._onChange),n.addEventListener("change",this._onChange))})}_detachForm(t){t.removeEventListener("submit",this._onSubmit,{capture:!0}),t.removeEventListener("zn-change",this._onChange),t.removeEventListener("zn-input",this._onChange),t.removeEventListener("change",this._onChange);let r=this._debounceTimers.get(t);r&&window.clearTimeout(r),this._debounceTimers.delete(t)}async _save(t){try{let r=await fetch(t.getAttribute("action")||"",{method:"POST",credentials:"same-origin",headers:{"x-kx-fetch-style":"download"},body:new FormData(t)}),n=r.headers.get("x-kubex-alert-danger");if(n)throw new Error(n);if(!r.ok)throw new Error(await r.text()||r.statusText);await this._sendConfig()}catch(r){this._fail(r instanceof Error?r.message:String(r))}}_fail(t){this.error=t,this.emit("zn-error",{detail:{message:t}})}render(){let t=this.zoom>0&&this.zoom<=1?this.zoom:1,r=this.error||this.interactive?0:this._contentHeight,n=this.fill?{width:"100%",height:r?`max(${r}px, 100%)`:"100%"}:{width:`${100/t}%`,height:`${Math.max(r,this.minHeight/t)}px`,transform:`scale(${t})`,transformOrigin:"0 0"},a=this.fill?{height:"100%",minHeight:`${this.minHeight}px`}:{height:`${this.minHeight}px`},s={width:e3[this.device]??e3.desktop};return r&&(s.height=this.fill?`max(${r}px, 100%)`:`${Math.max(r*t,this.minHeight)}px`),u`
5932
5932
  <div part="base" class="preview" style="${xt(a)}">
5933
5933
  <div part="stage" class="preview__stage" style="${xt(s)}">
5934
5934
  <iframe part="iframe"
@@ -6067,7 +6067,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
6067
6067
  @zn-error="${this._onFrameError}"></zn-preview-frame>
6068
6068
  </div>
6069
6069
  </div>
6070
- </div>`}};Ie.styles=z(t3),Ie.dependencies={"zn-collapsible":wa,"zn-preview-frame":jg,"zn-icon":ne,"zn-button":$e,"zn-button-group":Ol,"zn-tabs":ln,"zn-navbar":Ca,"zn-select":Be,"zn-option":ot},c([d()],Ie.prototype,"src",2),c([d({attribute:"frame-origin"})],Ie.prototype,"frameOrigin",2),c([d({attribute:"data-uri"})],Ie.prototype,"dataUri",2),c([d({reflect:!0})],Ie.prototype,"mode",2),c([d({reflect:!0})],Ie.prototype,"device",2),c([d({type:Number,attribute:"min-height"})],Ie.prototype,"minHeight",2),c([d({type:Number})],Ie.prototype,"debounce",2),c([d()],Ie.prototype,"action",2),c([d({type:Number,attribute:"save-debounce"})],Ie.prototype,"saveDebounce",2),c([d({type:Array})],Ie.prototype,"sections",2),c([d({attribute:"section-layout"})],Ie.prototype,"sectionLayout",2),c([d({type:Array})],Ie.prototype,"sources",2),c([d({type:Boolean,reflect:!0,attribute:"controls-collapsed"})],Ie.prototype,"controlsCollapsed",2),c([d({type:Boolean,reflect:!0})],Ie.prototype,"standalone",2),c([d({attribute:"controls-caption"})],Ie.prototype,"controlsCaption",2),c([d({attribute:"preview-caption"})],Ie.prototype,"previewCaption",2),c([d({attribute:"submit-label"})],Ie.prototype,"submitLabel",2),c([d({type:Boolean})],Ie.prototype,"manual",2),c([F("zn-preview-frame")],Ie.prototype,"frame",2),c([F("slot:not([name])")],Ie.prototype,"controlsSlot",2),c([es(".editor__section-slot")],Ie.prototype,"sectionSlots",2),c([R()],Ie.prototype,"error",2),c([R()],Ie.prototype,"_submitting",2),c([R()],Ie.prototype,"_sourceIndex",2);var UI=Ie;Ie.define("zn-theme-editor");var r3=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--slot-height:18px;--gutter-width:64px;--open-color:rgb(var(--zn-primary));--reduced-color:rgba(var(--zn-primary),0.3);--closed-color:var(--zn-color-neutral-0);--grid-line-color:rgb(var(--zn-border-color));display:block}.schedule-builder{color:rgb(var(--zn-text));font-size:var(--zn-font-size-small)}.schedule-builder--disabled{opacity:0.6;pointer-events:none}.schedule-builder__toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-x-small)}.schedule-builder__hint{flex:1 1 240px;margin:0;color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-small)}.legend{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin:0;padding:0;list-style:none}.legend__item{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:var(--zn-color-neutral-600);font-size:var(--zn-font-size-x-small);white-space:nowrap}.legend__swatch{width:14px;height:14px;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius-small);background-color:var(--closed-color)}.legend__swatch--open{border-color:transparent;background-color:var(--open-color)}.timezone{flex:0 1 auto;width:260px;max-width:100%}.view-toggle{display:inline-flex;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius)}.view-toggle__button{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border:none;background:none;color:var(--zn-color-neutral-500);cursor:pointer}.view-toggle__button:not(:first-child){border-left:1px solid var(--grid-line-color)}.view-toggle__button:hover{background-color:var(--zn-color-neutral-100)}.view-toggle__button:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}.view-toggle__button--active{background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700)}.view-toggle__button--active:hover{background-color:var(--zn-color-primary-100)}.schedule-builder__calendar{display:flex;align-items:flex-start;gap:var(--zn-spacing-medium)}.calendar{flex:1 1 auto;min-width:0;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius);background-color:var(--zn-panel-background-color)}.calendar__head,.calendar__body{display:grid;grid-template-columns:var(--gutter-width) repeat(var(--columns),minmax(0,1fr))}.calendar__head{border-bottom:1px solid var(--grid-line-color);background-color:var(--zn-color-neutral-50)}.calendar__head-cell{display:flex;flex-direction:column;gap:2px;padding:var(--zn-spacing-x-small);border-left:1px solid var(--grid-line-color);overflow:hidden}.calendar__head-day{font-weight:var(--zn-font-weight-semibold,600);white-space:nowrap}.calendar__head-hours{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar__head-cell--closed .calendar__head-day,.calendar__head-cell--closed .calendar__head-hours{color:var(--zn-color-neutral-400)}.calendar__body{padding-top:var(--zn-spacing-x-small);padding-bottom:var(--zn-spacing-x-small)}.calendar__gutter{display:grid;grid-auto-rows:calc(var(--slot-height) * var(--slots-per-hour))}.calendar__hour{position:relative}.calendar__hour span{position:absolute;top:0;right:var(--zn-spacing-x-small);transform:translateY(-50%);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-variant-numeric:tabular-nums;white-space:nowrap}.calendar__canvas{display:grid;grid-column:span var(--columns);grid-template-columns:repeat(var(--columns),minmax(0,1fr));touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.calendar__col{display:grid;grid-auto-rows:var(--slot-height);border-left:1px solid var(--grid-line-color)}.calendar__slot{border-bottom:1px dotted rgba(var(--zn-border-color),0.6);background-color:var(--closed-color)}.calendar__slot--hour{border-top:1px solid rgba(var(--zn-border-color),0.6)}.calendar__slot--open{background-color:var(--open-color);border-bottom-color:rgba(255,255,255,0.25)}.calendar__slot--reduced{background-color:var(--reduced-color);border-bottom-color:rgba(255,255,255,0.4)}.schedule-builder:not(.schedule-builder--readonly):not(.schedule-builder--disabled) .calendar__canvas{cursor:crosshair}.summary{flex:0 0 260px;max-width:260px}.summary__title{margin:0 0 var(--zn-spacing-x-small);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.06em;text-transform:uppercase}.summary__list{margin:0}.summary__row{display:flex;align-items:baseline;justify-content:space-between;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) 0;border-bottom:1px solid var(--grid-line-color)}.summary__row dt{font-weight:var(--zn-font-weight-semibold,600)}.summary__row dd{margin:0;font-variant-numeric:tabular-nums;text-align:right}.summary__closed{color:var(--zn-color-neutral-400)}.summary__row--total{border-bottom:none}.summary__row--total dd{font-weight:var(--zn-font-weight-semibold,600)}.list{display:flex;flex-direction:column}.list__row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-2x-small);border-bottom:1px solid var(--grid-line-color)}.list__row--editing{border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-50)}.list__day{font-weight:var(--zn-font-weight-semibold,600)}.list__day--closed{color:var(--zn-color-neutral-400)}.list__ranges{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small);min-height:32px}.list__closed{color:var(--zn-color-neutral-400)}.list__note{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small)}.list__chip{padding:6px 10px;border:none;border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700);font-family:inherit;font-size:var(--zn-font-size-small);font-variant-numeric:tabular-nums;cursor:pointer}.list__chip:hover:not([disabled]){background-color:var(--zn-color-primary-200)}.list__chip[disabled]{cursor:default}.list__chip:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:1px}.list__chip--reduced{background-color:var(--zn-color-warning-50);color:var(--zn-color-warning-600)}.list__chip--reduced:hover:not([disabled]){background-color:var(--zn-color-warning-50)}.list__editor{display:flex;align-items:center;gap:var(--zn-spacing-2x-small)}.list__editor zn-input{width:130px}.list__editor-separator{color:var(--zn-color-neutral-500)}.list__remove{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;border-radius:var(--zn-border-radius);background:none;color:var(--zn-color-neutral-500);cursor:pointer}.list__remove:hover{background-color:var(--zn-color-neutral-100);color:rgb(var(--zn-text))}.list__add{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);padding:4px var(--zn-spacing-x-small);border:none;border-radius:var(--zn-border-radius);background:none;color:rgb(var(--zn-text));font-family:inherit;font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.04em;text-transform:uppercase;white-space:nowrap;cursor:pointer}.list__add:hover{background-color:var(--zn-color-neutral-100)}.list__add:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}@media (max-width:900px){.schedule-builder__calendar{flex-direction:column}.summary{flex:1 1 auto;max-width:none;width:100%}}`;var sr=["mon","tue","wed","thu","fri","sat","sun"],pl={mon:{short:"Mon",long:"Monday"},tue:{short:"Tue",long:"Tuesday"},wed:{short:"Wed",long:"Wednesday"},thu:{short:"Thu",long:"Thursday"},fri:{short:"Fri",long:"Friday"},sat:{short:"Sat",long:"Saturday"},sun:{short:"Sun",long:"Sunday"}},$i=1440;function hl(){return{mon:[],tue:[],wed:[],thu:[],fri:[],sat:[],sun:[]}}function fi(o){if(typeof o=="number"&&Number.isFinite(o))return Math.min(Math.max(Math.round(o),0),$i);if(typeof o!="string")return null;let i=/^(\d{1,2}):(\d{2})(?::\d{2})?$/.exec(o.trim());if(!i)return null;let t=Number(i[1]),r=Number(i[2]);if(t>24||r>59)return null;let n=t*60+r;return n>$i?null:n}function Kr(o){let i=Math.min(Math.max(Math.round(o),0),$i),t=Math.floor(i/60),r=i%60;return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function ul(o){let i=[];o.forEach(r=>{let n=fi(r?.start),a=fi(r?.end);n===null||a===null||a<=n||i.push([n,a])}),i.sort((r,n)=>r[0]-n[0]);let t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t.map(([r,n])=>({start:Kr(r),end:Kr(n)}))}function jh(o){if(!Array.isArray(o))return[];let i=[];return o.forEach(t=>{if(typeof t=="string"){let[r,n]=t.split(/\s*[-–—]\s*/);r&&n&&i.push({start:r,end:n});return}if(t&&typeof t=="object"){let r=t;r.start&&r.end&&i.push({start:String(r.start),end:String(r.end)})}}),ul(i)}function jI(o,i,t){return ul([...o,{start:Kr(i),end:Kr(t)}])}function GI(o,i,t){let r=[];return o.forEach(n=>{let a=fi(n.start),s=fi(n.end);if(!(a===null||s===null)){if(s<=i||a>=t){r.push(n);return}a<i&&r.push({start:Kr(a),end:Kr(i)}),s>t&&r.push({start:Kr(t),end:Kr(s)})}}),ul(r)}function WI(o){return o.reduce((i,t)=>{let r=fi(t.start),n=fi(t.end);return r===null||n===null?i:i+(n-r)},0)}function Gh(o){if(!o)return null;let i=/^(\d{4})-(\d{2})-(\d{2})/.exec(o.trim());if(!i)return null;let t=new Date(Number(i[1]),Number(i[2])-1,Number(i[3]));return Number.isNaN(t.getTime())?null:t}function KI(o){return Gh(o.date??o.from)}function YI(o){return Gh(o.to??o.date??o.from)}function i3(o){if(o.days?.length)return o.days.filter(s=>sr.includes(s));let i=KI(o),t=YI(o);if(!i||!t)return[];let r=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((n-r)/864e5)>=sr.length-1?[...sr]:[]}function Gg(o){return o.closed?[]:o.ranges?jh(o.ranges):null}var Ka=7*$i;function ml(o){let i=o.filter(([r,n])=>n>r).sort((r,n)=>r[0]-n[0]),t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t}function Yg(o){let i=[];return sr.forEach((t,r)=>{let n=r*$i;o[t].forEach(a=>{let s=fi(a.start),l=fi(a.end);s===null||l===null||l<=s||i.push([n+s,n+l])})}),ml(i)}function QI(o){let i=hl();return ml(o).forEach(([t,r])=>{let n=t;for(;n<r;){let a=Math.min(Math.floor(n/$i),sr.length-1),s=a*$i,l=Math.min(r,s+$i);i[sr[a]].push({start:Kr(n-s),end:Kr(l-s)}),n=l}}),sr.forEach(t=>{i[t]=ul(i[t])}),i}function o3(o,i){if(!i)return o.map(r=>[r[0],r[1]]);let t=[];return o.forEach(([r,n])=>{let a=Math.min(n-r,Ka),s=((r+i)%Ka+Ka)%Ka,l=s+a;if(l<=Ka){t.push([s,l]);return}t.push([s,Ka]),t.push([0,l-Ka])}),ml(t)}function Wg(o,i){return i?QI(o3(Yg(o),i)):o}function XI(o,i){let t=ml(o);return ml(i).forEach(([r,n])=>{let a=[];t.forEach(([s,l])=>{if(l<=r||s>=n){a.push([s,l]);return}s<r&&a.push([s,r]),l>n&&a.push([n,l])}),t=a}),t}function Kg(o,i){return o.some(([t,r])=>i>=t&&i<r)}function Ya(o,i){if(!o)return 0;try{let t=new Intl.DateTimeFormat("en-US",{timeZone:o,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(i),r=s=>Number(t.find(l=>l.type===s)?.value),n=r("hour")%24,a=Date.UTC(r("year"),r("month")-1,r("day"),n,r("minute"),r("second"));return Math.round((a-i.getTime())/6e4)}catch{return 0}}function JI(o){let i=o<0?"-":"+",t=Math.abs(o);return`UTC${i}${String(Math.floor(t/60)).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}function ZI(o,i){return!o.label&&o.zone==="UTC"?"UTC":`${o.label??o.zone.replace(/_/g," ")} (${JI(Ya(o.zone,i))})`}function n3(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}var eD=[{zone:"America/New_York",label:"US Eastern"},{zone:"America/Chicago",label:"US Central"},{zone:"America/Denver",label:"US Mountain"},{zone:"America/Los_Angeles",label:"US Pacific"},{zone:"Europe/London",label:"UK"},{zone:"Australia/Sydney",label:"Australia"}],tD=["UTC","Pacific/Auckland","Australia/Sydney","Australia/Brisbane","Australia/Adelaide","Australia/Perth","Asia/Tokyo","Asia/Seoul","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Asia/Kolkata","Asia/Karachi","Asia/Dubai","Europe/Moscow","Africa/Nairobi","Europe/Istanbul","Europe/Athens","Africa/Johannesburg","Europe/Berlin","Europe/Paris","Europe/Madrid","Europe/Amsterdam","Europe/Dublin","Europe/London","Europe/Lisbon","Atlantic/Reykjavik","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Halifax","America/New_York","America/Toronto","America/Chicago","America/Mexico_City","America/Denver","America/Phoenix","America/Los_Angeles","America/Vancouver","America/Anchorage","Pacific/Honolulu"],a3=["Pacific/Midway","Pacific/Honolulu","Pacific/Marquesas","America/Anchorage","America/Los_Angeles","America/Vancouver","America/Tijuana","America/Denver","America/Phoenix","America/Edmonton","America/Chicago","America/Mexico_City","America/Winnipeg","America/Guatemala","America/New_York","America/Toronto","America/Bogota","America/Lima","America/Panama","America/Halifax","America/Puerto_Rico","America/Santiago","America/St_Johns","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/Azores","Atlantic/Cape_Verde","UTC","Europe/London","Europe/Dublin","Europe/Lisbon","Atlantic/Reykjavik","Africa/Abidjan","Africa/Casablanca","Africa/Lagos","Africa/Algiers","Europe/Paris","Europe/Berlin","Europe/Madrid","Europe/Rome","Europe/Amsterdam","Europe/Brussels","Europe/Zurich","Europe/Vienna","Europe/Prague","Europe/Warsaw","Europe/Stockholm","Europe/Oslo","Europe/Copenhagen","Europe/Budapest","Europe/Athens","Europe/Helsinki","Europe/Bucharest","Europe/Kyiv","Africa/Cairo","Africa/Johannesburg","Asia/Jerusalem","Europe/Istanbul","Europe/Moscow","Africa/Nairobi","Asia/Riyadh","Asia/Baghdad","Asia/Tehran","Asia/Dubai","Asia/Baku","Asia/Tbilisi","Asia/Kabul","Asia/Karachi","Asia/Tashkent","Asia/Kolkata","Asia/Colombo","Asia/Kathmandu","Asia/Dhaka","Asia/Almaty","Asia/Yangon","Asia/Bangkok","Asia/Jakarta","Asia/Ho_Chi_Minh","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Kuala_Lumpur","Asia/Taipei","Asia/Manila","Asia/Tokyo","Asia/Seoul","Australia/Perth","Australia/Eucla","Australia/Darwin","Australia/Adelaide","Australia/Brisbane","Australia/Sydney","Australia/Melbourne","Australia/Hobart","Pacific/Guam","Pacific/Noumea","Pacific/Auckland","Pacific/Fiji","Pacific/Chatham","Pacific/Tongatapu","Pacific/Kiritimati"];function rD(){return typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):a3}function iD(o){switch(o.toLowerCase()){case"en":return eD;case"offsets":return tD.map(i=>({zone:i}));case"common":return a3.map(i=>({zone:i}));case"all":return rD().map(i=>({zone:i}));default:return[{zone:o}]}}var ve=class extends k{constructor(){super();this.formControlController=new re(this,{assumeInteractionOn:["zn-change"]});this.hasSlotController=new Y(this,"help-text","label");this.localize=new Ht(this);this._days=hl();this._exceptions=[];this._dragPreview=null;this._editing=null;this._dragMode="open";this._dragAnchor=null;this._dragPointerId=null;this.value="";this.defaultValue="";this.label="";this.helpText="";this.view="calendar";this.openLabel="Available";this.closedLabel="Closed";this.noToggle=!1;this.hideSummary=!1;this.startHour=6;this.endHour=22;this.interval=30;this.weekStart="mon";this.timeFormat="24";this.displayTimezone="";this.saveTimezone="";this.showTimezone=!1;this.timezones=[];this.referenceDate="";this.disabled=!1;this.readonly=!1;this.required=!1;this._customValidity="";this._handleCanvasPointerDown=t=>{if(!this._isEditable||t.button!==0)return;let r=this._pointerPosition(t);if(!r)return;let n=this._orderedDays[r.col],a=Yg(this._storedAsShown);this._dragMode=Kg(a,this._slotMinute(n,r.row))?"close":"open",this._dragAnchor=r,this._dragPointerId=t.pointerId,this._dragPreview=this._buildDragPreview(r),this.canvas.setPointerCapture(t.pointerId),t.preventDefault()};this._handleCanvasPointerMove=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t);r&&(this._dragPreview=this._buildDragPreview(r))};this._handleCanvasPointerUp=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t)??this._dragAnchor,n=this._buildDragPreview(r);this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null,this.canvas.hasPointerCapture(t.pointerId)&&this.canvas.releasePointerCapture(t.pointerId),this._commitShownDays(n)};this._handleCanvasPointerCancel=()=>{this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null};this.internals=typeof this.attachInternals=="function"?this.attachInternals():null}get schedule(){return{...this._saveZone?{timezone:this._saveZone}:{},days:this._cloneDays(this._days),exceptions:this._exceptions}}set schedule(t){this._applySchedule(t),this._commit(!1)}get exceptions(){return this._exceptions}set exceptions(t){this._exceptions=Array.isArray(t)?t:[],this._commit(!1)}get validity(){return this.internals?.validity??pt}get validationMessage(){return this.internals?.validationMessage??""}get _isZoned(){return!!(this.saveTimezone||this.displayTimezone||this.showTimezone)}get _saveZone(){return this.saveTimezone?this.saveTimezone:this._isZoned?"UTC":""}get _displayZone(){return this.displayTimezone==="auto"?n3():this.displayTimezone||this._saveZone}get _reference(){return Gh(this.referenceDate)??new Date}get _offsetDelta(){let t=this._saveZone,r=this._displayZone;if(!t||!r||t===r)return 0;let n=this._reference;return Ya(r,n)-Ya(t,n)}get _orderedDays(){let t=Math.max(sr.indexOf(this.weekStart),0);return[...sr.slice(t),...sr.slice(0,t)]}get _interval(){let t=Math.round(this.interval);return[5,10,15,20,30,60].includes(t)?t:30}get _startMinute(){return Math.min(Math.max(Math.round(this.startHour),0),23)*60}get _endMinute(){let t=Math.min(Math.max(Math.round(this.endHour),1),24)*60;return t<=this._startMinute?Math.min(this._startMinute+60,$i):t}get _slotCount(){return Math.ceil((this._endMinute-this._startMinute)/this._interval)}get _slotsPerHour(){return Math.max(Math.round(60/this._interval),1)}get _isEditable(){return!this.disabled&&!this.readonly}get _hasHours(){return sr.some(t=>this._days[t].length>0)}connectedCallback(){super.connectedCallback(),this.value&&this._applySchedule(this.value),this._syncFormValue()}firstUpdated(){this._commit(!1)}handleValueChange(){this.value!==this._serialise()&&(this._applySchedule(this.value),this._syncFormValue())}handleValidationStateChange(){this._syncFormValue()}checkValidity(){return this.internals?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(t){this._customValidity=t,this._syncFormValue(),this.formControlController.updateValidity()}setDay(t,r){sr.includes(t)&&(this._days={...this._days,[t]:jh(r)},this._commit())}getDay(t){return this._days[t]??[]}get displayedDays(){return this._cloneDays(this._storedAsShown)}setDisplayDay(t,r){sr.includes(t)&&this._commitShownDays({...this._storedAsShown,[t]:jh(r)})}formResetCallback(){this._applySchedule(this.defaultValue),this._commit(!1)}formStateRestoreCallback(t){this._applySchedule(t),this._commit(!1)}_cloneDays(t){let r=hl();return sr.forEach(n=>{r[n]=t[n].map(a=>({...a}))}),r}_serialise(){return JSON.stringify(this.schedule)}_applySchedule(t){let r=t;if(typeof t=="string"){let p=t.trim();if(!p){this._days=hl(),this._exceptions=[];return}try{r=JSON.parse(p)}catch{return}}if(!r||typeof r!="object"){this._days=hl(),this._exceptions=[];return}let n=r,a=n.days??n,s=hl();sr.forEach(p=>{s[p]=jh(a?.[p])});let l=typeof n.timezone=="string"?n.timezone:"";if(l&&!this.saveTimezone)this.saveTimezone=l;else if(l&&l!==this.saveTimezone){let p=this._reference,h=Ya(this.saveTimezone,p)-Ya(l,p);this._days=Wg(s,h),this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[];return}this._days=s,this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[]}_syncFormValue(){if(!this.internals)return;this.internals.setFormValue(this.value);let t=this.shadowRoot?.querySelector(".schedule-builder")??void 0;if(this._customValidity){this.internals.setValidity({customError:!0},this._customValidity,t);return}if(this.required&&!this._hasHours){this.internals.setValidity({valueMissing:!0},"Please open at least one period.",t);return}this.internals.setValidity({})}_commit(t=!0){let r=this._serialise();r!==this.value&&(this.value=r),this._syncFormValue(),this.formControlController.updateValidity(),t&&this.emit("zn-change")}_formatTime(t){let r=fi(t);if(r===null)return t;if(this.timeFormat==="24")return Kr(r);let n=Math.floor(r/60)%24,a=r%60,s=n<12?"am":"pm",l=n%12===0?12:n%12;return a===0?`${l}${s}`:`${l}:${String(a).padStart(2,"0")}${s}`}_formatRange(t){return`${this._formatTime(t.start)}\u2013${this._formatTime(t.end)}`}_formatDate(t){let r=Gh(t);return r?this.localize.date(r,{day:"numeric",month:"short"}):""}_summariseDay(t,r){let n=r[t];return n.length?n.map(a=>this._formatRange(a)).join(", "):this.closedLabel}get _storedAsShown(){return Wg(this._days,this._offsetDelta)}get _shownDays(){return this._dragPreview??this._storedAsShown}_commitShownDays(t){this._days=Wg(t,-this._offsetDelta),this._commit()}_exceptionsForDay(t){return this._exceptions.filter(r=>i3(r).includes(t))}get _shownReductionSpans(){let t=[];return this._exceptions.forEach(r=>{let n=Gg(r);n!==null&&i3(r).forEach(a=>{let s=sr.indexOf(a)*$i;t.push(...XI([[s,s+$i]],n.reduce((l,p)=>{let h=fi(p.start),m=fi(p.end);return h!==null&&m!==null&&l.push([s+h,s+m]),l},[])))})}),o3(ml(t),this._offsetDelta)}_slotMinute(t,r){return sr.indexOf(t)*$i+this._startMinute+r*this._interval+this._interval/2}_slotState(t,r,n,a){let s=this._slotMinute(t,r);return Kg(n,s)?Kg(a,s)?"reduced":"open":"closed"}_pointerPosition(t){if(!this.canvas)return null;let r=this.canvas.getBoundingClientRect();if(!r.width||!r.height)return null;let n=this._orderedDays.length,a=Math.floor((t.clientX-r.left)/r.width*n),s=Math.floor((t.clientY-r.top)/r.height*this._slotCount);return{col:Math.min(Math.max(a,0),n-1),row:Math.min(Math.max(s,0),this._slotCount-1)}}_buildDragPreview(t){let r=this._dragAnchor,n=this._cloneDays(this._storedAsShown),a=Math.min(r.col,t.col),s=Math.max(r.col,t.col),l=Math.min(r.row,t.row),p=Math.max(r.row,t.row),h=this._startMinute+l*this._interval,m=Math.min(this._startMinute+(p+1)*this._interval,this._endMinute);return this._orderedDays.slice(a,s+1).forEach(b=>{n[b]=this._dragMode==="open"?jI(n[b],h,m):GI(n[b],h,m)}),n}_handleViewToggle(t){this.view!==t&&(this._editing=null,this.view=t)}_nextFreeRange(t){if(!t.length)return{start:"09:00",end:"17:00"};let r=this._startMinute;for(let a of t){let s=fi(a.start)??0,l=fi(a.end)??0;if(s-r>=60)break;r=Math.max(r,l)}let n=Math.min(r,$i-60);return{start:Kr(n),end:Kr(n+60)}}_handleAddRange(t){if(!this._isEditable)return;let r=this._storedAsShown,n=this._nextFreeRange(r[t]),a=ul([...r[t],n]);this._commitShownDays({...r,[t]:a}),this._editing={day:t,index:Math.max(a.findIndex(s=>s.start===n.start),0)}}_handleRemoveRange(t,r){if(!this._isEditable)return;let n=this._storedAsShown;this._editing=null,this._commitShownDays({...n,[t]:n[t].filter((a,s)=>s!==r)})}_handleRangeEdit(t,r,n,a){let s=fi(a);if(s===null)return;let l=this._storedAsShown,p=ul(l[t].map((h,m)=>m===r?{...h,[n]:Kr(s)}:h));this._editing&&this._editing.day===t&&this._editing.index>=p.length&&(this._editing=p.length?{day:t,index:p.length-1}:null),this._commitShownDays({...l,[t]:p})}_handleEditorKeyDown(t){(t.key==="Enter"||t.key==="Escape")&&(t.preventDefault(),t.stopPropagation(),this._editing=null)}_handleEditorFocusOut(t){let r=t.currentTarget,n=t.relatedTarget;n&&r.contains(n)||(this._editing=null)}_renderToolbar(){let t=!this.noToggle,r=this.view==="calendar";return!t&&!r&&!this.showTimezone?B:u`
6070
+ </div>`}};Ie.styles=z(t3),Ie.dependencies={"zn-collapsible":za,"zn-preview-frame":jg,"zn-icon":ne,"zn-button":$e,"zn-button-group":Ol,"zn-tabs":ln,"zn-navbar":Sa,"zn-select":Be,"zn-option":ot},c([d()],Ie.prototype,"src",2),c([d({attribute:"frame-origin"})],Ie.prototype,"frameOrigin",2),c([d({attribute:"data-uri"})],Ie.prototype,"dataUri",2),c([d({reflect:!0})],Ie.prototype,"mode",2),c([d({reflect:!0})],Ie.prototype,"device",2),c([d({type:Number,attribute:"min-height"})],Ie.prototype,"minHeight",2),c([d({type:Number})],Ie.prototype,"debounce",2),c([d()],Ie.prototype,"action",2),c([d({type:Number,attribute:"save-debounce"})],Ie.prototype,"saveDebounce",2),c([d({type:Array})],Ie.prototype,"sections",2),c([d({attribute:"section-layout"})],Ie.prototype,"sectionLayout",2),c([d({type:Array})],Ie.prototype,"sources",2),c([d({type:Boolean,reflect:!0,attribute:"controls-collapsed"})],Ie.prototype,"controlsCollapsed",2),c([d({type:Boolean,reflect:!0})],Ie.prototype,"standalone",2),c([d({attribute:"controls-caption"})],Ie.prototype,"controlsCaption",2),c([d({attribute:"preview-caption"})],Ie.prototype,"previewCaption",2),c([d({attribute:"submit-label"})],Ie.prototype,"submitLabel",2),c([d({type:Boolean})],Ie.prototype,"manual",2),c([F("zn-preview-frame")],Ie.prototype,"frame",2),c([F("slot:not([name])")],Ie.prototype,"controlsSlot",2),c([es(".editor__section-slot")],Ie.prototype,"sectionSlots",2),c([R()],Ie.prototype,"error",2),c([R()],Ie.prototype,"_submitting",2),c([R()],Ie.prototype,"_sourceIndex",2);var UI=Ie;Ie.define("zn-theme-editor");var r3=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--slot-height:18px;--gutter-width:64px;--open-color:rgb(var(--zn-primary));--reduced-color:rgba(var(--zn-primary),0.3);--closed-color:var(--zn-color-neutral-0);--grid-line-color:rgb(var(--zn-border-color));display:block}.schedule-builder{color:rgb(var(--zn-text));font-size:var(--zn-font-size-small)}.schedule-builder--disabled{opacity:0.6;pointer-events:none}.schedule-builder__toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-x-small)}.schedule-builder__hint{flex:1 1 240px;margin:0;color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-small)}.legend{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin:0;padding:0;list-style:none}.legend__item{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:var(--zn-color-neutral-600);font-size:var(--zn-font-size-x-small);white-space:nowrap}.legend__swatch{width:14px;height:14px;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius-small);background-color:var(--closed-color)}.legend__swatch--open{border-color:transparent;background-color:var(--open-color)}.timezone{flex:0 1 auto;width:260px;max-width:100%}.view-toggle{display:inline-flex;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius)}.view-toggle__button{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border:none;background:none;color:var(--zn-color-neutral-500);cursor:pointer}.view-toggle__button:not(:first-child){border-left:1px solid var(--grid-line-color)}.view-toggle__button:hover{background-color:var(--zn-color-neutral-100)}.view-toggle__button:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}.view-toggle__button--active{background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700)}.view-toggle__button--active:hover{background-color:var(--zn-color-primary-100)}.schedule-builder__calendar{display:flex;align-items:flex-start;gap:var(--zn-spacing-medium)}.calendar{flex:1 1 auto;min-width:0;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius);background-color:var(--zn-panel-background-color)}.calendar__head,.calendar__body{display:grid;grid-template-columns:var(--gutter-width) repeat(var(--columns),minmax(0,1fr))}.calendar__head{border-bottom:1px solid var(--grid-line-color);background-color:var(--zn-color-neutral-50)}.calendar__head-cell{display:flex;flex-direction:column;gap:2px;padding:var(--zn-spacing-x-small);border-left:1px solid var(--grid-line-color);overflow:hidden}.calendar__head-day{font-weight:var(--zn-font-weight-semibold,600);white-space:nowrap}.calendar__head-hours{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar__head-cell--closed .calendar__head-day,.calendar__head-cell--closed .calendar__head-hours{color:var(--zn-color-neutral-400)}.calendar__body{padding-top:var(--zn-spacing-x-small);padding-bottom:var(--zn-spacing-x-small)}.calendar__gutter{display:grid;grid-auto-rows:calc(var(--slot-height) * var(--slots-per-hour))}.calendar__hour{position:relative}.calendar__hour span{position:absolute;top:0;right:var(--zn-spacing-x-small);transform:translateY(-50%);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-variant-numeric:tabular-nums;white-space:nowrap}.calendar__canvas{display:grid;grid-column:span var(--columns);grid-template-columns:repeat(var(--columns),minmax(0,1fr));touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.calendar__col{display:grid;grid-auto-rows:var(--slot-height);border-left:1px solid var(--grid-line-color)}.calendar__slot{border-bottom:1px dotted rgba(var(--zn-border-color),0.6);background-color:var(--closed-color)}.calendar__slot--hour{border-top:1px solid rgba(var(--zn-border-color),0.6)}.calendar__slot--open{background-color:var(--open-color);border-bottom-color:rgba(255,255,255,0.25)}.calendar__slot--reduced{background-color:var(--reduced-color);border-bottom-color:rgba(255,255,255,0.4)}.schedule-builder:not(.schedule-builder--readonly):not(.schedule-builder--disabled) .calendar__canvas{cursor:crosshair}.summary{flex:0 0 260px;max-width:260px}.summary__title{margin:0 0 var(--zn-spacing-x-small);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.06em;text-transform:uppercase}.summary__list{margin:0}.summary__row{display:flex;align-items:baseline;justify-content:space-between;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) 0;border-bottom:1px solid var(--grid-line-color)}.summary__row dt{font-weight:var(--zn-font-weight-semibold,600)}.summary__row dd{margin:0;font-variant-numeric:tabular-nums;text-align:right}.summary__closed{color:var(--zn-color-neutral-400)}.summary__row--total{border-bottom:none}.summary__row--total dd{font-weight:var(--zn-font-weight-semibold,600)}.list{display:flex;flex-direction:column}.list__row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-2x-small);border-bottom:1px solid var(--grid-line-color)}.list__row--editing{border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-50)}.list__day{font-weight:var(--zn-font-weight-semibold,600)}.list__day--closed{color:var(--zn-color-neutral-400)}.list__ranges{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small);min-height:32px}.list__closed{color:var(--zn-color-neutral-400)}.list__note{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small)}.list__chip{padding:6px 10px;border:none;border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700);font-family:inherit;font-size:var(--zn-font-size-small);font-variant-numeric:tabular-nums;cursor:pointer}.list__chip:hover:not([disabled]){background-color:var(--zn-color-primary-200)}.list__chip[disabled]{cursor:default}.list__chip:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:1px}.list__chip--reduced{background-color:var(--zn-color-warning-50);color:var(--zn-color-warning-600)}.list__chip--reduced:hover:not([disabled]){background-color:var(--zn-color-warning-50)}.list__editor{display:flex;align-items:center;gap:var(--zn-spacing-2x-small)}.list__editor zn-input{width:130px}.list__editor-separator{color:var(--zn-color-neutral-500)}.list__remove{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;border-radius:var(--zn-border-radius);background:none;color:var(--zn-color-neutral-500);cursor:pointer}.list__remove:hover{background-color:var(--zn-color-neutral-100);color:rgb(var(--zn-text))}.list__add{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);padding:4px var(--zn-spacing-x-small);border:none;border-radius:var(--zn-border-radius);background:none;color:rgb(var(--zn-text));font-family:inherit;font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.04em;text-transform:uppercase;white-space:nowrap;cursor:pointer}.list__add:hover{background-color:var(--zn-color-neutral-100)}.list__add:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}@media (max-width:900px){.schedule-builder__calendar{flex-direction:column}.summary{flex:1 1 auto;max-width:none;width:100%}}`;var sr=["mon","tue","wed","thu","fri","sat","sun"],pl={mon:{short:"Mon",long:"Monday"},tue:{short:"Tue",long:"Tuesday"},wed:{short:"Wed",long:"Wednesday"},thu:{short:"Thu",long:"Thursday"},fri:{short:"Fri",long:"Friday"},sat:{short:"Sat",long:"Saturday"},sun:{short:"Sun",long:"Sunday"}},$i=1440;function hl(){return{mon:[],tue:[],wed:[],thu:[],fri:[],sat:[],sun:[]}}function fi(o){if(typeof o=="number"&&Number.isFinite(o))return Math.min(Math.max(Math.round(o),0),$i);if(typeof o!="string")return null;let i=/^(\d{1,2}):(\d{2})(?::\d{2})?$/.exec(o.trim());if(!i)return null;let t=Number(i[1]),r=Number(i[2]);if(t>24||r>59)return null;let n=t*60+r;return n>$i?null:n}function Kr(o){let i=Math.min(Math.max(Math.round(o),0),$i),t=Math.floor(i/60),r=i%60;return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function ul(o){let i=[];o.forEach(r=>{let n=fi(r?.start),a=fi(r?.end);n===null||a===null||a<=n||i.push([n,a])}),i.sort((r,n)=>r[0]-n[0]);let t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t.map(([r,n])=>({start:Kr(r),end:Kr(n)}))}function jh(o){if(!Array.isArray(o))return[];let i=[];return o.forEach(t=>{if(typeof t=="string"){let[r,n]=t.split(/\s*[-–—]\s*/);r&&n&&i.push({start:r,end:n});return}if(t&&typeof t=="object"){let r=t;r.start&&r.end&&i.push({start:String(r.start),end:String(r.end)})}}),ul(i)}function jI(o,i,t){return ul([...o,{start:Kr(i),end:Kr(t)}])}function GI(o,i,t){let r=[];return o.forEach(n=>{let a=fi(n.start),s=fi(n.end);if(!(a===null||s===null)){if(s<=i||a>=t){r.push(n);return}a<i&&r.push({start:Kr(a),end:Kr(i)}),s>t&&r.push({start:Kr(t),end:Kr(s)})}}),ul(r)}function WI(o){return o.reduce((i,t)=>{let r=fi(t.start),n=fi(t.end);return r===null||n===null?i:i+(n-r)},0)}function Gh(o){if(!o)return null;let i=/^(\d{4})-(\d{2})-(\d{2})/.exec(o.trim());if(!i)return null;let t=new Date(Number(i[1]),Number(i[2])-1,Number(i[3]));return Number.isNaN(t.getTime())?null:t}function KI(o){return Gh(o.date??o.from)}function YI(o){return Gh(o.to??o.date??o.from)}function i3(o){if(o.days?.length)return o.days.filter(s=>sr.includes(s));let i=KI(o),t=YI(o);if(!i||!t)return[];let r=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((n-r)/864e5)>=sr.length-1?[...sr]:[]}function Gg(o){return o.closed?[]:o.ranges?jh(o.ranges):null}var Ka=7*$i;function ml(o){let i=o.filter(([r,n])=>n>r).sort((r,n)=>r[0]-n[0]),t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t}function Yg(o){let i=[];return sr.forEach((t,r)=>{let n=r*$i;o[t].forEach(a=>{let s=fi(a.start),l=fi(a.end);s===null||l===null||l<=s||i.push([n+s,n+l])})}),ml(i)}function QI(o){let i=hl();return ml(o).forEach(([t,r])=>{let n=t;for(;n<r;){let a=Math.min(Math.floor(n/$i),sr.length-1),s=a*$i,l=Math.min(r,s+$i);i[sr[a]].push({start:Kr(n-s),end:Kr(l-s)}),n=l}}),sr.forEach(t=>{i[t]=ul(i[t])}),i}function o3(o,i){if(!i)return o.map(r=>[r[0],r[1]]);let t=[];return o.forEach(([r,n])=>{let a=Math.min(n-r,Ka),s=((r+i)%Ka+Ka)%Ka,l=s+a;if(l<=Ka){t.push([s,l]);return}t.push([s,Ka]),t.push([0,l-Ka])}),ml(t)}function Wg(o,i){return i?QI(o3(Yg(o),i)):o}function XI(o,i){let t=ml(o);return ml(i).forEach(([r,n])=>{let a=[];t.forEach(([s,l])=>{if(l<=r||s>=n){a.push([s,l]);return}s<r&&a.push([s,r]),l>n&&a.push([n,l])}),t=a}),t}function Kg(o,i){return o.some(([t,r])=>i>=t&&i<r)}function Ya(o,i){if(!o)return 0;try{let t=new Intl.DateTimeFormat("en-US",{timeZone:o,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(i),r=s=>Number(t.find(l=>l.type===s)?.value),n=r("hour")%24,a=Date.UTC(r("year"),r("month")-1,r("day"),n,r("minute"),r("second"));return Math.round((a-i.getTime())/6e4)}catch{return 0}}function JI(o){let i=o<0?"-":"+",t=Math.abs(o);return`UTC${i}${String(Math.floor(t/60)).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}function ZI(o,i){return!o.label&&o.zone==="UTC"?"UTC":`${o.label??o.zone.replace(/_/g," ")} (${JI(Ya(o.zone,i))})`}function n3(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}var eD=[{zone:"America/New_York",label:"US Eastern"},{zone:"America/Chicago",label:"US Central"},{zone:"America/Denver",label:"US Mountain"},{zone:"America/Los_Angeles",label:"US Pacific"},{zone:"Europe/London",label:"UK"},{zone:"Australia/Sydney",label:"Australia"}],tD=["UTC","Pacific/Auckland","Australia/Sydney","Australia/Brisbane","Australia/Adelaide","Australia/Perth","Asia/Tokyo","Asia/Seoul","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Asia/Kolkata","Asia/Karachi","Asia/Dubai","Europe/Moscow","Africa/Nairobi","Europe/Istanbul","Europe/Athens","Africa/Johannesburg","Europe/Berlin","Europe/Paris","Europe/Madrid","Europe/Amsterdam","Europe/Dublin","Europe/London","Europe/Lisbon","Atlantic/Reykjavik","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Halifax","America/New_York","America/Toronto","America/Chicago","America/Mexico_City","America/Denver","America/Phoenix","America/Los_Angeles","America/Vancouver","America/Anchorage","Pacific/Honolulu"],a3=["Pacific/Midway","Pacific/Honolulu","Pacific/Marquesas","America/Anchorage","America/Los_Angeles","America/Vancouver","America/Tijuana","America/Denver","America/Phoenix","America/Edmonton","America/Chicago","America/Mexico_City","America/Winnipeg","America/Guatemala","America/New_York","America/Toronto","America/Bogota","America/Lima","America/Panama","America/Halifax","America/Puerto_Rico","America/Santiago","America/St_Johns","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/Azores","Atlantic/Cape_Verde","UTC","Europe/London","Europe/Dublin","Europe/Lisbon","Atlantic/Reykjavik","Africa/Abidjan","Africa/Casablanca","Africa/Lagos","Africa/Algiers","Europe/Paris","Europe/Berlin","Europe/Madrid","Europe/Rome","Europe/Amsterdam","Europe/Brussels","Europe/Zurich","Europe/Vienna","Europe/Prague","Europe/Warsaw","Europe/Stockholm","Europe/Oslo","Europe/Copenhagen","Europe/Budapest","Europe/Athens","Europe/Helsinki","Europe/Bucharest","Europe/Kyiv","Africa/Cairo","Africa/Johannesburg","Asia/Jerusalem","Europe/Istanbul","Europe/Moscow","Africa/Nairobi","Asia/Riyadh","Asia/Baghdad","Asia/Tehran","Asia/Dubai","Asia/Baku","Asia/Tbilisi","Asia/Kabul","Asia/Karachi","Asia/Tashkent","Asia/Kolkata","Asia/Colombo","Asia/Kathmandu","Asia/Dhaka","Asia/Almaty","Asia/Yangon","Asia/Bangkok","Asia/Jakarta","Asia/Ho_Chi_Minh","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Kuala_Lumpur","Asia/Taipei","Asia/Manila","Asia/Tokyo","Asia/Seoul","Australia/Perth","Australia/Eucla","Australia/Darwin","Australia/Adelaide","Australia/Brisbane","Australia/Sydney","Australia/Melbourne","Australia/Hobart","Pacific/Guam","Pacific/Noumea","Pacific/Auckland","Pacific/Fiji","Pacific/Chatham","Pacific/Tongatapu","Pacific/Kiritimati"];function rD(){return typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):a3}function iD(o){switch(o.toLowerCase()){case"en":return eD;case"offsets":return tD.map(i=>({zone:i}));case"common":return a3.map(i=>({zone:i}));case"all":return rD().map(i=>({zone:i}));default:return[{zone:o}]}}var ve=class extends k{constructor(){super();this.formControlController=new re(this,{assumeInteractionOn:["zn-change"]});this.hasSlotController=new Y(this,"help-text","label");this.localize=new Ht(this);this._days=hl();this._exceptions=[];this._dragPreview=null;this._editing=null;this._dragMode="open";this._dragAnchor=null;this._dragPointerId=null;this.value="";this.defaultValue="";this.label="";this.helpText="";this.view="calendar";this.openLabel="Available";this.closedLabel="Closed";this.noToggle=!1;this.hideSummary=!1;this.startHour=6;this.endHour=22;this.interval=30;this.weekStart="mon";this.timeFormat="24";this.displayTimezone="";this.saveTimezone="";this.showTimezone=!1;this.timezones=[];this.referenceDate="";this.disabled=!1;this.readonly=!1;this.required=!1;this._customValidity="";this._handleCanvasPointerDown=t=>{if(!this._isEditable||t.button!==0)return;let r=this._pointerPosition(t);if(!r)return;let n=this._orderedDays[r.col],a=Yg(this._storedAsShown);this._dragMode=Kg(a,this._slotMinute(n,r.row))?"close":"open",this._dragAnchor=r,this._dragPointerId=t.pointerId,this._dragPreview=this._buildDragPreview(r),this.canvas.setPointerCapture(t.pointerId),t.preventDefault()};this._handleCanvasPointerMove=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t);r&&(this._dragPreview=this._buildDragPreview(r))};this._handleCanvasPointerUp=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t)??this._dragAnchor,n=this._buildDragPreview(r);this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null,this.canvas.hasPointerCapture(t.pointerId)&&this.canvas.releasePointerCapture(t.pointerId),this._commitShownDays(n)};this._handleCanvasPointerCancel=()=>{this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null};this.internals=typeof this.attachInternals=="function"?this.attachInternals():null}get schedule(){return{...this._saveZone?{timezone:this._saveZone}:{},days:this._cloneDays(this._days),exceptions:this._exceptions}}set schedule(t){this._applySchedule(t),this._commit(!1)}get exceptions(){return this._exceptions}set exceptions(t){this._exceptions=Array.isArray(t)?t:[],this._commit(!1)}get validity(){return this.internals?.validity??pt}get validationMessage(){return this.internals?.validationMessage??""}get _isZoned(){return!!(this.saveTimezone||this.displayTimezone||this.showTimezone)}get _saveZone(){return this.saveTimezone?this.saveTimezone:this._isZoned?"UTC":""}get _displayZone(){return this.displayTimezone==="auto"?n3():this.displayTimezone||this._saveZone}get _reference(){return Gh(this.referenceDate)??new Date}get _offsetDelta(){let t=this._saveZone,r=this._displayZone;if(!t||!r||t===r)return 0;let n=this._reference;return Ya(r,n)-Ya(t,n)}get _orderedDays(){let t=Math.max(sr.indexOf(this.weekStart),0);return[...sr.slice(t),...sr.slice(0,t)]}get _interval(){let t=Math.round(this.interval);return[5,10,15,20,30,60].includes(t)?t:30}get _startMinute(){return Math.min(Math.max(Math.round(this.startHour),0),23)*60}get _endMinute(){let t=Math.min(Math.max(Math.round(this.endHour),1),24)*60;return t<=this._startMinute?Math.min(this._startMinute+60,$i):t}get _slotCount(){return Math.ceil((this._endMinute-this._startMinute)/this._interval)}get _slotsPerHour(){return Math.max(Math.round(60/this._interval),1)}get _isEditable(){return!this.disabled&&!this.readonly}get _hasHours(){return sr.some(t=>this._days[t].length>0)}connectedCallback(){super.connectedCallback(),this.value&&this._applySchedule(this.value),this._syncFormValue()}firstUpdated(){this._commit(!1)}handleValueChange(){this.value!==this._serialise()&&(this._applySchedule(this.value),this._syncFormValue())}handleValidationStateChange(){this._syncFormValue()}checkValidity(){return this.internals?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(t){this._customValidity=t,this._syncFormValue(),this.formControlController.updateValidity()}setDay(t,r){sr.includes(t)&&(this._days={...this._days,[t]:jh(r)},this._commit())}getDay(t){return this._days[t]??[]}get displayedDays(){return this._cloneDays(this._storedAsShown)}setDisplayDay(t,r){sr.includes(t)&&this._commitShownDays({...this._storedAsShown,[t]:jh(r)})}formResetCallback(){this._applySchedule(this.defaultValue),this._commit(!1)}formStateRestoreCallback(t){this._applySchedule(t),this._commit(!1)}_cloneDays(t){let r=hl();return sr.forEach(n=>{r[n]=t[n].map(a=>({...a}))}),r}_serialise(){return JSON.stringify(this.schedule)}_applySchedule(t){let r=t;if(typeof t=="string"){let p=t.trim();if(!p){this._days=hl(),this._exceptions=[];return}try{r=JSON.parse(p)}catch{return}}if(!r||typeof r!="object"){this._days=hl(),this._exceptions=[];return}let n=r,a=n.days??n,s=hl();sr.forEach(p=>{s[p]=jh(a?.[p])});let l=typeof n.timezone=="string"?n.timezone:"";if(l&&!this.saveTimezone)this.saveTimezone=l;else if(l&&l!==this.saveTimezone){let p=this._reference,h=Ya(this.saveTimezone,p)-Ya(l,p);this._days=Wg(s,h),this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[];return}this._days=s,this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[]}_syncFormValue(){if(!this.internals)return;this.internals.setFormValue(this.value);let t=this.shadowRoot?.querySelector(".schedule-builder")??void 0;if(this._customValidity){this.internals.setValidity({customError:!0},this._customValidity,t);return}if(this.required&&!this._hasHours){this.internals.setValidity({valueMissing:!0},"Please open at least one period.",t);return}this.internals.setValidity({})}_commit(t=!0){let r=this._serialise();r!==this.value&&(this.value=r),this._syncFormValue(),this.formControlController.updateValidity(),t&&this.emit("zn-change")}_formatTime(t){let r=fi(t);if(r===null)return t;if(this.timeFormat==="24")return Kr(r);let n=Math.floor(r/60)%24,a=r%60,s=n<12?"am":"pm",l=n%12===0?12:n%12;return a===0?`${l}${s}`:`${l}:${String(a).padStart(2,"0")}${s}`}_formatRange(t){return`${this._formatTime(t.start)}\u2013${this._formatTime(t.end)}`}_formatDate(t){let r=Gh(t);return r?this.localize.date(r,{day:"numeric",month:"short"}):""}_summariseDay(t,r){let n=r[t];return n.length?n.map(a=>this._formatRange(a)).join(", "):this.closedLabel}get _storedAsShown(){return Wg(this._days,this._offsetDelta)}get _shownDays(){return this._dragPreview??this._storedAsShown}_commitShownDays(t){this._days=Wg(t,-this._offsetDelta),this._commit()}_exceptionsForDay(t){return this._exceptions.filter(r=>i3(r).includes(t))}get _shownReductionSpans(){let t=[];return this._exceptions.forEach(r=>{let n=Gg(r);n!==null&&i3(r).forEach(a=>{let s=sr.indexOf(a)*$i;t.push(...XI([[s,s+$i]],n.reduce((l,p)=>{let h=fi(p.start),m=fi(p.end);return h!==null&&m!==null&&l.push([s+h,s+m]),l},[])))})}),o3(ml(t),this._offsetDelta)}_slotMinute(t,r){return sr.indexOf(t)*$i+this._startMinute+r*this._interval+this._interval/2}_slotState(t,r,n,a){let s=this._slotMinute(t,r);return Kg(n,s)?Kg(a,s)?"reduced":"open":"closed"}_pointerPosition(t){if(!this.canvas)return null;let r=this.canvas.getBoundingClientRect();if(!r.width||!r.height)return null;let n=this._orderedDays.length,a=Math.floor((t.clientX-r.left)/r.width*n),s=Math.floor((t.clientY-r.top)/r.height*this._slotCount);return{col:Math.min(Math.max(a,0),n-1),row:Math.min(Math.max(s,0),this._slotCount-1)}}_buildDragPreview(t){let r=this._dragAnchor,n=this._cloneDays(this._storedAsShown),a=Math.min(r.col,t.col),s=Math.max(r.col,t.col),l=Math.min(r.row,t.row),p=Math.max(r.row,t.row),h=this._startMinute+l*this._interval,m=Math.min(this._startMinute+(p+1)*this._interval,this._endMinute);return this._orderedDays.slice(a,s+1).forEach(b=>{n[b]=this._dragMode==="open"?jI(n[b],h,m):GI(n[b],h,m)}),n}_handleViewToggle(t){this.view!==t&&(this._editing=null,this.view=t)}_nextFreeRange(t){if(!t.length)return{start:"09:00",end:"17:00"};let r=this._startMinute;for(let a of t){let s=fi(a.start)??0,l=fi(a.end)??0;if(s-r>=60)break;r=Math.max(r,l)}let n=Math.min(r,$i-60);return{start:Kr(n),end:Kr(n+60)}}_handleAddRange(t){if(!this._isEditable)return;let r=this._storedAsShown,n=this._nextFreeRange(r[t]),a=ul([...r[t],n]);this._commitShownDays({...r,[t]:a}),this._editing={day:t,index:Math.max(a.findIndex(s=>s.start===n.start),0)}}_handleRemoveRange(t,r){if(!this._isEditable)return;let n=this._storedAsShown;this._editing=null,this._commitShownDays({...n,[t]:n[t].filter((a,s)=>s!==r)})}_handleRangeEdit(t,r,n,a){let s=fi(a);if(s===null)return;let l=this._storedAsShown,p=ul(l[t].map((h,m)=>m===r?{...h,[n]:Kr(s)}:h));this._editing&&this._editing.day===t&&this._editing.index>=p.length&&(this._editing=p.length?{day:t,index:p.length-1}:null),this._commitShownDays({...l,[t]:p})}_handleEditorKeyDown(t){(t.key==="Enter"||t.key==="Escape")&&(t.preventDefault(),t.stopPropagation(),this._editing=null)}_handleEditorFocusOut(t){let r=t.currentTarget,n=t.relatedTarget;n&&r.contains(n)||(this._editing=null)}_renderToolbar(){let t=!this.noToggle,r=this.view==="calendar";return!t&&!r&&!this.showTimezone?B:u`
6071
6071
  <div class="schedule-builder__toolbar" part="toolbar">
6072
6072
  ${this.view==="calendar"&&this._isEditable?u`<p class="schedule-builder__hint">
6073
6073
  Drag across the grid to open hours; drag over open hours to close them.
@@ -6236,7 +6236,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
6236
6236
  <slot name="help-text">${this.helpText}</slot>
6237
6237
  </div>
6238
6238
  </div>
6239
- `}};ve.styles=[z(Se),z(r3)],ve.formAssociated=!0,ve.dependencies={"zn-icon":ne,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".schedule-builder__canvas")],ve.prototype,"canvas",2),c([R()],ve.prototype,"_days",2),c([R()],ve.prototype,"_exceptions",2),c([R()],ve.prototype,"_dragPreview",2),c([R()],ve.prototype,"_editing",2),c([d({reflect:!0})],ve.prototype,"name",2),c([d()],ve.prototype,"value",2),c([Ce()],ve.prototype,"defaultValue",2),c([d()],ve.prototype,"label",2),c([d({attribute:"help-text"})],ve.prototype,"helpText",2),c([d({reflect:!0})],ve.prototype,"view",2),c([d({attribute:"open-label"})],ve.prototype,"openLabel",2),c([d({attribute:"closed-label"})],ve.prototype,"closedLabel",2),c([d({attribute:"no-toggle",type:Boolean})],ve.prototype,"noToggle",2),c([d({attribute:"hide-summary",type:Boolean})],ve.prototype,"hideSummary",2),c([d({attribute:"start-hour",type:Number})],ve.prototype,"startHour",2),c([d({attribute:"end-hour",type:Number})],ve.prototype,"endHour",2),c([d({type:Number})],ve.prototype,"interval",2),c([d({attribute:"week-start"})],ve.prototype,"weekStart",2),c([d({attribute:"time-format"})],ve.prototype,"timeFormat",2),c([d({attribute:"display-timezone"})],ve.prototype,"displayTimezone",2),c([d({attribute:"save-timezone"})],ve.prototype,"saveTimezone",2),c([d({attribute:"show-timezone",type:Boolean})],ve.prototype,"showTimezone",2),c([d({attribute:"timezones",converter:{fromAttribute:t=>t.split(/[,\s]+/).filter(Boolean),toAttribute:t=>t.join(" ")}})],ve.prototype,"timezones",2),c([d({attribute:"reference-date"})],ve.prototype,"referenceDate",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"required",2),c([d({reflect:!0})],ve.prototype,"form",2),c([K("value")],ve.prototype,"handleValueChange",1),c([K(["required","disabled"])],ve.prototype,"handleValidationStateChange",1);var nD=ve;ve.define("zn-schedule-builder");var s3=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;min-width:0}.thumbnail{position:relative;min-width:0}.thumbnail__link{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);min-width:0;color:inherit;text-decoration:none;outline:none}.thumbnail--interactive .thumbnail__link{cursor:pointer}.thumbnail__media{position:relative;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);width:100%;overflow:hidden;border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));--thumbnail-ring-color:rgb(var(--zn-border-color));--thumbnail-ring-width:1px;--thumbnail-ring-gap:0px}.thumbnail__media::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 var(--thumbnail-ring-width) var(--thumbnail-ring-color),inset 0 0 0 calc(var(--thumbnail-ring-width) + var(--thumbnail-ring-gap)) rgb(var(--zn-body));transition:box-shadow var(--zn-transition-fast) ease-in-out}.thumbnail__image{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__slotted-media{display:grid;place-items:center;width:100%;height:100%}.thumbnail__slotted-media::slotted(img),.thumbnail__slotted-media::slotted(video),.thumbnail__slotted-media::slotted(canvas),.thumbnail__slotted-media::slotted(picture),.thumbnail__slotted-media::slotted(div){width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__caption{font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal);min-width:0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.thumbnail__overlay{position:absolute;top:0;left:0;right:0;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));overflow:hidden;pointer-events:none}.thumbnail__badge,.thumbnail__actions,.thumbnail__preview-button{position:absolute;display:flex;align-items:center;gap:var(--zn-thumbnail-chip-gap,var(--zn-spacing-2x-small))}.thumbnail__badge{bottom:var(--zn-spacing-2x-small);left:var(--zn-spacing-2x-small);pointer-events:none}.thumbnail__actions,.thumbnail__preview-button{pointer-events:auto}.thumbnail__actions{bottom:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__preview-button{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-button:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-button{top:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__badge-items,.thumbnail__action-items{display:contents}.thumbnail__badge-icon,.thumbnail__badge-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:default;opacity:var(--zn-thumbnail-badge-opacity,0.65)}.thumbnail__action-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__action-items::slotted(*):hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail:hover:not(.thumbnail--disabled):not(.thumbnail--selected):not(.thumbnail--active) .thumbnail__media{--thumbnail-ring-color:rgb(var(--zn-primary))}.thumbnail--selected .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-selected-color,rgb(var(--zn-primary)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail--active .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-active-color,rgb(var(--zn-color-success)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail__link:focus-visible .thumbnail__media{outline:var(--zn-focus-ring);outline-offset:calc(-1 * var(--zn-focus-ring-width))}.thumbnail__preview-button:focus-visible,.thumbnail__action-items::slotted(*:focus-visible){outline:var(--zn-focus-ring);outline-offset:1px}.thumbnail--disabled .thumbnail__link{cursor:not-allowed}.thumbnail--disabled .thumbnail__media,.thumbnail--disabled .thumbnail__caption{opacity:0.5}.thumbnail__preview{position:fixed;inset:0;display:none;width:100%;max-width:none;height:100%;max-height:none;padding:0;border:none;background:transparent;overflow:hidden}.thumbnail__preview[open]{display:grid;place-items:center}.thumbnail__preview::backdrop{background:transparent}.thumbnail__preview-backdrop{position:fixed;inset:0;background:var(--zn-overlay-background-color)}.thumbnail__preview-frame{--preview-max-width:var(--zn-thumbnail-preview-max-width,70vw);--preview-max-height:var(--zn-thumbnail-preview-max-height,70vh);--preview-ratio:var(--zn-thumbnail-preview-aspect-ratio,var(--zn-thumbnail-preview-measured-ratio,var(--zn-thumbnail-aspect-ratio,16/9)));position:relative;width:min(var(--preview-max-width),var(--preview-max-height) * (var(--preview-ratio)));max-width:var(--preview-max-width);max-height:var(--preview-max-height);aspect-ratio:var(--preview-ratio);overflow:hidden;border-radius:var(--zn-thumbnail-preview-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));box-shadow:var(--zn-shadow-x-large);transform-origin:center center}.thumbnail__preview-image,.thumbnail__preview-placeholder{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-placeholder{position:absolute;inset:0;-o-object-fit:cover;object-fit:cover;filter:blur(12px);transform:scale(1.05)}.thumbnail__preview-media::slotted(*){position:relative;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-image{position:relative}.thumbnail__preview-close{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-close:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-close{position:absolute;top:var(--zn-spacing-x-small);right:var(--zn-spacing-x-small);min-width:28px;min-height:28px}.thumbnail__preview-close:focus-visible{outline:var(--zn-focus-ring);outline-offset:1px}`;var oD=260,aD="cubic-bezier(0.2, 0, 0.2, 1)",Me=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","image","caption","badge","actions","preview");this.caption="";this.aspectRatio="";this.fullUri="";this.previewTrigger="click";this.previewLabel="Preview";this.value="";this.selected=!1;this.active=!1;this.selectable=!1;this.disabled=!1;this.icon="";this.hideCaption=!1;this._previewOpen=!1;this._previewRatio=0;this._origin=null;this._animating=!1;this._handleClick=t=>{let r=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;this._activate(t,!r)};this._handleKeyDown=t=>{t.key!=="Enter"&&t.key!==" "||this._isLink()&&t.key==="Enter"||(t.preventDefault(),this._activate(t,!0))};this._handlePreviewButtonClick=t=>{t.preventDefault(),t.stopPropagation(),this.showPreview()};this._handlePreviewCancel=t=>{t.preventDefault(),this.hidePreview()};this._handleBackdropClick=()=>{this.hidePreview()};this._handlePreviewImageLoad=t=>{let r=t.target;if(!r.naturalWidth||!r.naturalHeight)return;let n=r.naturalWidth/r.naturalHeight;this._previewRatio&&Math.abs(n-this._previewRatio)/this._previewRatio<.01||(this._previewRatio=n)}}disconnectedCallback(){super.disconnectedCallback(),this._previewOpen&&(this._preview?.close(),this._previewOpen=!1),za(this)}_isLink(){return!!this.href&&!this.disabled}get _previewable(){return(!!this.fullUri||this.hasSlotController.test("preview"))&&!this.disabled}get _previewOnActivate(){return this._previewable&&this.previewTrigger==="click"}_resolveRatio(){let t=[this._previewImage,this._image];for(let n of t)if(n?.naturalWidth&&n.naturalHeight)return n.naturalWidth/n.naturalHeight;let r=this._media?.getBoundingClientRect();return r?.width&&r.height?r.width/r.height:0}async showPreview(){!this._previewable||this._previewOpen||this._animating||(this._origin=this._media?.getBoundingClientRect()??null,this._previewRatio=this._resolveRatio(),this.emit("zn-show"),this._previewOpen=!0,await this.updateComplete,this._preview&&(this._preview.showModal(),Kv(this),await this._animatePreview("in"),this._previewClose?.focus()))}async hidePreview(){!this._previewOpen||this._animating||(await this._animatePreview("out"),this._preview?.close(),this._previewOpen=!1,za(this),this.emit("zn-close"))}async _animatePreview(t){let r=this._previewFrame,n=this._previewBackdrop;if(!r||!n)return;this._animating=!0;let a=t==="in"?this._origin:this._media?.getBoundingClientRect()??this._origin,s=[{transform:this._collapsedTransform(a,r.getBoundingClientRect()),opacity:"0.4"},{transform:"none",opacity:"1"}],l=[{opacity:"0"},{opacity:"1"}],p={duration:oD,easing:aD},h=t==="in"?s:[...s].reverse(),m=t==="in"?l:[...l].reverse();await Promise.all([yi(r,h,p),yi(n,m,p)]),this._animating=!1}_collapsedTransform(t,r){if(!t||!r.width||!r.height||Vu())return"scale(0.94)";let n=Math.max(t.width/r.width,.01),a=Math.max(t.height/r.height,.01),s=t.left+t.width/2-(r.left+r.width/2),l=t.top+t.height/2-(r.top+r.height/2);return`translate(${s}px, ${l}px) scale(${n}, ${a})`}_activate(t,r){if(this.disabled){t.preventDefault(),t.stopPropagation();return}if(this.emit("zn-select",{detail:{item:this}}).defaultPrevented){t.preventDefault();return}r&&this._previewOnActivate&&(t.preventDefault(),this.showPreview())}render(){let t=this._isLink(),r=this._previewable,n=r&&this.previewTrigger==="button",a=t||this.selectable||this._previewOnActivate,s=t?Ai`a`:Ai`div`,l=this.hasSlotController.test("image"),p=this.hasSlotController.test("badge")||!!this.icon,h=this.hasSlotController.test("actions"),m=p||h||n,f=!this.hideCaption&&(!!this.caption||this.hasSlotController.test("caption"));return ke`
6239
+ `}};ve.styles=[z(Se),z(r3)],ve.formAssociated=!0,ve.dependencies={"zn-icon":ne,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".schedule-builder__canvas")],ve.prototype,"canvas",2),c([R()],ve.prototype,"_days",2),c([R()],ve.prototype,"_exceptions",2),c([R()],ve.prototype,"_dragPreview",2),c([R()],ve.prototype,"_editing",2),c([d({reflect:!0})],ve.prototype,"name",2),c([d()],ve.prototype,"value",2),c([Ce()],ve.prototype,"defaultValue",2),c([d()],ve.prototype,"label",2),c([d({attribute:"help-text"})],ve.prototype,"helpText",2),c([d({reflect:!0})],ve.prototype,"view",2),c([d({attribute:"open-label"})],ve.prototype,"openLabel",2),c([d({attribute:"closed-label"})],ve.prototype,"closedLabel",2),c([d({attribute:"no-toggle",type:Boolean})],ve.prototype,"noToggle",2),c([d({attribute:"hide-summary",type:Boolean})],ve.prototype,"hideSummary",2),c([d({attribute:"start-hour",type:Number})],ve.prototype,"startHour",2),c([d({attribute:"end-hour",type:Number})],ve.prototype,"endHour",2),c([d({type:Number})],ve.prototype,"interval",2),c([d({attribute:"week-start"})],ve.prototype,"weekStart",2),c([d({attribute:"time-format"})],ve.prototype,"timeFormat",2),c([d({attribute:"display-timezone"})],ve.prototype,"displayTimezone",2),c([d({attribute:"save-timezone"})],ve.prototype,"saveTimezone",2),c([d({attribute:"show-timezone",type:Boolean})],ve.prototype,"showTimezone",2),c([d({attribute:"timezones",converter:{fromAttribute:t=>t.split(/[,\s]+/).filter(Boolean),toAttribute:t=>t.join(" ")}})],ve.prototype,"timezones",2),c([d({attribute:"reference-date"})],ve.prototype,"referenceDate",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"required",2),c([d({reflect:!0})],ve.prototype,"form",2),c([K("value")],ve.prototype,"handleValueChange",1),c([K(["required","disabled"])],ve.prototype,"handleValidationStateChange",1);var nD=ve;ve.define("zn-schedule-builder");var s3=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;min-width:0}.thumbnail{position:relative;min-width:0}.thumbnail__link{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);min-width:0;color:inherit;text-decoration:none;outline:none}.thumbnail--interactive .thumbnail__link{cursor:pointer}.thumbnail__media{position:relative;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);width:100%;overflow:hidden;border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));--thumbnail-ring-color:rgb(var(--zn-border-color));--thumbnail-ring-width:1px;--thumbnail-ring-gap:0px}.thumbnail__media::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 var(--thumbnail-ring-width) var(--thumbnail-ring-color),inset 0 0 0 calc(var(--thumbnail-ring-width) + var(--thumbnail-ring-gap)) rgb(var(--zn-body));transition:box-shadow var(--zn-transition-fast) ease-in-out}.thumbnail__image{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__slotted-media{display:grid;place-items:center;width:100%;height:100%}.thumbnail__slotted-media::slotted(img),.thumbnail__slotted-media::slotted(video),.thumbnail__slotted-media::slotted(canvas),.thumbnail__slotted-media::slotted(picture),.thumbnail__slotted-media::slotted(div){width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__caption{font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal);min-width:0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.thumbnail__overlay{position:absolute;top:0;left:0;right:0;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));overflow:hidden;pointer-events:none}.thumbnail__badge,.thumbnail__actions,.thumbnail__preview-button{position:absolute;display:flex;align-items:center;gap:var(--zn-thumbnail-chip-gap,var(--zn-spacing-2x-small))}.thumbnail__badge{bottom:var(--zn-spacing-2x-small);left:var(--zn-spacing-2x-small);pointer-events:none}.thumbnail__actions,.thumbnail__preview-button{pointer-events:auto}.thumbnail__actions{bottom:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__preview-button{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-button:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-button{top:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__badge-items,.thumbnail__action-items{display:contents}.thumbnail__badge-icon,.thumbnail__badge-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:default;opacity:var(--zn-thumbnail-badge-opacity,0.65)}.thumbnail__action-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__action-items::slotted(*):hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail:hover:not(.thumbnail--disabled):not(.thumbnail--selected):not(.thumbnail--active) .thumbnail__media{--thumbnail-ring-color:rgb(var(--zn-primary))}.thumbnail--selected .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-selected-color,rgb(var(--zn-primary)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail--active .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-active-color,rgb(var(--zn-color-success)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail__link:focus-visible .thumbnail__media{outline:var(--zn-focus-ring);outline-offset:calc(-1 * var(--zn-focus-ring-width))}.thumbnail__preview-button:focus-visible,.thumbnail__action-items::slotted(*:focus-visible){outline:var(--zn-focus-ring);outline-offset:1px}.thumbnail--disabled .thumbnail__link{cursor:not-allowed}.thumbnail--disabled .thumbnail__media,.thumbnail--disabled .thumbnail__caption{opacity:0.5}.thumbnail__preview{position:fixed;inset:0;display:none;width:100%;max-width:none;height:100%;max-height:none;padding:0;border:none;background:transparent;overflow:hidden}.thumbnail__preview[open]{display:grid;place-items:center}.thumbnail__preview::backdrop{background:transparent}.thumbnail__preview-backdrop{position:fixed;inset:0;background:var(--zn-overlay-background-color)}.thumbnail__preview-frame{--preview-max-width:var(--zn-thumbnail-preview-max-width,70vw);--preview-max-height:var(--zn-thumbnail-preview-max-height,70vh);--preview-ratio:var(--zn-thumbnail-preview-aspect-ratio,var(--zn-thumbnail-preview-measured-ratio,var(--zn-thumbnail-aspect-ratio,16/9)));position:relative;width:min(var(--preview-max-width),var(--preview-max-height) * (var(--preview-ratio)));max-width:var(--preview-max-width);max-height:var(--preview-max-height);aspect-ratio:var(--preview-ratio);overflow:hidden;border-radius:var(--zn-thumbnail-preview-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));box-shadow:var(--zn-shadow-x-large);transform-origin:center center}.thumbnail__preview-image,.thumbnail__preview-placeholder{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-placeholder{position:absolute;inset:0;-o-object-fit:cover;object-fit:cover;filter:blur(12px);transform:scale(1.05)}.thumbnail__preview-media::slotted(*){position:relative;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-image{position:relative}.thumbnail__preview-close{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-close:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-close{position:absolute;top:var(--zn-spacing-x-small);right:var(--zn-spacing-x-small);min-width:28px;min-height:28px}.thumbnail__preview-close:focus-visible{outline:var(--zn-focus-ring);outline-offset:1px}`;var oD=260,aD="cubic-bezier(0.2, 0, 0.2, 1)",Me=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","image","caption","badge","actions","preview");this.caption="";this.aspectRatio="";this.fullUri="";this.previewTrigger="click";this.previewLabel="Preview";this.value="";this.selected=!1;this.active=!1;this.selectable=!1;this.disabled=!1;this.icon="";this.hideCaption=!1;this._previewOpen=!1;this._previewRatio=0;this._origin=null;this._animating=!1;this._handleClick=t=>{let r=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;this._activate(t,!r)};this._handleKeyDown=t=>{t.key!=="Enter"&&t.key!==" "||this._isLink()&&t.key==="Enter"||(t.preventDefault(),this._activate(t,!0))};this._handlePreviewButtonClick=t=>{t.preventDefault(),t.stopPropagation(),this.showPreview()};this._handlePreviewCancel=t=>{t.preventDefault(),this.hidePreview()};this._handleBackdropClick=()=>{this.hidePreview()};this._handlePreviewImageLoad=t=>{let r=t.target;if(!r.naturalWidth||!r.naturalHeight)return;let n=r.naturalWidth/r.naturalHeight;this._previewRatio&&Math.abs(n-this._previewRatio)/this._previewRatio<.01||(this._previewRatio=n)}}disconnectedCallback(){super.disconnectedCallback(),this._previewOpen&&(this._preview?.close(),this._previewOpen=!1),_a(this)}_isLink(){return!!this.href&&!this.disabled}get _previewable(){return(!!this.fullUri||this.hasSlotController.test("preview"))&&!this.disabled}get _previewOnActivate(){return this._previewable&&this.previewTrigger==="click"}_resolveRatio(){let t=[this._previewImage,this._image];for(let n of t)if(n?.naturalWidth&&n.naturalHeight)return n.naturalWidth/n.naturalHeight;let r=this._media?.getBoundingClientRect();return r?.width&&r.height?r.width/r.height:0}async showPreview(){!this._previewable||this._previewOpen||this._animating||(this._origin=this._media?.getBoundingClientRect()??null,this._previewRatio=this._resolveRatio(),this.emit("zn-show"),this._previewOpen=!0,await this.updateComplete,this._preview&&(this._preview.showModal(),Kv(this),await this._animatePreview("in"),this._previewClose?.focus()))}async hidePreview(){!this._previewOpen||this._animating||(await this._animatePreview("out"),this._preview?.close(),this._previewOpen=!1,_a(this),this.emit("zn-close"))}async _animatePreview(t){let r=this._previewFrame,n=this._previewBackdrop;if(!r||!n)return;this._animating=!0;let a=t==="in"?this._origin:this._media?.getBoundingClientRect()??this._origin,s=[{transform:this._collapsedTransform(a,r.getBoundingClientRect()),opacity:"0.4"},{transform:"none",opacity:"1"}],l=[{opacity:"0"},{opacity:"1"}],p={duration:oD,easing:aD},h=t==="in"?s:[...s].reverse(),m=t==="in"?l:[...l].reverse();await Promise.all([yi(r,h,p),yi(n,m,p)]),this._animating=!1}_collapsedTransform(t,r){if(!t||!r.width||!r.height||Vu())return"scale(0.94)";let n=Math.max(t.width/r.width,.01),a=Math.max(t.height/r.height,.01),s=t.left+t.width/2-(r.left+r.width/2),l=t.top+t.height/2-(r.top+r.height/2);return`translate(${s}px, ${l}px) scale(${n}, ${a})`}_activate(t,r){if(this.disabled){t.preventDefault(),t.stopPropagation();return}if(this.emit("zn-select",{detail:{item:this}}).defaultPrevented){t.preventDefault();return}r&&this._previewOnActivate&&(t.preventDefault(),this.showPreview())}render(){let t=this._isLink(),r=this._previewable,n=r&&this.previewTrigger==="button",a=t||this.selectable||this._previewOnActivate,s=t?Ai`a`:Ai`div`,l=this.hasSlotController.test("image"),p=this.hasSlotController.test("badge")||!!this.icon,h=this.hasSlotController.test("actions"),m=p||h||n,f=!this.hideCaption&&(!!this.caption||this.hasSlotController.test("caption"));return ke`
6240
6240
  <div
6241
6241
  part="base"
6242
6242
  style="${xt({"--zn-thumbnail-aspect-ratio":this.aspectRatio||null})}"
@@ -6384,4 +6384,4 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
6384
6384
  `:""}
6385
6385
  <div part="content" class="background__content"><slot></slot></div>
6386
6386
  </div>
6387
- `}};Or.styles=z(c3),Or.dependencies={"zn-icon":ne},c([d()],Or.prototype,"image",2),c([d()],Or.prototype,"color",2),c([d({attribute:"image-strength",reflect:!0})],Or.prototype,"imageStrength",2),c([d({reflect:!0})],Or.prototype,"motion",2),c([d({reflect:!0})],Or.prototype,"overlay",2),c([d({attribute:"overlay-tone",reflect:!0})],Or.prototype,"overlayTone",2),c([d({attribute:"floating-icons"})],Or.prototype,"floatingIcons",2),c([d({type:Boolean,reflect:!0})],Or.prototype,"paused",2);var cD=Or;Or.define("zn-background");export{z5 as AbsoluteContainer,AL as ActionBar,Au as Alert,VL as AnimatedButton,PL as AudioSelect,cD as Background,u8 as BulkActions,$e as Button,Ol as ButtonGroup,EL as ButtonMenu,D4 as ChannelTile,P4 as Chart,e4 as ChatMessage,t4 as ChatMessageAttachment,oL as Checkbox,uL as CheckboxGroup,Gn as Chip,wa as Collapsible,SL as ColorSelect,$4 as Cols,Fl as Confirm,IL as ContentBlock,Mu as CopyButton,CL as DataSelect,E4 as DataTable,Ud as DataTableFilter,Qu as DataTableSearch,$L as DataTableSort,Yu as Datepicker,A4 as DefinedLabel,_a as Dialog,pr as Dropdown,iL as Editor,ji as EditorDialog,Jf as EditorQuickAction,Oc as EditorTool,Xu as EmptyState,om as ExpandingAction,hL as File,NL as FilterContainer,DL as FilterWrapper,Dg as FlowBranchConditions,AI as FlowBuilder,LI as FlowStep,Pg as FlowStepGroup,MI as FlowSteps,aL as FormActions,sg as FormGroup,V4 as Header,Ju as HoverContainer,ne as Icon,Q4 as IconPicker,rp as InlineEdit,nt as Input,sL as InputGroup,mL as Item,FL as Key,BL as KeyContainer,lL as LinkedSelect,Nq as MarkdownEditor,on as Menu,xi as MenuItem,Ca as Navbar,M4 as Note,ju as OptGroup,ot as Option,h8 as OrderTable,Y4 as Page,PI as PageBuilder,ML as PageNav,Bg as PagePaletteItem,Vg as PageSectionCard,X4 as Pagination,t8 as Pane,Zu as Panel,Nl as Popup,jg as PreviewFrame,GL as PriorityList,p8 as ProgressBar,d8 as ProgressTile,g4 as QueryBuilder,cL as Radio,pL as RadioGroup,dL as Rating,lI as RemarkdEditor,OL as Reveal,nD as ScheduleBuilder,c8 as ScrollContainer,Be as Select,RL as SettingsContainer,n8 as Sidebar,B4 as SimpleChart,em as Skeleton,Vl as SlashItem,ka as SlashMenu,TL as Slideout,a8 as Sp,qL as SplitButton,i8 as SplitPane,l8 as Stat,LL as StatusIndicator,s8 as Stepper,tm as Style,am as Tab,e8 as Table,ln as Tabs,Xo as Textarea,UI as ThemeEditor,sD as Thumbnail,lD as ThumbnailGroup,L4 as Tile,q4 as TileGroup,I4 as TileProperty,Z4 as Timer,nL as Toggle,gi as Tooltip,UL as TranslationGroup,HL as Translations,J4 as VerticalStepper,r4 as Well,k as ZincElement,Pu as caretRectFrom,N3 as clearFormStoreValues,T3 as deepQuery,$3 as deepQueryAll,Ge as deepQuerySelectorAll,Ou as getCaretCoordinates,JB as getCaretRect,cr as idSelector,qt as litToHTML,ip as on};
6387
+ `}};Or.styles=z(c3),Or.dependencies={"zn-icon":ne},c([d()],Or.prototype,"image",2),c([d()],Or.prototype,"color",2),c([d({attribute:"image-strength",reflect:!0})],Or.prototype,"imageStrength",2),c([d({reflect:!0})],Or.prototype,"motion",2),c([d({reflect:!0})],Or.prototype,"overlay",2),c([d({attribute:"overlay-tone",reflect:!0})],Or.prototype,"overlayTone",2),c([d({attribute:"floating-icons"})],Or.prototype,"floatingIcons",2),c([d({type:Boolean,reflect:!0})],Or.prototype,"paused",2);var cD=Or;Or.define("zn-background");export{z5 as AbsoluteContainer,AL as ActionBar,Au as Alert,VL as AnimatedButton,PL as AudioSelect,cD as Background,u8 as BulkActions,$e as Button,Ol as ButtonGroup,EL as ButtonMenu,D4 as ChannelTile,P4 as Chart,e4 as ChatMessage,t4 as ChatMessageAttachment,oL as Checkbox,uL as CheckboxGroup,Gn as Chip,za as Collapsible,SL as ColorSelect,$4 as Cols,Fl as Confirm,IL as ContentBlock,Mu as CopyButton,CL as DataSelect,E4 as DataTable,Ud as DataTableFilter,Qu as DataTableSearch,$L as DataTableSort,Yu as Datepicker,A4 as DefinedLabel,ka as Dialog,pr as Dropdown,iL as Editor,ji as EditorDialog,Jf as EditorQuickAction,Oc as EditorTool,Xu as EmptyState,om as ExpandingAction,hL as File,NL as FilterContainer,DL as FilterWrapper,Dg as FlowBranchConditions,AI as FlowBuilder,LI as FlowStep,Pg as FlowStepGroup,MI as FlowSteps,aL as FormActions,sg as FormGroup,V4 as Header,Ju as HoverContainer,ne as Icon,Q4 as IconPicker,rp as InlineEdit,nt as Input,sL as InputGroup,mL as Item,FL as Key,BL as KeyContainer,lL as LinkedSelect,Nq as MarkdownEditor,on as Menu,xi as MenuItem,Sa as Navbar,M4 as Note,ju as OptGroup,ot as Option,h8 as OrderTable,Y4 as Page,PI as PageBuilder,ML as PageNav,Bg as PagePaletteItem,Vg as PageSectionCard,X4 as Pagination,t8 as Pane,Zu as Panel,Nl as Popup,jg as PreviewFrame,GL as PriorityList,p8 as ProgressBar,d8 as ProgressTile,g4 as QueryBuilder,cL as Radio,pL as RadioGroup,dL as Rating,lI as RemarkdEditor,OL as Reveal,nD as ScheduleBuilder,c8 as ScrollContainer,Be as Select,RL as SettingsContainer,n8 as Sidebar,B4 as SimpleChart,em as Skeleton,Vl as SlashItem,Ca as SlashMenu,TL as Slideout,a8 as Sp,qL as SplitButton,i8 as SplitPane,l8 as Stat,LL as StatusIndicator,s8 as Stepper,tm as Style,am as Tab,e8 as Table,ln as Tabs,Xo as Textarea,UI as ThemeEditor,sD as Thumbnail,lD as ThumbnailGroup,L4 as Tile,q4 as TileGroup,I4 as TileProperty,Z4 as Timer,nL as Toggle,gi as Tooltip,UL as TranslationGroup,HL as Translations,J4 as VerticalStepper,r4 as Well,k as ZincElement,Pu as caretRectFrom,N3 as clearFormStoreValues,T3 as deepQuery,$3 as deepQueryAll,Ge as deepQuerySelectorAll,Ou as getCaretCoordinates,JB as getCaretRect,cr as idSelector,qt as litToHTML,ip as on};