@motiadev/plugin-logs 0.13.0-beta.162-125657 → 0.13.0-beta.162-846200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -93
- package/dist/index.css +678 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +334 -1291
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +6 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +13 -15
- package/dist/plugin.js.map +1 -0
- package/package.json +23 -27
- package/dist/components/log-detail.d.ts +0 -9
- package/dist/components/log-detail.d.ts.map +0 -1
- package/dist/components/log-level-badge.d.ts +0 -6
- package/dist/components/log-level-badge.d.ts.map +0 -1
- package/dist/components/logs-page.d.ts +0 -2
- package/dist/components/logs-page.d.ts.map +0 -1
- package/dist/components/logs-tab-label.d.ts +0 -2
- package/dist/components/logs-tab-label.d.ts.map +0 -1
- package/dist/index.cjs +0 -57
- package/dist/plugin-logs.css +0 -1
- package/dist/plugin.cjs +0 -1
- package/dist/stores/use-logs-store.d.ts +0 -11
- package/dist/stores/use-logs-store.d.ts.map +0 -1
- package/dist/types/log.d.ts +0 -11
- package/dist/types/log.d.ts.map +0 -1
- package/dist/utils/format-timestamp.d.ts +0 -2
- package/dist/utils/format-timestamp.d.ts.map +0 -1
- package/dist/utils/init-log-listener.d.ts +0 -2
- package/dist/utils/init-log-listener.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["create","Log","LogsState","logs","selectedLogId","addLog","log","setLogs","resetLogs","selectLogId","logId","useLogsStore","set","undefined","state","find","l","id","reverse","Stream","useLogsStore","Log","streamName","groupId","type","initLogListener","stream","window","location","origin","replace","subscription","subscribeGroup","store","getState","addChangeListener","logs","setLogs","onEvent","addLog","formatTimestamp","time","date","Date","Number","toLocaleDateString","year","undefined","month","day","toLocaleTimeString","hour","minute","second","hourCycle","getMilliseconds","toString","padStart","LevelDot","Sidebar","X","React","useMemo","useState","ReactJson","Log","formatTimestamp","Props","log","onClose","defaultProps","LogDetail","FC","hasOtherProps","setHasOtherProps","otherPropsObject","otherProps","Object","keys","filter","key","includes","length","reduce","acc","Record","icon","onClick","label","value","level","time","step","flows","join","traceId","Button","cn","Input","LevelDot","Table","TableBody","TableCell","TableRow","Search","Trash","X","useMemo","useState","useLogsStore","formatTimestamp","LogDetail","LogsPage","$","_c","logs","_temp","resetLogs","_temp2","selectedLogId","_temp3","selectLogId","_temp4","t0","find","log","id","undefined","selectedLog","search","setSearch","t1","t2","log_0","msg","toLowerCase","includes","traceId","step","filter","filteredLogs","Symbol","for","e","target","value","t3","t4","t5","t6","t7","t8","t9","t10","t11","log_1","index","level","time","map","t12","t13","t14","t15","state","state_0","state_1","state_2","initLogListener","LogsPage","Log"],"sources":["../src/stores/use-logs-store.ts","../src/utils/init-log-listener.ts","../src/utils/format-timestamp.ts","../src/components/log-detail.tsx","../src/components/logs-page.tsx","../src/index.ts"],"sourcesContent":["import { create } from 'zustand'\nimport type { Log } from '../types/log'\n\nexport type LogsState = {\n logs: Log[]\n selectedLogId?: string\n addLog: (log: Log) => void\n setLogs: (logs: Log[]) => void\n resetLogs: () => void\n selectLogId: (logId?: string) => void\n}\n\nexport const useLogsStore = create<LogsState>()((set) => ({\n logs: [],\n selectedLogId: undefined,\n addLog: (log) =>\n set((state) => {\n if (state.logs.find((l) => l.id === log.id)) {\n return state\n }\n return {\n logs: [log, ...state.logs],\n }\n }),\n setLogs: (logs) =>\n set({\n logs: [...logs].reverse(),\n }),\n resetLogs: () => {\n set({ logs: [] })\n },\n selectLogId: (logId) => set({ selectedLogId: logId }),\n}))\n","import { Stream } from '@motiadev/stream-client-browser'\nimport { useLogsStore } from '../stores/use-logs-store'\nimport type { Log } from '../types/log'\n\nconst streamName = '__motia.logs'\nconst groupId = 'default'\nconst type = 'log'\n\nexport const initLogListener = () => {\n const stream = new Stream(window.location.origin.replace('http', 'ws'))\n const subscription = stream.subscribeGroup<Log>(streamName, groupId)\n const store = useLogsStore.getState()\n\n subscription.addChangeListener((logs) => {\n if (logs) {\n store.setLogs(logs)\n }\n })\n\n subscription.onEvent(type, store.addLog)\n}\n","export const formatTimestamp = (time: number) => {\n const date = new Date(Number(time))\n return `${date.toLocaleDateString('en-US', { year: undefined, month: 'short', day: '2-digit' })}, ${date.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h24' })}.${date.getMilliseconds().toString().padStart(3, '0')}`\n}\n","import { LevelDot, Sidebar } from '@motiadev/ui'\nimport { X } from 'lucide-react'\nimport type React from 'react'\nimport { useMemo, useState } from 'react'\nimport ReactJson from 'react18-json-view'\nimport 'react18-json-view/src/dark.css'\nimport 'react18-json-view/src/style.css'\nimport type { Log } from '../types/log'\nimport { formatTimestamp } from '../utils/format-timestamp'\n\ntype Props = {\n log?: Log\n onClose: () => void\n}\n\nconst defaultProps = ['id', 'msg', 'time', 'level', 'step', 'flows', 'traceId']\n\nexport const LogDetail: React.FC<Props> = ({ log, onClose }) => {\n const [hasOtherProps, setHasOtherProps] = useState(false)\n\n const otherPropsObject = useMemo(() => {\n if (!log) {\n return null\n }\n\n const otherProps = Object.keys(log ?? {}).filter((key) => !defaultProps.includes(key))\n setHasOtherProps(otherProps.length > 0)\n\n return otherProps.reduce(\n (acc, key) => {\n acc[key] = log[key]\n return acc\n },\n {} as Record<string, unknown>,\n )\n }, [log])\n\n if (!log) {\n return null\n }\n\n return (\n <Sidebar\n onClose={onClose}\n title=\"Logs Details\"\n subtitle=\"Details including custom properties\"\n actions={[{ icon: <X />, onClick: onClose, label: 'Close' }]}\n details={[\n {\n label: 'Level',\n value: (\n <div className=\"flex items-center gap-2\">\n <LevelDot level={log.level} />\n <div className=\"capitalize\">{log.level}</div>\n </div>\n ),\n },\n { label: 'Time', value: formatTimestamp(log.time) },\n { label: 'Step', value: log.step },\n { label: 'Flows', value: log.flows.join(', ') },\n { label: 'Trace ID', value: log.traceId },\n ]}\n >\n {hasOtherProps && <ReactJson src={otherPropsObject} theme=\"default\" enableClipboard />}\n </Sidebar>\n )\n}\n","import { Button, cn, Input, LevelDot, Table, TableBody, TableCell, TableRow } from '@motiadev/ui'\nimport { Search, Trash, X } from 'lucide-react'\nimport { useMemo, useState } from 'react'\nimport { useLogsStore } from '../stores/use-logs-store'\nimport { formatTimestamp } from '../utils/format-timestamp'\nimport { LogDetail } from './log-detail'\n\nexport const LogsPage = () => {\n const logs = useLogsStore((state) => state.logs)\n const resetLogs = useLogsStore((state) => state.resetLogs)\n const selectedLogId = useLogsStore((state) => state.selectedLogId)\n const selectLogId = useLogsStore((state) => state.selectLogId)\n const selectedLog = useMemo(\n () => (selectedLogId ? logs.find((log) => log.id === selectedLogId) : undefined),\n [logs, selectedLogId],\n )\n\n const [search, setSearch] = useState('')\n const filteredLogs = useMemo(() => {\n return logs.filter((log) => {\n return (\n log.msg.toLowerCase().includes(search.toLowerCase()) ||\n log.traceId.toLowerCase().includes(search.toLowerCase()) ||\n log.step.toLowerCase().includes(search.toLowerCase())\n )\n })\n }, [logs, search])\n\n return (\n <>\n <div className=\"grid grid-rows-[auto_1fr] h-full\" data-testid=\"logs-container\">\n <div className=\"flex p-2 border-b gap-2\" data-testid=\"logs-search-container\">\n <div className=\"flex-1 relative\">\n <Input\n variant=\"shade\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"px-9! font-medium\"\n placeholder=\"Search by Trace ID or Message\"\n />\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50\" />\n <X\n className=\"cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground\"\n onClick={() => setSearch('')}\n />\n </div>\n <Button variant=\"default\" onClick={resetLogs} className=\"h-[34px]\">\n <Trash /> Clear\n </Button>\n </div>\n <Table>\n <TableBody className=\"font-mono font-medium\">\n {filteredLogs.map((log, index) => (\n <TableRow\n data-testid=\"log-row\"\n className={cn('font-mono font-semibold cursor-pointer border-0', {\n 'bg-muted-foreground/10 hover:bg-muted-foreground/20': selectedLogId === log.id,\n 'hover:bg-muted-foreground/10': selectedLogId !== log.id,\n })}\n key={index}\n onClick={() => selectLogId(log.id)}\n >\n <TableCell\n data-testid={`time-${index}`}\n className=\"whitespace-nowrap flex items-center gap-2 text-muted-foreground\"\n >\n <LevelDot level={log.level} />\n {formatTimestamp(log.time)}\n </TableCell>\n <TableCell\n data-testid={`trace-${log.traceId}`}\n className=\"whitespace-nowrap cursor-pointer hover:text-primary text-muted-foreground\"\n onClick={() => setSearch(log.traceId)}\n >\n {log.traceId}\n </TableCell>\n <TableCell data-testid={`step-${index}`} aria-label={log.step} className=\"whitespace-nowrap\">\n {log.step}\n </TableCell>\n <TableCell\n data-testid={`msg-${index}`}\n aria-label={log.msg}\n className=\"whitespace-nowrap max-w-[500px] truncate w-full\"\n >\n {log.msg}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n <LogDetail log={selectedLog} onClose={() => selectLogId(undefined)} />\n </>\n )\n}\n","import './styles.css'\nimport { initLogListener } from './utils/init-log-listener'\n\nexport { LogsPage } from './components/logs-page'\nexport type { Log } from './types/log'\n\ninitLogListener()\n"],"mappings":";;;;;;;;;;;;AAYA,MAAaW,eAAeX,QAAmB,EAAEY,SAAS;CACxDT,MAAM,EAAE;CACRC,eAAeS;CACfR,SAASC,QACPM,KAAKE,UAAU;AACb,MAAIA,MAAMX,KAAKY,MAAMC,MAAMA,EAAEC,OAAOX,IAAIW,GAAG,CACzC,QAAOH;AAET,SAAO,EACLX,MAAM,CAACG,KAAK,GAAGQ,MAAMX,KAAI,EAC1B;GACD;CACJI,UAAUJ,SACRS,IAAI,EACFT,MAAM,CAAC,GAAGA,KAAK,CAACe,SAAQ,EACzB,CAAC;CACJV,iBAAiB;AACfI,MAAI,EAAET,MAAM,EAAA,EAAI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;AAAA,KAAAlD,EAAA,QAAA+C,OAAA/C,EAAA,QAAAiD,KAAA;AA9DxEC,QAAA,4CACEH,KA6DAE,OACC;AAAAjD,IAAA,MAAA+C;AAAA/C,IAAA,MAAAiD;AAAAjD,IAAA,MAAAkD;OAAAA,OAAAlD,EAAA;AAAA,QA/DHkD;;AAtBoB,SAAA/C,MAAAgD,OAAA;AAAA,QACeA,MAAKjD;;AADpB,SAAAG,OAAA+C,SAAA;AAAA,QAEoBD,QAAK/C;;AAFzB,SAAAG,OAAA8C,SAAA;AAAA,QAGwBF,QAAK7C;;AAH7B,SAAAG,OAAA6C,SAAA;AAAA,QAIsBH,QAAK3C;;;;;ACLnD+C,iBAAiB"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { MotiaPlugin, MotiaPluginContext } from
|
|
2
|
-
|
|
1
|
+
import { MotiaPlugin, MotiaPluginContext } from "@motiadev/core";
|
|
2
|
+
|
|
3
|
+
//#region src/plugin.d.ts
|
|
4
|
+
declare function plugin(motia: MotiaPluginContext): MotiaPlugin;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { plugin as default };
|
|
3
7
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../src/plugin.ts"],"sourcesContent":[],"mappings":";;;iBAEwB,MAAA,QAAc,qBAAqB"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
};
|
|
1
|
+
//#region src/plugin.ts
|
|
2
|
+
function plugin(motia) {
|
|
3
|
+
return { workbench: [{
|
|
4
|
+
packageName: "@motiadev/plugin-logs",
|
|
5
|
+
label: "Logs",
|
|
6
|
+
position: "bottom",
|
|
7
|
+
componentName: "LogsPage",
|
|
8
|
+
labelIcon: "logs"
|
|
9
|
+
}] };
|
|
13
10
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { plugin as default };
|
|
14
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","names":["MotiaPlugin","MotiaPluginContext","plugin","motia","workbench","packageName","label","position","componentName","labelIcon"],"sources":["../src/plugin.ts"],"sourcesContent":["import type { MotiaPlugin, MotiaPluginContext } from '@motiadev/core'\n\nexport default function plugin(motia: MotiaPluginContext): MotiaPlugin {\n return {\n workbench: [\n {\n packageName: '@motiadev/plugin-logs',\n label: 'Logs',\n position: 'bottom',\n componentName: 'LogsPage',\n labelIcon: 'logs',\n },\n ],\n }\n}\n"],"mappings":";AAEA,SAAwBE,OAAOC,OAAwC;AACrE,QAAO,EACLC,WAAW,CACT;EACEC,aAAa;EACbC,OAAO;EACPC,UAAU;EACVC,eAAe;EACfC,WAAW;EACZ,CAAA,EAEJ"}
|
package/package.json
CHANGED
|
@@ -1,50 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motiadev/plugin-logs",
|
|
3
|
-
"version": "0.13.0-beta.162-
|
|
3
|
+
"version": "0.13.0-beta.162-846200",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"require": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"./plugin": {
|
|
14
|
-
"types": "./dist/plugin.d.ts",
|
|
15
|
-
"import": "./dist/plugin.js",
|
|
16
|
-
"require": "./dist/plugin.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./styles.css": "./dist/styles.css"
|
|
8
|
+
".": "./dist/index.js",
|
|
9
|
+
"./plugin": "./dist/plugin.js",
|
|
10
|
+
"./package.json": "./package.json"
|
|
19
11
|
},
|
|
20
12
|
"files": [
|
|
21
13
|
"dist"
|
|
22
14
|
],
|
|
23
15
|
"dependencies": {
|
|
24
|
-
"lucide-react": "^0.
|
|
16
|
+
"lucide-react": "^0.555.0",
|
|
17
|
+
"react": "^19.2.0",
|
|
25
18
|
"react18-json-view": "^0.2.9",
|
|
26
19
|
"zustand": "^5.0.8"
|
|
27
20
|
},
|
|
28
21
|
"peerDependencies": {
|
|
29
|
-
"@motiadev/
|
|
30
|
-
"@motiadev/
|
|
31
|
-
"@motiadev/core": "0.13.0-beta.162-
|
|
22
|
+
"@motiadev/ui": "0.13.0-beta.162-846200",
|
|
23
|
+
"@motiadev/stream-client-browser": "0.13.0-beta.162-846200",
|
|
24
|
+
"@motiadev/core": "0.13.0-beta.162-846200"
|
|
32
25
|
},
|
|
33
26
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"
|
|
39
|
-
"react": "^19.2.
|
|
40
|
-
"
|
|
27
|
+
"@bosh-code/tsdown-plugin-inject-css": "^2.0.0",
|
|
28
|
+
"@bosh-code/tsdown-plugin-tailwindcss": "^1.0.1",
|
|
29
|
+
"@rollup/plugin-babel": "^6.1.0",
|
|
30
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
31
|
+
"@types/node": "^24.10.1",
|
|
32
|
+
"@types/react": "^19.2.7",
|
|
33
|
+
"babel-plugin-react-compiler": "^1.0.0",
|
|
34
|
+
"publint": "^0.3.15",
|
|
35
|
+
"tailwindcss": "^4.1.17",
|
|
36
|
+
"tsdown": "^0.16.8",
|
|
41
37
|
"typescript": "^5.9.3",
|
|
42
|
-
"
|
|
43
|
-
"vite-plugin-dts": "^4.5.4"
|
|
38
|
+
"unplugin-unused": "^0.5.6"
|
|
44
39
|
},
|
|
40
|
+
"module": "./dist/index.js",
|
|
45
41
|
"scripts": {
|
|
46
|
-
"build": "
|
|
47
|
-
"dev": "
|
|
42
|
+
"build": "tsdown",
|
|
43
|
+
"dev": "tsdown --watch",
|
|
48
44
|
"clean": "rm -rf dist"
|
|
49
45
|
}
|
|
50
46
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-detail.d.ts","sourceRoot":"","sources":["../../src/components/log-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,gCAAgC,CAAA;AACvC,OAAO,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAGvC,KAAK,KAAK,GAAG;IACX,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAID,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiDrC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-level-badge.d.ts","sourceRoot":"","sources":["../../src/components/log-level-badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAMzE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logs-page.d.ts","sourceRoot":"","sources":["../../src/components/logs-page.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,QAAQ,+CAuFpB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logs-tab-label.d.ts","sourceRoot":"","sources":["../../src/components/logs-tab-label.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oFAKvB,CAAA"}
|
package/dist/index.cjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const st=require("@motiadev/stream-client-browser"),p=require("react"),Y=require("@motiadev/ui");function ot(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=ot(p),Ee=e=>{let t;const n=new Set,r=(d,m)=>{const v=typeof d=="function"?d(t):d;if(!Object.is(v,t)){const w=t;t=m??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(E=>E(t,w))}},l=()=>t,c={setState:r,getState:l,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=t=e(r,l,c);return c},it=e=>e?Ee(e):Ee,lt=e=>e;function ct(e,t=lt){const n=p.useSyncExternalStore(e.subscribe,p.useCallback(()=>t(e.getState()),[e,t]),p.useCallback(()=>t(e.getInitialState()),[e,t]));return p.useDebugValue(n),n}const ut=e=>{const t=it(e),n=r=>ct(t,r);return Object.assign(n,t),n},ft=e=>ut,Q=ft()(e=>({logs:[],selectedLogId:void 0,addLog:t=>e(n=>n.logs.find(r=>r.id===t.id)?n:{logs:[t,...n.logs]}),setLogs:t=>e({logs:[...t].reverse()}),resetLogs:()=>{e({logs:[]})},selectLogId:t=>e({selectedLogId:t})})),dt="__motia.logs",pt="default",gt="log",mt=()=>{const t=new st.Stream(window.location.origin.replace("http","ws")).subscribeGroup(dt,pt),n=Q.getState();t.addChangeListener(r=>{r&&n.setLogs(r)}),t.onEvent(gt,n.addLog)};var te={exports:{}},G={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Ae;function vt(){if(Ae)return G;Ae=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,l,i){var o=null;if(i!==void 0&&(o=""+i),l.key!==void 0&&(o=""+l.key),"key"in l){i={};for(var c in l)c!=="key"&&(i[c]=l[c])}else i=l;return l=i.ref,{$$typeof:e,type:r,key:o,ref:l!==void 0?l:null,props:i}}return G.Fragment=t,G.jsx=n,G.jsxs=n,G}var X={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ke;function ht(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){function e(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===B?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case S:return"Fragment";case A:return"Profiler";case N:return"StrictMode";case b:return"Suspense";case k:return"SuspenseList";case R:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case x:return"Portal";case $:return(s.displayName||"Context")+".Provider";case P:return(s._context.displayName||"Context")+".Consumer";case h:var g=s.render;return s=s.displayName,s||(s=g.displayName||g.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case C:return g=s.displayName||null,g!==null?g:e(s.type)||"Memo";case H:g=s._payload,s=s._init;try{return e(s(g))}catch{}}return null}function t(s){return""+s}function n(s){try{t(s);var g=!1}catch{g=!0}if(g){g=console;var y=g.error,f=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return y.call(g,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",f),t(s)}}function r(s){if(s===S)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===H)return"<...>";try{var g=e(s);return g?"<"+g+">":"<...>"}catch{return"<...>"}}function l(){var s=L.A;return s===null?null:s.getOwner()}function i(){return Error("react-stack-top-frame")}function o(s){if(D.call(s,"key")){var g=Object.getOwnPropertyDescriptor(s,"key").get;if(g&&g.isReactWarning)return!1}return s.key!==void 0}function c(s,g){function y(){O||(O=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",g))}y.isReactWarning=!0,Object.defineProperty(s,"key",{get:y,configurable:!0})}function u(){var s=e(this.type);return M[s]||(M[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function d(s,g,y,f,j,V,ae,se){return y=V.ref,s={$$typeof:E,type:s,key:g,props:V,_owner:j},(y!==void 0?y:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:u}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function m(s,g,y,f,j,V,ae,se){var I=g.children;if(I!==void 0)if(f)if(U(I)){for(f=0;f<I.length;f++)v(I[f]);Object.freeze&&Object.freeze(I)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(I);if(D.call(g,"key")){I=e(s);var q=Object.keys(g).filter(function(at){return at!=="key"});f=0<q.length?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}",F[I+f]||(q=0<q.length?"{"+q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
-
let props = %s;
|
|
19
|
-
<%s {...props} />
|
|
20
|
-
React keys must be passed directly to JSX without using spread:
|
|
21
|
-
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,f,I,q,I),F[I+f]=!0)}if(I=null,y!==void 0&&(n(y),I=""+y),o(g)&&(n(g.key),I=""+g.key),"key"in g){y={};for(var oe in g)oe!=="key"&&(y[oe]=g[oe])}else y=g;return I&&c(y,typeof s=="function"?s.displayName||s.name||"Unknown":s),d(s,I,V,j,l(),y,ae,se)}function v(s){typeof s=="object"&&s!==null&&s.$$typeof===E&&s._store&&(s._store.validated=1)}var w=p,E=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),$=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),B=Symbol.for("react.client.reference"),L=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,U=Array.isArray,Z=console.createTask?console.createTask:function(){return null};w={react_stack_bottom_frame:function(s){return s()}};var O,M={},_=w.react_stack_bottom_frame.bind(w,i)(),z=Z(r(i)),F={};X.Fragment=S,X.jsx=function(s,g,y,f,j){var V=1e4>L.recentlyCreatedOwnerStacks++;return m(s,g,y,!1,f,j,V?Error("react-stack-top-frame"):_,V?Z(r(s)):z)},X.jsxs=function(s,g,y,f,j){var V=1e4>L.recentlyCreatedOwnerStacks++;return m(s,g,y,!0,f,j,V?Error("react-stack-top-frame"):_,V?Z(r(s)):z)}}()),X}var _e;function bt(){return _e||(_e=1,process.env.NODE_ENV==="production"?te.exports=vt():te.exports=ht()),te.exports}var a=bt();/**
|
|
23
|
-
* @license lucide-react v0.545.0 - ISC
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the ISC license.
|
|
26
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const jt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Te=e=>{const t=yt(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ke=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),wt=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
28
|
-
* @license lucide-react v0.545.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var xt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
33
|
-
* @license lucide-react v0.545.0 - ISC
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the ISC license.
|
|
36
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const Ct=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:i,iconNode:o,...c},u)=>p.createElement("svg",{ref:u,...xt,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ke("lucide",l),...!i&&!wt(c)&&{"aria-hidden":"true"},...c},[...o.map(([d,m])=>p.createElement(d,m)),...Array.isArray(i)?i:[i]]));/**
|
|
38
|
-
* @license lucide-react v0.545.0 - ISC
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the ISC license.
|
|
41
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const he=(e,t)=>{const n=p.forwardRef(({className:r,...l},i)=>p.createElement(Ct,{ref:i,iconNode:t,className:Ke(`lucide-${jt(Te(e))}`,`lucide-${e}`,r),...l}));return n.displayName=Te(e),n};/**
|
|
43
|
-
* @license lucide-react v0.545.0 - ISC
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the ISC license.
|
|
46
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const St=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Et=he("search",St);/**
|
|
48
|
-
* @license lucide-react v0.545.0 - ISC
|
|
49
|
-
*
|
|
50
|
-
* This source code is licensed under the ISC license.
|
|
51
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const At=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],kt=he("trash",At);/**
|
|
53
|
-
* @license lucide-react v0.545.0 - ISC
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the ISC license.
|
|
56
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const _t=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ge=he("x",_t),Xe=e=>{const t=new Date(Number(e));return`${t.toLocaleDateString("en-US",{year:void 0,month:"short",day:"2-digit"})}, ${t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h24"})}.${t.getMilliseconds().toString().padStart(3,"0")}`};function Tt(e,t,n,r){function l(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function c(m){try{d(r.next(m))}catch(v){o(v)}}function u(m){try{d(r.throw(m))}catch(v){o(v)}}function d(m){m.done?i(m.value):l(m.value).then(c,u)}d((r=r.apply(e,[])).next())})}var Ot=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(l){e.addRange(l)}),t&&t.focus()}},Nt=Ot,Oe={"text/plain":"Text","text/html":"Url",default:"Text"},Rt="Copy to clipboard: #{key}, Enter";function Lt(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Dt(e,t){var n,r,l,i,o,c,u=!1;t||(t={}),n=t.debug||!1;try{l=Nt(),i=document.createRange(),o=document.getSelection(),c=document.createElement("span"),c.textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(m){if(m.stopPropagation(),t.format)if(m.preventDefault(),typeof m.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var v=Oe[t.format]||Oe.default;window.clipboardData.setData(v,e)}else m.clipboardData.clearData(),m.clipboardData.setData(t.format,e);t.onCopy&&(m.preventDefault(),t.onCopy(m.clipboardData))}),document.body.appendChild(c),i.selectNodeContents(c),o.addRange(i);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");u=!0}catch(m){n&&console.error("unable to copy using execCommand: ",m),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(v){n&&console.error("unable to copy using clipboardData: ",v),n&&console.error("falling back to prompt"),r=Lt("message"in t?t.message:Rt),window.prompt(r,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),c&&document.body.removeChild(c),l()}return u}var Pt=Dt;function W(e){return Object.prototype.toString.call(e)==="[object Object]"}function ee(e){return Array.isArray(e)?e.length:W(e)?Object.keys(e).length:0}function It(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,r)=>{switch(typeof r){case"bigint":return String(r)+"n";case"number":case"boolean":case"object":case"string":return r;default:return String(r)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function $t(e){return Tt(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(e)}catch{Pt(e)}})}function Ne(e,t,n,r,l,i){if(i&&i.collapsed!==void 0)return!!i.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const o=ee(e);if(typeof r=="function"){const c=be(r,[{node:e,depth:t,indexOrName:n,size:o}]);if(typeof c=="boolean")return c}return!!(Array.isArray(e)&&o>l||W(e)&&o>l)}function Re(e,t,n,r,l,i){if(i&&i.collapsed!==void 0)return!!i.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const o=Math.ceil(e.length/100);if(typeof r=="function"){const c=be(r,[{node:e,depth:t,indexOrName:n,size:o}]);if(typeof c=="boolean")return c}return!!(Array.isArray(e)&&o>l||W(e)&&o>l)}function K(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function be(e,t){try{return e(...t)}catch(n){reportError(n)}}function Qe(e){if(e===!0||W(e)&&e.add===!0)return!0}function Le(e){if(e===!0||W(e)&&e.edit===!0)return!0}function je(e){if(e===!0||W(e)&&e.delete===!0)return!0}function Mt(e){return typeof e=="function"}function et(e){return!e||e.add===void 0||!!e.add}function De(e){return!e||e.edit===void 0||!!e.edit}function ye(e){return!e||e.delete===void 0||!!e.delete}function ne(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function Ft(e){return!e||e.matchesURL===void 0||!!e.matchesURL}function Ht(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var Pe;function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ie.apply(this,arguments)}var we=function(t){return T.createElement("svg",ie({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),Pe||(Pe=T.createElement("path",{fill:"currentColor",d:"M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"})))},Ie;function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}var Ut=function(t){return T.createElement("svg",le({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Ie||(Ie=T.createElement("path",{fill:"currentColor",d:"M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"})))},$e,Me;function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ce.apply(this,arguments)}var Zt=function(t){return T.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),$e||($e=T.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"})),Me||(Me=T.createElement("path",{fill:"#14C786",d:"M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"})))};function re({node:e,nodeMeta:t}){const{customizeCopy:n,CopyComponent:r,CopiedComponent:l}=p.useContext(J),[i,o]=p.useState(!1),c=u=>{u.stopPropagation();const d=n(e,t);typeof d=="string"&&d&&$t(d),o(!0),setTimeout(()=>o(!1),3e3)};return i?typeof l=="function"?a.jsx(l,{className:"json-view--copy",style:{display:"inline-block"}}):a.jsx(Zt,{className:"json-view--copy",style:{display:"inline-block"}}):typeof r=="function"?a.jsx(r,{onClick:c,className:"json-view--copy"}):a.jsx(Ut,{onClick:c,className:"json-view--copy"})}function ue({indexOrName:e,value:t,depth:n,deleteHandle:r,editHandle:l,parent:i,parentPath:o}){const{displayArrayIndex:c}=p.useContext(J),u=Array.isArray(i);return a.jsxs("div",Object.assign({className:"json-view--pair"},{children:[!u||u&&c?a.jsxs(a.Fragment,{children:[a.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," "]}):a.jsx(a.Fragment,{}),a.jsx(nt,{node:t,depth:n+1,deleteHandle:(d,m)=>r(d,m),editHandle:(d,m,v,w)=>l(d,m,v,w),parent:i,indexOrName:e,parentPath:o})]}))}var Fe,He;function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(this,arguments)}var xe=function(t){return T.createElement("svg",fe({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Fe||(Fe=T.createElement("path",{fill:"currentColor",d:"M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"})),He||(He=T.createElement("path",{fill:"#DA0000",d:"M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"})))},Ue,Ze;function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(this,arguments)}var tt=function(t){return T.createElement("svg",de({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Ue||(Ue=T.createElement("path",{fill:"currentColor",d:"M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"})),Ze||(Ze=T.createElement("path",{fill:"#14C786",d:"M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"})))},ze,Ve;function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pe.apply(this,arguments)}var Ce=function(t){return T.createElement("svg",pe({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),ze||(ze=T.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})),Ve||(Ve=T.createElement("path",{fill:"#14C786",d:"m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"})))},Ye,Be;function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge.apply(this,arguments)}var Se=function(t){return T.createElement("svg",ge({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Ye||(Ye=T.createElement("path",{fill:"#DA0000",d:"M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"})),Be||(Be=T.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})))};function zt({originNode:e,node:t,depth:n,index:r,deleteHandle:l,customOptions:i,startIndex:o,parent:c,parentPath:u}){const{enableClipboard:d,src:m,onEdit:v,onChange:w,forceUpdate:E,displaySize:x,CustomOperation:S}=p.useContext(J),N=[...u,String(r)],[A,P]=p.useState(!0),$=p.useCallback((k,C,H)=>{e[k]=C,v&&v({newValue:C,oldValue:H,depth:n,src:m,indexOrName:k,parentType:"array",parentPath:u}),w&&w({type:"edit",depth:n,src:m,indexOrName:k,parentType:"array",parentPath:u}),E()},[t,v,w,E]),h=k=>{e.splice(k,1),l&&l(k,u),E()},b=a.jsxs(a.Fragment,{children:[!A&&a.jsxs("span",Object.assign({onClick:()=>P(!0),className:"jv-size-chevron"},{children:[K(x,n,A)&&a.jsxs("span",Object.assign({className:"jv-size"},{children:[ee(t)," Items"]})),a.jsx(we,{className:"jv-chevron"})]})),!A&&d&&ne(i)&&a.jsx(re,{node:t,nodeMeta:{depth:n,indexOrName:r,parent:c,parentPath:u,currentPath:N}}),typeof S=="function"?a.jsx(S,{node:t}):null]});return a.jsxs("div",{children:[a.jsx("span",{children:"["}),b,A?a.jsxs("button",Object.assign({onClick:()=>P(!1),className:"jv-button"},{children:[o," ... ",o+t.length-1]})):a.jsx("div",Object.assign({className:"jv-indent"},{children:t.map((k,C)=>a.jsx(ue,{indexOrName:C+o,value:k,depth:n,parent:t,deleteHandle:h,editHandle:$,parentPath:u},String(r)+String(C)))})),a.jsx("span",{children:"]"})]})}function Vt({node:e,depth:t,deleteHandle:n,indexOrName:r,customOptions:l,parent:i,parentPath:o}){const c=typeof r<"u"?[...o,String(r)]:o,u=[];for(let O=0;O<e.length;O+=100)u.push(e.slice(O,O+100));const{collapsed:d,enableClipboard:m,collapseObjectsAfterLength:v,editable:w,onDelete:E,src:x,onAdd:S,CustomOperation:N,onChange:A,forceUpdate:P,displaySize:$}=p.useContext(J),[h,b]=p.useState(Re(e,t,r,d,v,l));p.useEffect(()=>{b(Re(e,t,r,d,v,l))},[d,v]);const[k,C]=p.useState(!1),H=()=>{C(!1),n&&n(r,o),E&&E({value:e,depth:t,src:x,indexOrName:r,parentType:"array",parentPath:o}),A&&A({type:"delete",depth:t,src:x,indexOrName:r,parentType:"array",parentPath:o})},[R,B]=p.useState(!1),L=()=>{const O=e;O.push(null),S&&S({indexOrName:O.length-1,depth:t,src:x,parentType:"array",parentPath:o}),A&&A({type:"add",indexOrName:O.length-1,depth:t,src:x,parentType:"array",parentPath:o}),P()},D=k||R,U=()=>{C(!1),B(!1)},Z=a.jsxs(a.Fragment,{children:[!h&&!D&&a.jsxs("span",Object.assign({onClick:()=>b(!0),className:"jv-size-chevron"},{children:[K($,t,h)&&a.jsxs("span",Object.assign({className:"jv-size"},{children:[e.length," Items"]})),a.jsx(we,{className:"jv-chevron"})]})),D&&a.jsx(Ce,{className:"json-view--edit",style:{display:"inline-block"},onClick:R?L:H}),D&&a.jsx(Se,{className:"json-view--edit",style:{display:"inline-block"},onClick:U}),!h&&!D&&m&&ne(l)&&a.jsx(re,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:i,parentPath:o,currentPath:c}}),!h&&!D&&Qe(w)&&et(l)&&a.jsx(tt,{className:"json-view--edit",onClick:()=>{L()}}),!h&&!D&&je(w)&&ye(l)&&n&&a.jsx(xe,{className:"json-view--edit",onClick:()=>C(!0)}),typeof N=="function"?a.jsx(N,{node:e}):null]});return a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"["}),Z,h?a.jsx("button",Object.assign({onClick:()=>b(!1),className:"jv-button"},{children:"..."})):a.jsx("div",Object.assign({className:"jv-indent"},{children:u.map((O,M)=>a.jsx(zt,{originNode:e,node:O,depth:t,index:M,startIndex:M*100,deleteHandle:n,customOptions:l,parentPath:o},String(r)+String(M)))})),a.jsx("span",{children:"]"}),h&&K($,t,h)&&a.jsxs("span",Object.assign({onClick:()=>b(!1),className:"jv-size"},{children:[e.length," Items"]}))]})}function Yt({node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:l,parent:i,parentPath:o}){const{collapsed:c,onCollapse:u,enableClipboard:d,ignoreLargeArray:m,collapseObjectsAfterLength:v,editable:w,onDelete:E,src:x,onAdd:S,onEdit:N,onChange:A,forceUpdate:P,displaySize:$,CustomOperation:h}=p.useContext(J),b=typeof n<"u"?[...o,String(n)]:o;if(!m&&Array.isArray(e)&&e.length>100)return a.jsx(Vt,{node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:l,parentPath:b});const k=W(e),[C,H]=p.useState(Ne(e,t,n,c,v,l)),R=f=>{u?.({isCollapsing:!f,node:e,depth:t,indexOrName:n}),H(f)};p.useEffect(()=>{R(Ne(e,t,n,c,v,l))},[c,v]);const B=p.useCallback((f,j,V)=>{Array.isArray(e)?e[+f]=j:e&&(e[f]=j),N&&N({newValue:j,oldValue:V,depth:t,src:x,indexOrName:f,parentType:k?"object":"array",parentPath:b}),A&&A({type:"edit",depth:t,src:x,indexOrName:f,parentType:k?"object":"array",parentPath:b}),P()},[e,N,A,P]),L=f=>{Array.isArray(e)?e.splice(+f,1):e&&delete e[f],P()},[D,U]=p.useState(!1),Z=()=>{U(!1),r&&r(n,b),E&&E({value:e,depth:t,src:x,indexOrName:n,parentType:k?"object":"array",parentPath:b}),A&&A({type:"delete",depth:t,src:x,indexOrName:n,parentType:k?"object":"array",parentPath:b})},[O,M]=p.useState(!1),_=p.useRef(null),z=()=>{var f;if(k){const j=(f=_.current)===null||f===void 0?void 0:f.value;j&&(e[j]=null,_.current&&(_.current.value=""),M(!1),S&&S({indexOrName:j,depth:t,src:x,parentType:"object",parentPath:b}),A&&A({type:"add",indexOrName:j,depth:t,src:x,parentType:"object",parentPath:b}))}else if(Array.isArray(e)){const j=e;j.push(null),S&&S({indexOrName:j.length-1,depth:t,src:x,parentType:"array",parentPath:b}),A&&A({type:"add",indexOrName:j.length-1,depth:t,src:x,parentType:"array",parentPath:b})}P()},F=f=>{f.key==="Enter"?(f.preventDefault(),z()):f.key==="Escape"&&g()},s=D||O,g=()=>{U(!1),M(!1)},y=a.jsxs(a.Fragment,{children:[!C&&!s&&a.jsxs("span",Object.assign({onClick:()=>R(!0),className:"jv-size-chevron"},{children:[K($,t,C)&&a.jsxs("span",Object.assign({className:"jv-size"},{children:[ee(e)," Items"]})),a.jsx(we,{className:"jv-chevron"})]})),O&&k&&a.jsx("input",{className:"json-view--input",placeholder:"property",ref:_,onKeyDown:F}),s&&a.jsx(Ce,{className:"json-view--edit",style:{display:"inline-block"},onClick:O?z:Z}),s&&a.jsx(Se,{className:"json-view--edit",style:{display:"inline-block"},onClick:g}),!C&&!s&&d&&ne(l)&&a.jsx(re,{node:e,nodeMeta:{depth:t,indexOrName:n,parent:i,parentPath:o,currentPath:b}}),!C&&!s&&Qe(w)&&et(l)&&a.jsx(tt,{className:"json-view--edit",onClick:()=>{k?(M(!0),setTimeout(()=>{var f;return(f=_.current)===null||f===void 0?void 0:f.focus()})):z()}}),!C&&!s&&je(w)&&ye(l)&&r&&a.jsx(xe,{className:"json-view--edit",onClick:()=>U(!0)}),typeof h=="function"?a.jsx(h,{node:e}):null]});return Array.isArray(e)?a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"["}),y,C?a.jsx("button",Object.assign({onClick:()=>R(!1),className:"jv-button"},{children:"..."})):a.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((f,j)=>a.jsx(ue,{indexOrName:j,value:f,depth:t,parent:e,deleteHandle:L,editHandle:B,parentPath:b},String(n)+String(j)))})),a.jsx("span",{children:"]"}),C&&K($,t,C)&&a.jsxs("span",Object.assign({onClick:()=>R(!1),className:"jv-size"},{children:[ee(e)," Items"]}))]}):k?a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"{"}),y,C?a.jsx("button",Object.assign({onClick:()=>R(!1),className:"jv-button"},{children:"..."})):a.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([f,j])=>a.jsx(ue,{indexOrName:f,value:j,depth:t,parent:e,deleteHandle:L,editHandle:B,parentPath:b},String(n)+String(f)))})),a.jsx("span",{children:"}"}),C&&K($,t,C)&&a.jsxs("span",Object.assign({onClick:()=>R(!1),className:"jv-size"},{children:[ee(e)," Items"]}))]}):a.jsx("span",{children:String(e)})}const Bt=p.forwardRef(({str:e,className:t,ctrlClick:n},r)=>{let{collapseStringMode:l,collapseStringsAfterLength:i,customizeCollapseStringUI:o}=p.useContext(J);const[c,u]=p.useState(!0),d=p.useRef(null);i=i>0?i:0;const m=e.replace(/\s+/g," "),v=typeof o=="function"?o(m,c):typeof o=="string"?o:"...",w=E=>{var x;if((E.ctrlKey||E.metaKey)&&n)n(E);else{const S=window.getSelection();if(S&&S.anchorOffset!==S.focusOffset&&((x=S.anchorNode)===null||x===void 0?void 0:x.parentElement)===d.current)return;u(!c)}};if(e.length<=i)return a.jsxs("span",Object.assign({ref:d,className:t,onClick:n},{children:['"',e,'"']}));if(l==="address")return e.length<=10?a.jsxs("span",Object.assign({ref:d,className:t,onClick:n},{children:['"',e,'"']})):a.jsxs("span",Object.assign({ref:d,onClick:w,className:t+" cursor-pointer"},{children:['"',c?[m.slice(0,6),v,m.slice(-4)]:e,'"']}));if(l==="directly")return a.jsxs("span",Object.assign({ref:d,onClick:w,className:t+" cursor-pointer"},{children:['"',c?[m.slice(0,i),v]:e,'"']}));if(l==="word"){let E=i,x=i+1,S=m,N=1;for(;;){if(/\W/.test(e[E])){S=e.slice(0,E);break}if(/\W/.test(e[x])){S=e.slice(0,x);break}if(N===6){S=e.slice(0,i);break}N++,E--,x++}return a.jsxs("span",Object.assign({ref:d,onClick:w,className:t+" cursor-pointer"},{children:['"',c?[S,v]:e,'"']}))}return a.jsxs("span",Object.assign({ref:d,className:t},{children:['"',e,'"']}))});var We;function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},me.apply(this,arguments)}var Wt=function(t){return T.createElement("svg",me({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),We||(We=T.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"})))},Je,qe;function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ve.apply(this,arguments)}var Jt=function(t){return T.createElement("svg",ve({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Je||(Je=T.createElement("path",{fill:"currentColor",d:"M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"})),qe||(qe=T.createElement("path",{fill:"currentColor",d:"M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"})))};function nt({node:e,depth:t,deleteHandle:n,indexOrName:r,parent:l,editHandle:i,parentPath:o}){const{collapseStringsAfterLength:c,enableClipboard:u,editable:d,src:m,onDelete:v,onChange:w,customizeNode:E,matchesURL:x,urlRegExp:S,EditComponent:N,DoneComponent:A,CancelComponent:P,CustomOperation:$}=p.useContext(J);let h;if(typeof E=="function"&&(h=be(E,[{node:e,depth:t,indexOrName:r}])),h){if(p.isValidElement(h))return h;if(Mt(h)){const b=h;return a.jsx(b,{node:e,depth:t,indexOrName:r})}}if(Array.isArray(e)||W(e))return a.jsx(Yt,{parent:l,node:e,depth:t,indexOrName:r,deleteHandle:n,parentPath:o,customOptions:typeof h=="object"?h:void 0});{const b=typeof e,k=typeof r<"u"?[...o,String(r)]:o,[C,H]=p.useState(!1),[R,B]=p.useState(!1),L=p.useRef(null),D=()=>{H(!0),setTimeout(()=>{var f,j;(f=window.getSelection())===null||f===void 0||f.selectAllChildren(L.current),(j=L.current)===null||j===void 0||j.focus()})},U=p.useCallback(()=>{let f=L.current.innerText;try{const j=JSON.parse(f);i&&i(r,j,e,o)}catch{const V=Ht(b,f);i&&i(r,V,e,o)}H(!1)},[i,r,e,o,b]),Z=()=>{H(!1),B(!1)},O=()=>{B(!1),n&&n(r,o),v&&v({value:e,depth:t,src:m,indexOrName:r,parentType:Array.isArray(l)?"array":"object",parentPath:o}),w&&w({depth:t,src:m,indexOrName:r,parentType:Array.isArray(l)?"array":"object",type:"delete",parentPath:o})},M=p.useCallback(f=>{f.key==="Enter"?(f.preventDefault(),U()):f.key==="Escape"&&Z()},[U]),_=C||R,z=!_&&Le(d)&&De(h)&&i?f=>{(f.ctrlKey||f.metaKey)&&D()}:void 0,F=a.jsxs(a.Fragment,{children:[_&&(typeof A=="function"?a.jsx(A,{className:"json-view--edit",style:{display:"inline-block"},onClick:R?O:U}):a.jsx(Ce,{className:"json-view--edit",style:{display:"inline-block"},onClick:R?O:U})),_&&(typeof P=="function"?a.jsx(P,{className:"json-view--edit",style:{display:"inline-block"},onClick:Z}):a.jsx(Se,{className:"json-view--edit",style:{display:"inline-block"},onClick:Z})),!_&&u&&ne(h)&&a.jsx(re,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:l,parentPath:o,currentPath:k}}),!_&&x&&b==="string"&&S.test(e)&&Ft(h)&&a.jsx("a",Object.assign({href:e,target:"_blank",className:"json-view--link"},{children:a.jsx(Jt,{})})),!_&&Le(d)&&De(h)&&i&&(typeof N=="function"?a.jsx(N,{className:"json-view--edit",onClick:D}):a.jsx(Wt,{className:"json-view--edit",onClick:D})),!_&&je(d)&&ye(h)&&n&&a.jsx(xe,{className:"json-view--edit",onClick:()=>B(!0)}),typeof $=="function"?a.jsx($,{node:e}):null]});let s="json-view--string";switch(b){case"number":case"bigint":s="json-view--number";break;case"boolean":s="json-view--boolean";break;case"object":s="json-view--null";break}typeof h?.className=="string"&&(s+=" "+h.className),R&&(s+=" json-view--deleting");let g=String(e);b==="bigint"&&(g+="n");const y=p.useMemo(()=>a.jsx("span",{contentEditable:!0,className:s,dangerouslySetInnerHTML:{__html:b==="string"?`"${g}"`:g},ref:L,onKeyDown:M}),[g,b,M]);return b==="string"?a.jsxs(a.Fragment,{children:[C?y:e.length>c?a.jsx(Bt,{str:e,ref:L,className:s,ctrlClick:z}):a.jsxs("span",Object.assign({className:s,onClick:z},{children:['"',g,'"']})),F]}):a.jsxs(a.Fragment,{children:[C?y:a.jsx("span",Object.assign({className:s,onClick:z},{children:g})),F]})}}const rt=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,J=p.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,onCollapse:void 0,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,displayArrayIndex:!0,matchesURL:!1,urlRegExp:rt,ignoreLargeArray:!1,CopyComponent:void 0,CopiedComponent:void 0,EditComponent:void 0,CancelComponent:void 0,DoneComponent:void 0,CustomOperation:void 0});function qt({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",customizeCollapseStringUI:r,collapseObjectsAfterLength:l=99,collapsed:i,onCollapse:o,enableClipboard:c=!0,editable:u=!1,onEdit:d,onDelete:m,onAdd:v,onChange:w,dark:E=!1,theme:x="default",customizeNode:S,customizeCopy:N=Z=>It(Z),displaySize:A,displayArrayIndex:P=!0,style:$,className:h,matchesURL:b=!1,urlRegExp:k=rt,ignoreLargeArray:C=!1,CopyComponent:H,CopiedComponent:R,EditComponent:B,CancelComponent:L,DoneComponent:D,CustomOperation:U}){const[Z,O]=p.useState(0),M=p.useCallback(()=>O(F=>++F),[]),[_,z]=p.useState(e);return p.useEffect(()=>z(e),[e]),a.jsx(J.Provider,Object.assign({value:{src:_,collapseStringsAfterLength:t,collapseStringMode:n,customizeCollapseStringUI:r,collapseObjectsAfterLength:l,collapsed:i,onCollapse:o,enableClipboard:c,editable:u,onEdit:d,onDelete:m,onAdd:v,onChange:w,forceUpdate:M,customizeNode:S,customizeCopy:N,displaySize:A,displayArrayIndex:P,matchesURL:b,urlRegExp:k,ignoreLargeArray:C,CopyComponent:H,CopiedComponent:R,EditComponent:B,CancelComponent:L,DoneComponent:D,CustomOperation:U}},{children:a.jsx("code",Object.assign({className:"json-view"+(E?" dark":"")+(x&&x!=="default"?" json-view_"+x:"")+(h?" "+h:""),style:$},{children:a.jsx(nt,{node:_,depth:1,editHandle:(F,s,g,y)=>{z(s),d&&d({newValue:s,oldValue:g,depth:1,src:_,indexOrName:F,parentType:null,parentPath:y}),w&&w({type:"edit",depth:1,src:_,indexOrName:F,parentType:null,parentPath:y})},deleteHandle:(F,s)=>{z(void 0),m&&m({value:_,depth:1,src:_,indexOrName:F,parentType:null,parentPath:s}),w&&w({depth:1,src:_,indexOrName:F,parentType:null,type:"delete",parentPath:s})},parentPath:[]})}))}))}const Kt=["id","msg","time","level","step","flows","traceId"],Gt=({log:e,onClose:t})=>{const[n,r]=p.useState(!1),l=p.useMemo(()=>{if(!e)return null;const i=Object.keys(e??{}).filter(o=>!Kt.includes(o));return r(i.length>0),i.reduce((o,c)=>(o[c]=e[c],o),{})},[e]);return e?a.jsx(Y.Sidebar,{onClose:t,title:"Logs Details",subtitle:"Details including custom properties",actions:[{icon:a.jsx(Ge,{}),onClick:t,label:"Close"}],details:[{label:"Level",value:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Y.LevelDot,{level:e.level}),a.jsx("div",{className:"capitalize",children:e.level})]})},{label:"Time",value:Xe(e.time)},{label:"Step",value:e.step},{label:"Flows",value:e.flows.join(", ")},{label:"Trace ID",value:e.traceId}],children:n&&a.jsx(qt,{src:l,theme:"default",enableClipboard:!0})}):null},Xt=()=>{const e=Q(u=>u.logs),t=Q(u=>u.resetLogs),n=Q(u=>u.selectedLogId),r=Q(u=>u.selectLogId),l=p.useMemo(()=>n?e.find(u=>u.id===n):void 0,[e,n]),[i,o]=p.useState(""),c=p.useMemo(()=>e.filter(u=>u.msg.toLowerCase().includes(i.toLowerCase())||u.traceId.toLowerCase().includes(i.toLowerCase())||u.step.toLowerCase().includes(i.toLowerCase())),[e,i]);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full","data-testid":"logs-container",children:[a.jsxs("div",{className:"flex p-2 border-b gap-2","data-testid":"logs-search-container",children:[a.jsxs("div",{className:"flex-1 relative",children:[a.jsx(Y.Input,{variant:"shade",value:i,onChange:u=>o(u.target.value),className:"px-9! font-medium",placeholder:"Search by Trace ID or Message"}),a.jsx(Et,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50"}),a.jsx(Ge,{className:"cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>o("")})]}),a.jsxs(Y.Button,{variant:"default",onClick:t,className:"h-[34px]",children:[a.jsx(kt,{})," Clear"]})]}),a.jsx(Y.Table,{children:a.jsx(Y.TableBody,{className:"font-mono font-medium",children:c.map((u,d)=>a.jsxs(Y.TableRow,{"data-testid":"log-row",className:Y.cn("font-mono font-semibold cursor-pointer border-0",{"bg-muted-foreground/10 hover:bg-muted-foreground/20":n===u.id,"hover:bg-muted-foreground/10":n!==u.id}),onClick:()=>r(u.id),children:[a.jsxs(Y.TableCell,{"data-testid":`time-${d}`,className:"whitespace-nowrap flex items-center gap-2 text-muted-foreground",children:[a.jsx(Y.LevelDot,{level:u.level}),Xe(u.time)]}),a.jsx(Y.TableCell,{"data-testid":`trace-${u.traceId}`,className:"whitespace-nowrap cursor-pointer hover:text-primary text-muted-foreground",onClick:()=>o(u.traceId),children:u.traceId}),a.jsx(Y.TableCell,{"data-testid":`step-${d}`,"aria-label":u.step,className:"whitespace-nowrap",children:u.step}),a.jsx(Y.TableCell,{"data-testid":`msg-${d}`,"aria-label":u.msg,className:"whitespace-nowrap max-w-[500px] truncate w-full",children:u.msg})]},d))})})]}),a.jsx(Gt,{log:l,onClose:()=>r(void 0)})]})};mt();exports.LogsPage=Xt;
|
package/dist/plugin-logs.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-font-weight:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--font-weight-medium:500;--font-weight-semibold:600;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-weight-500:var(--font-weight-500);--font-weight-600:var(--font-weight-600);--font-weight-700:var(--font-weight-700)}}@layer base{*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground)}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.top-1\/2{top:50%}.right-3{right:calc(var(--spacing)*3)}.left-3{left:calc(var(--spacing)*3)}.flex{display:flex}.grid{display:grid}.h-4{height:calc(var(--spacing)*4)}.h-\[34px\]{height:34px}.h-full{height:100%}.w-4{width:calc(var(--spacing)*4)}.w-full{width:100%}.max-w-\[500px\]{max-width:500px}.flex-1{flex:1}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.items-center{align-items:center}.gap-2{gap:calc(var(--spacing)*2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.border-0{border-style:var(--tw-border-style);border-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.bg-muted-foreground\/10{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/10{background-color:color-mix(in oklab,var(--muted-foreground)10%,transparent)}}.p-2{padding:calc(var(--spacing)*2)}.px-9\!{padding-inline:calc(var(--spacing)*9)!important}.font-mono{font-family:var(--font-mono)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-muted-foreground,.text-muted-foreground\/50{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}.capitalize{text-transform:capitalize}@media (hover:hover){.hover\:bg-muted-foreground\/10:hover{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted-foreground\/10:hover{background-color:color-mix(in oklab,var(--muted-foreground)10%,transparent)}}.hover\:bg-muted-foreground\/20:hover{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted-foreground\/20:hover{background-color:color-mix(in oklab,var(--muted-foreground)20%,transparent)}}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-primary:hover{color:var(--primary)}}}:root{--default-font-family:"DM Sans",ui-sans-serif,sans-serif;--font-dm-mono:"DM Mono",ui-monospace,monospace;color-scheme:light dark;font-size:16px;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"),serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-optical-sizing:auto;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--accent-1000:#2862fe;--accent-970:#2862fef7;--accent-950:#2862fef2;--accent-900:#2862fee5;--accent-800:#2862fecc;--accent-700:#2862feb2;--accent-600:#2862fe99;--accent-500:#2862fe80;--accent-400:#2862fe66;--accent-300:#2862fe4d;--accent-200:#2862fe33;--accent-100:#2862fe1a;--accent-50:#2862fe0d;--accent-30:#2862fe08;--dark-1000:#0a0a0a;--dark-970:#0a0a0af7;--dark-950:#0a0a0af2;--dark-900:#0a0a0ae5;--dark-800:#0a0a0acc;--dark-700:#0a0a0ab2;--dark-600:#0a0a0a99;--dark-500:#0a0a0a80;--dark-400:#0a0a0a66;--dark-300:#0a0a0a4d;--dark-200:#0a0a0a33;--dark-100:#0a0a0a1a;--dark-50:#0a0a0a0d;--dark-30:#0a0a0a08;--light-1000:#fff;--light-970:#fffffff7;--light-950:#fffffff2;--light-900:#ffffffe5;--light-800:#fffc;--light-700:#ffffffb2;--light-600:#fff9;--light-500:#ffffff80;--light-400:#fff6;--light-300:#ffffff4d;--light-200:#fff3;--light-100:#ffffff1a;--light-50:#ffffff0d;--light-30:#ffffff08;--error:#d61355;--canvas-background:#ebebeb;--background:var(--light-1000);--foreground:var(--dark-1000);--surface-content:var(--dark-30);--surface-component:var(--dark-50);--surface-light-100:var(--dark-100);--surface-light-200:var(--dark-200);--border:var(--dark-100);--border-accent:var(--accent-1000);--states-hover:var(--dark-30);--states-selected:var(--dark-100);--states-active:var(--accent-1000);--text-header:var(--dark-1000);--text-body:var(--dark-600);--text-placeholder:var(--dark-400);--text-accent:var(--accent-1000);--text-error:var(--error);--icon-active:var(--dark-1000);--icon-light:var(--dark-600);--icon-component:var(--dark-400);--icon-accent:var(--accent-1000);--primary:var(--accent-1000);--primary-foreground:var(--light-1000);--secondary:var(--surface-component);--secondary-foreground:var(--text-body);--muted:var(--surface-light-100);--muted-foreground:var(--text-body);--accent:var(--accent-1000);--accent-foreground:var(--light-1000);--destructive:var(--error);--destructive-foreground:var(--light-1000);--card:var(--surface-content);--card-foreground:var(--foreground);--popover:var(--surface-content);--popover-foreground:var(--foreground);--input:var(--states-hover);--ring:var(--border-accent);--chart-1:var(--accent-1000);--chart-2:var(--accent-800);--chart-3:var(--accent-600);--chart-4:var(--accent-400);--chart-5:var(--accent-200);--header:var(--background);--header-foreground:var(--text-header);--header-primary:var(--primary);--header-primary-foreground:var(--primary-foreground);--header-accent:var(--surface-component);--header-accent-foreground:var(--text-body);--header-border:var(--border);--header-ring:var(--ring);--sidebar:var(--background);--sidebar-foreground:var(--text-header);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--surface-component);--sidebar-accent-foreground:var(--text-body);--sidebar-border:var(--border);--sidebar-ring:var(--ring);width:100%}.dark{--canvas-background:#030303;--background:var(--dark-1000);--foreground:var(--light-1000);--surface-content:var(--light-30);--surface-component:var(--light-50);--surface-light-100:var(--light-100);--surface-light-200:var(--light-200);--border:var(--light-100);--states-hover:var(--light-30);--states-selected:var(--light-100);--text-header:var(--light-1000);--text-body:var(--light-600);--text-placeholder:var(--light-400);--icon-active:var(--light-1000);--icon-light:var(--light-600);--icon-component:var(--light-400);--secondary-foreground:var(--light-600);--muted-foreground:var(--light-600);--card:var(--surface-content);--card-foreground:var(--foreground);--popover:var(--surface-content);--popover-foreground:var(--foreground);--input:var(--states-hover);--ring:var(--border-accent);--chart-1:var(--accent-1000);--chart-2:var(--accent-800);--chart-3:var(--accent-600);--chart-4:var(--accent-400);--chart-5:var(--accent-200);--header:var(--background);--header-foreground:var(--text-header);--header-primary:var(--primary);--header-primary-foreground:var(--primary-foreground);--header-accent:var(--surface-component);--header-accent-foreground:var(--text-body);--header-border:var(--border);--header-ring:var(--ring);--sidebar:var(--background);--sidebar-foreground:var(--text-header);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--surface-component);--sidebar-accent-foreground:var(--text-body);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}.json-view{background-color:#0000!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}:is(.dark .json-view,.dark.json-view){color:#d1d1d1;--json-property: #009033;--json-index: #5d75f2;--json-number: #5d75f2;--json-string: #c57e29;--json-boolean: #e4407b;--json-null: #e4407b}:is(.dark .json-view_a11y,.dark.json-view_a11y){color:#d1d1d1;--json-property: #ffd700;--json-index: #00e0e0;--json-number: #00e0e0;--json-string: #abe338;--json-boolean: #ffa07a;--json-null: #ffa07a}:is(.dark .json-view_github,.dark.json-view_github){color:#79b8ff;--json-property: #79b8ff;--json-index: #79b8ff;--json-number: #79b8ff;--json-string: #9ecbff;--json-boolean: #79b8ff;--json-null: #79b8ff}:is(.dark .json-view_vscode,.dark.json-view_vscode){color:orchid;--json-property: #9cdcfe;--json-index: #b5cea8;--json-number: #b5cea8;--json-string: #ce9178;--json-boolean: #569cd6;--json-null: #569cd6}:is(.dark .json-view_atom,.dark.json-view_atom){color:#abb2bf;--json-property: #e06c75;--json-index: #d19a66;--json-number: #d19a66;--json-string: #98c379;--json-boolean: #56b6c2;--json-null: #56b6c2}:is(.dark .json-view_winter-is-coming,.dark.json-view_winter-is-coming){color:#a7dbf7;--json-property: #91dacd;--json-index: #8dec95;--json-number: #8dec95;--json-string: #e0aff5;--json-boolean: #f29fd8;--json-null: #f29fd8}.json-view{display:block;color:#4d4d4d;text-align:left;--json-property: #009033;--json-index: #676dff;--json-number: #676dff;--json-string: #b2762e;--json-boolean: #dc155e;--json-null: #dc155e}.json-view .json-view--property{color:var(--json-property)}.json-view .json-view--index{color:var(--json-index)}.json-view .json-view--number{color:var(--json-number)}.json-view .json-view--string{color:var(--json-string)}.json-view .json-view--boolean{color:var(--json-boolean)}.json-view .json-view--null{color:var(--json-null)}.json-view .jv-indent{padding-left:1em}.json-view .jv-chevron{display:inline-block;vertical-align:-20%;cursor:pointer;opacity:.4;width:1em;height:1em}:is(.json-view .jv-chevron:hover,.json-view .jv-size:hover+.jv-chevron){opacity:.8}.json-view .jv-size{cursor:pointer;opacity:.4;font-size:.875em;font-style:italic;margin-left:.5em;vertical-align:-5%;line-height:1}.json-view :is(.json-view--copy,.json-view--edit),.json-view .json-view--link svg{display:none;width:1em;height:1em;margin-left:.25em;cursor:pointer}.json-view .json-view--input{width:120px;margin-left:.25em;border-radius:4px;border:1px solid currentColor;padding:0 4px;font-size:87.5%;line-height:1.25;background:transparent}.json-view .json-view--deleting{outline:1px solid #da0000;background-color:#da000011;text-decoration-line:line-through}:is(.json-view:hover,.json-view--pair:hover)>:is(.json-view--copy,.json-view--edit),:is(.json-view:hover,.json-view--pair:hover)>.json-view--link svg{display:inline-block}.json-view .jv-button{background:transparent;outline:none;border:none;cursor:pointer;color:inherit}.json-view .cursor-pointer{cursor:pointer}.json-view svg{vertical-align:-10%}.jv-size-chevron~svg{vertical-align:-16%}.json-view_a11y{color:#545454;--json-property: #aa5d00;--json-index: #007299;--json-number: #007299;--json-string: #008000;--json-boolean: #d91e18;--json-null: #d91e18}.json-view_github{color:#005cc5;--json-property: #005cc5;--json-index: #005cc5;--json-number: #005cc5;--json-string: #032f62;--json-boolean: #005cc5;--json-null: #005cc5}.json-view_vscode{color:#005cc5;--json-property: #0451a5;--json-index: #0000ff;--json-number: #0000ff;--json-string: #a31515;--json-boolean: #0000ff;--json-null: #0000ff}.json-view_atom{color:#383a42;--json-property: #e45649;--json-index: #986801;--json-number: #986801;--json-string: #50a14f;--json-boolean: #0184bc;--json-null: #0184bc}.json-view_winter-is-coming{color:#0431fa;--json-property: #3a9685;--json-index: #ae408b;--json-number: #ae408b;--json-string: #8123a9;--json-boolean: #0184bc;--json-null: #0184bc}
|
package/dist/plugin.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function o(e){return{workbench:[{packageName:"@motiadev/plugin-logs",label:"Logs",position:"bottom",componentName:"LogsPage",labelIcon:"logs"}]}}module.exports=o;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Log } from '../types/log';
|
|
2
|
-
export type LogsState = {
|
|
3
|
-
logs: Log[];
|
|
4
|
-
selectedLogId?: string;
|
|
5
|
-
addLog: (log: Log) => void;
|
|
6
|
-
setLogs: (logs: Log[]) => void;
|
|
7
|
-
resetLogs: () => void;
|
|
8
|
-
selectLogId: (logId?: string) => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const useLogsStore: import('zustand').UseBoundStore<import('zustand').StoreApi<LogsState>>;
|
|
11
|
-
//# sourceMappingURL=use-logs-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-logs-store.d.ts","sourceRoot":"","sources":["../../src/stores/use-logs-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1B,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,YAAY,wEAoBtB,CAAA"}
|
package/dist/types/log.d.ts
DELETED
package/dist/types/log.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/types/log.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,GAAG;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-timestamp.d.ts","sourceRoot":"","sources":["../../src/utils/format-timestamp.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,WAG3C,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-log-listener.d.ts","sourceRoot":"","sources":["../../src/utils/init-log-listener.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,YAY3B,CAAA"}
|