@nuxt/devtools 4.0.0-alpha.17 → 4.0.0-alpha.19

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.
Files changed (78) hide show
  1. package/dist/_nuxt/{CodeDiff-DgjeLx6z.js.map.json → CodeDiff-BhzZ6fTd.js.map.json} +1 -1
  2. package/dist/_nuxt/{CodeSnippets-CgfcaS4Z.js.map.json → CodeSnippets-C7LxVstU.js.map.json} +1 -1
  3. package/dist/_nuxt/{ComposableItem-BWQR7_fI.js.map.json → ComposableItem-C0rRVuVk.js.map.json} +1 -1
  4. package/dist/_nuxt/{DataSchemaButton-CqEfc2TV.js.map.json → DataSchemaButton-D-t7Fd9O.js.map.json} +1 -1
  5. package/dist/_nuxt/{DataSchemaDrawer-Xj8YzNJN.js.map.json → DataSchemaDrawer-CRqKi4Gs.js.map.json} +1 -1
  6. package/dist/_nuxt/{FilepathItem-D75bkTSa.js.map.json → FilepathItem-QhFtdBo3.js.map.json} +1 -1
  7. package/dist/_nuxt/{HelpFab-CH7NlsDf.js.map.json → HelpFab-DsqK9feu.js.map.json} +1 -1
  8. package/dist/_nuxt/{LaunchPage-ByG-3KVi.js.map.json → LaunchPage-DvnAdXoI.js.map.json} +1 -1
  9. package/dist/_nuxt/{NCheckbox-OMIu_LTG.js.map.json → NCheckbox-C4hTNEJ1.js.map.json} +1 -1
  10. package/dist/_nuxt/{NDrawer-C6Opm19C.js.map.json → NDrawer-CkklqKLr.js.map.json} +1 -1
  11. package/dist/_nuxt/{NDropdown-DseEG3tA.js.map.json → NDropdown-CgrUsKt7.js.map.json} +1 -1
  12. package/dist/_nuxt/NIcon-50gk2nbO.js.map.json +1 -0
  13. package/dist/_nuxt/{NLink-Rsxlt1NN.js.map.json → NLink-CatISrot.js.map.json} +1 -1
  14. package/dist/_nuxt/{NNavbar-CS-Z1Cle.js.map.json → NNavbar-Du6Evn0c.js.map.json} +1 -1
  15. package/dist/_nuxt/{NSectionBlock-C7kcMkbf.js.map.json → NSectionBlock-CWogkb2Y.js.map.json} +1 -1
  16. package/dist/_nuxt/{NSelect-geGP1eOG.js.map.json → NSelect-C1Q6pEoo.js.map.json} +1 -1
  17. package/dist/_nuxt/{NSelectTabs-nUMnNQy-.js.map.json → NSelectTabs-ccruddjj.js.map.json} +1 -1
  18. package/dist/_nuxt/{NSplitPane-Bh0o_t5e.js.map.json → NSplitPane-CtaObqWQ.js.map.json} +1 -1
  19. package/dist/_nuxt/{NTip-DRnTpLjG.js.map.json → NTip-DdMJ2p97.js.map.json} +1 -1
  20. package/dist/_nuxt/{ServerRouteInputs-BhIrPxPN.js.map.json → ServerRouteInputs-Y1oZjFFT.js.map.json} +1 -1
  21. package/dist/_nuxt/{StacktraceList-B-ehJIQ-.js.map.json → StacktraceList-c-F2IS3F.js.map.json} +1 -1
  22. package/dist/_nuxt/{StateEditor-Yqdbqk_c.js.map.json → StateEditor-CDR7gMTz.js.map.json} +1 -1
  23. package/dist/_nuxt/{__blank-BM2yOFO6.js.map.json → __blank-C9tG8tKE.js.map.json} +1 -1
  24. package/dist/_nuxt/{analyze-build-Cemp_oBq.js.map.json → analyze-build-BqtehgeE.js.map.json} +1 -1
  25. package/dist/_nuxt/assets-BuVkFuYO.js.map.json +1 -0
  26. package/dist/_nuxt/{components-BJnHweOE.js.map.json → components-uGD7fpTl.js.map.json} +1 -1
  27. package/dist/_nuxt/custom-_name_-CL9ijc8K.js.map.json +1 -0
  28. package/dist/_nuxt/{debug-BcJZ8M6i.js.map.json → debug-D10Jwem2.js.map.json} +1 -1
  29. package/dist/_nuxt/entry-CqsJq8Bj.js.map.json +1 -0
  30. package/dist/_nuxt/{error-404-dySA7T2P.js.map.json → error-404-B3hvNTTL.js.map.json} +1 -1
  31. package/dist/_nuxt/{error-500-2Ody89Er.js.map.json → error-500-C707LWWo.js.map.json} +1 -1
  32. package/dist/_nuxt/{error-hGc4cWUU.js.map.json → error-D03t_7ms.js.map.json} +1 -1
  33. package/dist/_nuxt/{head-BTCtirw3.js.map.json → head-BHeO3WM1.js.map.json} +1 -1
  34. package/dist/_nuxt/{hooks-BVzlIVXR.js.map.json → hooks-Dao-RDzo.js.map.json} +1 -1
  35. package/dist/_nuxt/{imports-B3k4BZF7.js.map.json → imports-CY-qGueB.js.map.json} +1 -1
  36. package/dist/_nuxt/{modules-Ck915TxZ.js.map.json → modules-BTU4bGX2.js.map.json} +1 -1
  37. package/dist/_nuxt/nuxt-CU0ot_Hr.js.map.json +1 -0
  38. package/dist/_nuxt/{nuxt-link-C-BBeF5l.js.map.json → nuxt-link-DVKhBKYR.js.map.json} +1 -1
  39. package/dist/_nuxt/{open-graph-ll_bjX_m.js.map.json → open-graph-DrWy0sHo.js.map.json} +1 -1
  40. package/dist/_nuxt/overview-DMlMZwOJ.js.map.json +1 -0
  41. package/dist/_nuxt/{pages-CrUWMxGz.js.map.json → pages-BqpyOhlp.js.map.json} +1 -1
  42. package/dist/_nuxt/{pages-DWELoQlh.js.map.json → pages-Dpy3RGh8.js.map.json} +1 -1
  43. package/dist/_nuxt/{pages-BddDWJsZ.js.map.json → pages-SVg8-7rL.js.map.json} +1 -1
  44. package/dist/_nuxt/{payload-29bFuqLh.js.map.json → payload-B4tGg_yJ.js.map.json} +1 -1
  45. package/dist/_nuxt/{plugins-fmmRaH-S.js.map.json → plugins-sOeLpXdK.js.map.json} +1 -1
  46. package/dist/_nuxt/{ready-BQ1fhXgL.js.map.json → ready-DyAGZGXh.js.map.json} +1 -1
  47. package/dist/_nuxt/{runtime-configs-iL68LNkj.js.map.json → runtime-configs-CKsHjoDA.js.map.json} +1 -1
  48. package/dist/_nuxt/server-routes-Dr4xIhnL.js.map.json +1 -0
  49. package/dist/_nuxt/server-tasks-DVSMIJ23.js.map.json +1 -0
  50. package/dist/_nuxt/{settings-Qa45tU8e.js.map.json → settings-ClAb5Ncw.js.map.json} +1 -1
  51. package/dist/_nuxt/{state-components-CksF081b.js.map.json → state-components-CUy4qfKa.js.map.json} +1 -1
  52. package/dist/_nuxt/state-modules-BiTBg3sT.js.map.json +1 -0
  53. package/dist/_nuxt/{state-tabs-m1o-BX5R.js.map.json → state-tabs-DyXoC_gu.js.map.json} +1 -1
  54. package/dist/_nuxt/storage-Bl77u--J.js.map.json +1 -0
  55. package/dist/_nuxt/{timeline-Dukbqafi.js.map.json → timeline-RijyQyqW.js.map.json} +1 -1
  56. package/dist/_nuxt/utils-B-D4Pftb.js.map.json +1 -0
  57. package/dist/_nuxt/{virtual-files-BQJM45QE.js.map.json → virtual-files-DKOje2lN.js.map.json} +1 -1
  58. package/dist/_nuxt/virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.server-pxhz0pzP.js.map.json +1 -0
  59. package/dist/chunks/analyze-build.mjs +1 -1
  60. package/dist/chunks/module-main.mjs +92 -61
  61. package/dist/chunks/vite-inspect.mjs +1 -1
  62. package/dist/index.mjs.map.json +1 -1
  63. package/dist/module.json +1 -1
  64. package/dist/runtime/shared/hooks.d.ts +10 -2
  65. package/dist/server.mjs.map.json +1 -1
  66. package/package.json +24 -24
  67. package/dist/_nuxt/AuthRequiredPanel-znjaI7oT.js.map.json +0 -1
  68. package/dist/_nuxt/NIcon-cjduOh_B.js.map.json +0 -1
  69. package/dist/_nuxt/assets-rTFAaows.js.map.json +0 -1
  70. package/dist/_nuxt/custom-_name_-DI8dnRDD.js.map.json +0 -1
  71. package/dist/_nuxt/entry-DZwY6FLS.js.map.json +0 -1
  72. package/dist/_nuxt/nuxt-C5VITehY.js.map.json +0 -1
  73. package/dist/_nuxt/overview-CyqDmfdE.js.map.json +0 -1
  74. package/dist/_nuxt/server-routes-Dy5_Ljmu.js.map.json +0 -1
  75. package/dist/_nuxt/server-tasks-CD-7IPFD.js.map.json +0 -1
  76. package/dist/_nuxt/state-modules-CyH4hWeN.js.map.json +0 -1
  77. package/dist/_nuxt/storage-BylO3p9r.js.map.json +0 -1
  78. package/dist/_nuxt/utils-BfB0tRbX.js.map.json +0 -1
