@nuxt/devtools-assets-nightly 4.2.2-29933352.8b02499 → 4.2.2-29935184.f65115a
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/200.html +1 -1
- package/dist/404.html +1 -1
- package/dist/_nuxt/builds/latest.json +1 -1
- package/dist/_nuxt/builds/meta/2af24cb7-7d9a-4ed4-aefe-4c7184426311.json +1 -0
- package/dist/_nuxt/{overview-frs5le91.js → overview-gymgnns0.js} +1 -1
- package/dist/_nuxt/{g7s0ber2.js → png4l3zs.js} +2 -2
- package/dist/_nuxt/server-route-inputs-om5ppgu7.js +2 -0
- package/dist/_nuxt/server-routes-f1whskno.js +8 -0
- package/dist/_nuxt/{server-tasks-ei43s9b1.js → server-tasks-ozo296p6.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/manifest.json +8 -8
- package/package.json +1 -1
- package/dist/_nuxt/builds/meta/9ad5009a-ec69-402f-b531-dd18f134e86d.json +0 -1
- package/dist/_nuxt/server-route-inputs-lilfxk4h.js +0 -2
- package/dist/_nuxt/server-routes-f6sx2tbm.js +0 -8
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
//# allFunctionsCalledOnLoad
|
|
2
|
+
import{Dt as e,K as t,Kt as n,S as r,U as i,Yt as a,a as o,f as s,g as c,h as l,it as u,m as d,p as f,q as p,st as m,w as h,x as g}from"./vendor/json-editor-vue-bhnw2s6o.js";import{t as _}from"./ncheckbox-fen1rybz.js";import{g as v,m as y}from"#entry";import{t as b}from"./nselect-ng3h81mb.js";import{F as x,t as S}from"./nicon-okkaubho.js";var C={p4:``,flex:`~ col gap-4`},w=[`title`],T={key:1,ml2:``,flex:``},E=[`value`],D={key:0,flex:``,"gap-4":``},O=Object.assign(h({__name:`ServerRouteInputs`,props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1},skipped:{}},setup(h,{emit:O}){let k=h,A=O,j=/^\d{4}-\d{2}-\d{2}$/,M=/^\d{2}:\d{2}$/,N=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,P=x(k,`modelValue`,A,{passive:!0}),F=s(()=>[...k.keys,`active`,`key`,`value`,`type`]),I=s(()=>{let e={};for(let t of F.value)e[t]=k.default[t]||``;return e}),L=[`string`,`number`,`boolean`,`file`,`date`,`time`,`datetime-local`];function R(e,t){let n=t.target;if(n.files&&n.files[0]){let t=n.files[0],r=new FileReader;r.readAsDataURL(t),r.onload=()=>{P.value[e].value=r.result}}}return u(()=>P,e=>{e.value.forEach(e=>{if(e.type===`number`&&typeof e.value!=`number`){let t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type===`boolean`&&typeof e.value!=`boolean`?e.value=!0:e.type===`file`&&typeof e.value!=`object`?e.value=``:e.type===`date`&&typeof e.value==`string`&&!j.test(e.value)?e.value=new Date().toISOString().slice(0,10):e.type===`time`&&typeof e.value==`string`&&!M.test(e.value)?e.value=new Date().toISOString().slice(11,16):e.type===`datetime-local`&&typeof e.value==`string`&&!N.test(e.value)?e.value=new Date().toISOString().slice(0,16):e.type===`string`&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:`sync`}),(s,u)=>(i(),c(`div`,C,[(i(!0),c(o,null,t(e(P),(u,g)=>(i(),c(`div`,{key:g,flex:`~ gap-2`,"justify-around":``,class:n(h.skipped?.(u)?`op40`:``),title:h.skipped?.(u)?`Not sent with this request`:void 0},[p(s.$slots,`input`,{item:u}),(i(!0),c(o,null,t(F.value,e=>(i(),c(o,{key:e},[u.type!==null&&e===`active`?(i(),d(_,{key:0,modelValue:u[e],"onUpdate:modelValue":t=>u[e]=t,n:`sm primary`,disabled:h.disabled},null,8,[`modelValue`,`onUpdate:modelValue`,`disabled`])):l(``,!0),u.type!==null&&e===`key`?(i(),d(v,{key:1,modelValue:u[e],"onUpdate:modelValue":t=>u[e]=t,placeholder:e,"flex-1":``,"font-mono":``,n:`sm primary`,disabled:h.disabled,class:n(h.disabled?`op50`:``)},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`,`disabled`,`class`])):e===`value`?(i(),c(o,{key:2},[u.type===`file`?(i(),d(v,{key:0,type:`file`,disabled:h.disabled,class:n(h.disabled?`op75`:``),onChange:e=>R(g,e)},null,8,[`disabled`,`class`,`onChange`])):u.type===`boolean`?(i(),c(`div`,T,[r(_,{modelValue:u.value,"onUpdate:modelValue":e=>u.value=e,placeholder:`Value`,n:`green lg`,disabled:h.disabled},null,8,[`modelValue`,`onUpdate:modelValue`,`disabled`])])):(i(),d(v,{key:2,modelValue:u.value,"onUpdate:modelValue":e=>u.value=e,type:u.type,placeholder:`Value`,"flex-1":``,"font-mono":``,n:`sm primary`,disabled:h.disabled,class:n(h.disabled?`op75`:``)},null,8,[`modelValue`,`onUpdate:modelValue`,`type`,`disabled`,`class`]))],64)):e===`type`?(i(),d(b,{key:3,modelValue:u.type,"onUpdate:modelValue":e=>u.type=e,n:`sm green`,class:n(h.disabled?`op75`:``),disabled:h.disabled},{default:m(()=>[(i(),c(o,null,t(L,e=>f(`option`,{key:e,value:e},a(e),9,E)),64))]),_:1},8,[`modelValue`,`onUpdate:modelValue`,`class`,`disabled`])):l(``,!0)],64))),128)),p(s.$slots,`input-actions`,{},()=>[r(y,{n:`red`,disabled:h.disabled,class:n(h.disabled?`op0!`:``),onClick:t=>e(P).splice(g,1)},{default:m(()=>[r(S,{icon:`carbon:trash-can`})]),_:1},8,[`disabled`,`class`,`onClick`])])],10,w))),128)),h.disabled?l(``,!0):(i(),c(`div`,D,[p(s.$slots,`actions`,{params:e(P)},()=>[r(y,{icon:`carbon-add`,n:`sm primary`,my1:``,"px-3":``,onClick:u[0]||=t=>e(P).push({...I.value})},{default:m(()=>[...u[2]||=[g(` Add `,-1)]]),_:1}),u[4]||=f(`div`,{"flex-auto":``},null,-1),e(P).length?(i(),d(y,{key:0,icon:`carbon-trash-can`,n:`sm red`,my1:``,"px-3":``,onClick:u[1]||=t=>e(P).splice(0,e(P).length)},{default:m(()=>[...u[3]||=[g(` Remove All `,-1)]]),_:1})):l(``,!0)])])),p(s.$slots,`default`)]))}}),{__name:`ServerRouteInputs`});export{O as t};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//# allFunctionsCalledOnLoad
|
|
2
|
+
import"./pages-oqx296ta.js";import{Dt as e,Jt as t,K as n,Kt as r,N as i,S as a,U as o,Y as s,Yt as c,a as l,at as u,ct as d,dt as f,f as p,g as m,gt as h,h as g,ht as _,it as v,lt as y,m as b,o as ee,p as x,q as S,st as C,t as te,vt as w,w as T,x as E,xt as D}from"./vendor/json-editor-vue-bhnw2s6o.js";import{t as O}from"./nsplit-pane-kpwlq5p2.js";import{t as k}from"./nnavbar-ncvicu3x.js";import{g as A,i as ne,m as j,n as re,o as M,p as ie,r as ae,v as oe}from"#entry";import{V as se,i as ce,j as le,r as ue,s as de,t as N,x as fe}from"./nicon-okkaubho.js";import{t as pe}from"./nbadge-iiw1hs8y.js";import{E as me,S as he,a as ge}from"./utils-nybefnvm.js";import{t as _e}from"./virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-nqw16oao.js";import{t as ve}from"./nselect-ng3h81mb.js";import{t as ye}from"./server-route-inputs-om5ppgu7.js";import{t as be}from"./ncode-block-fvcvsi1k.js";import{t as xe}from"./npanel-grids-iboujc96.js";import{t as Se}from"./data-schema-button-b3iqcfhl.js";import{i as Ce}from"./nuxt-gb3q7l3n.js";import{n as we,t as Te}from"./constants-eqqt9i2x.js";import{t as Ee}from"./ncard-ia5sid5c.js";import{t as De}from"./ndrawer-d6y9yvar.js";import{t as P}from"./nsection-block-jg1eef62.js";var F=Object.assign(T({__name:`ServerRouteListItem`,props:{item:{},index:{default:0}},setup(i){let a=w(!0),s=M();return(u,d)=>(o(),m(`div`,null,[x(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"hover-bg-active":``,class:r([{"bg-active":e(s)===i.item.filepath}]),style:t({paddingLeft:`calc(0.5rem + ${i.index*1.5}em)`}),onClick:d[0]||=e=>{a.value=!a.value,s.value=i.item.filepath}},[x(`div`,{class:r({"w-12":!i.item.routes}),"flex-none":``,"text-left":``},[i.item.type===`collection`?(o(),b(N,{key:0,icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":a.value?90:0,transition:``},null,8,[`transform-rotate`])):(o(),b(pe,{key:1,class:r(e(ge)(i.item.method||`*`)),textContent:c((i.item.method||`*`).toUpperCase())},null,8,[`class`,`textContent`]))],2),x(`span`,{class:r({"flex items-center":i.item.routes}),"text-sm":``,"font-mono":``},[i.item.type===`collection`?(o(),b(N,{key:0,title:`${i.item.routes?.length} routes`,icon:`carbon:folder`,mr1:``},null,8,[`title`])):g(``,!0),E(` `+c(i.item.route),1)],2)],6),d[1]||=x(`div`,{"x-divider":``},null,-1),a.value?S(u.$slots,`default`,{},()=>[(o(!0),m(l,null,n(i.item.routes,e=>(o(),b(F,{key:e.filepath,item:e,index:i.index+1},null,8,[`item`,`index`]))),128))],void 0,0):g(``,!0)]))}}),{__name:`ServerRouteListItem`}),I={key:0,relative:``,"n-code-block":``},L={flex:`~ wrap`,"w-full":``},R=[`onClick`],z={flex:`~ gap-2`,px3:``,pb3:``,n:`sm primary`},Oe=Object.assign(T({__name:`CodeSnippets`,props:{codeSnippets:{},eventType:{}},setup(t){let i=t,s=D(i.codeSnippets[0]),d=re(),f=p(()=>s.value?.lang||`text`);return u(()=>{i.codeSnippets.includes(s.value)||(s.value=i.codeSnippets[0])}),(i,u)=>t.codeSnippets.length?(o(),m(`div`,I,[x(`div`,L,[(o(!0),m(l,null,n(t.codeSnippets,(e,t)=>(o(),m(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:r(e===s.value?``:`border-b`),onClick:t=>s.value=e},[x(`div`,{class:r(e===s.value?``:`op30`),"font-mono":``},c(e.name),3)],10,R))),128)),u[1]||=x(`div`,{border:`b base`,"flex-auto":``},null,-1)]),s.value?(o(),m(l,{key:0},[a(be,{code:s.value.code,lang:f.value,lines:!1,"w-full":``,"of-auto":``,p3:``},null,8,[`code`,`lang`]),x(`div`,z,[a(j,{icon:`carbon-copy`,onClick:u[0]||=n=>e(d)(s.value.code,t.eventType||`code-snippet-${s.value.name}`)},{default:C(()=>[...u[2]||=[E(` Copy `,-1)]]),_:1}),s.value?.docs?(o(),b(j,{key:0,to:s.value.docs,target:`_blank`,icon:`carbon-catalog`},{default:C(()=>[...u[3]||=[E(` Docs `,-1)]]),_:1},8,[`to`])):g(``,!0)])],64)):g(``,!0)])):g(``,!0)}}),{__name:`CodeSnippets`});function B(e){if(typeof e!=`object`)return e;var t,n,r=Object.prototype.toString.call(e);if(r===`[object Object]`){if(e.constructor!==Object&&typeof e.constructor==`function`)for(t in n=new e.constructor,e)e.hasOwnProperty(t)&&n[t]!==e[t]&&(n[t]=B(e[t]));else for(t in n={},e)t===`__proto__`?Object.defineProperty(n,t,{value:B(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=B(e[t]);return n}if(r===`[object Array]`){for(t=e.length,n=Array(t);t--;)n[t]=B(e[t]);return n}return r===`[object Set]`?(n=new Set,e.forEach(function(e){n.add(B(e))}),n):r===`[object Map]`?(n=new Map,e.forEach(function(e,t){n.set(B(t),B(e))}),n):r===`[object Date]`?new Date(+e):r===`[object RegExp]`?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):r===`[object DataView]`?new e.constructor(B(e.buffer)):r===`[object ArrayBuffer]`?e.slice(0):r.slice(-6)===`Array]`?new e.constructor(e):e}var V=3456e4;function ke(e,t,n){let r=e.indexOf(`;`,t);return r===-1?n:r}function Ae(e,t,n){let r=e.indexOf(`=`,t);return r<n?r:-1}function H(e,t,n){if(t===n)return``;let r=t,i=n;do{let t=e.charCodeAt(r);if(t!==32&&t!==9)break}while(++r<i);for(;i>r;){let t=e.charCodeAt(i-1);if(t!==32&&t!==9)break;i--}return e.slice(r,i)}var U=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function je(e,t){let n=new U,r=e.length;if(r<2)return n;let i=t?.decode||W,a=t?.allowMultiple||!1,o=0;do{let s=Ae(e,o,r);if(s===-1)break;let c=ke(e,o,r);if(s>c){o=e.lastIndexOf(`;`,s-1)+1;continue}let l=H(e,o,s);if(t?.filter&&!t.filter(l)){o=c+1;continue}let u=i(H(e,s+1,c));if(a){let e=n[l];e===void 0?n[l]=u:Array.isArray(e)?e.push(u):n[l]=[e,u]}else n[l]===void 0&&(n[l]=u);o=c+1}while(o<r);return n}function W(e){if(!e.includes(`%`))return e;try{return decodeURIComponent(e)}catch{return e}}var Me=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Ne=/^[\u0021-\u003A\u003C-\u007E]*$/,Pe=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,G=/^[\u0020-\u003A\u003C-\u007E]*$/,Fe=Object.prototype.toString;function Ie(e,t,n){let r=typeof e==`object`&&!!e,i=r?t:n,a=i?.stringify||JSON.stringify,o=r?e:{...n,name:e,value:t==null?``:typeof t==`string`?t:a(t)},s=i?.encode||encodeURIComponent;if(!Me.test(o.name))throw TypeError(`argument name is invalid: ${o.name}`);let c=o.value?s(o.value):``;if(!Ne.test(c))throw TypeError(`argument val is invalid: ${o.value}`);if(!o.secure){if(o.partitioned)throw TypeError(`Partitioned cookies must have the Secure attribute`);if(o.sameSite&&String(o.sameSite).toLowerCase()===`none`)throw TypeError(`SameSite=None cookies must have the Secure attribute`);if(o.name.length>9&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95){let e=o.name.toLowerCase();if(e.startsWith(`__secure-`)||e.startsWith(`__host-`))throw TypeError(`${o.name} cookies must have the Secure attribute`)}}if(o.name.length>7&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95&&o.name.toLowerCase().startsWith(`__host-`)){if(o.path!==`/`)throw TypeError(`__Host- cookies must have Path=/`);if(o.domain)throw TypeError(`__Host- cookies must not have a Domain attribute`)}let l=o.name+`=`+c;if(o.maxAge!==void 0){if(!Number.isInteger(o.maxAge))throw TypeError(`option maxAge is invalid: ${o.maxAge}`);l+=`; Max-Age=`+Math.max(0,Math.min(o.maxAge,V))}if(o.domain){if(!Pe.test(o.domain))throw TypeError(`option domain is invalid: ${o.domain}`);l+=`; Domain=`+o.domain}if(o.path){if(!G.test(o.path))throw TypeError(`option path is invalid: ${o.path}`);l+=`; Path=`+o.path}if(o.expires){if(!Le(o.expires)||!Number.isFinite(o.expires.valueOf()))throw TypeError(`option expires is invalid: ${o.expires}`);l+=`; Expires=`+o.expires.toUTCString()}if(o.httpOnly&&(l+=`; HttpOnly`),o.secure&&(l+=`; Secure`),o.partitioned&&(l+=`; Partitioned`),o.priority)switch(typeof o.priority==`string`?o.priority.toLowerCase():void 0){case`low`:l+=`; Priority=Low`;break;case`medium`:l+=`; Priority=Medium`;break;case`high`:l+=`; Priority=High`;break;default:throw TypeError(`option priority is invalid: ${o.priority}`)}if(o.sameSite)switch(typeof o.sameSite==`string`?o.sameSite.toLowerCase():o.sameSite){case!0:case`strict`:l+=`; SameSite=Strict`;break;case`lax`:l+=`; SameSite=Lax`;break;case`none`:l+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid: ${o.sameSite}`)}return l}function Le(e){return Fe.call(e)===`[object Date]`}function K(e){return typeof e==`string`?`'${e}'`:new Y().serialize(e)}var Re=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,q=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Re.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function J(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&q[n]?q[n]:n+128,s=a<128&&q[a]?q[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Y=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?J(e,t):n===`number`&&r===`number`?e-t:J(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(J),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})();function ze(e,t){return e===t||K(e)===K(t)}function Be(e){if(e!==`undefined`)try{let t=JSON.parse(e);return typeof t==`number`&&String(t)!==e?e:t}catch{return e}}function X(e){return typeof e==`function`?e():e}var Z={path:`/`,watch:!0,decode:e=>e&&Be(decodeURIComponent(e)),encode:e=>{if(typeof e!=`string`||e===`undefined`)return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!=`string`)return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},Ve=globalThis.cookieStore;function He(e,t){let n={...Z,...t};n.filter??=t=>t===e;let r=Ue(),i=n.filter(e)?r[e]:void 0,a={[e]:i===void 0?void 0:n.decode(i)},o;if(n.maxAge!==void 0)o=n.maxAge*1e3;else if(n.expires){let e=X(n.expires);e&&(o=e.getTime()-Date.now())}let s=()=>{if(n.maxAge!==void 0)return n.maxAge*1e3;if(!n.expires)return;let e=X(n.expires);return e?e.getTime()-Date.now():void 0},c=o!==void 0&&o<=0,l=a[e]===void 0||a[e]===null,u=!n.readonly&&(c||l)&&!(i===void 0&&l&&n.default===void 0),d=B(c?void 0:a[e]??n.default?.()),p=typeof n.expires==`function`||o&&!c?$e(d,o,s,n.watch&&n.watch!==`shallow`):w(d);{let t=!1,r=null;try{!Ve&&typeof BroadcastChannel<`u`&&(r=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}let i=(t=!1)=>{(t||!n.readonly&&!ze(p.value,a[e]))&&(Ze(e,p.value===null||p.value===void 0?void 0:n.encode(p.value),n),a[e]=B(p.value),r?.postMessage({value:n.encode(p.value)}))},o,s=r=>{r.refresh&&$();let i=r.refresh?n.filter(e)?Ue()[e]:void 0:r.value,o=i===void 0&&r.refresh?void 0:n.decode(i);p.value=o,a[e]=B(o),t=!0},c=!!f();if(c){let e=Ce(),t=e&&(e._cookieWriters||=new Set),n=()=>i();t?.add(n),_(()=>{t?.delete(n),o?.pause(),i(),r?.close()})}if(Ve){let t=t=>{let n=t.changed.find(t=>t.name===e),r=t.deleted.find(t=>t.name===e);n&&s({value:n.value}),r&&s({value:null})};Ve.addEventListener(`change`,t),c&&_(()=>Ve.removeEventListener(`change`,t))}else r&&(r.onmessage=({data:e})=>s(e));n.watch&&!n.readonly&&(o=v(p,()=>{let e=n.refresh&&!t;t=!1,i(e)},{deep:n.watch!==`shallow`})),u&&i(u)}return p}var Q;function $(){Q=void 0}function Ue(){return Q||(Q=je(document.cookie,{decode:Je}),queueMicrotask($)),Q||{}}function We(e){return e.domain||e.httpOnly||e.secure&&location.protocol!==`https:`||e.sameSite===`none`&&!e.secure?!1:e.path===void 0||Ge(e.path)}function Ge(e){let{pathname:t}=location;return t===e?!0:t.startsWith(e)?e.endsWith(`/`)||t[e.length]===`/`:!1}function Ke(e){if(e.maxAge!==void 0)return e.maxAge<=0;let t=X(e.expires);return t!==void 0&&t.getTime()<=Date.now()}function qe(e,t,n){if(Q){if(!We(n))return $();t===void 0||Ke(n)?delete Q[e]:Q[e]=t}}var Je=e=>e;function Ye(e){let{encode:t,decode:n,expires:r,...i}=e;return{...i,expires:X(r),encode:Je}}function Xe(e,t,n={}){let r=Ye(n);return t===void 0?Ie(e,``,{...r,maxAge:-1}):Ie(e,t,r)}function Ze(e,t,n={}){document.cookie=Xe(e,t,n),qe(e,t,n)}var Qe=2147483647;function $e(e,t,n,r){let i,a,o=0,s=t,c=r?w(e):{value:e};return f()&&_(()=>{a?.(),clearTimeout(i)}),y((e,t)=>{r&&(a=v(c,t));function l(){let e=s;if(e===void 0)return;let n=e-o,r=n<Qe?n:Qe;i=setTimeout(()=>{if(o+=r,o<e)return l();c.value=void 0,t()},r)}function u(){o=0,s=n(),clearTimeout(i),l()}return{get(){return e(),c.value},set(e){u(),c.value=e,t()}}})}var et={"h-full":``,"w-full":``,flex:`~ col`},tt={flex:`~ col gap-2`,"n-navbar-glass":``,"flex-none":``,p4:``},nt={flex:`~ gap2 items-center`},rt={relative:``,"w-full":``},it={absolute:``,"right-2":``,"top-1.5":``,flex:`~ gap-1`},at={flex:`~ gap2 wrap`,"w-full":``,"items-center":``,px4:``,pb2:``,"text-center":``,"text-sm":``,border:`b base`},ot={class:`hidden md:block`},st={key:0,border:`b base`,"items-center":``,px4:``,py2:``,grid:`~ cols-[max-content_1fr] gap-2`},ct={"text-right":``,"font-mono":``},lt={key:1,border:`b base`,p4:``,flex:`~ col gap-4`,"font-mono":``},ut={flex:`~ gap-4`},dt={flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},ft={key:2},pt={key:3,border:`b base`,relative:``,"n-code-block":``},mt={flex:`~ wrap`,"w-full":``},ht=[`onClick`],gt={border:`b base`,flex:`~ gap2`,"items-center":``,px4:``,py2:``},_t={key:1,"text-xs":``,op50:``},vt={key:0,"flex-auto":``,"overflow-auto":``},yt={border:`~ base`,"h-full":``,"w-full":``,rounded:``},bt=[`data`],xt={key:2,"flex-auto":``,"overflow-auto":``,p4:``},St={border:`~ base`,rounded:``},Ct=[`src`],wt={key:1,controls:``,rounded:``},Tt=[`src`],Et=Object.assign(T({__name:`ServerRouteDetails`,props:{route:{}},emits:[`openDefaultInput`],setup(t,{emit:f}){let _=t,v=f,[y,ee]=fe(),S=ce(),T=he(),D=de(),O=h({contentType:`text/plain`,data:``,statusCode:200,error:void 0,fetchTime:0}),k=p(()=>O.contentType.includes(`application/json`)?`json`:O.contentType.includes(`text/html`)?`html`:O.contentType.includes(`text/css`)?`css`:O.contentType.includes(`text/javascript`)?`javascript`:O.contentType.includes(`image`)||O.contentType.includes(`video`)?`media`:O.contentType.includes(`text/xml`)||O.contentType.includes(`application/xml`)?`xml`:O.contentType.includes(`application/pdf`)?`pdf`:`text`),M=p(()=>{if(k.value===`json`)return JSON.stringify(O.data,null,2);if(k.value===`media`||k.value===`pdf`){let e=new Blob([O.data],{type:O.contentType});return URL.createObjectURL(e)}return O.data}),ie=w(!1),me=w(!1),Ce=ae(),Ee=/((?:\*\*)?:\w+)/g,De=p(()=>_.route.route?.split(Ee)),P=p(()=>De.value?.filter(e=>e.startsWith(`:`)||e.startsWith(`**:`))||[]),F=w(_.route.method||`GET`),I=w({}),L=h({query:[{active:!0,key:``,value:``,type:`string`}],body:[{active:!0,key:``,value:``,type:`string`}],headers:[{active:!0,key:`Content-Type`,value:`application/json`,type:`string`}]}),R=w({}),{inputDefaults:z,sendFrom:B}=ue(`serverRoutes`),V=p(()=>D?.value?.app?.$fetch?B.value:`devtools`),ke=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`],Ae=[`PATCH`,`POST`,`PUT`,`DELETE`],H=p(()=>Ae.includes(F.value.toUpperCase())),U=w(),je=[`input`,`json`],W=w(je[0]),Me=p({get:()=>L[U.value],set:e=>{L[U.value]=e}}),Ne=p(()=>({...Y(z.value.query),...Y(L.query)}));function Pe(e){return!H.value&&e.key?.toLowerCase()===`content-type`&&e.value===`application/json`}function G(e=[]){return e.filter(e=>!Pe(e))}let Fe=p(()=>({...Y(G(z.value.headers)),...Y(G(L.headers))})),Ie=p(()=>U.value===`headers`?Pe:void 0);function Le(e){let t=z.value[e];return(e===`headers`?G(t):t)?.length}let K=p(()=>H.value?W.value===`json`?{...Y(z.value.body),...R.value}:{...Y(z.value.body),...Y(L.body)}:void 0),Re=p(()=>{let e=window?.location.origin;return e.charAt(e.length-1)===`/`&&(e=e.slice(0,-1)),e}),q=p(()=>{let e=new URLSearchParams(Ne.value).toString();e&&=`?${e}`;let t=(De.value?.map(e=>(e.startsWith(`:`)||e.startsWith(`**:`))&&I.value[e]||e).join(``)||``)+e,n=T.value?.app.baseURL||``;return(n===`./`||n===`.`)&&(n=``),n.endsWith(`/`)&&(n=n.slice(0,-1)),n+t}),J=p(()=>Re.value+q.value);function Y(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 ze(){me.value=!0,ie.value=!0;let e=Date.now(),t=V.value===`app`?D.value.app.$fetch:_e;ne(`server-routes:fetch`,{method:F.value,sendFrom:V.value});try{O.data=await t(J.value,{method:F.value.toUpperCase(),headers:Fe.value,query:Ne.value,body:K.value,onResponse({response:e}){O.contentType=(e.headers.get(`content-type`)||``).toString().toLowerCase().trim(),O.statusCode=e.status,O.error=void 0},onResponseError(e){O.error=e.response._data,O.data=e.response._data}})}catch{}ie.value=!1,O.fetchTime=Date.now()-e}let Be=p(()=>{let e=[],t=[],n=Object.entries(Fe.value).filter(([e,t])=>e&&t&&(e!==`Content-Type`||t!==`application/json`)).map(([e,t])=>` '${e}': '${t}'`).join(`,
|
|
3
|
+
`);F.value.toUpperCase()!==`GET`&&t.push(`method: '${F.value.toUpperCase()}'`),n&&t.push(`headers: {\n${n}\n}`),K.value&&t.push(`body: ${JSON.stringify(K.value,null,2)}`);let r=t.length?`, {
|
|
4
|
+
${t.join(`,
|
|
5
|
+
`).split(`
|
|
6
|
+
`).map(e=>` ${e}`).join(`
|
|
7
|
+
`)}
|
|
8
|
+
}`:``;return e.push({name:`useFetch`,lang:`javascript`,docs:Te.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${q.value}'${r})`}),e.push({name:`$fetch`,lang:`javascript`,docs:Te.nuxt.$fetch,code:`await $fetch('${q.value}'${r})`}),e}),X=w(Q()),Z=h({key:``,value:``}),Ve=p(()=>{let e=[];return P.value.length&&e.push({name:`Params`,slug:`params`,length:P.value.length}),e.push({name:`Query`,slug:`query`,length:L.query.length}),H.value&&e.push({name:`Body`,slug:`body`,length:L.body.length}),e.push({name:`Headers`,slug:`headers`,length:G(L.headers).length}),e.push({name:`Cookies`,slug:`cookies`,length:X.value.length}),e.push({name:`Snippets`,slug:`snippet`}),e});function Q(){return document.cookie.split(`; `).map(e=>{let[t,n]=e.split(`=`);return{key:t,value:n}}).filter(e=>e.key)}function $(e,t){if(!e)return;let n=X.value.find(t=>t.key===e),r=He(e);n===void 0?(X.value.push({key:e,value:t}),Z.key=``,Z.value=``):t===void 0&&(X.value=X.value.filter(t=>t.key!==e)),r.value=t}u(()=>{W.value===`json`&&typeof R.value==`string`&&(R.value=JSON.parse(R.value))});let Ue=le(`nuxt-devtools:server-routes:inputs`,()=>[],{window:window.parent});se([L,U],()=>{let e=Ue.value?.find(e=>e.path===_.route.filepath);if(e){U.value||=e.tab,e.tab!==U.value&&(e.tab=U.value);let{body:t,query:n,headers:r,params:i}=e.inputs;Object.assign(L,{body:t,query:n,headers:r}),I.value=i}else{let e={path:_.route.filepath,tab:P.value.length?`params`:`query`,inputs:{...L,...P.value.length?{params:I.value}:{}}};Ue.value.push(e),U.value||=e.tab}},{immediate:!0,deep:!0,debounce:500});function We(){Ue.value=[],L.body=[],L.query=[],L.headers=[],I.value={},U.value=P.value.length?`params`:`query`}let Ge=re();return(u,f)=>{let p=s(`tooltip`);return o(),m(`div`,et,[x(`div`,tt,[x(`div`,nt,[t.route.method?(o(),b(j,{key:0,class:r([`n-badge-base n-sm`,e(ge)(F.value)]),"pointer-events-none":``,"font-mono":``,tabindex:`-1`},{default:C(()=>[E(c(F.value.toUpperCase()),1)]),_:1},8,[`class`])):(o(),b(ve,{key:1,modelValue:F.value,"onUpdate:modelValue":f[0]||=e=>F.value=e,class:r([`n-badge-base n-sm`,e(ge)(F.value)])},{default:C(()=>[(o(),m(l,null,n(ke,t=>x(`option`,{key:t,class:r(e(ge)(t))},c(t.toUpperCase()),3)),64))]),_:1},8,[`modelValue`,`class`])),x(`div`,rt,[a(A,{"model-value":q.value,readonly:``,"flex-auto":``,"font-mono":``,p:`x5 y2`,n:`sm`},null,8,[`model-value`]),x(`div`,it,[d(a(j,{title:`Copy URL`,n:`xs blue`,icon:`carbon:copy`,border:!1,onClick:f[1]||=t=>e(Ge)(J.value,`server-route-url`)},null,512),[[p,`Copy URL`]]),d(a(j,{title:`Open in Editor`,icon:`carbon-launch`,n:`xs blue`,border:!1,onClick:f[2]||=n=>e(Ce)(t.route.filepath)},null,512),[[p,`Open in Editor`]])])]),a(j,{"h-full":``,n:`primary solid`,onClick:ze},{default:C(()=>[a(N,{icon:`carbon:send`})]),_:1})])]),x(`div`,at,[(o(!0),m(l,null,n(Ve.value,t=>d((o(),b(j,{key:t.slug,class:r(U.value===t.slug?`text-primary n-primary`:`border-transparent shadow-none`),onClick:e=>U.value=t.slug},{default:C(()=>[a(N,{icon:e(we)[t.slug]},null,8,[`icon`]),x(`div`,ot,[E(c(t.name)+` `+c(t?.length?`(${t.length})`:``)+` `,1),x(`span`,null,c(Le(t.slug)?`(${Le(t.slug)})`:``),1)])]),_:2},1032,[`class`,`onClick`])),[[p,t.name]])),128)),f[12]||=x(`div`,{"flex-auto":``},null,-1),f[13]||=x(`div`,{"text-xs":``,op50:``},` Send from `,-1),a(ve,{modelValue:V.value,"onUpdate:modelValue":f[3]||=e=>V.value=e,class:`n-xs`,disabled:!e(D)?.app?.$fetch},{default:C(()=>[...f[11]||=[x(`option`,{value:`app`},` App `,-1),x(`option`,{value:`devtools`},` DevTools `,-1)]]),_:1},8,[`modelValue`,`disabled`]),d(a(j,{n:`orange`,class:`p-3`,icon:`i-carbon-clean`,onClick:We},null,512),[[p,`Clear Inputs Saved Cache`]])]),U.value===`params`?(o(),m(`div`,st,[(o(!0),m(l,null,n(P.value,e=>(o(),m(l,{key:e},[x(`div`,ct,c(e),1),a(A,{modelValue:I.value[e],"onUpdate:modelValue":t=>I.value[e]=t,placeholder:e,"flex-1":``},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`])],64))),128))])):g(``,!0),U.value===`cookies`?(o(),m(`div`,lt,[(o(!0),m(l,null,n(X.value,e=>(o(),m(`div`,{key:e.key,flex:`~ gap-4 items-center`},[a(A,{placeholder:`Key...`,"model-value":e.key,disabled:``,"op-70":``},null,8,[`model-value`]),a(A,{placeholder:`Value...`,"model-value":e.value,"flex-1":``,n:`primary`,onInput:t=>$(e.key,t.target?.value)},null,8,[`model-value`,`onInput`]),a(j,{title:`Delete`,n:`red`,onClick:t=>$(e.key,void 0)},{default:C(()=>[a(N,{icon:`i-carbon-trash-can`})]),_:1},8,[`onClick`])]))),128)),x(`div`,ut,[a(A,{modelValue:Z.key,"onUpdate:modelValue":f[4]||=e=>Z.key=e,placeholder:`Key`,n:`primary`,"flex-1":``},null,8,[`modelValue`]),a(A,{modelValue:Z.value,"onUpdate:modelValue":f[5]||=e=>Z.value=e,placeholder:`Value`,n:`primary`,"flex-1":``},null,8,[`modelValue`]),a(j,{title:`Add`,n:`primary`,onClick:f[6]||=e=>$(Z.key,Z.value)},{default:C(()=>[a(N,{icon:`i-carbon-save`})]),_:1})])])):g(``,!0),a(e(y),null,{default:C(()=>[a(ye,{modelValue:Me.value,"onUpdate:modelValue":f[9]||=e=>Me.value=e,default:{active:!0,type:`string`},skipped:Ie.value,"max-h-xs":``,"of-auto":``},{default:C(()=>[e(z)[U.value]?.length?(o(),m(l,{key:0},[x(`div`,dt,[f[14]||=x(`div`,{"w-5":``,"x-divider":``},null,-1),f[15]||=x(`div`,{"flex-none":``},` Default Inputs `,-1),a(j,{icon:`i-carbon-edit`,border:!1,onClick:f[7]||=e=>v(`openDefaultInput`)}),f[16]||=x(`div`,{"x-divider":``},null,-1)]),a(ye,{modelValue:e(z)[U.value],"onUpdate:modelValue":f[8]||=t=>e(z)[U.value]=t,skipped:Ie.value,disabled:``,p0:``},null,8,[`modelValue`,`skipped`])],64)):g(``,!0)]),_:1},8,[`modelValue`,`skipped`])]),_:1}),U.value===`snippet`?(o(),m(`div`,ft,[Be.value.length?(o(),b(Oe,{key:0,"code-snippets":Be.value},null,8,[`code-snippets`])):g(``,!0)])):Me.value?(o(),m(`div`,pt,[U.value===`body`?(o(),m(l,{key:0},[x(`div`,mt,[(o(),m(l,null,n(je,e=>x(`button`,{key:e,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:r({"border-b":e!==W.value}),onClick:t=>W.value=e},[x(`div`,{class:r({op30:e!==W.value}),"font-mono":``},c(e),3)],10,ht)),64)),f[17]||=x(`div`,{border:`b base`,"flex-auto":``},null,-1)]),W.value===`input`?(o(),b(e(ee),{key:0})):W.value===`json`?(o(),b(e(te),i({key:1,modelValue:R.value,"onUpdate:modelValue":f[10]||=e=>R.value=e,class:[e(S)===`dark`?`jse-theme-dark`:`light`,`json-editor-vue of-auto text-sm outline-none`]},u.$attrs,{mode:`text`,"navigation-bar":!1,indentation:2,"tab-size":2}),null,16,[`modelValue`,`class`])):g(``,!0)],64)):(o(),b(e(ee),{key:1}))])):g(``,!0),me.value?ie.value?(o(),b(oe,{key:5,"z-10":``,"flex-auto":``,"backdrop-blur":``},{default:C(()=>[...f[19]||=[E(` Fetching... `,-1)]]),_:1})):(o(),m(l,{key:6},[x(`div`,gt,[f[21]||=x(`div`,null,`Response`,-1),O.error?(o(),b(pe,{key:0,n:`red`},{default:C(()=>[...f[20]||=[E(` Error `,-1)]]),_:1})):g(``,!0),a(pe,{n:O.error?`orange`:`green`,textContent:c(O.statusCode)},null,8,[`n`,`textContent`]),O.contentType?(o(),m(`code`,_t,c(O.contentType),1)):g(``,!0),O.contentType===`application/json`?(o(),b(Se,{key:2,getter:()=>({input:M.value})},null,8,[`getter`])):g(``,!0),f[22]||=x(`div`,{"flex-auto":``},null,-1),f[23]||=x(`div`,{op50:``},` Request finished in `,-1),a(pe,{n:`green`},{default:C(()=>[E(c(O.fetchTime)+` ms `,1)]),_:1})]),k.value===`pdf`?(o(),m(`div`,vt,[x(`div`,yt,[x(`object`,{data:M.value,type:`application/pdf`,"flex-auto":``,width:`100%`,height:`100%`,rounded:``},null,8,bt)])])):k.value===`media`?(o(),m(`div`,xt,[x(`div`,St,[O.contentType.includes(`image`)?(o(),m(`img`,{key:0,rounded:``,src:M.value},null,8,Ct)):(o(),m(`video`,wt,[x(`source`,{src:M.value,type:`video/mp4`},null,8,Tt)]))])])):(o(),b(be,{key:1,"flex-auto":``,"overflow-auto":``,"py-2":``,code:M.value,lang:k.value},null,8,[`code`,`lang`]))],64)):(o(),b(xe,{key:4},{default:C(()=>[a(j,{n:`primary`,onClick:ze},{default:C(()=>[a(N,{icon:`carbon:send`}),f[18]||=E(` Send request `,-1)]),_:1})]),_:1}))])}}}),{__name:`ServerRouteDetails`}),Dt={flex:`~ gap1`,"text-sm":``},Ot={key:0,op50:``},kt={op50:``},At=T({__name:`server-routes`,setup(t){let r=/\W/g,i=w(!1),u=me(),f=M(),{selectedRoute:h,view:_,inputDefaults:v}=ue(`serverRoutes`),y=p(()=>{!f.value&&h.value&&(f.value=h.value.filepath);let e=u.value?.find(e=>e.filepath===f.value);return f.value!==h.value?.filepath&&e&&(h.value=e),e}),S=w(``),te=p(()=>new ie(u.value||[],{keys:[`method`,`route`],shouldSort:!0})),T=p(()=>u.value?S.value?te.value.search(S.value).map(e=>e.item):u.value:[]),E=p(()=>{let e=[],t=(e,t)=>{e.routes=e.routes||[],e.routes.push(t)},n=(n,i)=>{let a=i?i.routes?.find(e=>e.route===n):e.find(e=>e.route===n);if(a)return a;let o={route:n,filepath:n.replace(r,`-`).toLowerCase(),type:`collection`,routes:[]};return i?t(i,o):e.push(o),o};return T.value.forEach(r=>{let i,a,o=r.filepath.split(`/`),s=o.slice(o.indexOf(`server`)+1);if(r.type===`runtime`){s[0]=`runtime`;let e=o.indexOf(`dist`);e!==-1&&(i=o[e-1],i&&s.splice(1,0,i))}s.length>0&&s.at(-1).includes(`.`)&&s.pop(),s.forEach(e=>{a=n(e,a)}),a?t(a,r):e.push(r)}),e});function D(){_.value=_.value===`tree`?`list`:`tree`}function A(e){return e.charAt(0).toUpperCase()+e.slice(1)}return(t,r)=>{let f=s(`tooltip`);return o(),m(l,null,[a(O,{"storage-key":`tab-server-routes`},{left:C(()=>[a(k,{search:S.value,"onUpdate:search":r[1]||=e=>S.value=e,pb2:``},{actions:C(()=>[d(a(j,{"text-lg":``,icon:e(_)===`list`?`i-carbon-list`:`i-carbon-tree-view-alt`,title:`Toggle view`,border:!1,onClick:D},null,8,[`icon`]),[[f,`Toggle View`]]),d(a(j,{"text-lg":``,icon:`i-carbon-cics-sit-overrides`,title:`Default Inputs`,border:!1,onClick:r[0]||=e=>i.value=!i.value},null,512),[[f,`Default Inputs`]])]),default:C(()=>[x(`div`,Dt,[S.value?(o(),m(`span`,Ot,c(T.value.length)+` matched · `,1)):g(``,!0),x(`span`,kt,c(e(u)?.length)+` routes in total`,1)])]),_:1},8,[`search`]),(o(!0),m(l,null,n(e(_)===`tree`?E.value:T.value,e=>(o(),b(F,{key:e.filepath,item:e},null,8,[`item`]))),128))]),right:C(()=>[(o(),b(ee,{max:10},[y.value?(o(),b(Et,{key:y.value.filepath,route:y.value,onOpenDefaultInput:r[2]||=e=>i.value=!0},null,8,[`route`])):g(``,!0)],1024)),y.value?g(``,!0):(o(),b(xe,{key:0},{default:C(()=>[a(Ee,{px6:``,py2:``},{default:C(()=>[...r[5]||=[x(`span`,{op75:``},`Select a route to start`,-1)]]),_:1})]),_:1}))]),_:1}),a(De,{modelValue:i.value,"onUpdate:modelValue":r[3]||=e=>i.value=e,"auto-close":``,"max-w-xl":``,"min-w-xl":``,onClose:r[4]||=e=>i.value=!1},{default:C(()=>[x(`div`,null,[r[6]||=x(`div`,{p4:``,border:`b base`},[x(`span`,{"text-lg":``},`Default Inputs`),x(`br`),x(`span`,{"text-black":``,op50:``,"dark:text-white":``},`Merged as default for every request in DevTools`)],-1),(o(!0),m(l,null,n(Object.keys(e(v)),t=>(o(),b(P,{key:t,text:`${A(t)} ${e(v)[t]?.length?`(${e(v)[t].length})`:``}`,padding:!1,icon:e(we)[t]},{default:C(()=>[a(ye,{modelValue:e(v)[t],"onUpdate:modelValue":n=>e(v)[t]=n,py0:``,default:{active:!0,type:`string`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:2},1032,[`text`,`icon`]))),128))])]),_:1},8,[`modelValue`])],64)}}});export{At as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
//# allFunctionsCalledOnLoad
|
|
2
|
-
import{o as e,t}from"./rolldown-runtime-n50dhdz2.js";import"./pages-oqx296ta.js";import{Dt as n,Jt as r,K as i,Kt as a,N as o,S as s,U as c,Y as l,Yt as u,a as d,at as f,ct as p,f as m,g as h,gt as g,h as _,m as v,o as ee,p as y,q as b,st as x,t as S,vt as C,w,x as T}from"./vendor/json-editor-vue-bhnw2s6o.js";import{t as E}from"./nsplit-pane-kpwlq5p2.js";import{t as D}from"./nnavbar-ncvicu3x.js";import{g as te,i as O,m as k,n as ne,p as re,r as ie,s as A,v as ae}from"#entry";import{V as oe,i as se,j as ce,r as j,t as M,x as le}from"./nicon-okkaubho.js";import{t as N}from"./nbadge-iiw1hs8y.js";import{t as ue}from"./virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-nqw16oao.js";import{t as P}from"./server-route-inputs-lilfxk4h.js";import{t as F}from"./npanel-grids-iboujc96.js";import{t as de}from"./ncode-block-fvcvsi1k.js";import{O as I,S as fe,a as pe}from"./utils-nybefnvm.js";import{n as L}from"./constants-eqqt9i2x.js";import{t as R}from"./ncard-ia5sid5c.js";import{t as z}from"./ndrawer-d6y9yvar.js";import{t as B}from"./nsection-block-jg1eef62.js";var V=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={6949(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(9515),i={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},a={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12},o={4:`12`,5:`6`,6:`9999`};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);this.normalize(e),this.validate(e);for(var r=function(e){return e.indexOf(`,`)>-1&&e.split(`,`).indexOf(`*`)>-1},i=0,a=[[3,5],[5,3]];i<a.length;i++){var o=a[i],s=o[0],c=o[1];r(e[s])&&e[s][0]!==`*`&&e[c][0]!==`*`&&(e[c]=`*`)}for(var l=0;l<e.length;l++)r(e[l])&&(e[l]=`*`);return e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 JAN *`,"@annually":`0 0 1 JAN *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * SUN`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`}[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.indexOf(`*`)===-1&&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){for(var t=this,n=0;n<e.length;n++)e[n]=e[n].toUpperCase();e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`);var r={0:`0/`,1:`0/`,2:`0/`,3:`1/`,6:`1/`};this.monthStartIndexZero||(r[4]=`1/`);for(var s=0,c=Object.keys(r).map(Number);s<c.length;s++){var l=c[s];e[l].indexOf(r[l])==0&&(e[l]=e[l].replace(r[l],`*/`))}if(this.dayOfWeekStartIndexZero&&(e[5]=e[5].split(`,`).map(function(e){return e.replace(/^0-7(?=\/|$)/,`0-6`)}).join(`,`)),e[5]=e[5].replace(/(^\d+)|([^#/\s\d]\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]=e[5].split(`,`).map(function(e){return e==`L`?`6`:e}).join(`,`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||/[-+]/.test(e[3]))&&!/^\d{1,2}W[+-]\d{1,2}$/.test(e[3]))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.`);for(var u in i)e[5]=e[5].replace(new RegExp(u,`gi`),i[u].toString());for(var d in e[5]=e[5].split(`,`).filter(function(e,t,n){return e===``||n.indexOf(e)===t}).join(`,`),e[4]=e[4].replace(/(^\d{1,2})|([^#/\s\d]\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)}),a)e[4]=e[4].replace(new RegExp(d,`gi`),a[d].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var n=0;n<e.length;n++){e[n].indexOf(`,`)!=-1&&(e[n]=e[n].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[n]==`*/1`&&(e[n]=`*`);var f=o[n];if(f&&e[n].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[n])){var p=e[n].split(`/`);e[n]=`${p[0]}-${f}/${p[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].replace(/^(\d{1,2}W)[+-]\d{1,2}$/,`$1`),`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){e.forEach(function(e){return r.default.stepRange(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}()},8333(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var i=n(1823),a=n(6949),o=new(n(9486)).en;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||i,o=r.verbose,s=o!==void 0&&o,c=r.dayOfWeekStartIndexZero,l=c===void 0||c,u=r.monthStartIndexZero,d=u!==void 0&&u,f=r.use24HourTimeFormat,p=r.trimHoursLeadingZero,m=p!==void 0&&p,h=r.locale,g=h===void 0?null:h,_=r.logicalAndDayFields;return new e(t,{throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,trimHoursLeadingZero:m,locale:g,logicalAndDayFields:_!==void 0&&_}).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{var n=new a.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||o.atReboot();var r=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),c=this.getDayOfWeekDescription(),l=this.getYearDescription();t+=r+i+c+s+l,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substring(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],r=this.expressionParts[2],a=``;if(!i.StringUtilities.containsAny(n,e.specialCharacters)&&!i.StringUtilities.containsAny(r,e.specialCharacters)&&!i.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(r,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!i.StringUtilities.containsAny(r,e.specialCharacters)){var o=n.split(`-`);a+=i.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,o[0],``),this.formatTime(r,o[1],``))}else if(!t&&r.indexOf(`,`)>-1&&r.indexOf(`-`)==-1&&r.indexOf(`/`)==-1&&!i.StringUtilities.containsAny(n,e.specialCharacters)){var s=r.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a&&(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],{all:this.i18n.everySecond(),single:function(e){return e},increment:function(t){return i.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},range:function(){return e.i18n.secondsX0ThroughX1PastTheMinute()},format:function(t){var n;return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):(n=e.i18n).atX0SecondsPastTheMinuteGt20?.call(n)||e.i18n.atX0SecondsPastTheMinute(t)},bounds:{min:0,max:59}})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],{all:this.i18n.everyMinute(),single:function(e){return e},increment:function(t){return i.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},range:function(){return e.i18n.minutesX0ThroughX1PastTheHour()},format:function(r){var i,a;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):(a=e.i18n).atX0MinutesPastTheHourGt20?.call(a)||e.i18n.atX0MinutesPastTheHour(r)},bounds:{min:0,max:59}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,r=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&r.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,{all:this.i18n.everyHour(),single:function(t){var n=r.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`,``)},increment:function(t){return i.StringUtilities.format(e.i18n.everyX0Hours(t),t)},range:function(){return e.i18n.betweenX0AndX1()},format:function(){return e.i18n.atX0()},bounds:{min:0,max:23}})},e.prototype.getDayOfWeekDescription=function(t){var n=this;t===void 0&&(t=this.expressionParts[5]);var r=this.i18n.daysOfTheWeek(),a=null;if(t==`*`)a=``;else{var o=t.split(`,`),s=function(t,r){return(n.getDayOfWeekDescription(t.join(`,`))??``)+`${n.i18n.spaceAnd()} `+e.removeLeadingComma(n.getDayOfWeekDescription(r.join(`,`))??``)},c=o.filter(function(e){return/[#L]/.test(e)}),l=o.filter(function(e){return!/[#L]/.test(e)});if(l.length>0&&c.some(function(e){return e.indexOf(`#`)>-1}))return s(l,c);var u=o.filter(function(e){return e.indexOf(`L`)>-1}),d=o.filter(function(e){return e.indexOf(`L`)===-1});if(u.length>0&&d.length>0)return s(d,u);var f=this.expressionParts[3]!=`*`&&!this.options.logicalAndDayFields&&t.indexOf(`,`)==-1,p=t.split(`/`),m=p.length>1&&parseInt(p[1])!=1,h=this.getAndPrefix();a=this.getSegmentDescription(t,{all:this.i18n.commaEveryDay(),single:function(t,i){var a=t;t.indexOf(`#`)>-1?a=t.substring(0,t.indexOf(`#`)):t.indexOf(`L`)>-1&&(a=a.replace(`L`,``));var o=parseInt(a),s=n.i18n.daysOfTheWeekInCase?n.i18n.daysOfTheWeekInCase(i)[o]:r[o];if(t.indexOf(`#`)>-1){var c=parseInt(t.substring(t.indexOf(`#`)+1)),l=t.substring(0,t.indexOf(`#`)),u=e.ordinals[c-1];s=n.i18n[u](l)+` `+s}return s},increment:function(t){if(parseInt(t)==1)return``;var r=n.i18n.commaEveryX0DaysOfTheWeek(t);return i.StringUtilities.format(f&&h?h+e.removeLeadingComma(r):r,t)},range:function(e){var t=e.substring(0,e.indexOf(`-`));return f&&(!m||!h)?n.i18n.commaAndX0ThroughX1(t):n.i18n.commaX0ThroughX1(t)},format:function(e){var t=null;if(e.indexOf(`#`)>-1){var r=e.substring(e.indexOf(`#`)+1),i=e.substring(0,e.indexOf(`#`));t=n.i18n.commaOnThe(r,i).trim()+n.i18n.spaceX0OfTheMonth()}else t=e.indexOf(`L`)>-1?n.i18n.commaOnTheLastX0OfTheMonth(e.split(`,`)[0].replace(`L`,``)):n.expressionParts[3]==`*`||n.options.logicalAndDayFields?n.i18n.commaOnlyOnX0(e):n.i18n.commaAndOnX0();return t}});var g=o[0],_=o.length>1&&t.indexOf(`/`)>-1,v=g.split(`/`)[1];_&&h&&a&&this.expressionParts[3]!=`*`&&!this.options.logicalAndDayFields&&(v===void 0?g.indexOf(`-`)>-1:parseInt(v)!=1)&&(a=h+e.removeLeadingComma(a))}return a},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],{all:``,single:function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},increment:function(t){return parseInt(t)==1?``:i.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},range:function(){var t;return(t=e.i18n).commaMonthX0ThroughMonthX1?.call(t)||e.i18n.commaX0ThroughX1()},format:function(){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()}})},e.prototype.getAndPrefix=function(){var t=this.i18n.commaX0ThroughX1(),n=this.i18n.commaAndX0ThroughX1(),r=e.removeLeadingComma(t);return n==t||n.length<=r.length||n.slice(-r.length)!=r?null:n.slice(0,-r.length)},e.removeLeadingComma=function(e){return e.replace(/^[,،,、] ?/,``)},e.hasLeadingComma=function(e){return/^[,،,、]/.test(e)},e.prototype.getDayOfMonthDescription=function(t){var n=this,r,a;t===void 0&&(t=this.expressionParts[3]);var s=null,c=t,l=c.split(`,`);if(l.length>1){var u=function(e){return/^L-\d{1,2}$/.test(e)},d=l.filter(function(e){return u(e)}),f=l.filter(function(e){return!u(e)}).sort(function(e,t){return Number(e.indexOf(`L`)>-1)-Number(t.indexOf(`L`)>-1)});if(d.length>0)return(f.length>0?[f.join(`,`)]:[]).concat(d).map(function(e){return n.getDayOfMonthDescription(e)??``}).filter(function(e){return e!==``}).map(function(t,r){return r===0?t:`${n.i18n.spaceAnd()} `+e.removeLeadingComma(t)}).join(``);c=f.join(`,`)}switch(c){case`L`:s=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:s=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var p=c.match(/^(?:(\d{1,2})W|W(\d{1,2}))(?:([+-])(\d{1,2}))?$/);if(p){var m=parseInt(p[1]||p[2]),h=m==1?this.i18n.firstWeekday():i.StringUtilities.format(this.i18n.weekdayNearestDayX0(),m.toString()),g=p[4];s=g?p[3]==`-`?i.StringUtilities.format((r=this.i18n).commaDaysBeforeTheX0OfTheMonth?.call(r,g)||o.commaDaysBeforeTheX0OfTheMonth(g),g,h):i.StringUtilities.format((a=this.i18n).commaDaysAfterTheX0OfTheMonth?.call(a,g)||o.commaDaysAfterTheX0OfTheMonth(g),g,h):i.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),h);break}var _=c.match(/L-(\d{1,2})/);if(_){var v=_[1];s=i.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(v),v);break}if(c==`*`&&this.expressionParts[5]!=`*`)return``;s=this.getSegmentDescription(c,{all:this.i18n.commaEveryDay(),single:function(e){return e==`L`?n.i18n.lastDay():n.i18n.dayX0?i.StringUtilities.format(n.i18n.dayX0(),e):e},increment:function(e){return e==`1`?n.i18n.commaEveryDay():n.i18n.commaEveryX0Days(e)},range:function(e){return n.i18n.commaBetweenDayX0AndX1OfTheMonth(e)},format:function(e){return e==`L`?n.i18n.commaOnTheLastDayOfTheMonth():n.i18n.commaOnDayX0OfTheMonth(e)}})}return s},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],{all:``,single:function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},increment:function(t){return i.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},range:function(){var t;return(t=e.i18n).commaYearX0ThroughYearX1?.call(t)||e.i18n.commaX0ThroughX1()},format:function(){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()}})},e.prototype.getSegmentDescription=function(t,n){var a=r(r({},n),{bounds:void 0}),o=null,s=t.indexOf(`/`)>-1,c=t.indexOf(`-`)>-1,l=t.indexOf(`,`)>-1;if(!t)o=``;else if(t===`*`)o=n.all;else if(!s&&!c&&!l)o=i.StringUtilities.format(n.format(t),n.single(t));else if(l){for(var u=t.split(`,`),d=``,f=this.i18n.spaceAnd(),p=0;p<u.length;p++)if(p>0&&u.length>2&&(d+=`,`,p<u.length-1&&(d+=` `)),p>0&&u.length>1&&(p==u.length-1||u.length==2)&&(d+=f==`,`&&u.length>2?` `:`${f} `),u[p].indexOf(`/`)>-1||u[p].indexOf(`-`)>-1){var m=!s&&u[p].indexOf(`-`)>-1&&u[p].indexOf(`/`)==-1,h=this.getSegmentDescription(u[p],m?r(r({},a),{range:this.i18n.commaX0ThroughX1}):a);(m||p>0)&&(h=e.removeLeadingComma(h)),d+=h}else if(!s)d+=n.single(u[p]);else{var g=this.getSegmentDescription(u[p],a);p>0&&g&&(g=e.removeLeadingComma(g)),d+=g}o=s?d:i.StringUtilities.format(n.format(t),d)}else if(s){var u=t.split(`/`);if(o=i.StringUtilities.format(n.increment(u[1]),u[1]),u[0].indexOf(`-`)>-1){var _=this.generateRangeSegmentDescription(u[0],n);e.hasLeadingComma(_)||(o+=`, `),o+=_}else if(u[0].indexOf(`*`)==-1){var v=i.StringUtilities.format(n.format(u[0]),n.single(u[0]));v=e.removeLeadingComma(v),o+=i.StringUtilities.format(this.i18n.commaStartingX0(),v)}o+=this.getWrappingIncrementDescription(t,n)}else c&&(o=this.generateRangeSegmentDescription(t,n));return o},e.prototype.getWrappingIncrementDescription=function(e,t){var n=t.bounds;if(!this.options.verbose||!n)return``;var i=e.split(`/`),a=i[0],o=i[1],s=parseInt(o),c=n.max-n.min+1,l=a===`*`,u=Number.isInteger(s)&&s>1,d=u&&c%s===0;if(!l||!u||d)return``;for(var f=[],p=n.min;p<=n.max;p+=s)f.push(p);if(f.length<2)return``;var m=this.getSegmentDescription(f.join(`,`),r(r({},t),{bounds:void 0}));return m?`, ${m}`:``},e.prototype.generateRangeSegmentDescription=function(e,t){var n=e.split(`-`);return i.StringUtilities.format(t.range(e),t.single(n[0],1),t.single(n[1],2))},e.prototype.formatTime=function(e,t,n){var r=parseInt(e),i=parseInt(t),a=``,o=!1;this.options.use24HourTimeFormat||(o=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),a=o?`${this.getPeriod(r)} `:` ${this.getPeriod(r)}`,r>12&&(r-=12),r===0&&(r=12));var s=``;n&&(s=`:${(`00`+n).substring(n.length)}`);var c=r.toString(),l=(`00`+c).substring(c.length),u=i.toString(),d=(`00`+u).substring(u.length),f=this.options.trimHoursLeadingZero?c:l;return`${o?a:``}${f}:${d}${s}${o?``:a}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}(?!\\s*[\\p{L}\\p{N}])`,`gu`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}(?!\\s*[\\p{L}\\p{N}])`,`gu`),``),e=e.replace(RegExp(`${this.i18n.commaEveryDay()}(?!\\s*[\\p{L}\\p{N}])`,`gu`),``),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){var t,n;return e>=12?(t=this.i18n).pm?.call(t)||o.pm():(n=this.i18n).am?.call(n)||o.am()},e.locales={},e.ordinals=[`first`,`second`,`third`,`fourth`,`fifth`],e}()},3747(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(9486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},9486(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0;var n=function(e){return Number(e)===1};t.en=function(){function e(){}return 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(e){return n(e)?`every %s second`:`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(e){return n(e)?`at %s second past the minute`:`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(e){return n(e)?`every %s minute`:`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(e){return n(e)?`at %s minute past the hour`:`at %s minutes past the hour`},e.prototype.everyX0Hours=function(e){return n(e)?`every %s hour`:`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`, and %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(e){return n(e)?`, %s day before the last day of the month`:`, %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.commaDaysBeforeTheX0OfTheMonth=function(e){return n(e)?`, %s day before the %s of the month`:`, %s days before the %s of the month`},e.prototype.commaDaysAfterTheX0OfTheMonth=function(e){return n(e)?`, %s day after the %s of the month`:`, %s days after 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(e){return n(e)?`, every %s year`:`, 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.am=function(){return`AM`},e.prototype.pm=function(){return`PM`},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},9515(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t){if(!e)throw Error(t)}function r(e){var t=[];if(!isNaN(parseInt(e,10))){t.push(parseInt(e,10));var n=e.match(/^\d+-(-?\d+)/);n&&t.push(parseInt(n[1],10))}return t}function i(e,t,i,a){for(var o=0,s=e.split(`,`);o<s.length;o++)for(var c=s[o],l=0,u=r(c);l<u.length;l++){var d=u[l];n(d>=t&&d<=i,a)}}t.default=function(){function e(){}return e.stepRange=function(e){for(var t=0,r=e.split(`,`);t<r.length;t++){var i=r[t].split(`/`)[1];n(i===void 0||!/^0+$/.test(i),`step value must be greater than 0`)}},e.secondRange=function(e){i(e,0,59,`seconds part must be >= 0 and <= 59`)},e.minuteRange=function(e){i(e,0,59,`minutes part must be >= 0 and <= 59`)},e.hourRange=function(e){i(e,0,23,`hours part must be >= 0 and <= 23`)},e.dayOfMonthRange=function(e){i(e,1,31,`DOM part must be >= 1 and <= 31`)},e.monthRange=function(e,t){i(e,1,12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)},e.dayOfWeekRange=function(e,t){for(var r=0,a=e.split(`,`);r<a.length;r++){var o=a[r];if(o.indexOf(`#`)>-1){var s=o.substring(o.indexOf(`#`)+1);n(/^[1-5]$/.test(s),`DOW nth weekday must be >= 1 and <= 5`)}}i(e,0,6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)},e}()},1823(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].call(a.exports,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(8333),i=n(3747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())}))(),1),me=[`title`],H={"flex-none":``,"text-left":``},U={flex:`~ gap-2`,"min-w-0":``,"items-center":``,"text-sm":``},W={class:`truncate`},G={"text-xs":``,op50:``},K={key:0},q=[`onClick`],he=Object.assign(w({__name:`CronCollection`,props:{collection:{}},setup(e){let t=e,r=A(),o=C(!0),l=m(()=>V.default.toString(t.collection.cron));return(t,f)=>(c(),h(`div`,null,[y(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,p2:``,"hover-bg-active":``,title:l.value,onClick:f[0]||=e=>o.value=!o.value},[y(`div`,H,[s(M,{icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":o.value?90:0,transition:``},null,8,[`transform-rotate`])]),y(`span`,U,[s(N,{class:`font-mono n-primary`,textContent:u(e.collection.cron)},null,8,[`textContent`]),y(`span`,W,u(l.value),1),y(`span`,G,`(`+u(e.collection.tasks.length)+`)`,1)])],8,me),f[2]||=y(`div`,{"x-divider":``},null,-1),o.value?(c(),h(`ul`,K,[(c(!0),h(d,null,i(e.collection.tasks,e=>(c(),h(`li`,{key:e},[y(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"pl-9":``,"font-mono":``,"hover-bg-active":``,class:a([{"bg-active":n(r)===e}]),onClick:t=>r.value=e},u(e),11,q),f[1]||=y(`div`,{"x-divider":``},null,-1)]))),128))])):_(``,!0)]))}}),{__name:`CronCollection`}),ge={"h-full":``,"w-full":``,flex:`~ col`},_e={flex:`~ col gap-2`,"n-navbar-glass":``,"flex-none":``,p4:``},ve={flex:`~ gap2 items-center`},ye={relative:``,"w-full":``},be={absolute:``,"right-2":``,"top-1.5":``,flex:`~ gap-1`},xe={flex:`~ gap2 wrap`,"w-full":``,"items-center":``,px4:``,pb2:``,"text-center":``,"text-sm":``,border:`b base`},Se={class:`hidden md:block`},Ce={flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},we={key:0,border:`b base`,relative:``,"n-code-block":``},Te={flex:`~ wrap`,"w-full":``},Ee=[`onClick`],De={border:`b base`,flex:`~ gap2`,"items-center":``,px4:``,py2:``},Oe={key:1,"text-xs":``,op50:``},J=Object.assign(w({__name:`ServerTaskDetails`,props:{task:{}},emits:[`openDefaultInput`],setup(e,{emit:t}){let r=e,ee=t,b=C({payload:{}}),{inputDefaults:w}=j(`serverRoutes`),[E,D]=le(),re=se(),A=fe(),I=g({contentType:`text/plain`,data:``,statusCode:200,error:void 0,fetchTime:0}),R=m(()=>JSON.stringify(I.data,null,2)),z=m(()=>I.contentType.includes(`application/json`)?`json`:`text`),B=C(!1),V=C(!1),me=ie(),H=C(),U=[`json`],W=C(U[0]),G=g({query:[{active:!0,key:``,value:``,type:`string`}],body:[{active:!0,key:``,value:``,type:`string`}],headers:[]}),K=m({get:()=>G[H.value],set:e=>{G[H.value]=e}}),q=m(()=>({...Q(w.value.query),...Q(G.query)})),he=m(()=>({...Q(w.value.headers)})),J=m(()=>Object.keys(b.value?.payload??{}).length?{...b.value}:void 0),Y=m(()=>J.value?`POST`:`GET`),ke=m(()=>{let e=window?.location.origin;return e.charAt(e.length-1)===`/`&&(e=e.slice(0,-1)),e}),X=m(()=>{let e=new URLSearchParams(q.value).toString();e&&=`?${e}`;let t=`/_nitro/tasks/${r.task.name}${e}`,n=A.value?.app.baseURL||``;return(n===`./`||n===`.`)&&(n=``),n.endsWith(`/`)&&(n=n.slice(0,-1)),n+t}),Z=m(()=>ke.value+X.value);function Q(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 $(){V.value=!0,B.value=!0;let e=Date.now();O(`server-tasks:run`,{method:Y.value});try{I.data=await ue(Z.value,{method:`POST`,headers:he.value,query:q.value,body:J.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{}B.value=!1,I.fetchTime=Date.now()-e}let Ae=m(()=>{let e=[];return e.push({name:`Query`,slug:`query`,length:G.query.length}),e.push({name:`Body`,slug:`body`,length:G.body.length}),e});f(()=>{if(W.value===`json`&&typeof b.value==`string`)try{b.value=JSON.parse(b.value)}catch{}});let je=ce(`nuxt-devtools:server-tasks:inputs`,()=>[],{window:window.parent});oe([G,H],()=>{let e=je.value?.find(e=>e.task===r.task.name);if(e){H.value||=e.tab,e.tab!==H.value&&(e.tab=H.value);let{body:t,query:n,headers:r}=e.inputs;Object.assign(G,{body:t,query:n,headers:r})}else{let e={task:r.task.name,tab:`query`,inputs:G};je.value.push(e),H.value||=e.tab}},{immediate:!0,deep:!0,debounce:500});let Me=ne();return(t,r)=>{let f=l(`tooltip`);return c(),h(`div`,ge,[y(`div`,_e,[y(`div`,ve,[p((c(),h(`div`,null,[s(k,{class:a([`n-badge-base n-sm`,n(pe)(Y.value)]),"pointer-events-none":``,"font-mono":``,tabindex:`-1`},{default:x(()=>[T(u(Y.value),1)]),_:1},8,[`class`])])),[[f,`Method is ${Y.value} as ${Y.value===`GET`?`no`:``} json body is sent`]]),y(`div`,ye,[s(te,{"model-value":X.value,readonly:``,"flex-auto":``,"font-mono":``,p:`x5 y2`,n:`sm`},null,8,[`model-value`]),y(`div`,be,[p(s(k,{title:`Copy URL`,n:`xs blue`,icon:`carbon:copy`,border:!1,onClick:r[0]||=e=>n(Me)(Z.value,`server-task-url`)},null,512),[[f,`Copy URL`]]),p(s(k,{title:`Open in Editor`,icon:`carbon-launch`,n:`xs blue`,border:!1,onClick:r[1]||=t=>n(me)(e.task.handler)},null,512),[[f,`Open in Editor`]])])]),s(k,{"h-full":``,n:`primary solid`,onClick:$},{default:x(()=>[s(M,{icon:`carbon:send`})]),_:1})])]),y(`div`,xe,[(c(!0),h(d,null,i(Ae.value,e=>p((c(),v(k,{key:e.slug,class:a(H.value===e.slug?`text-primary n-primary`:`border-transparent shadow-none`),onClick:t=>H.value=e.slug},{default:x(()=>[s(M,{icon:n(L)[e.slug]},null,8,[`icon`]),y(`div`,Se,[T(u(e.name)+` `+u(e?.length?`(${e.length})`:``)+` `,1),y(`span`,null,u(n(w)[e.slug]?.length?`(${n(w)[e.slug].length})`:``),1)])]),_:2},1032,[`class`,`onClick`])),[[f,e.name]])),128))]),s(n(E),null,{default:x(()=>[s(P,{modelValue:K.value,"onUpdate:modelValue":r[4]||=e=>K.value=e,default:{active:!0,type:`string`},"max-h-xs":``,"of-auto":``},{default:x(()=>[n(w)[H.value]?.length?(c(),h(d,{key:0},[y(`div`,Ce,[r[6]||=y(`div`,{"w-5":``,"x-divider":``},null,-1),r[7]||=y(`div`,{"flex-none":``},` Default Inputs `,-1),s(k,{icon:`i-carbon-edit`,border:!1,onClick:r[2]||=e=>ee(`openDefaultInput`)}),r[8]||=y(`div`,{"x-divider":``},null,-1)]),s(P,{modelValue:n(w)[H.value],"onUpdate:modelValue":r[3]||=e=>n(w)[H.value]=e,disabled:``,p0:``},null,8,[`modelValue`])],64)):_(``,!0)]),_:1},8,[`modelValue`])]),_:1}),K.value?(c(),h(`div`,we,[H.value===`body`?(c(),h(d,{key:0},[y(`div`,Te,[(c(),h(d,null,i(U,e=>y(`button`,{key:e,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:a({"border-b":e!==W.value}),onClick:t=>W.value=e},[y(`div`,{class:a({op30:e!==W.value}),"font-mono":``},u(e),3)],10,Ee)),64)),r[9]||=y(`div`,{border:`b base`,"flex-auto":``},null,-1)]),W.value===`input`?(c(),v(n(D),{key:0})):W.value===`json`?(c(),v(n(S),o({key:1,modelValue:b.value,"onUpdate:modelValue":r[5]||=e=>b.value=e,class:[n(re)===`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`])):_(``,!0)],64)):(c(),v(n(D),{key:1}))])):_(``,!0),V.value?B.value?(c(),v(ae,{key:2,"z-10":``,"flex-auto":``,"backdrop-blur":``},{default:x(()=>[...r[11]||=[T(` Running... `,-1)]]),_:1})):(c(),h(d,{key:3},[y(`div`,De,[r[13]||=y(`div`,null,`Result`,-1),I.error?(c(),v(N,{key:0,n:`red`},{default:x(()=>[...r[12]||=[T(` Error `,-1)]]),_:1})):_(``,!0),s(N,{n:I.error?`orange`:`green`,textContent:u(I.statusCode)},null,8,[`n`,`textContent`]),I.contentType?(c(),h(`code`,Oe,u(I.contentType),1)):_(``,!0),r[14]||=y(`div`,{"flex-auto":``},null,-1),r[15]||=y(`div`,{op50:``},` Tasks finished in `,-1),s(N,{n:`green`},{default:x(()=>[T(u(I.fetchTime)+` ms `,1)]),_:1})]),s(de,{"flex-auto":``,"overflow-auto":``,"py-2":``,code:R.value,lang:z.value},null,8,[`code`,`lang`])],64)):(c(),v(F,{key:1},{default:x(()=>[s(k,{n:`primary`,onClick:$},{default:x(()=>[s(M,{icon:`carbon:send`}),r[10]||=T(` Run task `,-1)]),_:1})]),_:1}))])}}}),{__name:`ServerTaskDetails`}),Y={"flex-none":``,"text-left":``},ke={flex:``,"items-center":``,"text-sm":``,"font-mono":``},X=Object.assign(w({__name:`ServerTaskListItem`,props:{item:{},index:{default:0}},setup(e){let t=C(!0),o=A();return(s,l)=>(c(),h(`div`,null,[y(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"hover-bg-active":``,class:a([{"bg-active":n(o)===e.item.name}]),style:r({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:l[0]||=n=>{t.value=!t.value,o.value=e.item.name}},[y(`div`,Y,[e.item.type===`collection`?(c(),v(M,{key:0,icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":t.value?90:0,transition:``},null,8,[`transform-rotate`])):_(``,!0)]),y(`span`,ke,[e.item.type===`collection`?(c(),v(M,{key:0,title:`${e.item.tasks?.length} tasks`,icon:`carbon:folder`,mr1:``},null,8,[`title`])):(c(),v(M,{key:1,icon:`carbon:play`,ml3:``,mr1:``})),T(` `+u(e.item.name),1)])],6),l[1]||=y(`div`,{"x-divider":``},null,-1),t.value?b(s.$slots,`default`,{},()=>[(c(!0),h(d,null,i(e.item.tasks,t=>(c(),v(X,{key:t.name,item:t,index:e.index+1},null,8,[`item`,`index`]))),128))],void 0,0):_(``,!0)]))}}),{__name:`ServerTaskListItem`}),Z={flex:`~ gap1`,"text-sm":``},Q={key:0,op50:``},$={op50:``},Ae=w({__name:`server-tasks`,setup(e){let t=C(!1),r=I(),a=m(()=>Object.keys(r.value?.tasks??{}).map(e=>({name:e,...r.value.tasks[e],type:`task`}))),o=m(()=>Object.entries(r.value?.scheduledTasks??{}).map(([e,t])=>({cron:e,tasks:t}))),f=A(),{view:g,selectedTask:b,inputDefaults:S}=j(`serverTasks`),w=m(()=>{!f.value&&b.value&&(f.value=b.value.name);let e=a.value.find(e=>e.name===f.value);return f.value!==b.value?.name&&e&&(b.value=e),e}),T=C(``),te=m(()=>new re(a.value,{keys:[`key`,`description`],shouldSort:!0})),O=m(()=>T.value?te.value.search(T.value).map(e=>e.item):a.value),ne=m(()=>{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 O.value.forEach(r=>{let i,a={...r,type:`task`},o=r.name.split(`:`).concat();o.length>0&&o.at(-1)?.includes(`.`)&&o.pop(),o.forEach(e=>{i=n(e,i)}),i?t(i,a):e.push(a)}),e});function ie(){g.value=g.value===`tree`?`list`:`tree`}return(e,r)=>{let f=l(`tooltip`);return c(),h(d,null,[s(E,{"storage-key":`tab-server-tasks`},{left:x(()=>[s(E,{horizontal:``,"storage-key":`tab-server-tasks-split`},{left:x(()=>[s(D,{search:T.value,"onUpdate:search":r[1]||=e=>T.value=e,pb2:``},{actions:x(()=>[p(s(k,{"text-lg":``,icon:n(g)===`list`?`i-carbon-list`:`i-carbon-tree-view-alt`,title:`Toggle view`,border:!1,onClick:ie},null,8,[`icon`]),[[f,`Toggle View`]]),p(s(k,{"text-lg":``,icon:`i-carbon-cics-sit-overrides`,title:`Default Inputs`,border:!1,onClick:r[0]||=e=>t.value=!t.value},null,512),[[f,`Default Inputs`]])]),default:x(()=>[y(`div`,Z,[T.value?(c(),h(`span`,Q,u(O.value.length)+` matched · `,1)):_(``,!0),y(`span`,$,u(a.value?.length)+` tasks in total`,1)])]),_:1},8,[`search`]),(c(!0),h(d,null,i(n(g)===`tree`?ne.value:O.value,e=>(c(),v(X,{key:e.name,item:e},null,8,[`item`]))),128))]),right:x(()=>[r[6]||=y(`div`,{px4:``,py2:``,border:`b base`},` Cron groups `,-1),y(`div`,null,[y(`ul`,null,[(c(!0),h(d,null,i(o.value,e=>(c(),h(`li`,{key:e.cron},[s(he,{collection:e},null,8,[`collection`])]))),128))])])]),_:1})]),right:x(()=>[(c(),v(ee,{max:10},[w.value?(c(),v(J,{key:w.value.name,task:w.value,onOpenDefaultInput:r[2]||=e=>t.value=!0},null,8,[`task`])):_(``,!0)],1024)),w.value?_(``,!0):(c(),v(F,{key:0},{default:x(()=>[s(R,{px6:``,py2:``},{default:x(()=>[...r[7]||=[y(`span`,{op75:``},`Select a task to start`,-1)]]),_:1})]),_:1}))]),_:1}),s(z,{modelValue:t.value,"onUpdate:modelValue":r[4]||=e=>t.value=e,"auto-close":``,"max-w-xl":``,"min-w-xl":``,onClose:r[5]||=e=>t.value=!1},{default:x(()=>[y(`div`,null,[r[8]||=y(`div`,{p4:``,border:`b base`},[y(`span`,{"text-lg":``},`Default Inputs`),y(`br`),y(`span`,{"text-white":``,op50:``},`Merged as default for every task in DevTools`)],-1),s(B,{text:`Query ${n(S).query?.length?`(${n(S).query.length})`:``}`,padding:!1,icon:n(L).query},{default:x(()=>[s(P,{modelValue:n(S).query,"onUpdate:modelValue":r[3]||=e=>n(S).query=e,py0:``,default:{active:!0,type:`string`}},null,8,[`modelValue`])]),_:1},8,[`text`,`icon`])])]),_:1},8,[`modelValue`])],64)}}});export{Ae as default};
|
|
2
|
+
import{o as e,t}from"./rolldown-runtime-n50dhdz2.js";import"./pages-oqx296ta.js";import{Dt as n,Jt as r,K as i,Kt as a,N as o,S as s,U as c,Y as l,Yt as u,a as d,at as f,ct as p,f as m,g as h,gt as g,h as _,m as v,o as ee,p as y,q as b,st as x,t as S,vt as C,w,x as T}from"./vendor/json-editor-vue-bhnw2s6o.js";import{t as E}from"./nsplit-pane-kpwlq5p2.js";import{t as D}from"./nnavbar-ncvicu3x.js";import{g as te,i as O,m as k,n as ne,p as re,r as ie,s as A,v as ae}from"#entry";import{V as oe,i as se,j as ce,r as j,t as M,x as le}from"./nicon-okkaubho.js";import{t as N}from"./nbadge-iiw1hs8y.js";import{t as ue}from"./virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-nqw16oao.js";import{t as P}from"./server-route-inputs-om5ppgu7.js";import{t as F}from"./npanel-grids-iboujc96.js";import{t as de}from"./ncode-block-fvcvsi1k.js";import{O as I,S as fe,a as pe}from"./utils-nybefnvm.js";import{n as L}from"./constants-eqqt9i2x.js";import{t as R}from"./ncard-ia5sid5c.js";import{t as z}from"./ndrawer-d6y9yvar.js";import{t as B}from"./nsection-block-jg1eef62.js";var V=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={6949(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(9515),i={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},a={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12},o={4:`12`,5:`6`,6:`9999`};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);this.normalize(e),this.validate(e);for(var r=function(e){return e.indexOf(`,`)>-1&&e.split(`,`).indexOf(`*`)>-1},i=0,a=[[3,5],[5,3]];i<a.length;i++){var o=a[i],s=o[0],c=o[1];r(e[s])&&e[s][0]!==`*`&&e[c][0]!==`*`&&(e[c]=`*`)}for(var l=0;l<e.length;l++)r(e[l])&&(e[l]=`*`);return e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 JAN *`,"@annually":`0 0 1 JAN *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * SUN`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`}[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.indexOf(`*`)===-1&&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){for(var t=this,n=0;n<e.length;n++)e[n]=e[n].toUpperCase();e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`);var r={0:`0/`,1:`0/`,2:`0/`,3:`1/`,6:`1/`};this.monthStartIndexZero||(r[4]=`1/`);for(var s=0,c=Object.keys(r).map(Number);s<c.length;s++){var l=c[s];e[l].indexOf(r[l])==0&&(e[l]=e[l].replace(r[l],`*/`))}if(this.dayOfWeekStartIndexZero&&(e[5]=e[5].split(`,`).map(function(e){return e.replace(/^0-7(?=\/|$)/,`0-6`)}).join(`,`)),e[5]=e[5].replace(/(^\d+)|([^#/\s\d]\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]=e[5].split(`,`).map(function(e){return e==`L`?`6`:e}).join(`,`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||/[-+]/.test(e[3]))&&!/^\d{1,2}W[+-]\d{1,2}$/.test(e[3]))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.`);for(var u in i)e[5]=e[5].replace(new RegExp(u,`gi`),i[u].toString());for(var d in e[5]=e[5].split(`,`).filter(function(e,t,n){return e===``||n.indexOf(e)===t}).join(`,`),e[4]=e[4].replace(/(^\d{1,2})|([^#/\s\d]\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)}),a)e[4]=e[4].replace(new RegExp(d,`gi`),a[d].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var n=0;n<e.length;n++){e[n].indexOf(`,`)!=-1&&(e[n]=e[n].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[n]==`*/1`&&(e[n]=`*`);var f=o[n];if(f&&e[n].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[n])){var p=e[n].split(`/`);e[n]=`${p[0]}-${f}/${p[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].replace(/^(\d{1,2}W)[+-]\d{1,2}$/,`$1`),`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){e.forEach(function(e){return r.default.stepRange(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}()},8333(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var i=n(1823),a=n(6949),o=new(n(9486)).en;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||i,o=r.verbose,s=o!==void 0&&o,c=r.dayOfWeekStartIndexZero,l=c===void 0||c,u=r.monthStartIndexZero,d=u!==void 0&&u,f=r.use24HourTimeFormat,p=r.trimHoursLeadingZero,m=p!==void 0&&p,h=r.locale,g=h===void 0?null:h,_=r.logicalAndDayFields;return new e(t,{throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,trimHoursLeadingZero:m,locale:g,logicalAndDayFields:_!==void 0&&_}).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{var n=new a.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||o.atReboot();var r=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),c=this.getDayOfWeekDescription(),l=this.getYearDescription();t+=r+i+c+s+l,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substring(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],r=this.expressionParts[2],a=``;if(!i.StringUtilities.containsAny(n,e.specialCharacters)&&!i.StringUtilities.containsAny(r,e.specialCharacters)&&!i.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(r,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!i.StringUtilities.containsAny(r,e.specialCharacters)){var o=n.split(`-`);a+=i.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,o[0],``),this.formatTime(r,o[1],``))}else if(!t&&r.indexOf(`,`)>-1&&r.indexOf(`-`)==-1&&r.indexOf(`/`)==-1&&!i.StringUtilities.containsAny(n,e.specialCharacters)){var s=r.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a&&(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],{all:this.i18n.everySecond(),single:function(e){return e},increment:function(t){return i.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},range:function(){return e.i18n.secondsX0ThroughX1PastTheMinute()},format:function(t){var n;return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):(n=e.i18n).atX0SecondsPastTheMinuteGt20?.call(n)||e.i18n.atX0SecondsPastTheMinute(t)},bounds:{min:0,max:59}})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],{all:this.i18n.everyMinute(),single:function(e){return e},increment:function(t){return i.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},range:function(){return e.i18n.minutesX0ThroughX1PastTheHour()},format:function(r){var i,a;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):(a=e.i18n).atX0MinutesPastTheHourGt20?.call(a)||e.i18n.atX0MinutesPastTheHour(r)},bounds:{min:0,max:59}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,r=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&r.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,{all:this.i18n.everyHour(),single:function(t){var n=r.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`,``)},increment:function(t){return i.StringUtilities.format(e.i18n.everyX0Hours(t),t)},range:function(){return e.i18n.betweenX0AndX1()},format:function(){return e.i18n.atX0()},bounds:{min:0,max:23}})},e.prototype.getDayOfWeekDescription=function(t){var n=this;t===void 0&&(t=this.expressionParts[5]);var r=this.i18n.daysOfTheWeek(),a=null;if(t==`*`)a=``;else{var o=t.split(`,`),s=function(t,r){return(n.getDayOfWeekDescription(t.join(`,`))??``)+`${n.i18n.spaceAnd()} `+e.removeLeadingComma(n.getDayOfWeekDescription(r.join(`,`))??``)},c=o.filter(function(e){return/[#L]/.test(e)}),l=o.filter(function(e){return!/[#L]/.test(e)});if(l.length>0&&c.some(function(e){return e.indexOf(`#`)>-1}))return s(l,c);var u=o.filter(function(e){return e.indexOf(`L`)>-1}),d=o.filter(function(e){return e.indexOf(`L`)===-1});if(u.length>0&&d.length>0)return s(d,u);var f=this.expressionParts[3]!=`*`&&!this.options.logicalAndDayFields&&t.indexOf(`,`)==-1,p=t.split(`/`),m=p.length>1&&parseInt(p[1])!=1,h=this.getAndPrefix();a=this.getSegmentDescription(t,{all:this.i18n.commaEveryDay(),single:function(t,i){var a=t;t.indexOf(`#`)>-1?a=t.substring(0,t.indexOf(`#`)):t.indexOf(`L`)>-1&&(a=a.replace(`L`,``));var o=parseInt(a),s=n.i18n.daysOfTheWeekInCase?n.i18n.daysOfTheWeekInCase(i)[o]:r[o];if(t.indexOf(`#`)>-1){var c=parseInt(t.substring(t.indexOf(`#`)+1)),l=t.substring(0,t.indexOf(`#`)),u=e.ordinals[c-1];s=n.i18n[u](l)+` `+s}return s},increment:function(t){if(parseInt(t)==1)return``;var r=n.i18n.commaEveryX0DaysOfTheWeek(t);return i.StringUtilities.format(f&&h?h+e.removeLeadingComma(r):r,t)},range:function(e){var t=e.substring(0,e.indexOf(`-`));return f&&(!m||!h)?n.i18n.commaAndX0ThroughX1(t):n.i18n.commaX0ThroughX1(t)},format:function(e){var t=null;if(e.indexOf(`#`)>-1){var r=e.substring(e.indexOf(`#`)+1),i=e.substring(0,e.indexOf(`#`));t=n.i18n.commaOnThe(r,i).trim()+n.i18n.spaceX0OfTheMonth()}else t=e.indexOf(`L`)>-1?n.i18n.commaOnTheLastX0OfTheMonth(e.split(`,`)[0].replace(`L`,``)):n.expressionParts[3]==`*`||n.options.logicalAndDayFields?n.i18n.commaOnlyOnX0(e):n.i18n.commaAndOnX0();return t}});var g=o[0],_=o.length>1&&t.indexOf(`/`)>-1,v=g.split(`/`)[1];_&&h&&a&&this.expressionParts[3]!=`*`&&!this.options.logicalAndDayFields&&(v===void 0?g.indexOf(`-`)>-1:parseInt(v)!=1)&&(a=h+e.removeLeadingComma(a))}return a},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],{all:``,single:function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},increment:function(t){return parseInt(t)==1?``:i.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},range:function(){var t;return(t=e.i18n).commaMonthX0ThroughMonthX1?.call(t)||e.i18n.commaX0ThroughX1()},format:function(){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()}})},e.prototype.getAndPrefix=function(){var t=this.i18n.commaX0ThroughX1(),n=this.i18n.commaAndX0ThroughX1(),r=e.removeLeadingComma(t);return n==t||n.length<=r.length||n.slice(-r.length)!=r?null:n.slice(0,-r.length)},e.removeLeadingComma=function(e){return e.replace(/^[,،,、] ?/,``)},e.hasLeadingComma=function(e){return/^[,،,、]/.test(e)},e.prototype.getDayOfMonthDescription=function(t){var n=this,r,a;t===void 0&&(t=this.expressionParts[3]);var s=null,c=t,l=c.split(`,`);if(l.length>1){var u=function(e){return/^L-\d{1,2}$/.test(e)},d=l.filter(function(e){return u(e)}),f=l.filter(function(e){return!u(e)}).sort(function(e,t){return Number(e.indexOf(`L`)>-1)-Number(t.indexOf(`L`)>-1)});if(d.length>0)return(f.length>0?[f.join(`,`)]:[]).concat(d).map(function(e){return n.getDayOfMonthDescription(e)??``}).filter(function(e){return e!==``}).map(function(t,r){return r===0?t:`${n.i18n.spaceAnd()} `+e.removeLeadingComma(t)}).join(``);c=f.join(`,`)}switch(c){case`L`:s=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:s=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var p=c.match(/^(?:(\d{1,2})W|W(\d{1,2}))(?:([+-])(\d{1,2}))?$/);if(p){var m=parseInt(p[1]||p[2]),h=m==1?this.i18n.firstWeekday():i.StringUtilities.format(this.i18n.weekdayNearestDayX0(),m.toString()),g=p[4];s=g?p[3]==`-`?i.StringUtilities.format((r=this.i18n).commaDaysBeforeTheX0OfTheMonth?.call(r,g)||o.commaDaysBeforeTheX0OfTheMonth(g),g,h):i.StringUtilities.format((a=this.i18n).commaDaysAfterTheX0OfTheMonth?.call(a,g)||o.commaDaysAfterTheX0OfTheMonth(g),g,h):i.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),h);break}var _=c.match(/L-(\d{1,2})/);if(_){var v=_[1];s=i.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(v),v);break}if(c==`*`&&this.expressionParts[5]!=`*`)return``;s=this.getSegmentDescription(c,{all:this.i18n.commaEveryDay(),single:function(e){return e==`L`?n.i18n.lastDay():n.i18n.dayX0?i.StringUtilities.format(n.i18n.dayX0(),e):e},increment:function(e){return e==`1`?n.i18n.commaEveryDay():n.i18n.commaEveryX0Days(e)},range:function(e){return n.i18n.commaBetweenDayX0AndX1OfTheMonth(e)},format:function(e){return e==`L`?n.i18n.commaOnTheLastDayOfTheMonth():n.i18n.commaOnDayX0OfTheMonth(e)}})}return s},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],{all:``,single:function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},increment:function(t){return i.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},range:function(){var t;return(t=e.i18n).commaYearX0ThroughYearX1?.call(t)||e.i18n.commaX0ThroughX1()},format:function(){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()}})},e.prototype.getSegmentDescription=function(t,n){var a=r(r({},n),{bounds:void 0}),o=null,s=t.indexOf(`/`)>-1,c=t.indexOf(`-`)>-1,l=t.indexOf(`,`)>-1;if(!t)o=``;else if(t===`*`)o=n.all;else if(!s&&!c&&!l)o=i.StringUtilities.format(n.format(t),n.single(t));else if(l){for(var u=t.split(`,`),d=``,f=this.i18n.spaceAnd(),p=0;p<u.length;p++)if(p>0&&u.length>2&&(d+=`,`,p<u.length-1&&(d+=` `)),p>0&&u.length>1&&(p==u.length-1||u.length==2)&&(d+=f==`,`&&u.length>2?` `:`${f} `),u[p].indexOf(`/`)>-1||u[p].indexOf(`-`)>-1){var m=!s&&u[p].indexOf(`-`)>-1&&u[p].indexOf(`/`)==-1,h=this.getSegmentDescription(u[p],m?r(r({},a),{range:this.i18n.commaX0ThroughX1}):a);(m||p>0)&&(h=e.removeLeadingComma(h)),d+=h}else if(!s)d+=n.single(u[p]);else{var g=this.getSegmentDescription(u[p],a);p>0&&g&&(g=e.removeLeadingComma(g)),d+=g}o=s?d:i.StringUtilities.format(n.format(t),d)}else if(s){var u=t.split(`/`);if(o=i.StringUtilities.format(n.increment(u[1]),u[1]),u[0].indexOf(`-`)>-1){var _=this.generateRangeSegmentDescription(u[0],n);e.hasLeadingComma(_)||(o+=`, `),o+=_}else if(u[0].indexOf(`*`)==-1){var v=i.StringUtilities.format(n.format(u[0]),n.single(u[0]));v=e.removeLeadingComma(v),o+=i.StringUtilities.format(this.i18n.commaStartingX0(),v)}o+=this.getWrappingIncrementDescription(t,n)}else c&&(o=this.generateRangeSegmentDescription(t,n));return o},e.prototype.getWrappingIncrementDescription=function(e,t){var n=t.bounds;if(!this.options.verbose||!n)return``;var i=e.split(`/`),a=i[0],o=i[1],s=parseInt(o),c=n.max-n.min+1,l=a===`*`,u=Number.isInteger(s)&&s>1,d=u&&c%s===0;if(!l||!u||d)return``;for(var f=[],p=n.min;p<=n.max;p+=s)f.push(p);if(f.length<2)return``;var m=this.getSegmentDescription(f.join(`,`),r(r({},t),{bounds:void 0}));return m?`, ${m}`:``},e.prototype.generateRangeSegmentDescription=function(e,t){var n=e.split(`-`);return i.StringUtilities.format(t.range(e),t.single(n[0],1),t.single(n[1],2))},e.prototype.formatTime=function(e,t,n){var r=parseInt(e),i=parseInt(t),a=``,o=!1;this.options.use24HourTimeFormat||(o=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),a=o?`${this.getPeriod(r)} `:` ${this.getPeriod(r)}`,r>12&&(r-=12),r===0&&(r=12));var s=``;n&&(s=`:${(`00`+n).substring(n.length)}`);var c=r.toString(),l=(`00`+c).substring(c.length),u=i.toString(),d=(`00`+u).substring(u.length),f=this.options.trimHoursLeadingZero?c:l;return`${o?a:``}${f}:${d}${s}${o?``:a}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}(?!\\s*[\\p{L}\\p{N}])`,`gu`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}(?!\\s*[\\p{L}\\p{N}])`,`gu`),``),e=e.replace(RegExp(`${this.i18n.commaEveryDay()}(?!\\s*[\\p{L}\\p{N}])`,`gu`),``),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){var t,n;return e>=12?(t=this.i18n).pm?.call(t)||o.pm():(n=this.i18n).am?.call(n)||o.am()},e.locales={},e.ordinals=[`first`,`second`,`third`,`fourth`,`fifth`],e}()},3747(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(9486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},9486(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0;var n=function(e){return Number(e)===1};t.en=function(){function e(){}return 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(e){return n(e)?`every %s second`:`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(e){return n(e)?`at %s second past the minute`:`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(e){return n(e)?`every %s minute`:`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(e){return n(e)?`at %s minute past the hour`:`at %s minutes past the hour`},e.prototype.everyX0Hours=function(e){return n(e)?`every %s hour`:`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`, and %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(e){return n(e)?`, %s day before the last day of the month`:`, %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.commaDaysBeforeTheX0OfTheMonth=function(e){return n(e)?`, %s day before the %s of the month`:`, %s days before the %s of the month`},e.prototype.commaDaysAfterTheX0OfTheMonth=function(e){return n(e)?`, %s day after the %s of the month`:`, %s days after 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(e){return n(e)?`, every %s year`:`, 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.am=function(){return`AM`},e.prototype.pm=function(){return`PM`},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},9515(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t){if(!e)throw Error(t)}function r(e){var t=[];if(!isNaN(parseInt(e,10))){t.push(parseInt(e,10));var n=e.match(/^\d+-(-?\d+)/);n&&t.push(parseInt(n[1],10))}return t}function i(e,t,i,a){for(var o=0,s=e.split(`,`);o<s.length;o++)for(var c=s[o],l=0,u=r(c);l<u.length;l++){var d=u[l];n(d>=t&&d<=i,a)}}t.default=function(){function e(){}return e.stepRange=function(e){for(var t=0,r=e.split(`,`);t<r.length;t++){var i=r[t].split(`/`)[1];n(i===void 0||!/^0+$/.test(i),`step value must be greater than 0`)}},e.secondRange=function(e){i(e,0,59,`seconds part must be >= 0 and <= 59`)},e.minuteRange=function(e){i(e,0,59,`minutes part must be >= 0 and <= 59`)},e.hourRange=function(e){i(e,0,23,`hours part must be >= 0 and <= 23`)},e.dayOfMonthRange=function(e){i(e,1,31,`DOM part must be >= 1 and <= 31`)},e.monthRange=function(e,t){i(e,1,12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)},e.dayOfWeekRange=function(e,t){for(var r=0,a=e.split(`,`);r<a.length;r++){var o=a[r];if(o.indexOf(`#`)>-1){var s=o.substring(o.indexOf(`#`)+1);n(/^[1-5]$/.test(s),`DOW nth weekday must be >= 1 and <= 5`)}}i(e,0,6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)},e}()},1823(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].call(a.exports,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(8333),i=n(3747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())}))(),1),me=[`title`],H={"flex-none":``,"text-left":``},U={flex:`~ gap-2`,"min-w-0":``,"items-center":``,"text-sm":``},W={class:`truncate`},G={"text-xs":``,op50:``},K={key:0},q=[`onClick`],he=Object.assign(w({__name:`CronCollection`,props:{collection:{}},setup(e){let t=e,r=A(),o=C(!0),l=m(()=>V.default.toString(t.collection.cron));return(t,f)=>(c(),h(`div`,null,[y(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,p2:``,"hover-bg-active":``,title:l.value,onClick:f[0]||=e=>o.value=!o.value},[y(`div`,H,[s(M,{icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":o.value?90:0,transition:``},null,8,[`transform-rotate`])]),y(`span`,U,[s(N,{class:`font-mono n-primary`,textContent:u(e.collection.cron)},null,8,[`textContent`]),y(`span`,W,u(l.value),1),y(`span`,G,`(`+u(e.collection.tasks.length)+`)`,1)])],8,me),f[2]||=y(`div`,{"x-divider":``},null,-1),o.value?(c(),h(`ul`,K,[(c(!0),h(d,null,i(e.collection.tasks,e=>(c(),h(`li`,{key:e},[y(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"pl-9":``,"font-mono":``,"hover-bg-active":``,class:a([{"bg-active":n(r)===e}]),onClick:t=>r.value=e},u(e),11,q),f[1]||=y(`div`,{"x-divider":``},null,-1)]))),128))])):_(``,!0)]))}}),{__name:`CronCollection`}),ge={"h-full":``,"w-full":``,flex:`~ col`},_e={flex:`~ col gap-2`,"n-navbar-glass":``,"flex-none":``,p4:``},ve={flex:`~ gap2 items-center`},ye={relative:``,"w-full":``},be={absolute:``,"right-2":``,"top-1.5":``,flex:`~ gap-1`},xe={flex:`~ gap2 wrap`,"w-full":``,"items-center":``,px4:``,pb2:``,"text-center":``,"text-sm":``,border:`b base`},Se={class:`hidden md:block`},Ce={flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},we={key:0,border:`b base`,relative:``,"n-code-block":``},Te={flex:`~ wrap`,"w-full":``},Ee=[`onClick`],De={border:`b base`,flex:`~ gap2`,"items-center":``,px4:``,py2:``},Oe={key:1,"text-xs":``,op50:``},J=Object.assign(w({__name:`ServerTaskDetails`,props:{task:{}},emits:[`openDefaultInput`],setup(e,{emit:t}){let r=e,ee=t,b=C({payload:{}}),{inputDefaults:w}=j(`serverRoutes`),[E,D]=le(),re=se(),A=fe(),I=g({contentType:`text/plain`,data:``,statusCode:200,error:void 0,fetchTime:0}),R=m(()=>JSON.stringify(I.data,null,2)),z=m(()=>I.contentType.includes(`application/json`)?`json`:`text`),B=C(!1),V=C(!1),me=ie(),H=C(),U=[`json`],W=C(U[0]),G=g({query:[{active:!0,key:``,value:``,type:`string`}],body:[{active:!0,key:``,value:``,type:`string`}],headers:[]}),K=m({get:()=>G[H.value],set:e=>{G[H.value]=e}}),q=m(()=>({...Q(w.value.query),...Q(G.query)})),he=m(()=>({...Q(w.value.headers)})),J=m(()=>Object.keys(b.value?.payload??{}).length?{...b.value}:void 0),Y=m(()=>J.value?`POST`:`GET`),ke=m(()=>{let e=window?.location.origin;return e.charAt(e.length-1)===`/`&&(e=e.slice(0,-1)),e}),X=m(()=>{let e=new URLSearchParams(q.value).toString();e&&=`?${e}`;let t=`/_nitro/tasks/${r.task.name}${e}`,n=A.value?.app.baseURL||``;return(n===`./`||n===`.`)&&(n=``),n.endsWith(`/`)&&(n=n.slice(0,-1)),n+t}),Z=m(()=>ke.value+X.value);function Q(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 $(){V.value=!0,B.value=!0;let e=Date.now();O(`server-tasks:run`,{method:Y.value});try{I.data=await ue(Z.value,{method:`POST`,headers:he.value,query:q.value,body:J.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{}B.value=!1,I.fetchTime=Date.now()-e}let Ae=m(()=>{let e=[];return e.push({name:`Query`,slug:`query`,length:G.query.length}),e.push({name:`Body`,slug:`body`,length:G.body.length}),e});f(()=>{if(W.value===`json`&&typeof b.value==`string`)try{b.value=JSON.parse(b.value)}catch{}});let je=ce(`nuxt-devtools:server-tasks:inputs`,()=>[],{window:window.parent});oe([G,H],()=>{let e=je.value?.find(e=>e.task===r.task.name);if(e){H.value||=e.tab,e.tab!==H.value&&(e.tab=H.value);let{body:t,query:n,headers:r}=e.inputs;Object.assign(G,{body:t,query:n,headers:r})}else{let e={task:r.task.name,tab:`query`,inputs:G};je.value.push(e),H.value||=e.tab}},{immediate:!0,deep:!0,debounce:500});let Me=ne();return(t,r)=>{let f=l(`tooltip`);return c(),h(`div`,ge,[y(`div`,_e,[y(`div`,ve,[p((c(),h(`div`,null,[s(k,{class:a([`n-badge-base n-sm`,n(pe)(Y.value)]),"pointer-events-none":``,"font-mono":``,tabindex:`-1`},{default:x(()=>[T(u(Y.value),1)]),_:1},8,[`class`])])),[[f,`Method is ${Y.value} as ${Y.value===`GET`?`no`:``} json body is sent`]]),y(`div`,ye,[s(te,{"model-value":X.value,readonly:``,"flex-auto":``,"font-mono":``,p:`x5 y2`,n:`sm`},null,8,[`model-value`]),y(`div`,be,[p(s(k,{title:`Copy URL`,n:`xs blue`,icon:`carbon:copy`,border:!1,onClick:r[0]||=e=>n(Me)(Z.value,`server-task-url`)},null,512),[[f,`Copy URL`]]),p(s(k,{title:`Open in Editor`,icon:`carbon-launch`,n:`xs blue`,border:!1,onClick:r[1]||=t=>n(me)(e.task.handler)},null,512),[[f,`Open in Editor`]])])]),s(k,{"h-full":``,n:`primary solid`,onClick:$},{default:x(()=>[s(M,{icon:`carbon:send`})]),_:1})])]),y(`div`,xe,[(c(!0),h(d,null,i(Ae.value,e=>p((c(),v(k,{key:e.slug,class:a(H.value===e.slug?`text-primary n-primary`:`border-transparent shadow-none`),onClick:t=>H.value=e.slug},{default:x(()=>[s(M,{icon:n(L)[e.slug]},null,8,[`icon`]),y(`div`,Se,[T(u(e.name)+` `+u(e?.length?`(${e.length})`:``)+` `,1),y(`span`,null,u(n(w)[e.slug]?.length?`(${n(w)[e.slug].length})`:``),1)])]),_:2},1032,[`class`,`onClick`])),[[f,e.name]])),128))]),s(n(E),null,{default:x(()=>[s(P,{modelValue:K.value,"onUpdate:modelValue":r[4]||=e=>K.value=e,default:{active:!0,type:`string`},"max-h-xs":``,"of-auto":``},{default:x(()=>[n(w)[H.value]?.length?(c(),h(d,{key:0},[y(`div`,Ce,[r[6]||=y(`div`,{"w-5":``,"x-divider":``},null,-1),r[7]||=y(`div`,{"flex-none":``},` Default Inputs `,-1),s(k,{icon:`i-carbon-edit`,border:!1,onClick:r[2]||=e=>ee(`openDefaultInput`)}),r[8]||=y(`div`,{"x-divider":``},null,-1)]),s(P,{modelValue:n(w)[H.value],"onUpdate:modelValue":r[3]||=e=>n(w)[H.value]=e,disabled:``,p0:``},null,8,[`modelValue`])],64)):_(``,!0)]),_:1},8,[`modelValue`])]),_:1}),K.value?(c(),h(`div`,we,[H.value===`body`?(c(),h(d,{key:0},[y(`div`,Te,[(c(),h(d,null,i(U,e=>y(`button`,{key:e,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:a({"border-b":e!==W.value}),onClick:t=>W.value=e},[y(`div`,{class:a({op30:e!==W.value}),"font-mono":``},u(e),3)],10,Ee)),64)),r[9]||=y(`div`,{border:`b base`,"flex-auto":``},null,-1)]),W.value===`input`?(c(),v(n(D),{key:0})):W.value===`json`?(c(),v(n(S),o({key:1,modelValue:b.value,"onUpdate:modelValue":r[5]||=e=>b.value=e,class:[n(re)===`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`])):_(``,!0)],64)):(c(),v(n(D),{key:1}))])):_(``,!0),V.value?B.value?(c(),v(ae,{key:2,"z-10":``,"flex-auto":``,"backdrop-blur":``},{default:x(()=>[...r[11]||=[T(` Running... `,-1)]]),_:1})):(c(),h(d,{key:3},[y(`div`,De,[r[13]||=y(`div`,null,`Result`,-1),I.error?(c(),v(N,{key:0,n:`red`},{default:x(()=>[...r[12]||=[T(` Error `,-1)]]),_:1})):_(``,!0),s(N,{n:I.error?`orange`:`green`,textContent:u(I.statusCode)},null,8,[`n`,`textContent`]),I.contentType?(c(),h(`code`,Oe,u(I.contentType),1)):_(``,!0),r[14]||=y(`div`,{"flex-auto":``},null,-1),r[15]||=y(`div`,{op50:``},` Tasks finished in `,-1),s(N,{n:`green`},{default:x(()=>[T(u(I.fetchTime)+` ms `,1)]),_:1})]),s(de,{"flex-auto":``,"overflow-auto":``,"py-2":``,code:R.value,lang:z.value},null,8,[`code`,`lang`])],64)):(c(),v(F,{key:1},{default:x(()=>[s(k,{n:`primary`,onClick:$},{default:x(()=>[s(M,{icon:`carbon:send`}),r[10]||=T(` Run task `,-1)]),_:1})]),_:1}))])}}}),{__name:`ServerTaskDetails`}),Y={"flex-none":``,"text-left":``},ke={flex:``,"items-center":``,"text-sm":``,"font-mono":``},X=Object.assign(w({__name:`ServerTaskListItem`,props:{item:{},index:{default:0}},setup(e){let t=C(!0),o=A();return(s,l)=>(c(),h(`div`,null,[y(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"hover-bg-active":``,class:a([{"bg-active":n(o)===e.item.name}]),style:r({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:l[0]||=n=>{t.value=!t.value,o.value=e.item.name}},[y(`div`,Y,[e.item.type===`collection`?(c(),v(M,{key:0,icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":t.value?90:0,transition:``},null,8,[`transform-rotate`])):_(``,!0)]),y(`span`,ke,[e.item.type===`collection`?(c(),v(M,{key:0,title:`${e.item.tasks?.length} tasks`,icon:`carbon:folder`,mr1:``},null,8,[`title`])):(c(),v(M,{key:1,icon:`carbon:play`,ml3:``,mr1:``})),T(` `+u(e.item.name),1)])],6),l[1]||=y(`div`,{"x-divider":``},null,-1),t.value?b(s.$slots,`default`,{},()=>[(c(!0),h(d,null,i(e.item.tasks,t=>(c(),v(X,{key:t.name,item:t,index:e.index+1},null,8,[`item`,`index`]))),128))],void 0,0):_(``,!0)]))}}),{__name:`ServerTaskListItem`}),Z={flex:`~ gap1`,"text-sm":``},Q={key:0,op50:``},$={op50:``},Ae=w({__name:`server-tasks`,setup(e){let t=C(!1),r=I(),a=m(()=>Object.keys(r.value?.tasks??{}).map(e=>({name:e,...r.value.tasks[e],type:`task`}))),o=m(()=>Object.entries(r.value?.scheduledTasks??{}).map(([e,t])=>({cron:e,tasks:t}))),f=A(),{view:g,selectedTask:b,inputDefaults:S}=j(`serverTasks`),w=m(()=>{!f.value&&b.value&&(f.value=b.value.name);let e=a.value.find(e=>e.name===f.value);return f.value!==b.value?.name&&e&&(b.value=e),e}),T=C(``),te=m(()=>new re(a.value,{keys:[`key`,`description`],shouldSort:!0})),O=m(()=>T.value?te.value.search(T.value).map(e=>e.item):a.value),ne=m(()=>{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 O.value.forEach(r=>{let i,a={...r,type:`task`},o=r.name.split(`:`).concat();o.length>0&&o.at(-1)?.includes(`.`)&&o.pop(),o.forEach(e=>{i=n(e,i)}),i?t(i,a):e.push(a)}),e});function ie(){g.value=g.value===`tree`?`list`:`tree`}return(e,r)=>{let f=l(`tooltip`);return c(),h(d,null,[s(E,{"storage-key":`tab-server-tasks`},{left:x(()=>[s(E,{horizontal:``,"storage-key":`tab-server-tasks-split`},{left:x(()=>[s(D,{search:T.value,"onUpdate:search":r[1]||=e=>T.value=e,pb2:``},{actions:x(()=>[p(s(k,{"text-lg":``,icon:n(g)===`list`?`i-carbon-list`:`i-carbon-tree-view-alt`,title:`Toggle view`,border:!1,onClick:ie},null,8,[`icon`]),[[f,`Toggle View`]]),p(s(k,{"text-lg":``,icon:`i-carbon-cics-sit-overrides`,title:`Default Inputs`,border:!1,onClick:r[0]||=e=>t.value=!t.value},null,512),[[f,`Default Inputs`]])]),default:x(()=>[y(`div`,Z,[T.value?(c(),h(`span`,Q,u(O.value.length)+` matched · `,1)):_(``,!0),y(`span`,$,u(a.value?.length)+` tasks in total`,1)])]),_:1},8,[`search`]),(c(!0),h(d,null,i(n(g)===`tree`?ne.value:O.value,e=>(c(),v(X,{key:e.name,item:e},null,8,[`item`]))),128))]),right:x(()=>[r[6]||=y(`div`,{px4:``,py2:``,border:`b base`},` Cron groups `,-1),y(`div`,null,[y(`ul`,null,[(c(!0),h(d,null,i(o.value,e=>(c(),h(`li`,{key:e.cron},[s(he,{collection:e},null,8,[`collection`])]))),128))])])]),_:1})]),right:x(()=>[(c(),v(ee,{max:10},[w.value?(c(),v(J,{key:w.value.name,task:w.value,onOpenDefaultInput:r[2]||=e=>t.value=!0},null,8,[`task`])):_(``,!0)],1024)),w.value?_(``,!0):(c(),v(F,{key:0},{default:x(()=>[s(R,{px6:``,py2:``},{default:x(()=>[...r[7]||=[y(`span`,{op75:``},`Select a task to start`,-1)]]),_:1})]),_:1}))]),_:1}),s(z,{modelValue:t.value,"onUpdate:modelValue":r[4]||=e=>t.value=e,"auto-close":``,"max-w-xl":``,"min-w-xl":``,onClose:r[5]||=e=>t.value=!1},{default:x(()=>[y(`div`,null,[r[8]||=y(`div`,{p4:``,border:`b base`},[y(`span`,{"text-lg":``},`Default Inputs`),y(`br`),y(`span`,{"text-white":``,op50:``},`Merged as default for every task in DevTools`)],-1),s(B,{text:`Query ${n(S).query?.length?`(${n(S).query.length})`:``}`,padding:!1,icon:n(L).query},{default:x(()=>[s(P,{modelValue:n(S).query,"onUpdate:modelValue":r[3]||=e=>n(S).query=e,py0:``,default:{active:!0,type:`string`}},null,8,[`modelValue`])]),_:1},8,[`text`,`icon`])])]),_:1},8,[`modelValue`])],64)}}});export{Ae as default};
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"./_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"./_nuxt/png4l3zs.js"}}</script><link rel="stylesheet" href="./_nuxt/entry.css-mj3ej5wd.css" crossorigin><link rel="stylesheet" href="./_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="./_nuxt/vendor/unocss.css-ekbl8926.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="./_nuxt/png4l3zs.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/nuxt-gb3q7l3n.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/vendor/json-editor-vue-bhnw2s6o.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/rolldown-runtime-n50dhdz2.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/ready-fiobmge1.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/nuxt-link-ll3p03dp.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-nqw16oao.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/utils-nybefnvm.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/nicon-okkaubho.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/nanoid-gkt4ek20.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/vendor/shiki-oeaa7q53.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/vendor/unocss-hmou8tsb.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/state-tabs-f5vlcxi0.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/vue-i18n-kvdmy6hs.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/_plugin-vue_export-helper-gb7htfhx.js"><link rel="modulepreload" as="script" crossorigin href="./_nuxt/ncard-ia5sid5c.js"><script type="module" src="./_nuxt/png4l3zs.js" crossorigin></script><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/default-l3r4bs95.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/full-g7ah0jz6.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/none-mzaf6whq.js"><link rel="prefetch" as="style" crossorigin data-href="./_nuxt/ncode-block.css-ivoxtfjk.css"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/data-schema-drawer-klayu14k.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/ndrawer-d6y9yvar.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/nselect-ng3h81mb.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/ndropdown-ke5itmrv.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/ncode-block-fvcvsi1k.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/client-jo8mulc1.js"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/vendor/quicktype-core-ndy9k6ka.js"><link rel="prefetch" as="style" crossorigin data-href="./_nuxt/error-404.css-m3kxv2dp.css"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/error-404-ksifx9mc.js"><link rel="prefetch" as="style" crossorigin data-href="./_nuxt/error-500.css-o5v023vy.css"><link rel="prefetch" as="script" crossorigin data-href="./_nuxt/error-500-klyboy4f.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:location.pathname.replace(/[^/]*$/,""),buildId:"2af24cb7-7d9a-4ed4-aefe-4c7184426311",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1796111071593,false]</script></body></html>
|
package/dist/manifest.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"../../../node_modules/.pnpm/nuxt-nightly@5.0.0-2611010234-c709ec8_@oxc-project+types@0.155.0_@parcel+watcher@2.6.0__8d539f2f10dede26dda1112b470663d7/node_modules/nuxt-nightly/dist/app/entry.js": {
|
|
41
|
-
"file": "_nuxt/
|
|
41
|
+
"file": "_nuxt/png4l3zs.js",
|
|
42
42
|
"name": "entry",
|
|
43
43
|
"src": "../../../node_modules/.pnpm/nuxt-nightly@5.0.0-2611010234-c709ec8_@oxc-project+types@0.155.0_@parcel+watcher@2.6.0__8d539f2f10dede26dda1112b470663d7/node_modules/nuxt-nightly/dist/app/entry.js",
|
|
44
44
|
"isEntry": true,
|
|
@@ -430,8 +430,8 @@
|
|
|
430
430
|
"file": "_nuxt/rolldown-runtime-n50dhdz2.js",
|
|
431
431
|
"name": "rolldown-runtime"
|
|
432
432
|
},
|
|
433
|
-
"_server-route-inputs-
|
|
434
|
-
"file": "_nuxt/server-route-inputs-
|
|
433
|
+
"_server-route-inputs-om5ppgu7.js": {
|
|
434
|
+
"file": "_nuxt/server-route-inputs-om5ppgu7.js",
|
|
435
435
|
"name": "ServerRouteInputs",
|
|
436
436
|
"imports": [
|
|
437
437
|
"_json-editor-vue-bhnw2s6o.js",
|
|
@@ -848,7 +848,7 @@
|
|
|
848
848
|
]
|
|
849
849
|
},
|
|
850
850
|
"pages/modules/overview.vue": {
|
|
851
|
-
"file": "_nuxt/overview-
|
|
851
|
+
"file": "_nuxt/overview-gymgnns0.js",
|
|
852
852
|
"name": "overview",
|
|
853
853
|
"src": "pages/modules/overview.vue",
|
|
854
854
|
"isDynamicEntry": true,
|
|
@@ -940,7 +940,7 @@
|
|
|
940
940
|
]
|
|
941
941
|
},
|
|
942
942
|
"pages/modules/server-routes.vue": {
|
|
943
|
-
"file": "_nuxt/server-routes-
|
|
943
|
+
"file": "_nuxt/server-routes-f1whskno.js",
|
|
944
944
|
"name": "server-routes",
|
|
945
945
|
"src": "pages/modules/server-routes.vue",
|
|
946
946
|
"isDynamicEntry": true,
|
|
@@ -955,7 +955,7 @@
|
|
|
955
955
|
"_utils-nybefnvm.js",
|
|
956
956
|
"_virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-nqw16oao.js",
|
|
957
957
|
"_nselect-ng3h81mb.js",
|
|
958
|
-
"_server-route-inputs-
|
|
958
|
+
"_server-route-inputs-om5ppgu7.js",
|
|
959
959
|
"_ncode-block-fvcvsi1k.js",
|
|
960
960
|
"_npanel-grids-iboujc96.js",
|
|
961
961
|
"_data-schema-button-b3iqcfhl.js",
|
|
@@ -967,7 +967,7 @@
|
|
|
967
967
|
]
|
|
968
968
|
},
|
|
969
969
|
"pages/modules/server-tasks.vue": {
|
|
970
|
-
"file": "_nuxt/server-tasks-
|
|
970
|
+
"file": "_nuxt/server-tasks-ozo296p6.js",
|
|
971
971
|
"name": "server-tasks",
|
|
972
972
|
"src": "pages/modules/server-tasks.vue",
|
|
973
973
|
"isDynamicEntry": true,
|
|
@@ -981,7 +981,7 @@
|
|
|
981
981
|
"_nicon-okkaubho.js",
|
|
982
982
|
"_nbadge-iiw1hs8y.js",
|
|
983
983
|
"_virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-nqw16oao.js",
|
|
984
|
-
"_server-route-inputs-
|
|
984
|
+
"_server-route-inputs-om5ppgu7.js",
|
|
985
985
|
"_npanel-grids-iboujc96.js",
|
|
986
986
|
"_ncode-block-fvcvsi1k.js",
|
|
987
987
|
"_utils-nybefnvm.js",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-assets-nightly",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.2.2-
|
|
4
|
+
"version": "4.2.2-29935184.f65115a",
|
|
5
5
|
"description": "Pre-built client UI assets for Nuxt DevTools, resolved on demand.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://nuxt.com/modules/devtools",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"9ad5009a-ec69-402f-b531-dd18f134e86d","timestamp":1796001153062,"prerendered":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
//# allFunctionsCalledOnLoad
|
|
2
|
-
import{Dt as e,K as t,Kt as n,S as r,U as i,Yt as a,a as o,f as s,g as c,h as l,it as u,m as d,p as f,q as p,st as m,w as h,x as g}from"./vendor/json-editor-vue-bhnw2s6o.js";import{t as _}from"./ncheckbox-fen1rybz.js";import{g as v,m as y}from"#entry";import{t as b}from"./nselect-ng3h81mb.js";import{F as x,t as S}from"./nicon-okkaubho.js";var C={p4:``,flex:`~ col gap-4`},w={key:1,ml2:``,flex:``},T=[`value`],E={key:0,flex:``,"gap-4":``},D=Object.assign(h({__name:`ServerRouteInputs`,props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(h,{emit:D}){let O=h,k=D,A=/^\d{4}-\d{2}-\d{2}$/,j=/^\d{2}:\d{2}$/,M=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,N=x(O,`modelValue`,k,{passive:!0}),P=s(()=>[...O.keys,`active`,`key`,`value`,`type`]),F=s(()=>{let e={};for(let t of P.value)e[t]=O.default[t]||``;return e}),I=[`string`,`number`,`boolean`,`file`,`date`,`time`,`datetime-local`];function L(e,t){let n=t.target;if(n.files&&n.files[0]){let t=n.files[0],r=new FileReader;r.readAsDataURL(t),r.onload=()=>{N.value[e].value=r.result}}}return u(()=>N,e=>{e.value.forEach(e=>{if(e.type===`number`&&typeof e.value!=`number`){let t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type===`boolean`&&typeof e.value!=`boolean`?e.value=!0:e.type===`file`&&typeof e.value!=`object`?e.value=``:e.type===`date`&&typeof e.value==`string`&&!A.test(e.value)?e.value=new Date().toISOString().slice(0,10):e.type===`time`&&typeof e.value==`string`&&!j.test(e.value)?e.value=new Date().toISOString().slice(11,16):e.type===`datetime-local`&&typeof e.value==`string`&&!M.test(e.value)?e.value=new Date().toISOString().slice(0,16):e.type===`string`&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:`sync`}),(s,u)=>(i(),c(`div`,C,[(i(!0),c(o,null,t(e(N),(u,g)=>(i(),c(`div`,{key:g,flex:`~ gap-2`,"justify-around":``},[p(s.$slots,`input`,{item:u}),(i(!0),c(o,null,t(P.value,e=>(i(),c(o,{key:e},[u.type!==null&&e===`active`?(i(),d(_,{key:0,modelValue:u[e],"onUpdate:modelValue":t=>u[e]=t,n:`sm primary`,disabled:h.disabled},null,8,[`modelValue`,`onUpdate:modelValue`,`disabled`])):l(``,!0),u.type!==null&&e===`key`?(i(),d(v,{key:1,modelValue:u[e],"onUpdate:modelValue":t=>u[e]=t,placeholder:e,"flex-1":``,"font-mono":``,n:`sm primary`,disabled:h.disabled,class:n(h.disabled?`op50`:``)},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`,`disabled`,`class`])):e===`value`?(i(),c(o,{key:2},[u.type===`file`?(i(),d(v,{key:0,type:`file`,disabled:h.disabled,class:n(h.disabled?`op75`:``),onChange:e=>L(g,e)},null,8,[`disabled`,`class`,`onChange`])):u.type===`boolean`?(i(),c(`div`,w,[r(_,{modelValue:u.value,"onUpdate:modelValue":e=>u.value=e,placeholder:`Value`,n:`green lg`,disabled:h.disabled},null,8,[`modelValue`,`onUpdate:modelValue`,`disabled`])])):(i(),d(v,{key:2,modelValue:u.value,"onUpdate:modelValue":e=>u.value=e,type:u.type,placeholder:`Value`,"flex-1":``,"font-mono":``,n:`sm primary`,disabled:h.disabled,class:n(h.disabled?`op75`:``)},null,8,[`modelValue`,`onUpdate:modelValue`,`type`,`disabled`,`class`]))],64)):e===`type`?(i(),d(b,{key:3,modelValue:u.type,"onUpdate:modelValue":e=>u.type=e,n:`sm green`,class:n(h.disabled?`op75`:``),disabled:h.disabled},{default:m(()=>[(i(),c(o,null,t(I,e=>f(`option`,{key:e,value:e},a(e),9,T)),64))]),_:1},8,[`modelValue`,`onUpdate:modelValue`,`class`,`disabled`])):l(``,!0)],64))),128)),p(s.$slots,`input-actions`,{},()=>[r(y,{n:`red`,disabled:h.disabled,class:n(h.disabled?`op0!`:``),onClick:t=>e(N).splice(g,1)},{default:m(()=>[r(S,{icon:`carbon:trash-can`})]),_:1},8,[`disabled`,`class`,`onClick`])])]))),128)),h.disabled?l(``,!0):(i(),c(`div`,E,[p(s.$slots,`actions`,{params:e(N)},()=>[r(y,{icon:`carbon-add`,n:`sm primary`,my1:``,"px-3":``,onClick:u[0]||=t=>e(N).push({...F.value})},{default:m(()=>[...u[2]||=[g(` Add `,-1)]]),_:1}),u[4]||=f(`div`,{"flex-auto":``},null,-1),e(N).length?(i(),d(y,{key:0,icon:`carbon-trash-can`,n:`sm red`,my1:``,"px-3":``,onClick:u[1]||=t=>e(N).splice(0,e(N).length)},{default:m(()=>[...u[3]||=[g(` Remove All `,-1)]]),_:1})):l(``,!0)])])),p(s.$slots,`default`)]))}}),{__name:`ServerRouteInputs`});export{D as t};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//# allFunctionsCalledOnLoad
|
|
2
|
-
import"./pages-oqx296ta.js";import{Dt as e,Jt as t,K as n,Kt as r,N as i,S as a,U as o,Y as s,Yt as c,a as l,at as u,ct as d,dt as f,f as p,g as m,gt as h,h as g,ht as _,it as v,lt as y,m as b,o as ee,p as x,q as S,st as C,t as te,vt as w,w as T,x as E,xt as D}from"./vendor/json-editor-vue-bhnw2s6o.js";import{t as O}from"./nsplit-pane-kpwlq5p2.js";import{t as k}from"./nnavbar-ncvicu3x.js";import{g as A,i as ne,m as j,n as re,o as M,p as N,r as ie,v as ae}from"#entry";import{V as oe,i as se,j as ce,r as le,s as ue,t as P,x as de}from"./nicon-okkaubho.js";import{t as fe}from"./nbadge-iiw1hs8y.js";import{E as pe,S as me,a as F}from"./utils-nybefnvm.js";import{t as he}from"./virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-nqw16oao.js";import{t as ge}from"./nselect-ng3h81mb.js";import{t as _e}from"./server-route-inputs-lilfxk4h.js";import{t as ve}from"./ncode-block-fvcvsi1k.js";import{t as ye}from"./npanel-grids-iboujc96.js";import{t as be}from"./data-schema-button-b3iqcfhl.js";import{i as xe}from"./nuxt-gb3q7l3n.js";import{n as Se,t as Ce}from"./constants-eqqt9i2x.js";import{t as we}from"./ncard-ia5sid5c.js";import{t as Te}from"./ndrawer-d6y9yvar.js";import{t as I}from"./nsection-block-jg1eef62.js";var L=Object.assign(T({__name:`ServerRouteListItem`,props:{item:{},index:{default:0}},setup(i){let a=w(!0),s=M();return(u,d)=>(o(),m(`div`,null,[x(`button`,{flex:`~ gap-2`,"w-full":``,"items-start":``,"items-center":``,px2:``,py1:``,"hover-bg-active":``,class:r([{"bg-active":e(s)===i.item.filepath}]),style:t({paddingLeft:`calc(0.5rem + ${i.index*1.5}em)`}),onClick:d[0]||=e=>{a.value=!a.value,s.value=i.item.filepath}},[x(`div`,{class:r({"w-12":!i.item.routes}),"flex-none":``,"text-left":``},[i.item.type===`collection`?(o(),b(P,{key:0,icon:`carbon:chevron-right`,"mb0.5":``,"transform-rotate":a.value?90:0,transition:``},null,8,[`transform-rotate`])):(o(),b(fe,{key:1,class:r(e(F)(i.item.method||`*`)),textContent:c((i.item.method||`*`).toUpperCase())},null,8,[`class`,`textContent`]))],2),x(`span`,{class:r({"flex items-center":i.item.routes}),"text-sm":``,"font-mono":``},[i.item.type===`collection`?(o(),b(P,{key:0,title:`${i.item.routes?.length} routes`,icon:`carbon:folder`,mr1:``},null,8,[`title`])):g(``,!0),E(` `+c(i.item.route),1)],2)],6),d[1]||=x(`div`,{"x-divider":``},null,-1),a.value?S(u.$slots,`default`,{},()=>[(o(!0),m(l,null,n(i.item.routes,e=>(o(),b(L,{key:e.filepath,item:e,index:i.index+1},null,8,[`item`,`index`]))),128))],void 0,0):g(``,!0)]))}}),{__name:`ServerRouteListItem`}),R={key:0,relative:``,"n-code-block":``},z={flex:`~ wrap`,"w-full":``},B=[`onClick`],V={flex:`~ gap-2`,px3:``,pb3:``,n:`sm primary`},Ee=Object.assign(T({__name:`CodeSnippets`,props:{codeSnippets:{},eventType:{}},setup(t){let i=t,s=D(i.codeSnippets[0]),d=re(),f=p(()=>s.value?.lang||`text`);return u(()=>{i.codeSnippets.includes(s.value)||(s.value=i.codeSnippets[0])}),(i,u)=>t.codeSnippets.length?(o(),m(`div`,R,[x(`div`,z,[(o(!0),m(l,null,n(t.codeSnippets,(e,t)=>(o(),m(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:r(e===s.value?``:`border-b`),onClick:t=>s.value=e},[x(`div`,{class:r(e===s.value?``:`op30`),"font-mono":``},c(e.name),3)],10,B))),128)),u[1]||=x(`div`,{border:`b base`,"flex-auto":``},null,-1)]),s.value?(o(),m(l,{key:0},[a(ve,{code:s.value.code,lang:f.value,lines:!1,"w-full":``,"of-auto":``,p3:``},null,8,[`code`,`lang`]),x(`div`,V,[a(j,{icon:`carbon-copy`,onClick:u[0]||=n=>e(d)(s.value.code,t.eventType||`code-snippet-${s.value.name}`)},{default:C(()=>[...u[2]||=[E(` Copy `,-1)]]),_:1}),s.value?.docs?(o(),b(j,{key:0,to:s.value.docs,target:`_blank`,icon:`carbon-catalog`},{default:C(()=>[...u[3]||=[E(` Docs `,-1)]]),_:1},8,[`to`])):g(``,!0)])],64)):g(``,!0)])):g(``,!0)}}),{__name:`CodeSnippets`});function H(e){if(typeof e!=`object`)return e;var t,n,r=Object.prototype.toString.call(e);if(r===`[object Object]`){if(e.constructor!==Object&&typeof e.constructor==`function`)for(t in n=new e.constructor,e)e.hasOwnProperty(t)&&n[t]!==e[t]&&(n[t]=H(e[t]));else for(t in n={},e)t===`__proto__`?Object.defineProperty(n,t,{value:H(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=H(e[t]);return n}if(r===`[object Array]`){for(t=e.length,n=Array(t);t--;)n[t]=H(e[t]);return n}return r===`[object Set]`?(n=new Set,e.forEach(function(e){n.add(H(e))}),n):r===`[object Map]`?(n=new Map,e.forEach(function(e,t){n.set(H(t),H(e))}),n):r===`[object Date]`?new Date(+e):r===`[object RegExp]`?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):r===`[object DataView]`?new e.constructor(H(e.buffer)):r===`[object ArrayBuffer]`?e.slice(0):r.slice(-6)===`Array]`?new e.constructor(e):e}var U=3456e4;function De(e,t,n){let r=e.indexOf(`;`,t);return r===-1?n:r}function Oe(e,t,n){let r=e.indexOf(`=`,t);return r<n?r:-1}function ke(e,t,n){if(t===n)return``;let r=t,i=n;do{let t=e.charCodeAt(r);if(t!==32&&t!==9)break}while(++r<i);for(;i>r;){let t=e.charCodeAt(i-1);if(t!==32&&t!==9)break;i--}return e.slice(r,i)}var W=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function Ae(e,t){let n=new W,r=e.length;if(r<2)return n;let i=t?.decode||G,a=t?.allowMultiple||!1,o=0;do{let s=Oe(e,o,r);if(s===-1)break;let c=De(e,o,r);if(s>c){o=e.lastIndexOf(`;`,s-1)+1;continue}let l=ke(e,o,s);if(t?.filter&&!t.filter(l)){o=c+1;continue}let u=i(ke(e,s+1,c));if(a){let e=n[l];e===void 0?n[l]=u:Array.isArray(e)?e.push(u):n[l]=[e,u]}else n[l]===void 0&&(n[l]=u);o=c+1}while(o<r);return n}function G(e){if(!e.includes(`%`))return e;try{return decodeURIComponent(e)}catch{return e}}var je=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Me=/^[\u0021-\u003A\u003C-\u007E]*$/,Ne=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Pe=/^[\u0020-\u003A\u003C-\u007E]*$/,Fe=Object.prototype.toString;function K(e,t,n){let r=typeof e==`object`&&!!e,i=r?t:n,a=i?.stringify||JSON.stringify,o=r?e:{...n,name:e,value:t==null?``:typeof t==`string`?t:a(t)},s=i?.encode||encodeURIComponent;if(!je.test(o.name))throw TypeError(`argument name is invalid: ${o.name}`);let c=o.value?s(o.value):``;if(!Me.test(c))throw TypeError(`argument val is invalid: ${o.value}`);if(!o.secure){if(o.partitioned)throw TypeError(`Partitioned cookies must have the Secure attribute`);if(o.sameSite&&String(o.sameSite).toLowerCase()===`none`)throw TypeError(`SameSite=None cookies must have the Secure attribute`);if(o.name.length>9&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95){let e=o.name.toLowerCase();if(e.startsWith(`__secure-`)||e.startsWith(`__host-`))throw TypeError(`${o.name} cookies must have the Secure attribute`)}}if(o.name.length>7&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95&&o.name.toLowerCase().startsWith(`__host-`)){if(o.path!==`/`)throw TypeError(`__Host- cookies must have Path=/`);if(o.domain)throw TypeError(`__Host- cookies must not have a Domain attribute`)}let l=o.name+`=`+c;if(o.maxAge!==void 0){if(!Number.isInteger(o.maxAge))throw TypeError(`option maxAge is invalid: ${o.maxAge}`);l+=`; Max-Age=`+Math.max(0,Math.min(o.maxAge,U))}if(o.domain){if(!Ne.test(o.domain))throw TypeError(`option domain is invalid: ${o.domain}`);l+=`; Domain=`+o.domain}if(o.path){if(!Pe.test(o.path))throw TypeError(`option path is invalid: ${o.path}`);l+=`; Path=`+o.path}if(o.expires){if(!Ie(o.expires)||!Number.isFinite(o.expires.valueOf()))throw TypeError(`option expires is invalid: ${o.expires}`);l+=`; Expires=`+o.expires.toUTCString()}if(o.httpOnly&&(l+=`; HttpOnly`),o.secure&&(l+=`; Secure`),o.partitioned&&(l+=`; Partitioned`),o.priority)switch(typeof o.priority==`string`?o.priority.toLowerCase():void 0){case`low`:l+=`; Priority=Low`;break;case`medium`:l+=`; Priority=Medium`;break;case`high`:l+=`; Priority=High`;break;default:throw TypeError(`option priority is invalid: ${o.priority}`)}if(o.sameSite)switch(typeof o.sameSite==`string`?o.sameSite.toLowerCase():o.sameSite){case!0:case`strict`:l+=`; SameSite=Strict`;break;case`lax`:l+=`; SameSite=Lax`;break;case`none`:l+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid: ${o.sameSite}`)}return l}function Ie(e){return Fe.call(e)===`[object Date]`}function q(e){return typeof e==`string`?`'${e}'`:new X().serialize(e)}var Le=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,J=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Le.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Y(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&J[n]?J[n]:n+128,s=a<128&&J[a]?J[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var X=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Y(e,t):n===`number`&&r===`number`?e-t:Y(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(Y),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})();function Re(e,t){return e===t||q(e)===q(t)}function ze(e){if(e!==`undefined`)try{let t=JSON.parse(e);return typeof t==`number`&&String(t)!==e?e:t}catch{return e}}function Z(e){return typeof e==`function`?e():e}var Be={path:`/`,watch:!0,decode:e=>e&&ze(decodeURIComponent(e)),encode:e=>{if(typeof e!=`string`||e===`undefined`)return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!=`string`)return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},Q=globalThis.cookieStore;function Ve(e,t){let n={...Be,...t};n.filter??=t=>t===e;let r=Ue(),i=n.filter(e)?r[e]:void 0,a={[e]:i===void 0?void 0:n.decode(i)},o;if(n.maxAge!==void 0)o=n.maxAge*1e3;else if(n.expires){let e=Z(n.expires);e&&(o=e.getTime()-Date.now())}let s=()=>{if(n.maxAge!==void 0)return n.maxAge*1e3;if(!n.expires)return;let e=Z(n.expires);return e?e.getTime()-Date.now():void 0},c=o!==void 0&&o<=0,l=a[e]===void 0||a[e]===null,u=!n.readonly&&(c||l)&&!(i===void 0&&l&&n.default===void 0),d=H(c?void 0:a[e]??n.default?.()),p=typeof n.expires==`function`||o&&!c?$e(d,o,s,n.watch&&n.watch!==`shallow`):w(d);{let t=!1,r=null;try{!Q&&typeof BroadcastChannel<`u`&&(r=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}let i=(t=!1)=>{(t||!n.readonly&&!Re(p.value,a[e]))&&(Ze(e,p.value===null||p.value===void 0?void 0:n.encode(p.value),n),a[e]=H(p.value),r?.postMessage({value:n.encode(p.value)}))},o,s=r=>{r.refresh&&He();let i=r.refresh?n.filter(e)?Ue()[e]:void 0:r.value,o=i===void 0&&r.refresh?void 0:n.decode(i);p.value=o,a[e]=H(o),t=!0},c=!!f();if(c){let e=xe(),t=e&&(e._cookieWriters||=new Set),n=()=>i();t?.add(n),_(()=>{t?.delete(n),o?.pause(),i(),r?.close()})}if(Q){let t=t=>{let n=t.changed.find(t=>t.name===e),r=t.deleted.find(t=>t.name===e);n&&s({value:n.value}),r&&s({value:null})};Q.addEventListener(`change`,t),c&&_(()=>Q.removeEventListener(`change`,t))}else r&&(r.onmessage=({data:e})=>s(e));n.watch&&!n.readonly&&(o=v(p,()=>{let e=n.refresh&&!t;t=!1,i(e)},{deep:n.watch!==`shallow`})),u&&i(u)}return p}var $;function He(){$=void 0}function Ue(){return $||($=Ae(document.cookie,{decode:Je}),queueMicrotask(He)),$||{}}function We(e){return e.domain||e.httpOnly||e.secure&&location.protocol!==`https:`||e.sameSite===`none`&&!e.secure?!1:e.path===void 0||Ge(e.path)}function Ge(e){let{pathname:t}=location;return t===e?!0:t.startsWith(e)?e.endsWith(`/`)||t[e.length]===`/`:!1}function Ke(e){if(e.maxAge!==void 0)return e.maxAge<=0;let t=Z(e.expires);return t!==void 0&&t.getTime()<=Date.now()}function qe(e,t,n){if($){if(!We(n))return He();t===void 0||Ke(n)?delete $[e]:$[e]=t}}var Je=e=>e;function Ye(e){let{encode:t,decode:n,expires:r,...i}=e;return{...i,expires:Z(r),encode:Je}}function Xe(e,t,n={}){let r=Ye(n);return t===void 0?K(e,``,{...r,maxAge:-1}):K(e,t,r)}function Ze(e,t,n={}){document.cookie=Xe(e,t,n),qe(e,t,n)}var Qe=2147483647;function $e(e,t,n,r){let i,a,o=0,s=t,c=r?w(e):{value:e};return f()&&_(()=>{a?.(),clearTimeout(i)}),y((e,t)=>{r&&(a=v(c,t));function l(){let e=s;if(e===void 0)return;let n=e-o,r=n<Qe?n:Qe;i=setTimeout(()=>{if(o+=r,o<e)return l();c.value=void 0,t()},r)}function u(){o=0,s=n(),clearTimeout(i),l()}return{get(){return e(),c.value},set(e){u(),c.value=e,t()}}})}var et={"h-full":``,"w-full":``,flex:`~ col`},tt={flex:`~ col gap-2`,"n-navbar-glass":``,"flex-none":``,p4:``},nt={flex:`~ gap2 items-center`},rt={relative:``,"w-full":``},it={absolute:``,"right-2":``,"top-1.5":``,flex:`~ gap-1`},at={flex:`~ gap2 wrap`,"w-full":``,"items-center":``,px4:``,pb2:``,"text-center":``,"text-sm":``,border:`b base`},ot={class:`hidden md:block`},st={key:0,border:`b base`,"items-center":``,px4:``,py2:``,grid:`~ cols-[max-content_1fr] gap-2`},ct={"text-right":``,"font-mono":``},lt={key:1,border:`b base`,p4:``,flex:`~ col gap-4`,"font-mono":``},ut={flex:`~ gap-4`},dt={flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},ft={key:2},pt={key:3,border:`b base`,relative:``,"n-code-block":``},mt={flex:`~ wrap`,"w-full":``},ht=[`onClick`],gt={border:`b base`,flex:`~ gap2`,"items-center":``,px4:``,py2:``},_t={key:1,"text-xs":``,op50:``},vt={key:0,"flex-auto":``,"overflow-auto":``},yt={border:`~ base`,"h-full":``,"w-full":``,rounded:``},bt=[`data`],xt={key:2,"flex-auto":``,"overflow-auto":``,p4:``},St={border:`~ base`,rounded:``},Ct=[`src`],wt={key:1,controls:``,rounded:``},Tt=[`src`],Et=Object.assign(T({__name:`ServerRouteDetails`,props:{route:{}},emits:[`openDefaultInput`],setup(t,{emit:f}){let _=t,v=f,[y,ee]=de(),S=se(),T=me(),D=ue(),O=h({contentType:`text/plain`,data:``,statusCode:200,error:void 0,fetchTime:0}),k=p(()=>O.contentType.includes(`application/json`)?`json`:O.contentType.includes(`text/html`)?`html`:O.contentType.includes(`text/css`)?`css`:O.contentType.includes(`text/javascript`)?`javascript`:O.contentType.includes(`image`)||O.contentType.includes(`video`)?`media`:O.contentType.includes(`text/xml`)||O.contentType.includes(`application/xml`)?`xml`:O.contentType.includes(`application/pdf`)?`pdf`:`text`),M=p(()=>{if(k.value===`json`)return JSON.stringify(O.data,null,2);if(k.value===`media`||k.value===`pdf`){let e=new Blob([O.data],{type:O.contentType});return URL.createObjectURL(e)}return O.data}),N=w(!1),pe=w(!1),xe=ie(),we=/((?:\*\*)?:\w+)/g,Te=p(()=>_.route.route?.split(we)),I=p(()=>Te.value?.filter(e=>e.startsWith(`:`)||e.startsWith(`**:`))||[]),L=w(_.route.method||`GET`),R=w({}),z=h({query:[{active:!0,key:``,value:``,type:`string`}],body:[{active:!0,key:``,value:``,type:`string`}],headers:[{active:!0,key:`Content-Type`,value:`application/json`,type:`string`}]}),B=w({}),{inputDefaults:V,sendFrom:H}=le(`serverRoutes`),U=p(()=>D?.value?.app?.$fetch?H.value:`devtools`),De=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`],Oe=[`PATCH`,`POST`,`PUT`,`DELETE`],ke=p(()=>Oe.includes(L.value.toUpperCase())),W=w(),Ae=[`input`,`json`],G=w(Ae[0]),je=p({get:()=>z[W.value],set:e=>{z[W.value]=e}}),Me=p(()=>({...q(V.value.query),...q(z.query)})),Ne=p(()=>({...q(V.value.headers),...q(z.headers)})),Pe=p(()=>ke.value?G.value===`json`?{...q(V.value.body),...B.value}:{...q(V.value.body),...q(z.body)}:void 0),Fe=p(()=>{let e=window?.location.origin;return e.charAt(e.length-1)===`/`&&(e=e.slice(0,-1)),e}),K=p(()=>{let e=new URLSearchParams(Me.value).toString();e&&=`?${e}`;let t=(Te.value?.map(e=>(e.startsWith(`:`)||e.startsWith(`**:`))&&R.value[e]||e).join(``)||``)+e,n=T.value?.app.baseURL||``;return(n===`./`||n===`.`)&&(n=``),n.endsWith(`/`)&&(n=n.slice(0,-1)),n+t}),Ie=p(()=>Fe.value+K.value);function q(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 Le(){pe.value=!0,N.value=!0;let e=Date.now(),t=U.value===`app`?D.value.app.$fetch:he;ne(`server-routes:fetch`,{method:L.value,sendFrom:U.value});try{O.data=await t(Ie.value,{method:L.value.toUpperCase(),headers:Ne.value,query:Me.value,body:Pe.value,onResponse({response:e}){O.contentType=(e.headers.get(`content-type`)||``).toString().toLowerCase().trim(),O.statusCode=e.status,O.error=void 0},onResponseError(e){O.error=e.response._data,O.data=e.response._data}})}catch{}N.value=!1,O.fetchTime=Date.now()-e}let J=p(()=>{let e=[],t=[],n=Object.entries(Ne.value).filter(([e,t])=>e&&t&&(e!==`Content-Type`||t!==`application/json`)).map(([e,t])=>` '${e}': '${t}'`).join(`,
|
|
3
|
-
`);L.value.toUpperCase()!==`GET`&&t.push(`method: '${L.value.toUpperCase()}'`),n&&t.push(`headers: {\n${n}\n}`),Pe.value&&t.push(`body: ${JSON.stringify(Pe.value,null,2)}`);let r=t.length?`, {
|
|
4
|
-
${t.join(`,
|
|
5
|
-
`).split(`
|
|
6
|
-
`).map(e=>` ${e}`).join(`
|
|
7
|
-
`)}
|
|
8
|
-
}`:``;return e.push({name:`useFetch`,lang:`javascript`,docs:Ce.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${K.value}'${r})`}),e.push({name:`$fetch`,lang:`javascript`,docs:Ce.nuxt.$fetch,code:`await $fetch('${K.value}'${r})`}),e}),Y=w(ze()),X=h({key:``,value:``}),Re=p(()=>{let e=[];return I.value.length&&e.push({name:`Params`,slug:`params`,length:I.value.length}),e.push({name:`Query`,slug:`query`,length:z.query.length}),ke.value&&e.push({name:`Body`,slug:`body`,length:z.body.length}),e.push({name:`Headers`,slug:`headers`,length:z.headers.length}),e.push({name:`Cookies`,slug:`cookies`,length:Y.value.length}),e.push({name:`Snippets`,slug:`snippet`}),e});function ze(){return document.cookie.split(`; `).map(e=>{let[t,n]=e.split(`=`);return{key:t,value:n}}).filter(e=>e.key)}function Z(e,t){if(!e)return;let n=Y.value.find(t=>t.key===e),r=Ve(e);n===void 0?(Y.value.push({key:e,value:t}),X.key=``,X.value=``):t===void 0&&(Y.value=Y.value.filter(t=>t.key!==e)),r.value=t}u(()=>{G.value===`json`&&typeof B.value==`string`&&(B.value=JSON.parse(B.value))});let Be=ce(`nuxt-devtools:server-routes:inputs`,()=>[],{window:window.parent});oe([z,W],()=>{let e=Be.value?.find(e=>e.path===_.route.filepath);if(e){W.value||=e.tab,e.tab!==W.value&&(e.tab=W.value);let{body:t,query:n,headers:r,params:i}=e.inputs;Object.assign(z,{body:t,query:n,headers:r}),R.value=i}else{let e={path:_.route.filepath,tab:I.value.length?`params`:`query`,inputs:{...z,...I.value.length?{params:R.value}:{}}};Be.value.push(e),W.value||=e.tab}},{immediate:!0,deep:!0,debounce:500});function Q(){Be.value=[],z.body=[],z.query=[],z.headers=[],R.value={},W.value=I.value.length?`params`:`query`}let $=re();return(u,f)=>{let p=s(`tooltip`);return o(),m(`div`,et,[x(`div`,tt,[x(`div`,nt,[t.route.method?(o(),b(j,{key:0,class:r([`n-badge-base n-sm`,e(F)(L.value)]),"pointer-events-none":``,"font-mono":``,tabindex:`-1`},{default:C(()=>[E(c(L.value.toUpperCase()),1)]),_:1},8,[`class`])):(o(),b(ge,{key:1,modelValue:L.value,"onUpdate:modelValue":f[0]||=e=>L.value=e,class:r([`n-badge-base n-sm`,e(F)(L.value)])},{default:C(()=>[(o(),m(l,null,n(De,t=>x(`option`,{key:t,class:r(e(F)(t))},c(t.toUpperCase()),3)),64))]),_:1},8,[`modelValue`,`class`])),x(`div`,rt,[a(A,{"model-value":K.value,readonly:``,"flex-auto":``,"font-mono":``,p:`x5 y2`,n:`sm`},null,8,[`model-value`]),x(`div`,it,[d(a(j,{title:`Copy URL`,n:`xs blue`,icon:`carbon:copy`,border:!1,onClick:f[1]||=t=>e($)(Ie.value,`server-route-url`)},null,512),[[p,`Copy URL`]]),d(a(j,{title:`Open in Editor`,icon:`carbon-launch`,n:`xs blue`,border:!1,onClick:f[2]||=n=>e(xe)(t.route.filepath)},null,512),[[p,`Open in Editor`]])])]),a(j,{"h-full":``,n:`primary solid`,onClick:Le},{default:C(()=>[a(P,{icon:`carbon:send`})]),_:1})])]),x(`div`,at,[(o(!0),m(l,null,n(Re.value,t=>d((o(),b(j,{key:t.slug,class:r(W.value===t.slug?`text-primary n-primary`:`border-transparent shadow-none`),onClick:e=>W.value=t.slug},{default:C(()=>[a(P,{icon:e(Se)[t.slug]},null,8,[`icon`]),x(`div`,ot,[E(c(t.name)+` `+c(t?.length?`(${t.length})`:``)+` `,1),x(`span`,null,c(e(V)[t.slug]?.length?`(${e(V)[t.slug].length})`:``),1)])]),_:2},1032,[`class`,`onClick`])),[[p,t.name]])),128)),f[12]||=x(`div`,{"flex-auto":``},null,-1),f[13]||=x(`div`,{"text-xs":``,op50:``},` Send from `,-1),a(ge,{modelValue:U.value,"onUpdate:modelValue":f[3]||=e=>U.value=e,class:`n-xs`,disabled:!e(D)?.app?.$fetch},{default:C(()=>[...f[11]||=[x(`option`,{value:`app`},` App `,-1),x(`option`,{value:`devtools`},` DevTools `,-1)]]),_:1},8,[`modelValue`,`disabled`]),d(a(j,{n:`orange`,class:`p-3`,icon:`i-carbon-clean`,onClick:Q},null,512),[[p,`Clear Inputs Saved Cache`]])]),W.value===`params`?(o(),m(`div`,st,[(o(!0),m(l,null,n(I.value,e=>(o(),m(l,{key:e},[x(`div`,ct,c(e),1),a(A,{modelValue:R.value[e],"onUpdate:modelValue":t=>R.value[e]=t,placeholder:e,"flex-1":``},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`])],64))),128))])):g(``,!0),W.value===`cookies`?(o(),m(`div`,lt,[(o(!0),m(l,null,n(Y.value,e=>(o(),m(`div`,{key:e.key,flex:`~ gap-4 items-center`},[a(A,{placeholder:`Key...`,"model-value":e.key,disabled:``,"op-70":``},null,8,[`model-value`]),a(A,{placeholder:`Value...`,"model-value":e.value,"flex-1":``,n:`primary`,onInput:t=>Z(e.key,t.target?.value)},null,8,[`model-value`,`onInput`]),a(j,{title:`Delete`,n:`red`,onClick:t=>Z(e.key,void 0)},{default:C(()=>[a(P,{icon:`i-carbon-trash-can`})]),_:1},8,[`onClick`])]))),128)),x(`div`,ut,[a(A,{modelValue:X.key,"onUpdate:modelValue":f[4]||=e=>X.key=e,placeholder:`Key`,n:`primary`,"flex-1":``},null,8,[`modelValue`]),a(A,{modelValue:X.value,"onUpdate:modelValue":f[5]||=e=>X.value=e,placeholder:`Value`,n:`primary`,"flex-1":``},null,8,[`modelValue`]),a(j,{title:`Add`,n:`primary`,onClick:f[6]||=e=>Z(X.key,X.value)},{default:C(()=>[a(P,{icon:`i-carbon-save`})]),_:1})])])):g(``,!0),a(e(y),null,{default:C(()=>[a(_e,{modelValue:je.value,"onUpdate:modelValue":f[9]||=e=>je.value=e,default:{active:!0,type:`string`},"max-h-xs":``,"of-auto":``},{default:C(()=>[e(V)[W.value]?.length?(o(),m(l,{key:0},[x(`div`,dt,[f[14]||=x(`div`,{"w-5":``,"x-divider":``},null,-1),f[15]||=x(`div`,{"flex-none":``},` Default Inputs `,-1),a(j,{icon:`i-carbon-edit`,border:!1,onClick:f[7]||=e=>v(`openDefaultInput`)}),f[16]||=x(`div`,{"x-divider":``},null,-1)]),a(_e,{modelValue:e(V)[W.value],"onUpdate:modelValue":f[8]||=t=>e(V)[W.value]=t,disabled:``,p0:``},null,8,[`modelValue`])],64)):g(``,!0)]),_:1},8,[`modelValue`])]),_:1}),W.value===`snippet`?(o(),m(`div`,ft,[J.value.length?(o(),b(Ee,{key:0,"code-snippets":J.value},null,8,[`code-snippets`])):g(``,!0)])):je.value?(o(),m(`div`,pt,[W.value===`body`?(o(),m(l,{key:0},[x(`div`,mt,[(o(),m(l,null,n(Ae,e=>x(`button`,{key:e,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:r({"border-b":e!==G.value}),onClick:t=>G.value=e},[x(`div`,{class:r({op30:e!==G.value}),"font-mono":``},c(e),3)],10,ht)),64)),f[17]||=x(`div`,{border:`b base`,"flex-auto":``},null,-1)]),G.value===`input`?(o(),b(e(ee),{key:0})):G.value===`json`?(o(),b(e(te),i({key:1,modelValue:B.value,"onUpdate:modelValue":f[10]||=e=>B.value=e,class:[e(S)===`dark`?`jse-theme-dark`:`light`,`json-editor-vue of-auto text-sm outline-none`]},u.$attrs,{mode:`text`,"navigation-bar":!1,indentation:2,"tab-size":2}),null,16,[`modelValue`,`class`])):g(``,!0)],64)):(o(),b(e(ee),{key:1}))])):g(``,!0),pe.value?N.value?(o(),b(ae,{key:5,"z-10":``,"flex-auto":``,"backdrop-blur":``},{default:C(()=>[...f[19]||=[E(` Fetching... `,-1)]]),_:1})):(o(),m(l,{key:6},[x(`div`,gt,[f[21]||=x(`div`,null,`Response`,-1),O.error?(o(),b(fe,{key:0,n:`red`},{default:C(()=>[...f[20]||=[E(` Error `,-1)]]),_:1})):g(``,!0),a(fe,{n:O.error?`orange`:`green`,textContent:c(O.statusCode)},null,8,[`n`,`textContent`]),O.contentType?(o(),m(`code`,_t,c(O.contentType),1)):g(``,!0),O.contentType===`application/json`?(o(),b(be,{key:2,getter:()=>({input:M.value})},null,8,[`getter`])):g(``,!0),f[22]||=x(`div`,{"flex-auto":``},null,-1),f[23]||=x(`div`,{op50:``},` Request finished in `,-1),a(fe,{n:`green`},{default:C(()=>[E(c(O.fetchTime)+` ms `,1)]),_:1})]),k.value===`pdf`?(o(),m(`div`,vt,[x(`div`,yt,[x(`object`,{data:M.value,type:`application/pdf`,"flex-auto":``,width:`100%`,height:`100%`,rounded:``},null,8,bt)])])):k.value===`media`?(o(),m(`div`,xt,[x(`div`,St,[O.contentType.includes(`image`)?(o(),m(`img`,{key:0,rounded:``,src:M.value},null,8,Ct)):(o(),m(`video`,wt,[x(`source`,{src:M.value,type:`video/mp4`},null,8,Tt)]))])])):(o(),b(ve,{key:1,"flex-auto":``,"overflow-auto":``,"py-2":``,code:M.value,lang:k.value},null,8,[`code`,`lang`]))],64)):(o(),b(ye,{key:4},{default:C(()=>[a(j,{n:`primary`,onClick:Le},{default:C(()=>[a(P,{icon:`carbon:send`}),f[18]||=E(` Send request `,-1)]),_:1})]),_:1}))])}}}),{__name:`ServerRouteDetails`}),Dt={flex:`~ gap1`,"text-sm":``},Ot={key:0,op50:``},kt={op50:``},At=T({__name:`server-routes`,setup(t){let r=/\W/g,i=w(!1),u=pe(),f=M(),{selectedRoute:h,view:_,inputDefaults:v}=le(`serverRoutes`),y=p(()=>{!f.value&&h.value&&(f.value=h.value.filepath);let e=u.value?.find(e=>e.filepath===f.value);return f.value!==h.value?.filepath&&e&&(h.value=e),e}),S=w(``),te=p(()=>new N(u.value||[],{keys:[`method`,`route`],shouldSort:!0})),T=p(()=>u.value?S.value?te.value.search(S.value).map(e=>e.item):u.value:[]),E=p(()=>{let e=[],t=(e,t)=>{e.routes=e.routes||[],e.routes.push(t)},n=(n,i)=>{let a=i?i.routes?.find(e=>e.route===n):e.find(e=>e.route===n);if(a)return a;let o={route:n,filepath:n.replace(r,`-`).toLowerCase(),type:`collection`,routes:[]};return i?t(i,o):e.push(o),o};return T.value.forEach(r=>{let i,a,o=r.filepath.split(`/`),s=o.slice(o.indexOf(`server`)+1);if(r.type===`runtime`){s[0]=`runtime`;let e=o.indexOf(`dist`);e!==-1&&(i=o[e-1],i&&s.splice(1,0,i))}s.length>0&&s.at(-1).includes(`.`)&&s.pop(),s.forEach(e=>{a=n(e,a)}),a?t(a,r):e.push(r)}),e});function D(){_.value=_.value===`tree`?`list`:`tree`}function A(e){return e.charAt(0).toUpperCase()+e.slice(1)}return(t,r)=>{let f=s(`tooltip`);return o(),m(l,null,[a(O,{"storage-key":`tab-server-routes`},{left:C(()=>[a(k,{search:S.value,"onUpdate:search":r[1]||=e=>S.value=e,pb2:``},{actions:C(()=>[d(a(j,{"text-lg":``,icon:e(_)===`list`?`i-carbon-list`:`i-carbon-tree-view-alt`,title:`Toggle view`,border:!1,onClick:D},null,8,[`icon`]),[[f,`Toggle View`]]),d(a(j,{"text-lg":``,icon:`i-carbon-cics-sit-overrides`,title:`Default Inputs`,border:!1,onClick:r[0]||=e=>i.value=!i.value},null,512),[[f,`Default Inputs`]])]),default:C(()=>[x(`div`,Dt,[S.value?(o(),m(`span`,Ot,c(T.value.length)+` matched · `,1)):g(``,!0),x(`span`,kt,c(e(u)?.length)+` routes in total`,1)])]),_:1},8,[`search`]),(o(!0),m(l,null,n(e(_)===`tree`?E.value:T.value,e=>(o(),b(L,{key:e.filepath,item:e},null,8,[`item`]))),128))]),right:C(()=>[(o(),b(ee,{max:10},[y.value?(o(),b(Et,{key:y.value.filepath,route:y.value,onOpenDefaultInput:r[2]||=e=>i.value=!0},null,8,[`route`])):g(``,!0)],1024)),y.value?g(``,!0):(o(),b(ye,{key:0},{default:C(()=>[a(we,{px6:``,py2:``},{default:C(()=>[...r[5]||=[x(`span`,{op75:``},`Select a route to start`,-1)]]),_:1})]),_:1}))]),_:1}),a(Te,{modelValue:i.value,"onUpdate:modelValue":r[3]||=e=>i.value=e,"auto-close":``,"max-w-xl":``,"min-w-xl":``,onClose:r[4]||=e=>i.value=!1},{default:C(()=>[x(`div`,null,[r[6]||=x(`div`,{p4:``,border:`b base`},[x(`span`,{"text-lg":``},`Default Inputs`),x(`br`),x(`span`,{"text-black":``,op50:``,"dark:text-white":``},`Merged as default for every request in DevTools`)],-1),(o(!0),m(l,null,n(Object.keys(e(v)),t=>(o(),b(I,{key:t,text:`${A(t)} ${e(v)[t]?.length?`(${e(v)[t].length})`:``}`,padding:!1,icon:e(Se)[t]},{default:C(()=>[a(_e,{modelValue:e(v)[t],"onUpdate:modelValue":n=>e(v)[t]=n,py0:``,default:{active:!0,type:`string`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:2},1032,[`text`,`icon`]))),128))])]),_:1},8,[`modelValue`])],64)}}});export{At as default};
|