@xy-planning-network/trees 0.13.7-dev-2 → 0.13.7-dev-3
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/trees.es.js
CHANGED
|
@@ -8483,7 +8483,8 @@ const op = /* @__PURE__ */ ep(tp, [["render", rp]]), ap = { class: "absolute ins
|
|
|
8483
8483
|
actions: s.value.actions.map((f) => ({
|
|
8484
8484
|
...f,
|
|
8485
8485
|
disabled: typeof f.disabled == "function" ? f.disabled.apply(void 0, [u, d]) : f.disabled,
|
|
8486
|
-
onClick: (g) => f.onClick(u, d, r, g)
|
|
8486
|
+
onClick: (g) => f.onClick ? f.onClick(u, d, r, g) : () => {
|
|
8487
|
+
},
|
|
8487
8488
|
show: typeof f.show == "function" ? f.show.apply(void 0, [u, d]) : f.show,
|
|
8488
8489
|
url: typeof f.url == "function" ? f.url.apply(void 0, [u, d]) : f.url ?? ""
|
|
8489
8490
|
})),
|
package/dist/trees.umd.js
CHANGED
|
@@ -13,7 +13,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
13
13
|
</span>
|
|
14
14
|
`}function mt(){e.calendarContainer.classList.add("hasWeeks");const h=z("div","flatpickr-weekwrapper");h.appendChild(z("span","flatpickr-weekday",e.l10n.weekAbbreviation));const b=z("div","flatpickr-weeks");return h.appendChild(b),{weekWrapper:h,weekNumbers:b}}function q(h,b=!0){const x=b?h:h-e.currentMonth;x<0&&e._hidePrevMonthArrow===!0||x>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=x,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,ne("onYearChange"),J()),G(),ne("onMonthChange"),Qn())}function Ne(h=!0,b=!0){if(e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,b===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){const{hours:x,minutes:E,seconds:V}=Ir(e.config);p(x,E,V)}e.redraw(),h&&ne("onChange")}function Oe(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),ne("onClose")}function nt(){e.config!==void 0&&ne("onDestroy");for(let h=e._handlers.length;h--;)e._handlers[h].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){const h=e.calendarContainer.parentNode;if(h.lastChild&&h.removeChild(h.lastChild),h.parentNode){for(;h.firstChild;)h.parentNode.insertBefore(h.firstChild,h);h.parentNode.removeChild(h)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(h=>{try{delete e[h]}catch{}})}function oe(h){return e.config.appendTo&&e.config.appendTo.contains(h)?!0:e.calendarContainer.contains(h)}function rt(h){if(e.isOpen&&!e.config.inline){const b=Te(h),x=oe(b),E=b===e.input||b===e.altInput||e.element.contains(b)||h.path&&h.path.indexOf&&(~h.path.indexOf(e.input)||~h.path.indexOf(e.altInput)),V=h.type==="blur"?E&&h.relatedTarget&&!oe(h.relatedTarget):!E&&!x&&!oe(h.relatedTarget),D=!e.config.ignoredFocusElements.some(v=>v.contains(b));V&&D&&(e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&c(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&(e.clear(!1),e.redraw()))}}function Gn(h){if(!h||e.config.minDate&&h<e.config.minDate.getFullYear()||e.config.maxDate&&h>e.config.maxDate.getFullYear())return;const b=h,x=e.currentYear!==b;e.currentYear=b||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),x&&(e.redraw(),ne("onYearChange"),J())}function ht(h,b=!0){var x;const E=e.parseDate(h,void 0,b);if(e.config.minDate&&E&&Be(E,e.config.minDate,b!==void 0?b:!e.minDateHasTime)<0||e.config.maxDate&&E&&Be(E,e.config.maxDate,b!==void 0?b:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(E===void 0)return!1;const V=!!e.config.enable,D=(x=e.config.enable)!==null&&x!==void 0?x:e.config.disable;for(let v=0,T;v<D.length;v++){if(T=D[v],typeof T=="function"&&T(E))return V;if(T instanceof Date&&E!==void 0&&T.getTime()===E.getTime())return V;if(typeof T=="string"){const F=e.parseDate(T,void 0,!0);return F&&F.getTime()===E.getTime()?V:!V}else if(typeof T=="object"&&E!==void 0&&T.from&&T.to&&E.getTime()>=T.from.getTime()&&E.getTime()<=T.to.getTime())return V}return!V}function Jn(h){return e.daysContainer!==void 0?h.className.indexOf("hidden")===-1&&h.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(h):!1}function Uh(h){h.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(h.relatedTarget&&oe(h.relatedTarget))&&e.setDate(e._input.value,!0,h.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function zh(h){const b=Te(h),x=e.config.wrap?n.contains(b):b===e._input,E=e.config.allowInput,V=e.isOpen&&(!E||!x),D=e.config.inline&&x&&!E;if(h.keyCode===13&&x){if(E)return e.setDate(e._input.value,!0,b===e.altInput?e.config.altFormat:e.config.dateFormat),b.blur();e.open()}else if(oe(b)||V||D){const v=!!e.timeContainer&&e.timeContainer.contains(b);switch(h.keyCode){case 13:v?(h.preventDefault(),c(),Qr()):ll(h);break;case 27:h.preventDefault(),Qr();break;case 8:case 46:x&&!e.config.allowInput&&(h.preventDefault(),e.clear());break;case 37:case 39:if(!v&&!x){if(h.preventDefault(),e.daysContainer!==void 0&&(E===!1||document.activeElement&&Jn(document.activeElement))){const F=h.keyCode===39?1:-1;h.ctrlKey?(h.stopPropagation(),q(F),L(B(1),0)):L(void 0,F)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:h.preventDefault();const T=h.keyCode===40?1:-1;e.daysContainer&&b.$i!==void 0||b===e.input||b===e.altInput?h.ctrlKey?(h.stopPropagation(),Gn(e.currentYear-T),L(B(1),0)):v||L(void 0,T*7):b===e.currentYearElement?Gn(e.currentYear-T):e.config.enableTime&&(!v&&e.hourElement&&e.hourElement.focus(),c(h),e._debouncedChange());break;case 9:if(v){const F=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(X=>X),j=F.indexOf(b);if(j!==-1){const X=F[j+(h.shiftKey?-1:1)];h.preventDefault(),(X||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(b)&&h.shiftKey&&(h.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&b===e.amPM)switch(h.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),ot();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),ot();break}(x||oe(b))&&ne("onKeyDown",h)}function Zr(h){if(e.selectedDates.length!==1||h&&(!h.classList.contains("flatpickr-day")||h.classList.contains("flatpickr-disabled")))return;const b=h?h.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),E=Math.min(b,e.selectedDates[0].getTime()),V=Math.max(b,e.selectedDates[0].getTime());let D=!1,v=0,T=0;for(let F=E;F<V;F+=gd.DAY)ht(new Date(F),!0)||(D=D||F>E&&F<V,F<x&&(!v||F>v)?v=F:F>x&&(!T||F<T)&&(T=F));for(let F=0;F<e.config.showMonths;F++){const j=e.daysContainer.children[F];for(let X=0,Re=j.children.length;X<Re;X++){const he=j.children[X],Ge=he.dateObj.getTime(),en=v>0&&Ge<v||T>0&&Ge>T;if(en){he.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(tn=>{he.classList.remove(tn)});continue}else if(D&&!en)continue;["startRange","inRange","endRange","notAllowed"].forEach(tn=>{he.classList.remove(tn)}),h!==void 0&&(h.classList.add(b<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<b&&Ge===x?he.classList.add("startRange"):x>b&&Ge===x&&he.classList.add("endRange"),Ge>=v&&(T===0||Ge<=T)&&hd(Ge,x,b)&&he.classList.add("inRange"))}}}function qh(){e.isOpen&&!e.config.static&&!e.config.inline&&Xn()}function Wh(h,b=e._positionElement){if(e.isMobile===!0){if(h){h.preventDefault();const E=Te(h);E&&E.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),ne("onOpen");return}else if(e._input.disabled||e.config.inline)return;const x=e.isOpen;e.isOpen=!0,x||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),ne("onOpen"),Xn(b)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(h===void 0||!e.timeContainer.contains(h.relatedTarget))&&setTimeout(()=>e.hourElement.select(),50)}function rl(h){return b=>{const x=e.config[`_${h}Date`]=e.parseDate(b,e.config.dateFormat),E=e.config[`_${h==="min"?"max":"min"}Date`];x!==void 0&&(e[h==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(V=>ht(V)),!e.selectedDates.length&&h==="min"&&f(x),ot()),e.daysContainer&&(sl(),x!==void 0?e.currentYearElement[h]=x.getFullYear().toString():e.currentYearElement.removeAttribute(h),e.currentYearElement.disabled=!!E&&x!==void 0&&E.getFullYear()===x.getFullYear())}}function Yh(){const h=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],b=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),r),x={};e.config.parseDate=b.parseDate,e.config.formatDate=b.formatDate,Object.defineProperty(e.config,"enable",{get:()=>e.config._enable,set:D=>{e.config._enable=cl(D)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:D=>{e.config._disable=cl(D)}});const E=b.mode==="time";if(!b.dateFormat&&(b.enableTime||E)){const D=se.defaultConfig.dateFormat||Vt.dateFormat;x.dateFormat=b.noCalendar||E?"H:i"+(b.enableSeconds?":S":""):D+" H:i"+(b.enableSeconds?":S":"")}if(b.altInput&&(b.enableTime||E)&&!b.altFormat){const D=se.defaultConfig.altFormat||Vt.altFormat;x.altFormat=b.noCalendar||E?"h:i"+(b.enableSeconds?":S K":" K"):D+` h:i${b.enableSeconds?":S":""} K`}Object.defineProperty(e.config,"minDate",{get:()=>e.config._minDate,set:rl("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:rl("max")});const V=D=>v=>{e.config[D==="min"?"_minTime":"_maxTime"]=e.parseDate(v,"H:i:S")};Object.defineProperty(e.config,"minTime",{get:()=>e.config._minTime,set:V("min")}),Object.defineProperty(e.config,"maxTime",{get:()=>e.config._maxTime,set:V("max")}),b.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,x,b);for(let D=0;D<h.length;D++)e.config[h[D]]=e.config[h[D]]===!0||e.config[h[D]]==="true";Mr.filter(D=>e.config[D]!==void 0).forEach(D=>{e.config[D]=Pr(e.config[D]||[]).map(s)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let D=0;D<e.config.plugins.length;D++){const v=e.config.plugins[D](e)||{};for(const T in v)Mr.indexOf(T)>-1?e.config[T]=Pr(v[T]).map(s).concat(e.config[T]):typeof b[T]>"u"&&(e.config[T]=v[T])}b.altInputClass||(e.config.altInputClass=ol().className+" "+e.config.altInputClass),ne("onParseConfig")}function ol(){return e.config.wrap?n.querySelector("[data-input]"):n}function al(){typeof e.config.locale!="object"&&typeof se.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)),e.l10n=Object.assign(Object.assign({},se.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?se.l10ns[e.config.locale]:void 0),Or.K=`(${e.l10n.amPM[0]}|${e.l10n.amPM[1]}|${e.l10n.amPM[0].toLowerCase()}|${e.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},r),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr===void 0&&se.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=fs(e),e.parseDate=Rr({config:e.config,l10n:e.l10n})}function Xn(h){if(typeof e.config.position=="function")return void e.config.position(e,h);if(e.calendarContainer===void 0)return;ne("onPreCalendarPosition");const b=h||e._positionElement,x=Array.prototype.reduce.call(e.calendarContainer.children,(nn,no)=>nn+no.offsetHeight,0),E=e.calendarContainer.offsetWidth,V=e.config.position.split(" "),D=V[0],v=V.length>1?V[1]:null,T=b.getBoundingClientRect(),F=window.innerHeight-T.bottom,j=D==="above"||D!=="below"&&F<x&&T.top>x,X=window.pageYOffset+T.top+(j?-x-2:b.offsetHeight+2);if(ye(e.calendarContainer,"arrowTop",!j),ye(e.calendarContainer,"arrowBottom",j),e.config.inline)return;let Re=window.pageXOffset+T.left,he=!1,er=!1;v==="center"?(Re-=(E-T.width)/2,he=!0):v==="right"&&(Re-=E-T.width,er=!0),ye(e.calendarContainer,"arrowLeft",!he&&!er),ye(e.calendarContainer,"arrowCenter",he),ye(e.calendarContainer,"arrowRight",er);const Ge=window.document.body.offsetWidth-(window.pageXOffset+T.right),en=Re+E>window.document.body.offsetWidth,tn=Ge+E>window.document.body.offsetWidth;if(ye(e.calendarContainer,"rightMost",en),!e.config.static)if(e.calendarContainer.style.top=`${X}px`,!en)e.calendarContainer.style.left=`${Re}px`,e.calendarContainer.style.right="auto";else if(!tn)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${Ge}px`;else{const nn=Kh();if(nn===void 0)return;const no=window.document.body.offsetWidth,ag=Math.max(0,no/2-E/2),sg=".flatpickr-calendar.centerMost:before",lg=".flatpickr-calendar.centerMost:after",ig=nn.cssRules.length,cg=`{left:${T.left}px;right:auto;}`;ye(e.calendarContainer,"rightMost",!1),ye(e.calendarContainer,"centerMost",!0),nn.insertRule(`${sg},${lg}${cg}`,ig),e.calendarContainer.style.left=`${ag}px`,e.calendarContainer.style.right="auto"}}function Kh(){let h=null;for(let b=0;b<document.styleSheets.length;b++){const x=document.styleSheets[b];try{x.cssRules}catch{continue}h=x;break}return h??Gh()}function Gh(){const h=document.createElement("style");return document.head.appendChild(h),h.sheet}function sl(){e.config.noCalendar||e.isMobile||(J(),Qn(),G())}function Qr(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function ll(h){h.preventDefault(),h.stopPropagation();const b=v=>v.classList&&v.classList.contains("flatpickr-day")&&!v.classList.contains("flatpickr-disabled")&&!v.classList.contains("notAllowed"),x=us(Te(h),b);if(x===void 0)return;const E=x,V=e.latestSelectedDateObj=new Date(E.dateObj.getTime()),D=(V.getMonth()<e.currentMonth||V.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=E,e.config.mode==="single")e.selectedDates=[V];else if(e.config.mode==="multiple"){const v=to(V);v?e.selectedDates.splice(parseInt(v),1):e.selectedDates.push(V)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=V,e.selectedDates.push(V),Be(V,e.selectedDates[0],!0)!==0&&e.selectedDates.sort((v,T)=>v.getTime()-T.getTime()));if(d(),D){const v=e.currentYear!==V.getFullYear();e.currentYear=V.getFullYear(),e.currentMonth=V.getMonth(),v&&(ne("onYearChange"),J()),ne("onMonthChange")}if(Qn(),G(),ot(),!D&&e.config.mode!=="range"&&e.config.showMonths===1?H(E):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){const v=e.config.mode==="single"&&!e.config.enableTime,T=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(v||T)&&Qr()}y()}const Zn={locale:[al,de],showMonths:[ve,l,A],minDate:[C],maxDate:[C],clickOpens:[()=>{e.config.clickOpens===!0?(m(e._input,"focus",e.open),m(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Jh(h,b){if(h!==null&&typeof h=="object"){Object.assign(e.config,h);for(const x in h)Zn[x]!==void 0&&Zn[x].forEach(E=>E())}else e.config[h]=b,Zn[h]!==void 0?Zn[h].forEach(x=>x()):Mr.indexOf(h)>-1&&(e.config[h]=Pr(b));e.redraw(),ot(!0)}function il(h,b){let x=[];if(h instanceof Array)x=h.map(E=>e.parseDate(E,b));else if(h instanceof Date||typeof h=="number")x=[e.parseDate(h,b)];else if(typeof h=="string")switch(e.config.mode){case"single":case"time":x=[e.parseDate(h,b)];break;case"multiple":x=h.split(e.config.conjunction).map(E=>e.parseDate(E,b));break;case"range":x=h.split(e.l10n.rangeSeparator).map(E=>e.parseDate(E,b));break}else e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(h)}`));e.selectedDates=e.config.allowInvalidPreload?x:x.filter(E=>E instanceof Date&&ht(E,!1)),e.config.mode==="range"&&e.selectedDates.sort((E,V)=>E.getTime()-V.getTime())}function Xh(h,b=!1,x=e.config.dateFormat){if(h!==0&&!h||h instanceof Array&&h.length===0)return e.clear(b);il(h,x),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),C(void 0,b),f(),e.selectedDates.length===0&&e.clear(!1),ot(b),b&&ne("onChange")}function cl(h){return h.slice().map(b=>typeof b=="string"||typeof b=="number"||b instanceof Date?e.parseDate(b,void 0,!0):b&&typeof b=="object"&&b.from&&b.to?{from:e.parseDate(b.from,void 0),to:e.parseDate(b.to,void 0)}:b).filter(b=>b)}function Zh(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;const h=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);h&&il(h,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Qh(){if(e.input=ol(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=z(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),e._positionElement=e.config.positionElement||e._input}function eg(){const h=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=z("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=h,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=h==="datetime-local"?"Y-m-d\\TH:i:S":h==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}m(e.mobileInput,"change",b=>{e.setDate(Te(b).value,!1,e.mobileFormatStr),ne("onChange"),ne("onClose")})}function tg(h){if(e.isOpen===!0)return e.close();e.open(h)}function ne(h,b){if(e.config===void 0)return;const x=e.config[h];if(x!==void 0&&x.length>0)for(let E=0;x[E]&&E<x.length;E++)x[E](e.selectedDates,e.input.value,e,b);h==="onChange"&&(e.input.dispatchEvent(eo("change")),e.input.dispatchEvent(eo("input")))}function eo(h){const b=document.createEvent("Event");return b.initEvent(h,!0,!0),b}function to(h){for(let b=0;b<e.selectedDates.length;b++)if(Be(e.selectedDates[b],h)===0)return""+b;return!1}function ng(h){return e.config.mode!=="range"||e.selectedDates.length<2?!1:Be(h,e.selectedDates[0])>=0&&Be(h,e.selectedDates[1])<=0}function Qn(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((h,b)=>{const x=new Date(e.currentYear,e.currentMonth,1);x.setMonth(e.currentMonth+b),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[b].textContent=On(x.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=x.getMonth().toString(),h.value=x.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function dl(h){return e.selectedDates.map(b=>e.formatDate(b,h)).filter((b,x,E)=>e.config.mode!=="range"||e.config.enableTime||E.indexOf(b)===x).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function ot(h=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=dl(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=dl(e.config.altFormat)),h!==!1&&ne("onValueUpdate")}function rg(h){const b=Te(h),x=e.prevMonthNav.contains(b),E=e.nextMonthNav.contains(b);x||E?q(x?-1:1):e.yearElements.indexOf(b)>=0?b.select():b.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):b.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function og(h){h.preventDefault();const b=h.type==="keydown",x=Te(h),E=x;e.amPM!==void 0&&x===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Ae(e.amPM.textContent===e.l10n.amPM[0])]);const V=parseFloat(E.getAttribute("min")),D=parseFloat(E.getAttribute("max")),v=parseFloat(E.getAttribute("step")),T=parseInt(E.value,10),F=h.delta||(b?h.which===38?1:-1:0);let j=T+v*F;if(typeof E.value<"u"&&E.value.length===2){const X=E===e.hourElement,Re=E===e.minuteElement;j<V?(j=D+j+Ae(!X)+(Ae(X)&&Ae(!e.amPM)),Re&&N(void 0,-1,e.hourElement)):j>D&&(j=E===e.hourElement?j-D-Ae(!e.amPM):V,Re&&N(void 0,1,e.hourElement)),e.amPM&&X&&(v===1?j+T===23:Math.abs(j-T)>v)&&(e.amPM.textContent=e.l10n.amPM[Ae(e.amPM.textContent===e.l10n.amPM[0])]),E.value=De(j)}}return a(),e}function $t(n,r){const e=Array.prototype.slice.call(n).filter(a=>a instanceof HTMLElement),o=[];for(let a=0;a<e.length;a++){const s=e[a];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=yd(s,r||{}),o.push(s._flatpickr)}catch(l){console.error(l)}}return o.length===1?o[0]:o}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return $t(this,n)},HTMLElement.prototype.flatpickr=function(n){return $t([this],n)});var se=function(n,r){return typeof n=="string"?$t(window.document.querySelectorAll(n),r):n instanceof Node?$t([n],r):$t(n,r)};se.defaultConfig={},se.l10ns={en:Object.assign({},Kt),default:Object.assign({},Kt)},se.localize=n=>{se.l10ns.default=Object.assign(Object.assign({},se.l10ns.default),n)},se.setDefaults=n=>{se.defaultConfig=Object.assign(Object.assign({},se.defaultConfig),n)},se.parseDate=Rr({}),se.formatDate=fs({}),se.compareDates=Be,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return $t(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))},typeof window<"u"&&(window.flatpickr=se);const wd={ref:"wrapper",class:"xy-date-range-picker"},xd=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],Rn=t.defineComponent({inheritAttrs:!1,__name:"DateRangePicker",props:t.mergeModels(t.mergeDefaults({modelValue:{},maxDate:{},maxRange:{},startDate:{},label:{},help:{},placeholder:{}},{...Le,maxDate:()=>new Date,maxRange:0,placeholder:"mm-dd-yyyy range",startDate:0}),{modelValue:{...Z,default:{maxDate:0,minDate:0}},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,default:{maxDate:0,minDate:0}});function o(m){return(m==null?void 0:m.maxDate)!==void 0&&(m==null?void 0:m.minDate)!==void 0&&(m==null?void 0:m.minDate)!=0&&(m==null?void 0:m.maxDate)!=0}const a=t.watch(e,()=>{if(o(e.value)){g==null||g.setDate([e.value.minDate*1e3,e.value.maxDate*1e3],!1);return}g==null||g.clear()}),{aria:s,errorState:l,inputID:c,isRequired:i,onInvalid:u,validate:d}=Me(r),f=m=>{a.pause(),e.value=m,a.resume()},p=t.useTemplateRef("wrapper");let g=null;return t.onMounted(()=>{const m={allowInput:!r.maxRange,appendTo:p.value||void 0,dateFormat:"m-d-Y",mode:"range",maxDate:r.maxDate,minDate:r.startDate,onClose:y=>{y.length===2?f({minDate:y[0].setUTCHours(0,0,0,0)/1e3,maxDate:Math.floor(y[1].setUTCHours(23,59,59,999)/1e3)}):y.length===0&&f({minDate:0,maxDate:0})},static:!0};o(e.value)&&(m.defaultDate=[e.value.minDate*1e3,e.value.maxDate*1e3]),r.maxRange&&(m.onChange=(y,w,C)=>{if(y.length===1){var S=new Date(y[0].getTime()),N=new Date(y[0].getTime());S.setDate(S.getDate()+r.maxRange),N.setDate(N.getDate()-r.maxRange);const P=new Date;S>P&&(S=P),C.set("minDate",N),C.set("maxDate",S)}}),g=se(`#${c.value}`,m)}),(m,y)=>(t.openBlock(),t.createElementBlock("div",wd,[t.createVNode(be,{id:t.unref(s).labelledby,class:"mb-2",for:t.unref(c),label:m.label,required:t.unref(i)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(c),"aria-labelledby":t.unref(s).labelledby,"aria-describedby":t.unref(s).describedby,"aria-errormessage":t.unref(s).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(l)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:m.placeholder},m.$attrs,{type:"text",onInput:y[0]||(y[0]=(...w)=>t.unref(d)&&t.unref(d)(...w)),onInvalid:y[1]||(y[1]=(...w)=>t.unref(u)&&t.unref(u)(...w))}),null,16,xd),t.createVNode(ce,{id:t.unref(s).describedby,class:"mt-1",text:m.help},null,8,["id","text"]),t.createVNode($e,{id:t.unref(s).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])],512))}}),Cd=["id","aria-labelledby","aria-describedby","aria-errormessage"],kd=["textContent"],Ed=["value","disabled","textContent"],In=t.defineComponent({inheritAttrs:!1,__name:"Select",props:t.mergeModels(t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{}},{...Le,placeholder:"Select an option"}),{modelValue:Z,modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,inputID:a,isRequired:s,validate:l,errorState:c,onInvalid:i}=Me(r);return(u,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(a),label:u.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("select",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":d[0]||(d[0]=f=>e.value=f),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6 pl-3 pr-10","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200 disabled:opacity-100",t.unref(c)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"]},u.$attrs,{onChange:d[1]||(d[1]=(...f)=>t.unref(l)&&t.unref(l)(...f)),onInvalid:d[2]||(d[2]=(...f)=>t.unref(i)&&t.unref(i)(...f))}),[t.createElementVNode("option",{value:"",disabled:"",selected:"",textContent:t.toDisplayString(u.placeholder)},null,8,kd),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.options,f=>(t.openBlock(),t.createElementBlock("option",{key:f.value,value:f.value,disabled:f.disabled,textContent:t.toDisplayString(f.label)},null,8,Ed))),128))],16,Cd),[[t.vModelSelect,e.value]]),t.createVNode(ce,{id:t.unref(o).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode($e,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(c)},null,8,["id","text"])]))}}),Lr=t.defineComponent({__name:"DateFilter",props:{dateRange:{},sortDir:{}},emits:["sort-dir-changed","date-range-changed"],setup(n,{emit:r}){const e=n,o=t.ref(e.dateRange),a=t.ref(e.sortDir),s=[{label:"Newest-Oldest",value:"desc"},{label:"Oldest-Newest",value:"asc"}],l=r,c=u=>{(u==="asc"||u==="desc")&&l("sort-dir-changed",u)},i=u=>{u&&l("date-range-changed",u)};return(u,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(In,{modelValue:a.value,"onUpdate:modelValue":[d[0]||(d[0]=f=>a.value=f),c],options:s},null,8,["modelValue"]),t.createVNode(Rn,{modelValue:o.value,"onUpdate:modelValue":[d[1]||(d[1]=f=>o.value=f),i],class:"ml-3"},null,8,["modelValue"])],64))}});function Tt(n,r="GET",e={}){const o=t.ref(),a=t.shallowRef(),s=t.ref(!1),l=t.ref(!1),c=t.ref(!1),i=t.ref(!1);let u=0,d;const f=()=>{d!==void 0&&d.abort()},p=(g={},m={})=>{u++;const y=u;d=new AbortController,i.value=!1,l.value=!1,c.value=!0;const w={data:["PATCH","patch","POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:d.signal,url:n};return wt(w,{...e,...m}).then(C=>(o.value=C,a.value=void 0,i.value=!1,C),C=>{throw a.value=C,Ko(C)&&(i.value=!0),C}).finally(()=>{y==u&&(l.value=!0,c.value=!1),s.value=!0})};return e!=null&&e.immediate&&e.immediate===!0&&p(),{result:o,error:a,isFinished:l,isLoading:c,isAborted:i,hasFetched:s,abort:f,execute:p}}function Dd(n,r={}){return Tt(n,"GET",r)}function Nd(n,r={}){return Tt(n,"DELETE",r)}function Sd(n,r={}){return Tt(n,"PATCH",r)}function _d(n,r={}){return Tt(n,"POST",r)}function Vd(n,r={}){return Tt(n,"PUT",r)}const ps="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$d={CreateIdAttribute:(n=8)=>{let r="";for(let e=0;e<n;e++)r+=ps.charAt(Math.floor(Math.random()*ps.length));return r}};function ms(n={}){const r=t.ref(new Map);let e={removeDelay:1e4,email:""};const o=p=>{e={...e,...p}},a=p=>{r.value.delete(p)},s=p=>{const g=$d.CreateIdAttribute();return r.value.set(g,p),(p.persistent===void 0||!p.persistent)&&setTimeout(()=>a(g),e.removeDelay),g},l=p=>s(p),c=(p,g=!1)=>s({message:p,persistent:g,type:"error"}),i=(p,g=!1)=>s({message:p,persistent:g,type:"info"}),u=(p,g=!1)=>s({message:p,persistent:g,type:"success"}),d=(p,g=!1)=>s({message:p,persistent:g,type:"warning"}),f=(p="",g=!1)=>{const m=p||e.email,y=m?`Whoops! Something went wrong, please reach out to
|
|
15
15
|
<a class="underline text-xy-blue" href="mailto:${m}">${m}</a>
|
|
16
|
-
if the issue persists.`:"Whoops! Something went wrong.";return s({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:s,remove:a,flash:l,error:c,warning:d,info:i,success:u,genericError:f},flashes:r,configure:o}}const Td=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type>"u"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let Fr;function ft(){return Fr===void 0&&(Fr=ms()),Fr}const jr={error(n,r){ft().flasher.error(n,r)},info(n,r){ft().flasher.info(n,r)},success(n,r){ft().flasher.success(n,r)},warning(n,r){ft().flasher.warning(n,r)},genericError(n,r){ft().flasher.genericError(n,r)}},Bd={class:"px-4 flex items-center justify-between sm:px-0"},vd={class:"w-0 flex-1 flex"},Md={class:"hidden md:flex"},Pd=["onClick","textContent"],Ad={class:"w-0 flex-1 flex justify-end"},Hr=t.defineComponent({__name:"Paginator",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue"),e=a=>{r.value={...r.value,page:a}},o=t.computed(()=>{const a=[];if(r.value.totalPages<=4){for(let l=0;l<r.value.totalPages;l++)a.push(l+1);return a}if(r.value.totalPages-r.value.page>=3){for(let l=0;l<4;l++)a.push(r.value.page+l);return a}for(let l=0;l<4;l++)a.unshift(r.value.totalPages-l);return a});return(a,s)=>(t.openBlock(),t.createElementBlock("div",Bd,[t.createElementVNode("div",vd,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pr-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",r.value.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[0]||(s[0]=t.withModifiers(l=>e(r.value.page-1),["prevent"]))},s[2]||(s[2]=[t.createElementVNode("svg",{class:"mr-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),t.createTextVNode(" Previous ")]),2)]),t.createElementVNode("div",Md,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,l=>(t.openBlock(),t.createElementBlock("a",{key:l,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",r.value.page===l?"border-blue-500 text-blue-600 focus:outline-none focus:text-blue-800 focus:border-blue-700":"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-400"]),onClick:t.withModifiers(c=>e(l),["prevent"]),textContent:t.toDisplayString(l)},null,10,Pd))),128))]),t.createElementVNode("div",Ad,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pl-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",r.value.page>=r.value.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[1]||(s[1]=t.withModifiers(l=>e(r.value.page+1),["prevent"]))},s[3]||(s[3]=[t.createTextVNode(" Next "),t.createElementVNode("svg",{class:"ml-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),2)])]))}}),Od={key:0,class:"flex"},hs=t.defineComponent({__name:"DetailList",props:{borderless:{type:Boolean,default:!1},defaultSort:{default:"created_at"},defaultSortDir:{default:"desc"},disableDate:{type:Boolean,default:!1},disableNavigation:{type:Boolean,default:!1},perPage:{default:10},url:{}},setup(n,{expose:r}){const e=n,o=t.ref({minDate:0,maxDate:0}),a=t.ref([]),s=t.ref({page:1,perPage:e.perPage,totalItems:0,totalPages:0}),l=t.ref(e.defaultSort),c=t.ref(e.defaultSortDir),i=()=>{const m={maxDate:o.value.maxDate||null,minDate:o.value.minDate||null,page:s.value.page,perPage:s.value.perPage,q:"",sort:l.value,sortDir:c.value};mr.get(e.url,{},m).then(y=>{s.value={page:y.data.page,perPage:y.data.perPage,totalItems:y.data.totalItems,totalPages:y.data.totalPages},a.value=y.data.items},()=>{jr.genericError()})},u=t.computed(()=>!!a.value.length),d=t.computed(()=>!e.disableDate),f=t.computed(()=>!e.disableNavigation&&u),g={refresh:i,reset:()=>{s.value.page=1,i()}};return t.watch([c,o],()=>{i()}),r(g),i(),(m,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"mt-4 space-y-2":d.value})},[m.disableDate?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Od,[t.createVNode(Lr,{"date-range":o.value,"sort-dir":c.value,onSortDirChanged:y[0]||(y[0]=w=>c.value=w),onDateRangeChanged:y[1]||(y[1]=w=>o.value=w)},null,8,["date-range","sort-dir"])])),u.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["overflow-hidden",{"shadow sm:rounded-md border":!m.borderless}])},[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(w,C)=>(t.openBlock(),t.createElementBlock("li",{key:C,class:t.normalizeClass({"border-t border-gray-200":C>0})},[t.renderSlot(m.$slots,"default",{item:w})],2))),128))])],2)):t.renderSlot(m.$slots,"empty",{key:2},()=>[y[4]||(y[4]=t.createTextVNode(" No items were found! "))]),f.value?(t.openBlock(),t.createBlock(Hr,{key:3,modelValue:s.value,"onUpdate:modelValue":[y[2]||(y[2]=w=>s.value=w),y[3]||(y[3]=w=>i())]},null,8,["modelValue"])):t.createCommentVNode("",!0)],2))}}),Rd=["href"],gs=t.defineComponent({__name:"DownloadCell",props:{propsData:{},attribute:{}},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:r.propsData[r.attribute]},[t.createVNode(t.unref(Mc),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,Rd))}}),Id={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Ld={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Fd={class:"p-4"},jd={class:"flex items-center"},Hd={class:"w-0 flex-1 flex justify-between"},Ud=["innerHTML"],zd={class:"ml-4 shrink-0 flex"},qd=["onClick"],Ln=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=ft(),o=a=>{switch(a){case"warning":return"border-orange-500";case"error":return"border-red-500";case"info":return"border-blue-500";case"success":return"border-green-500"}};return t.onMounted(()=>{Td(r)}),(a,s)=>(t.openBlock(),t.createBlock(t.unref(yr),null,{default:t.withCtx(()=>[t.createElementVNode("div",Id,[t.createVNode(t.TransitionGroup,{tag:"div",class:"max-w-sm space-y-2 w-full","enter-active-class":"ease-out duration-300","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),([l,c])=>(t.openBlock(),t.createElementBlock("div",{key:c.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(c.type)]])},[t.createElementVNode("div",Ld,[t.createElementVNode("div",Fd,[t.createElementVNode("div",jd,[t.createElementVNode("div",Hd,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:c.message},null,8,Ud)]),t.createElementVNode("div",zd,[t.createElementVNode("button",{class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150",onClick:i=>t.unref(r).remove(l)},s[0]||(s[0]=[t.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,qd)])])])])],2))),128))]),_:1})])]),_:1}))}});function Wd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}function Yd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h7"})])}function Kd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})])}function bs(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])}function Jt(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})])}const Gd={class:"flex"},Jd={class:"flex-shrink-0"},Xd={class:"ml-2.5"},Zd={key:0,role:"list",class:"list-disc space-y-1 pl-5"},Qd={key:1},eu={key:1,class:"mt-4"},tu={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},nu={key:0},ru=["href","role"],ou={key:1},au=["href","role"],su={key:0,class:"ml-auto pl-3"},lu={class:"-mx-1.5 -my-1.5"},ys=t.defineComponent({__name:"InlineAlert",props:{btnLink:{default:""},btnText:{default:""},content:{},dismissable:{type:Boolean,default:!1},secondaryBtnLink:{default:""},secondaryBtnText:{default:""},title:{default:""},kind:{}},emits:["close","click","click:secondary"],setup(n,{emit:r}){const e=n,o=r,a=t.ref(!0),s=()=>{a.value=!1,o("close",!0)},l=t.computed(()=>{const i={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":i.bgColor="bg-red-50",i.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",i.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",i.contentColor="text-red-800",i.iconColor="text-red-400";break;case"info":i.bgColor="bg-blue-50",i.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",i.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",i.contentColor="text-blue-800",i.iconColor="text-blue-400";break;case"success":i.bgColor="bg-emerald-50",i.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",i.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",i.contentColor="text-emerald-800",i.iconColor="text-emerald-400";break;case"warn":i.bgColor="bg-amber-50",i.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",i.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",i.contentColor="text-amber-800",i.iconColor="text-amber-400";break}return i}),c=t.computed(()=>{let i=null;switch(e.kind){case"alert":i=Oc;break;case"info":i=Ac;break;case"success":i=Pa;break;case"warn":i=Pc;break}return i});return(i,u)=>a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["rounded-xy p-4",l.value.bgColor])},[t.createElementVNode("div",Gd,[t.createElementVNode("div",Jd,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.value),{class:t.normalizeClass(["h-5 w-5",l.value.iconColor]),"aria-hidden":"true"},null,8,["class"]))]),t.createElementVNode("div",Xd,[i.title?(t.openBlock(),t.createElementBlock("h3",{key:0,class:t.normalizeClass(["text-sm leading-snug font-semibold mb-1.5",l.value.contentColor])},t.toDisplayString(i.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",l.value.contentColor])},[Array.isArray(i.content)?(t.openBlock(),t.createElementBlock("ul",Zd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.content,(d,f)=>(t.openBlock(),t.createElementBlock("li",{key:f},t.toDisplayString(d),1))),128))])):(t.openBlock(),t.createElementBlock("p",Qd,t.toDisplayString(i.content),1))],2),i.btnText||i.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",eu,[t.createElementVNode("div",tu,[i.btnText?(t.openBlock(),t.createElementBlock("div",nu,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnAction]),href:i.btnLink,role:i.btnLink?"link":"button",onClick:u[0]||(u[0]=d=>i.$emit("click",d))},t.toDisplayString(i.btnText),11,ru)])):t.createCommentVNode("",!0),i.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",ou,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnAction]),href:i.secondaryBtnLink,role:i.secondaryBtnLink?"link":"button",onClick:u[1]||(u[1]=d=>i.$emit("click:secondary",d))},t.toDisplayString(i.secondaryBtnText),11,au)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),i.dismissable?(t.openBlock(),t.createElementBlock("div",su,[t.createElementVNode("div",lu,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex rounded-md p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnClose]),type:"button",onClick:s},[u[2]||(u[2]=t.createElementVNode("span",{class:"sr-only"},"close",-1)),t.createVNode(t.unref(Jt),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),iu={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},cu={class:"block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"},du={class:"px-4 pt-5 pb-4 sm:p-8 sm:pb-6"},uu={class:"mt-3 sm:mt-0 sm:text-left"},fu={class:"mt-2"},pu={key:0,class:"bg-gray-50 flex flex-col gap-3 px-4 py-3 rounded-b-xy shadow-xl sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse sm:rounded-b-xy-lg"},mu=["disabled"],ws=t.defineComponent({__name:"Modal",props:t.mergeModels({destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},wide:{type:Boolean,default:!1},submitText:{default:""},title:{default:""}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close","submit"],["update:modelValue"]),setup(n,{emit:r}){const e=n,o=t.useModel(n,"modelValue"),a=r,s=()=>{a("submit")},l=t.useSlots(),c=t.computed(()=>e.submitText||l.buttons);return t.watch(o,i=>{i||a("close")}),(i,u)=>(t.openBlock(),t.createBlock(t.unref(zt),{as:"template",show:o.value},{default:t.withCtx(()=>[t.createVNode(t.unref(kn),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:o.value,onClose:u[3]||(u[3]=d=>o.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",iu,[t.createVNode(t.unref(Je),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(En),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),u[5]||(u[5]=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"",-1)),t.createVNode(t.unref(Je),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["inline-block align-bottom text-left overflow-y-visible transform transition-all w-full sm:my-8 sm:align-middle",i.wide?"sm:max-w-6xl":"sm:max-w-2xl"])},[t.createElementVNode("div",{class:t.normalizeClass(["bg-white rounded-t-xy sm:rounded-t-xy-lg",!c.value&&"rounded-b-xy sm:rounded-b-xy-lg shadow-xl"])},[t.createElementVNode("div",cu,[t.createElementVNode("button",{type:"button",class:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",onClick:u[0]||(u[0]=d=>o.value=!1)},[u[4]||(u[4]=t.createElementVNode("span",{class:"sr-only"},"Close",-1)),t.createVNode(t.unref(Jt),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",du,[t.createElementVNode("div",uu,[t.createVNode(t.unref(Cr),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.title),1)]),_:1}),t.createElementVNode("div",fu,[t.renderSlot(i.$slots,"default")])])])],2),c.value?(t.openBlock(),t.createElementBlock("div",pu,[i.submitText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("button",{type:"button",class:t.normalizeClass([i.destructive?"xy-btn-red":"xy-btn"]),disabled:i.disabled,onClick:u[1]||(u[1]=d=>s())},t.toDisplayString(i.submitText),11,mu),t.createElementVNode("button",{type:"button",class:"xy-btn-neutral",onClick:u[2]||(u[2]=d=>o.value=!1)}," Cancel ")],64)):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"buttons")])):t.createCommentVNode("",!0)],2)]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),hu={class:"aspect-square overflow-hidden"},gu={class:"flex justify-center relative"},bu={class:"sr-only"},Ur=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,s;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(s=t.unref(r))==null?void 0:s.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",hu,[t.createElementVNode("div",gu,[t.createElementVNode("p",bu,[t.renderSlot(e.$slots,"default",{},()=>[o[0]||(o[0]=t.createTextVNode("loading"))])]),o[1]||(o[1]=t.createStaticVNode('<div class="animate-spin-gear drop-shadow-sm"><svg class="h-full w-full text-xy-green-300" viewBox="0 0 129 129" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><polygon id="path-1" points="0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"></polygon></defs><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-6-Copy-3"><g id="Group-3"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><g id="Clip-2"></g><path id="Fill-1" d="M86.3955173,100.279324 C86.3955173,100.279324 79.4778923,106.213874 64.2360462,106.755809 C48.9954404,106.213874 42.0778154,100.279324 42.0778154,100.279324 C11.8756904,81.4963011 25.2309115,49.088357 25.2309115,49.088357 C36.5680269,24.1350542 59.1839596,22.5554236 63.8105942,22.4983139 L63.8105942,22.5043894 C63.8105942,22.5043894 63.9681231,22.4983139 64.2360462,22.4958837 C64.5052096,22.4983139 64.6627385,22.5043894 64.6627385,22.5043894 L64.6627385,22.4983139 C69.2881327,22.5554236 91.9053058,24.1350542 103.241181,49.088357 C103.241181,49.088357 116.596402,81.4963011 86.3955173,100.279324 L86.3955173,100.279324 Z M128.473085,68.8191581 L128.473085,60.4677727 L117.036738,58.80187 L115.10794,49.3726905 L124.970238,43.4186983 L121.675777,35.7307578 L110.49619,38.6214817 L106.161046,32.1486416 L113.220075,23.080347 L107.361738,17.0716753 L97.9645846,23.7437918 L89.14545,17.842049 L91.8693346,6.72144964 L84.04995,3.59378109 L78.2114596,13.4628269 L69.5907865,11.8127205 L67.908825,0.48676924 L64.6627385,0.48676924 L63.8105942,0.48676924 L60.5645077,0.48676924 L58.8813058,11.8127205 L50.2618731,13.4628269 L44.4233827,3.59378109 L36.6039981,6.72144964 L39.3278827,17.842049 L30.5087481,23.7437918 L21.1103538,17.0716753 L15.2520173,23.080347 L22.3122865,32.1486416 L17.9771423,38.6214817 L6.79755577,35.7307578 L3.50185385,43.4186983 L13.3641519,49.3726905 L11.4365942,58.80187 L0.000248076923,60.4677727 L0.000248076923,68.8191581 L11.4365942,70.4850608 L13.1036712,79.0223566 L3.13718077,84.8050196 L6.29644038,92.5488548 L17.5244019,89.8513318 L23.4832096,98.5854738 L16.7466808,107.893143 L22.8134019,113.695248 L31.9699212,106.70356 L38.5067481,110.99651 L35.5881231,122.068505 L43.35045,125.332265 L49.3625942,115.565287 L58.8813058,117.47421 L60.5645077,128.801377 L63.6927577,128.801377 L64.780575,128.801377 L67.908825,128.801377 L69.5907865,117.47421 L79.1107385,115.565287 L85.1228827,125.332265 L92.8852096,122.068505 L89.9665846,110.99651 L96.5034115,106.70356 L105.659931,113.695248 L111.725412,107.893143 L104.988883,98.5854738 L110.94769,89.8513318 L122.175652,92.5488548 L125.334912,84.8050196 L115.369662,79.0223566 L117.035498,70.4850608 L128.473085,68.8191581 Z" fill="currentColor" mask="url(#mask-2)"></path></g></g></g></svg></div><div class="absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"><svg viewBox="0 0 280 280" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="fill-xy-green" d="m17.57,94.37c-3.36,13.54-5.07,28.73-5.07,45.63,0,32.02,6.04,58,18.1,77.95,3.81,4.98,7.46,9.94,10.95,14.66,21.21,23.24,54.01,34.89,98.45,34.89.71,0,1.39-.03,2.09-.03-3.62-46.93-22.27-88.31-54.36-124.11-19.79-22.07-42.96-38.86-70.16-48.99Z"></path><path class="fill-xy-blue" d="m267.5,140c0-85-42.5-127.5-127.5-127.5-55.06,0-92.27,17.86-111.66,53.53,28.32,8.48,56.67,16.85,84.98,25.37,27.05,8.14,54.01,16.55,81.06,24.67,5.45,1.64,7.5,4.76,6.63,10.27-.69,4.35-1.04,8.75-1.57,13.13-4.95,40.77-8.32,81.74-12.43,122.61,53.64-13.88,80.49-54.56,80.49-122.08Z"></path></svg></div>',2))])])],2)}}}),yu={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-60"},wu={class:"mt-2"},Fn=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:s,showMsg:l}=Wo(),c=()=>{r.value++,r.value>o.value&&(r.value=0),a.value&&(s.value=a.value[r.value]),l.value=!0},i=()=>{window.setTimeout(()=>{l.value=!1},2500)};return(u,d)=>(t.openBlock(),t.createBlock(t.unref(yr),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",yu,[t.createVNode(Ur,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",wu,[t.createVNode(t.Transition,{appear:"","enter-active-class":"ease-out duration-1000","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterEnter:i,onAfterLeave:c},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(s)),513),[[t.vShow,t.unref(l)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),xu={class:"h-screen flex overflow-hidden bg-gray-50"},Cu={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},ku={class:"absolute top-0 right-0 -mr-12 pt-2"},Eu={class:"shrink-0 flex justify-center px-4"},Du=["src"],Nu={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},Su={class:"flex-1 px-2"},_u={class:"space-y-1"},Vu=["href","target"],$u={key:0,class:"mt-auto"},Tu={class:"mt-6 px-2"},Bu={class:"hidden lg:flex lg:shrink-0"},vu={class:"flex flex-col w-64"},Mu={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Pu={class:"flex justify-center shrink-0 px-4"},Au=["src"],Ou={class:"mt-5 grow flex flex-col"},Ru={class:"flex-1 px-2 bg-white"},Iu={class:"space-y-1"},Lu=["href","target"],Fu={key:0,class:"mt-atuo"},ju={class:"mt-6 px-2"},Hu={class:"flex flex-col w-0 flex-1 overflow-hidden"},Uu={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},zu={class:"flex-1 px-4 flex justify-between"},qu={class:"flex-1 flex"},Wu={class:"flex items-center text-base leading-snug sm:text-2xl text-white"},Yu={class:"ml-4 flex items-center lg:ml-6"},Ku=["href"],Gu={class:"flex-1 relative overflow-y-auto focus:outline-none"},Ju={class:"mx-auto"},xs=t.defineComponent({__name:"SidebarLayout",props:{activeUrl:{default:""},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=t.ref(!1),o=a=>r.activeUrl===a;return(a,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",xu,[t.createVNode(t.unref(zt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(kn),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:s[1]||(s[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(Je),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(En),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Je),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",Cu,[t.createVNode(t.unref(Je),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createElementVNode("div",ku,[t.createElementVNode("button",{class:"ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",onClick:s[0]||(s[0]=l=>e.value=!1)},[s[3]||(s[3]=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1)),t.createVNode(t.unref(Jt),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",Eu,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Du)]),t.createElementVNode("div",Nu,[t.createElementVNode("div",Su,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",_u,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50 hover:text-gray-900","group flex items-center px-2 py-2 text-base font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-500 group-hover:text-gray-600","mr-4 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Vu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",$u,[t.createElementVNode("div",Tu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),s[4]||(s[4]=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1))]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",Bu,[t.createElementVNode("div",vu,[t.createElementVNode("div",Mu,[t.createElementVNode("div",Pu,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Au)]),t.createElementVNode("div",Ou,[t.createElementVNode("div",Ru,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-800 hover:bg-gray-100 hover:text-gray-900","group flex items-center px-2 py-2 text-sm font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-400 group-hover:text-gray-600","mr-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Lu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Fu,[t.createElementVNode("div",ju,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Hu,[t.createElementVNode("div",Uu,[t.createElementVNode("button",{class:"px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 lg:hidden",onClick:s[2]||(s[2]=l=>e.value=!0)},[s[5]||(s[5]=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1)),t.createVNode(t.unref(Yd),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",zu,[t.createElementVNode("div",qu,[t.createElementVNode("h1",Wu,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Yu,[t.createVNode(t.unref(kr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Er),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[s[6]||(s[6]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(Bc),{class:"h-8 w-8",fill:"currentColor"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dr),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Nr),{key:l.name},{default:t.withCtx(({active:c})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([c?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,Ku)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Gu,[t.createElementVNode("div",Ju,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(Ln),t.createVNode(Fn)],64))}}),Xt=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.useTemplateRef("trigger"),o=t.useTemplateRef("wrapper"),a=t.computed(()=>{const c=[Wc(5),Kc()];return r.position==="auto"&&c.push(Ha()),c}),s=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:l}=ls(e,o,{middleware:a,placement:s,strategy:"fixed",whileElementsMounted:rs});return(c,i)=>(t.openBlock(),t.createBlock(t.unref(ka),{as:c.as,class:"relative"},{default:t.withCtx(({open:u,close:d})=>[t.createVNode(t.unref(bc),{ref:"trigger"},{default:t.withCtx(()=>[t.renderSlot(c.$slots,"button",{open:u,close:d})]),_:2},1536),t.createElementVNode("div",{ref:"wrapper",class:"z-[5]",style:t.normalizeStyle(t.unref(l))},[t.createVNode(t.unref(yc),null,{default:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{open:u,close:d})]),_:2},1024)],4)]),_:3},8,["as"]))}}),Xu=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},Zu={},Qu={class:"w-full max-w-xs bg-white rounded-xy p-2 border border-gray-100 shadow-md"};function ef(n,r){return t.openBlock(),t.createElementBlock("div",Qu,[t.renderSlot(n.$slots,"default")])}const Cs=Xu(Zu,[["render",ef]]),tf={class:"absolute inset-0 overflow-hidden"},nf={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},rf={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},of={class:"flex items-center justify-between"},af={class:"ml-3 h-7 flex items-center"},sf={class:"mt-1"},lf=["textContent"],ks=t.defineComponent({__name:"Slideover",props:t.mergeModels({header:{},description:{},size:{default:"sm"}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close"],["update:modelValue"]),setup(n,{emit:r}){const e=n,o=t.computed(()=>{switch(e.size){case"lg":return{maxWidth:"max-w-6xl",padding:"py-6 px-4 sm:px-20 sm:py-14"};case"md":return{maxWidth:"max-w-4xl",padding:"py-6 px-4 sm:px-16 sm:py-12"};default:return{maxWidth:"max-w-md",padding:"py-6 px-4 sm:px-6 sm:py-4"}}}),a=t.useModel(n,"modelValue"),s=r;return t.watch(a,l=>{l||s("close")}),(l,c)=>(t.openBlock(),t.createBlock(t.unref(zt),{as:"template",show:a.value},{default:t.withCtx(()=>[t.createVNode(t.unref(kn),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:a.value,onClose:c[1]||(c[1]=i=>a.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",tf,[t.createVNode(t.unref(En),{class:"absolute inset-0"}),t.createElementVNode("div",nf,[t.createVNode(t.unref(Je),{as:"template",enter:"transform transition ease-in-out duration-500 sm:duration-700","enter-from":"translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700","leave-from":"translate-x-0","leave-to":"translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["w-screen",o.value.maxWidth])},[t.createElementVNode("div",rf,[t.createElementVNode("div",{class:t.normalizeClass(["bg-xy-blue-700",o.value.padding])},[t.createElementVNode("div",of,[t.createVNode(t.unref(Cr),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.header),1)]),_:1}),t.createElementVNode("div",af,[t.createElementVNode("button",{class:"bg-xy-blue-600 rounded-md text-gray-50 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:c[0]||(c[0]=i=>a.value=!1)},[c[2]||(c[2]=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1)),t.createVNode(t.unref(Jt),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",sf,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(l.description)},null,8,lf)])],2),t.createElementVNode("div",{class:t.normalizeClass(["relative flex-1",o.value.padding])},[t.renderSlot(l.$slots,"default")],2),t.renderSlot(l.$slots,"footer")])],2)]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),cf=["onMouseover","onMouseleave"],df=["onMouseleave"],uf={class:"max-w-xs"},Es=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=s=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||s()},100)},a=(s,l)=>{r=!0,!l&&s.target&&s.target.click()};return(s,l)=>(t.openBlock(),t.createBlock(Xt,{position:s.position,as:s.as},{button:t.withCtx(({open:c,close:i})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:u=>a(u,c),onMouseleave:u=>o(i)},[t.createVNode(t.unref(Wd)),l[1]||(l[1]=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1))],40,cf)]),default:t.withCtx(({close:c})=>[t.createElementVNode("div",{class:"sm:min-w-max bg-white rounded-xy px-3.5 py-2.5 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium",onMouseover:l[0]||(l[0]=t.withModifiers(i=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(i=>o(c),["prevent"])},[t.createElementVNode("div",uf,[t.renderSlot(s.$slots,"default")])],40,df)]),_:3},8,["position","as"]))}}),ff={class:"min-h-screen bg-gray-50"},pf={class:"mx-auto px-4 sm:px-6 lg:px-8"},mf={class:"flex justify-between h-16"},hf={class:"flex"},gf={class:"shrink-0 flex items-center"},bf=["src"],yf={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},wf=["href","aria-current"],xf={class:"hidden sm:ml-6 sm:flex sm:items-center"},Cf=["href"],kf={class:"-mr-2 flex items-center sm:hidden"},Ef={class:"pt-2 pb-3 space-y-1"},Df=["href","aria-current"],Nf={class:"pt-4 pb-3 border-t border-gray-200"},Sf={class:"flex items-center px-4"},_f={class:"shrink-0"},Vf={class:"ml-3"},$f=["textContent"],Tf=["textContent"],Bf={class:"mt-3 space-y-1"},vf=["href"],Mf={class:"mx-auto sm:px-6 lg:px-8"},Pf={class:"px-4 py-8 sm:px-0"},Ds=t.defineComponent({__name:"StackedLayout",props:{activeUrl:{default:""},currentUser:{},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=o=>r.activeUrl===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",ff,[t.createVNode(t.unref(cc),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:s})=>[t.createElementVNode("div",pf,[t.createElementVNode("div",mf,[t.createElementVNode("div",hf,[t.createElementVNode("div",gf,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,bf)]),t.createElementVNode("div",yf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"border-blue-500 text-gray-900":"border-transparent text-gray-700 hover:text-gray-900 hover:border-blue-500","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,wf))),128))])]),t.createElementVNode("div",xf,[t.createVNode(t.unref(kr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Er),{class:"bg-white flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(bs),{class:"text-gray-500 h-8 w-8 rounded-full"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dr),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Nr),{key:l.name},{default:t.withCtx(({active:c})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([c?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,Cf)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",kf,[t.createVNode(t.unref(dc),{class:"bg-white inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[a[1]||(a[1]=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),s?(t.openBlock(),t.createBlock(t.unref(Jt),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Kd),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(uc),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",Ef,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"bg-blue-50 border-blue-500 text-blue-700":"border-transparent text-gray-700 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-900","block pl-3 pr-4 py-2 border-l-4 text-base font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,Df))),128))]),t.createElementVNode("div",Nf,[t.createElementVNode("div",Sf,[t.createElementVNode("div",_f,[t.createVNode(t.unref(bs),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",Vf,[o.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(o.currentUser.name)},null,8,$f)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,Tf)])]),t.createElementVNode("div",Bf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(l.name),9,vf))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",Mf,[t.createElementVNode("div",Pf,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(Ln),t.createVNode(Fn)],64))}}),Af=n=>n==null,Of={clearSelection(){console.warn("clearSelection() was called on a static table, did you mean to use DynamicTable?")},refresh(){console.warn("refresh() was called on a static table, did you mean to use DynamicTable?")},reset(){console.warn("reset() was called on a static table, did you mean to use DynamicTable?")},selectedData:t.computed(()=>[])},Ns=(n,r,e,o=Of)=>{const a=t.ref(r),s=t.ref(n),l=t.ref(e),c=t.computed(()=>l.value.actions.length>0),i=t.computed(()=>a.value.filter(d=>d.show??!0).map(d=>{let f="";switch((d==null?void 0:d.alignment)||"left"){case"left":f="text-left";break;case"right":f="text-right";break;case"center":f="text-center";break}return{...d,alignment:f}})),u=t.computed(()=>s.value.map((d,f)=>({actions:l.value.actions.map(p=>({...p,disabled:typeof p.disabled=="function"?p.disabled.apply(void 0,[d,f]):p.disabled,onClick:g=>p.onClick(d,f,o,g),show:typeof p.show=="function"?p.show.apply(void 0,[d,f]):p.show,url:typeof p.url=="function"?p.url.apply(void 0,[d,f]):p.url??""})),rowData:d,cells:i.value.map(p=>{const g=typeof p.render=="function"?p.render.apply(void 0,[d,f]):d[p.render],m=(p==null?void 0:p.classNames)||"";return{...p,isComponent:t.isVNode(g),classNames:typeof m=="function"?m.apply(void 0,[d,f]):m,val:g}})})));return{columns:i,hasActions:c,isEmptyCellValue:Af,rows:u}},Rf={class:"flex flex-col"},If={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Lf={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Ff={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},jf={class:"min-w-full divide-y divide-gray-200"},Hf={class:"bg-gray-100"},Uf={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},zf={class:"bg-white"},qf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5 w-0"},Wf={key:0},Yf=["colspan"],Ss=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:s}=Ns(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(l,c)=>(t.openBlock(),t.createElementBlock("div",Rf,[t.createElementVNode("div",If,[t.createElementVNode("div",Lf,[t.createElementVNode("div",Ff,[t.createElementVNode("table",jf,[t.createElementVNode("thead",Hf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(i,u)=>(t.openBlock(),t.createElementBlock("th",{key:u,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",i.alignment])},t.toDisplayString(i.title),3))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("th",Uf)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",zf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(i,u)=>(t.openBlock(),t.createElementBlock("tr",{key:u,class:"even:bg-gray-50"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.cells,(d,f)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:f,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",d.alignment])},{default:t.withCtx(()=>[d.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(d.classNames)},t.toDisplayString(t.unref(a)(d.val)?"-":String(d.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",qf,[l.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(Mn),{key:0,actions:i.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(t.unref(Lt),{key:1,actions:i.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(s).length===0?(t.openBlock(),t.createElementBlock("tr",Wf,[t.createElementVNode("td",{colspan:t.unref(e).length+(t.unref(o)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Yf)])):t.createCommentVNode("",!0)])])])])])]))}}),Kf={class:"flex items-center justify-center space-x-8"},Gf={class:"font-medium"},Jf={class:"flex items-center space-x-5"},Xf={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Zf={key:1,class:"relative flex items-center justify-center"},Qf={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},ep={key:0,class:"flex shrink-0"},tp={key:0,class:"inline-flex rounded-md shadow-sm"},np=["textContent"],rp={class:"ml-3 inline-flex rounded-md shadow-sm"},op=["textContent"],_s=t.defineComponent({__name:"Steps",props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:{},total:{}},emits:["next","previous"],setup(n,{emit:r}){const e=r,o=()=>{e("next")},a=()=>{e("previous")};return(s,l)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Kf,[t.createElementVNode("p",Gf,"Step "+t.toDisplayString(s.step)+" of "+t.toDisplayString(s.total),1),t.createElementVNode("ul",Jf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.total,c=>(t.openBlock(),t.createElementBlock("li",{key:c},[s.step>c?(t.openBlock(),t.createElementBlock("span",Xf)):s.step===c?(t.openBlock(),t.createElementBlock("div",Zf,l[0]||(l[0]=[t.createElementVNode("span",{class:"absolute w-5 h-5 p-px flex"},[t.createElementVNode("span",{class:"w-full h-full rounded-full bg-green-100"})],-1),t.createElementVNode("span",{class:"relative block w-2.5 h-2.5 bg-xy-green rounded-full"},null,-1)]))):(t.openBlock(),t.createElementBlock("span",Qf))]))),128))])]),s.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ep,[s.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",tp,[t.createElementVNode("button",{type:"button",class:"xy-btn-secondary",onClick:a,textContent:t.toDisplayString(s.previousText)},null,8,np)])),t.createElementVNode("span",rp,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:o,textContent:t.toDisplayString(s.nextText)},null,8,op)])]))]))}}),ap={key:0,class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},sp={key:0,class:"w-full max-w-lg lg:max-w-xs"},lp={class:"flex items-center gap-x-2"},ip={class:"flex-1"},cp={key:1,class:"w-full max-w-lg lg:max-w-xs"},dp={class:"flex items-center gap-x-2"},up={class:"flex-1"},fp={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},pp={class:"min-w-full divide-y divide-gray-200"},mp={class:"bg-gray-100"},hp={key:0,scope:"col",class:"pl-6 w-4 leading-none"},gp=["checked","indeterminate"],bp=["onClick"],yp={key:0},wp={key:1},xp={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},Cp={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},kp={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},Ep={key:1,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},Dp={key:0},Np={colspan:"100%",class:"px-6 py-2.5 border-t bg-neutral-50"},Sp={class:"flex items-center gap-x-3"},_p={class:"text-sm shrink-0"},Vp={class:"font-medium"},$p={class:"font-medium"},Tp={class:"bg-white"},Bp=["onClick"],vp={key:0,class:"pl-6 w-4 leading-none"},Mp=["disabled","value"],Pp={key:1,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5 w-0"},Ap={key:0},Op=["colspan"],Rp={key:1,class:"mt-4"},Vs=t.defineComponent({__name:"DynamicTable",props:t.mergeModels({tableActions:{default:()=>({type:"dropdown",actions:[]})},tableBulkActions:{default:()=>({actions:[]})},tableColumns:{},tableOptions:{}},{selected:{required:!1,default:[]},selectedModifiers:{}}),emits:t.mergeModels(["click:row"],["update:selected"]),setup(n,{expose:r}){var pt;const e=n,o=()=>{const M={minDate:u.value.minDate||null,maxDate:u.value.maxDate||null,page:d.value.page,perPage:d.value.perPage,sort:c.value,sortDir:i.value,q:f.value};w(),mr.get(e.tableOptions.url,{skipLoader:!1},M).then(A=>{d.value={page:A.data.page,perPage:A.data.perPage,totalItems:A.data.totalItems,totalPages:A.data.totalPages},l.value=A.data.items},()=>{jr.genericError()})},a=()=>{d.value.page=1,o()},s=()=>{if(m.value.maxRange){const M=new Date,A=M.setDate(M.getDate()-m.value.maxRange),de=new Date;u.value={minDate:Math.floor(A/1e3),maxDate:Math.floor(de.getTime()/1e3)}}},l=t.ref([]),c=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),i=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),u=t.ref({minDate:0,maxDate:0}),d=t.ref({page:1,perPage:((pt=e.tableOptions)==null?void 0:pt.perPage)||10,totalItems:0,totalPages:0}),f=t.ref(""),p=M=>{M&&(d.value.page=1,u.value=M,o())},g=M=>{c.value==M?i.value=i.value==="desc"?"asc":"desc":(c.value=M,i.value="desc"),o()},m=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),y=t.computed(()=>!!ve.value.length),w=()=>{C.value=[]},C=t.useModel(n,"selected"),S=t.computed(()=>l.value.filter(M=>C.value.includes(M==null?void 0:M.id))),N=t.computed(()=>C.value.filter(M=>H.value.includes(M))),P=t.computed(()=>e.tableBulkActions.actions.filter(M=>M.show??!0).map(M=>({...M,disabled:C.value.length===0||M.disabled,onClick:A=>M.onClick.apply(void 0,[C.value,S.value,U,A])}))),I=t.computed(()=>P.value.length>0),H=t.computed(()=>l.value.filter(M=>M.id===void 0?!1:!!(e.tableBulkActions.isSelectable===void 0||e.tableBulkActions.isSelectable(M))).map(M=>M.id)),B=t.computed(()=>N.value.length>0&&N.value.length===H.value.length),me=t.computed(()=>N.value.length>0&&N.value.length<H.value.length),L=M=>{if(M.target.checked){C.value=H.value.map(de=>de);return}w()},U={clearSelection:w,selectedData:S,refresh:o,reset:a},{columns:G,hasActions:J,isEmptyCellValue:re,rows:ve}=Ns(l,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),U);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(U),s(),o(),(M,A)=>{var mt;const de=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[M.tableOptions.search||M.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",ap,[M.tableOptions.search?(t.openBlock(),t.createElementBlock("div",sp,[A[7]||(A[7]=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),t.createElementVNode("div",lp,[A[6]||(A[6]=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1)),t.createElementVNode("div",ip,[t.createVNode(de,{id:"table-search",modelValue:f.value,"onUpdate:modelValue":A[0]||(A[0]=q=>f.value=q),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:A[1]||(A[1]=q=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),M.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",cp,[A[9]||(A[9]=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1)),t.createElementVNode("div",dp,[A[8]||(A[8]=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1)),t.createElementVNode("div",up,[t.createVNode(Rn,t.mergeProps({id:"table-date-range",modelValue:u.value,"onUpdate:modelValue":A[2]||(A[2]=q=>u.value=q)},{...m.value},{"onUpdate:modelValue":p}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",fp,[t.createElementVNode("table",pp,[t.createElementVNode("thead",mp,[t.createElementVNode("tr",null,[I.value?(t.openBlock(),t.createElementBlock("th",hp,[t.createElementVNode("input",{class:t.normalizeClass(["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50","border-gray-300 focus:ring-xy-blue-500"]),checked:B.value,indeterminate:me.value,type:"checkbox",onChange:L},null,40,gp)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(G),(q,Ne)=>(t.openBlock(),t.createElementBlock("th",{key:Ne,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",q.alignment])},[t.createElementVNode("div",{class:t.normalizeClass(["inline-flex items-center gap-2",{"cursor-pointer":q.sort}]),onClick:t.withModifiers(Oe=>q.sort?g(q.sort):void 0,["prevent"])},[q.title?(t.openBlock(),t.createElementBlock("span",yp,t.toDisplayString(q.title),1)):t.createCommentVNode("",!0),q.sort?(t.openBlock(),t.createElementBlock("span",wp,[c.value!==q.sort?(t.openBlock(),t.createElementBlock("svg",xp,A[10]||(A[10]=[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"},null,-1)]))):i.value=="desc"?(t.openBlock(),t.createElementBlock("svg",Cp,A[11]||(A[11]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"},null,-1)]))):(t.openBlock(),t.createElementBlock("svg",kp,A[12]||(A[12]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])))])):t.createCommentVNode("",!0)],10,bp)],2))),128)),t.unref(J)?(t.openBlock(),t.createElementBlock("th",Ep)):t.createCommentVNode("",!0)]),I.value&&C.value.length>0?(t.openBlock(),t.createElementBlock("tr",Dp,[t.createElementVNode("td",Np,[t.createElementVNode("div",Sp,[t.createElementVNode("div",_p,[A[13]||(A[13]=t.createTextVNode(" Selected ")),t.createElementVNode("span",Vp,t.toDisplayString(N.value.length),1),A[14]||(A[14]=t.createTextVNode(" of ")),t.createElementVNode("span",$p,t.toDisplayString(H.value.length),1)]),t.createVNode(t.unref(Lt),{actions:P.value},null,8,["actions"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("tbody",Tp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(ve),(q,Ne)=>{var Oe,nt;return t.openBlock(),t.createElementBlock("tr",{key:Ne,class:"even:bg-gray-50",onClick:oe=>M.$emit("click:row",q.rowData)},[I.value?(t.openBlock(),t.createElementBlock("td",vp,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":A[3]||(A[3]=oe=>C.value=oe),class:t.normalizeClass(["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50","border-gray-300 focus:ring-xy-blue-500"]),disabled:!H.value.includes((Oe=q.rowData)==null?void 0:Oe.id),type:"checkbox",value:(nt=q.rowData)==null?void 0:nt.id},null,8,Mp),[[t.vModelCheckbox,C.value]])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(q.cells,(oe,rt)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:rt,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",oe.alignment])},{default:t.withCtx(()=>[oe.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(oe.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(oe.classNames)},t.toDisplayString(t.unref(re)(oe.val)?"-":String(oe.val)),3))]),_:2},1032,["class"]))),128)),t.unref(J)?(t.openBlock(),t.createElementBlock("td",Pp,[M.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(Mn),{key:0,actions:q.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(t.unref(Lt),{key:1,actions:q.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,Bp)}),128)),y.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Ap,[t.createElementVNode("td",{colspan:t.unref(G).length+(t.unref(J)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Op)]))])])]),y.value?(t.openBlock(),t.createElementBlock("div",Rp,[t.createVNode(t.unref(zr),{modelValue:d.value,"onUpdate:modelValue":[A[4]||(A[4]=q=>d.value=q),A[5]||(A[5]=q=>o())],"page-options":(mt=M.tableOptions)==null?void 0:mt.pageOptions},null,8,["modelValue","page-options"])])):t.createCommentVNode("",!0)])}}}),Ip={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:justify-center"},Lp={class:"text-center text-sm text-neutral-700 sm:text-left sm:mr-auto sm:w-1/3"},Fp={class:"font-medium"},jp={class:"font-medium"},Hp={class:"font-medium"},Up={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:flex-1"},zp={class:"flex gap-3 items-center justify-center shrink-0 md:w-1/2"},qp=["disabled"],Wp={class:"max-w-[50px]"},Yp={class:"text-sm"},Kp={class:"font-medium"},Gp=["disabled"],Jp={class:"max-w-[150px] sm:ml-auto"},zr=t.defineComponent({__name:"TablePaginator",props:t.mergeModels({pageOptions:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=t.computed({get:()=>e.value.page,set:d=>{e.value={...e.value,page:d}}}),a=t.computed({get:()=>e.value.perPage,set:d=>{e.value={...e.value,page:1,perPage:d}}}),s=t.computed(()=>r.pageOptions?r.pageOptions:[{label:"5 per page",value:5},{label:"10 per page",value:10},{label:"20 per page",value:20},{label:"50 per page",value:50}]),l=It(d=>{d!==null&&d!==o.value&&(o.value=d)},350),c=It(()=>{o.value<=1||(o.value=o.value-1)},250),i=It(()=>{o.value>=e.value.totalPages||(o.value=o.value+1)},250),u=t.computed(()=>{const{page:d,perPage:f,totalItems:p}=e.value;return{start:p>0?(d-1)*f+1:0,end:Math.min(d*f,p)}});return(d,f)=>(t.openBlock(),t.createElementBlock("div",Ip,[t.createElementVNode("p",Lp,[f[3]||(f[3]=t.createTextVNode(" Showing ")),t.createElementVNode("span",Fp,t.toDisplayString(u.value.start),1),f[4]||(f[4]=t.createTextVNode(" to ")),t.createElementVNode("span",jp,t.toDisplayString(u.value.end),1),f[5]||(f[5]=t.createTextVNode(" of ")),t.createElementVNode("span",Hp,t.toDisplayString(e.value.totalItems),1),f[6]||(f[6]=t.createTextVNode(" results "))]),t.createElementVNode("div",Up,[t.createElementVNode("div",zp,[t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value<=1,type:"button",onClick:f[0]||(f[0]=t.withModifiers(p=>o.value--,["prevent"]))},f[7]||(f[7]=[t.createTextVNode(" ← "),t.createElementVNode("span",{class:"sr-only"},"Previous",-1)]),8,qp),t.createElementVNode("div",Wp,[t.createVNode(t.unref(Xr),{"model-value":o.value,min:1,max:e.value.totalPages,type:"number","onUpdate:modelValue":t.unref(l),onKeydown:[t.withKeys(t.withModifiers(t.unref(c),["prevent"]),["down"]),t.withKeys(t.withModifiers(t.unref(i),["prevent"]),["up"])]},null,8,["model-value","max","onUpdate:modelValue","onKeydown"])]),t.createElementVNode("div",Yp,[f[8]||(f[8]=t.createTextVNode(" of ")),t.createElementVNode("span",Kp,t.toDisplayString(e.value.totalPages),1)]),t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value>=e.value.totalPages,type:"button",onClick:f[1]||(f[1]=t.withModifiers(p=>o.value++,["prevent"]))},f[9]||(f[9]=[t.createElementVNode("span",{class:"sr-only"},"Next",-1),t.createTextVNode(" → ")]),8,Gp)]),t.createElementVNode("div",Jp,[t.createVNode(t.unref(In),{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=p=>a.value=p),options:s.value},null,8,["modelValue","options"])])])]))}}),Xp={class:"hidden sm:block"},Zp=["onClick","textContent"],$s=t.defineComponent({__name:"Tabs",props:t.mergeModels({pillDesign:{type:Boolean,default:!1},tabs:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=(s,l)=>{let c="";return r.pillDesign?(c="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.value===s?c=c+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":c=c+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",c):(c="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.value===s?c=c+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":c=c+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",l&&(c=c+" ml-8"),c)},a=t.computed(()=>!r.pillDesign);return(s,l)=>{const c=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":s.pillDesign}])},[l[1]||(l[1]=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1)),t.createVNode(c,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=i=>e.value=i),name:"tabs",options:s.tabs},null,8,["modelValue","options"])],2),t.createElementVNode("div",Xp,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":a.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[s.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.tabs,(i,u)=>(t.openBlock(),t.createElementBlock("a",{key:u,href:"#",class:t.normalizeClass(o(i.value,u>0)),onClick:t.withModifiers(d=>e.value=i.value,["prevent"]),textContent:t.toDisplayString(i.label)},null,10,Zp))),128))],2)],2)])])}}}),Qp={key:0,class:"sr-only"},em={class:"ml-3 mt-0.5"},Ts=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:t.mergeModels({label:{default:""},help:{default:""}},{modelValue:{type:Boolean,...Z},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue",Z),e=t.useAttrs(),o=t.computed(()=>hr(e,"disabled"));return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Cc),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(kc),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),class:t.normalizeClass([r.value?"bg-xy-blue":"bg-gray-200",o.value?"opacity-75 cursor-not-allowed":"cursor-pointer","relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500"]),disabled:o.value},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Qp,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([r.value?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"])},null,2)]),_:1},8,["modelValue","class","disabled"]),t.createElementVNode("div",em,[a.label?(t.openBlock(),t.createBlock(t.unref(Ec),{key:0},{default:t.withCtx(()=>[t.createVNode(be,{label:a.label,class:t.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer")},null,8,["label","class"])]),_:1})):t.createCommentVNode("",!0),a.help?(t.openBlock(),t.createBlock(t.unref(Dc),{key:1},{default:t.withCtx(()=>[t.createVNode(ce,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),tm={"aria-label":"Progress"},nm={role:"list",class:"flex items-center"},rm={class:"absolute inset-0 flex items-center","aria-hidden":"true"},om=["aria-current"],am={key:1,class:"h-3 w-3 rounded-full bg-xy-blue","aria-hidden":"true"},sm={class:"sr-only"},lm={key:2,class:"sr-only"},Bs=t.defineComponent({__name:"ProgressCircles",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("nav",tm,[t.createElementVNode("ol",nm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,l)=>(t.openBlock(),t.createElementBlock("li",{key:s.name,class:t.normalizeClass([l!==e.value.length-1?"pr-8":"","relative"])},[t.createElementVNode("div",rm,[t.createElementVNode("div",{class:t.normalizeClass(["h-0.5 w-full",s.status==="complete"?"bg-xy-blue":"bg-gray-300"])},null,2)]),t.createElementVNode("div",{class:t.normalizeClass({"relative flex h-5 w-5 items-center justify-center rounded-full":!0,"bg-xy-blue":s.status==="complete","border-2 border-indigo-600 bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"}),"aria-current":s.status==="current"?!0:void 0},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Aa),{key:0,class:"h-3 w-3 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",am)):t.createCommentVNode("",!0),t.createElementVNode("span",sm,t.toDisplayString(s.name),1),s.description?(t.openBlock(),t.createElementBlock("span",lm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)],10,om)],2))),128))])]))}}),im={"aria-label":"Progress"},cm={role:"list",class:"overflow-hidden"},dm=["aria-current"],um={class:"flex h-9 items-center"},fm={key:1,class:"h-2.5 w-2.5 rounded-full bg-xy-blue"},pm={class:"ml-4 flex min-w-0 flex-col"},mm={key:0,class:"text-sm text-gray-600"},vs=t.defineComponent({__name:"ProgressCirclesLabeled",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",im,[t.createElementVNode("ol",cm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:t.normalizeClass([l!==e.value.length-1?"pb-6":"","relative"])},[l!==e.value.length-1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["absolute left-3 top-3 -ml-px mt-0.5 h-full w-0.5",s.status==="complete"?"bg-xy-blue":"bg-gray-300"]),"aria-hidden":"true"},null,2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"group relative flex items-start","aria-current":s.status==="current"?!0:void 0},[t.createElementVNode("span",um,[t.createElementVNode("span",{class:t.normalizeClass({"relative z-10 flex h-6 w-6 items-center justify-center rounded-full":!0,"bg-xy-blue ":s.status==="complete","border-2 border-xy-blue bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"})},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Aa),{key:0,class:"h-4 w-4 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",fm)):t.createCommentVNode("",!0)],2)]),t.createElementVNode("span",pm,[t.createElementVNode("span",{class:t.normalizeClass({"text-sm font-bold":!0,"text-gray-800":s.status==="complete","text-xy-blue":s.status==="current","text-gray-600":s.status==="incomplete","mt-2":!s.description})},t.toDisplayString(s.name),3),s.description?(t.openBlock(),t.createElementBlock("span",mm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)])],8,dm)],2))),128))])]))}}),hm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type"],Ms=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Le),{modelValue:{...Z,set:n=>props.type==="number"?gr(n):n},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:r}){const e=n,o=t.useModel(n,"modelValue",{...Z,set:f=>e.type==="number"?gr(f):f}),a=t.useTemplateRef("input"),{errorState:s,inputID:l,isRequired:c,onInvalid:i,inputValidation:u}=Me(e);r({input:a});const d=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:Go};case"tel":return{pattern:Jo};case"url":return{pattern:Xo};default:return{}}});return(f,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:`${t.unref(l)}-label`,class:"mb-2",for:t.unref(l),label:f.label,required:t.unref(c)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(l),ref:"input","onUpdate:modelValue":p[0]||(p[0]=g=>o.value=g),"aria-labelledby":f.label?`${t.unref(l)}-label`:void 0,"aria-describedby":f.help?`${t.unref(l)}-help`:void 0,"aria-errormessage":t.unref(s)?`${t.unref(l)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(s)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:f.placeholder,type:f.type},{...d.value,...f.$attrs},{onInput:p[1]||(p[1]=(...g)=>t.unref(u)&&t.unref(u)(...g)),onInvalid:p[2]||(p[2]=(...g)=>t.unref(i)&&t.unref(i)(...g))}),null,16,hm),[[t.vModelDynamic,o.value,void 0,{trim:!0}]]),t.createVNode(ce,{id:`${t.unref(l)}-help`,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode($e,{id:`${t.unref(l)}-error`,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),gm={class:"relative flex items-start"},bm={class:"flex items-center h-5"},ym=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],wm={class:"ml-3"},Ps=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeModels(t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Le),{modelValue:{type:[Boolean,null],...Z},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,inputID:a,isDisabled:s,isRequired:l,errorState:c,validate:i,onInvalid:u}=Me(r);return(d,f)=>(t.openBlock(),t.createElementBlock("div",gm,[t.createElementVNode("div",bm,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":f[0]||(f[0]=p=>e.value=p),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,checked:e.value||void 0,class:["h-4 w-4 rounded text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(c)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},d.$attrs,{onChange:f[1]||(f[1]=(...p)=>t.unref(i)&&t.unref(i)(...p)),onInvalid:f[2]||(f[2]=(...p)=>t.unref(u)&&t.unref(u)(...p))}),null,16,ym),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",wm,[t.createVNode(be,{id:t.unref(o).labelledby,for:t.unref(a),label:d.label,class:t.normalizeClass(t.unref(s)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(l)},null,8,["id","for","label","class","required"]),t.createVNode(ce,{id:t.unref(o).describedby,text:d.help},null,8,["id","text"]),t.createVNode($e,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(c)},null,8,["id","text"])])]))}}),xm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],As=t.defineComponent({inheritAttrs:!1,__name:"DateTimeInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Le),{modelValue:{...Z,get:n=>n&&Zo(n),set:n=>n&&new Date(n).toISOString()},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,get:i=>i&&Zo(i),set:i=>i&&new Date(i).toISOString()}),{errorState:o,inputID:a,isRequired:s,onInvalid:l,inputValidation:c}=Me(r);return(i,u)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:`${t.unref(a)}-label`,class:"mb-2",for:t.unref(a),label:i.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":u[0]||(u[0]=d=>e.value=d),"aria-labelledby":i.label?`${t.unref(a)}-label`:void 0,"aria-describedby":i.help?`${t.unref(a)}-help`:void 0,"aria-errormessage":t.unref(o)?`${t.unref(a)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(o)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:i.placeholder,type:"datetime-local"},i.$attrs,{onInput:u[1]||(u[1]=(...d)=>t.unref(c)&&t.unref(c)(...d)),onInvalid:u[2]||(u[2]=(...d)=>t.unref(l)&&t.unref(l)(...d))}),null,16,xm),[[t.vModelText,e.value]]),t.createVNode(ce,{id:`${t.unref(a)}-help`,class:"mt-1",text:i.help},null,8,["id","text"]),t.createVNode($e,{id:`${t.unref(a)}-error`,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),Cm={key:0,class:"text-red-700/80"},Bt=t.defineComponent({__name:"FieldsetLegend",props:{label:{default:""},required:{type:Boolean,default:!1},tag:{default:"legend"}},setup(n){const r=n,e=t.computed(()=>r.required&&/\*$/gm.exec(r.label)!==null?r.label.substring(0,r.label.length-1):r.label);return(o,a)=>o.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.mergeProps({key:0,class:"block text-sm leading-6 font-semibold text-gray-800"},o.$attrs),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.value),1),r.required?(t.openBlock(),t.createElementBlock("span",Cm,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),km=["aria-labelledby","aria-describedby","aria-errormessage"],Em={key:0},Dm={class:"flex"},Nm={class:"flex items-center h-5"},Sm=["id","aria-labelledby","aria-describedby","disabled","value"],_m={class:"ml-3"},Os=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeModels(t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Le),{modelValue:{...Z,get:n=>Array.isArray(n)?n:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,get:g=>Array.isArray(g)?g:[]}),{aria:o,inputID:a,isDisabled:s,errorState:l,validate:c}=Me(r),i=t.computed(()=>r.min||null),u=t.computed(()=>r.max||null),d=t.computed(()=>{var m;const g=((m=e.value)==null?void 0:m.length)||0;return i.value!==null&&g<i.value?`Please select at least ${i.value} of these options.`:u.value!==null&&g>u.value?`Please limit your selection to ${u.value} of these options.`:i.value!==null&&u.value!==null&&(g<i.value||g>u.value)?`Please select between ${i.value} and ${u.value} of these options.`:""}),f=t.useTemplateRef("errorInput"),p=()=>{var g;l.value||(l.value=d.value,(g=f.value)==null||g.setCustomValidity(d.value))};return(g,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-6","aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage},[g.label?(t.openBlock(),t.createElementBlock("div",Em,[t.createVNode(Bt,{id:t.unref(o).labelledby,label:g.label,required:!!i.value},null,8,["id","label","required"]),g.help?(t.openBlock(),t.createBlock(ce,{key:0,id:t.unref(o).describedby,class:"mt-1",tag:"p",text:g.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode($e,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(l)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Dm,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":g.columns!==void 0,"sm:grid-cols-2":g.columns===2,"sm:grid-cols-3":g.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,(y,w)=>(t.openBlock(),t.createElementBlock("div",{key:y.value,class:"flex items-start"},[t.createElementVNode("div",Nm,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(a)}-${w}`,"onUpdate:modelValue":m[0]||(m[0]=C=>e.value=C),"aria-labelledby":`${t.unref(a)}-${w}-label`,"aria-describedby":y.help?`${t.unref(a)}-${w}-help`:void 0,disabled:y.disabled,class:["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox",value:y.value,ref_for:!0},g.$attrs,{onChange:m[1]||(m[1]=(...C)=>t.unref(c)&&t.unref(c)(...C))}),null,16,Sm),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",_m,[t.createVNode(be,{id:`${t.unref(a)}-${w}-label`,for:`${t.unref(a)}-${w}`,label:y.label,class:t.normalizeClass(t.unref(s)||y.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ce,{id:`${t.unref(a)}-${w}-help`,text:y.help},null,8,["id","text"])])]))),128))],2)]),d.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref:"errorInput",required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:p},null,544)):t.createCommentVNode("",!0)],8,km))}});function Rs(n){const{anchorOffset:r=0,focusOffset:e=0}=n.ownerDocument.getSelection()||{},o=Math.min(r,e),a=Math.max(r,e);return[o,a]}function Vm(n,[r,e]){var o,a,s,l;const c=n.ownerDocument,i=c.createRange();i.setStart(n.firstChild||n,Math.min(r,(a=(o=n.textContent)===null||o===void 0?void 0:o.length)!==null&&a!==void 0?a:0)),i.setEnd(n.lastChild||n,Math.min(e,(l=(s=n.textContent)===null||s===void 0?void 0:s.length)!==null&&l!==void 0?l:0));const u=c.getSelection();u&&(u.removeAllRanges(),u.addRange(i))}class $m{constructor(r){this.element=r,this.maxLength=1/0}get value(){return this.element.innerText.replace(/\n\n$/,`
|
|
16
|
+
if the issue persists.`:"Whoops! Something went wrong.";return s({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:s,remove:a,flash:l,error:c,warning:d,info:i,success:u,genericError:f},flashes:r,configure:o}}const Td=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type>"u"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let Fr;function ft(){return Fr===void 0&&(Fr=ms()),Fr}const jr={error(n,r){ft().flasher.error(n,r)},info(n,r){ft().flasher.info(n,r)},success(n,r){ft().flasher.success(n,r)},warning(n,r){ft().flasher.warning(n,r)},genericError(n,r){ft().flasher.genericError(n,r)}},Bd={class:"px-4 flex items-center justify-between sm:px-0"},vd={class:"w-0 flex-1 flex"},Md={class:"hidden md:flex"},Pd=["onClick","textContent"],Ad={class:"w-0 flex-1 flex justify-end"},Hr=t.defineComponent({__name:"Paginator",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue"),e=a=>{r.value={...r.value,page:a}},o=t.computed(()=>{const a=[];if(r.value.totalPages<=4){for(let l=0;l<r.value.totalPages;l++)a.push(l+1);return a}if(r.value.totalPages-r.value.page>=3){for(let l=0;l<4;l++)a.push(r.value.page+l);return a}for(let l=0;l<4;l++)a.unshift(r.value.totalPages-l);return a});return(a,s)=>(t.openBlock(),t.createElementBlock("div",Bd,[t.createElementVNode("div",vd,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pr-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",r.value.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[0]||(s[0]=t.withModifiers(l=>e(r.value.page-1),["prevent"]))},s[2]||(s[2]=[t.createElementVNode("svg",{class:"mr-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),t.createTextVNode(" Previous ")]),2)]),t.createElementVNode("div",Md,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,l=>(t.openBlock(),t.createElementBlock("a",{key:l,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",r.value.page===l?"border-blue-500 text-blue-600 focus:outline-none focus:text-blue-800 focus:border-blue-700":"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-400"]),onClick:t.withModifiers(c=>e(l),["prevent"]),textContent:t.toDisplayString(l)},null,10,Pd))),128))]),t.createElementVNode("div",Ad,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pl-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",r.value.page>=r.value.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[1]||(s[1]=t.withModifiers(l=>e(r.value.page+1),["prevent"]))},s[3]||(s[3]=[t.createTextVNode(" Next "),t.createElementVNode("svg",{class:"ml-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),2)])]))}}),Od={key:0,class:"flex"},hs=t.defineComponent({__name:"DetailList",props:{borderless:{type:Boolean,default:!1},defaultSort:{default:"created_at"},defaultSortDir:{default:"desc"},disableDate:{type:Boolean,default:!1},disableNavigation:{type:Boolean,default:!1},perPage:{default:10},url:{}},setup(n,{expose:r}){const e=n,o=t.ref({minDate:0,maxDate:0}),a=t.ref([]),s=t.ref({page:1,perPage:e.perPage,totalItems:0,totalPages:0}),l=t.ref(e.defaultSort),c=t.ref(e.defaultSortDir),i=()=>{const m={maxDate:o.value.maxDate||null,minDate:o.value.minDate||null,page:s.value.page,perPage:s.value.perPage,q:"",sort:l.value,sortDir:c.value};mr.get(e.url,{},m).then(y=>{s.value={page:y.data.page,perPage:y.data.perPage,totalItems:y.data.totalItems,totalPages:y.data.totalPages},a.value=y.data.items},()=>{jr.genericError()})},u=t.computed(()=>!!a.value.length),d=t.computed(()=>!e.disableDate),f=t.computed(()=>!e.disableNavigation&&u),g={refresh:i,reset:()=>{s.value.page=1,i()}};return t.watch([c,o],()=>{i()}),r(g),i(),(m,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"mt-4 space-y-2":d.value})},[m.disableDate?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Od,[t.createVNode(Lr,{"date-range":o.value,"sort-dir":c.value,onSortDirChanged:y[0]||(y[0]=w=>c.value=w),onDateRangeChanged:y[1]||(y[1]=w=>o.value=w)},null,8,["date-range","sort-dir"])])),u.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["overflow-hidden",{"shadow sm:rounded-md border":!m.borderless}])},[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(w,C)=>(t.openBlock(),t.createElementBlock("li",{key:C,class:t.normalizeClass({"border-t border-gray-200":C>0})},[t.renderSlot(m.$slots,"default",{item:w})],2))),128))])],2)):t.renderSlot(m.$slots,"empty",{key:2},()=>[y[4]||(y[4]=t.createTextVNode(" No items were found! "))]),f.value?(t.openBlock(),t.createBlock(Hr,{key:3,modelValue:s.value,"onUpdate:modelValue":[y[2]||(y[2]=w=>s.value=w),y[3]||(y[3]=w=>i())]},null,8,["modelValue"])):t.createCommentVNode("",!0)],2))}}),Rd=["href"],gs=t.defineComponent({__name:"DownloadCell",props:{propsData:{},attribute:{}},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:r.propsData[r.attribute]},[t.createVNode(t.unref(Mc),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,Rd))}}),Id={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Ld={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Fd={class:"p-4"},jd={class:"flex items-center"},Hd={class:"w-0 flex-1 flex justify-between"},Ud=["innerHTML"],zd={class:"ml-4 shrink-0 flex"},qd=["onClick"],Ln=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=ft(),o=a=>{switch(a){case"warning":return"border-orange-500";case"error":return"border-red-500";case"info":return"border-blue-500";case"success":return"border-green-500"}};return t.onMounted(()=>{Td(r)}),(a,s)=>(t.openBlock(),t.createBlock(t.unref(yr),null,{default:t.withCtx(()=>[t.createElementVNode("div",Id,[t.createVNode(t.TransitionGroup,{tag:"div",class:"max-w-sm space-y-2 w-full","enter-active-class":"ease-out duration-300","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),([l,c])=>(t.openBlock(),t.createElementBlock("div",{key:c.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(c.type)]])},[t.createElementVNode("div",Ld,[t.createElementVNode("div",Fd,[t.createElementVNode("div",jd,[t.createElementVNode("div",Hd,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:c.message},null,8,Ud)]),t.createElementVNode("div",zd,[t.createElementVNode("button",{class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150",onClick:i=>t.unref(r).remove(l)},s[0]||(s[0]=[t.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,qd)])])])])],2))),128))]),_:1})])]),_:1}))}});function Wd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}function Yd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h7"})])}function Kd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})])}function bs(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])}function Jt(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})])}const Gd={class:"flex"},Jd={class:"flex-shrink-0"},Xd={class:"ml-2.5"},Zd={key:0,role:"list",class:"list-disc space-y-1 pl-5"},Qd={key:1},eu={key:1,class:"mt-4"},tu={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},nu={key:0},ru=["href","role"],ou={key:1},au=["href","role"],su={key:0,class:"ml-auto pl-3"},lu={class:"-mx-1.5 -my-1.5"},ys=t.defineComponent({__name:"InlineAlert",props:{btnLink:{default:""},btnText:{default:""},content:{},dismissable:{type:Boolean,default:!1},secondaryBtnLink:{default:""},secondaryBtnText:{default:""},title:{default:""},kind:{}},emits:["close","click","click:secondary"],setup(n,{emit:r}){const e=n,o=r,a=t.ref(!0),s=()=>{a.value=!1,o("close",!0)},l=t.computed(()=>{const i={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":i.bgColor="bg-red-50",i.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",i.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",i.contentColor="text-red-800",i.iconColor="text-red-400";break;case"info":i.bgColor="bg-blue-50",i.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",i.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",i.contentColor="text-blue-800",i.iconColor="text-blue-400";break;case"success":i.bgColor="bg-emerald-50",i.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",i.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",i.contentColor="text-emerald-800",i.iconColor="text-emerald-400";break;case"warn":i.bgColor="bg-amber-50",i.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",i.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",i.contentColor="text-amber-800",i.iconColor="text-amber-400";break}return i}),c=t.computed(()=>{let i=null;switch(e.kind){case"alert":i=Oc;break;case"info":i=Ac;break;case"success":i=Pa;break;case"warn":i=Pc;break}return i});return(i,u)=>a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["rounded-xy p-4",l.value.bgColor])},[t.createElementVNode("div",Gd,[t.createElementVNode("div",Jd,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.value),{class:t.normalizeClass(["h-5 w-5",l.value.iconColor]),"aria-hidden":"true"},null,8,["class"]))]),t.createElementVNode("div",Xd,[i.title?(t.openBlock(),t.createElementBlock("h3",{key:0,class:t.normalizeClass(["text-sm leading-snug font-semibold mb-1.5",l.value.contentColor])},t.toDisplayString(i.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",l.value.contentColor])},[Array.isArray(i.content)?(t.openBlock(),t.createElementBlock("ul",Zd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.content,(d,f)=>(t.openBlock(),t.createElementBlock("li",{key:f},t.toDisplayString(d),1))),128))])):(t.openBlock(),t.createElementBlock("p",Qd,t.toDisplayString(i.content),1))],2),i.btnText||i.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",eu,[t.createElementVNode("div",tu,[i.btnText?(t.openBlock(),t.createElementBlock("div",nu,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnAction]),href:i.btnLink,role:i.btnLink?"link":"button",onClick:u[0]||(u[0]=d=>i.$emit("click",d))},t.toDisplayString(i.btnText),11,ru)])):t.createCommentVNode("",!0),i.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",ou,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnAction]),href:i.secondaryBtnLink,role:i.secondaryBtnLink?"link":"button",onClick:u[1]||(u[1]=d=>i.$emit("click:secondary",d))},t.toDisplayString(i.secondaryBtnText),11,au)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),i.dismissable?(t.openBlock(),t.createElementBlock("div",su,[t.createElementVNode("div",lu,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex rounded-md p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnClose]),type:"button",onClick:s},[u[2]||(u[2]=t.createElementVNode("span",{class:"sr-only"},"close",-1)),t.createVNode(t.unref(Jt),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),iu={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},cu={class:"block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"},du={class:"px-4 pt-5 pb-4 sm:p-8 sm:pb-6"},uu={class:"mt-3 sm:mt-0 sm:text-left"},fu={class:"mt-2"},pu={key:0,class:"bg-gray-50 flex flex-col gap-3 px-4 py-3 rounded-b-xy shadow-xl sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse sm:rounded-b-xy-lg"},mu=["disabled"],ws=t.defineComponent({__name:"Modal",props:t.mergeModels({destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},wide:{type:Boolean,default:!1},submitText:{default:""},title:{default:""}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close","submit"],["update:modelValue"]),setup(n,{emit:r}){const e=n,o=t.useModel(n,"modelValue"),a=r,s=()=>{a("submit")},l=t.useSlots(),c=t.computed(()=>e.submitText||l.buttons);return t.watch(o,i=>{i||a("close")}),(i,u)=>(t.openBlock(),t.createBlock(t.unref(zt),{as:"template",show:o.value},{default:t.withCtx(()=>[t.createVNode(t.unref(kn),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:o.value,onClose:u[3]||(u[3]=d=>o.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",iu,[t.createVNode(t.unref(Je),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(En),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),u[5]||(u[5]=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"",-1)),t.createVNode(t.unref(Je),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["inline-block align-bottom text-left overflow-y-visible transform transition-all w-full sm:my-8 sm:align-middle",i.wide?"sm:max-w-6xl":"sm:max-w-2xl"])},[t.createElementVNode("div",{class:t.normalizeClass(["bg-white rounded-t-xy sm:rounded-t-xy-lg",!c.value&&"rounded-b-xy sm:rounded-b-xy-lg shadow-xl"])},[t.createElementVNode("div",cu,[t.createElementVNode("button",{type:"button",class:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",onClick:u[0]||(u[0]=d=>o.value=!1)},[u[4]||(u[4]=t.createElementVNode("span",{class:"sr-only"},"Close",-1)),t.createVNode(t.unref(Jt),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",du,[t.createElementVNode("div",uu,[t.createVNode(t.unref(Cr),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.title),1)]),_:1}),t.createElementVNode("div",fu,[t.renderSlot(i.$slots,"default")])])])],2),c.value?(t.openBlock(),t.createElementBlock("div",pu,[i.submitText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("button",{type:"button",class:t.normalizeClass([i.destructive?"xy-btn-red":"xy-btn"]),disabled:i.disabled,onClick:u[1]||(u[1]=d=>s())},t.toDisplayString(i.submitText),11,mu),t.createElementVNode("button",{type:"button",class:"xy-btn-neutral",onClick:u[2]||(u[2]=d=>o.value=!1)}," Cancel ")],64)):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"buttons")])):t.createCommentVNode("",!0)],2)]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),hu={class:"aspect-square overflow-hidden"},gu={class:"flex justify-center relative"},bu={class:"sr-only"},Ur=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,s;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(s=t.unref(r))==null?void 0:s.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",hu,[t.createElementVNode("div",gu,[t.createElementVNode("p",bu,[t.renderSlot(e.$slots,"default",{},()=>[o[0]||(o[0]=t.createTextVNode("loading"))])]),o[1]||(o[1]=t.createStaticVNode('<div class="animate-spin-gear drop-shadow-sm"><svg class="h-full w-full text-xy-green-300" viewBox="0 0 129 129" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><polygon id="path-1" points="0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"></polygon></defs><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-6-Copy-3"><g id="Group-3"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><g id="Clip-2"></g><path id="Fill-1" d="M86.3955173,100.279324 C86.3955173,100.279324 79.4778923,106.213874 64.2360462,106.755809 C48.9954404,106.213874 42.0778154,100.279324 42.0778154,100.279324 C11.8756904,81.4963011 25.2309115,49.088357 25.2309115,49.088357 C36.5680269,24.1350542 59.1839596,22.5554236 63.8105942,22.4983139 L63.8105942,22.5043894 C63.8105942,22.5043894 63.9681231,22.4983139 64.2360462,22.4958837 C64.5052096,22.4983139 64.6627385,22.5043894 64.6627385,22.5043894 L64.6627385,22.4983139 C69.2881327,22.5554236 91.9053058,24.1350542 103.241181,49.088357 C103.241181,49.088357 116.596402,81.4963011 86.3955173,100.279324 L86.3955173,100.279324 Z M128.473085,68.8191581 L128.473085,60.4677727 L117.036738,58.80187 L115.10794,49.3726905 L124.970238,43.4186983 L121.675777,35.7307578 L110.49619,38.6214817 L106.161046,32.1486416 L113.220075,23.080347 L107.361738,17.0716753 L97.9645846,23.7437918 L89.14545,17.842049 L91.8693346,6.72144964 L84.04995,3.59378109 L78.2114596,13.4628269 L69.5907865,11.8127205 L67.908825,0.48676924 L64.6627385,0.48676924 L63.8105942,0.48676924 L60.5645077,0.48676924 L58.8813058,11.8127205 L50.2618731,13.4628269 L44.4233827,3.59378109 L36.6039981,6.72144964 L39.3278827,17.842049 L30.5087481,23.7437918 L21.1103538,17.0716753 L15.2520173,23.080347 L22.3122865,32.1486416 L17.9771423,38.6214817 L6.79755577,35.7307578 L3.50185385,43.4186983 L13.3641519,49.3726905 L11.4365942,58.80187 L0.000248076923,60.4677727 L0.000248076923,68.8191581 L11.4365942,70.4850608 L13.1036712,79.0223566 L3.13718077,84.8050196 L6.29644038,92.5488548 L17.5244019,89.8513318 L23.4832096,98.5854738 L16.7466808,107.893143 L22.8134019,113.695248 L31.9699212,106.70356 L38.5067481,110.99651 L35.5881231,122.068505 L43.35045,125.332265 L49.3625942,115.565287 L58.8813058,117.47421 L60.5645077,128.801377 L63.6927577,128.801377 L64.780575,128.801377 L67.908825,128.801377 L69.5907865,117.47421 L79.1107385,115.565287 L85.1228827,125.332265 L92.8852096,122.068505 L89.9665846,110.99651 L96.5034115,106.70356 L105.659931,113.695248 L111.725412,107.893143 L104.988883,98.5854738 L110.94769,89.8513318 L122.175652,92.5488548 L125.334912,84.8050196 L115.369662,79.0223566 L117.035498,70.4850608 L128.473085,68.8191581 Z" fill="currentColor" mask="url(#mask-2)"></path></g></g></g></svg></div><div class="absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"><svg viewBox="0 0 280 280" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="fill-xy-green" d="m17.57,94.37c-3.36,13.54-5.07,28.73-5.07,45.63,0,32.02,6.04,58,18.1,77.95,3.81,4.98,7.46,9.94,10.95,14.66,21.21,23.24,54.01,34.89,98.45,34.89.71,0,1.39-.03,2.09-.03-3.62-46.93-22.27-88.31-54.36-124.11-19.79-22.07-42.96-38.86-70.16-48.99Z"></path><path class="fill-xy-blue" d="m267.5,140c0-85-42.5-127.5-127.5-127.5-55.06,0-92.27,17.86-111.66,53.53,28.32,8.48,56.67,16.85,84.98,25.37,27.05,8.14,54.01,16.55,81.06,24.67,5.45,1.64,7.5,4.76,6.63,10.27-.69,4.35-1.04,8.75-1.57,13.13-4.95,40.77-8.32,81.74-12.43,122.61,53.64-13.88,80.49-54.56,80.49-122.08Z"></path></svg></div>',2))])])],2)}}}),yu={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-60"},wu={class:"mt-2"},Fn=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:s,showMsg:l}=Wo(),c=()=>{r.value++,r.value>o.value&&(r.value=0),a.value&&(s.value=a.value[r.value]),l.value=!0},i=()=>{window.setTimeout(()=>{l.value=!1},2500)};return(u,d)=>(t.openBlock(),t.createBlock(t.unref(yr),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",yu,[t.createVNode(Ur,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",wu,[t.createVNode(t.Transition,{appear:"","enter-active-class":"ease-out duration-1000","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterEnter:i,onAfterLeave:c},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(s)),513),[[t.vShow,t.unref(l)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),xu={class:"h-screen flex overflow-hidden bg-gray-50"},Cu={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},ku={class:"absolute top-0 right-0 -mr-12 pt-2"},Eu={class:"shrink-0 flex justify-center px-4"},Du=["src"],Nu={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},Su={class:"flex-1 px-2"},_u={class:"space-y-1"},Vu=["href","target"],$u={key:0,class:"mt-auto"},Tu={class:"mt-6 px-2"},Bu={class:"hidden lg:flex lg:shrink-0"},vu={class:"flex flex-col w-64"},Mu={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Pu={class:"flex justify-center shrink-0 px-4"},Au=["src"],Ou={class:"mt-5 grow flex flex-col"},Ru={class:"flex-1 px-2 bg-white"},Iu={class:"space-y-1"},Lu=["href","target"],Fu={key:0,class:"mt-atuo"},ju={class:"mt-6 px-2"},Hu={class:"flex flex-col w-0 flex-1 overflow-hidden"},Uu={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},zu={class:"flex-1 px-4 flex justify-between"},qu={class:"flex-1 flex"},Wu={class:"flex items-center text-base leading-snug sm:text-2xl text-white"},Yu={class:"ml-4 flex items-center lg:ml-6"},Ku=["href"],Gu={class:"flex-1 relative overflow-y-auto focus:outline-none"},Ju={class:"mx-auto"},xs=t.defineComponent({__name:"SidebarLayout",props:{activeUrl:{default:""},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=t.ref(!1),o=a=>r.activeUrl===a;return(a,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",xu,[t.createVNode(t.unref(zt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(kn),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:s[1]||(s[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(Je),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(En),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Je),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",Cu,[t.createVNode(t.unref(Je),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createElementVNode("div",ku,[t.createElementVNode("button",{class:"ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",onClick:s[0]||(s[0]=l=>e.value=!1)},[s[3]||(s[3]=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1)),t.createVNode(t.unref(Jt),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",Eu,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Du)]),t.createElementVNode("div",Nu,[t.createElementVNode("div",Su,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",_u,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50 hover:text-gray-900","group flex items-center px-2 py-2 text-base font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-500 group-hover:text-gray-600","mr-4 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Vu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",$u,[t.createElementVNode("div",Tu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),s[4]||(s[4]=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1))]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",Bu,[t.createElementVNode("div",vu,[t.createElementVNode("div",Mu,[t.createElementVNode("div",Pu,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Au)]),t.createElementVNode("div",Ou,[t.createElementVNode("div",Ru,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-800 hover:bg-gray-100 hover:text-gray-900","group flex items-center px-2 py-2 text-sm font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-400 group-hover:text-gray-600","mr-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Lu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Fu,[t.createElementVNode("div",ju,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Hu,[t.createElementVNode("div",Uu,[t.createElementVNode("button",{class:"px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 lg:hidden",onClick:s[2]||(s[2]=l=>e.value=!0)},[s[5]||(s[5]=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1)),t.createVNode(t.unref(Yd),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",zu,[t.createElementVNode("div",qu,[t.createElementVNode("h1",Wu,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Yu,[t.createVNode(t.unref(kr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Er),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[s[6]||(s[6]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(Bc),{class:"h-8 w-8",fill:"currentColor"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dr),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Nr),{key:l.name},{default:t.withCtx(({active:c})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([c?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,Ku)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Gu,[t.createElementVNode("div",Ju,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(Ln),t.createVNode(Fn)],64))}}),Xt=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.useTemplateRef("trigger"),o=t.useTemplateRef("wrapper"),a=t.computed(()=>{const c=[Wc(5),Kc()];return r.position==="auto"&&c.push(Ha()),c}),s=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:l}=ls(e,o,{middleware:a,placement:s,strategy:"fixed",whileElementsMounted:rs});return(c,i)=>(t.openBlock(),t.createBlock(t.unref(ka),{as:c.as,class:"relative"},{default:t.withCtx(({open:u,close:d})=>[t.createVNode(t.unref(bc),{ref:"trigger"},{default:t.withCtx(()=>[t.renderSlot(c.$slots,"button",{open:u,close:d})]),_:2},1536),t.createElementVNode("div",{ref:"wrapper",class:"z-[5]",style:t.normalizeStyle(t.unref(l))},[t.createVNode(t.unref(yc),null,{default:t.withCtx(()=>[t.renderSlot(c.$slots,"default",{open:u,close:d})]),_:2},1024)],4)]),_:3},8,["as"]))}}),Xu=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},Zu={},Qu={class:"w-full max-w-xs bg-white rounded-xy p-2 border border-gray-100 shadow-md"};function ef(n,r){return t.openBlock(),t.createElementBlock("div",Qu,[t.renderSlot(n.$slots,"default")])}const Cs=Xu(Zu,[["render",ef]]),tf={class:"absolute inset-0 overflow-hidden"},nf={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},rf={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},of={class:"flex items-center justify-between"},af={class:"ml-3 h-7 flex items-center"},sf={class:"mt-1"},lf=["textContent"],ks=t.defineComponent({__name:"Slideover",props:t.mergeModels({header:{},description:{},size:{default:"sm"}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close"],["update:modelValue"]),setup(n,{emit:r}){const e=n,o=t.computed(()=>{switch(e.size){case"lg":return{maxWidth:"max-w-6xl",padding:"py-6 px-4 sm:px-20 sm:py-14"};case"md":return{maxWidth:"max-w-4xl",padding:"py-6 px-4 sm:px-16 sm:py-12"};default:return{maxWidth:"max-w-md",padding:"py-6 px-4 sm:px-6 sm:py-4"}}}),a=t.useModel(n,"modelValue"),s=r;return t.watch(a,l=>{l||s("close")}),(l,c)=>(t.openBlock(),t.createBlock(t.unref(zt),{as:"template",show:a.value},{default:t.withCtx(()=>[t.createVNode(t.unref(kn),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:a.value,onClose:c[1]||(c[1]=i=>a.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",tf,[t.createVNode(t.unref(En),{class:"absolute inset-0"}),t.createElementVNode("div",nf,[t.createVNode(t.unref(Je),{as:"template",enter:"transform transition ease-in-out duration-500 sm:duration-700","enter-from":"translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700","leave-from":"translate-x-0","leave-to":"translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["w-screen",o.value.maxWidth])},[t.createElementVNode("div",rf,[t.createElementVNode("div",{class:t.normalizeClass(["bg-xy-blue-700",o.value.padding])},[t.createElementVNode("div",of,[t.createVNode(t.unref(Cr),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.header),1)]),_:1}),t.createElementVNode("div",af,[t.createElementVNode("button",{class:"bg-xy-blue-600 rounded-md text-gray-50 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:c[0]||(c[0]=i=>a.value=!1)},[c[2]||(c[2]=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1)),t.createVNode(t.unref(Jt),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",sf,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(l.description)},null,8,lf)])],2),t.createElementVNode("div",{class:t.normalizeClass(["relative flex-1",o.value.padding])},[t.renderSlot(l.$slots,"default")],2),t.renderSlot(l.$slots,"footer")])],2)]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),cf=["onMouseover","onMouseleave"],df=["onMouseleave"],uf={class:"max-w-xs"},Es=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=s=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||s()},100)},a=(s,l)=>{r=!0,!l&&s.target&&s.target.click()};return(s,l)=>(t.openBlock(),t.createBlock(Xt,{position:s.position,as:s.as},{button:t.withCtx(({open:c,close:i})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:u=>a(u,c),onMouseleave:u=>o(i)},[t.createVNode(t.unref(Wd)),l[1]||(l[1]=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1))],40,cf)]),default:t.withCtx(({close:c})=>[t.createElementVNode("div",{class:"sm:min-w-max bg-white rounded-xy px-3.5 py-2.5 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium",onMouseover:l[0]||(l[0]=t.withModifiers(i=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(i=>o(c),["prevent"])},[t.createElementVNode("div",uf,[t.renderSlot(s.$slots,"default")])],40,df)]),_:3},8,["position","as"]))}}),ff={class:"min-h-screen bg-gray-50"},pf={class:"mx-auto px-4 sm:px-6 lg:px-8"},mf={class:"flex justify-between h-16"},hf={class:"flex"},gf={class:"shrink-0 flex items-center"},bf=["src"],yf={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},wf=["href","aria-current"],xf={class:"hidden sm:ml-6 sm:flex sm:items-center"},Cf=["href"],kf={class:"-mr-2 flex items-center sm:hidden"},Ef={class:"pt-2 pb-3 space-y-1"},Df=["href","aria-current"],Nf={class:"pt-4 pb-3 border-t border-gray-200"},Sf={class:"flex items-center px-4"},_f={class:"shrink-0"},Vf={class:"ml-3"},$f=["textContent"],Tf=["textContent"],Bf={class:"mt-3 space-y-1"},vf=["href"],Mf={class:"mx-auto sm:px-6 lg:px-8"},Pf={class:"px-4 py-8 sm:px-0"},Ds=t.defineComponent({__name:"StackedLayout",props:{activeUrl:{default:""},currentUser:{},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=o=>r.activeUrl===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",ff,[t.createVNode(t.unref(cc),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:s})=>[t.createElementVNode("div",pf,[t.createElementVNode("div",mf,[t.createElementVNode("div",hf,[t.createElementVNode("div",gf,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,bf)]),t.createElementVNode("div",yf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"border-blue-500 text-gray-900":"border-transparent text-gray-700 hover:text-gray-900 hover:border-blue-500","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,wf))),128))])]),t.createElementVNode("div",xf,[t.createVNode(t.unref(kr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Er),{class:"bg-white flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(bs),{class:"text-gray-500 h-8 w-8 rounded-full"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dr),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Nr),{key:l.name},{default:t.withCtx(({active:c})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([c?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,Cf)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",kf,[t.createVNode(t.unref(dc),{class:"bg-white inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[a[1]||(a[1]=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),s?(t.openBlock(),t.createBlock(t.unref(Jt),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Kd),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(uc),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",Ef,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"bg-blue-50 border-blue-500 text-blue-700":"border-transparent text-gray-700 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-900","block pl-3 pr-4 py-2 border-l-4 text-base font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,Df))),128))]),t.createElementVNode("div",Nf,[t.createElementVNode("div",Sf,[t.createElementVNode("div",_f,[t.createVNode(t.unref(bs),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",Vf,[o.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(o.currentUser.name)},null,8,$f)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,Tf)])]),t.createElementVNode("div",Bf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(l.name),9,vf))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",Mf,[t.createElementVNode("div",Pf,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(Ln),t.createVNode(Fn)],64))}}),Af=n=>n==null,Of={clearSelection(){console.warn("clearSelection() was called on a static table, did you mean to use DynamicTable?")},refresh(){console.warn("refresh() was called on a static table, did you mean to use DynamicTable?")},reset(){console.warn("reset() was called on a static table, did you mean to use DynamicTable?")},selectedData:t.computed(()=>[])},Ns=(n,r,e,o=Of)=>{const a=t.ref(r),s=t.ref(n),l=t.ref(e),c=t.computed(()=>l.value.actions.length>0),i=t.computed(()=>a.value.filter(d=>d.show??!0).map(d=>{let f="";switch((d==null?void 0:d.alignment)||"left"){case"left":f="text-left";break;case"right":f="text-right";break;case"center":f="text-center";break}return{...d,alignment:f}})),u=t.computed(()=>s.value.map((d,f)=>({actions:l.value.actions.map(p=>({...p,disabled:typeof p.disabled=="function"?p.disabled.apply(void 0,[d,f]):p.disabled,onClick:g=>p.onClick?p.onClick(d,f,o,g):()=>{},show:typeof p.show=="function"?p.show.apply(void 0,[d,f]):p.show,url:typeof p.url=="function"?p.url.apply(void 0,[d,f]):p.url??""})),rowData:d,cells:i.value.map(p=>{const g=typeof p.render=="function"?p.render.apply(void 0,[d,f]):d[p.render],m=(p==null?void 0:p.classNames)||"";return{...p,isComponent:t.isVNode(g),classNames:typeof m=="function"?m.apply(void 0,[d,f]):m,val:g}})})));return{columns:i,hasActions:c,isEmptyCellValue:Af,rows:u}},Rf={class:"flex flex-col"},If={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Lf={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Ff={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},jf={class:"min-w-full divide-y divide-gray-200"},Hf={class:"bg-gray-100"},Uf={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},zf={class:"bg-white"},qf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5 w-0"},Wf={key:0},Yf=["colspan"],Ss=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:s}=Ns(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(l,c)=>(t.openBlock(),t.createElementBlock("div",Rf,[t.createElementVNode("div",If,[t.createElementVNode("div",Lf,[t.createElementVNode("div",Ff,[t.createElementVNode("table",jf,[t.createElementVNode("thead",Hf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(i,u)=>(t.openBlock(),t.createElementBlock("th",{key:u,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",i.alignment])},t.toDisplayString(i.title),3))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("th",Uf)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",zf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(i,u)=>(t.openBlock(),t.createElementBlock("tr",{key:u,class:"even:bg-gray-50"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.cells,(d,f)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:f,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",d.alignment])},{default:t.withCtx(()=>[d.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(d.classNames)},t.toDisplayString(t.unref(a)(d.val)?"-":String(d.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",qf,[l.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(Mn),{key:0,actions:i.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(t.unref(Lt),{key:1,actions:i.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(s).length===0?(t.openBlock(),t.createElementBlock("tr",Wf,[t.createElementVNode("td",{colspan:t.unref(e).length+(t.unref(o)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Yf)])):t.createCommentVNode("",!0)])])])])])]))}}),Kf={class:"flex items-center justify-center space-x-8"},Gf={class:"font-medium"},Jf={class:"flex items-center space-x-5"},Xf={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Zf={key:1,class:"relative flex items-center justify-center"},Qf={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},ep={key:0,class:"flex shrink-0"},tp={key:0,class:"inline-flex rounded-md shadow-sm"},np=["textContent"],rp={class:"ml-3 inline-flex rounded-md shadow-sm"},op=["textContent"],_s=t.defineComponent({__name:"Steps",props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:{},total:{}},emits:["next","previous"],setup(n,{emit:r}){const e=r,o=()=>{e("next")},a=()=>{e("previous")};return(s,l)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Kf,[t.createElementVNode("p",Gf,"Step "+t.toDisplayString(s.step)+" of "+t.toDisplayString(s.total),1),t.createElementVNode("ul",Jf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.total,c=>(t.openBlock(),t.createElementBlock("li",{key:c},[s.step>c?(t.openBlock(),t.createElementBlock("span",Xf)):s.step===c?(t.openBlock(),t.createElementBlock("div",Zf,l[0]||(l[0]=[t.createElementVNode("span",{class:"absolute w-5 h-5 p-px flex"},[t.createElementVNode("span",{class:"w-full h-full rounded-full bg-green-100"})],-1),t.createElementVNode("span",{class:"relative block w-2.5 h-2.5 bg-xy-green rounded-full"},null,-1)]))):(t.openBlock(),t.createElementBlock("span",Qf))]))),128))])]),s.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ep,[s.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",tp,[t.createElementVNode("button",{type:"button",class:"xy-btn-secondary",onClick:a,textContent:t.toDisplayString(s.previousText)},null,8,np)])),t.createElementVNode("span",rp,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:o,textContent:t.toDisplayString(s.nextText)},null,8,op)])]))]))}}),ap={key:0,class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},sp={key:0,class:"w-full max-w-lg lg:max-w-xs"},lp={class:"flex items-center gap-x-2"},ip={class:"flex-1"},cp={key:1,class:"w-full max-w-lg lg:max-w-xs"},dp={class:"flex items-center gap-x-2"},up={class:"flex-1"},fp={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},pp={class:"min-w-full divide-y divide-gray-200"},mp={class:"bg-gray-100"},hp={key:0,scope:"col",class:"pl-6 w-4 leading-none"},gp=["checked","indeterminate"],bp=["onClick"],yp={key:0},wp={key:1},xp={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},Cp={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},kp={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},Ep={key:1,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},Dp={key:0},Np={colspan:"100%",class:"px-6 py-2.5 border-t bg-neutral-50"},Sp={class:"flex items-center gap-x-3"},_p={class:"text-sm shrink-0"},Vp={class:"font-medium"},$p={class:"font-medium"},Tp={class:"bg-white"},Bp=["onClick"],vp={key:0,class:"pl-6 w-4 leading-none"},Mp=["disabled","value"],Pp={key:1,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5 w-0"},Ap={key:0},Op=["colspan"],Rp={key:1,class:"mt-4"},Vs=t.defineComponent({__name:"DynamicTable",props:t.mergeModels({tableActions:{default:()=>({type:"dropdown",actions:[]})},tableBulkActions:{default:()=>({actions:[]})},tableColumns:{},tableOptions:{}},{selected:{required:!1,default:[]},selectedModifiers:{}}),emits:t.mergeModels(["click:row"],["update:selected"]),setup(n,{expose:r}){var pt;const e=n,o=()=>{const M={minDate:u.value.minDate||null,maxDate:u.value.maxDate||null,page:d.value.page,perPage:d.value.perPage,sort:c.value,sortDir:i.value,q:f.value};w(),mr.get(e.tableOptions.url,{skipLoader:!1},M).then(A=>{d.value={page:A.data.page,perPage:A.data.perPage,totalItems:A.data.totalItems,totalPages:A.data.totalPages},l.value=A.data.items},()=>{jr.genericError()})},a=()=>{d.value.page=1,o()},s=()=>{if(m.value.maxRange){const M=new Date,A=M.setDate(M.getDate()-m.value.maxRange),de=new Date;u.value={minDate:Math.floor(A/1e3),maxDate:Math.floor(de.getTime()/1e3)}}},l=t.ref([]),c=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),i=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),u=t.ref({minDate:0,maxDate:0}),d=t.ref({page:1,perPage:((pt=e.tableOptions)==null?void 0:pt.perPage)||10,totalItems:0,totalPages:0}),f=t.ref(""),p=M=>{M&&(d.value.page=1,u.value=M,o())},g=M=>{c.value==M?i.value=i.value==="desc"?"asc":"desc":(c.value=M,i.value="desc"),o()},m=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),y=t.computed(()=>!!ve.value.length),w=()=>{C.value=[]},C=t.useModel(n,"selected"),S=t.computed(()=>l.value.filter(M=>C.value.includes(M==null?void 0:M.id))),N=t.computed(()=>C.value.filter(M=>H.value.includes(M))),P=t.computed(()=>e.tableBulkActions.actions.filter(M=>M.show??!0).map(M=>({...M,disabled:C.value.length===0||M.disabled,onClick:A=>M.onClick.apply(void 0,[C.value,S.value,U,A])}))),I=t.computed(()=>P.value.length>0),H=t.computed(()=>l.value.filter(M=>M.id===void 0?!1:!!(e.tableBulkActions.isSelectable===void 0||e.tableBulkActions.isSelectable(M))).map(M=>M.id)),B=t.computed(()=>N.value.length>0&&N.value.length===H.value.length),me=t.computed(()=>N.value.length>0&&N.value.length<H.value.length),L=M=>{if(M.target.checked){C.value=H.value.map(de=>de);return}w()},U={clearSelection:w,selectedData:S,refresh:o,reset:a},{columns:G,hasActions:J,isEmptyCellValue:re,rows:ve}=Ns(l,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),U);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(U),s(),o(),(M,A)=>{var mt;const de=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[M.tableOptions.search||M.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",ap,[M.tableOptions.search?(t.openBlock(),t.createElementBlock("div",sp,[A[7]||(A[7]=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),t.createElementVNode("div",lp,[A[6]||(A[6]=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1)),t.createElementVNode("div",ip,[t.createVNode(de,{id:"table-search",modelValue:f.value,"onUpdate:modelValue":A[0]||(A[0]=q=>f.value=q),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:A[1]||(A[1]=q=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),M.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",cp,[A[9]||(A[9]=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1)),t.createElementVNode("div",dp,[A[8]||(A[8]=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1)),t.createElementVNode("div",up,[t.createVNode(Rn,t.mergeProps({id:"table-date-range",modelValue:u.value,"onUpdate:modelValue":A[2]||(A[2]=q=>u.value=q)},{...m.value},{"onUpdate:modelValue":p}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",fp,[t.createElementVNode("table",pp,[t.createElementVNode("thead",mp,[t.createElementVNode("tr",null,[I.value?(t.openBlock(),t.createElementBlock("th",hp,[t.createElementVNode("input",{class:t.normalizeClass(["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50","border-gray-300 focus:ring-xy-blue-500"]),checked:B.value,indeterminate:me.value,type:"checkbox",onChange:L},null,40,gp)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(G),(q,Ne)=>(t.openBlock(),t.createElementBlock("th",{key:Ne,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",q.alignment])},[t.createElementVNode("div",{class:t.normalizeClass(["inline-flex items-center gap-2",{"cursor-pointer":q.sort}]),onClick:t.withModifiers(Oe=>q.sort?g(q.sort):void 0,["prevent"])},[q.title?(t.openBlock(),t.createElementBlock("span",yp,t.toDisplayString(q.title),1)):t.createCommentVNode("",!0),q.sort?(t.openBlock(),t.createElementBlock("span",wp,[c.value!==q.sort?(t.openBlock(),t.createElementBlock("svg",xp,A[10]||(A[10]=[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"},null,-1)]))):i.value=="desc"?(t.openBlock(),t.createElementBlock("svg",Cp,A[11]||(A[11]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"},null,-1)]))):(t.openBlock(),t.createElementBlock("svg",kp,A[12]||(A[12]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])))])):t.createCommentVNode("",!0)],10,bp)],2))),128)),t.unref(J)?(t.openBlock(),t.createElementBlock("th",Ep)):t.createCommentVNode("",!0)]),I.value&&C.value.length>0?(t.openBlock(),t.createElementBlock("tr",Dp,[t.createElementVNode("td",Np,[t.createElementVNode("div",Sp,[t.createElementVNode("div",_p,[A[13]||(A[13]=t.createTextVNode(" Selected ")),t.createElementVNode("span",Vp,t.toDisplayString(N.value.length),1),A[14]||(A[14]=t.createTextVNode(" of ")),t.createElementVNode("span",$p,t.toDisplayString(H.value.length),1)]),t.createVNode(t.unref(Lt),{actions:P.value},null,8,["actions"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("tbody",Tp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(ve),(q,Ne)=>{var Oe,nt;return t.openBlock(),t.createElementBlock("tr",{key:Ne,class:"even:bg-gray-50",onClick:oe=>M.$emit("click:row",q.rowData)},[I.value?(t.openBlock(),t.createElementBlock("td",vp,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":A[3]||(A[3]=oe=>C.value=oe),class:t.normalizeClass(["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50","border-gray-300 focus:ring-xy-blue-500"]),disabled:!H.value.includes((Oe=q.rowData)==null?void 0:Oe.id),type:"checkbox",value:(nt=q.rowData)==null?void 0:nt.id},null,8,Mp),[[t.vModelCheckbox,C.value]])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(q.cells,(oe,rt)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:rt,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",oe.alignment])},{default:t.withCtx(()=>[oe.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(oe.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(oe.classNames)},t.toDisplayString(t.unref(re)(oe.val)?"-":String(oe.val)),3))]),_:2},1032,["class"]))),128)),t.unref(J)?(t.openBlock(),t.createElementBlock("td",Pp,[M.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(Mn),{key:0,actions:q.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(t.unref(Lt),{key:1,actions:q.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,Bp)}),128)),y.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Ap,[t.createElementVNode("td",{colspan:t.unref(G).length+(t.unref(J)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Op)]))])])]),y.value?(t.openBlock(),t.createElementBlock("div",Rp,[t.createVNode(t.unref(zr),{modelValue:d.value,"onUpdate:modelValue":[A[4]||(A[4]=q=>d.value=q),A[5]||(A[5]=q=>o())],"page-options":(mt=M.tableOptions)==null?void 0:mt.pageOptions},null,8,["modelValue","page-options"])])):t.createCommentVNode("",!0)])}}}),Ip={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:justify-center"},Lp={class:"text-center text-sm text-neutral-700 sm:text-left sm:mr-auto sm:w-1/3"},Fp={class:"font-medium"},jp={class:"font-medium"},Hp={class:"font-medium"},Up={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:flex-1"},zp={class:"flex gap-3 items-center justify-center shrink-0 md:w-1/2"},qp=["disabled"],Wp={class:"max-w-[50px]"},Yp={class:"text-sm"},Kp={class:"font-medium"},Gp=["disabled"],Jp={class:"max-w-[150px] sm:ml-auto"},zr=t.defineComponent({__name:"TablePaginator",props:t.mergeModels({pageOptions:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=t.computed({get:()=>e.value.page,set:d=>{e.value={...e.value,page:d}}}),a=t.computed({get:()=>e.value.perPage,set:d=>{e.value={...e.value,page:1,perPage:d}}}),s=t.computed(()=>r.pageOptions?r.pageOptions:[{label:"5 per page",value:5},{label:"10 per page",value:10},{label:"20 per page",value:20},{label:"50 per page",value:50}]),l=It(d=>{d!==null&&d!==o.value&&(o.value=d)},350),c=It(()=>{o.value<=1||(o.value=o.value-1)},250),i=It(()=>{o.value>=e.value.totalPages||(o.value=o.value+1)},250),u=t.computed(()=>{const{page:d,perPage:f,totalItems:p}=e.value;return{start:p>0?(d-1)*f+1:0,end:Math.min(d*f,p)}});return(d,f)=>(t.openBlock(),t.createElementBlock("div",Ip,[t.createElementVNode("p",Lp,[f[3]||(f[3]=t.createTextVNode(" Showing ")),t.createElementVNode("span",Fp,t.toDisplayString(u.value.start),1),f[4]||(f[4]=t.createTextVNode(" to ")),t.createElementVNode("span",jp,t.toDisplayString(u.value.end),1),f[5]||(f[5]=t.createTextVNode(" of ")),t.createElementVNode("span",Hp,t.toDisplayString(e.value.totalItems),1),f[6]||(f[6]=t.createTextVNode(" results "))]),t.createElementVNode("div",Up,[t.createElementVNode("div",zp,[t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value<=1,type:"button",onClick:f[0]||(f[0]=t.withModifiers(p=>o.value--,["prevent"]))},f[7]||(f[7]=[t.createTextVNode(" ← "),t.createElementVNode("span",{class:"sr-only"},"Previous",-1)]),8,qp),t.createElementVNode("div",Wp,[t.createVNode(t.unref(Xr),{"model-value":o.value,min:1,max:e.value.totalPages,type:"number","onUpdate:modelValue":t.unref(l),onKeydown:[t.withKeys(t.withModifiers(t.unref(c),["prevent"]),["down"]),t.withKeys(t.withModifiers(t.unref(i),["prevent"]),["up"])]},null,8,["model-value","max","onUpdate:modelValue","onKeydown"])]),t.createElementVNode("div",Yp,[f[8]||(f[8]=t.createTextVNode(" of ")),t.createElementVNode("span",Kp,t.toDisplayString(e.value.totalPages),1)]),t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value>=e.value.totalPages,type:"button",onClick:f[1]||(f[1]=t.withModifiers(p=>o.value++,["prevent"]))},f[9]||(f[9]=[t.createElementVNode("span",{class:"sr-only"},"Next",-1),t.createTextVNode(" → ")]),8,Gp)]),t.createElementVNode("div",Jp,[t.createVNode(t.unref(In),{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=p=>a.value=p),options:s.value},null,8,["modelValue","options"])])])]))}}),Xp={class:"hidden sm:block"},Zp=["onClick","textContent"],$s=t.defineComponent({__name:"Tabs",props:t.mergeModels({pillDesign:{type:Boolean,default:!1},tabs:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=(s,l)=>{let c="";return r.pillDesign?(c="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.value===s?c=c+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":c=c+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",c):(c="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.value===s?c=c+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":c=c+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",l&&(c=c+" ml-8"),c)},a=t.computed(()=>!r.pillDesign);return(s,l)=>{const c=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":s.pillDesign}])},[l[1]||(l[1]=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1)),t.createVNode(c,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=i=>e.value=i),name:"tabs",options:s.tabs},null,8,["modelValue","options"])],2),t.createElementVNode("div",Xp,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":a.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[s.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.tabs,(i,u)=>(t.openBlock(),t.createElementBlock("a",{key:u,href:"#",class:t.normalizeClass(o(i.value,u>0)),onClick:t.withModifiers(d=>e.value=i.value,["prevent"]),textContent:t.toDisplayString(i.label)},null,10,Zp))),128))],2)],2)])])}}}),Qp={key:0,class:"sr-only"},em={class:"ml-3 mt-0.5"},Ts=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:t.mergeModels({label:{default:""},help:{default:""}},{modelValue:{type:Boolean,...Z},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue",Z),e=t.useAttrs(),o=t.computed(()=>hr(e,"disabled"));return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Cc),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(kc),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),class:t.normalizeClass([r.value?"bg-xy-blue":"bg-gray-200",o.value?"opacity-75 cursor-not-allowed":"cursor-pointer","relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500"]),disabled:o.value},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Qp,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([r.value?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"])},null,2)]),_:1},8,["modelValue","class","disabled"]),t.createElementVNode("div",em,[a.label?(t.openBlock(),t.createBlock(t.unref(Ec),{key:0},{default:t.withCtx(()=>[t.createVNode(be,{label:a.label,class:t.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer")},null,8,["label","class"])]),_:1})):t.createCommentVNode("",!0),a.help?(t.openBlock(),t.createBlock(t.unref(Dc),{key:1},{default:t.withCtx(()=>[t.createVNode(ce,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),tm={"aria-label":"Progress"},nm={role:"list",class:"flex items-center"},rm={class:"absolute inset-0 flex items-center","aria-hidden":"true"},om=["aria-current"],am={key:1,class:"h-3 w-3 rounded-full bg-xy-blue","aria-hidden":"true"},sm={class:"sr-only"},lm={key:2,class:"sr-only"},Bs=t.defineComponent({__name:"ProgressCircles",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("nav",tm,[t.createElementVNode("ol",nm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,l)=>(t.openBlock(),t.createElementBlock("li",{key:s.name,class:t.normalizeClass([l!==e.value.length-1?"pr-8":"","relative"])},[t.createElementVNode("div",rm,[t.createElementVNode("div",{class:t.normalizeClass(["h-0.5 w-full",s.status==="complete"?"bg-xy-blue":"bg-gray-300"])},null,2)]),t.createElementVNode("div",{class:t.normalizeClass({"relative flex h-5 w-5 items-center justify-center rounded-full":!0,"bg-xy-blue":s.status==="complete","border-2 border-indigo-600 bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"}),"aria-current":s.status==="current"?!0:void 0},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Aa),{key:0,class:"h-3 w-3 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",am)):t.createCommentVNode("",!0),t.createElementVNode("span",sm,t.toDisplayString(s.name),1),s.description?(t.openBlock(),t.createElementBlock("span",lm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)],10,om)],2))),128))])]))}}),im={"aria-label":"Progress"},cm={role:"list",class:"overflow-hidden"},dm=["aria-current"],um={class:"flex h-9 items-center"},fm={key:1,class:"h-2.5 w-2.5 rounded-full bg-xy-blue"},pm={class:"ml-4 flex min-w-0 flex-col"},mm={key:0,class:"text-sm text-gray-600"},vs=t.defineComponent({__name:"ProgressCirclesLabeled",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",im,[t.createElementVNode("ol",cm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:t.normalizeClass([l!==e.value.length-1?"pb-6":"","relative"])},[l!==e.value.length-1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["absolute left-3 top-3 -ml-px mt-0.5 h-full w-0.5",s.status==="complete"?"bg-xy-blue":"bg-gray-300"]),"aria-hidden":"true"},null,2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"group relative flex items-start","aria-current":s.status==="current"?!0:void 0},[t.createElementVNode("span",um,[t.createElementVNode("span",{class:t.normalizeClass({"relative z-10 flex h-6 w-6 items-center justify-center rounded-full":!0,"bg-xy-blue ":s.status==="complete","border-2 border-xy-blue bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"})},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Aa),{key:0,class:"h-4 w-4 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",fm)):t.createCommentVNode("",!0)],2)]),t.createElementVNode("span",pm,[t.createElementVNode("span",{class:t.normalizeClass({"text-sm font-bold":!0,"text-gray-800":s.status==="complete","text-xy-blue":s.status==="current","text-gray-600":s.status==="incomplete","mt-2":!s.description})},t.toDisplayString(s.name),3),s.description?(t.openBlock(),t.createElementBlock("span",mm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)])],8,dm)],2))),128))])]))}}),hm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type"],Ms=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Le),{modelValue:{...Z,set:n=>props.type==="number"?gr(n):n},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:r}){const e=n,o=t.useModel(n,"modelValue",{...Z,set:f=>e.type==="number"?gr(f):f}),a=t.useTemplateRef("input"),{errorState:s,inputID:l,isRequired:c,onInvalid:i,inputValidation:u}=Me(e);r({input:a});const d=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:Go};case"tel":return{pattern:Jo};case"url":return{pattern:Xo};default:return{}}});return(f,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:`${t.unref(l)}-label`,class:"mb-2",for:t.unref(l),label:f.label,required:t.unref(c)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(l),ref:"input","onUpdate:modelValue":p[0]||(p[0]=g=>o.value=g),"aria-labelledby":f.label?`${t.unref(l)}-label`:void 0,"aria-describedby":f.help?`${t.unref(l)}-help`:void 0,"aria-errormessage":t.unref(s)?`${t.unref(l)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(s)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:f.placeholder,type:f.type},{...d.value,...f.$attrs},{onInput:p[1]||(p[1]=(...g)=>t.unref(u)&&t.unref(u)(...g)),onInvalid:p[2]||(p[2]=(...g)=>t.unref(i)&&t.unref(i)(...g))}),null,16,hm),[[t.vModelDynamic,o.value,void 0,{trim:!0}]]),t.createVNode(ce,{id:`${t.unref(l)}-help`,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode($e,{id:`${t.unref(l)}-error`,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),gm={class:"relative flex items-start"},bm={class:"flex items-center h-5"},ym=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],wm={class:"ml-3"},Ps=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeModels(t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Le),{modelValue:{type:[Boolean,null],...Z},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,inputID:a,isDisabled:s,isRequired:l,errorState:c,validate:i,onInvalid:u}=Me(r);return(d,f)=>(t.openBlock(),t.createElementBlock("div",gm,[t.createElementVNode("div",bm,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":f[0]||(f[0]=p=>e.value=p),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,checked:e.value||void 0,class:["h-4 w-4 rounded text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(c)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},d.$attrs,{onChange:f[1]||(f[1]=(...p)=>t.unref(i)&&t.unref(i)(...p)),onInvalid:f[2]||(f[2]=(...p)=>t.unref(u)&&t.unref(u)(...p))}),null,16,ym),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",wm,[t.createVNode(be,{id:t.unref(o).labelledby,for:t.unref(a),label:d.label,class:t.normalizeClass(t.unref(s)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(l)},null,8,["id","for","label","class","required"]),t.createVNode(ce,{id:t.unref(o).describedby,text:d.help},null,8,["id","text"]),t.createVNode($e,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(c)},null,8,["id","text"])])]))}}),xm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],As=t.defineComponent({inheritAttrs:!1,__name:"DateTimeInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Le),{modelValue:{...Z,get:n=>n&&Zo(n),set:n=>n&&new Date(n).toISOString()},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,get:i=>i&&Zo(i),set:i=>i&&new Date(i).toISOString()}),{errorState:o,inputID:a,isRequired:s,onInvalid:l,inputValidation:c}=Me(r);return(i,u)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:`${t.unref(a)}-label`,class:"mb-2",for:t.unref(a),label:i.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":u[0]||(u[0]=d=>e.value=d),"aria-labelledby":i.label?`${t.unref(a)}-label`:void 0,"aria-describedby":i.help?`${t.unref(a)}-help`:void 0,"aria-errormessage":t.unref(o)?`${t.unref(a)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(o)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:i.placeholder,type:"datetime-local"},i.$attrs,{onInput:u[1]||(u[1]=(...d)=>t.unref(c)&&t.unref(c)(...d)),onInvalid:u[2]||(u[2]=(...d)=>t.unref(l)&&t.unref(l)(...d))}),null,16,xm),[[t.vModelText,e.value]]),t.createVNode(ce,{id:`${t.unref(a)}-help`,class:"mt-1",text:i.help},null,8,["id","text"]),t.createVNode($e,{id:`${t.unref(a)}-error`,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),Cm={key:0,class:"text-red-700/80"},Bt=t.defineComponent({__name:"FieldsetLegend",props:{label:{default:""},required:{type:Boolean,default:!1},tag:{default:"legend"}},setup(n){const r=n,e=t.computed(()=>r.required&&/\*$/gm.exec(r.label)!==null?r.label.substring(0,r.label.length-1):r.label);return(o,a)=>o.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.mergeProps({key:0,class:"block text-sm leading-6 font-semibold text-gray-800"},o.$attrs),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.value),1),r.required?(t.openBlock(),t.createElementBlock("span",Cm,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),km=["aria-labelledby","aria-describedby","aria-errormessage"],Em={key:0},Dm={class:"flex"},Nm={class:"flex items-center h-5"},Sm=["id","aria-labelledby","aria-describedby","disabled","value"],_m={class:"ml-3"},Os=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeModels(t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Le),{modelValue:{...Z,get:n=>Array.isArray(n)?n:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,get:g=>Array.isArray(g)?g:[]}),{aria:o,inputID:a,isDisabled:s,errorState:l,validate:c}=Me(r),i=t.computed(()=>r.min||null),u=t.computed(()=>r.max||null),d=t.computed(()=>{var m;const g=((m=e.value)==null?void 0:m.length)||0;return i.value!==null&&g<i.value?`Please select at least ${i.value} of these options.`:u.value!==null&&g>u.value?`Please limit your selection to ${u.value} of these options.`:i.value!==null&&u.value!==null&&(g<i.value||g>u.value)?`Please select between ${i.value} and ${u.value} of these options.`:""}),f=t.useTemplateRef("errorInput"),p=()=>{var g;l.value||(l.value=d.value,(g=f.value)==null||g.setCustomValidity(d.value))};return(g,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-6","aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage},[g.label?(t.openBlock(),t.createElementBlock("div",Em,[t.createVNode(Bt,{id:t.unref(o).labelledby,label:g.label,required:!!i.value},null,8,["id","label","required"]),g.help?(t.openBlock(),t.createBlock(ce,{key:0,id:t.unref(o).describedby,class:"mt-1",tag:"p",text:g.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode($e,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(l)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Dm,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":g.columns!==void 0,"sm:grid-cols-2":g.columns===2,"sm:grid-cols-3":g.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,(y,w)=>(t.openBlock(),t.createElementBlock("div",{key:y.value,class:"flex items-start"},[t.createElementVNode("div",Nm,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(a)}-${w}`,"onUpdate:modelValue":m[0]||(m[0]=C=>e.value=C),"aria-labelledby":`${t.unref(a)}-${w}-label`,"aria-describedby":y.help?`${t.unref(a)}-${w}-help`:void 0,disabled:y.disabled,class:["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox",value:y.value,ref_for:!0},g.$attrs,{onChange:m[1]||(m[1]=(...C)=>t.unref(c)&&t.unref(c)(...C))}),null,16,Sm),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",_m,[t.createVNode(be,{id:`${t.unref(a)}-${w}-label`,for:`${t.unref(a)}-${w}`,label:y.label,class:t.normalizeClass(t.unref(s)||y.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ce,{id:`${t.unref(a)}-${w}-help`,text:y.help},null,8,["id","text"])])]))),128))],2)]),d.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref:"errorInput",required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:p},null,544)):t.createCommentVNode("",!0)],8,km))}});function Rs(n){const{anchorOffset:r=0,focusOffset:e=0}=n.ownerDocument.getSelection()||{},o=Math.min(r,e),a=Math.max(r,e);return[o,a]}function Vm(n,[r,e]){var o,a,s,l;const c=n.ownerDocument,i=c.createRange();i.setStart(n.firstChild||n,Math.min(r,(a=(o=n.textContent)===null||o===void 0?void 0:o.length)!==null&&a!==void 0?a:0)),i.setEnd(n.lastChild||n,Math.min(e,(l=(s=n.textContent)===null||s===void 0?void 0:s.length)!==null&&l!==void 0?l:0));const u=c.getSelection();u&&(u.removeAllRanges(),u.addRange(i))}class $m{constructor(r){this.element=r,this.maxLength=1/0}get value(){return this.element.innerText.replace(/\n\n$/,`
|
|
17
17
|
`)}set value(r){this.element.innerHTML=r.replace(/\n$/,`
|
|
18
18
|
|
|
19
19
|
`)}get selectionStart(){return Rs(this.element)[0]}get selectionEnd(){return Rs(this.element)[1]}setSelectionRange(r,e){Vm(this.element,[r??0,e??0])}select(){this.setSelectionRange(0,this.value.length)}}function Tm(n){const r=new $m(n);return new Proxy(n,{get(e,o){if(o in r)return r[o];const a=e[o];return typeof a=="function"?a.bind(e):a},set(e,o,a,s){return Reflect.set(o in r?r:e,o,a,s)}})}const Bm=n=>n.isContentEditable?Tm(n):n.querySelector("input,textarea")||n,qr={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"};class vm{constructor(){this.now=null,this.past=[],this.future=[]}undo(){const r=this.past.pop();r&&this.now&&(this.future.push(this.now),this.updateElement(r,"historyUndo"))}redo(){const r=this.future.pop();r&&this.now&&(this.past.push(this.now),this.updateElement(r,"historyRedo"))}updateHistory(r){if(!this.now){this.now=r;return}const e=this.now.value!==r.value,o=this.now.selection.some((a,s)=>a!==r.selection[s]);!e&&!o||(e&&(this.past.push(this.now),this.future=[]),this.now=r)}updateElement(r,e){this.now=r,this.updateElementState(r,{inputType:e,data:null})}}function Mm(n,...r){return r.every(({value:e})=>e===n.value)}function Pm(n,...r){return r.every(({value:e,selection:o})=>e===n.value&&o[0]===n.selection[0]&&o[1]===n.selection[1])}function Am({value:n,selection:r},e,o){const[a,s]=r,l=typeof o=="function"?o({value:n,selection:r}):o;return{value:n,selection:l==="replace"?[a,Math.max(a+e.length,s)]:[a,s]}}function jn(n){return typeof n=="string"}function Is(n,r,e,o){let a="";for(let s=r.length;s<n.length;s++){const l=n[s]||"",c=(o==null?void 0:o.value[s])===l;if(!jn(l)||l===e&&!c)return a;a+=l}return a}function Ls(n,r){return Array.isArray(r)?n.length===r.length&&Array.from(n).every((e,o)=>{const a=r[o]||"";return jn(a)?e===a:e.match(a)}):r.test(n)}function Om(n,r,e){let o=null,a=null;const s=Array.from(n.value).reduce((c,i,u)=>{const d=Is(r,c,i,e),f=c+d,p=r[f.length]||"";return o===null&&u>=n.selection[0]&&(o=f.length),a===null&&u>=n.selection[1]&&(a=f.length),jn(p)?f+p:i.match(p)?f+i:f},""),l=Is(r,s,"",e);return{value:Ls(s+l,r)?s+l:s,selection:[o??s.length,a??s.length]}}function Rm({value:n,selection:r},e){const[o,a]=r;let s=o,l=a;const c=Array.from(n).reduce((i,u,d)=>{const f=i+u;return o===d&&(s=i.length),a===d&&(l=i.length),f.match(e)?f:i},"");return{value:c,selection:[Math.min(s,c.length),Math.min(l,c.length)]}}function Hn(n,r,e=null){if(Ls(n.value,r))return n;const{value:o,selection:a}=Array.isArray(r)?Om(n,r,e):Rm(n,r);return{selection:a,value:Array.isArray(r)?o.slice(0,r.length):o}}function Fs(n,r){if(!Array.isArray(r))return n;const[e,o]=n.selection,a=[],s=Array.from(n.value).reduce((l,c,i)=>{const u=r[i]||"";return i===e&&a.push(l.length),i===o&&a.push(l.length),jn(u)&&u===c?l:l+c},"");return a.length<2&&a.push(...new Array(2-a.length).fill(s.length)),{value:s,selection:[a[0],a[1]]}}class Wr{constructor(r,e){this.initialElementState=r,this.maskOptions=e,this.value="",this.selection=[0,0];const{value:o,selection:a}=Hn(this.initialElementState,this.getMaskExpression(this.initialElementState));this.value=o,this.selection=a}addCharacters([r,e],o){const{value:a,maskOptions:s}=this,l=this.getMaskExpression({value:a.slice(0,r)+o+a.slice(e),selection:[r+o.length,r+o.length]}),c={value:a,selection:[r,e]},i=Fs(c,l),[u,d]=Am(i,o,s.overwriteMode).selection,f=i.value.slice(0,u)+o,p=f.length,g=Hn({value:f+i.value.slice(d),selection:[p,p]},l,c);if(a.slice(0,r)===Hn({value:f,selection:[p,p]},l,c).value||Pm(this,g))throw new Error("Invalid mask value");this.value=g.value,this.selection=g.selection}deleteCharacters([r,e]){if(r===e||!e)return;const{value:o}=this,a=this.getMaskExpression({value:o.slice(0,r)+o.slice(e),selection:[r,r]}),s={value:o,selection:[r,e]},l=Fs(s,a),[c,i]=l.selection,u=l.value.slice(0,c)+l.value.slice(i),d=Hn({value:u,selection:[c,c]},a,s);this.value=d.value,this.selection=d.selection}getMaskExpression(r){const{mask:e}=this.maskOptions;return typeof e=="function"?e(r):e}}class Im{constructor(r){this.element=r,this.listeners=[]}listen(r,e,o){const a=e;this.element.addEventListener(r,a,o),this.listeners.push(()=>this.element.removeEventListener(r,a,o))}destroy(){this.listeners.forEach(r=>r())}}const ze={CTRL:1,ALT:2,SHIFT:4,META:8},Zt={Y:89,Z:90};function Qt(n,r,e){return n.ctrlKey===!!(r&ze.CTRL)&&n.altKey===!!(r&ze.ALT)&&n.shiftKey===!!(r&ze.SHIFT)&&n.metaKey===!!(r&ze.META)&&n.keyCode===e}function Lm(n){return Qt(n,ze.CTRL,Zt.Y)||Qt(n,ze.CTRL|ze.SHIFT,Zt.Z)||Qt(n,ze.META|ze.SHIFT,Zt.Z)}function Fm(n){return Qt(n,ze.CTRL,Zt.Z)||Qt(n,ze.META,Zt.Z)}function Yr(n,r){var e;const o=n.value;if(typeof r=="string")n.value=r;else{const[a,s]=r.selection;n.value=r.value,n.matches(":focus")&&((e=n.setSelectionRange)===null||e===void 0||e.call(n,a,s))}n.value!==o&&n.dispatchEvent(new Event("input",{bubbles:!0}))}function jm({value:n,selection:r},e){const[o,a]=r;if(o!==a)return[o,a];const s=e?n.slice(o).indexOf(`
|
package/package.json
CHANGED
|
@@ -87,7 +87,7 @@ export interface TableActionLink<T = TableRowData> {
|
|
|
87
87
|
* @param e Event | undefined
|
|
88
88
|
* @returns void
|
|
89
89
|
*/
|
|
90
|
-
onClick
|
|
90
|
+
onClick?: (rowData: T, rowIndex: number, tableAPI: DynamicTableAPI, e?: Event) => void;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* TableBulkActionItem determines the configuration for a bulk action button on a table.
|
|
@@ -14,7 +14,7 @@ export declare const useTable: (rowData: TableRowsData | Ref<TableRowsData>, col
|
|
|
14
14
|
rows: import("vue").ComputedRef<{
|
|
15
15
|
actions: ({
|
|
16
16
|
disabled: boolean | undefined;
|
|
17
|
-
onClick: (e?: Event) => void;
|
|
17
|
+
onClick: (e?: Event) => void | (() => void);
|
|
18
18
|
show: boolean | undefined;
|
|
19
19
|
url: string;
|
|
20
20
|
label: string;
|
|
@@ -23,7 +23,7 @@ export declare const useTable: (rowData: TableRowsData | Ref<TableRowsData>, col
|
|
|
23
23
|
openInTab?: undefined;
|
|
24
24
|
} | {
|
|
25
25
|
disabled: boolean | undefined;
|
|
26
|
-
onClick: (e?: Event) => void;
|
|
26
|
+
onClick: (e?: Event) => void | (() => void);
|
|
27
27
|
show: boolean | undefined;
|
|
28
28
|
url: string;
|
|
29
29
|
label: string;
|