@@ -1 +0,0 @@
1
- {"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SACL,UAAW,GAAG,YAAa,yBAAyB;MACnD,KAAK;MACL,YAAY,SAAS;MACrB,wBAAwB,WAAiB,SAAW,QAAQ;KAC9D,GAAG,MAAM,GAAG,CAAC,cAAc,qBAAqB,CAAC,KACjD,mBAAoB,IAAI,IAAI,CAClC;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,QAAQ;EAChB;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/AssetDropZone.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetDropZone.vue","../../../../../../../../components/AssetFontPreview.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetFontPreview.vue","../../../../../../../../components/AssetPreview.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetPreview.vue","../../../../../../../../components/AssetGridItem.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetGridItem.vue","../../../../../../../../components/AssetListItem.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetListItem.vue","../../../../../../../../components/AssetDetails.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetDetails.vue","../../../../../../../../pages/modules/assets.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/assets.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode } from \"vue\"\nimport { ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderComponent as _ssrRenderComponent, ssrRenderAttr as _ssrRenderAttr, ssrRenderAttrs as _ssrRenderAttrs, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AssetEntry } from '~/../src/types'\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { rpc, wsConnecting, wsError } from '~/composables/rpc'\nimport { telemetry } from '~/composables/telemetry'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetDropZone',\n __ssrInlineRender: true,\n props: {\n modelValue: {\n type: Boolean,\n required: true,\n },\n folder: {\n type: String,\n required: true,\n },\n},\n setup(__props) {\n\nconst props = __props\n\nconst FILE_EXT_RE = /\\.\\w+$/\n\nconst visible = useVModel(props, 'modelValue')\nconst lastTarget = ref()\n\nconst files = ref<File[]>([])\n\nfunction onDragEnter(e: DragEvent) {\n lastTarget.value = e.target\n visible.value = true\n}\nfunction onDragLeave(e: DragEvent) {\n if (e.target === lastTarget.value)\n visible.value = false\n}\nfunction onDragOver(e: DragEvent) {\n e.preventDefault()\n}\n\nfunction onDrop(e: DragEvent) {\n e.preventDefault()\n setFiles(e.dataTransfer!.files)\n}\n\nfunction setFiles(data: FileList | null) {\n const inputFiles = [...data || []]\n if (inputFiles.length) {\n const newFiles: File[] = []\n const existingFileNames: string[] = files.value.map(file => file.name)\n for (const file of inputFiles) {\n if (existingFileNames.includes(file.name)) {\n let i = 1\n const [name, ext] = file.name.split('.')\n while (existingFileNames.includes(`${name} (${i}).${ext}`))\n i++\n const newFilename = `${name}-${i}.${ext}`\n const blob = new Blob([file], { type: file.type })\n const newFile = new File([blob], newFilename, { lastModified: Date.now() })\n newFiles.push(newFile)\n existingFileNames.push(newFilename)\n }\n else {\n if (file.type === '') {\n devtoolsUiShowNotification({\n message: 'Folders are not supported yet',\n icon: 'carbon:face-dissatisfied',\n classes: 'text-orange',\n })\n }\n newFiles.push(file)\n }\n }\n files.value = [...files.value, ...newFiles]\n }\n}\n\nasync function uploadFiles() {\n if (wsConnecting.value || wsError.value)\n return\n\n telemetry('assets:upload')\n\n const uploadFiles: AssetEntry[] = []\n for (const file of files.value) {\n const reader = new FileReader()\n reader.readAsDataURL(file)\n const result = await new Promise((resolve) => {\n reader.onload = () => resolve(reader.result as string)\n }) as string\n // TODO: add validation\n const content = result.split(';base64,').pop() as string\n uploadFiles.push({\n path: file.name,\n encoding: 'base64',\n content,\n })\n }\n await rpc.writeStaticAssets([...uploadFiles], props.folder).then(() => {\n close()\n devtoolsUiShowNotification({\n message: 'Files uploaded successfully!',\n icon: 'i-carbon:checkmark',\n })\n }).catch((error) => {\n close()\n devtoolsUiShowNotification({\n message: `Error uploading files: ${error?.message ?? 'unknown'}`,\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n })\n visible.value = false\n}\n\nfunction removeFile(index: number) {\n files.value?.splice(index, 1)\n}\n\nfunction blobIt(file: File) {\n return URL.createObjectURL(file)\n}\n\nfunction changeName(file: File, newName: string) {\n const [name, ext] = file.name.split('.')\n const baseName = newName.replace(FILE_EXT_RE, '')\n const newFileName = `${baseName}.${ext}`\n if (baseName.length === 0) {\n // TODO: with proper dialog\n // eslint-disable-next-line no-alert\n alert('File name must be at least 1 characters long')\n return name\n }\n Object.defineProperty(file, 'name', { value: newFileName, writable: false })\n files.value.splice(files.value.indexOf(file), 1, file)\n return file\n}\n\nfunction clearFiles() {\n files.value = []\n}\n\nfunction close() {\n visible.value = false\n clearFiles()\n}\n\nuseEventListener('dragenter', onDragEnter)\nuseEventListener('dragleave', onDragLeave)\nuseEventListener('dragover', onDragOver)\nuseEventListener('drop', onDrop)\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n fixed: \"\",\n \"bottom-0\": \"\",\n \"left-13\": \"\",\n \"right-0\": \"\",\n \"top-0\": \"\",\n \"z-10\": \"\",\n \"backdrop-blur-20\": \"\",\n \"transition-all\": \"\",\n class: _unref(visible) ? 'opacity-100 visible' : 'opacity-0 invisible'\n }, _attrs))}>`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n icon: \"carbon-close\",\n title: \"Close\",\n absolute: \"\",\n \"right-5\": \"\",\n \"top-5\": \"\",\n \"z-20\": \"\",\n \"text-xl\": \"\",\n border: false,\n onClick: close\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Close', void 0, { \"bottom-end\": true })), null, _parent))\n if (!files.value?.length) {\n _push(`<div h-full w-full flex items-center justify-center><label for=\"drop-zone-input\" text-3xl hover=\"text-green cursor-pointer\" transition-all>`)\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon-cloud-upload\",\n \"mr-2\": \"\"\n }, null, _parent))\n _push(` Drop files here or click to select </label><input id=\"drop-zone-input\" type=\"file\" multiple hidden></div>`)\n } else {\n _push(`<div relative h-full w-full grid=\"~ rows-[max-content_1fr_max-content]\"><div px6 py6><h1 text-2xl> Upload </h1><p text-sm op50> Drag and drop files to upload </p></div><div grid=\"~ cols-minmax-8rem gap-8\" overflow-auto p6><!--[-->`)\n _ssrRenderList(files.value, (file, index) => {\n _push(`<div flex=\"~ col gap-2\" relative h-50 w-40 items-center><div flex items-center justify-center of-hidden rounded rounded-t-lg bg-active object-cover class=\"aspect-1/1\" border=\"~ base\"><img h-full w-full rounded-t-lg object-cover${_ssrRenderAttr(\"src\", blobIt(file))}></div><div flex=\"~ gap1\" items-center>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n n: \"xs\",\n \"h-full\": \"\",\n \"flex-auto\": \"\",\n \"model-value\": file.name,\n \"onUpdate:modelValue\": ($event: any) => (changeName(file, (($event as any).target as HTMLInputElement).value))\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"red\",\n icon: \"carbon-trash-can\",\n \"h-full\": \"\",\n \"flex-none\": \"\",\n title: \"Remove file\",\n onClick: ($event: any) => (removeFile(index))\n }, null, _parent))\n _push(`</div></div>`)\n })\n _push(`<!--]--></div><div flex=\"~ gap-2\" items-center justify-center p8>`)\n if (files.value.length) {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"red\",\n onClick: clearFiles\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon-clean\" }, null, _parent, _scopeId))\n _push(` Clear `)\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon-clean\" }),\n _createTextVNode(\" Clear \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NButton, {\n disabled: !files.value.length,\n n: \"primary solid\",\n onClick: uploadFiles\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon-cloud-upload\" }, null, _parent, _scopeId))\n _push(` Upload `)\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon-cloud-upload\" }),\n _createTextVNode(\" Upload \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div></div>`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script lang=\"ts\" setup>\nimport type { AssetEntry } from '~/../src/types'\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { rpc, wsConnecting, wsError } from '~/composables/rpc'\nimport { telemetry } from '~/composables/telemetry'\n\nconst props = defineProps({\n modelValue: {\n type: Boolean,\n required: true,\n },\n folder: {\n type: String,\n required: true,\n },\n})\n\nconst FILE_EXT_RE = /\\.\\w+$/\n\nconst visible = useVModel(props, 'modelValue')\nconst lastTarget = ref()\n\nconst files = ref<File[]>([])\n\nfunction onDragEnter(e: DragEvent) {\n lastTarget.value = e.target\n visible.value = true\n}\nfunction onDragLeave(e: DragEvent) {\n if (e.target === lastTarget.value)\n visible.value = false\n}\nfunction onDragOver(e: DragEvent) {\n e.preventDefault()\n}\n\nfunction onDrop(e: DragEvent) {\n e.preventDefault()\n setFiles(e.dataTransfer!.files)\n}\n\nfunction setFiles(data: FileList | null) {\n const inputFiles = [...data || []]\n if (inputFiles.length) {\n const newFiles: File[] = []\n const existingFileNames: string[] = files.value.map(file => file.name)\n for (const file of inputFiles) {\n if (existingFileNames.includes(file.name)) {\n let i = 1\n const [name, ext] = file.name.split('.')\n while (existingFileNames.includes(`${name} (${i}).${ext}`))\n i++\n const newFilename = `${name}-${i}.${ext}`\n const blob = new Blob([file], { type: file.type })\n const newFile = new File([blob], newFilename, { lastModified: Date.now() })\n newFiles.push(newFile)\n existingFileNames.push(newFilename)\n }\n else {\n if (file.type === '') {\n devtoolsUiShowNotification({\n message: 'Folders are not supported yet',\n icon: 'carbon:face-dissatisfied',\n classes: 'text-orange',\n })\n }\n newFiles.push(file)\n }\n }\n files.value = [...files.value, ...newFiles]\n }\n}\n\nasync function uploadFiles() {\n if (wsConnecting.value || wsError.value)\n return\n\n telemetry('assets:upload')\n\n const uploadFiles: AssetEntry[] = []\n for (const file of files.value) {\n const reader = new FileReader()\n reader.readAsDataURL(file)\n const result = await new Promise((resolve) => {\n reader.onload = () => resolve(reader.result as string)\n }) as string\n // TODO: add validation\n const content = result.split(';base64,').pop() as string\n uploadFiles.push({\n path: file.name,\n encoding: 'base64',\n content,\n })\n }\n await rpc.writeStaticAssets([...uploadFiles], props.folder).then(() => {\n close()\n devtoolsUiShowNotification({\n message: 'Files uploaded successfully!',\n icon: 'i-carbon:checkmark',\n })\n }).catch((error) => {\n close()\n devtoolsUiShowNotification({\n message: `Error uploading files: ${error?.message ?? 'unknown'}`,\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n })\n visible.value = false\n}\n\nfunction removeFile(index: number) {\n files.value?.splice(index, 1)\n}\n\nfunction blobIt(file: File) {\n return URL.createObjectURL(file)\n}\n\nfunction changeName(file: File, newName: string) {\n const [name, ext] = file.name.split('.')\n const baseName = newName.replace(FILE_EXT_RE, '')\n const newFileName = `${baseName}.${ext}`\n if (baseName.length === 0) {\n // TODO: with proper dialog\n // eslint-disable-next-line no-alert\n alert('File name must be at least 1 characters long')\n return name\n }\n Object.defineProperty(file, 'name', { value: newFileName, writable: false })\n files.value.splice(files.value.indexOf(file), 1, file)\n return file\n}\n\nfunction clearFiles() {\n files.value = []\n}\n\nfunction close() {\n visible.value = false\n clearFiles()\n}\n\nuseEventListener('dragenter', onDragEnter)\nuseEventListener('dragleave', onDragLeave)\nuseEventListener('dragover', onDragOver)\nuseEventListener('drop', onDrop)\n</script>\n\n<template>\n <div\n fixed bottom-0 left-13 right-0 top-0 z-10 backdrop-blur-20 transition-all\n :class=\"visible ? 'opacity-100 visible' : 'opacity-0 invisible'\"\n >\n <NButton\n v-tooltip.bottom-end=\"'Close'\"\n icon=\"carbon-close\"\n title=\"Close\"\n absolute right-5 top-5 z-20 text-xl\n :border=\"false\"\n @click=\"close\"\n />\n <div v-if=\"!files?.length\" h-full w-full flex items-center justify-center>\n <label for=\"drop-zone-input\" text-3xl hover=\"text-green cursor-pointer\" transition-all>\n <NIcon icon=\"carbon-cloud-upload\" mr-2 /> Drop files here or click to select\n </label>\n <input\n id=\"drop-zone-input\" type=\"file\" multiple hidden\n @change=\"setFiles(($event.target as HTMLInputElement).files)\"\n >\n </div>\n <div v-else relative h-full w-full grid=\"~ rows-[max-content_1fr_max-content]\">\n <div px6 py6>\n <h1 text-2xl>\n Upload\n </h1>\n <p text-sm op50>\n Drag and drop files to upload\n </p>\n </div>\n <div grid=\"~ cols-minmax-8rem gap-8\" overflow-auto p6>\n <div\n v-for=\"file, index of files\" :key=\"file.name\"\n flex=\"~ col gap-2\" relative h-50 w-40 items-center\n >\n <div\n flex items-center justify-center of-hidden rounded rounded-t-lg bg-active object-cover\n class=\"aspect-1/1\" border=\"~ base\"\n >\n <img h-full w-full rounded-t-lg object-cover :src=\"blobIt(file)\">\n </div>\n <div flex=\"~ gap1\" items-center>\n <NTextInput\n n=\"xs\"\n h-full flex-auto\n :model-value=\"file.name\"\n @update:model-value=\"changeName(file, (($event as any).target as HTMLInputElement).value)\"\n />\n <NButton\n n=\"red\"\n icon=\"carbon-trash-can\"\n h-full flex-none\n title=\"Remove file\"\n @click=\"removeFile(index)\"\n />\n </div>\n </div>\n </div>\n <div flex=\"~ gap-2\" items-center justify-center p8>\n <NButton v-if=\"files.length\" n=\"red\" @click=\"clearFiles\">\n <NIcon icon=\"carbon-clean\" /> Clear\n </NButton>\n <NButton :disabled=\"!files.length\" n=\"primary solid\" @click=\"uploadFiles\">\n <NIcon icon=\"carbon-cloud-upload\" /> Upload\n </NButton>\n </div>\n </div>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderAttrs as _ssrRenderAttrs } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { useStyleTag } from '@vueuse/core'\nimport { hash } from 'devframe/utils/hash'\nimport { computed } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetFontPreview',\n __ssrInlineRender: true,\n props: {\n asset: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst id = computed(() => `devtools-assets-${hash(props.asset)}`)\n\nuseStyleTag(computed(() => `\n @font-face {\n font-family: '${id.value}';\n src: url('${props.asset.publicPath}');\n }\n`))\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n \"of-hidden\": \"\",\n style: { fontFamily: `'${id.value}'` }\n }, _attrs))}> Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz </div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { useStyleTag } from '@vueuse/core'\nimport { hash } from 'devframe/utils/hash'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n asset: AssetInfo\n}>()\n\nconst id = computed(() => `devtools-assets-${hash(props.asset)}`)\n\nuseStyleTag(computed(() => `\n @font-face {\n font-family: '${id.value}';\n src: url('${props.asset.publicPath}');\n }\n`))\n</script>\n\n<template>\n <div of-hidden :style=\"{ fontFamily: `'${id}'` }\">\n Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderAttr as _ssrRenderAttr, ssrRenderComponent as _ssrRenderComponent, ssrIncludeBooleanAttr as _ssrIncludeBooleanAttr, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetPreview',\n __ssrInlineRender: true,\n props: {\n asset: {},\n textContent: {},\n detail: { type: Boolean }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_AssetFontPreview = _resolveComponent(\"AssetFontPreview\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n flex: \"\",\n \"items-center\": \"\",\n \"justify-center\": \"\",\n \"of-hidden\": \"\",\n \"bg-active\": \"\",\n \"object-cover\": \"\",\n p1: \"\"\n }, _attrs))}>`)\n if (__props.asset.type === 'image') {\n _push(`<img${_ssrRenderAttr(\"src\", __props.asset.publicPath)}>`)\n } else if (__props.asset.type === 'font') {\n _push(_ssrRenderComponent(_component_AssetFontPreview, {\n key: __props.asset.publicPath,\n asset: __props.asset,\n \"self-stretch\": \"\",\n p2: \"\",\n \"text-2xl\": \"\"\n }, null, _parent))\n } else if (__props.asset.type === 'text' && !__props.textContent) {\n _push(`<div i-carbon-document text-3xl op20></div>`)\n } else if (__props.asset.type === 'text' && __props.textContent) {\n _push(`<div w-full self-start p4><pre max-h-10rem of-hidden text-xs font-mono>${_ssrInterpolate(__props.textContent)}</pre></div>`)\n } else if (__props.asset.type === 'video') {\n _push(`<div><video${\n _ssrRenderAttr(\"src\", __props.asset.publicPath)\n }${\n (_ssrIncludeBooleanAttr(__props.detail)) ? \" autoplay\" : \"\"\n }${\n (_ssrIncludeBooleanAttr(__props.detail)) ? \" controls\" : \"\"\n }></video></div>`)\n } else if (__props.asset.type === 'audio') {\n _push(`<div>`)\n if (!__props.detail) {\n _push(`<div i-carbon-volume-up text-3xl op20></div>`)\n } else {\n _push(`<audio${_ssrRenderAttr(\"src\", __props.asset.publicPath)} controls></audio>`)\n }\n _push(`</div>`)\n } else {\n _push(`<div i-carbon-help text-3xl op20></div>`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\n\ndefineProps<{\n asset: AssetInfo\n textContent?: string\n detail?: boolean\n}>()\n</script>\n\n<template>\n <div flex items-center justify-center of-hidden bg-active object-cover p1>\n <template v-if=\"asset.type === 'image'\">\n <img :src=\"asset.publicPath\">\n </template>\n <AssetFontPreview\n v-else-if=\"asset.type === 'font'\"\n :key=\"asset.publicPath\"\n :asset=\"asset\" self-stretch p2 text-2xl\n />\n <div v-else-if=\"asset.type === 'text' && !textContent\" i-carbon-document text-3xl op20 />\n <div v-else-if=\"asset.type === 'text' && textContent\" w-full self-start p4>\n <pre max-h-10rem of-hidden text-xs font-mono v-text=\"textContent\" />\n </div>\n <div v-else-if=\"asset.type === 'video'\">\n <video :src=\"asset.publicPath\" :autoplay=\"detail\" :controls=\"detail\" />\n </div>\n <div v-else-if=\"asset.type === 'audio'\">\n <div v-if=\"!detail\" i-carbon-volume-up text-3xl op20 />\n <audio v-else :src=\"asset.publicPath\" controls />\n </div>\n <div v-else i-carbon-help text-3xl op20 />\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { computed } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetGridItem',\n __ssrInlineRender: true,\n props: {\n asset: {},\n folder: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst path = computed(() => {\n if (props.folder && props.asset.path.startsWith(props.folder))\n return props.asset.path.slice(props.folder.length)\n return props.asset.path\n})\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_AssetPreview = _resolveComponent(\"AssetPreview\")!\n\n _push(`<button${_ssrRenderAttrs(_mergeProps({\n relative: \"\",\n flex: \"~ col gap-1\",\n hover: \"bg-active\",\n \"items-center\": \"\",\n \"of-hidden\": \"\",\n rounded: \"\",\n p2: \"\"\n }, _attrs))}>`)\n if (__props.asset.layer) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"i-carbon-layers\",\n absolute: \"\",\n \"right-4\": \"\",\n \"top-4\": \"\",\n \"bg-primary\": \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_AssetPreview, {\n \"h-30\": \"\",\n \"w-30\": \"\",\n rounded: \"\",\n border: \"~ base\",\n asset: __props.asset\n }, null, _parent))\n _push(`<div w-full of-hidden truncate ws-nowrap text-center text-xs>${_ssrInterpolate(path.value)}</div></button>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n asset: AssetInfo\n folder?: string\n}>()\n\nconst path = computed(() => {\n if (props.folder && props.asset.path.startsWith(props.folder))\n return props.asset.path.slice(props.folder.length)\n return props.asset.path\n})\n</script>\n\n<template>\n <button relative flex=\"~ col gap-1\" hover=\"bg-active\" items-center of-hidden rounded p2>\n <NIcon v-if=\"asset.layer\" icon=\"i-carbon-layers\" absolute right-4 top-4 bg-primary />\n <AssetPreview h-30 w-30 rounded border=\"~ base\" :asset=\"asset\" />\n <div w-full of-hidden truncate ws-nowrap text-center text-xs>\n {{ path }}\n </div>\n </button>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, isRef as _isRef } from \"vue\"\nimport { ssrRenderClass as _ssrRenderClass, ssrRenderComponent as _ssrRenderComponent, ssrRenderStyle as _ssrRenderStyle, ssrRenderSlot as _ssrRenderSlot, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetListItem',\n __ssrInlineRender: true,\n props: {\n item: {},\n index: { default: 0 },\n modelValue: {}\n },\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\nconst model = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst isCollection = computed(() => props.item?.children?.length)\n\nconst open = ref(true)\n\nconst icon = computed(() => {\n if (isCollection.value)\n return 'i-carbon-folder'\n if (props.item.type === 'image')\n return 'i-carbon-image'\n if (props.item.type === 'video')\n return 'i-carbon-video'\n if (props.item.type === 'audio')\n return 'i-carbon-volume-up'\n if (props.item.type === 'font')\n return 'i-carbon-text-small-caps'\n if (props.item.type === 'text')\n return 'i-carbon-document'\n if (props.item.type === 'json')\n return 'i-carbon-json'\n return 'i-carbon-document-blank'\n})\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_AssetListItem = _resolveComponent(\"AssetListItem\", true)!\n\n _push(`<div${\n _ssrRenderAttrs(_attrs)\n }><button flex=\"~ gap-2\" w-full items-center hover=\"bg-active\" px4 py1 style=\"${\n _ssrRenderStyle({ paddingLeft: `calc(1rem + ${__props.index * 1.5}em)` })\n }\" class=\"${\n _ssrRenderClass({ 'bg-active': !isCollection.value && _unref(model)?.filePath === __props.item?.filePath })\n }\" border=\"b base\"><div class=\"${\n _ssrRenderClass(icon.value)\n }\"></div><span class=\"${\n _ssrRenderClass({ 'flex items-center': isCollection.value })\n }\" flex-auto text-start text-sm font-mono>${\n _ssrInterpolate(__props.item.path)\n } `)\n if (__props.item.layer) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"i-carbon-layers\",\n \"bg-primary\": \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</span>`)\n if (isCollection.value) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon:chevron-right\",\n \"transform-rotate\": open.value ? 90 : 0,\n transition: \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</button>`)\n if (open.value) {\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, () => {\n _push(`<!--[-->`)\n _ssrRenderList(__props.item?.children, (subItem) => {\n _push(_ssrRenderComponent(_component_AssetListItem, {\n key: subItem.filepath,\n modelValue: _unref(model),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(model) ? (model).value = $event : null),\n item: subItem,\n index: __props.index + 1\n }, null, _parent))\n })\n _push(`<!--]-->`)\n }, _push, _parent)\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\nconst props = withDefaults(defineProps<{\n item: any\n index?: number\n modelValue: AssetInfo | undefined\n}>(), {\n index: 0,\n})\n\nconst emit = defineEmits<{ (...args: any): void }>()\nconst model = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst isCollection = computed(() => props.item?.children?.length)\n\nconst open = ref(true)\n\nconst icon = computed(() => {\n if (isCollection.value)\n return 'i-carbon-folder'\n if (props.item.type === 'image')\n return 'i-carbon-image'\n if (props.item.type === 'video')\n return 'i-carbon-video'\n if (props.item.type === 'audio')\n return 'i-carbon-volume-up'\n if (props.item.type === 'font')\n return 'i-carbon-text-small-caps'\n if (props.item.type === 'text')\n return 'i-carbon-document'\n if (props.item.type === 'json')\n return 'i-carbon-json'\n return 'i-carbon-document-blank'\n})\n</script>\n\n<template>\n <div>\n <button\n flex=\"~ gap-2\" w-full items-center hover=\"bg-active\" px4 py1\n :style=\"{ paddingLeft: `calc(1rem + ${index * 1.5}em)` }\"\n :class=\"{ 'bg-active': !isCollection && model?.filePath === item?.filePath }\"\n border=\"b base\"\n @click=\"isCollection ? open = !open : model = item\"\n >\n <div :class=\"icon\" />\n <span :class=\"{ 'flex items-center': isCollection }\" flex-auto text-start text-sm font-mono>\n {{ item.path }}\n <NIcon v-if=\"item.layer\" icon=\"i-carbon-layers\" bg-primary />\n </span>\n <NIcon v-if=\"isCollection\" icon=\"carbon:chevron-right\" :transform-rotate=\"open ? 90 : 0\" transition />\n </button>\n <slot v-if=\"open\">\n <AssetListItem\n v-for=\"subItem in item?.children\"\n :key=\"subItem.filepath\"\n v-model=\"model\"\n :item=\"subItem\"\n :index=\"index + 1\"\n />\n </slot>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withCtx as _withCtx, createTextVNode as _createTextVNode, createVNode as _createVNode, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { AssetInfo, CodeSnippet } from '~/../src/types'\nimport { computedAsync, useTimeAgo, useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { useCopy, useOpenInEditor } from '~/composables/editor'\nimport { rpc } from '~/composables/rpc'\nimport { useServerConfig } from '~/composables/state'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetDetails',\n __ssrInlineRender: true,\n props: {\n modelValue: {}\n },\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\nconst asset = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst imageMeta = computedAsync(async () => {\n if (asset.value.type !== 'image')\n return undefined\n return rpc.getImageMeta(asset.value.filePath)\n})\n\nconst editDialog = ref(false)\nconst newTextContent = ref()\nconst textContentCounter = ref(0)\nconst textContent = computedAsync(async () => {\n if (asset.value.type !== 'text')\n return undefined\n\n // eslint-disable-next-line ts/no-unused-expressions\n textContentCounter.value\n\n const content = await rpc.getTextAssetContent(asset.value.filePath)\n newTextContent.value = content\n return content\n})\n\nasync function saveTextContent() {\n if (textContent.value !== newTextContent.value) {\n try {\n await rpc.writeStaticAssets([{\n path: asset.value.path,\n content: newTextContent.value,\n override: true,\n }], '')\n editDialog.value = false\n textContentCounter.value++\n devtoolsUiShowNotification({\n message: 'Updated',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n }\n}\n\nconst config = useServerConfig()\nconst hasNuxtImage = computed(() => {\n const modules = config.value?._installedModules || []\n return modules.some(m => m.meta?.name === '@nuxt/image' || m.meta?.name === '@nuxt/image-edge' || m.meta?.name === '@nuxt/image-nightly')\n})\n\nconst codeSnippets = computed(() => {\n const items: CodeSnippet[] = []\n if (asset.value.type === 'image') {\n const attrs = imageMeta.value?.width\n ? `\\n width=\"${imageMeta.value.width}\"\\n height=\"${imageMeta.value.height}\" `\n : ' '\n items.push(\n { lang: 'vue-html', code: `<img${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Plain Image' },\n )\n if (hasNuxtImage.value) {\n items.push(\n { lang: 'vue-html', code: `<NuxtImg${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Img', docs: 'https://image.nuxt.com/usage/nuxt-img' },\n { lang: 'vue-html', code: `<NuxtPicture${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Picture', docs: 'https://image.nuxt.com/usage/nuxt-picture' },\n )\n }\n return items\n }\n\n items.push({\n lang: 'html',\n code: `<a download href=\"${asset.value.publicPath}\">\\n Download ${asset.value.path.split('/').slice(-1)[0]}\\n</a>`,\n name: 'Download link',\n })\n return items\n})\n\nconst copy = useCopy()\nconst openInEditor = useOpenInEditor()\nconst timeAgo = useTimeAgo(() => asset.value.mtime)\nconst fileSize = computed(() => {\n const size = asset.value.size\n if (size < 1024)\n return `${size} B`\n if (size < 1024 * 1024)\n return `${(size / 1024).toFixed(2)} KB`\n return `${(size / 1024 / 1024).toFixed(2)} MB`\n})\n\nconst aspectRatio = computed(() => {\n if (!imageMeta.value?.width || !imageMeta.value?.height)\n return ''\n const gcd = (a: number, b: number): number => {\n if (!b)\n return a\n return gcd(b, a % b)\n }\n const ratio = gcd(imageMeta.value.width, imageMeta.value.height)\n if (ratio > 3)\n return `${imageMeta.value.width / ratio}:${imageMeta.value.height / ratio}`\n return ''\n})\n\nconst supportsPreview = computed(() => {\n return [\n 'image',\n 'text',\n 'video',\n 'audio',\n 'font',\n ].includes(asset.value.type)\n})\n\nconst deleteDialog = ref(false)\nasync function deleteAsset() {\n try {\n await rpc.deleteStaticAsset(asset.value.filePath)\n asset.value = undefined as any\n deleteDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset deleted',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n\nconst renameDialog = ref(false)\nconst newName = ref('')\nasync function renameAsset() {\n const parts = asset.value.filePath.split('/')\n const oldName = parts.slice(-1)[0]?.split('.').slice(0, -1).join('.')\n\n if (!newName.value || newName.value === oldName) {\n return devtoolsUiShowNotification({\n message: 'Please enter a new name',\n icon: 'i-carbon-warning',\n classes: 'text-orange',\n })\n }\n\n try {\n const extension = parts.slice(-1)[0]?.split('.').slice(-1)[0]\n const fullPath = `${parts.slice(0, -1).join('/')}/${newName.value}.${extension}`\n await rpc.renameStaticAsset(asset.value.filePath, fullPath)\n asset.value = undefined as any\n renameDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset renamed',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_AssetPreview = _resolveComponent(\"AssetPreview\")!\n const _component_FilepathItem = _resolveComponent(\"FilepathItem\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_CodeSnippets = _resolveComponent(\"CodeSnippets\")!\n const _component_NDialog = _resolveComponent(\"NDialog\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<!--[--><div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4>`)\n if (supportsPreview.value) {\n _push(`<!--[--><div flex=\"~ gap2\" mb--2 items-center op50><div x-divider></div><div flex-none> Preview </div><div x-divider></div></div><div flex=\"~\" items-center justify-center>`)\n _push(_ssrRenderComponent(_component_AssetPreview, {\n detail: \"\",\n \"max-h-80\": \"\",\n \"min-h-20\": \"\",\n \"min-w-20\": \"\",\n \"w-auto\": \"\",\n rounded: \"\",\n border: \"~ base\",\n asset: _unref(asset),\n \"text-content\": _unref(textContent)\n }, null, _parent))\n _push(`</div><!--]-->`)\n } else {\n _push(`<!---->`)\n }\n _push(`<div flex=\"~ gap2\" mb--2 items-center op50><div x-divider></div><div flex-none> Details </div><div x-divider></div></div><table max-w-full w-full table-fixed><tbody><tr><td w-30 ws-nowrap pr5 text-right op50> Filepath </td><td><div flex=\"~ gap-1\" w-full items-center>`)\n _push(_ssrRenderComponent(_component_FilepathItem, {\n filepath: _unref(asset).filePath,\n \"text-left\": \"\"\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"flex-none\": \"\",\n title: \"Open in Editor\",\n icon: \"carbon-launch\",\n border: false,\n onClick: ($event: any) => (_unref(openInEditor)(_unref(asset).filePath))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Open in Editor')), null, _parent))\n _push(`</div></td></tr><tr><td w-30 ws-nowrap pr5 text-right op50> Public Path </td><td><div flex=\"~ gap-1\" w-full items-center of-hidden><div flex-auto of-hidden truncate ws-pre font-mono>${_ssrInterpolate(_unref(asset).publicPath)}</div>`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"flex-none\": \"\",\n title: \"Copy public path\",\n icon: \"carbon-copy\",\n border: false,\n onClick: ($event: any) => (_unref(copy)(_unref(asset).publicPath, 'assets-public-path'))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Copy public path')), null, _parent))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"flex-none\": \"\",\n to: _unref(asset).publicPath,\n icon: \"carbon-launch\",\n target: \"_blank\",\n border: false,\n title: \"Open in browser\"\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Open in browser')), null, _parent))\n _push(`</div></td></tr><tr><td w-30 ws-nowrap pr5 text-right op50> Type </td><td capitalize>${_ssrInterpolate(_unref(asset).type)}</td></tr>`)\n if (_unref(imageMeta)?.width) {\n _push(`<!--[--><tr><td w-30 ws-nowrap pr5 text-right op50> Image Size </td><td>${\n _ssrInterpolate(_unref(imageMeta).width)\n } x ${\n _ssrInterpolate(_unref(imageMeta).height)\n }</td></tr>`)\n if (aspectRatio.value) {\n _push(`<tr><td w-30 ws-nowrap pr5 text-right op50> Aspect Ratio </td><td>${_ssrInterpolate(aspectRatio.value)}</td></tr>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<!--]-->`)\n } else {\n _push(`<!---->`)\n }\n _push(`<tr><td w-30 ws-nowrap pr5 text-right op50> File size </td><td>${\n _ssrInterpolate(fileSize.value)\n }</td></tr><tr><td w-30 ws-nowrap pr5 text-right op50> Last modified </td><td>${\n _ssrInterpolate(new Date((_unref(asset)).mtime).toLocaleString())\n } <span op70>(${\n _ssrInterpolate(_unref(timeAgo))\n })</span></td></tr></tbody></table><div flex=\"~ gap2\" mb--2 items-center op50><div x-divider></div><div flex-none> Actions </div><div x-divider></div></div><div flex=\"~ gap2 wrap\">`)\n _push(_ssrRenderComponent(_component_NButton, {\n to: _unref(asset).publicPath,\n download: \"\",\n target: \"_blank\",\n icon: \"carbon-download\",\n n: \"green\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Download `)\n } else {\n return [\n _createTextVNode(\" Download \")\n ]\n }\n }),\n _: 1\n }, _parent))\n if (_unref(asset).type === 'text') {\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-edit\",\n n: \"cyan\",\n onClick: ($event: any) => (editDialog.value = !editDialog.value)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Edit `)\n } else {\n return [\n _createTextVNode(\" Edit \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-text-annotation-toggle\",\n n: \"blue\",\n onClick: ($event: any) => (renameDialog.value = !renameDialog.value)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Rename `)\n } else {\n return [\n _createTextVNode(\" Rename \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-delete\",\n n: \"red\",\n onClick: ($event: any) => (deleteDialog.value = !deleteDialog.value)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Delete `)\n } else {\n return [\n _createTextVNode(\" Delete \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div><div flex-auto></div>`)\n if (codeSnippets.value.length) {\n _push(_ssrRenderComponent(_component_CodeSnippets, {\n border: \"t base\",\n \"mx--4\": \"\",\n \"mb--4\": \"\",\n \"code-snippets\": codeSnippets.value\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n _push(_ssrRenderComponent(_component_NDialog, {\n modelValue: deleteDialog.value,\n \"onUpdate:modelValue\": ($event: any) => ((deleteDialog).value = $event)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8${\n _scopeId\n }><span${\n _scopeId\n }> Are you sure you want to delete this asset? </span><div flex=\"~ gap2 wrap justify-center\"${\n _scopeId\n }>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (deleteDialog.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-delete\",\n n: \"red\",\n onClick: deleteAsset\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Delete `)\n } else {\n return [\n _createTextVNode(\" Delete \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-4\",\n \"min-h-full\": \"\",\n \"w-full\": \"\",\n \"of-hidden\": \"\",\n p8: \"\"\n }, [\n _createVNode(\"span\", null, \" Are you sure you want to delete this asset? \"),\n _createVNode(\"div\", { flex: \"~ gap2 wrap justify-center\" }, [\n _createVNode(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (deleteDialog.value = false)\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n icon: \"carbon-delete\",\n n: \"red\",\n onClick: deleteAsset\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Delete \")\n ]),\n _: 1\n })\n ])\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NDialog, {\n modelValue: renameDialog.value,\n \"onUpdate:modelValue\": ($event: any) => ((renameDialog).value = $event)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": ($event: any) => ((newName).value = $event),\n placeholder: \"New name\",\n n: \"blue\"\n }, null, _parent, _scopeId))\n _push(`<div flex=\"~ gap2 wrap justify-center\"${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (renameDialog.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-text-annotation-toggle\",\n n: \"blue\",\n onClick: renameAsset\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Rename `)\n } else {\n return [\n _createTextVNode(\" Rename \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-4\",\n \"min-h-full\": \"\",\n \"w-full\": \"\",\n \"of-hidden\": \"\",\n p8: \"\"\n }, [\n _createVNode(_component_NTextInput, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": ($event: any) => ((newName).value = $event),\n placeholder: \"New name\",\n n: \"blue\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(\"div\", { flex: \"~ gap2 wrap justify-center\" }, [\n _createVNode(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (renameDialog.value = false)\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n icon: \"carbon-text-annotation-toggle\",\n n: \"blue\",\n onClick: renameAsset\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Rename \")\n ]),\n _: 1\n })\n ])\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n if (_unref(asset).type === 'text') {\n _push(_ssrRenderComponent(_component_NDialog, {\n modelValue: editDialog.value,\n \"onUpdate:modelValue\": ($event: any) => ((editDialog).value = $event)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4${\n _scopeId\n }><textarea placeholder=\"Item value...\" class=\"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none\"${\n _scopeId\n }>${\n _ssrInterpolate(newTextContent.value)\n }</textarea><div flex justify-end gap-4${\n _scopeId\n }>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (editDialog.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon:save\",\n n: \"primary\",\n onClick: saveTextContent\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` save `)\n } else {\n return [\n _createTextVNode(\" save \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-4\",\n \"min-h-full\": \"\",\n \"w-full\": \"\",\n \"of-hidden\": \"\",\n p4: \"\"\n }, [\n _withDirectives(_createVNode(\"textarea\", {\n \"onUpdate:modelValue\": ($event: any) => ((newTextContent).value = $event),\n placeholder: \"Item value...\",\n class: \"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none\",\n onKeydown: _withKeys(saveTextContent, [\"enter\"])\n }, null, 40, [\"onUpdate:modelValue\"]), [\n [_vModelText, newTextContent.value]\n ]),\n _createVNode(\"div\", {\n flex: \"\",\n \"justify-end\": \"\",\n \"gap-4\": \"\"\n }, [\n _createVNode(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (editDialog.value = false)\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n icon: \"carbon:save\",\n n: \"primary\",\n onClick: saveTextContent\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" save \")\n ]),\n _: 1\n })\n ])\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo, CodeSnippet } from '~/../src/types'\nimport { computedAsync, useTimeAgo, useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { useCopy, useOpenInEditor } from '~/composables/editor'\nimport { rpc } from '~/composables/rpc'\nimport { useServerConfig } from '~/composables/state'\n\nconst props = defineProps<{\n modelValue: AssetInfo\n}>()\n\nconst emit = defineEmits<{ (...args: any): void }>()\nconst asset = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst imageMeta = computedAsync(async () => {\n if (asset.value.type !== 'image')\n return undefined\n return rpc.getImageMeta(asset.value.filePath)\n})\n\nconst editDialog = ref(false)\nconst newTextContent = ref()\nconst textContentCounter = ref(0)\nconst textContent = computedAsync(async () => {\n if (asset.value.type !== 'text')\n return undefined\n\n // eslint-disable-next-line ts/no-unused-expressions\n textContentCounter.value\n\n const content = await rpc.getTextAssetContent(asset.value.filePath)\n newTextContent.value = content\n return content\n})\n\nasync function saveTextContent() {\n if (textContent.value !== newTextContent.value) {\n try {\n await rpc.writeStaticAssets([{\n path: asset.value.path,\n content: newTextContent.value,\n override: true,\n }], '')\n editDialog.value = false\n textContentCounter.value++\n devtoolsUiShowNotification({\n message: 'Updated',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n }\n}\n\nconst config = useServerConfig()\nconst hasNuxtImage = computed(() => {\n const modules = config.value?._installedModules || []\n return modules.some(m => m.meta?.name === '@nuxt/image' || m.meta?.name === '@nuxt/image-edge' || m.meta?.name === '@nuxt/image-nightly')\n})\n\nconst codeSnippets = computed(() => {\n const items: CodeSnippet[] = []\n if (asset.value.type === 'image') {\n const attrs = imageMeta.value?.width\n ? `\\n width=\"${imageMeta.value.width}\"\\n height=\"${imageMeta.value.height}\" `\n : ' '\n items.push(\n { lang: 'vue-html', code: `<img${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Plain Image' },\n )\n if (hasNuxtImage.value) {\n items.push(\n { lang: 'vue-html', code: `<NuxtImg${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Img', docs: 'https://image.nuxt.com/usage/nuxt-img' },\n { lang: 'vue-html', code: `<NuxtPicture${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Picture', docs: 'https://image.nuxt.com/usage/nuxt-picture' },\n )\n }\n return items\n }\n\n items.push({\n lang: 'html',\n code: `<a download href=\"${asset.value.publicPath}\">\\n Download ${asset.value.path.split('/').slice(-1)[0]}\\n</a>`,\n name: 'Download link',\n })\n return items\n})\n\nconst copy = useCopy()\nconst openInEditor = useOpenInEditor()\nconst timeAgo = useTimeAgo(() => asset.value.mtime)\nconst fileSize = computed(() => {\n const size = asset.value.size\n if (size < 1024)\n return `${size} B`\n if (size < 1024 * 1024)\n return `${(size / 1024).toFixed(2)} KB`\n return `${(size / 1024 / 1024).toFixed(2)} MB`\n})\n\nconst aspectRatio = computed(() => {\n if (!imageMeta.value?.width || !imageMeta.value?.height)\n return ''\n const gcd = (a: number, b: number): number => {\n if (!b)\n return a\n return gcd(b, a % b)\n }\n const ratio = gcd(imageMeta.value.width, imageMeta.value.height)\n if (ratio > 3)\n return `${imageMeta.value.width / ratio}:${imageMeta.value.height / ratio}`\n return ''\n})\n\nconst supportsPreview = computed(() => {\n return [\n 'image',\n 'text',\n 'video',\n 'audio',\n 'font',\n ].includes(asset.value.type)\n})\n\nconst deleteDialog = ref(false)\nasync function deleteAsset() {\n try {\n await rpc.deleteStaticAsset(asset.value.filePath)\n asset.value = undefined as any\n deleteDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset deleted',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n\nconst renameDialog = ref(false)\nconst newName = ref('')\nasync function renameAsset() {\n const parts = asset.value.filePath.split('/')\n const oldName = parts.slice(-1)[0]?.split('.').slice(0, -1).join('.')\n\n if (!newName.value || newName.value === oldName) {\n return devtoolsUiShowNotification({\n message: 'Please enter a new name',\n icon: 'i-carbon-warning',\n classes: 'text-orange',\n })\n }\n\n try {\n const extension = parts.slice(-1)[0]?.split('.').slice(-1)[0]\n const fullPath = `${parts.slice(0, -1).join('/')}/${newName.value}.${extension}`\n await rpc.renameStaticAsset(asset.value.filePath, fullPath)\n asset.value = undefined as any\n renameDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset renamed',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n</script>\n\n<template>\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4>\n <template v-if=\"supportsPreview\">\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div x-divider />\n <div flex-none>\n Preview\n </div>\n <div x-divider />\n </div>\n\n <div flex=\"~\" items-center justify-center>\n <AssetPreview\n detail\n max-h-80 min-h-20 min-w-20 w-auto rounded border=\"~ base\"\n :asset=\"asset\"\n :text-content=\"textContent\"\n />\n </div>\n </template>\n\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div x-divider />\n <div flex-none>\n Details\n </div>\n <div x-divider />\n </div>\n\n <table max-w-full w-full table-fixed>\n <tbody>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Filepath\n </td>\n <td>\n <div flex=\"~ gap-1\" w-full items-center>\n <FilepathItem :filepath=\"asset.filePath\" text-left />\n <NButton\n v-tooltip=\"'Open in Editor'\"\n flex-none\n title=\"Open in Editor\"\n icon=\"carbon-launch\"\n :border=\"false\"\n @click=\"openInEditor(asset.filePath)\"\n />\n </div>\n </td>\n </tr>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Public Path\n </td>\n <td>\n <div flex=\"~ gap-1\" w-full items-center of-hidden>\n <div flex-auto of-hidden truncate ws-pre font-mono>\n {{ asset.publicPath }}\n </div>\n <NButton\n v-tooltip=\"'Copy public path'\"\n flex-none\n title=\"Copy public path\"\n icon=\"carbon-copy\"\n :border=\"false\"\n @click=\"copy(asset.publicPath, 'assets-public-path')\"\n />\n <NButton\n v-tooltip=\"'Open in browser'\"\n flex-none\n :to=\"asset.publicPath\"\n icon=\"carbon-launch\"\n target=\"_blank\"\n :border=\"false\"\n title=\"Open in browser\"\n />\n </div>\n </td>\n </tr>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Type\n </td>\n <td capitalize>\n {{ asset.type }}\n </td>\n </tr>\n <template v-if=\"imageMeta?.width\">\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Image Size\n </td>\n <td>{{ imageMeta.width }} x {{ imageMeta.height }}</td>\n </tr>\n <tr v-if=\"aspectRatio\">\n <td w-30 ws-nowrap pr5 text-right op50>\n Aspect Ratio\n </td>\n <td>{{ aspectRatio }}</td>\n </tr>\n </template>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n File size\n </td>\n <td>{{ fileSize }}</td>\n </tr>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Last modified\n </td>\n <td>{{ new Date(asset.mtime).toLocaleString() }} <span op70>({{ timeAgo }})</span></td>\n </tr>\n </tbody>\n </table>\n\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div x-divider />\n <div flex-none>\n Actions\n </div>\n <div x-divider />\n </div>\n <div flex=\"~ gap2 wrap\">\n <NButton :to=\"asset.publicPath\" download target=\"_blank\" icon=\"carbon-download\" n=\"green\">\n Download\n </NButton>\n <NButton v-if=\"asset.type === 'text'\" icon=\"carbon-edit\" n=\"cyan\" @click=\"editDialog = !editDialog\">\n Edit\n </NButton>\n <NButton icon=\"carbon-text-annotation-toggle\" n=\"blue\" @click=\"renameDialog = !renameDialog\">\n Rename\n </NButton>\n <NButton icon=\"carbon-delete\" n=\"red\" @click=\"deleteDialog = !deleteDialog\">\n Delete\n </NButton>\n <!-- TODO: integrate with Nuxt Image -->\n <!-- <NButton v-if=\"asset.type === 'image'\" disabled icon=\"carbon-image-service\">\n Optimize image (Coming soon)\n </NButton> -->\n </div>\n\n <div flex-auto />\n\n <CodeSnippets\n v-if=\"codeSnippets.length\"\n border=\"t base\"\n mx--4 mb--4\n :code-snippets=\"codeSnippets\"\n />\n </div>\n <NDialog v-model=\"deleteDialog\">\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8>\n <span>\n Are you sure you want to delete this asset?\n </span>\n <div flex=\"~ gap2 wrap justify-center\">\n <NButton icon=\"carbon-close\" @click=\"deleteDialog = false\">\n Cancel\n </NButton>\n <NButton icon=\"carbon-delete\" n=\"red\" @click=\"deleteAsset\">\n Delete\n </NButton>\n </div>\n </div>\n </NDialog>\n <NDialog v-model=\"renameDialog\">\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8>\n <NTextInput v-model=\"newName\" placeholder=\"New name\" n=\"blue\" />\n <div flex=\"~ gap2 wrap justify-center\">\n <NButton icon=\"carbon-close\" @click=\"renameDialog = false\">\n Cancel\n </NButton>\n <NButton icon=\"carbon-text-annotation-toggle\" n=\"blue\" @click=\"renameAsset\">\n Rename\n </NButton>\n </div>\n </div>\n </NDialog>\n <NDialog v-if=\"asset.type === 'text'\" v-model=\"editDialog\">\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4>\n <textarea\n v-model=\"newTextContent\"\n placeholder=\"Item value...\"\n class=\"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none\"\n @keydown.enter=\"saveTextContent\"\n />\n <div flex justify-end gap-4>\n <NButton icon=\"carbon-close\" @click=\"editDialog = false\">\n Cancel\n </NButton>\n <NButton icon=\"carbon:save\" n=\"primary\" @click=\"saveTextContent\">\n save\n </NButton>\n </div>\n </div>\n </NDialog>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, mergeProps as _mergeProps, unref as _unref, withCtx as _withCtx, toDisplayString as _toDisplayString, createVNode as _createVNode, withDirectives as _withDirectives, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\nimport { ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderComponent as _ssrRenderComponent, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { onKeyDown, reactiveComputed } from '@vueuse/core'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { DETAILS_MAX_ITEMS } from '~/composables/constants'\nimport { useStaticAssets } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'assets',\n __ssrInlineRender: true,\n setup(__props) {\n\ndefinePageMeta({\n icon: 'carbon-image-copy',\n title: 'Assets',\n layout: 'full',\n})\n\nconst assets = useStaticAssets()\nconst dropzone = ref(false)\nconst search = ref('')\n\nconst fuse = computed(() => new Fuse(assets.value || [], {\n keys: [\n 'path',\n ],\n}))\n\nconst extensions = reactiveComputed(() => {\n const results: { name: string, value: boolean }[] = []\n for (const asset of assets.value || []) {\n const ext = asset.path.split('.').pop()\n if (ext && !results.some(e => e.name === ext))\n results.push({ name: ext, value: true })\n }\n return results\n})\n\nconst filtered = computed(() => {\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : (assets.value || [])\n return result.filter((asset) => {\n const ext = asset.path.split('.').pop()\n return !ext || extensions.some(e => e.name === ext && e.value)\n })\n})\n\nconst byFolders = computed(() => {\n const result: Record<string, AssetInfo[]> = {}\n for (const asset of filtered.value) {\n const folder = `${asset.path.split('/').slice(0, -1).join('/')}/`\n if (!result[folder])\n result[folder] = []\n result[folder].push(asset)\n }\n return Object.entries(result).sort(([a], [b]) => a.localeCompare(b))\n})\n\nconst byTree = computed(() => {\n const root = { path: 'public', children: [] }\n\n const addToTree = (node: any, pathParts: any, file: AssetInfo) => {\n const [currentPart, ...remainingParts] = pathParts\n\n let child = node.children.find((child: any) => child.path === currentPart)\n if (!child) {\n child = { ...file, path: currentPart, children: [] }\n node.children.push(child)\n }\n\n if (remainingParts.length > 1)\n addToTree(child, remainingParts, file)\n else if (remainingParts.length === 1)\n child.children.push({ ...file, path: remainingParts[0] })\n }\n\n filtered.value.forEach((file) => {\n const pathParts = file.path.split('/').filter(part => part !== '')\n addToTree(root, pathParts, file)\n })\n\n return root.children\n})\n\nconst selected = ref<AssetInfo>()\n\nconst { view } = useDevToolsOptions('assets')\n\nfunction toggleView() {\n view.value = view.value === 'list' ? 'grid' : 'list'\n}\n\nonKeyDown('Escape', () => {\n selected.value = undefined\n})\n\nconst navbar = ref<HTMLElement>()\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NNavbar = _resolveComponent(\"NNavbar\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_NDropdown = _resolveComponent(\"NDropdown\")!\n const _component_NCheckbox = _resolveComponent(\"NCheckbox\")!\n const _component_AssetDropZone = _resolveComponent(\"AssetDropZone\")!\n const _component_NSectionBlock = _resolveComponent(\"NSectionBlock\")!\n const _component_AssetGridItem = _resolveComponent(\"AssetGridItem\")!\n const _component_AssetListItem = _resolveComponent(\"AssetListItem\")!\n const _component_NDrawer = _resolveComponent(\"NDrawer\")!\n const _component_AssetDetails = _resolveComponent(\"AssetDetails\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n \"h-full\": \"\",\n \"of-auto\": \"\"\n }, _attrs))}>`)\n _push(_ssrRenderComponent(_component_NNavbar, {\n ref_key: \"navbar\",\n ref: navbar,\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb2: \"\"\n }, {\n actions: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex-none flex=\"~ gap2 items-center\" text-lg${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n icon: \"carbon:cloud-upload\",\n title: \"File Upload\",\n border: false,\n onClick: ($event: any) => (dropzone.value = !dropzone.value)\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'File Upload', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n if (_unref(extensions).length) {\n _push(_ssrRenderComponent(_component_NDropdown, {\n direction: \"end\",\n n: \"sm primary\"\n }, {\n trigger: _withCtx(({ click }, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n icon: \"carbon-filter\",\n border: false,\n title: \"Filter\",\n p3: \"\",\n \"text-lg\": \"\",\n onClick: ($event: any) => (click())\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Filter', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n _push(`<span flex=\"~ items-center justify-center\" absolute bottom--1 right--1 h-4 w-4 rounded-full bg-primary:30 text-8px${\n _scopeId\n }>${\n _ssrInterpolate(_unref(extensions).length)\n }</span>`)\n } else {\n return [\n _withDirectives(_createVNode(_component_NButton, {\n icon: \"carbon-filter\",\n border: false,\n title: \"Filter\",\n p3: \"\",\n \"text-lg\": \"\",\n onClick: ($event: any) => (click())\n }, null, 8, [\"onClick\"]), [\n [\n _directive_tooltip,\n 'Filter',\n void 0,\n { \"bottom-end\": true }\n ]\n ]),\n _createVNode(\"span\", {\n flex: \"~ items-center justify-center\",\n absolute: \"\",\n \"bottom--1\": \"\",\n \"right--1\": \"\",\n \"h-4\": \"\",\n \"w-4\": \"\",\n \"rounded-full\": \"\",\n \"bg-primary:30\": \"\",\n \"text-8px\": \"\"\n }, _toDisplayString(_unref(extensions).length), 1)\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col\" w-30 of-auto${_scopeId}><!--[-->`)\n _ssrRenderList(_unref(extensions), (item) => {\n _push(_ssrRenderComponent(_component_NCheckbox, {\n key: item.name,\n modelValue: item.value,\n \"onUpdate:modelValue\": ($event: any) => ((item.value) = $event),\n flex: \"~ gap-2\",\n rounded: \"\",\n px2: \"\",\n py2: \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span text-xs op75${\n _scopeId\n }>${\n _ssrInterpolate(item.name)\n }</span>`)\n } else {\n return [\n _createVNode(\"span\", {\n \"text-xs\": \"\",\n op75: \"\"\n }, _toDisplayString(item.name), 1)\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n })\n _push(`<!--]--></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col\",\n \"w-30\": \"\",\n \"of-auto\": \"\"\n }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(extensions), (item) => {\n return (_openBlock(), _createBlock(_component_NCheckbox, {\n key: item.name,\n modelValue: item.value,\n \"onUpdate:modelValue\": ($event: any) => ((item.value) = $event),\n flex: \"~ gap-2\",\n rounded: \"\",\n px2: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", {\n \"text-xs\": \"\",\n op75: \"\"\n }, _toDisplayString(item.name), 1)\n ]),\n _: 2\n }, 1032, [\"modelValue\", \"onUpdate:modelValue\"]))\n }), 128))\n ])\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n border: false,\n icon: _unref(view) === 'grid' ? 'i-carbon-list' : 'i-carbon-grid',\n title: \"Toggle view\",\n onClick: toggleView\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Toggle View', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n _push(`</div>`)\n } else {\n return [\n _createVNode(\"div\", {\n \"flex-none\": \"\",\n flex: \"~ gap2 items-center\",\n \"text-lg\": \"\"\n }, [\n _withDirectives(_createVNode(_component_NButton, {\n icon: \"carbon:cloud-upload\",\n title: \"File Upload\",\n border: false,\n onClick: ($event: any) => (dropzone.value = !dropzone.value)\n }, null, 8, [\"onClick\"]), [\n [\n _directive_tooltip,\n 'File Upload',\n void 0,\n { \"bottom-end\": true }\n ]\n ]),\n (_unref(extensions).length)\n ? (_openBlock(), _createBlock(_component_NDropdown, {\n key: 0,\n direction: \"end\",\n n: \"sm primary\"\n }, {\n trigger: _withCtx(({ click }) => [\n _withDirectives(_createVNode(_component_NButton, {\n icon: \"carbon-filter\",\n border: false,\n title: \"Filter\",\n p3: \"\",\n \"text-lg\": \"\",\n onClick: ($event: any) => (click())\n }, null, 8, [\"onClick\"]), [\n [\n _directive_tooltip,\n 'Filter',\n void 0,\n { \"bottom-end\": true }\n ]\n ]),\n _createVNode(\"span\", {\n flex: \"~ items-center justify-center\",\n absolute: \"\",\n \"bottom--1\": \"\",\n \"right--1\": \"\",\n \"h-4\": \"\",\n \"w-4\": \"\",\n \"rounded-full\": \"\",\n \"bg-primary:30\": \"\",\n \"text-8px\": \"\"\n }, _toDisplayString(_unref(extensions).length), 1)\n ]),\n default: _withCtx(() => [\n _createVNode(\"div\", {\n flex: \"~ col\",\n \"w-30\": \"\",\n \"of-auto\": \"\"\n }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(extensions), (item) => {\n return (_openBlock(), _createBlock(_component_NCheckbox, {\n key: item.name,\n modelValue: item.value,\n \"onUpdate:modelValue\": ($event: any) => ((item.value) = $event),\n flex: \"~ gap-2\",\n rounded: \"\",\n px2: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", {\n \"text-xs\": \"\",\n op75: \"\"\n }, _toDisplayString(item.name), 1)\n ]),\n _: 2\n }, 1032, [\"modelValue\", \"onUpdate:modelValue\"]))\n }), 128))\n ])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n border: false,\n icon: _unref(view) === 'grid' ? 'i-carbon-list' : 'i-carbon-grid',\n title: \"Toggle view\",\n onClick: toggleView\n }, null, 8, [\"icon\"]), [\n [\n _directive_tooltip,\n 'Toggle View',\n void 0,\n { \"bottom-end\": true }\n ]\n ])\n ])\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div op50${_scopeId}>`)\n if (search.value) {\n _push(`<span${\n _scopeId\n }>${\n _ssrInterpolate(filtered.value.length)\n } matched · </span>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<span${\n _scopeId\n }>${\n _ssrInterpolate(_unref(assets)?.length)\n } assets in total</span></div>`)\n } else {\n return [\n _createVNode(\"div\", { op50: \"\" }, [\n (search.value)\n ? (_openBlock(), _createBlock(\"span\", { key: 0 }, _toDisplayString(filtered.value.length) + \" matched · \", 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"span\", null, _toDisplayString(_unref(assets)?.length) + \" assets in total\", 1)\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_AssetDropZone, {\n modelValue: dropzone.value,\n \"onUpdate:modelValue\": ($event: any) => ((dropzone).value = $event),\n folder: \"/\"\n }, null, _parent))\n if (_unref(view) === 'grid') {\n _push(`<!--[-->`)\n if (byFolders.value.length > 1) {\n _push(`<!--[-->`)\n _ssrRenderList(byFolders.value, ([folder, items]) => {\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n key: folder,\n text: folder,\n description: `${items.length} items`,\n open: items.length <= _unref(DETAILS_MAX_ITEMS),\n padding: false\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div mt--4 px2 grid=\"~ cols-minmax-8rem\"${_scopeId}><!--[-->`)\n _ssrRenderList(items, (a) => {\n _push(_ssrRenderComponent(_component_AssetGridItem, {\n key: a.path,\n asset: a,\n folder: folder,\n onClick: ($event: any) => (selected.value = a)\n }, null, _parent, _scopeId))\n })\n _push(`<!--]--></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n \"mt--4\": \"\",\n px2: \"\",\n grid: \"~ cols-minmax-8rem\"\n }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(items, (a) => {\n return (_openBlock(), _createBlock(_component_AssetGridItem, {\n key: a.path,\n asset: a,\n folder: folder,\n onClick: ($event: any) => (selected.value = a)\n }, null, 8, [\"asset\", \"folder\", \"onClick\"]))\n }), 128))\n ])\n ]\n }\n }),\n _: 2\n }, _parent))\n })\n _push(`<!--]-->`)\n } else {\n _push(`<div p2 grid=\"~ cols-minmax-8rem\"><!--[-->`)\n _ssrRenderList(filtered.value, (a) => {\n _push(_ssrRenderComponent(_component_AssetGridItem, {\n key: a.path,\n asset: a,\n onClick: ($event: any) => (selected.value = a)\n }, null, _parent))\n })\n _push(`<!--]--></div>`)\n }\n _push(`<!--]-->`)\n } else {\n _push(`<div><!--[-->`)\n _ssrRenderList(byTree.value, (item, key) => {\n _push(_ssrRenderComponent(_component_AssetListItem, {\n key: key,\n modelValue: selected.value,\n \"onUpdate:modelValue\": ($event: any) => ((selected).value = $event),\n item: item\n }, null, _parent))\n })\n _push(`<!--]--></div>`)\n }\n _push(_ssrRenderComponent(_component_NDrawer, {\n \"model-value\": !!selected.value,\n \"auto-close\": \"\",\n \"w-120\": \"\",\n top: navbar.value,\n onClose: ($event: any) => (selected.value = undefined)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n if (selected.value) {\n _push(_ssrRenderComponent(_component_AssetDetails, {\n modelValue: selected.value,\n \"onUpdate:modelValue\": ($event: any) => ((selected).value = $event)\n }, null, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n } else {\n return [\n (selected.value)\n ? (_openBlock(), _createBlock(_component_AssetDetails, {\n key: 0,\n modelValue: selected.value,\n \"onUpdate:modelValue\": ($event: any) => ((selected).value = $event)\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { onKeyDown, reactiveComputed } from '@vueuse/core'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { DETAILS_MAX_ITEMS } from '~/composables/constants'\nimport { useStaticAssets } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\ndefinePageMeta({\n icon: 'carbon-image-copy',\n title: 'Assets',\n layout: 'full',\n})\n\nconst assets = useStaticAssets()\nconst dropzone = ref(false)\nconst search = ref('')\n\nconst fuse = computed(() => new Fuse(assets.value || [], {\n keys: [\n 'path',\n ],\n}))\n\nconst extensions = reactiveComputed(() => {\n const results: { name: string, value: boolean }[] = []\n for (const asset of assets.value || []) {\n const ext = asset.path.split('.').pop()\n if (ext && !results.some(e => e.name === ext))\n results.push({ name: ext, value: true })\n }\n return results\n})\n\nconst filtered = computed(() => {\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : (assets.value || [])\n return result.filter((asset) => {\n const ext = asset.path.split('.').pop()\n return !ext || extensions.some(e => e.name === ext && e.value)\n })\n})\n\nconst byFolders = computed(() => {\n const result: Record<string, AssetInfo[]> = {}\n for (const asset of filtered.value) {\n const folder = `${asset.path.split('/').slice(0, -1).join('/')}/`\n if (!result[folder])\n result[folder] = []\n result[folder].push(asset)\n }\n return Object.entries(result).sort(([a], [b]) => a.localeCompare(b))\n})\n\nconst byTree = computed(() => {\n const root = { path: 'public', children: [] }\n\n const addToTree = (node: any, pathParts: any, file: AssetInfo) => {\n const [currentPart, ...remainingParts] = pathParts\n\n let child = node.children.find((child: any) => child.path === currentPart)\n if (!child) {\n child = { ...file, path: currentPart, children: [] }\n node.children.push(child)\n }\n\n if (remainingParts.length > 1)\n addToTree(child, remainingParts, file)\n else if (remainingParts.length === 1)\n child.children.push({ ...file, path: remainingParts[0] })\n }\n\n filtered.value.forEach((file) => {\n const pathParts = file.path.split('/').filter(part => part !== '')\n addToTree(root, pathParts, file)\n })\n\n return root.children\n})\n\nconst selected = ref<AssetInfo>()\n\nconst { view } = useDevToolsOptions('assets')\n\nfunction toggleView() {\n view.value = view.value === 'list' ? 'grid' : 'list'\n}\n\nonKeyDown('Escape', () => {\n selected.value = undefined\n})\n\nconst navbar = ref<HTMLElement>()\n</script>\n\n<template>\n <div h-full of-auto>\n <NNavbar ref=\"navbar\" v-model:search=\"search\" pb2>\n <template #actions>\n <div flex-none flex=\"~ gap2 items-center\" text-lg>\n <NButton\n v-tooltip.bottom-end=\"'File Upload'\"\n icon=\"carbon:cloud-upload\"\n title=\"File Upload\" :border=\"false\"\n @click=\"dropzone = !dropzone\"\n />\n <NDropdown v-if=\"extensions.length\" direction=\"end\" n=\"sm primary\">\n <template #trigger=\"{ click }\">\n <NButton\n v-tooltip.bottom-end=\"'Filter'\"\n icon=\"carbon-filter\" :border=\"false\"\n title=\"Filter\" p3 text-lg\n @click=\"click()\"\n />\n <span flex=\"~ items-center justify-center\" absolute bottom--1 right--1 h-4 w-4 rounded-full bg-primary:30 text-8px>\n {{ extensions.length }}\n </span>\n </template>\n <div flex=\"~ col\" w-30 of-auto>\n <NCheckbox\n v-for=\"item of extensions\"\n :key=\"item.name\"\n v-model=\"item.value\"\n flex=\"~ gap-2\"\n rounded\n px2 py2\n >\n <span text-xs op75>\n {{ item.name }}\n </span>\n </NCheckbox>\n </div>\n </NDropdown>\n <NButton\n v-tooltip.bottom-end=\"'Toggle View'\"\n text-lg :border=\"false\"\n :icon=\"view === 'grid' ? 'i-carbon-list' : 'i-carbon-grid'\"\n title=\"Toggle view\"\n @click=\"toggleView\"\n />\n </div>\n </template>\n <div op50>\n <span v-if=\"search\">{{ filtered.length }} matched · </span>\n <span>{{ assets?.length }} assets in total</span>\n </div>\n </NNavbar>\n\n <AssetDropZone v-model=\"dropzone\" folder=\"/\" />\n\n <template v-if=\"view === 'grid'\">\n <template v-if=\"byFolders.length > 1\">\n <NSectionBlock\n v-for=\"[folder, items] of byFolders\"\n :key=\"folder\"\n :text=\"folder\"\n :description=\"`${items.length} items`\"\n :open=\"items.length <= DETAILS_MAX_ITEMS\"\n :padding=\"false\"\n >\n <div mt--4 px2 grid=\"~ cols-minmax-8rem\">\n <AssetGridItem v-for=\"a of items\" :key=\"a.path\" :asset=\"a\" :folder=\"folder\" @click=\"selected = a\" />\n </div>\n </NSectionBlock>\n </template>\n <div v-else p2 grid=\"~ cols-minmax-8rem\">\n <AssetGridItem v-for=\"a of filtered\" :key=\"a.path\" :asset=\"a\" @click=\"selected = a\" />\n </div>\n </template>\n <div v-else>\n <AssetListItem\n v-for=\"item, key of byTree\" :key=\"key\"\n v-model=\"selected\"\n :item=\"item\"\n />\n </div>\n <NDrawer\n :model-value=\"!!selected\"\n auto-close w-120\n :top=\"navbar\"\n @close=\"selected = undefined\"\n >\n <AssetDetails v-if=\"selected\" v-model=\"selected\" />\n </NDrawer>\n </div>\n</template>\n\n<style>\nimg {\n -webkit-user-drag: none;\n -khtml-user-drag: none;\n -moz-user-drag: none;\n -o-user-drag: none;\n user-drag: none;\n}\n</style>\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"custom-_name_-DI8dnRDD.js","mappings":";;;;;;;;;;;;AAYA,IAAM,oCAAoB,IAAI,QAAqB;AAEnD,IAAA,yDAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO,EACL,KAAK,CAAC,EACR;CACA,MAAM,SAAc;EAGtB,MAAM,QAAQ;EAEd,MAAM,YAAY,aAAa;EAC/B,MAAM,SAAS,IAAoB;EACvB,eAAe,MAAM,IAAI,IAAI;EACzC,MAAM,WAAW,IAAuB;EACxC,MAAM,MAAM,SAAS,mBAAmB,MAAM,CAAC;EAqC/C,YAAY,eAAe;EAC3B,YAAY,aAAa;EACzB,YAAY,YAAY;EAOxB,SAAS,gBAAgB;GACvB,IAAI,CAAC,SAAS,SAAS,CAAC,SAAS,MAAM,eACrC;GACF,IAAI;IACF,MAAM,OAAO,SAAS,MAAM,cAAc,SAAS,cAAc,MAAM;IACvE,IAAI,CAAC,MACH;IAEF,MAAM,SAAS,UAAU,UAAU;IACnC,KAAK,UAAU,OAAO,QAAQ,MAAM;IACpC,KAAK,UAAU,OAAO,SAAS,CAAC,MAAM;IAItC,IAAI,kBAAkB,IAAI,IAAI,GAC5B;IACF,kBAAkB,IAAI,IAAI;IAU1B,IARe,uBAAuB;KACpC,MAAM,YAAY,KAAK,UAAU,SAAS,MAAM,IAAI,SAAS;KAI7D,IAAI,cAAc,UAAU,OAC1B,qBAAqB,SAAS;IAClC,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IACvC,OAAO,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM;IACzC,aAAa,IAAI,MAAM,KAAK;IAC5B,SAAS,IAAI,MAAM,KAAK;IACxB,WAAU,QAAO,MAAO,GAAG,CAAC,CAAC,gBAAgB,IAAI,MAAO,MAAM,GAAG;GACnE,GAAG,MAAM,GAAG,MAAM,OAAO,CAAC;QAE1B,MAAM,mBAAoB,wBAAwB,QAAQ;IACxD,SAAS,SAAU,GAAG,OAAO,SAAS,aAAa;KACjD,IAAI,OACF,MAAM,mBAAoB,kBAAkB;MAC1C,MAAM;MACN,UAAU;MACV,gBAAgB;MAChB,kBAAkB;KACpB,GAAG;MACD,SAAS,SAAU,GAAG,OAAO,SAAS,aAAa;OACjD,IAAI,OACF,MAAM,qBAAqB,eAAgB,IAAI,MAAM,IAAI,GAAG;YAE5D,OAAO,CACL,gBAAiB,uBAAuB,gBAAiB,IAAI,MAAM,IAAI,GAAG,CAAC,CAC7E;MAEJ,CAAC;MACD,GAAG;KACL,GAAG,SAAS,QAAQ,CAAC;UAErB,OAAO,CACL,YAAa,kBAAkB;MAC7B,MAAM;MACN,UAAU;MACV,gBAAgB;MAChB,kBAAkB;KACpB,GAAG;MACD,SAAS,cAAe,CACtB,gBAAiB,uBAAuB,gBAAiB,IAAI,MAAM,IAAI,GAAG,CAAC,CAC7E,CAAC;MACD,GAAG;KACL,CAAC,CACH;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;EAEf;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/IframeView.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/IframeView.vue","../../../../../../../../pages/modules/custom-[name].vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/custom-[name].vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderAttrs as _ssrRenderAttrs } from \"vue/server-renderer\"\n\nimport type { ModuleCustomTab, ModuleIframeView } from '~/../src/types'\n\n\nimport { useElementBounding } from '@vueuse/core'\nimport { computed, nextTick, onMounted, onUnmounted, reactive, ref, watchEffect } from 'vue'\nimport { getColorMode, setEmbedderColorMode, useInjectionClient } from '~/composables/client'\n\nconst iframeCacheMap = new Map<string, HTMLIFrameElement>()\nconst observedDocuments = new WeakSet<HTMLElement>()\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'IframeView',\n __ssrInlineRender: true,\n props: {\n tab: {}\n },\n setup(__props: any) {\n\n// eslint-disable-next-line import/first\nconst props = __props\n\nconst colorMode = getColorMode()\nconst anchor = ref<HTMLDivElement>()\nconst key = computed(() => props.tab.name)\nconst iframeEl = ref<HTMLIFrameElement>()\nconst box = reactive(useElementBounding(anchor))\n\nonMounted(() => {\n const view = props.tab.view as ModuleIframeView\n const isPersistent = view.persistent !== false\n const allowedPermissions = ['clipboard-write', 'clipboard-read', ...(view.permissions || [])]\n\n if (iframeCacheMap.get(key.value) && isPersistent) {\n iframeEl.value = iframeCacheMap.get(key.value)!\n iframeEl.value.style.visibility = 'visible'\n }\n else {\n iframeEl.value = document.createElement('iframe')\n iframeEl.value.setAttribute('allow', allowedPermissions.join('; '))\n iframeEl.value.setAttribute('aria-label', 'Nuxt Devtools')\n\n if (isPersistent)\n iframeCacheMap.set(key.value, iframeEl.value)\n iframeEl.value.src = view.src\n // CORS\n try {\n iframeEl.value.style.opacity = '0.01'\n iframeEl.value.onload = () => {\n injectClient()\n syncColorMode()\n iframeEl.value!.style.opacity = '1'\n }\n }\n catch (e) {\n iframeEl.value.style.opacity = '1'\n }\n document.body.appendChild(iframeEl.value)\n nextTick(updateIframeBox)\n }\n setTimeout(syncColorMode, 100)\n})\n\nwatchEffect(updateIframeBox)\nwatchEffect(syncColorMode)\nwatchEffect(injectClient)\n\nonUnmounted(() => {\n if (iframeEl.value)\n iframeEl.value.style.visibility = 'hidden'\n})\n\nfunction syncColorMode() {\n if (!iframeEl.value || !iframeEl.value.contentWindow)\n return\n try {\n const html = iframeEl.value.contentWindow.document.querySelector('html')\n if (!html)\n return\n\n const isDark = colorMode.value === 'dark'\n html.classList.toggle('dark', isDark)\n html.classList.toggle('light', !isDark)\n\n // Iframes are cached and this runs from a watcher, an `onload` and a timer —\n // observe each document once instead of stacking observers on it.\n if (observedDocuments.has(html))\n return\n observedDocuments.add(html)\n\n const ob = new MutationObserver(() => {\n const tabScheme = html.classList.contains('dark') ? 'dark' : 'light'\n // The push above trips this observer too. Only a *divergence* from what we\n // render means the tab picked a scheme of its own; treating our own write\n // as a choice would pin the UI to it and stop it following the OS.\n if (tabScheme !== colorMode.value)\n setEmbedderColorMode(tabScheme)\n })\n ob.observe(html, { attributes: true, attributeFilter: ['class'] })\n }\n catch (e) {\n }\n}\n\nconst injectionClient = useInjectionClient()\n\nfunction injectClient() {\n if (!iframeEl.value || !iframeEl.value.contentWindow)\n return\n try {\n iframeEl.value.contentWindow.__NUXT_DEVTOOLS__ = injectionClient.value\n }\n catch (e) {\n }\n}\n\nfunction updateIframeBox() {\n if (!iframeEl.value)\n return\n Object.assign(iframeEl.value.style, {\n position: 'fixed',\n left: `${box.left}px`,\n top: `${box.top}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n outline: 'none',\n })\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n ref_key: \"anchor\",\n ref: anchor,\n \"h-full\": \"\",\n \"w-full\": \"\"\n }, _attrs))}></div>`)\n}\n}\n\n})","<script lang=\"ts\">\nimport { useElementBounding } from '@vueuse/core'\nimport { computed, nextTick, onMounted, onUnmounted, reactive, ref, watchEffect } from 'vue'\nimport { getColorMode, setEmbedderColorMode, useInjectionClient } from '~/composables/client'\n\nconst iframeCacheMap = new Map<string, HTMLIFrameElement>()\nconst observedDocuments = new WeakSet<HTMLElement>()\n</script>\n\n<script setup lang=\"ts\">\n// eslint-disable-next-line import/first\nimport type { ModuleCustomTab, ModuleIframeView } from '~/../src/types'\n\nconst props = defineProps<{\n tab: ModuleCustomTab\n}>()\n\nconst colorMode = getColorMode()\nconst anchor = ref<HTMLDivElement>()\nconst key = computed(() => props.tab.name)\nconst iframeEl = ref<HTMLIFrameElement>()\nconst box = reactive(useElementBounding(anchor))\n\nonMounted(() => {\n const view = props.tab.view as ModuleIframeView\n const isPersistent = view.persistent !== false\n const allowedPermissions = ['clipboard-write', 'clipboard-read', ...(view.permissions || [])]\n\n if (iframeCacheMap.get(key.value) && isPersistent) {\n iframeEl.value = iframeCacheMap.get(key.value)!\n iframeEl.value.style.visibility = 'visible'\n }\n else {\n iframeEl.value = document.createElement('iframe')\n iframeEl.value.setAttribute('allow', allowedPermissions.join('; '))\n iframeEl.value.setAttribute('aria-label', 'Nuxt Devtools')\n\n if (isPersistent)\n iframeCacheMap.set(key.value, iframeEl.value)\n iframeEl.value.src = view.src\n // CORS\n try {\n iframeEl.value.style.opacity = '0.01'\n iframeEl.value.onload = () => {\n injectClient()\n syncColorMode()\n iframeEl.value!.style.opacity = '1'\n }\n }\n catch (e) {\n iframeEl.value.style.opacity = '1'\n }\n document.body.appendChild(iframeEl.value)\n nextTick(updateIframeBox)\n }\n setTimeout(syncColorMode, 100)\n})\n\nwatchEffect(updateIframeBox)\nwatchEffect(syncColorMode)\nwatchEffect(injectClient)\n\nonUnmounted(() => {\n if (iframeEl.value)\n iframeEl.value.style.visibility = 'hidden'\n})\n\nfunction syncColorMode() {\n if (!iframeEl.value || !iframeEl.value.contentWindow)\n return\n try {\n const html = iframeEl.value.contentWindow.document.querySelector('html')\n if (!html)\n return\n\n const isDark = colorMode.value === 'dark'\n html.classList.toggle('dark', isDark)\n html.classList.toggle('light', !isDark)\n\n // Iframes are cached and this runs from a watcher, an `onload` and a timer —\n // observe each document once instead of stacking observers on it.\n if (observedDocuments.has(html))\n return\n observedDocuments.add(html)\n\n const ob = new MutationObserver(() => {\n const tabScheme = html.classList.contains('dark') ? 'dark' : 'light'\n // The push above trips this observer too. Only a *divergence* from what we\n // render means the tab picked a scheme of its own; treating our own write\n // as a choice would pin the UI to it and stop it following the OS.\n if (tabScheme !== colorMode.value)\n setEmbedderColorMode(tabScheme)\n })\n ob.observe(html, { attributes: true, attributeFilter: ['class'] })\n }\n catch (e) {\n }\n}\n\nconst injectionClient = useInjectionClient()\n\nfunction injectClient() {\n if (!iframeEl.value || !iframeEl.value.contentWindow)\n return\n try {\n iframeEl.value.contentWindow.__NUXT_DEVTOOLS__ = injectionClient.value\n }\n catch (e) {\n }\n}\n\nfunction updateIframeBox() {\n if (!iframeEl.value)\n return\n Object.assign(iframeEl.value.style, {\n position: 'fixed',\n left: `${box.left}px`,\n top: `${box.top}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n outline: 'none',\n })\n}\n</script>\n\n<template>\n <div ref=\"anchor\" h-full w-full />\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderVNode as _ssrRenderVNode, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { ModuleCustomTab } from '~/../src/types'\nimport { computed, onMounted } from 'vue'\nimport { useRoute, useRouter } from '#app/composables/router'\nimport { definePageMeta } from '#imports'\nimport { isDevAuthed, requestForAuth } from '~/composables/dev-auth'\nimport { rpc } from '~/composables/rpc'\nimport { useAllTabs } from '~/composables/state-tabs'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'custom-[name]',\n __ssrInlineRender: true,\n props: {\n name: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\ndefinePageMeta({\n layout: 'full',\n})\n\nconst route = useRoute()\nconst router = useRouter()\nconst name = computed(() => props.name ?? route.params.name)\nconst tabs = useAllTabs()\nconst tab = computed(() => tabs.value.find(i => i.name === name.value) as ModuleCustomTab | undefined)\n\nonMounted(() => {\n // if the tab is not found and passed a certain timeout, redirect to the overview page\n if (!tab.value) {\n setTimeout(() => {\n if (!tab.value)\n router.push('/modules/overview')\n }, 2000)\n }\n else if (tab.value.requireAuth && !isDevAuthed.value) {\n requestForAuth()\n }\n})\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NPanelGrids = _resolveComponent(\"NPanelGrids\")!\n const _component_AuthRequiredPanel = _resolveComponent(\"AuthRequiredPanel\")!\n const _component_IframeView = _resolveComponent(\"IframeView\")!\n const _component_LaunchPage = _resolveComponent(\"LaunchPage\")!\n const _component_NCard = _resolveComponent(\"NCard\")!\n\n if (!tab.value) {\n _push(_ssrRenderComponent(_component_NPanelGrids, _attrs, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap2\" mxa items-center${\n _scopeId\n }><div i-carbon-queued mb2 text-5xl op50${\n _scopeId\n }></div><p text-xl${\n _scopeId\n }> Tab <code text-rose${\n _scopeId\n }>${\n _ssrInterpolate(name.value)\n }</code> not found </p><p op50${\n _scopeId\n }> It might because the module contributing this tab is not installed or enabled </p><p mt8 animate-pulse${\n _scopeId\n }> Redirecting to overview page... </p></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap2\",\n mxa: \"\",\n \"items-center\": \"\"\n }, [\n _createVNode(\"div\", {\n \"i-carbon-queued\": \"\",\n mb2: \"\",\n \"text-5xl\": \"\",\n op50: \"\"\n }),\n _createVNode(\"p\", { \"text-xl\": \"\" }, [\n _createTextVNode(\" Tab \"),\n _createVNode(\"code\", { \"text-rose\": \"\" }, _toDisplayString(name.value), 1),\n _createTextVNode(\" not found \")\n ]),\n _createVNode(\"p\", { op50: \"\" }, \" It might because the module contributing this tab is not installed or enabled \"),\n _createVNode(\"p\", {\n mt8: \"\",\n \"animate-pulse\": \"\"\n }, \" Redirecting to overview page... \")\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n } else if (tab.value.requireAuth && !_unref(isDevAuthed)) {\n _push(_ssrRenderComponent(_component_AuthRequiredPanel, _attrs, null, _parent))\n } else if (tab.value.view.type === 'iframe') {\n _push(_ssrRenderComponent(_component_IframeView, _mergeProps({ tab: tab.value }, _attrs), null, _parent))\n } else if (tab.value.view.type === 'vnode') {\n _ssrRenderVNode(_push, _createVNode(_resolveDynamicComponent(tab.value.view.vnode), _attrs, null), _parent)\n } else if (tab.value.view.type === 'launch') {\n _push(_ssrRenderComponent(_component_LaunchPage, _mergeProps({\n name: `custom-${tab.value.name}`,\n icon: tab.value.view.icon || tab.value.icon,\n title: tab.value.view.title || tab.value.title,\n description: tab.value.view.description,\n actions: tab.value.view.actions,\n onAction: idx => _unref(rpc).customTabAction(tab.value!.name, idx)\n }, _attrs), null, _parent))\n } else {\n _push(_ssrRenderComponent(_component_NPanelGrids, _attrs, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NCard, {\n flex: \"~ col\",\n \"h-full\": \"\",\n \"items-center\": \"\",\n \"justify-center\": \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Unknown tab type ${_ssrInterpolate(tab.value.view)}`)\n } else {\n return [\n _createTextVNode(\" Unknown tab type \" + _toDisplayString(tab.value.view), 1)\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NCard, {\n flex: \"~ col\",\n \"h-full\": \"\",\n \"items-center\": \"\",\n \"justify-center\": \"\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Unknown tab type \" + _toDisplayString(tab.value.view), 1)\n ]),\n _: 1\n })\n ]\n }\n }),\n _: 1\n }, _parent))\n }\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { ModuleCustomTab } from '~/../src/types'\nimport { computed, onMounted } from 'vue'\nimport { useRoute, useRouter } from '#app/composables/router'\nimport { definePageMeta } from '#imports'\nimport { isDevAuthed, requestForAuth } from '~/composables/dev-auth'\nimport { rpc } from '~/composables/rpc'\nimport { useAllTabs } from '~/composables/state-tabs'\n\nconst props = defineProps<{\n name?: string\n}>()\n\ndefinePageMeta({\n layout: 'full',\n})\n\nconst route = useRoute()\nconst router = useRouter()\nconst name = computed(() => props.name ?? route.params.name)\nconst tabs = useAllTabs()\nconst tab = computed(() => tabs.value.find(i => i.name === name.value) as ModuleCustomTab | undefined)\n\nonMounted(() => {\n // if the tab is not found and passed a certain timeout, redirect to the overview page\n if (!tab.value) {\n setTimeout(() => {\n if (!tab.value)\n router.push('/modules/overview')\n }, 2000)\n }\n else if (tab.value.requireAuth && !isDevAuthed.value) {\n requestForAuth()\n }\n})\n</script>\n\n<template>\n <template v-if=\"!tab\">\n <NPanelGrids>\n <div flex=\"~ col gap2\" mxa items-center>\n <div i-carbon-queued mb2 text-5xl op50 />\n <p text-xl>\n Tab <code text-rose>{{ name }}</code> not found\n </p>\n <p op50>\n It might because the module contributing this tab is not installed or enabled\n </p>\n <p mt8 animate-pulse>\n Redirecting to overview page...\n </p>\n </div>\n </NPanelGrids>\n </template>\n <template v-else-if=\"tab.requireAuth && !isDevAuthed\">\n <AuthRequiredPanel />\n </template>\n <template v-else-if=\"tab.view.type === 'iframe'\">\n <IframeView :tab=\"tab\" />\n </template>\n <template v-else-if=\"tab.view.type === 'vnode'\">\n <Component :is=\"tab.view.vnode\" />\n </template>\n <template v-else-if=\"tab.view.type === 'launch'\">\n <LaunchPage\n :name=\"`custom-${tab.name}`\"\n :icon=\"tab.view.icon || tab.icon\"\n :title=\"tab.view.title || tab.title\"\n :description=\"tab.view.description\"\n :actions=\"tab.view.actions\"\n @action=\"idx => rpc.customTabAction(tab!.name, idx)\"\n />\n </template>\n <template v-else>\n <NPanelGrids>\n <NCard flex=\"~ col\" h-full items-center justify-center>\n Unknown tab type {{ tab.view }}\n </NCard>\n </NPanelGrids>\n </template>\n</template>\n"],"version":3}