@nuxt/devtools-nightly 2.2.0-29019371.ab4e646 → 2.2.0-29019442.db01e1b
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/chunks/module-main.mjs +1 -1
- package/dist/client/200.html +12 -12
- package/dist/client/404.html +12 -12
- package/dist/client/_nuxt/__blank-dudv6g9d.js +1 -0
- package/dist/client/_nuxt/{analyze-build-myma3yd1.js → analyze-build-e9aciqzh.js} +1 -1
- package/dist/client/_nuxt/{assets-lv794jnv.js → assets-cwxb2x6m.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/bc0a60d2-8f24-4ff2-8d69-0108e582f46f.json +1 -0
- package/dist/client/_nuxt/{code-diff.vue-leogxoz1.js → code-diff.vue-o59tfc01.js} +1 -1
- package/dist/client/_nuxt/{code-snippets.vue-nvtd3pj0.js → code-snippets.vue-gdfwtmrd.js} +1 -1
- package/dist/client/_nuxt/{components-hjsf7ksd.js → components-pd5ytnzs.js} +1 -1
- package/dist/client/_nuxt/{composable-item.vue-biqh7ndo.js → composable-item.vue-b97lr5qo.js} +1 -1
- package/dist/client/_nuxt/{custom-_name_-kex24woa.js → custom-_name_-i3el4phz.js} +1 -1
- package/dist/client/_nuxt/{data-schema-button.vue-jp02xd0f.js → data-schema-button.vue-3wc2g6px.js} +1 -1
- package/dist/client/_nuxt/{data-schema-drawer-j8693gtm.js → data-schema-drawer-iczbfixb.js} +1 -1
- package/dist/client/_nuxt/{default-j6l1ygv8.js → default-lmgc40qx.js} +1 -1
- package/dist/client/_nuxt/{error-404-opaazyo0.js → error-404-ewrdc7jn.js} +1 -1
- package/dist/client/_nuxt/{error-500-b8putag8.js → error-500-jd4y3r9k.js} +1 -1
- package/dist/client/_nuxt/{error-hw4nz28z.js → error-c8jev8an.js} +1 -1
- package/dist/client/_nuxt/{filepath-item.vue-exj9bzuo.js → filepath-item.vue-h7tvoozy.js} +1 -1
- package/dist/client/_nuxt/{full-lyo7xogd.js → full-hmj6eye4.js} +1 -1
- package/dist/client/_nuxt/{help-fab.vue-e4itx2nb.js → help-fab.vue-ejg5hm5e.js} +1 -1
- package/dist/client/_nuxt/{hooks-by1oydo6.js → hooks-nw4zcjgp.js} +1 -1
- package/dist/client/_nuxt/{ba74h01u.js → hyzu9r3l.js} +4 -4
- package/dist/client/_nuxt/{imports-ewfsysyi.js → imports-bsvmh0o7.js} +1 -1
- package/dist/client/_nuxt/{index-ll8fiede.js → index-gm3ryebv.js} +1 -1
- package/dist/client/_nuxt/{launch-page.vue-cea50uh8.js → launch-page.vue-clctd6el.js} +1 -1
- package/dist/client/_nuxt/{modules-hmx7tlg2.js → modules-olrhf7bs.js} +1 -1
- package/dist/client/_nuxt/{nbadge-irmvqnko.js → nbadge-faqjde9j.js} +1 -1
- package/dist/client/_nuxt/{ncheckbox.vue-l9opyx34.js → ncheckbox.vue-kkq02s4e.js} +1 -1
- package/dist/client/_nuxt/{ndrawer.vue-k5p5tlwf.js → ndrawer.vue-eleqt68n.js} +1 -1
- package/dist/client/_nuxt/{ndropdown.vue-k1705v4p.js → ndropdown.vue-i4su1de4.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-onmg0jek.js → nlink.vue-c5755oy2.js} +1 -1
- package/dist/client/_nuxt/{nnavbar.vue-fue4am60.js → nnavbar.vue-o88azs72.js} +1 -1
- package/dist/client/_nuxt/{none-cl6yiwom.js → none-mpwy3i72.js} +1 -1
- package/dist/client/_nuxt/{nsection-block-c0xnizfr.js → nsection-block-lykty6mm.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs.vue-k91b8jqs.js → nselect-tabs.vue-jrhsrslt.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-g4eljg7m.js → nselect.vue-j7i2gi7w.js} +1 -1
- package/dist/client/_nuxt/{open-graph-c4ydth6b.js → open-graph-fun0dda2.js} +1 -1
- package/dist/client/_nuxt/{overview-jkk7sab9.js → overview-ib7x7s7e.js} +1 -1
- package/dist/client/_nuxt/{pages-mfzb98c9.js → pages-diisjrwd.js} +1 -1
- package/dist/client/_nuxt/{payload-i1sj7egx.js → payload-laeh5ay3.js} +1 -1
- package/dist/client/_nuxt/{pinia-jk28bn4e.js → pinia-kqm7q3wc.js} +1 -1
- package/dist/client/_nuxt/{plugins-how6r945.js → plugins-io4ukckd.js} +1 -1
- package/dist/client/_nuxt/{render-tree-cs83a5o0.js → render-tree-jps1z2vn.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs-g2ibli02.js → runtime-configs-mdng7c37.js} +1 -1
- package/dist/client/_nuxt/{server-discovery-c64pbsxn.js → server-discovery-imurt5vj.js} +1 -1
- package/dist/client/_nuxt/{server-route-inputs.vue-ip4oitys.js → server-route-inputs.vue-cm4adfbq.js} +1 -1
- package/dist/client/_nuxt/{server-routes-g1x79dvh.js → server-routes-j4fu3xzc.js} +1 -1
- package/dist/client/_nuxt/{server-tasks-ocyl787x.js → server-tasks-kt1ddu0p.js} +1 -1
- package/dist/client/_nuxt/{settings-hrs3i0fe.js → settings-ixw4tbbq.js} +1 -1
- package/dist/client/_nuxt/{stacktrace-list.vue-cgia2cun.js → stacktrace-list.vue-izey048j.js} +1 -1
- package/dist/client/_nuxt/{state-components-g3e0hwb3.js → state-components-l62yewzq.js} +1 -1
- package/dist/client/_nuxt/{state-editor.vue-c0s3wr8c.js → state-editor.vue-cwematyb.js} +1 -1
- package/dist/client/_nuxt/{state-modules-sendvo2g.js → state-modules-gepr3wkm.js} +1 -1
- package/dist/client/_nuxt/{storage-o6ngyyj7.js → storage-dypko3ue.js} +1 -1
- package/dist/client/_nuxt/{terminals-frjt0qq9.js → terminals-o61lxbp2.js} +1 -1
- package/dist/client/_nuxt/{timeline-fx09ptyk.js → timeline-nfv3pbct.js} +1 -1
- package/dist/client/_nuxt/{virtual-files-cb0gkyzh.js → virtual-files-oyry2nza.js} +1 -1
- package/dist/client/_nuxt/{vue-devtools-e9suydbb.js → vue-devtools-l80civnz.js} +1 -1
- package/dist/client/index.html +12 -12
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/client.js +17 -11
- package/package.json +4 -4
- package/dist/client/_nuxt/__blank-hgo94jeo.js +0 -1
- package/dist/client/_nuxt/builds/meta/b81d40a5-e8a7-4c63-bd26-b566ad277cca.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as S,r as k,m as M,b3 as P}from"./ba74h01u.js";import{p as A,ay as R,E as L,I as C,P as U,a1 as T,u as x}from"./vendor/json-editor-vue-llkaejaf.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function I(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function E(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||I,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},V=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},q=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},J=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new J(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new q(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=E){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(V)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Z=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Z))}});export{ee as default};
|
|
1
|
+
import{k as S,r as k,m as M,b3 as P}from"./hyzu9r3l.js";import{p as A,ay as R,E as L,I as C,P as U,a1 as T,u as x}from"./vendor/json-editor-vue-llkaejaf.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function I(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function E(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||I,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},V=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},q=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},J=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new J(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new q(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=E){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(V)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Z=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Z))}});export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as I}from"./ncheckbox.vue-
|
|
1
|
+
import{_ as I}from"./ncheckbox.vue-kkq02s4e.js";import{C as R,_ as O,z as T,E as A}from"./hyzu9r3l.js";import{_ as E}from"./nselect.vue-j7i2gi7w.js";import{p as z,q as C,j as L,P as u,a1 as s,R as b,U as m,F as c,ae as h,u as r,a3 as y,Q as N,S as p,a2 as V,a9 as S,X as v,a8 as q}from"./vendor/json-editor-vue-llkaejaf.js";const K={p4:"",flex:"~ col gap-4"},M={key:1,ml2:"",flex:""},P=["value"],Q={key:0,flex:"","gap-4":""},Y=z({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(U,{emit:w}){const g=U,d=R(g,"modelValue",w,{passive:!0}),$=C(()=>[...g.keys,"active","key","value","type"]),B=C(()=>{const l={};for(const e of $.value)l[e]=g.default[e]||"";return l}),j=["string","number","boolean","file","date","time","datetime-local"];function D(l,e){const t=e.target;if(t.files&&t.files[0]){const i=t.files[0],f=new FileReader;f.readAsDataURL(i),f.onload=()=>{d.value[l].value=f.result}}}return L(()=>d,l=>{l.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const 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"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(l,e)=>{const t=I,i=T,f=E,F=A,_=O;return s(),u("div",K,[(s(!0),u(c,null,h(r(d),(a,k)=>(s(),u("div",{key:k,flex:"~ gap-2","justify-around":""},[m(l.$slots,"input",{item:a}),(s(!0),u(c,null,h($.value,n=>(s(),u(c,{key:n},[a.type!==null&&n==="active"?(s(),p(t,{key:0,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,n:"sm primary",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):b("",!0),a.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),u(c,{key:2},[a.type==="file"?(s(),p(i,{key:0,type:"file",disabled:l.disabled,class:v(l.disabled?"op75":""),onChange:o=>D(k,o)},null,8,["disabled","class","onChange"])):a.type==="boolean"?(s(),u("div",M,[y(t,{modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,placeholder:"Value",n:"green lg",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,type:a.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(f,{key:3,modelValue:a.type,"onUpdate:modelValue":o=>a.type=o,n:"sm green",class:v(l.disabled?"op75":""),disabled:l.disabled},{default:V(()=>[(s(),u(c,null,h(j,o=>N("option",{key:o,value:o},q(o),9,P)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):b("",!0)],64))),128)),m(l.$slots,"input-actions",{},()=>[y(_,{n:"red",disabled:l.disabled,class:v(l.disabled?"op0!":""),onClick:n=>r(d).splice(k,1)},{default:V(()=>[y(F,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),l.disabled?b("",!0):(s(),u("div",Q,[m(l.$slots,"actions",{params:r(d)},()=>[y(_,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=a=>r(d).push({...B.value}))},{default:V(()=>e[2]||(e[2]=[S(" Add ")])),_:1}),e[4]||(e[4]=N("div",{"flex-auto":""},null,-1)),r(d).length?(s(),p(_,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=a=>r(d).splice(0,r(d).length))},{default:V(()=>e[3]||(e[3]=[S(" Remove All ")])),_:1})):b("",!0)])])),m(l.$slots,"default")])}}});export{Y as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b4 as $e,E as Ee,b5 as le,b6 as We,b7 as Qe,Q as Xe,J as Ye,f as Ze,K as et,g as De,ag as tt,b8 as ot,a as nt,_ as Re,z as at,i as je,ay as st,B as lt,b9 as rt,N as it,U as ut,x as dt}from"./ba74h01u.js";import{_ as ct}from"./nnavbar.vue-fue4am60.js";import{_ as Ve}from"./nbadge-irmvqnko.js";import{p as ye,f as P,P as k,a1 as r,Q as u,U as pt,R as N,X as M,S as $,a8 as I,u as b,a9 as W,V as ft,F as L,ae as J,D as me,j as Ue,b as Ie,A as vt,n as mt,r as ve,q as j,w as yt,ag as Ne,a3 as v,a2 as C,aa as Z,a4 as ht,ax as gt,K as bt}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as _t}from"./nselect.vue-g4eljg7m.js";import{_ as Oe}from"./server-route-inputs.vue-ip4oitys.js";import{_ as kt}from"./code-snippets.vue-nvtd3pj0.js";import{_ as xt}from"./data-schema-button.vue-jp02xd0f.js";import{_ as wt}from"./ncode-block.vue-bir2wz4z.js";import{d as Ct}from"./vendor/unocss-mvzv9iuf.js";import{C as we,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-c0xnizfr.js";import{_ as Tt}from"./ndrawer.vue-k5p5tlwf.js";import"./vendor/shiki-kdj4mcqm.js";import"./ncheckbox.vue-l9opyx34.js";import"./client-gsjyqe32.js";import"./nicon-title.vue-dsf9ygne.js";function $t(e,l){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=l||{},y=o.decode||Et;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let m=e.indexOf(";",f);if(m===-1)m=e.length;else if(m<d){f=e.lastIndexOf(";",d-1)+1;continue}const g=e.slice(f,d).trim();if(o?.filter&&!o?.filter(g)){f=m+1;continue}if(n[g]===void 0){let i=e.slice(d+1,m).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[g]=Dt(i,y)}f=m+1}return n}function Et(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,l){try{return l(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,l,n){const o=n||{},y=o.encode||encodeURIComponent;if(typeof y!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=y(l);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const m=o.maxAge-0;if(Number.isNaN(m)||!Number.isFinite(m))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(m)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Rt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function Rt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const l=P(!0),n=$e();return(o,y)=>{const f=Ee,d=Ve,m=Pe;return r(),k("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:ft({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:y[0]||(y[0]=g=>{l.value=!l.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),$(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),$(d,{key:1,class:M(b(le)(o.item.method||"*")),textContent:I((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),$(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),W(" "+I(o.item.route),1)],2)],6),y[1]||(y[1]=u("div",{"x-divider":""},null,-1)),l.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,J(o.item.routes,g=>(r(),$(m,{key:g.filepath,item:g,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function B(e){if(typeof e!="object")return e;var l,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(l in e)e.hasOwnProperty(l)&&n[l]!==e[l]&&(n[l]=B(e[l]))}else{n={};for(l in e)l==="__proto__"?Object.defineProperty(n,l,{value:B(e[l]),configurable:!0,enumerable:!0,writable:!0}):n[l]=B(e[l])}return n}if(o==="[object Array]"){for(l=e.length,n=Array(l);l--;)n[l]=B(e[l]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(y){n.add(B(y))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(y,f){n.set(B(f),B(y))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(B(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const jt={path:"/",watch:!0,decode:e=>Ct(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},se=window.cookieStore;function Vt(e,l){const n={...jt,...l};n.filter??=g=>g===e;const o=Se(n)||{};let y;n.maxAge!==void 0?y=n.maxAge*1e3:n.expires&&(y=n.expires.getTime()-Date.now());const f=y!==void 0&&y<=0,d=B(f?void 0:o[e]??n.default?.()),m=y&&!f?Nt(d,y,n.watch&&n.watch!=="shallow"):P(d);{let g=null;try{!se&&typeof BroadcastChannel<"u"&&(g=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const i=()=>{n.readonly||We(m.value,o[e])||(It(e,m.value,n),o[e]=B(m.value),g?.postMessage({value:n.encode(m.value)}))},E=A=>{const S=A.refresh?Se(n)?.[e]:n.decode(A.value);U=!0,m.value=S,o[e]=B(S),mt(()=>{U=!1})};let U=!1;const F=!!Ie();if(F&&me(()=>{U=!0,i(),g?.close()}),se){const A=S=>{const _=S.changed.find(h=>h.name===e),O=S.deleted.find(h=>h.name===e);_&&E({value:_.value}),O&&E({value:null})};se.addEventListener("change",A),F&&me(()=>se.removeEventListener("change",A))}else g&&(g.onmessage=({data:A})=>E(A));n.watch?Ue(m,()=>{U||i()},{deep:n.watch!=="shallow"}):i()}return m}function Se(e={}){return $t(document.cookie,e)}function Ut(e,l,n={}){return l==null?Ce(e,l,{...n,maxAge:-1}):Ce(e,l,n)}function It(e,l,n={}){document.cookie=Ut(e,l,n)}const Te=2147483647;function Nt(e,l,n){let o,y,f=0;const d=n?P(e):{value:e};return Ie()&&me(()=>{y?.(),clearTimeout(o)}),vt((m,g)=>{n&&(y=Ue(d,g));function i(){f=0,clearTimeout(o);const E=l-f,U=E<Te?E:Te;o=setTimeout(()=>{if(f+=U,f<l)return i();d.value=void 0,g()},U)}return{get(){return m(),d.value},set(E){i(),d.value=E,g()}}})}const Ot={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Pt={flex:"~ gap2 items-center"},At={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt={class:"hidden md:block"},Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Gt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt={key:2},Wt={key:3,border:"b base",relative:"","n-code-block":""},Qt={flex:"~ wrap","w-full":""},Xt=["onClick"],Yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Zt={key:1,"text-xs":"",op50:""},eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},ao={border:"~ base",rounded:""},so=["src"],lo={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:l}){const n=e,o=l,[y,f]=Qe(),d=Xe(),m=Ye(),g=Ze(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=j(()=>i.contentType.includes("application/json")?"json":i.contentType.includes("text/html")?"html":i.contentType.includes("text/css")?"css":i.contentType.includes("text/javascript")?"javascript":i.contentType.includes("image")||i.contentType.includes("video")?"media":i.contentType.includes("text/xml")||i.contentType.includes("application/xml")?"xml":i.contentType.includes("application/pdf")?"pdf":"text"),U=j(()=>{if(E.value==="json")return JSON.stringify(i.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),F=P(!1),A=P(!1),S=et(),_=j(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),O=j(()=>_.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),h=P(n.route.method||"GET"),D=P({}),x=ve({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"}]}),V=P({}),{inputDefaults:w,sendFrom:z}=De("serverRoutes"),Q=j(()=>g?.value?.app?.$fetch?z.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=j(()=>ie.includes(h.value.toUpperCase())),c=P(),te=["input","json"],G=P(te[0]),ue=j({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=j(()=>({...K(w.value.query),...K(x.query)})),ge=j(()=>({...K(w.value.headers),...K(x.headers)})),de=j(()=>ee.value?G.value==="json"?{...K(w.value.body),...V.value}:{...K(w.value.body),...K(x.body)}:void 0),Ae=j(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=j(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(_.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&D.value[R]||R).join("")||"")+a;let p=m.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=j(()=>Ae.value+oe.value);function K(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:T})=>p&&R&&T!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){A.value=!0,F.value=!0;const a=Date.now(),t=Q.value==="app"?g.value.app.$fetch:$fetch;lt("server-routes:fetch",{method:h.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:h.value.toUpperCase(),headers:ge.value,query:he.value,body:de.value,onResponse({response:p}){i.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),i.statusCode=p.status,i.error=void 0},onResponseError(p){i.error=p.response._data,i.data=p.response._data}})}catch{}F.value=!1,i.fetchTime=Date.now()-a}const ke=j(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([T,q])=>T&&q&&!(T==="Content-Type"&&q==="application/json")).map(([T,q])=>` '${T}': '${q}'`).join(`,
|
|
1
|
+
import{b4 as $e,E as Ee,b5 as le,b6 as We,b7 as Qe,Q as Xe,J as Ye,f as Ze,K as et,g as De,ag as tt,b8 as ot,a as nt,_ as Re,z as at,i as je,ay as st,B as lt,b9 as rt,N as it,U as ut,x as dt}from"./hyzu9r3l.js";import{_ as ct}from"./nnavbar.vue-o88azs72.js";import{_ as Ve}from"./nbadge-faqjde9j.js";import{p as ye,f as P,P as k,a1 as r,Q as u,U as pt,R as N,X as M,S as $,a8 as I,u as b,a9 as W,V as ft,F as L,ae as J,D as me,j as Ue,b as Ie,A as vt,n as mt,r as ve,q as j,w as yt,ag as Ne,a3 as v,a2 as C,aa as Z,a4 as ht,ax as gt,K as bt}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as _t}from"./nselect.vue-j7i2gi7w.js";import{_ as Oe}from"./server-route-inputs.vue-cm4adfbq.js";import{_ as kt}from"./code-snippets.vue-gdfwtmrd.js";import{_ as xt}from"./data-schema-button.vue-3wc2g6px.js";import{_ as wt}from"./ncode-block.vue-bir2wz4z.js";import{d as Ct}from"./vendor/unocss-mvzv9iuf.js";import{C as we,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-lykty6mm.js";import{_ as Tt}from"./ndrawer.vue-eleqt68n.js";import"./vendor/shiki-kdj4mcqm.js";import"./ncheckbox.vue-kkq02s4e.js";import"./client-gsjyqe32.js";import"./nicon-title.vue-dsf9ygne.js";function $t(e,l){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=l||{},y=o.decode||Et;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let m=e.indexOf(";",f);if(m===-1)m=e.length;else if(m<d){f=e.lastIndexOf(";",d-1)+1;continue}const g=e.slice(f,d).trim();if(o?.filter&&!o?.filter(g)){f=m+1;continue}if(n[g]===void 0){let i=e.slice(d+1,m).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[g]=Dt(i,y)}f=m+1}return n}function Et(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,l){try{return l(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,l,n){const o=n||{},y=o.encode||encodeURIComponent;if(typeof y!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=y(l);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const m=o.maxAge-0;if(Number.isNaN(m)||!Number.isFinite(m))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(m)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Rt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function Rt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const l=P(!0),n=$e();return(o,y)=>{const f=Ee,d=Ve,m=Pe;return r(),k("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:ft({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:y[0]||(y[0]=g=>{l.value=!l.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),$(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),$(d,{key:1,class:M(b(le)(o.item.method||"*")),textContent:I((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),$(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),W(" "+I(o.item.route),1)],2)],6),y[1]||(y[1]=u("div",{"x-divider":""},null,-1)),l.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,J(o.item.routes,g=>(r(),$(m,{key:g.filepath,item:g,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function B(e){if(typeof e!="object")return e;var l,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(l in e)e.hasOwnProperty(l)&&n[l]!==e[l]&&(n[l]=B(e[l]))}else{n={};for(l in e)l==="__proto__"?Object.defineProperty(n,l,{value:B(e[l]),configurable:!0,enumerable:!0,writable:!0}):n[l]=B(e[l])}return n}if(o==="[object Array]"){for(l=e.length,n=Array(l);l--;)n[l]=B(e[l]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(y){n.add(B(y))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(y,f){n.set(B(f),B(y))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(B(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const jt={path:"/",watch:!0,decode:e=>Ct(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},se=window.cookieStore;function Vt(e,l){const n={...jt,...l};n.filter??=g=>g===e;const o=Se(n)||{};let y;n.maxAge!==void 0?y=n.maxAge*1e3:n.expires&&(y=n.expires.getTime()-Date.now());const f=y!==void 0&&y<=0,d=B(f?void 0:o[e]??n.default?.()),m=y&&!f?Nt(d,y,n.watch&&n.watch!=="shallow"):P(d);{let g=null;try{!se&&typeof BroadcastChannel<"u"&&(g=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const i=()=>{n.readonly||We(m.value,o[e])||(It(e,m.value,n),o[e]=B(m.value),g?.postMessage({value:n.encode(m.value)}))},E=A=>{const S=A.refresh?Se(n)?.[e]:n.decode(A.value);U=!0,m.value=S,o[e]=B(S),mt(()=>{U=!1})};let U=!1;const F=!!Ie();if(F&&me(()=>{U=!0,i(),g?.close()}),se){const A=S=>{const _=S.changed.find(h=>h.name===e),O=S.deleted.find(h=>h.name===e);_&&E({value:_.value}),O&&E({value:null})};se.addEventListener("change",A),F&&me(()=>se.removeEventListener("change",A))}else g&&(g.onmessage=({data:A})=>E(A));n.watch?Ue(m,()=>{U||i()},{deep:n.watch!=="shallow"}):i()}return m}function Se(e={}){return $t(document.cookie,e)}function Ut(e,l,n={}){return l==null?Ce(e,l,{...n,maxAge:-1}):Ce(e,l,n)}function It(e,l,n={}){document.cookie=Ut(e,l,n)}const Te=2147483647;function Nt(e,l,n){let o,y,f=0;const d=n?P(e):{value:e};return Ie()&&me(()=>{y?.(),clearTimeout(o)}),vt((m,g)=>{n&&(y=Ue(d,g));function i(){f=0,clearTimeout(o);const E=l-f,U=E<Te?E:Te;o=setTimeout(()=>{if(f+=U,f<l)return i();d.value=void 0,g()},U)}return{get(){return m(),d.value},set(E){i(),d.value=E,g()}}})}const Ot={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Pt={flex:"~ gap2 items-center"},At={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt={class:"hidden md:block"},Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Gt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt={key:2},Wt={key:3,border:"b base",relative:"","n-code-block":""},Qt={flex:"~ wrap","w-full":""},Xt=["onClick"],Yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Zt={key:1,"text-xs":"",op50:""},eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},ao={border:"~ base",rounded:""},so=["src"],lo={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:l}){const n=e,o=l,[y,f]=Qe(),d=Xe(),m=Ye(),g=Ze(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=j(()=>i.contentType.includes("application/json")?"json":i.contentType.includes("text/html")?"html":i.contentType.includes("text/css")?"css":i.contentType.includes("text/javascript")?"javascript":i.contentType.includes("image")||i.contentType.includes("video")?"media":i.contentType.includes("text/xml")||i.contentType.includes("application/xml")?"xml":i.contentType.includes("application/pdf")?"pdf":"text"),U=j(()=>{if(E.value==="json")return JSON.stringify(i.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),F=P(!1),A=P(!1),S=et(),_=j(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),O=j(()=>_.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),h=P(n.route.method||"GET"),D=P({}),x=ve({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"}]}),V=P({}),{inputDefaults:w,sendFrom:z}=De("serverRoutes"),Q=j(()=>g?.value?.app?.$fetch?z.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=j(()=>ie.includes(h.value.toUpperCase())),c=P(),te=["input","json"],G=P(te[0]),ue=j({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=j(()=>({...K(w.value.query),...K(x.query)})),ge=j(()=>({...K(w.value.headers),...K(x.headers)})),de=j(()=>ee.value?G.value==="json"?{...K(w.value.body),...V.value}:{...K(w.value.body),...K(x.body)}:void 0),Ae=j(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=j(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(_.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&D.value[R]||R).join("")||"")+a;let p=m.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=j(()=>Ae.value+oe.value);function K(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:T})=>p&&R&&T!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){A.value=!0,F.value=!0;const a=Date.now(),t=Q.value==="app"?g.value.app.$fetch:$fetch;lt("server-routes:fetch",{method:h.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:h.value.toUpperCase(),headers:ge.value,query:he.value,body:de.value,onResponse({response:p}){i.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),i.statusCode=p.status,i.error=void 0},onResponseError(p){i.error=p.response._data,i.data=p.response._data}})}catch{}F.value=!1,i.fetchTime=Date.now()-a}const ke=j(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([T,q])=>T&&q&&!(T==="Content-Type"&&q==="application/json")).map(([T,q])=>` '${T}': '${q}'`).join(`,
|
|
2
2
|
`);h.value.toUpperCase()!=="GET"&&t.push(`method: '${h.value.toUpperCase()}'`),p&&t.push(`headers: {
|
|
3
3
|
${p}
|
|
4
4
|
}`),de.value&&t.push(`body: ${JSON.stringify(de.value,null,2)}`);const R=t.length?`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ba as re,E as oe,g as le,b7 as ke,Q as xe,J as Te,K as Se,ag as we,b8 as Xe,a as Ee,_ as ce,b5 as De,z as Ce,i as fe,ay as Me,B as Ie,bb as $e,N as Ue,U as Le,x as Ne}from"./ba74h01u.js";import{_ as Re}from"./nnavbar.vue-fue4am60.js";import{_ as pe}from"./nbadge-irmvqnko.js";import{a as Ae,p as K,f as z,q as U,P as $,a1 as g,Q as v,R as j,a3 as k,a8 as R,F as B,ae as J,X as Y,u as D,r as se,w as Ve,ag as de,S as A,aa as G,a2 as I,a9 as P,a4 as je,ax as Be,U as We,V as He,K as ze}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as ve}from"./server-route-inputs.vue-ip4oitys.js";import{_ as Fe}from"./ncode-block.vue-bir2wz4z.js";import{S as he}from"./constants-b32h69zq.js";import{_ as qe}from"./nsection-block-c0xnizfr.js";import{_ as Pe}from"./ndrawer.vue-k5p5tlwf.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";import"./ncheckbox.vue-l9opyx34.js";import"./nselect.vue-g4eljg7m.js";import"./client-gsjyqe32.js";import"./nicon-title.vue-dsf9ygne.js";var ne={exports:{}},ue;function Ye(){return ue||(ue=1,function(F,L){(function(x,w){F.exports=w()})(globalThis,()=>(()=>{var N={949:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),d=function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(s){return s.trim()}).filter(function(s){return s!==""}).map(function(s){return isNaN(Number(s))?s:Number(s)}).filter(function(s){return s!==null&&s!==""});r.length===0&&r.push("*"),r.sort(function(s,i){return s!==null&&i!==null?s-i:0}),e[a]=r.map(function(s){return s!==null?s.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(c){var m=c.replace(/\D/,""),f=m;return e.dayOfWeekStartIndexZero?m=="7"&&(f="0"):f=(parseInt(m)-1).toString(),c.replace(m,f)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(c){var m=c.replace(/\D/,""),f=m;return e.monthStartIndexZero&&(f=(parseInt(m)+1).toString()),c.replace(m,f)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in n)t[4]=t[4].replace(new RegExp(s,"gi"),n[s].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(c){return c!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var u=null;switch(i){case 4:u="12";break;case 5:u="6";break;case 6:u="9999";break;default:u=null;break}if(u!==null){var h=t[i].split("/");t[i]="".concat(h[0],"-").concat(u,"/").concat(h[1])}}},y.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},y.prototype.validateAnyRanges=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.validateOnlyExpectedCharactersFound=function(t,e){var a=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(a&&a.length)throw new Error("Expression contains invalid values: '".concat(a.toString(),"'"))},y}();p.CronParser=d},333:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),d=_(949),y=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,s=n===void 0?!0:n,i=r.verbose,u=i===void 0?!1:i,h=r.dayOfWeekStartIndexZero,c=h===void 0?!0:h,m=r.monthStartIndexZero,f=m===void 0?!1:m,M=r.use24HourTimeFormat,T=r.locale,W=T===void 0?null:T,V=r.tzOffset,E=V===void 0?0:V,H={throwExceptionOnParseError:s,verbose:u,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:M,locale:W,tzOffset:E};H.tzOffset&&console.warn("'tzOffset' option has been deprecated and will be removed in a future release.");var ee=new t(e,H);return ee.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var a=new d.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=a.parse();var r=this.getTimeOfDayDescription(),n=this.getDayOfMonthDescription(),s=this.getMonthDescription(),i=this.getDayOfWeekDescription(),u=this.getYearDescription();e+=r+n+i+s+u,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var s=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,s[0],""),this.formatTime(r,s[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var u=0;u<i.length;u++)n+=" ",n+=this.formatTime(i[u],a,""),u<i.length-2&&(n+=","),u==i.length-2&&(n+=this.i18n.spaceAnd())}else{var h=this.getSecondsDescription(),c=this.getMinutesDescription(),m=this.getHoursDescription();if(n+=h,n&&c&&(n+=", "),n+=c,c===m)return n;n&&m&&(n+=", "),n+=m}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(s){return s},function(s){return o.StringUtilities.format(e.i18n.everyX0Minutes(s),s)},function(s){return e.i18n.minutesX0ThroughX1PastTheHour()},function(s){try{return s=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(s)<20?e.i18n.atX0MinutesPastTheHour(s):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(s)}catch{return e.i18n.atX0MinutesPastTheHour(s)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=this.getSegmentDescription(a,this.i18n.everyHour(),function(i){return e.formatTime(i,"0","")},function(i){return o.StringUtilities.format(e.i18n.everyX0Hours(i),i)},function(i){return e.i18n.betweenX0AndX1()},function(i){return e.i18n.atX0()});if(r&&a.includes("-")&&this.expressionParts[1]!="0"){var n=Array.from(r.matchAll(/:00/g));if(n.length>1){var s=n[n.length-1].index;r=r.substring(0,s)+":59"+r.substring(s+3)}}return r},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,s){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var u=parseInt(i);if(e.options.tzOffset){var h=e.expressionParts[2],c=parseInt(h)+(e.options.tzOffset?e.options.tzOffset:0);c>=24?u++:c<0&&u--,u>6?u=0:u<0&&(u=6)}var m=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(s)[u]:a[u];if(n.indexOf("#")>-1){var f=null,M=n.substring(n.indexOf("#")+1),T=n.substring(0,n.indexOf("#"));switch(M){case"1":f=e.i18n.first(T);break;case"2":f=e.i18n.second(T);break;case"3":f=e.i18n.third(T);break;case"4":f=e.i18n.fourth(T);break;case"5":f=e.i18n.fifth(T);break}m=f+" "+m}return m},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var s=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(s):e.i18n.commaX0ThroughX1(s)},function(n){var s=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),u=n.substring(0,n.indexOf("#"));s=e.i18n.commaOnThe(i,u).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)s=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var h=e.expressionParts[3]!="*";s=h?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return s}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,s){return s&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(s)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var s=parseInt(n[0].replace("W","")),i=s==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var u=r.match(/L-(\d{1,2})/);if(u){var h=u[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(h),h);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(c){return c=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),c):c},function(c){return c=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(c)},function(c){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(c)},function(c){return e.i18n.commaOnDayX0OfTheMonth(c)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,s,i){var u=null,h=e.indexOf("/")>-1,c=e.indexOf("-")>-1,m=e.indexOf(",")>-1;if(!e)u="";else if(e==="*")u=a;else if(!h&&!c&&!m)u=o.StringUtilities.format(i(e),r(e));else if(m){for(var f=e.split(","),M="",T=0;T<f.length;T++)if(T>0&&f.length>2&&(M+=",",T<f.length-1&&(M+=" ")),T>0&&f.length>1&&(T==f.length-1||f.length==2)&&(M+="".concat(this.i18n.spaceAnd()," ")),f[T].indexOf("/")>-1||f[T].indexOf("-")>-1){var W=f[T].indexOf("-")>-1&&f[T].indexOf("/")==-1,V=this.getSegmentDescription(f[T],a,r,n,W?this.i18n.commaX0ThroughX1:s,i);W&&(V=V.replace(", ","")),M+=V}else h?M+=this.getSegmentDescription(f[T],a,r,n,s,i):M+=r(f[T]);h?u=M:u=o.StringUtilities.format(i(e),M)}else if(h){var f=e.split("/");if(u=o.StringUtilities.format(n(f[1]),f[1]),f[0].indexOf("-")>-1){var E=this.generateRangeSegmentDescription(f[0],s,r);E.indexOf(", ")!=0&&(u+=", "),u+=E}else if(f[0].indexOf("*")==-1){var H=o.StringUtilities.format(i(f[0]),r(f[0]));H=H.replace(", ",""),u+=o.StringUtilities.format(this.i18n.commaStartingX0(),H)}}else c&&(u=this.generateRangeSegmentDescription(e,s,r));return u},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",s=e.split("-"),i=r(s[0],1),u=r(s[1],2),h=a(e);return n+=o.StringUtilities.format(h,i,u),n},t.prototype.formatTime=function(e,a,r){var n=0,s=0;this.options.tzOffset&&(n=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),s=parseFloat((this.options.tzOffset%1).toFixed(2)),s!=0&&(s*=60));var i=parseInt(e)+n,u=parseInt(a)+s;u>=60?(u-=60,i+=1):u<0&&(u+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var h="",c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),h=c?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var m="";return r&&(m=":".concat(("00"+r).substring(r.length))),"".concat(c?h:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+u.toString()).substring(u.toString().length)).concat(m).concat(c?"":h)},t.prototype.transformVerbosity=function(e,a){return a||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();p.ExpressionDescriptor=y},747:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=_(486),d=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=d},486:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o}();p.en=_},515:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(d,y){if(!d)throw new Error(y)}var o=function(){function d(){}return d.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},d.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},d.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},d.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},d.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},d.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},d}();p.default=o},823:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function o(){}return o.format=function(d){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return d.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(d,y){return y.some(function(t){return d.indexOf(t)>-1})},o}();p.StringUtilities=_}},x={};function w(b){var p=x[b];if(p!==void 0)return p.exports;var _=x[b]={exports:{}};return N[b](_,_.exports,w),_.exports}var X={};return(()=>{var b=X;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=w(333),_=w(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),X})())}(ne)),ne.exports}var Ge=Ye();const Je=Ae(Ge),Ze=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(F){const L=F,N=re(),x=z(!0),w=U(()=>Je.toString(L.collection.cron));return(X,b)=>{const p=oe,_=pe;return g(),$("div",null,[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:w.value,onClick:b[0]||(b[0]=o=>x.value=!x.value)},[v("div",Qe,[k(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":x.value?90:0,transition:""},null,8,["transform-rotate"])]),v("span",Ke,[k(_,{class:"font-mono n-primary",textContent:R(X.collection.cron)},null,8,["textContent"]),v("span",et,R(w.value),1),v("span",tt,"("+R(X.collection.tasks.length)+")",1)])],8,Ze),b[2]||(b[2]=v("div",{"x-divider":""},null,-1)),x.value?(g(),$("ul",nt,[(g(!0),$(B,null,J(X.collection.tasks,o=>(g(),$("li",{key:o},[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:Y([{"bg-active":D(N)===o}]),onClick:d=>N.value=o},R(o),11,rt),b[1]||(b[1]=v("div",{"x-divider":""},null,-1))]))),128))])):j("",!0)])}}}),at={"h-full":"","w-full":"",flex:"~ col"},it={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},st={flex:"~ gap2 items-center"},ut={relative:"","w-full":""},lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ct={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ft={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},dt={key:0,border:"b base",relative:"","n-code-block":""},vt={flex:"~ wrap","w-full":""},ht=["onClick"],mt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},yt={key:1,"text-xs":"",op50:""},gt=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(F,{emit:L}){const N=F,x=L,w=z({payload:{}}),{inputDefaults:X}=le("serverRoutes"),[b,p]=ke(),_=xe(),o=Te(),d=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=U(()=>JSON.stringify(d.data,null,2)),t=U(()=>d.contentType.includes("application/json")?"json":"text"),e=z(!1),a=z(!1),r=Se(),n=z(),s=["json"],i=z(s[0]),u=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),h=U({get:()=>u[n.value],set:O=>{u[n.value]=O}}),c=U(()=>({...E(X.value.query),...E(u.query)})),m=U(()=>({...E(X.value.headers)})),f=U(()=>Object.keys(w.value?.payload??{}).length?{...w.value}:void 0),M=U(()=>f.value?"POST":"GET"),T=U(()=>{let O=window?.location.origin;return O.charAt(O.length-1)==="/"&&(O=O.slice(0,-1)),O}),W=U(()=>{let O=new URLSearchParams(c.value).toString();O&&(O=`?${O}`);const l=`/_nitro/tasks/${N.task.name}${O}`;let C=o.value?.app.baseURL||"";return(C==="./"||C===".")&&(C=""),C.endsWith("/")&&(C=C.slice(0,-1)),C+l}),V=U(()=>T.value+W.value);function E(O){const l=Object.fromEntries(O.filter(({active:C,key:q,value:Z})=>C&&q&&Z!==void 0).map(({key:C,value:q})=>[C,q]));return Object.entries(l).length?l:void 0}async function H(){a.value=!0,e.value=!0;const O=Date.now();Ie("server-tasks:run",{method:M.value});try{d.data=await $fetch(V.value,{method:"POST",headers:m.value,query:c.value,body:f.value,onResponse({response:l}){d.contentType=(l.headers.get("content-type")||"").toString().toLowerCase().trim(),d.statusCode=l.status,d.error=void 0},onResponseError(l){d.error=l.response._data,d.data=l.response._data}})}catch{}e.value=!1,d.fetchTime=Date.now()-O}const ee=U(()=>{const O=[];return O.push({name:"Query",slug:"query",length:u.query.length}),O.push({name:"Body",slug:"body",length:u.body.length}),O});Ve(()=>{if(i.value==="json"&&typeof w.value=="string")try{w.value=JSON.parse(w.value)}catch{}});const ae=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([u,n],()=>{const O=ae.value?.find(l=>l.task===N.task.name);if(O){n.value||(n.value=O.tab),O.tab!==n.value&&(O.tab=n.value);const{body:l,query:C,headers:q}=O.inputs;Object.assign(u,{body:l,query:C,headers:q})}else{const l={task:N.task.name,tab:"query",inputs:u};ae.value.push(l),n.value||(n.value=l.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(O,l)=>{const C=ce,q=Ce,Z=oe,ie=ve,ge=fe,_e=Me,te=pe,be=Fe,Q=de("tooltip");return g(),$("div",at,[v("div",it,[v("div",st,[G((g(),$("div",null,[k(C,{class:Y(["n-badge-base n-sm",D(De)(M.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:I(()=>[P(R(M.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${M.value} as ${M.value==="GET"?"no":""} json body is sent`]]),v("div",ut,[k(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),v("div",lt,[G(k(C,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:l[0]||(l[0]=S=>D(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(k(C,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:l[1]||(l[1]=S=>D(r)(O.task.handler))},null,512),[[Q,"Open in Editor"]])])]),k(C,{"h-full":"",n:"primary solid",onClick:H},{default:I(()=>[k(Z,{icon:"carbon:send"})]),_:1})])]),v("div",ct,[(g(!0),$(B,null,J(ee.value,S=>G((g(),A(C,{key:S.slug,class:Y(n.value===S.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Oe=>n.value=S.slug},{default:I(()=>[k(Z,{icon:D(he)[S.slug]},null,8,["icon"]),v("div",ft,[P(R(S.name)+" "+R(S?.length?`(${S.length})`:"")+" ",1),v("span",null,R(D(X)[S.slug]?.length?`(${D(X)[S.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,S.name]])),128))]),k(D(b),null,{default:I(()=>[k(ie,{modelValue:h.value,"onUpdate:modelValue":l[4]||(l[4]=S=>h.value=S),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:I(()=>[D(X)[n.value]?.length?(g(),$(B,{key:0},[v("div",pt,[l[6]||(l[6]=v("div",{"w-5":"","x-divider":""},null,-1)),l[7]||(l[7]=v("div",{"flex-none":""}," Default Inputs ",-1)),k(C,{icon:"i-carbon-edit",border:!1,onClick:l[2]||(l[2]=S=>x("openDefaultInput"))}),l[8]||(l[8]=v("div",{"x-divider":""},null,-1))]),k(ie,{modelValue:D(X)[n.value],"onUpdate:modelValue":l[3]||(l[3]=S=>D(X)[n.value]=S),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),h.value?(g(),$("div",dt,[n.value==="body"?(g(),$(B,{key:0},[v("div",vt,[(g(),$(B,null,J(s,S=>v("button",{key:S,px4:"",py2:"",border:"r base",hover:"bg-active",class:Y({"border-b":S!==i.value}),onClick:Oe=>i.value=S},[v("div",{class:Y({op30:S!==i.value}),"font-mono":""},R(S),3)],10,ht)),64)),l[9]||(l[9]=v("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(D(p),{key:0})):i.value==="json"?(g(),A(D(Be),je({key:1,modelValue:w.value,"onUpdate:modelValue":l[5]||(l[5]=S=>w.value=S),class:[D(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},O.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(D(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:I(()=>l[11]||(l[11]=[P(" Running... ")])),_:1})):(g(),$(B,{key:3},[v("div",mt,[l[13]||(l[13]=v("div",null,"Result",-1)),d.error?(g(),A(te,{key:0,n:"red"},{default:I(()=>l[12]||(l[12]=[P(" Error ")])),_:1})):j("",!0),k(te,{n:d.error?"orange":"green",textContent:R(d.statusCode)},null,8,["n","textContent"]),d.contentType?(g(),$("code",yt,R(d.contentType),1)):j("",!0),l[14]||(l[14]=v("div",{"flex-auto":""},null,-1)),l[15]||(l[15]=v("div",{op50:""}," Tasks finished in ",-1)),k(te,{n:"green"},{default:I(()=>[P(R(d.fetchTime)+" ms ",1)]),_:1})]),k(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:I(()=>[k(C,{n:"primary",onClick:H},{default:I(()=>[k(Z,{icon:"carbon:send"}),l[10]||(l[10]=P(" Run task "))]),_:1})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},me=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const L=z(!0),N=re();return(x,w)=>{const X=oe,b=me;return g(),$("div",null,[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:Y([{"bg-active":D(N)===x.item.name}]),style:He({paddingLeft:`calc(0.5rem + ${x.index*1.5}em)`}),onClick:w[0]||(w[0]=p=>{L.value=!L.value,N.value=x.item.name})},[v("div",_t,[x.item.type==="collection"?(g(),A(X,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":L.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),v("span",bt,[x.item.type==="collection"?(g(),A(X,{key:0,title:`${x.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(X,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+R(x.item.name),1)])],6),w[1]||(w[1]=v("div",{"x-divider":""},null,-1)),L.value?We(x.$slots,"default",{key:0},()=>[(g(!0),$(B,null,J(x.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:x.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),Ot={flex:"~ gap1","text-sm":""},kt={key:0,op50:""},xt={op50:""},Vt=K({__name:"server-tasks",setup(F){const L=z(!1),N=$e(),x=U(()=>Object.keys(N.value?.tasks??{}).map(r=>({name:r,...N.value.tasks[r],type:"task"}))),w=U(()=>Object.entries(N.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),X=re(),{view:b,selectedTask:p,inputDefaults:_}=le("serverTasks"),o=U(()=>{!X.value&&p.value&&(X.value=p.value.name);const r=x.value.find(n=>n.name===X.value);return X.value!==p.value?.name&&r&&(p.value=r),r}),d=z(""),y=U(()=>new Ue(x.value,{keys:["key","description"],shouldSort:!0})),t=U(()=>d.value?y.value.search(d.value).map(n=>n.item):x.value),e=U(()=>{const r=[],n=(i,u)=>{i.tasks||=[],i.tasks.push(u)},s=(i,u)=>{const h=u?u.tasks?.find(m=>m.name===i):r.find(m=>m.name===i);if(h)return{...h,type:"collection"};const c={name:i,handler:i,description:"",type:"collection",tasks:[]};return u?n(u,c):r.push(c),c};return t.value.forEach(i=>{let u;const h={...i,type:"task"},m=i.name.split(":").concat();m.length>0&&m[m.length-1].includes(".")&&m.pop(),m.forEach(f=>{u=s(f,u)}),u?n(u,h):r.push(h)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const s=ce,i=Re,u=ot,h=Ne,c=gt,m=Le,f=fe,M=ve,T=qe,W=Pe,V=de("tooltip");return g(),$(B,null,[k(h,{"storage-key":"tab-server-tasks"},{left:I(()=>[k(h,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:I(()=>[k(i,{search:d.value,"onUpdate:search":n[1]||(n[1]=E=>d.value=E),pb2:""},{actions:I(()=>[G(k(s,{"text-lg":"",icon:D(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(k(s,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=E=>L.value=!L.value)},null,512),[[V,"Default Inputs"]])]),default:I(()=>[v("div",Ot,[d.value?(g(),$("span",kt,R(t.value.length)+" matched · ",1)):j("",!0),v("span",xt,R(x.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),$(B,null,J(D(b)==="tree"?e.value:t.value,E=>(g(),A(me,{key:E.name,item:E},null,8,["item"]))),128))]),right:I(()=>[n[6]||(n[6]=v("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),v("div",null,[v("ul",null,[(g(!0),$(B,null,J(w.value,E=>(g(),$("li",{key:E.cron},[k(u,{collection:E},null,8,["collection"])]))),128))])])]),_:1})]),right:I(()=>[(g(),A(ze,{max:10},[o.value?(g(),A(c,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=E=>L.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(f,{key:0},{default:I(()=>[k(m,{px6:"",py2:""},{default:I(()=>n[7]||(n[7]=[v("span",{op75:""},"Select a task to start",-1)])),_:1})]),_:1}))]),_:1}),k(W,{modelValue:L.value,"onUpdate:modelValue":n[4]||(n[4]=E=>L.value=E),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=E=>L.value=!1)},{default:I(()=>[v("div",null,[n[8]||(n[8]=v("div",{p4:"",border:"b base"},[v("span",{"text-lg":""},"Default Inputs"),v("br"),v("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),k(T,{text:`Query ${D(_).query.length?`(${D(_).query.length})`:""}`,padding:!1,icon:D(he).query},{default:I(()=>[k(M,{modelValue:D(_).query,"onUpdate:modelValue":n[3]||(n[3]=E=>D(_).query=E),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default};
|
|
1
|
+
import{ba as re,E as oe,g as le,b7 as ke,Q as xe,J as Te,K as Se,ag as we,b8 as Xe,a as Ee,_ as ce,b5 as De,z as Ce,i as fe,ay as Me,B as Ie,bb as $e,N as Ue,U as Le,x as Ne}from"./hyzu9r3l.js";import{_ as Re}from"./nnavbar.vue-o88azs72.js";import{_ as pe}from"./nbadge-faqjde9j.js";import{a as Ae,p as K,f as z,q as U,P as $,a1 as g,Q as v,R as j,a3 as k,a8 as R,F as B,ae as J,X as Y,u as D,r as se,w as Ve,ag as de,S as A,aa as G,a2 as I,a9 as P,a4 as je,ax as Be,U as We,V as He,K as ze}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as ve}from"./server-route-inputs.vue-cm4adfbq.js";import{_ as Fe}from"./ncode-block.vue-bir2wz4z.js";import{S as he}from"./constants-b32h69zq.js";import{_ as qe}from"./nsection-block-lykty6mm.js";import{_ as Pe}from"./ndrawer.vue-eleqt68n.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";import"./ncheckbox.vue-kkq02s4e.js";import"./nselect.vue-j7i2gi7w.js";import"./client-gsjyqe32.js";import"./nicon-title.vue-dsf9ygne.js";var ne={exports:{}},ue;function Ye(){return ue||(ue=1,function(F,L){(function(x,w){F.exports=w()})(globalThis,()=>(()=>{var N={949:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),d=function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(s){return s.trim()}).filter(function(s){return s!==""}).map(function(s){return isNaN(Number(s))?s:Number(s)}).filter(function(s){return s!==null&&s!==""});r.length===0&&r.push("*"),r.sort(function(s,i){return s!==null&&i!==null?s-i:0}),e[a]=r.map(function(s){return s!==null?s.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(c){var m=c.replace(/\D/,""),f=m;return e.dayOfWeekStartIndexZero?m=="7"&&(f="0"):f=(parseInt(m)-1).toString(),c.replace(m,f)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(c){var m=c.replace(/\D/,""),f=m;return e.monthStartIndexZero&&(f=(parseInt(m)+1).toString()),c.replace(m,f)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in n)t[4]=t[4].replace(new RegExp(s,"gi"),n[s].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(c){return c!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var u=null;switch(i){case 4:u="12";break;case 5:u="6";break;case 6:u="9999";break;default:u=null;break}if(u!==null){var h=t[i].split("/");t[i]="".concat(h[0],"-").concat(u,"/").concat(h[1])}}},y.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},y.prototype.validateAnyRanges=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.validateOnlyExpectedCharactersFound=function(t,e){var a=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(a&&a.length)throw new Error("Expression contains invalid values: '".concat(a.toString(),"'"))},y}();p.CronParser=d},333:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),d=_(949),y=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,s=n===void 0?!0:n,i=r.verbose,u=i===void 0?!1:i,h=r.dayOfWeekStartIndexZero,c=h===void 0?!0:h,m=r.monthStartIndexZero,f=m===void 0?!1:m,M=r.use24HourTimeFormat,T=r.locale,W=T===void 0?null:T,V=r.tzOffset,E=V===void 0?0:V,H={throwExceptionOnParseError:s,verbose:u,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:M,locale:W,tzOffset:E};H.tzOffset&&console.warn("'tzOffset' option has been deprecated and will be removed in a future release.");var ee=new t(e,H);return ee.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var a=new d.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=a.parse();var r=this.getTimeOfDayDescription(),n=this.getDayOfMonthDescription(),s=this.getMonthDescription(),i=this.getDayOfWeekDescription(),u=this.getYearDescription();e+=r+n+i+s+u,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var s=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,s[0],""),this.formatTime(r,s[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var u=0;u<i.length;u++)n+=" ",n+=this.formatTime(i[u],a,""),u<i.length-2&&(n+=","),u==i.length-2&&(n+=this.i18n.spaceAnd())}else{var h=this.getSecondsDescription(),c=this.getMinutesDescription(),m=this.getHoursDescription();if(n+=h,n&&c&&(n+=", "),n+=c,c===m)return n;n&&m&&(n+=", "),n+=m}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(s){return s},function(s){return o.StringUtilities.format(e.i18n.everyX0Minutes(s),s)},function(s){return e.i18n.minutesX0ThroughX1PastTheHour()},function(s){try{return s=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(s)<20?e.i18n.atX0MinutesPastTheHour(s):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(s)}catch{return e.i18n.atX0MinutesPastTheHour(s)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=this.getSegmentDescription(a,this.i18n.everyHour(),function(i){return e.formatTime(i,"0","")},function(i){return o.StringUtilities.format(e.i18n.everyX0Hours(i),i)},function(i){return e.i18n.betweenX0AndX1()},function(i){return e.i18n.atX0()});if(r&&a.includes("-")&&this.expressionParts[1]!="0"){var n=Array.from(r.matchAll(/:00/g));if(n.length>1){var s=n[n.length-1].index;r=r.substring(0,s)+":59"+r.substring(s+3)}}return r},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,s){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var u=parseInt(i);if(e.options.tzOffset){var h=e.expressionParts[2],c=parseInt(h)+(e.options.tzOffset?e.options.tzOffset:0);c>=24?u++:c<0&&u--,u>6?u=0:u<0&&(u=6)}var m=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(s)[u]:a[u];if(n.indexOf("#")>-1){var f=null,M=n.substring(n.indexOf("#")+1),T=n.substring(0,n.indexOf("#"));switch(M){case"1":f=e.i18n.first(T);break;case"2":f=e.i18n.second(T);break;case"3":f=e.i18n.third(T);break;case"4":f=e.i18n.fourth(T);break;case"5":f=e.i18n.fifth(T);break}m=f+" "+m}return m},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var s=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(s):e.i18n.commaX0ThroughX1(s)},function(n){var s=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),u=n.substring(0,n.indexOf("#"));s=e.i18n.commaOnThe(i,u).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)s=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var h=e.expressionParts[3]!="*";s=h?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return s}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,s){return s&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(s)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var s=parseInt(n[0].replace("W","")),i=s==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var u=r.match(/L-(\d{1,2})/);if(u){var h=u[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(h),h);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(c){return c=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),c):c},function(c){return c=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(c)},function(c){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(c)},function(c){return e.i18n.commaOnDayX0OfTheMonth(c)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,s,i){var u=null,h=e.indexOf("/")>-1,c=e.indexOf("-")>-1,m=e.indexOf(",")>-1;if(!e)u="";else if(e==="*")u=a;else if(!h&&!c&&!m)u=o.StringUtilities.format(i(e),r(e));else if(m){for(var f=e.split(","),M="",T=0;T<f.length;T++)if(T>0&&f.length>2&&(M+=",",T<f.length-1&&(M+=" ")),T>0&&f.length>1&&(T==f.length-1||f.length==2)&&(M+="".concat(this.i18n.spaceAnd()," ")),f[T].indexOf("/")>-1||f[T].indexOf("-")>-1){var W=f[T].indexOf("-")>-1&&f[T].indexOf("/")==-1,V=this.getSegmentDescription(f[T],a,r,n,W?this.i18n.commaX0ThroughX1:s,i);W&&(V=V.replace(", ","")),M+=V}else h?M+=this.getSegmentDescription(f[T],a,r,n,s,i):M+=r(f[T]);h?u=M:u=o.StringUtilities.format(i(e),M)}else if(h){var f=e.split("/");if(u=o.StringUtilities.format(n(f[1]),f[1]),f[0].indexOf("-")>-1){var E=this.generateRangeSegmentDescription(f[0],s,r);E.indexOf(", ")!=0&&(u+=", "),u+=E}else if(f[0].indexOf("*")==-1){var H=o.StringUtilities.format(i(f[0]),r(f[0]));H=H.replace(", ",""),u+=o.StringUtilities.format(this.i18n.commaStartingX0(),H)}}else c&&(u=this.generateRangeSegmentDescription(e,s,r));return u},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",s=e.split("-"),i=r(s[0],1),u=r(s[1],2),h=a(e);return n+=o.StringUtilities.format(h,i,u),n},t.prototype.formatTime=function(e,a,r){var n=0,s=0;this.options.tzOffset&&(n=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),s=parseFloat((this.options.tzOffset%1).toFixed(2)),s!=0&&(s*=60));var i=parseInt(e)+n,u=parseInt(a)+s;u>=60?(u-=60,i+=1):u<0&&(u+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var h="",c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),h=c?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var m="";return r&&(m=":".concat(("00"+r).substring(r.length))),"".concat(c?h:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+u.toString()).substring(u.toString().length)).concat(m).concat(c?"":h)},t.prototype.transformVerbosity=function(e,a){return a||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();p.ExpressionDescriptor=y},747:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=_(486),d=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=d},486:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o}();p.en=_},515:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(d,y){if(!d)throw new Error(y)}var o=function(){function d(){}return d.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},d.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},d.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},d.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},d.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},d.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},d}();p.default=o},823:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function o(){}return o.format=function(d){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return d.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(d,y){return y.some(function(t){return d.indexOf(t)>-1})},o}();p.StringUtilities=_}},x={};function w(b){var p=x[b];if(p!==void 0)return p.exports;var _=x[b]={exports:{}};return N[b](_,_.exports,w),_.exports}var X={};return(()=>{var b=X;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=w(333),_=w(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),X})())}(ne)),ne.exports}var Ge=Ye();const Je=Ae(Ge),Ze=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(F){const L=F,N=re(),x=z(!0),w=U(()=>Je.toString(L.collection.cron));return(X,b)=>{const p=oe,_=pe;return g(),$("div",null,[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:w.value,onClick:b[0]||(b[0]=o=>x.value=!x.value)},[v("div",Qe,[k(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":x.value?90:0,transition:""},null,8,["transform-rotate"])]),v("span",Ke,[k(_,{class:"font-mono n-primary",textContent:R(X.collection.cron)},null,8,["textContent"]),v("span",et,R(w.value),1),v("span",tt,"("+R(X.collection.tasks.length)+")",1)])],8,Ze),b[2]||(b[2]=v("div",{"x-divider":""},null,-1)),x.value?(g(),$("ul",nt,[(g(!0),$(B,null,J(X.collection.tasks,o=>(g(),$("li",{key:o},[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:Y([{"bg-active":D(N)===o}]),onClick:d=>N.value=o},R(o),11,rt),b[1]||(b[1]=v("div",{"x-divider":""},null,-1))]))),128))])):j("",!0)])}}}),at={"h-full":"","w-full":"",flex:"~ col"},it={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},st={flex:"~ gap2 items-center"},ut={relative:"","w-full":""},lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ct={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ft={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},dt={key:0,border:"b base",relative:"","n-code-block":""},vt={flex:"~ wrap","w-full":""},ht=["onClick"],mt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},yt={key:1,"text-xs":"",op50:""},gt=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(F,{emit:L}){const N=F,x=L,w=z({payload:{}}),{inputDefaults:X}=le("serverRoutes"),[b,p]=ke(),_=xe(),o=Te(),d=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=U(()=>JSON.stringify(d.data,null,2)),t=U(()=>d.contentType.includes("application/json")?"json":"text"),e=z(!1),a=z(!1),r=Se(),n=z(),s=["json"],i=z(s[0]),u=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),h=U({get:()=>u[n.value],set:O=>{u[n.value]=O}}),c=U(()=>({...E(X.value.query),...E(u.query)})),m=U(()=>({...E(X.value.headers)})),f=U(()=>Object.keys(w.value?.payload??{}).length?{...w.value}:void 0),M=U(()=>f.value?"POST":"GET"),T=U(()=>{let O=window?.location.origin;return O.charAt(O.length-1)==="/"&&(O=O.slice(0,-1)),O}),W=U(()=>{let O=new URLSearchParams(c.value).toString();O&&(O=`?${O}`);const l=`/_nitro/tasks/${N.task.name}${O}`;let C=o.value?.app.baseURL||"";return(C==="./"||C===".")&&(C=""),C.endsWith("/")&&(C=C.slice(0,-1)),C+l}),V=U(()=>T.value+W.value);function E(O){const l=Object.fromEntries(O.filter(({active:C,key:q,value:Z})=>C&&q&&Z!==void 0).map(({key:C,value:q})=>[C,q]));return Object.entries(l).length?l:void 0}async function H(){a.value=!0,e.value=!0;const O=Date.now();Ie("server-tasks:run",{method:M.value});try{d.data=await $fetch(V.value,{method:"POST",headers:m.value,query:c.value,body:f.value,onResponse({response:l}){d.contentType=(l.headers.get("content-type")||"").toString().toLowerCase().trim(),d.statusCode=l.status,d.error=void 0},onResponseError(l){d.error=l.response._data,d.data=l.response._data}})}catch{}e.value=!1,d.fetchTime=Date.now()-O}const ee=U(()=>{const O=[];return O.push({name:"Query",slug:"query",length:u.query.length}),O.push({name:"Body",slug:"body",length:u.body.length}),O});Ve(()=>{if(i.value==="json"&&typeof w.value=="string")try{w.value=JSON.parse(w.value)}catch{}});const ae=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([u,n],()=>{const O=ae.value?.find(l=>l.task===N.task.name);if(O){n.value||(n.value=O.tab),O.tab!==n.value&&(O.tab=n.value);const{body:l,query:C,headers:q}=O.inputs;Object.assign(u,{body:l,query:C,headers:q})}else{const l={task:N.task.name,tab:"query",inputs:u};ae.value.push(l),n.value||(n.value=l.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(O,l)=>{const C=ce,q=Ce,Z=oe,ie=ve,ge=fe,_e=Me,te=pe,be=Fe,Q=de("tooltip");return g(),$("div",at,[v("div",it,[v("div",st,[G((g(),$("div",null,[k(C,{class:Y(["n-badge-base n-sm",D(De)(M.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:I(()=>[P(R(M.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${M.value} as ${M.value==="GET"?"no":""} json body is sent`]]),v("div",ut,[k(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),v("div",lt,[G(k(C,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:l[0]||(l[0]=S=>D(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(k(C,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:l[1]||(l[1]=S=>D(r)(O.task.handler))},null,512),[[Q,"Open in Editor"]])])]),k(C,{"h-full":"",n:"primary solid",onClick:H},{default:I(()=>[k(Z,{icon:"carbon:send"})]),_:1})])]),v("div",ct,[(g(!0),$(B,null,J(ee.value,S=>G((g(),A(C,{key:S.slug,class:Y(n.value===S.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Oe=>n.value=S.slug},{default:I(()=>[k(Z,{icon:D(he)[S.slug]},null,8,["icon"]),v("div",ft,[P(R(S.name)+" "+R(S?.length?`(${S.length})`:"")+" ",1),v("span",null,R(D(X)[S.slug]?.length?`(${D(X)[S.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,S.name]])),128))]),k(D(b),null,{default:I(()=>[k(ie,{modelValue:h.value,"onUpdate:modelValue":l[4]||(l[4]=S=>h.value=S),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:I(()=>[D(X)[n.value]?.length?(g(),$(B,{key:0},[v("div",pt,[l[6]||(l[6]=v("div",{"w-5":"","x-divider":""},null,-1)),l[7]||(l[7]=v("div",{"flex-none":""}," Default Inputs ",-1)),k(C,{icon:"i-carbon-edit",border:!1,onClick:l[2]||(l[2]=S=>x("openDefaultInput"))}),l[8]||(l[8]=v("div",{"x-divider":""},null,-1))]),k(ie,{modelValue:D(X)[n.value],"onUpdate:modelValue":l[3]||(l[3]=S=>D(X)[n.value]=S),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),h.value?(g(),$("div",dt,[n.value==="body"?(g(),$(B,{key:0},[v("div",vt,[(g(),$(B,null,J(s,S=>v("button",{key:S,px4:"",py2:"",border:"r base",hover:"bg-active",class:Y({"border-b":S!==i.value}),onClick:Oe=>i.value=S},[v("div",{class:Y({op30:S!==i.value}),"font-mono":""},R(S),3)],10,ht)),64)),l[9]||(l[9]=v("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(D(p),{key:0})):i.value==="json"?(g(),A(D(Be),je({key:1,modelValue:w.value,"onUpdate:modelValue":l[5]||(l[5]=S=>w.value=S),class:[D(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},O.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(D(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:I(()=>l[11]||(l[11]=[P(" Running... ")])),_:1})):(g(),$(B,{key:3},[v("div",mt,[l[13]||(l[13]=v("div",null,"Result",-1)),d.error?(g(),A(te,{key:0,n:"red"},{default:I(()=>l[12]||(l[12]=[P(" Error ")])),_:1})):j("",!0),k(te,{n:d.error?"orange":"green",textContent:R(d.statusCode)},null,8,["n","textContent"]),d.contentType?(g(),$("code",yt,R(d.contentType),1)):j("",!0),l[14]||(l[14]=v("div",{"flex-auto":""},null,-1)),l[15]||(l[15]=v("div",{op50:""}," Tasks finished in ",-1)),k(te,{n:"green"},{default:I(()=>[P(R(d.fetchTime)+" ms ",1)]),_:1})]),k(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:I(()=>[k(C,{n:"primary",onClick:H},{default:I(()=>[k(Z,{icon:"carbon:send"}),l[10]||(l[10]=P(" Run task "))]),_:1})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},me=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const L=z(!0),N=re();return(x,w)=>{const X=oe,b=me;return g(),$("div",null,[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:Y([{"bg-active":D(N)===x.item.name}]),style:He({paddingLeft:`calc(0.5rem + ${x.index*1.5}em)`}),onClick:w[0]||(w[0]=p=>{L.value=!L.value,N.value=x.item.name})},[v("div",_t,[x.item.type==="collection"?(g(),A(X,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":L.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),v("span",bt,[x.item.type==="collection"?(g(),A(X,{key:0,title:`${x.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(X,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+R(x.item.name),1)])],6),w[1]||(w[1]=v("div",{"x-divider":""},null,-1)),L.value?We(x.$slots,"default",{key:0},()=>[(g(!0),$(B,null,J(x.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:x.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),Ot={flex:"~ gap1","text-sm":""},kt={key:0,op50:""},xt={op50:""},Vt=K({__name:"server-tasks",setup(F){const L=z(!1),N=$e(),x=U(()=>Object.keys(N.value?.tasks??{}).map(r=>({name:r,...N.value.tasks[r],type:"task"}))),w=U(()=>Object.entries(N.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),X=re(),{view:b,selectedTask:p,inputDefaults:_}=le("serverTasks"),o=U(()=>{!X.value&&p.value&&(X.value=p.value.name);const r=x.value.find(n=>n.name===X.value);return X.value!==p.value?.name&&r&&(p.value=r),r}),d=z(""),y=U(()=>new Ue(x.value,{keys:["key","description"],shouldSort:!0})),t=U(()=>d.value?y.value.search(d.value).map(n=>n.item):x.value),e=U(()=>{const r=[],n=(i,u)=>{i.tasks||=[],i.tasks.push(u)},s=(i,u)=>{const h=u?u.tasks?.find(m=>m.name===i):r.find(m=>m.name===i);if(h)return{...h,type:"collection"};const c={name:i,handler:i,description:"",type:"collection",tasks:[]};return u?n(u,c):r.push(c),c};return t.value.forEach(i=>{let u;const h={...i,type:"task"},m=i.name.split(":").concat();m.length>0&&m[m.length-1].includes(".")&&m.pop(),m.forEach(f=>{u=s(f,u)}),u?n(u,h):r.push(h)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const s=ce,i=Re,u=ot,h=Ne,c=gt,m=Le,f=fe,M=ve,T=qe,W=Pe,V=de("tooltip");return g(),$(B,null,[k(h,{"storage-key":"tab-server-tasks"},{left:I(()=>[k(h,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:I(()=>[k(i,{search:d.value,"onUpdate:search":n[1]||(n[1]=E=>d.value=E),pb2:""},{actions:I(()=>[G(k(s,{"text-lg":"",icon:D(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(k(s,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=E=>L.value=!L.value)},null,512),[[V,"Default Inputs"]])]),default:I(()=>[v("div",Ot,[d.value?(g(),$("span",kt,R(t.value.length)+" matched · ",1)):j("",!0),v("span",xt,R(x.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),$(B,null,J(D(b)==="tree"?e.value:t.value,E=>(g(),A(me,{key:E.name,item:E},null,8,["item"]))),128))]),right:I(()=>[n[6]||(n[6]=v("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),v("div",null,[v("ul",null,[(g(!0),$(B,null,J(w.value,E=>(g(),$("li",{key:E.cron},[k(u,{collection:E},null,8,["collection"])]))),128))])])]),_:1})]),right:I(()=>[(g(),A(ze,{max:10},[o.value?(g(),A(c,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=E=>L.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(f,{key:0},{default:I(()=>[k(m,{px6:"",py2:""},{default:I(()=>n[7]||(n[7]=[v("span",{op75:""},"Select a task to start",-1)])),_:1})]),_:1}))]),_:1}),k(W,{modelValue:L.value,"onUpdate:modelValue":n[4]||(n[4]=E=>L.value=E),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=E=>L.value=!1)},{default:I(()=>[v("div",null,[n[8]||(n[8]=v("div",{p4:"",border:"b base"},[v("span",{"text-lg":""},"Default Inputs"),v("br"),v("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),k(T,{text:`Query ${D(_).query.length?`(${D(_).query.length})`:""}`,padding:!1,icon:D(he).query},{default:I(()=>[k(M,{modelValue:D(_).query,"onUpdate:modelValue":n[3]||(n[3]=E=>D(_).query=E),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as h}from"./nicon-title.vue-dsf9ygne.js";import{_ as ee}from"./nswitch.vue-jbyu7ls8.js";import{g as P,f as le,bm as oe,a0 as ne,bn as te,_ as ae,U as se,t as A,r as ie,bi as ue}from"./
|
|
1
|
+
import{_ as h}from"./nicon-title.vue-dsf9ygne.js";import{_ as ee}from"./nswitch.vue-jbyu7ls8.js";import{g as P,f as le,bm as oe,a0 as ne,bn as te,_ as ae,U as se,t as A,r as ie,bi as ue}from"./hyzu9r3l.js";import{_ as de}from"./nselect.vue-j7i2gi7w.js";import{_ as re}from"./ncheckbox.vue-kkq02s4e.js";import{_ as pe}from"./nlink.vue-c5755oy2.js";import{p as me,w as j,P as m,a1 as d,a3 as n,Q as o,F as v,ae as k,u as t,a2 as a,a9 as N,a8 as x,C as p,S as F,R as M,X as R}from"./vendor/json-editor-vue-llkaejaf.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";const fe={px8:"",py6:""},ve={grid:"~ lg:cols-2 gap-x-10 gap-y-3","max-w-300":""},ge={flex:"~ col gap-2"},be={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},xe={capitalize:"",op75:""},ye={"flex-auto":"","overflow-hidden":"","text-ellipsis":"","ws-nowrap":""},ce={flex:"~ col gap-2"},Ve=["value"],_e=["value"],ke=["value"],Ce={flex:"~ gap-2"},Se={flex:"~ gap-2"},Be=me({__name:"settings",setup(we){const{interactionCloseOnOutsideClick:C,showPanel:I,showHelpButtons:$,scale:z,hiddenTabs:y,pinnedTabs:u,hiddenTabCategories:c,minimizePanelInactive:S,sidebarExpanded:w,sidebarScrollable:D}=P("ui"),{openInEditor:E}=P("behavior"),V=le(),H=[["Auto",void 0],["VS Code","vscode"],["VS Code Insider","vscode-insider"],["Cursor","cursor"],["Zed","zed"],["WebStorm","webstorm"],["Sublime Text","sublime"],["Atom","atom"]],W=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],Q=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],X=oe(ne());function Z(s,e){e?y.value=y.value.filter(r=>r!==s):y.value.push(s)}function q(s,e){e?c.value=c.value.filter(r=>r!==s):c.value.push(s)}function G(s){u.value.includes(s)?u.value=u.value.filter(e=>e!==s):u.value.push(s)}function L(s,e){const r=u.value.indexOf(s);if(r===-1)return;const g=r+e;if(g<0||g>=u.value.length)return;const _=[...u.value];_.splice(r,1),_.splice(g,0,s),u.value=_}async function J(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await ie.clearOptions(),V.value?.app?.reload?.(),window.location.reload())}return j(()=>{V.value&&(V.value.app.frameState.value.closeOnOutsideClick=C.value)}),j(()=>{V.value&&(V.value.app.frameState.value.minimizePanelInactive=S.value)}),(s,e)=>{const r=h,g=ee,_=ue,f=ae,T=se,K=te,B=de,b=re,Y=pe;return d(),m("div",fe,[n(r,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),o("div",ve,[o("div",ge,[e[10]||(e[10]=o("h3",{"text-lg":""}," Tabs ",-1)),(d(!0),m(v,null,k(t(X),([l,O])=>(d(),m(v,{key:l},[O.length?(d(),F(T,{key:0,p3:"",flex:"~ col gap-1",class:R(t(c).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(g,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(c).includes(l),"onUpdate:modelValue":i=>q(l,i)},{default:a(()=>[o("div",be,[o("span",xe,x(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e[9]||(e[9]=o("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),(d(!0),m(v,null,k(O,i=>(d(),F(g,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(y).includes(i.name),"onUpdate:modelValue":U=>Z(i.name,U)},{default:a(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","of-hidden":"","pr-4":"",class:R(t(y).includes(i.name)?"op25":"")},[n(_,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),o("span",ye,x(i.title),1),t(u).includes(i.name)?(d(),m(v,{key:0},[n(f,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:U=>L(i.name,-1)},null,8,["disabled","onClick"]),n(f,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:U=>L(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(f,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:U=>G(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):M("",!0)],64))),128))]),o("div",ce,[e[29]||(e[29]=o("h3",{"text-lg":""}," Appearance ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[o("div",null,[n(K,null,{default:a(({toggle:l,isDark:O})=>[n(f,{n:"primary",onClick:l},{default:a(()=>[e[11]||(e[11]=o("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1)),N(" "+x(O.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),e[14]||(e[14]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[15]||(e[15]=o("p",null,"UI Scale",-1)),n(B,{modelValue:t(z),"onUpdate:modelValue":e[0]||(e[0]=l=>p(z)?z.value=l:null),n:"primary"},{default:a(()=>[(d(),m(v,null,k(W,l=>o("option",{key:l[0],value:l[1]},x(l[0]),9,Ve)),64))]),_:1},8,["modelValue"]),e[16]||(e[16]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),n(b,{modelValue:t(w),"onUpdate:modelValue":e[1]||(e[1]=l=>p(w)?w.value=l:null),"n-primary":""},{default:a(()=>e[12]||(e[12]=[o("span",null," Expand Sidebar ",-1)])),_:1},8,["modelValue"]),n(b,{modelValue:t(D),"onUpdate:modelValue":e[2]||(e[2]=l=>p(D)?D.value=l:null),disabled:t(w),"n-primary":""},{default:a(()=>e[13]||(e[13]=[o("span",null," Scrollable Sidebar ",-1)])),_:1},8,["modelValue","disabled"])]),_:1}),e[30]||(e[30]=o("h3",{mt2:"","text-lg":""}," Features ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(C),"onUpdate:modelValue":e[3]||(e[3]=l=>p(C)?C.value=l:null),"n-primary":""},{default:a(()=>e[17]||(e[17]=[o("span",null,"Close DevTools when clicking outside",-1)])),_:1},8,["modelValue"]),n(b,{modelValue:t($),"onUpdate:modelValue":e[4]||(e[4]=l=>p($)?$.value=l:null),"n-primary":""},{default:a(()=>e[18]||(e[18]=[o("span",null,"Show help buttons",-1)])),_:1},8,["modelValue"]),n(b,{modelValue:t(I),"onUpdate:modelValue":e[5]||(e[5]=l=>p(I)?I.value=l:null),"n-primary":""},{default:a(()=>e[19]||(e[19]=[o("span",null,"Show the floating panel",-1)])),_:1},8,["modelValue"]),e[20]||(e[20]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[21]||(e[21]=o("p",null,"Minimize floating panel on inactive",-1)),n(B,{modelValue:t(S),"onUpdate:modelValue":e[6]||(e[6]=l=>p(S)?S.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(d(),m(v,null,k(Q,l=>o("option",{key:l[0],value:l[1]},x(l[0]),9,_e)),64))]),_:1},8,["modelValue"]),e[22]||(e[22]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[23]||(e[23]=o("p",null,"Open In Editor",-1)),n(B,{modelValue:t(E),"onUpdate:modelValue":e[7]||(e[7]=l=>p(E)?E.value=l:null),"n-primary":""},{default:a(()=>[(d(),m(v,null,k(H,l=>o("option",{key:l[0],value:l[1]},x(l[0]),9,ke)),64))]),_:1},8,["modelValue"])]),_:1}),e[31]||(e[31]=o("h3",{mt2:"","text-lg":""}," Feedback ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(A),"onUpdate:modelValue":e[8]||(e[8]=l=>p(A)?A.value=l:null),"n-primary":""},{default:a(()=>[e[24]||(e[24]=o("span",null,"Send anonymous statistics, help us improving DevTools",-1)),n(Y,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),e[27]||(e[27]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),o("div",Ce,[n(f,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>e[25]||(e[25]=[o("div",{"i-carbon-data-enrichment":""},null,-1),N(" Ideas & Suggestions ")])),_:1}),n(f,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>e[26]||(e[26]=[o("div",{"i-carbon-debug":""},null,-1),N(" Bug Reports ")])),_:1})])]),_:1}),e[32]||(e[32]=o("h3",{mt2:"","text-lg":""}," Debug ",-1)),o("div",Se,[n(f,{n:"orange",onClick:J},{default:a(()=>e[28]||(e[28]=[o("div",{"i-carbon-breaking-change":""},null,-1),N(" Reset Local Settings & State ")])),_:1})])])])])}}});export{Be as default};
|
package/dist/client/_nuxt/{stacktrace-list.vue-cgia2cun.js → stacktrace-list.vue-izey048j.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as p}from"./filepath-item.vue-
|
|
1
|
+
import{_ as p}from"./filepath-item.vue-h7tvoozy.js";import{J as m}from"./hyzu9r3l.js";import{p as f,P as r,a1 as n,F as s,ae as _,Q as o,a8 as h,S as d,R as k}from"./vendor/json-editor-vue-llkaejaf.js";const g={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},x={"text-right":""},N={"ws-nowrap":""},B=f({__name:"StacktraceList",props:{stacktrace:{}},setup($){const i=m();function c(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const l=p;return n(),r("div",g,[(n(!0),r(s,null,_(a.stacktrace,(e,u)=>(n(),r(s,{key:u},[o("div",x,h(e.functionName||"(anonymous)"),1),o("div",N,[e.fileName?(n(),d(l,{key:0,filepath:`${c(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):k("",!0)])],64))),128))])}}});export{B as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as m,ar as o,r as n}from"./
|
|
1
|
+
import{f as m,ar as o,r as n}from"./hyzu9r3l.js";import{q as s}from"./vendor/json-editor-vue-llkaejaf.js";function u(){const p=m(),a=o("getComponents",()=>n.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(a.value||[]).find(t=>t.pascalName===e.pascalName)));return s(()=>[...l.value,...a.value||[]].sort((e,t)=>e.pascalName.localeCompare(t.pascalName)))}function i(){return o("getComponentsRelationships",()=>n.getComponentsRelationships())}export{i as a,u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C,Q as N,_ as O}from"./
|
|
1
|
+
import{C,Q as N,_ as O}from"./hyzu9r3l.js";import{_ as R}from"./data-schema-button.vue-3wc2g6px.js";import{p as j,m as g,E as D,j as E,ag as M,P as u,a1 as l,u as o,Q as m,R as p,U as P,X as d,a8 as b,a5 as $,a6 as z,F as k,aa as J,S as _,a3 as x,ax as A,a4 as F,n as Q}from"./vendor/json-editor-vue-llkaejaf.js";const U=["open"],T={flex:"~ gap2","select-none":"","items-center":"",px4:""},X={key:0,class:"bg-red:10 px5 py3 text-red"},K=j({__name:"StateEditor",props:{name:{},open:{type:Boolean},revision:{},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(h,{emit:V}){const t=h,s=C(t,"open",V,{passive:!0}),S=N(),i=g(),c=g();function f(){c.value=void 0;try{t.state?i.value=JSON.parse(JSON.stringify(t.state||{})):(typeof t.state=="number"||typeof t.state!="string")&&(i.value=t.state)}catch(e){console.error(e),c.value=e}}D(()=>{f(),E(()=>[t.revision,t.state],e=>{typeof e!="number"&&typeof e!="string"?v(e,t.state):i.value=t.state},{deep:!0})});function v(e,r){const n=e[1];for(const a in n)Array.isArray(n[a])?r[a]=n[a].slice():typeof n[a]=="object"&&n[a]!==null?v(n[a],r[a]):r[a]=n[a]}async function B(){f(),await Q()}return(e,r)=>{const n=O,a=R,w=M("tooltip");return l(),u("div",{class:"state-editor-details",open:e.name?o(s):!0},[m("div",T,[e.name?(l(),u("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(o(s)?"":"op50"),onClick:r[0]||(r[0]=y=>s.value=!o(s))},[m("div",{"i-carbon-chevron-right":"",transition:"",class:d(o(s)?"rotate-90 op0":"")},null,2),m("code",{px3:"",py1:"","font-mono":"",class:d(o(s)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},b(e.name),3)],2)):p("",!0),P(e.$slots,"actions",$(z({isOpen:o(s),name:e.name,state:e.state}))),o(s)?(l(),u(k,{key:1},[J(x(n,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:B},null,512),[[w,"Refresh View",void 0,{bottom:!0}]]),i.value&&!c.value?(l(),_(a,{key:0,getter:()=>({name:e.name,input:JSON.stringify(i.value)})},null,8,["getter"])):p("",!0)],64)):p("",!0)]),o(s)||!e.name?(l(),u(k,{key:0},[c.value?(l(),u("div",X," Error: "+b(c.value),1)):(l(),_(o(A),F({key:1,modelValue:i.value,"onUpdate:modelValue":r[1]||(r[1]=y=>i.value=y)},e.$attrs,{class:["json-editor-vue",[o(S)==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":t.readonly,indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"]))],64)):p("",!0)],8,U)}}});export{K as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as F}from"./nbadge-
|
|
1
|
+
import{_ as F}from"./nbadge-faqjde9j.js";import{_ as j}from"./ncode-block.vue-bir2wz4z.js";import{_ as A}from"./ncheckbox.vue-kkq02s4e.js";import{p as L,as as W,at as q,n as E,s as G,y as J,A as Q,_ as X,B as z,au as H,J as K,W as O,X as Y,av as Z,ar as ee}from"./hyzu9r3l.js";import{p as te,f as V,P as _,a1 as p,F as $,U as ae,a3 as o,R as w,u as s,a8 as B,S as ne,a2 as u,Q as v,a9 as c,q as oe}from"./vendor/json-editor-vue-llkaejaf.js";const se={key:0},le={p4:"",flex:"~ col gap-1"},re={class:"text-lg font-medium leading-6"},ue={flex:"~ gap-3",mt2:"","justify-end":""},_e=te({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const a=l,t=L(),{info:n,update:i,state:g,processId:y,restart:m}=W(a.packageName,a.options),k=V(!0),N=V(!0),U=q(),x=E(),D=G();async function C(){const r=await i(async e=>x.start(e));z("npm:update",{packageName:a.packageName,oldVersion:n.value?.current}),r&&N.value&&U.value.push({id:r,message:`${a.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&k.value&&(D.value=r,t.push("/modules/terminals"))}return(r,e)=>{const b=F,S=j,h=A,R=Q,P=X,T=J;return p(),_($,null,[ae(r.$slots,"default",{id:s(y),info:s(n),update:C,state:s(g),restart:s(m)},()=>[s(n)&&r.showVersion?(p(),_("code",se,B(`v${s(n).current}`),1)):w("",!0),s(n)?.latest?(p(),_($,{key:1},[s(n).needsUpdate?(p(),_("button",{key:0,onClick:e[0]||(e[0]=f=>C())},[o(b,{n:"green",title:"updates available",textContent:"updates available"})])):(p(),ne(b,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),o(s(x),null,{default:u(({resolve:f,args:I})=>[o(T,{"model-value":!0,onClose:d=>f(!1)},{default:u(()=>[v("div",le,[v("h3",re," Update "+B(a.packageName)+"? ",1),e[8]||(e[8]=v("p",{op50:""}," The following command will be executed in your terminal: ",-1)),o(S,{code:I[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),o(h,{modelValue:k.value,"onUpdate:modelValue":e[1]||(e[1]=d=>k.value=d),n:"primary"},{default:u(()=>e[3]||(e[3]=[c(" Navigate to terminal ")])),_:1},8,["modelValue"]),o(h,{modelValue:N.value,"onUpdate:modelValue":e[2]||(e[2]=d=>N.value=d),n:"primary"},{default:u(()=>e[4]||(e[4]=[c(" Restart Nuxt server after update ")])),_:1},8,["modelValue"]),v("div",ue,[o(R,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>e[5]||(e[5]=[c(" Please make sure to backup your project first. ")])),_:1}),o(P,{onClick:d=>f(!1)},{default:u(()=>e[6]||(e[6]=[c(" Cancel ")])),_:2},1032,["onClick"]),o(P,{n:"solid primary",onClick:d=>f(!0)},{default:u(()=>e[7]||(e[7]=[c(" Update ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),M=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function ie(){return ee("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(a=>!M.includes(a.npm)&&a.compatibility.nuxt.includes(">=3")))}function ve(){return H("installed-modules",()=>{const l=K(),a=ie();return oe(()=>(l.value?._installedModules||[]).map(t=>{if(!t.entryPath)return;const n=!!(t.entryPath&&O(t.entryPath)),i=t.meta?.name?t.meta?.name:t.entryPath?n?Y(t.entryPath):l.value?.rootDir?Z(t.entryPath,l.value?.rootDir).path:void 0:void 0,g=!!l.value?.modules?.includes(i),y=a.value?.find(m=>m.npm===i)||a.value?.find(m=>m.name===i);return{name:i,isPackageModule:n,isUninstallable:g,info:y,...t}}).filter(t=>t&&(!t.name||!M.includes(t.name))))})}export{_e as _,ie as a,ve as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as ne,bc as ae,p as oe,q as z,D as se,r as f,m as k,x as le,z as re,E as ue,_ as ie,i as de,U as pe,bd as E,a3 as me}from"./
|
|
1
|
+
import{Q as ne,bc as ae,p as oe,q as z,D as se,r as f,m as k,x as le,z as re,E as ue,_ as ie,i as de,U as pe,bd as E,a3 as me}from"./hyzu9r3l.js";import{_ as ve}from"./nselect.vue-j7i2gi7w.js";import{_ as fe}from"./nlink.vue-c5755oy2.js";import{_ as ce}from"./filepath-item.vue-h7tvoozy.js";import{p as Q,f as U,az as R,I as ye,j as _e,w as ge,q as ke,S as m,u as c,a1 as s,a2 as r,P as u,Q as l,aa as xe,R as T,W as M,a9 as i,a3 as d,a8 as x,X as F,ax as be,a4 as we,an as Ce,ai as Ke,ae as q,F as b,C as Se}from"./vendor/json-editor-vue-llkaejaf.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";const Ve={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ne={class:"w-full text-sm"},$e=["value"],Ie=["onClick"],he={key:0,"h-full":"","of-hidden":"",flex:"~ col"},je={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},De={class:"flex items-center gap-4"},Ue={key:1},Me=["onKeyup"],qe={key:0,op50:""},Ae={key:1},Be={"font-bold":""},Le={"text-sm":""},Pe=Q({__name:"StorageDetails",async setup(W){let p,_;const w=ne(),C=ae(),K=oe(),S=U(""),g=U(""),o=z("storage:current",""),t=U(),y=z("storage:file:state",""),{data:V}=([p,_]=R(()=>E("storageMounts",()=>f.getStorageMounts())),p=await p,_(),p),{data:N,refresh:A}=([p,_]=R(async()=>E("storageKeys",async()=>o.value?await f.getStorageKeys(o.value):[])),p=await p,_(),p),G=C.hook("storage:key:update",async(n,e)=>{if(!(!o.value||n.split(":")[0]!==o.value)&&(await A(),y.value===n)){if(e==="remove")return K.replace({query:{storage:o.value}});await I(y.value)}});ye(G),_e(o,()=>{A(),y.value=""}),ge(async()=>{if(!y.value){t.value=null;return}I(y.value)}),se("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(h(),n.preventDefault())});function $(n){return n.replace(`${o.value}:`,"")}const O=ke(()=>N.value?N.value.filter(n=>n.includes(S.value)):[]);async function I(n){const e=await f.getStorageItem(await k(),n);t.value={key:n,updatedKey:$(n),editingKey:!1,content:e,updatedContent:e}}async function X(){if(!g.value||!o.value)return;const n=`${o.value}:${g.value}`;N.value?.includes(n)||await f.setStorageItem(await k(),n,""),K.replace({query:{storage:o.value,key:n}}),g.value=""}async function h(){t.value&&(await f.setStorageItem(await k(),t.value.key,t.value.updatedContent),await I(t.value.key))}async function H(){!t.value||!o.value||(await f.removeStorageItem(await k(),t.value.key),t.value=null)}async function J(){if(!t.value||!o.value)return;const n=`${o.value}:${t.value.updatedKey}`,e=await k();await f.setStorageItem(e,n,t.value.updatedContent),await f.removeStorageItem(e,t.value.key),K.replace({query:{storage:o.value,key:n}})}return(n,e)=>{const j=ie,Y=ve,D=re,Z=ue,B=fe,L=pe,P=de,ee=le,te=ce;return c(o)?(s(),m(ee,{key:0,"storage-key":"tab-storage"},{left:r(()=>[l("div",Ve,[d(j,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:e[0]||(e[0]=a=>o.value="")}),l("div",Ne,[d(Y,{modelValue:c(o),"onUpdate:modelValue":e[1]||(e[1]=a=>Se(o)?o.value=a:null),n:"primary",icon:"carbon-data-base"},{default:r(()=>[(s(!0),u(b,null,q(c(V),(a,v)=>(s(),u("option",{key:v,value:v},x(v),9,$e))),128))]),_:1},8,["modelValue"])])]),d(D,{modelValue:S.value,"onUpdate:modelValue":e[2]||(e[2]=a=>S.value=a),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(s(!0),u(b,null,q(O.value,a=>(s(),u(b,{key:a},[l("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:F(a===t.value?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:v=>y.value=a},x($(a)),11,Ie),e[8]||(e[8]=l("div",{"x-divider":""},null,-1))],64))),128)),d(D,{modelValue:g.value,"onUpdate:modelValue":e[3]||(e[3]=a=>g.value=a),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:M(X,["enter"])},null,8,["modelValue"])]),right:r(()=>[t.value?.key?(s(),u("div",he,[l("div",je,[l("div",De,[t.value.editingKey?(s(),m(D,{key:0,modelValue:t.value.updatedKey,"onUpdate:modelValue":e[4]||(e[4]=a=>t.value.updatedKey=a),onKeyup:M(J,["enter"])},null,8,["modelValue"])):(s(),u("code",Ue,[i(x($(t.value.key))+" ",1),d(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:e[5]||(e[5]=a=>t.value.editingKey=!0)})])),t.value.editingKey?T("",!0):(s(),m(j,{key:2,n:"green xs",disabled:t.value.content===t.value.updatedContent,class:F({"border-green":t.value.content!==t.value.updatedContent}),onClick:h},{default:r(()=>e[9]||(e[9]=[i(" Save ")])),_:1},8,["disabled","class"]))]),l("div",null,[d(j,{n:"red xs",onClick:H},{default:r(()=>e[10]||(e[10]=[i(" Delete ")])),_:1})])]),typeof t.value.content=="object"?(s(),m(c(be),we({key:0,modelValue:t.value.updatedContent,"onUpdate:modelValue":e[6]||(e[6]=a=>t.value.updatedContent=a),class:[[c(w)==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):xe((s(),u("textarea",{key:1,"onUpdate:modelValue":e[7]||(e[7]=a=>t.value.updatedContent=a),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:M(Ke(h,["ctrl"]),["enter"])},null,40,Me)),[[Ce,t.value.updatedContent]])])):(s(),m(P,{key:1},{default:r(()=>[d(L,{px6:"",py4:""},{default:r(()=>[e[12]||(e[12]=i(" Select one key to start.")),e[13]||(e[13]=l("br",null,null,-1)),e[14]||(e[14]=i("Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[11]||(e[11]=[i(" Nitro storage ")])),_:1})]),_:1})]),_:1}))]),_:1})):(s(),m(P,{key:1},{default:r(()=>[Object.keys(c(V)).length?(s(),u("p",qe," Select one storage to start: ")):(s(),u("p",Ae,[e[16]||(e[16]=i(" No custom storage defined in ")),e[17]||(e[17]=l("code",null,"nitro.storage",-1)),e[18]||(e[18]=i(".")),e[19]||(e[19]=l("br",null,null,-1)),e[20]||(e[20]=i(" Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[15]||(e[15]=[i(" Nitro storage ")])),_:1})])),(s(!0),u(b,null,q(c(V),(a,v)=>(s(),m(L,{key:v,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:ze=>o.value=v},{default:r(()=>[l("span",Be,x(v),1),e[21]||(e[21]=l("br",null,null,-1)),l("span",Le,x(a.driver)+" driver",1),e[22]||(e[22]=l("br",null,null,-1)),a.base?(s(),m(te,{key:0,"text-xs":"",filepath:a.base},null,8,["filepath"])):T("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Oe=Q({__name:"storage",setup(W){return(p,_)=>{const w=Pe,C=me;return s(),m(C,null,{default:r(()=>[d(w)]),_:1})}}});export{Oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bc as E,D as B,r as f,m as _,_ as $,be as V,s as D,E as F,a3 as P}from"./
|
|
1
|
+
import{bc as E,D as B,r as f,m as _,_ as $,be as V,s as D,E as F,a3 as P}from"./hyzu9r3l.js";import{x as R,a as I}from"./vendor/xterm-dbpzgj7s.js";import{p as y,f as g,E as M,P as d,a1 as t,F as A,Q as c,a3 as N,S as m,R as v,a8 as p,q,w as z,u as w,ae as L,a9 as C,X as h,ai as S,a2 as j}from"./vendor/json-editor-vue-llkaejaf.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";const Q={border:"t base",flex:"~ gap-2","items-center":"",p2:""},X={"text-sm":"",op50:""},G=y({__name:"TerminalView",props:{id:{}},setup(b){const n=b,i=g(),r=E(),o=g();let a;M(async()=>{a=new R.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const u=new I.FitAddon;a.loadAddon(u),a.open(i.value),u.fit(),B(window,"resize",()=>{u.fit()}),o.value=await f.getTerminalDetail(await _(),n.id),o.value?.buffer&&a.write(o.value.buffer),r.hook("devtools:terminal:data",({id:e,data:l})=>{e===n.id&&a.write(l)})});async function s(){f.runTerminalAction(await _(),n.id,"clear"),a?.clear()}async function k(){f.runTerminalAction(await _(),n.id,"restart")}async function x(){f.runTerminalAction(await _(),n.id,"terminate")}return(u,e)=>{const l=$;return t(),d(A,null,[c("div",{ref_key:"container",ref:i,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",Q,[N(l,{title:"Clear",icon:"i-carbon-clean",border:!1,onClick:e[0]||(e[0]=T=>s())}),o.value?.restartable?(t(),m(l,{key:0,title:"Restart",icon:"carbon-renew",border:!1,onClick:e[1]||(e[1]=T=>k())})):v("",!0),o.value?.terminatable?(t(),m(l,{key:1,title:"Terminate",icon:"carbon-delete",border:!1,onClick:e[2]||(e[2]=T=>x())})):v("",!0),c("span",X,p(o.value?.description),1)])],64)}}}),H={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},J={flex:"~",border:"b base","flex-1":"","items-center":"","n-navbar-glass":""},K=["onClick"],O={key:1,p10:""},U={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},W=y({__name:"TerminalPage",setup(b){const n=V(),i=D(),r=q(()=>n.value?.find(a=>a.id===i.value));async function o(a){f.runTerminalAction(await _(),a,"remove")}return z(()=>{!i.value&&n.value?.length&&(i.value=n.value[0].id)}),(a,s)=>{const k=F,x=$,u=G;return w(n)?.length?(t(),d("div",H,[c("div",J,[(t(!0),d(A,null,L(w(n),e=>(t(),d("button",{key:e.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:h(e.id===r.value?.id?"bg-active":""),onClick:l=>i.value=e.id},[e.icon?(t(),m(k,{key:0,icon:e.icon},null,8,["icon"])):v("",!0),c("span",{class:h(e.id===r.value?.id?"":"op50")},p(e.name)+p(e.isTerminated?" (terminated)":""),3),e.isTerminated?(t(),m(x,{key:1,icon:"carbon-close","mx--2":"",border:!1,onClick:S(l=>o(e.id),["stop"])},null,8,["onClick"])):v("",!0)],10,K))),128))]),r.value?(t(),m(u,{id:r.value.id,key:r.value.id},null,8,["id"])):(t(),d("div",O,[s[0]||(s[0]=C(" Terminal ")),c("code",null,p(w(i)),1),s[1]||(s[1]=C(" not found "))]))])):(t(),d("div",U,s[2]||(s[2]=[c("em",{op50:""},"No terminal attached",-1)])))}}}),ae=y({__name:"terminals",setup(b){return(n,i)=>{const r=W,o=P;return t(),m(o,null,{default:j(()=>[N(r)]),_:1})}}});export{ae as default};
|