Files
vat-api.eu/node_modules/@nuxt/devtools/dist/client/_nuxt/server-tasks-lboebplp.js
2026-02-13 22:02:30 +01:00

1 line
34 KiB
JavaScript

import{o as e,t}from"./rolldown-runtime-oipoa1or.js";import{C as n,Ct as r,E as i,Mt as a,P as o,Q as s,Qt as c,W as l,X as u,Y as d,_ as f,c as p,dt as m,en as h,ft as g,g as _,h as v,l as y,lt as b,m as x,t as S,tn as C,v as w,w as T,xt as E}from"./vendor/json-editor-vue-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{$ as D,E as ee,Kt as O,M as k,Pt as A,S as j,_ as M,bt as te,c as ne,dn as N,f as re,ft as P,j as F,k as ie,l as ae,nn as oe,ot as se,s as I,v as ce,y as le}from"#entry";import"./nselect-cmll6q59.js";import"./client-cbmkjf3j.js";import{t as ue}from"./ncode-block-j2hcqwrp.js";import{t as de}from"./ndrawer-lh0r2gbb.js";import{t as fe}from"./composables-g8w9dpc0.js";import"./ncheckbox-f4a8016e.js";import{t as L}from"./nnavbar-fdsyxwr6.js";import"./nicon-title-hrj2h1mn.js";import{t as R}from"./nsection-block-kp1wt3o4.js";import{n as pe}from"./constants-i6giw94a.js";import{t as me}from"./nbadge-ijsj8fjy.js";import{t as he}from"./server-route-inputs-b6nweyxn.js";var ge=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`cronstrue`,[],r):typeof e==`object`?e.cronstrue=r():n.cronstrue=r()})(globalThis,()=>(()=>{var e={949(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.CronParser=void 0;var r=n(515);t.CronParser=function(){function e(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}return e.prototype.parse=function(){var e,t=this.expression??``;if(t===`@reboot`)return e=[`@reboot`,``,``,``,``,``,``],e;if(t.startsWith(`@`)){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 1 *`,"@annually":`0 0 1 1 *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * 0`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`,"@reboot":`@reboot`}[e];if(!t)throw Error(`Unknown special expression.`);return t},e.prototype.extractParts=function(e){if(!this.expression)throw Error(`cron expression is empty`);for(var t=e.trim().split(/[ ]+/),n=0;n<t.length;n++)if(t[n].includes(`,`)){var r=t[n].split(`,`).map(function(e){return e.trim()}).filter(function(e){return e!==``}).map(function(e){return isNaN(Number(e))?e:Number(e)}).filter(function(e){return e!==null&&e!==``});r.length===0&&r.push(`*`),r.sort(function(e,t){return e!==null&&t!==null?e-t:0}),t[n]=r.map(function(e){return e===null?``:e.toString()}).join(`,`)}if(t.length<5)throw Error(`Expression has only ${t.length} part${t.length==1?``:`s`}. At least 5 parts are required.`);if(t.length==5)t.unshift(``),t.push(``);else if(t.length==6)/\d{4}$/.test(t[5])||t[4]==`?`||t[2]==`?`?t.unshift(``):t.push(``);else if(t.length>7)throw Error(`Expression has ${t.length} parts; too many!`);return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`),e[0].indexOf(`0/`)==0&&(e[0]=e[0].replace(`0/`,`*/`)),e[1].indexOf(`0/`)==0&&(e[1]=e[1].replace(`0/`,`*/`)),e[2].indexOf(`0/`)==0&&(e[2]=e[2].replace(`0/`,`*/`)),e[3].indexOf(`1/`)==0&&(e[3]=e[3].replace(`1/`,`*/`)),e[4].indexOf(`1/`)==0&&(e[4]=e[4].replace(`1/`,`*/`)),e[6].indexOf(`1/`)==0&&(e[6]=e[6].replace(`1/`,`*/`)),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var n=e.replace(/\D/,``),r=n;return t.dayOfWeekStartIndexZero?n==`7`&&(r=`0`):r=(parseInt(n)-1).toString(),e.replace(n,r)}),e[5]==`L`&&(e[5]=`6`),e[3]==`?`&&(e[3]=`*`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||e[3].indexOf(`-`)>-1))throw Error(`The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.`);var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)e[5]=e[5].replace(new RegExp(r,`gi`),n[r].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var n=e.replace(/\D/,``),r=n;return t.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),e.replace(n,r)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(new RegExp(a,`gi`),i[a].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var o=0;o<e.length;o++)if(e[o].indexOf(`,`)!=-1&&(e[o]=e[o].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[o]==`*/1`&&(e[o]=`*`),e[o].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[o])){var s=null;switch(o){case 4:s=`12`;break;case 5:s=`6`;break;case 6:s=`9999`;break;default:s=null;break}if(s!==null){var c=e[o].split(`/`);e[o]=`${c[0]}-${s}/${c[1]}`}}},e.prototype.validate=function(e){var t=`0-9,\\-*/`;this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],`0-9,\\-*/LW`),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],`0-9,\\-*/L#`),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var n=e.match(RegExp(`[^${t}]+`,`gi`));if(n&&n.length)throw Error(`Expression contains invalid values: '${n.toString()}'`)},e}()},333(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.ExpressionDescriptor=void 0;var r=n(823),i=n(949);t.ExpressionDescriptor=function(){function e(t,n){if(this.expression=t,this.options=n,this.expressionParts=[,,,,,],!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var r=Object.keys(e.locales)[0];console.warn(`Locale '${this.options.locale}' could not be found; falling back to '${r}'.`),this.options.locale=r}this.i18n=e.locales[this.options.locale],n.use24HourTimeFormat===void 0&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,n){var r=n===void 0?{}:n,i=r.throwExceptionOnParseError,a=i===void 0?!0:i,o=r.verbose,s=o===void 0?!1:o,c=r.dayOfWeekStartIndexZero,l=c===void 0?!0:c,u=r.monthStartIndexZero,d=u===void 0?!1:u,f=r.use24HourTimeFormat,p=r.locale,m=p===void 0?null:p,h=r.logicalAndDayFields,g={throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,locale:m,logicalAndDayFields:h===void 0?!1:h};return g.tzOffset&&console.warn(`'tzOffset' option has been deprecated and is no longer supported.`),new e(t,g).getFullDescription()},e.initialize=function(t,n){n===void 0&&(n=`en`),e.specialCharacters=[`/`,`-`,`,`,`*`],e.defaultLocale=n,t.load(e.locales)},e.prototype.getFullDescription=function(){var e,t=``;try{if(this.expressionParts=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero).parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||`Run once, at startup`;var n=this.getTimeOfDayDescription(),r=this.getDayOfMonthDescription(),a=this.getMonthDescription(),o=this.getDayOfWeekDescription(),s=this.getYearDescription();t+=n+r+o+a+s,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(!this.options.throwExceptionOnParseError)t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw`${e}`}return t},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],n=this.expressionParts[1],i=this.expressionParts[2],a=``;if(!r.StringUtilities.containsAny(n,e.specialCharacters)&&!r.StringUtilities.containsAny(i,e.specialCharacters)&&!r.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(i,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!r.StringUtilities.containsAny(i,e.specialCharacters)){var o=n.split(`-`);a+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(i,o[0],``),this.formatTime(i,o[1],``))}else if(!t&&i.indexOf(`,`)>-1&&i.indexOf(`-`)==-1&&i.indexOf(`/`)==-1&&!r.StringUtilities.containsAny(n,e.specialCharacters)){var s=i.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a+=` `,a+=this.formatTime(s[c],n,``),c<s.length-2&&(a+=`,`),c==s.length-2&&(a+=this.i18n.spaceAnd())}else{var l=this.getSecondsDescription(),u=this.getMinutesDescription(),d=this.getHoursDescription();if(a+=l,a&&u&&(a+=`, `),a+=u,u===d)return a;a&&d&&(a+=`, `),a+=d}return a},e.prototype.getSecondsDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(t){return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},function(t){return e.i18n.minutesX0ThroughX1PastTheHour()},function(r){var i;try{return r==`0`&&n.indexOf(`/`)==-1&&t==``?e.i18n.everyHour():r==`0`?(i=e.i18n).onTheHour?.call(i)||e.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?e.i18n.atX0MinutesPastTheHour(r):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(r)}catch{return e.i18n.atX0MinutesPastTheHour(r)}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,i=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&i.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,this.i18n.everyHour(),function(t){var n=i.find(function(e){return e.value===t&&e.index===a})&&e.expressionParts[1]!==`0`;return a++,n?e.formatTime(t,`59`,``):e.formatTime(t,`0`,``)},function(t){return r.StringUtilities.format(e.i18n.everyX0Hours(t),t)},function(t){return e.i18n.betweenX0AndX1()},function(t){return e.i18n.atX0()})},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek(),n=null;return n=this.expressionParts[5]==`*`?``:this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,r){var i=n;n.indexOf(`#`)>-1?i=n.substring(0,n.indexOf(`#`)):n.indexOf(`L`)>-1&&(i=i.replace(`L`,``));var a=parseInt(i),o=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(r)[a]:t[a];if(n.indexOf(`#`)>-1){var s=null,c=n.substring(n.indexOf(`#`)+1),l=n.substring(0,n.indexOf(`#`));switch(c){case`1`:s=e.i18n.first(l);break;case`2`:s=e.i18n.second(l);break;case`3`:s=e.i18n.third(l);break;case`4`:s=e.i18n.fourth(l);break;case`5`:s=e.i18n.fifth(l);break}o=s+` `+o}return o},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)},function(t){var n=t.substring(0,t.indexOf(`-`));return e.expressionParts[3]==`*`?e.i18n.commaX0ThroughX1(n):e.i18n.commaAndX0ThroughX1(n)},function(t){var n=null;if(t.indexOf(`#`)>-1){var r=t.substring(t.indexOf(`#`)+1),i=t.substring(0,t.indexOf(`#`));n=e.i18n.commaOnThe(r,i).trim()+e.i18n.spaceX0OfTheMonth()}else n=t.indexOf(`L`)>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace(`L`,``)):e.expressionParts[3]==`*`||e.options.logicalAndDayFields?e.i18n.commaOnlyOnX0(t):e.i18n.commaAndOnX0();return n}),n},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],``,function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()})},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,n=this.expressionParts[3];switch(n){case`L`:t=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace(`W`,``)),o=a==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());t=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o);break}else{var s=n.match(/L-(\d{1,2})/);if(s){var c=s[1];t=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(c),c);break}else if(n==`*`&&this.expressionParts[5]!=`*`)return``;else t=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(t){return t==`L`?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),t):t},function(t){return t==`1`?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)},function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},function(t){return e.i18n.commaOnDayX0OfTheMonth(t)});break}}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],``,function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(t){return r.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()})},e.prototype.getSegmentDescription=function(e,t,n,i,a,o){var s=null,c=e.indexOf(`/`)>-1,l=e.indexOf(`-`)>-1,u=e.indexOf(`,`)>-1;if(!e)s=``;else if(e===`*`)s=t;else if(!c&&!l&&!u)s=r.StringUtilities.format(o(e),n(e));else if(u){for(var d=e.split(`,`),f=``,p=0;p<d.length;p++)if(p>0&&d.length>2&&(f+=`,`,p<d.length-1&&(f+=` `)),p>0&&d.length>1&&(p==d.length-1||d.length==2)&&(f+=`${this.i18n.spaceAnd()} `),d[p].indexOf(`/`)>-1||d[p].indexOf(`-`)>-1){var m=d[p].indexOf(`-`)>-1&&d[p].indexOf(`/`)==-1,h=this.getSegmentDescription(d[p],t,n,i,m?this.i18n.commaX0ThroughX1:a,o);m&&(h=h.replace(`, `,``)),f+=h}else if(!c)f+=n(d[p]);else{var g=this.getSegmentDescription(d[p],t,n,i,a,o);g&&g.startsWith(`, `)&&(g=g.substring(2)),f+=g}s=c?f:r.StringUtilities.format(o(e),f)}else if(c){var d=e.split(`/`);if(s=r.StringUtilities.format(i(d[1]),d[1]),d[0].indexOf(`-`)>-1){var _=this.generateRangeSegmentDescription(d[0],a,n);_.indexOf(`, `)!=0&&(s+=`, `),s+=_}else if(d[0].indexOf(`*`)==-1){var v=r.StringUtilities.format(o(d[0]),n(d[0]));v=v.replace(`, `,``),s+=r.StringUtilities.format(this.i18n.commaStartingX0(),v)}}else l&&(s=this.generateRangeSegmentDescription(e,a,n));return s},e.prototype.generateRangeSegmentDescription=function(e,t,n){var i=``,a=e.split(`-`),o=n(a[0],1),s=n(a[1],2),c=t(e);return i+=r.StringUtilities.format(c,o,s),i},e.prototype.formatTime=function(e,t,n){var r=0,i=0,a=parseInt(e)+r,o=parseInt(t)+i;o>=60?(o-=60,a+=1):o<0&&(o+=60,--a),a>=24?a-=24:a<0&&(a=24+a);var s=``,c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),s=c?`${this.getPeriod(a)} `:` ${this.getPeriod(a)}`,a>12&&(a-=12),a===0&&(a=12));var l=``;return n&&(l=`:${(`00`+n).substring(n.length)}`),`${c?s:``}${(`00`+a.toString()).substring(a.toString().length)}:${(`00`+o.toString()).substring(o.toString().length)}${l}${c?``:s}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}`,`g`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}`,`g`),``),e=e.replace(new RegExp(this.i18n.commaEveryDay(),`g`),``),e=e.replace(/\, ?$/,``),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var i=r[n],a=i[0],o=i[1];e=e.replace(new RegExp(a,`g`),o)}return e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||`PM`:this.i18n.am&&this.i18n.am()||`AM`},e.locales={},e}()},747(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.enLocaleLoader=void 0;var r=n(486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},486(e,t){Object.defineProperty(t,`__esModule`,{value:!0}),t.en=void 0,t.en=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`An error occurred when generating the expression description. Check the cron expression syntax.`},e.prototype.everyMinute=function(){return`every minute`},e.prototype.everyHour=function(){return`every hour`},e.prototype.atSpace=function(){return`At `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Every minute between %s and %s`},e.prototype.at=function(){return`At`},e.prototype.spaceAnd=function(){return` and`},e.prototype.everySecond=function(){return`every second`},e.prototype.everyX0Seconds=function(){return`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(){return`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(){return`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(){return`at %s minutes past the hour`},e.prototype.everyX0Hours=function(){return`every %s hours`},e.prototype.betweenX0AndX1=function(){return`between %s and %s`},e.prototype.atX0=function(){return`at %s`},e.prototype.commaEveryDay=function(){return`, every day`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, every %s days of the week`},e.prototype.commaX0ThroughX1=function(){return`, %s through %s`},e.prototype.commaAndX0ThroughX1=function(){return`, %s through %s`},e.prototype.first=function(){return`first`},e.prototype.second=function(){return`second`},e.prototype.third=function(){return`third`},e.prototype.fourth=function(){return`fourth`},e.prototype.fifth=function(){return`fifth`},e.prototype.commaOnThe=function(){return`, on the `},e.prototype.spaceX0OfTheMonth=function(){return` %s of the month`},e.prototype.lastDay=function(){return`the last day`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, on the last %s of the month`},e.prototype.commaOnlyOnX0=function(){return`, only on %s`},e.prototype.commaAndOnX0=function(){return`, and on %s`},e.prototype.commaEveryX0Months=function(){return`, every %s months`},e.prototype.commaOnlyInX0=function(){return`, only in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, on the last day of the month`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, on the last weekday of the month`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return`, %s days before the last day of the month`},e.prototype.firstWeekday=function(){return`first weekday`},e.prototype.weekdayNearestDayX0=function(){return`weekday nearest day %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, on the %s of the month`},e.prototype.commaEveryX0Days=function(){return`, every %s days in a month`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, between day %s and %s of the month`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, on day %s of the month`},e.prototype.commaEveryHour=function(){return`, every hour`},e.prototype.commaEveryX0Years=function(){return`, every %s years`},e.prototype.commaStartingX0=function(){return`, starting %s`},e.prototype.daysOfTheWeek=function(){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},e.prototype.monthsOfTheYear=function(){return[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},515(e,t){Object.defineProperty(t,`__esModule`,{value:!0});function n(e,t){if(!e)throw Error(t)}t.default=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`seconds part must be >= 0 and <= 59`)}},e.minuteRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`minutes part must be >= 0 and <= 59`)}},e.hourRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=23,`hours part must be >= 0 and <= 23`)}},e.dayOfMonthRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=1&&i<=31,`DOM part must be >= 1 and <= 31`)}},e.monthRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=1&&a<=12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)}},e.dayOfWeekRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=0&&a<=6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)}},e}()},823(e,t){Object.defineProperty(t,`__esModule`,{value:!0}),t.StringUtilities=void 0,t.StringUtilities=function(){function e(){}return e.format=function(e){var t=[...arguments].slice(1);return e.replace(/%s/g,function(e){return t.shift()})},e.containsAny=function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},e}()}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,`__esModule`,{value:!0}),e.toString=void 0;var t=n(333),i=n(747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())}))(),1),z=[`title`],B={"flex-none":``,"text-left":``},V={flex:`~ gap-2`,"min-w-0":``,"items-center":``,"text-sm":``},H={class:`truncate`},U={"text-xs":``,op50:``},W={key:0},_e=[`onClick`],G=i({__name:`CronCollection`,props:{collection:{}},setup(e){let t=e,n=j(),i=r(!0),o=x(()=>ge.default.toString(t.collection.cron));return(t,r)=>{let s=F,u=me;return l(),w(`div`,null,[v(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,p2:``,"hover-bg-active":``,title:o.value,onClick:r[0]||=e=>i.value=!i.value},[v(`div`,B,[T(s,{icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":i.value?90:0,transition:``},null,8,[`transform-rotate`])]),v(`span`,V,[T(u,{class:`font-mono n-primary`,textContent:C(e.collection.cron)},null,8,[`textContent`]),v(`span`,H,C(o.value),1),v(`span`,U,`(`+C(e.collection.tasks.length)+`)`,1)])],8,z),r[2]||=v(`div`,{"x-divider":``},null,-1),i.value?(l(),w(`ul`,W,[(l(!0),w(p,null,d(e.collection.tasks,e=>(l(),w(`li`,{key:e},[v(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"pl-9":``,"font-mono":``,"hover-bg-active":``,class:c([{"bg-active":a(n)===e}]),onClick:t=>n.value=e},C(e),11,_e),r[1]||=v(`div`,{"x-divider":``},null,-1)]))),128))])):f(``,!0)])}}}),K=Object.assign(G,{__name:`CronCollection`}),ve={"h-full":``,"w-full":``,flex:`~ col`},ye={flex:`~ col gap-2`,"n-navbar-glass":``,"flex-none":``,p4:``},be={flex:`~ gap2 items-center`},xe={relative:``,"w-full":``},Se={absolute:``,"right-2":``,"top-1.5":``,flex:`~ gap-1`},Ce={flex:`~ gap2 wrap`,"w-full":``,"items-center":``,px4:``,pb2:``,"text-center":``,"text-sm":``,border:`b base`},we={class:`hidden md:block`},Te={flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},Ee={key:0,border:`b base`,relative:``,"n-code-block":``},De={flex:`~ wrap`,"w-full":``},Oe=[`onClick`],ke={border:`b base`,flex:`~ gap2`,"items-center":``,px4:``,py2:``},Ae={key:1,"text-xs":``,op50:``},q=i({__name:`ServerTaskDetails`,props:{task:{}},emits:[`openDefaultInput`],setup(e,{emit:t}){let i=e,u=t,h=r({payload:{}}),{inputDefaults:y}=D(`serverRoutes`),[ee,j]=O(),P=A(),ae=se(),I=E({contentType:`text/plain`,data:``,statusCode:200,error:void 0,fetchTime:0}),de=x(()=>JSON.stringify(I.data,null,2)),fe=x(()=>I.contentType.includes(`application/json`)?`json`:`text`),L=r(!1),R=r(!1),ge=ce(),z=r(),B=[`json`],V=r(B[0]),H=E({query:[{active:!0,key:``,value:``,type:`string`}],body:[{active:!0,key:``,value:``,type:`string`}],headers:[]}),U=x({get:()=>H[z.value],set:e=>{H[z.value]=e}}),W=x(()=>({...X(y.value.query),...X(H.query)})),_e=x(()=>({...X(y.value.headers)})),G=x(()=>Object.keys(h.value?.payload??{}).length?{...h.value}:void 0),K=x(()=>G.value?`POST`:`GET`),q=x(()=>{let e=window?.location.origin;return e.charAt(e.length-1)===`/`&&(e=e.slice(0,-1)),e}),J=x(()=>{let e=new URLSearchParams(W.value).toString();e&&=`?${e}`;let t=`/_nitro/tasks/${i.task.name}${e}`,n=ae.value?.app.baseURL||``;return(n===`./`||n===`.`)&&(n=``),n.endsWith(`/`)&&(n=n.slice(0,-1)),n+t}),Y=x(()=>q.value+J.value);function X(e=[]){let t=Object.fromEntries(e.filter(({active:e,key:t,value:n})=>e&&t&&n!==void 0).map(({key:e,value:t})=>[e,t]));return Object.entries(t).length?t:void 0}async function Z(){R.value=!0,L.value=!0;let e=Date.now();le(`server-tasks:run`,{method:K.value});try{I.data=await $fetch(Y.value,{method:`POST`,headers:_e.value,query:W.value,body:G.value,onResponse({response:e}){I.contentType=(e.headers.get(`content-type`)||``).toString().toLowerCase().trim(),I.statusCode=e.status,I.error=void 0},onResponseError(e){I.error=e.response._data,I.data=e.response._data}})}catch{}L.value=!1,I.fetchTime=Date.now()-e}let Q=x(()=>{let e=[];return e.push({name:`Query`,slug:`query`,length:H.query.length}),e.push({name:`Body`,slug:`body`,length:H.body.length}),e});b(()=>{if(V.value===`json`&&typeof h.value==`string`)try{h.value=JSON.parse(h.value)}catch{}});let $=oe(`nuxt-devtools:server-tasks:inputs`,()=>[],{window:window.parent});N([H,z],()=>{let e=$.value?.find(e=>e.task===i.task.name);if(e){z.value||=e.tab,e.tab!==z.value&&(e.tab=z.value);let{body:t,query:n,headers:r}=e.inputs;Object.assign(H,{body:t,query:n,headers:r})}else{let e={task:i.task.name,tab:`query`,inputs:H};$.value.push(e),z.value||=e.tab}},{immediate:!0,deep:!0,debounce:500});let je=M();return(t,r)=>{let i=ie,b=ne,x=F,E=he,D=re,O=k,A=me,M=ue,N=s(`tooltip`);return l(),w(`div`,ve,[v(`div`,ye,[v(`div`,be,[g((l(),w(`div`,null,[T(i,{class:c([`n-badge-base n-sm`,a(te)(K.value)]),"pointer-events-none":``,"font-mono":``,tabindex:`-1`},{default:m(()=>[n(C(K.value),1)]),_:1},8,[`class`])])),[[N,`Method is ${K.value} as ${K.value===`GET`?`no`:``} json body is sent`]]),v(`div`,xe,[T(b,{"model-value":J.value,readonly:``,"flex-auto":``,"font-mono":``,p:`x5 y2`,n:`sm`},null,8,[`model-value`]),v(`div`,Se,[g(T(i,{title:`Copy URL`,n:`xs blue`,icon:`carbon:copy`,border:!1,onClick:r[0]||=e=>a(je)(Y.value,`server-task-url`)},null,512),[[N,`Copy URL`]]),g(T(i,{title:`Open in Editor`,icon:`carbon-launch`,n:`xs blue`,border:!1,onClick:r[1]||=t=>a(ge)(e.task.handler)},null,512),[[N,`Open in Editor`]])])]),T(i,{"h-full":``,n:`primary solid`,onClick:Z},{default:m(()=>[T(x,{icon:`carbon:send`})]),_:1})])]),v(`div`,Ce,[(l(!0),w(p,null,d(Q.value,e=>g((l(),_(i,{key:e.slug,class:c(z.value===e.slug?`text-primary n-primary`:`border-transparent shadow-none`),onClick:t=>z.value=e.slug},{default:m(()=>[T(x,{icon:a(pe)[e.slug]},null,8,[`icon`]),v(`div`,we,[n(C(e.name)+` `+C(e?.length?`(${e.length})`:``)+` `,1),v(`span`,null,C(a(y)[e.slug]?.length?`(${a(y)[e.slug].length})`:``),1)])]),_:2},1032,[`class`,`onClick`])),[[N,e.name]])),128))]),T(a(ee),null,{default:m(()=>[T(E,{modelValue:U.value,"onUpdate:modelValue":r[4]||=e=>U.value=e,default:{active:!0,type:`string`},"max-h-xs":``,"of-auto":``},{default:m(()=>[a(y)[z.value]?.length?(l(),w(p,{key:0},[v(`div`,Te,[r[6]||=v(`div`,{"w-5":``,"x-divider":``},null,-1),r[7]||=v(`div`,{"flex-none":``},` Default Inputs `,-1),T(i,{icon:`i-carbon-edit`,border:!1,onClick:r[2]||=e=>u(`openDefaultInput`)}),r[8]||=v(`div`,{"x-divider":``},null,-1)]),T(E,{modelValue:a(y)[z.value],"onUpdate:modelValue":r[3]||=e=>a(y)[z.value]=e,disabled:``,p0:``},null,8,[`modelValue`])],64)):f(``,!0)]),_:1},8,[`modelValue`])]),_:1}),U.value?(l(),w(`div`,Ee,[z.value===`body`?(l(),w(p,{key:0},[v(`div`,De,[(l(),w(p,null,d(B,e=>v(`button`,{key:e,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:c({"border-b":e!==V.value}),onClick:t=>V.value=e},[v(`div`,{class:c({op30:e!==V.value}),"font-mono":``},C(e),3)],10,Oe)),64)),r[9]||=v(`div`,{border:`b base`,"flex-auto":``},null,-1)]),V.value===`input`?(l(),_(a(j),{key:0})):V.value===`json`?(l(),_(a(S),o({key:1,modelValue:h.value,"onUpdate:modelValue":r[5]||=e=>h.value=e,class:[a(P)===`dark`?`jse-theme-dark`:`light`,`json-editor-vue of-auto text-sm outline-none`]},t.$attrs,{mode:`text`,"navigation-bar":!1,indentation:2,"tab-size":2}),null,16,[`modelValue`,`class`])):f(``,!0)],64)):(l(),_(a(j),{key:1}))])):f(``,!0),R.value?L.value?(l(),_(O,{key:2,"z-10":``,"flex-auto":``,"backdrop-blur":``},{default:m(()=>[...r[11]||=[n(` Running... `,-1)]]),_:1})):(l(),w(p,{key:3},[v(`div`,ke,[r[13]||=v(`div`,null,`Result`,-1),I.error?(l(),_(A,{key:0,n:`red`},{default:m(()=>[...r[12]||=[n(` Error `,-1)]]),_:1})):f(``,!0),T(A,{n:I.error?`orange`:`green`,textContent:C(I.statusCode)},null,8,[`n`,`textContent`]),I.contentType?(l(),w(`code`,Ae,C(I.contentType),1)):f(``,!0),r[14]||=v(`div`,{"flex-auto":``},null,-1),r[15]||=v(`div`,{op50:``},` Tasks finished in `,-1),T(A,{n:`green`},{default:m(()=>[n(C(I.fetchTime)+` ms `,1)]),_:1})]),T(M,{"flex-auto":``,"overflow-auto":``,"py-2":``,code:de.value,lang:fe.value},null,8,[`code`,`lang`])],64)):(l(),_(D,{key:1},{default:m(()=>[T(i,{n:`primary`,onClick:Z},{default:m(()=>[T(x,{icon:`carbon:send`}),r[10]||=n(` Run task `,-1)]),_:1})]),_:1}))])}}}),J=Object.assign(q,{__name:`ServerTaskDetails`}),Y={"flex-none":``,"text-left":``},X={flex:``,"items-center":``,"text-sm":``,"font-mono":``},Z=i({__name:`ServerTaskListItem`,props:{item:{},index:{default:0}},setup(e){let t=r(!0),i=j();return(r,o)=>{let s=F,m=Q;return l(),w(`div`,null,[v(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"hover-bg-active":``,class:c([{"bg-active":a(i)===e.item.name}]),style:h({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:o[0]||=n=>{t.value=!t.value,i.value=e.item.name}},[v(`div`,Y,[e.item.type===`collection`?(l(),_(s,{key:0,icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":t.value?90:0,transition:``},null,8,[`transform-rotate`])):f(``,!0)]),v(`span`,X,[e.item.type===`collection`?(l(),_(s,{key:0,title:`${e.item.tasks?.length} tasks`,icon:`carbon:folder`,mr1:``},null,8,[`title`])):(l(),_(s,{key:1,icon:`carbon:play`,ml3:``,mr1:``})),n(` `+C(e.item.name),1)])],6),o[1]||=v(`div`,{"x-divider":``},null,-1),t.value?u(r.$slots,`default`,{key:0},()=>[(l(!0),w(p,null,d(e.item.tasks,t=>(l(),_(m,{key:t.name,item:t,index:e.index+1},null,8,[`item`,`index`]))),128))]):f(``,!0)])}}}),Q=Object.assign(Z,{__name:`ServerTaskListItem`}),$={flex:`~ gap1`,"text-sm":``},je={key:0,op50:``},Me={op50:``},Ne=i({__name:`server-tasks`,setup(e){let t=r(!1),n=P(),i=x(()=>Object.keys(n.value?.tasks??{}).map(e=>({name:e,...n.value.tasks[e],type:`task`}))),o=x(()=>Object.entries(n.value?.scheduledTasks??{}).map(([e,t])=>({cron:e,tasks:t}))),c=j(),{view:u,selectedTask:h,inputDefaults:b}=D(`serverTasks`),S=x(()=>{!c.value&&h.value&&(c.value=h.value.name);let e=i.value.find(e=>e.name===c.value);return c.value!==h.value?.name&&e&&(h.value=e),e}),E=r(``),O=x(()=>new I(i.value,{keys:[`key`,`description`],shouldSort:!0})),k=x(()=>E.value?O.value.search(E.value).map(e=>e.item):i.value),A=x(()=>{let e=[],t=(e,t)=>{e.tasks||=[],e.tasks.push(t)},n=(n,r)=>{let i=r?r.tasks?.find(e=>e.name===n):e.find(e=>e.name===n);if(i)return{...i,type:`collection`};let a={name:n,handler:n,description:``,type:`collection`,tasks:[]};return r?t(r,a):e.push(a),a};return k.value.forEach(r=>{let i,a={...r,type:`task`},o=r.name.split(`:`).concat();o.length>0&&o[o.length-1]?.includes(`.`)&&o.pop(),o.forEach(e=>{i=n(e,i)}),i?t(i,a):e.push(a)}),e});function M(){u.value=u.value===`tree`?`list`:`tree`}return(e,n)=>{let r=ie,c=L,h=K,x=ae,D=J,O=ee,j=re,te=he,ne=R,N=de,P=s(`tooltip`);return l(),w(p,null,[T(x,{"storage-key":`tab-server-tasks`},{left:m(()=>[T(x,{horizontal:``,"storage-key":`tab-server-tasks-split`},{left:m(()=>[T(c,{search:E.value,"onUpdate:search":n[1]||=e=>E.value=e,pb2:``},{actions:m(()=>[g(T(r,{"text-lg":``,icon:a(u)===`list`?`i-carbon-list`:`i-carbon-tree-view-alt`,title:`Toggle view`,border:!1,onClick:M},null,8,[`icon`]),[[P,`Toggle View`]]),g(T(r,{"text-lg":``,icon:`i-carbon-cics-sit-overrides`,title:`Default Inputs`,border:!1,onClick:n[0]||=e=>t.value=!t.value},null,512),[[P,`Default Inputs`]])]),default:m(()=>[v(`div`,$,[E.value?(l(),w(`span`,je,C(k.value.length)+` matched · `,1)):f(``,!0),v(`span`,Me,C(i.value?.length)+` tasks in total`,1)])]),_:1},8,[`search`]),(l(!0),w(p,null,d(a(u)===`tree`?A.value:k.value,e=>(l(),_(Q,{key:e.name,item:e},null,8,[`item`]))),128))]),right:m(()=>[n[6]||=v(`div`,{px4:``,py2:``,border:`b base`},` Cron groups `,-1),v(`div`,null,[v(`ul`,null,[(l(!0),w(p,null,d(o.value,e=>(l(),w(`li`,{key:e.cron},[T(h,{collection:e},null,8,[`collection`])]))),128))])])]),_:1})]),right:m(()=>[(l(),_(y,{max:10},[S.value?(l(),_(D,{key:S.value.name,task:S.value,onOpenDefaultInput:n[2]||=e=>t.value=!0},null,8,[`task`])):f(``,!0)],1024)),S.value?f(``,!0):(l(),_(j,{key:0},{default:m(()=>[T(O,{px6:``,py2:``},{default:m(()=>[...n[7]||=[v(`span`,{op75:``},`Select a task to start`,-1)]]),_:1})]),_:1}))]),_:1}),T(N,{modelValue:t.value,"onUpdate:modelValue":n[4]||=e=>t.value=e,"auto-close":``,"max-w-xl":``,"min-w-xl":``,onClose:n[5]||=e=>t.value=!1},{default:m(()=>[v(`div`,null,[n[8]||=v(`div`,{p4:``,border:`b base`},[v(`span`,{"text-lg":``},`Default Inputs`),v(`br`),v(`span`,{"text-white":``,op50:``},`Merged as default for every task in DevTools`)],-1),T(ne,{text:`Query ${a(b).query?.length?`(${a(b).query.length})`:``}`,padding:!1,icon:a(pe).query},{default:m(()=>[T(te,{modelValue:a(b).query,"onUpdate:modelValue":n[3]||=e=>a(b).query=e,py0:``,default:{active:!0,type:`string`}},null,8,[`modelValue`])]),_:1},8,[`text`,`icon`])])]),_:1},8,[`modelValue`])],64)}}});export{Ne as default};