From 8e47849e931f8eea205414dbd48c0ac37b92bbb3 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Aug 2024 20:31:02 +0800 Subject: [PATCH] [feat] Add $Backend function call to directly invoke backend functions from frontend scripts. --- data/bindata.go | 122 ++++++++++++++++++++++---------------------- sui/api/render.go | 18 ++++--- sui/api/run.go | 102 +++++++++++++++++++++++++++++++++++- sui/libsui/index.ts | 37 ++++++++++++++ sui/libsui/utils.ts | 19 ++++++- 5 files changed, 228 insertions(+), 70 deletions(-) diff --git a/data/bindata.go b/data/bindata.go index 82c13d05..6c232337 100644 --- a/data/bindata.go +++ b/data/bindata.go @@ -237,7 +237,7 @@ func initReadmeMd() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/README.md", size: 2271, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/README.md", size: 2271, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -257,7 +257,7 @@ func initAigcsTranslateAiYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/aigcs/translate.ai.yml", size: 388, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/aigcs/translate.ai.yml", size: 388, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -277,7 +277,7 @@ func initApisAigcHttpYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/apis/aigc.http.yao", size: 564, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/apis/aigc.http.yao", size: 564, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -297,7 +297,7 @@ func initAppYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/app.yao", size: 603, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/app.yao", size: 603, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -317,7 +317,7 @@ func initChartsPetChartYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/charts/pet.chart.yao", size: 8250, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/charts/pet.chart.yao", size: 8250, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -337,7 +337,7 @@ func initConnectorsOpenaiGpt3_5TurboConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/gpt-3_5-turbo.conn.yao", size: 177, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/connectors/openai/gpt-3_5-turbo.conn.yao", size: 177, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -357,7 +357,7 @@ func initConnectorsOpenaiTextEmbeddingAda002ConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/text-embedding-ada-002.conn.yao", size: 189, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/connectors/openai/text-embedding-ada-002.conn.yao", size: 189, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -377,7 +377,7 @@ func initConnectorsOpenaiWhisper1ConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/whisper-1.conn.yao", size: 163, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/connectors/openai/whisper-1.conn.yao", size: 163, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -397,7 +397,7 @@ func initDashboardsKanbanDashYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/dashboards/kanban.dash.yao", size: 2222, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/dashboards/kanban.dash.yao", size: 2222, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -417,7 +417,7 @@ func initFlowsAppMenuFlowYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/flows/app/menu.flow.yao", size: 1832, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/flows/app/menu.flow.yao", size: 1832, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -437,7 +437,7 @@ func initFlowsStatDataFlowYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/flows/stat/data.flow.yao", size: 1817, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/flows/stat/data.flow.yao", size: 1817, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -457,7 +457,7 @@ func initFormsAdminUserFormYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/forms/admin/user.form.yao", size: 97, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/forms/admin/user.form.yao", size: 97, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -477,7 +477,7 @@ func initFormsDemoPetFormYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/forms/demo/pet.form.yao", size: 6755, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/forms/demo/pet.form.yao", size: 6755, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -497,7 +497,7 @@ func initIconsAppIcns() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/icons/app.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -517,7 +517,7 @@ func initIconsAppIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/icons/app.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -537,7 +537,7 @@ func initIconsAppPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/icons/app.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -557,7 +557,7 @@ func initLangsZhCnGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/langs/zh-cn/global.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/langs/zh-cn/global.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -577,7 +577,7 @@ func initLangsZhHkGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/langs/zh-hk/global.yml", size: 88, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/langs/zh-hk/global.yml", size: 88, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -597,7 +597,7 @@ func initLoginsAdminLoginYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/logins/admin.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/logins/admin.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -617,7 +617,7 @@ func initLoginsUserLoginYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/logins/user.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/logins/user.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -637,7 +637,7 @@ func initModelsAdminUserModYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/models/admin/user.mod.yao", size: 8052, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/models/admin/user.mod.yao", size: 8052, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -657,7 +657,7 @@ func initModelsPetModYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/models/pet.mod.yao", size: 1700, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/models/pet.mod.yao", size: 1700, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -677,7 +677,7 @@ func initNeoNeoYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/neo/neo.yml", size: 545, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/neo/neo.yml", size: 545, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -697,7 +697,7 @@ func initPublicDemoPetHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/public/demo/pet.html", size: 1376, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/public/demo/pet.html", size: 1376, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -717,7 +717,7 @@ func initPublicIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/public/index.html", size: 1404, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/public/index.html", size: 1404, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -737,7 +737,7 @@ func initScriptsDashJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/dash.js", size: 127, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/scripts/dash.js", size: 127, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -757,7 +757,7 @@ func initScriptsGuardJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/guard.js", size: 373, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/scripts/guard.js", size: 373, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -777,7 +777,7 @@ func initScriptsSetupJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/setup.js", size: 888, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/scripts/setup.js", size: 888, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -797,7 +797,7 @@ func initScriptsStatJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/stat.js", size: 1305, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/scripts/stat.js", size: 1305, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -817,7 +817,7 @@ func initServicesFooJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/services/foo.js", size: 122, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/services/foo.js", size: 122, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -837,7 +837,7 @@ func initStudioHelloJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/studio/hello.js", size: 101, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/studio/hello.js", size: 101, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -857,7 +857,7 @@ func initTablesAdminUserTabYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/tables/admin/user.tab.yao", size: 119, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/tables/admin/user.tab.yao", size: 119, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -877,12 +877,12 @@ func initTablesDemoPetTabYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/tables/demo/pet.tab.yao", size: 7111, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "init/tables/demo/pet.tab.yao", size: 7111, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _libsuiIndexTs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x5a\x6d\x73\xdb\x36\x12\xfe\xae\x5f\xb1\xe1\x78\x3c\x54\x2a\x53\x77\x5f\xa9\xd0\x6e\x2f\xc9\xa5\xbd\xcb\x25\x99\x3a\x9d\xfb\xe0\x6a\x64\x9a\x82\x25\xc6\x14\xa1\x02\xa0\x5d\x8d\xad\xff\x7e\xb3\x8b\x57\xbe\x48\xce\xa5\xe9\x4c\x63\x9a\x58\x3c\xd8\x5d\xec\xcb\x03\xd0\xb7\x4d\x5d\xa8\x92\xd7\x70\x72\x12\x4b\x56\xb1\x42\x71\x31\x86\xc7\x11\x40\xc5\x14\xb0\x6a\x93\xc2\xcf\x9f\xff\xf3\xfe\x6d\xc5\x36\xac\x56\xf0\x04\x75\x53\x55\x90\xd1\x8f\xd9\x08\xa0\xbc\x85\x58\xed\xb6\x8c\xdf\x82\x9d\x0e\x59\x96\x41\x24\x95\x28\xeb\x55\xa4\xb1\x00\x91\x20\x83\x25\x2f\x1a\xc4\x49\xfe\x68\x98\xd8\x5d\x9a\x09\x7e\x61\x44\xdc\x8f\x0c\xac\xc3\x2b\x6b\xa9\xf2\xba\xc0\x35\x02\x5d\xda\xc8\x56\xb8\x85\xc0\xaa\x8d\x95\x2a\x78\x2d\x15\x14\x35\x64\x38\x21\x59\x31\xf5\x93\x52\xa2\xbc\x69\x14\x8b\x23\x99\x16\x75\x44\x8b\xeb\x79\x45\x0d\xa7\xa7\x28\xfc\x22\x83\x28\xc2\x67\x63\xe2\x43\x59\x2f\xf9\xc3\x55\x51\xcf\xb5\x91\xd6\x7b\xce\x4c\xb7\x10\xdf\x6c\x79\x8d\x1e\xcb\xa0\x66\x0f\xc1\x44\x52\x6a\x66\x84\x05\x53\x8d\xa8\x49\x62\xb1\x90\x4d\xb9\x70\xf3\x50\x6c\xe2\x61\xcc\x8c\xfd\x48\xff\x6f\xe7\xd1\x26\xec\x47\x23\xb7\x8b\x1d\x94\x85\xe0\x9c\xa0\x52\x30\x5e\x9b\x40\x9d\x6f\x58\x0a\x7a\x7b\xb4\xda\x06\x0d\xfd\x52\x54\x5c\x32\xa9\xe2\xeb\x2b\xf9\xfb\xef\x69\x51\x67\x27\x8f\x28\xbf\x9f\x5f\x8f\x87\x16\x92\x2a\x57\x2c\xf6\x5a\x12\x9c\x5a\x97\x32\x59\xe7\xf5\xb2\x62\x42\x42\xe6\x8d\x48\x1e\x72\x55\xac\xe1\xe9\x09\x1e\xf7\x33\x2b\x78\xc9\xd0\x47\xb9\xdc\xd5\x05\x38\xf4\xf8\x8e\xed\x26\x70\x9f\x57\x0d\x9b\x80\xca\xc5\x8a\xa9\xf6\x46\x1a\x78\xc8\xda\xab\x5d\xdd\xb1\xdd\x5c\xbb\x4a\xcf\x42\x01\xfd\xf0\xf4\x14\x28\x82\x6e\xf1\xdb\x6d\xc1\xfc\x3e\x3b\xf8\xa3\x9b\x4c\xd6\x7f\xbc\xf9\x02\x99\x1b\xb0\xeb\xa6\xe6\xe7\xc4\xbd\x97\x8a\x6f\x3f\x09\xbe\xcd\x57\x39\x82\xa5\x81\xb1\xe3\x60\xba\x05\x48\x64\x3b\x42\x71\xa9\xb3\xad\x9f\x1f\x4d\x20\x52\xa2\x61\x91\x8b\x25\x80\xbd\x5d\x6d\x6f\xdf\xe5\x0f\x79\xe9\x9c\x15\x1b\x7f\x5a\xb5\xdd\x4c\x6d\x4d\x29\x2f\xdb\x2a\x3a\xdf\xb9\x05\x2e\xac\x72\xab\x67\x94\x1b\x6b\xcf\x91\x82\x6e\x76\x0a\xb7\x79\x25\x99\x5d\x15\x3d\xdf\x5b\x33\x74\x85\x0e\x4b\x2b\x4e\x49\x8d\xff\x61\x5d\xda\xe6\x42\xe7\x56\x7b\x4b\x13\xfd\xde\x84\xba\x9d\xf9\xb0\x2e\x2b\x06\xb1\x99\x73\x7a\x0a\x2f\xf4\xe3\x60\x11\x08\x15\x70\xab\x18\xf9\x41\xf4\x7d\x60\x8e\x9d\x10\x14\xba\x1b\xbe\xdc\x61\xec\xf9\x21\x4c\xda\x63\x66\xea\x9f\xd3\x29\xbc\x29\xe5\x96\x12\x46\xad\x99\xde\x34\x28\xd6\x79\xbd\x62\x50\x34\x52\xf1\x0d\xb0\x7b\x84\x54\xdc\x82\x3b\x67\xb4\xf6\x55\x4b\xe9\x32\xf4\x9a\x26\xbe\xc5\x37\x66\xdb\x52\x0d\x19\x4d\x02\x8d\x96\x4c\xe5\x65\x95\xc2\x23\xdc\xb1\x5d\x0a\x3e\x17\xd3\x76\x4a\xa6\x1d\xf7\x07\x01\xe8\x62\xcb\xb8\x6e\x69\x6c\xd1\x4b\x93\x4a\x61\x49\x1b\xaa\x2d\x18\x4f\xd2\x97\x70\xca\xf3\x77\x94\xd1\xad\x32\x61\x5d\x89\xfe\x7f\x81\xbd\xe0\xe9\xc9\x66\x71\xb7\xd0\xc3\x8b\x03\xe9\xdc\x2a\xa7\x7e\x17\xb4\xff\xee\x20\x83\x08\x95\x49\x23\xf8\x01\x9d\x31\x0b\x06\xef\x87\xfa\xc9\xdd\x38\x14\xf9\x22\xf9\x70\xd7\xc1\x81\xb3\x5c\x29\x71\x16\xa2\x87\xa9\xe3\x4b\x14\xca\x7a\x7d\x95\xd8\xf5\x02\x08\xfe\x75\xf9\xf1\x03\x86\xa8\x64\xf1\xbd\x73\xff\x1e\x0a\x0a\xa1\x98\xf5\x43\x2e\xb0\xd7\x5a\xac\xff\x35\xc3\xf7\x33\xbd\x35\xd6\xf9\xef\x4b\xd9\xf6\x7e\xbb\x24\xd3\x7e\x61\x29\xdc\xcf\xbe\xd7\x86\x10\xa4\xdd\x91\x60\x29\x74\x9a\x34\x3e\xcd\x2d\x98\x11\xbc\xe5\x02\x62\xac\x11\x25\x64\xf0\xb7\x19\x94\xf0\x4a\xcb\x27\x15\xab\x57\x6a\x3d\x83\xf2\x87\x1f\xba\x95\x1c\x05\xb0\x0b\xa1\xdc\x55\x39\x0f\x4b\x14\xbe\x4b\xb0\x07\x26\x52\xe5\x42\xc9\xff\x96\x6a\x1d\x9b\x78\x68\x55\x0b\x1f\x2d\x7e\x8a\x60\xdb\x2a\x2f\x98\x95\x9f\x40\x14\xd6\xeb\x6f\x88\x8f\x7e\x74\x0c\x47\x48\x3f\x4a\x28\x19\xd1\x9f\x57\x77\x73\xc8\xc2\x68\x21\x75\x29\xb1\x03\xdd\x0e\x85\x4e\x07\x26\x0c\xa1\xb0\x7c\x19\xf3\x54\x59\x37\x2c\x68\x50\xa3\x01\x08\xbf\xfc\x91\x58\x74\x91\x30\x58\x2a\x0e\xb2\x26\x5f\x39\xa8\x3e\x91\x97\x1d\xf3\x90\x8a\x0b\x66\x0a\xa3\xa5\x33\x5c\x30\x47\xd0\x48\xc8\x46\xb5\x17\xf2\x75\x29\x40\xc2\xe2\x1c\x74\x23\xb8\x68\xa1\x76\x48\x52\x4a\x39\xd2\x37\x83\xca\xe2\xc2\x76\x6b\xfa\x6d\x02\xcb\x5c\xe5\xff\x66\x3b\x39\xa1\x40\xd1\x4f\x86\x5b\x00\x1a\x35\xb1\xed\x5d\x1b\xab\x63\x0a\x27\xb9\x54\x1c\x60\x42\x2d\xf6\xde\xa2\x57\x76\xb9\xe4\x96\x8b\xb7\x79\xb1\x8e\x07\x8b\xad\x2b\x7f\xb8\x6d\x0e\xb9\x13\xbf\x08\xe5\xaa\x9a\xdd\x5b\x7c\x49\x2c\x0d\x32\x08\x36\xdd\x36\x0c\x6b\xe3\x77\x58\x1e\xa1\x8e\x2e\x1f\xc6\x2e\x3a\x42\xa3\x9d\x9e\x1a\x58\xe2\xfe\x61\xe8\x77\xf3\x29\xc4\x0a\x8b\x6f\x27\x93\x0e\xe5\x91\x36\x61\xc3\xa4\xcc\x57\x68\x04\x4b\xec\xf3\xd3\x13\xd0\x3f\xd1\x4f\x35\x30\x21\xb8\x00\x5e\x14\x8d\x10\x6c\x19\xcd\x3a\x00\xbc\x62\x09\x89\xc4\xd7\x57\x97\xbf\xfd\x32\x07\x6a\xb0\xf0\xb3\xe1\xaf\x6f\x71\x28\x85\x93\x47\x03\xbd\x87\x6b\xc7\xa7\xfb\x69\xb9\x0f\xb6\x02\x9f\x3d\x2f\xa6\x81\x81\xc0\xf4\xac\x01\x43\xd1\x30\xa3\x54\xc7\xa5\xed\x55\xb4\x9a\x1b\x0a\x69\xf1\x7e\xf0\x4c\xa1\xb3\xa0\xac\xcb\xf6\xc1\x25\x0c\x6f\x12\x79\x5b\x6d\x6c\x0f\x68\x9d\x26\x7f\xaa\xaa\x38\xa2\xe3\x0b\x89\xcd\x75\xc5\x75\x53\x5c\x64\xc5\xf6\xd5\x18\xb2\xf3\x81\x53\xa2\x19\xed\xb1\x44\x1a\x38\x43\xae\x48\x7b\x14\xcd\x74\x67\x42\xc2\x86\x59\x77\xc7\x76\x32\xc0\x22\x69\x99\xc2\xaf\xac\xe0\x62\xf9\x4a\x1f\xbb\x26\xe6\xf8\x75\x1e\xb4\x4b\x9f\xb8\x18\xff\xf6\x80\x76\x85\xc1\x75\x35\xef\xf2\x89\x83\x22\x43\xdd\xcf\x59\xe2\x5b\xe5\x70\x2f\xa4\x23\x73\x5f\xf8\xaa\x9c\xf7\x1b\xa0\x4e\xee\x56\x03\x74\xa5\x63\xdb\xc8\xf5\x51\x20\xd7\x16\x35\x0a\xb5\xc5\xf1\x10\xa1\xfe\x5a\x6d\x74\xae\xb7\xb4\x71\x95\xe4\xeb\xb5\xd1\x28\x7f\x5d\x1b\x99\xf2\xfa\x6c\x90\x1c\xb0\x5d\x18\x59\xc7\x74\xd1\x18\x1d\xc2\xa0\x83\xc9\xd6\x9c\x03\x38\x83\xad\xd4\x86\xe8\x3f\xca\x7a\x49\xe7\x09\x9a\xec\x43\x46\xeb\x87\x2a\x40\x59\x9b\x75\xba\xd5\xf6\x06\xe7\x66\x56\x09\x94\x6d\x11\x25\xcc\x9a\x0c\xa2\xc5\x62\x9b\xaf\x58\xd4\x37\xde\x1f\xd9\xcd\x65\x08\xe2\xcd\xbb\x6c\xc8\xf4\xe9\xd6\xf9\xa9\x2b\xe3\x1a\x9a\xf5\x40\xc7\x43\xe4\x93\xe5\x92\x4a\x21\x92\x56\x56\x33\x11\xa3\xbe\x13\xb3\x87\x41\xc6\xeb\xff\xbe\x4b\xff\x0d\x0a\x6a\x9b\xe4\xb5\x58\x90\x3b\xc7\xfa\x8b\xa2\x81\x3b\x22\x6b\xc6\xc0\x7d\x4c\x51\xef\xe7\xd7\xe3\xce\xe1\xdd\x3b\x17\x01\xdb\xae\x6d\x39\x16\x87\x83\xeb\x8f\x67\x5d\xfa\x4d\x0e\xfd\xae\xee\xdc\x87\x07\xc5\x03\xb7\x50\x96\xb6\x91\x0e\xfa\x42\xd0\x9c\x3c\x3a\x81\xf4\x15\x07\xc9\xe0\x36\xec\x19\x3e\x13\x9c\x8d\x2e\xfb\x78\xe6\xcc\x1c\x5c\x53\x76\xee\x74\x42\x3c\x2b\xdc\x81\x7d\xc7\x14\x32\x8b\x43\xaa\xb6\x59\xd0\xf0\x09\xa2\x43\x81\x9e\x27\x3a\x6d\x9a\x63\x82\x87\xc9\xe3\x24\xc7\x38\x4d\xd8\x53\xd8\x21\xda\xf3\x17\x49\xcf\xb7\x50\x9e\xeb\x09\x84\x57\xae\x5f\x7b\xfa\xb5\xc3\xed\x4d\x1e\xda\x8d\x67\x37\x3a\xdc\x86\x89\xf6\xa2\x6e\xdd\xe5\xed\xce\x78\x72\x60\xe3\xdf\x68\x0e\xdf\x3f\x6e\x1b\x05\xc3\x00\x89\xa3\x45\x70\xe9\x8b\x81\xa5\xd9\x89\x26\x17\xfa\xb0\x31\x7d\xf9\x72\x04\x2f\xe1\xf2\xb7\x5f\xe0\x57\x56\x2f\x99\xc0\xdf\x7e\xdc\xe6\x22\xdf\x84\x37\x47\xee\x1d\xe6\xf7\x08\x5e\x4e\x47\x9d\xbb\x59\x9d\x73\x82\x20\x62\xa2\x64\x66\x6e\x0a\xaf\xdd\xf9\xe7\xc9\x90\x13\x24\x7a\xe1\x85\x33\xfe\x4e\x71\xdf\x25\x44\x79\xbd\x3b\xc7\x41\xbe\xc5\x45\x2e\x52\xa3\xe3\x47\xfa\x75\x34\x4e\xe1\x93\xe0\x9b\x52\xb2\x57\x96\x39\x79\x36\x68\x4a\x68\x4c\xce\x31\x37\x0d\xc1\xfd\x3b\x36\x25\x7e\xf3\x85\x15\x2a\x82\x8b\x60\x20\x85\x93\x93\xe0\x54\x36\x02\x18\x43\x2e\xbd\x0d\x33\xfb\x15\x41\xe3\xb7\x2f\xee\x06\x03\xd1\x9b\x5f\x73\x05\xb7\xbc\xa9\x97\x18\x88\x6e\x8d\xfd\xb5\x89\x42\xb3\x83\xc6\xa4\x44\x30\xd4\x2e\x8e\x06\xe6\x47\xfe\x93\x88\xe1\x93\x9a\xf5\xba\x32\xde\xe7\xbe\xba\x55\xe8\xfd\x69\x5d\xdf\xfb\x2b\x19\xcb\xff\x8e\x5a\xf3\x81\x03\x33\x5f\x7d\x48\x15\x78\x28\xd5\x1a\x64\x07\xf9\x19\x93\xba\x20\x81\x3d\xd3\x29\x60\xd5\x5c\xb2\xdb\xbc\xa9\x94\xd9\x78\xe9\x42\x00\x32\xfb\xe0\xe2\x58\xff\x6e\x39\x92\x13\xf0\x2f\xb2\x0c\x9a\x7a\xc9\x6e\xcb\x9a\x2d\xe1\x02\x94\x68\x18\xa4\x1d\xa9\x00\x48\xae\xf9\xc3\x7b\x9e\x2f\xb1\x6f\x92\x11\x03\xef\x3b\x90\x74\x83\xed\x31\xbd\x64\x00\x8b\x7e\xfa\x94\xaf\x98\x4e\xe0\x10\xb8\x3d\x72\x1c\x3a\x94\x9d\x19\x7f\x7d\x12\x6c\x9b\x0b\x06\x15\x2d\x69\xbe\xd1\x55\x46\x53\xb8\x7e\x25\xb7\x79\x0d\x45\x95\x4b\x99\x45\xb2\x29\xcf\xf4\x56\x9d\xa1\x44\x59\xaf\xa2\xf3\xf7\xfa\x21\x49\x92\x57\x53\x94\x3d\xbf\xb6\x51\xd1\xb7\xfc\xf4\xb4\xe3\xb8\xf0\xa2\xd5\x64\xd9\xb0\xbf\xba\x9f\xfe\xc0\xab\x38\xe8\x36\xec\x15\x0c\x6d\x1f\x56\xe4\xf8\xd7\xbf\x63\xe0\x09\x6f\x14\x13\x38\x29\xbc\xd5\x65\xed\x43\xa0\x39\xff\xe1\x43\x52\xd6\xb5\x96\x87\xcc\xc0\x8e\x5b\xf1\x6a\xfd\x8f\x15\xcc\x78\x7f\x61\xae\x5a\x28\x21\x89\x88\xd8\xda\x1d\x07\x15\x38\xb0\x2c\xdc\x57\x6b\xc4\x74\x0a\x3f\x2a\x79\x56\xae\x6a\x2e\x18\xbd\xb1\xb0\x8f\x90\x24\xc9\x42\x1f\xb5\xf1\x89\x6a\x2f\x8d\xed\x3b\x85\x41\xa0\xb1\x8e\x5c\x27\x15\x2f\xe8\x83\x4a\xb2\xcd\xd5\x1a\x33\x75\xe6\x24\x1b\x51\x61\xb4\x4c\xf3\x6d\x39\x5d\x2c\x76\x39\x9f\xca\xa6\x9c\xde\xff\x7d\xaa\xc3\xe5\xe4\x91\xa0\xf6\xd7\x7e\xc6\x36\xdf\xa1\x3b\x48\x1f\x4d\xfb\x74\x0d\xef\x68\xa7\xf5\x9a\xd8\xbc\xdd\x7b\x80\x35\x43\x67\x4a\xf7\xa1\x2c\x7a\xcd\x6b\x85\xc7\xe8\xcf\xbb\x2d\x8b\x52\x88\xf2\xed\xb6\x2a\xb5\xc6\x53\x6c\x97\x91\xbe\x21\x78\xcd\xf9\x5d\xc9\x52\xcf\xe2\x0a\x7a\x31\x71\xcd\x72\x3a\x85\x0f\xb9\x2a\xef\x19\x6c\x39\xf1\x94\x3f\x1a\x26\xe9\x9b\x08\x7d\x34\x61\xe2\x9e\xf2\xc4\x73\x1a\x73\x94\xe1\xcb\x9d\x25\x34\xbe\x15\x1b\x33\x5b\xb7\xf7\x82\xc9\x2d\xaf\x25\x7a\x56\x7f\x4c\xbb\x65\xaa\x58\xc7\x8d\xa8\x26\xf0\x08\x1b\xa6\xd6\x7c\x99\x42\xf4\xe9\xe3\xe5\xe7\x68\x62\xed\x9c\xd0\x02\xa9\x5e\x66\xdf\xc2\x53\xec\x4f\xe5\xb0\x2c\x78\x82\x6f\xe3\x80\xa1\xbd\x18\x4e\xbd\x81\x32\x2b\x79\x75\xcf\x62\x9c\x3f\x9e\x75\xce\x7a\x58\x5d\xd1\x0b\xce\x04\x5a\xdb\xb8\xc6\x54\x65\x79\x24\x25\xec\x9a\xdd\xcc\x40\x18\x4b\x9c\x86\xae\x6c\xc6\xfe\x4a\x6f\xb8\x35\x74\x74\xee\x33\xc5\xe9\xd4\xea\xae\x99\xa0\xa1\x72\xdf\xa0\xeb\xc1\x9a\x48\xc0\xd1\xf9\x3f\xf3\xb2\x62\x4b\x74\x8a\x7e\x1f\xd6\xc5\x7e\x67\x8c\xba\xe2\xd1\x04\xd8\xb8\x7d\x83\x79\xa0\x11\xf6\x66\x9a\xc2\xb2\x1f\x8d\xd8\x9f\x5b\x2e\x14\x31\x97\x80\x42\xe8\x54\xc1\x16\xdf\xfa\x0b\x0c\x9c\xa5\x3f\xdc\x79\xd9\x4b\xfc\x5d\x0f\x70\xd1\x1e\xe0\x82\x06\xe8\xc3\xfb\x45\x8f\x74\xc5\xe6\xab\x5e\x5e\xef\xcc\x67\xe1\x8b\x14\x08\x8d\x9c\x7a\xcf\xcb\xe5\x39\x4e\x7f\xcd\xa9\x06\x2b\xd9\x87\x40\xde\x46\xfb\x7c\x45\xdf\x0a\xf5\xeb\x39\x41\xce\x46\x98\xa3\xa1\x75\x21\xa7\x33\x06\xea\xb3\xdf\x45\xdb\x46\x8c\x5e\xcb\x0b\x4a\x09\x32\xdf\xb0\x36\xfb\xf0\x1f\xa6\x7d\xb5\xbf\xe8\xfe\xa5\x8a\xd6\x05\x9e\xe0\x86\xf3\x8a\xe5\x75\x17\x96\x1a\x2e\xfd\xf9\x03\x25\xd9\x45\x7a\x48\x10\x79\x04\x3a\x31\xa8\xdc\x87\x85\x35\x6a\xd7\xf2\xf6\x5e\x19\xdb\x2f\x99\x4a\xe9\x04\xe1\xd8\x31\xf8\x0d\x71\x3b\xd0\x77\x63\x7b\x7f\x0d\xd8\xbb\x2e\x18\x01\xe8\xc7\xd9\xff\xb1\x18\x21\x61\x61\x1c\x40\xa3\x4d\x25\xa8\xbe\xc0\x31\xb8\x37\xd4\x2d\x62\x7a\x3d\x18\x3f\x5d\x0b\x43\x2f\xd9\x6f\xcd\xbd\x24\x68\xfd\xe1\x00\x56\xcf\xfd\x6c\xf4\xbf\x00\x00\x00\xff\xff\x8b\xc0\xff\xb4\xcf\x24\x00\x00") +var _libsuiIndexTs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x5a\xdd\x72\xdb\x36\x16\xbe\xd7\x53\x9c\x70\x3c\x1e\x2a\x95\xa5\xec\xcc\xee\x0d\x15\x5a\xed\xa6\xd9\xb6\xbb\xd9\x26\x53\xb7\xb3\x17\xae\x47\x86\x29\x58\x62\x4d\x01\x2a\x01\xda\xd5\xd8\x7c\xf7\x9d\x83\x7f\x90\x94\x9c\xa4\xd9\x8b\xed\x4c\x63\x8a\x3c\xf8\x80\xf3\xff\x01\xe4\x6d\xc3\x0a\x59\x72\x06\x27\x27\xa9\xa0\x15\x2d\x24\xaf\xc7\xf0\x38\x02\xa8\xa8\x04\x5a\x6d\x33\xf8\xfe\xe7\x7f\xbf\x7b\x5b\xd1\x2d\x65\x12\x9e\x80\x35\x55\x05\xb9\xfa\x33\x1f\x01\x94\xb7\x90\xca\xfd\x8e\xf2\x5b\xb0\xc3\x21\xcf\x73\x48\x84\xac\x4b\xb6\x4e\x34\x16\x20\x12\xe4\xb0\xe2\x45\x83\x38\xd3\xdf\x1b\x5a\xef\x2f\xcc\x00\x3f\x31\x22\xb6\x23\x03\xeb\xf0\x4a\x26\x24\x61\x05\xce\x11\xac\x25\x46\xb6\xc2\x11\x02\xad\xb6\x56\xaa\xe0\x4c\x48\x28\x18\xe4\x38\x60\xba\xa6\xf2\x1b\x29\xeb\xf2\xa6\x91\x34\x4d\x44\x56\xb0\x44\x4d\xae\xc7\x15\x0c\x4e\x4f\x51\xf8\x45\x0e\x49\x82\xd7\x46\xc5\x87\x92\xad\xf8\xc3\x65\xc1\xae\xb4\x92\xd6\x7a\x4e\x4d\x37\x11\xdf\xee\x38\x43\x8b\xe5\xc0\xe8\x43\x30\x50\x2d\x6a\x6e\x84\x6b\x2a\x9b\x9a\x29\x89\xe5\x52\x34\xe5\xd2\x8d\x43\xb1\x89\x87\x31\x23\xda\x91\xfe\xdf\x8e\x53\x4e\x68\x47\x23\xe7\xc5\x0e\xca\xb2\xe6\x5c\x41\x65\x60\xac\x36\x01\x46\xb6\x34\x03\xed\x1e\xbd\x6c\x83\x86\x76\x29\x2a\x2e\xa8\x90\xe9\xf5\xa5\xf8\xf5\xd7\xac\x60\xf9\xc9\x23\xca\xb7\x57\xd7\xe3\xa1\x89\x84\x24\x92\xa6\x7e\x95\x0a\x4e\x6e\x4a\x31\xdd\x10\xb6\xaa\x68\x2d\x20\xf7\x4a\x4c\x1f\x88\x2c\x36\xf0\xf4\x04\x8f\xed\xdc\x0a\x5e\x50\xb4\x11\x11\x7b\x56\x80\x43\x4f\xef\xe8\x7e\x02\xf7\xa4\x6a\xe8\x04\x24\xa9\xd7\x54\xc6\x8e\x34\xf0\x90\xc7\xb3\x5d\xde\xd1\xfd\x95\x36\x95\x1e\x85\x02\xfa\xe2\xe9\x29\x58\x08\x9a\xc5\xbb\xdb\x82\x79\x3f\x3b\xf8\xa3\x4e\x56\xda\xbf\xbf\xf9\x0d\x72\xf7\xc0\xce\x9b\x99\xbf\x13\x77\x5f\x48\xbe\xfb\x50\xf3\x1d\x59\x13\x04\xcb\x02\x65\xc7\xc1\x70\x0b\x30\x15\x71\x84\xe2\x54\x67\x3b\x3f\x3e\x99\x40\x22\xeb\x86\x26\x2e\x96\x00\x5a\x3b\x5b\x6b\xef\x91\x07\x52\x3a\x63\xa5\xc6\x9e\x76\xd9\x6e\xa4\xd6\xa6\x14\x17\xf1\x12\x9d\xed\xdc\x04\x0b\xbb\xb8\xf5\x33\x8b\x1b\x6b\xcb\xa9\x05\xba\xd1\x19\xdc\x92\x4a\x50\x3b\x2b\x5a\xbe\x37\x67\x68\x0a\x1d\x96\x56\x5c\x25\x35\xfe\x87\x75\x69\x47\x6a\x9d\x5b\xb1\x4b\xa7\xfa\xbe\x09\x75\x3b\xf2\x61\x53\x56\x14\x52\x33\xe6\xf4\x14\x5e\xe8\xcb\xc1\x22\x10\x2e\xc0\xcd\x62\xe4\x07\xd1\xdb\x40\x1d\x3b\x20\x28\x74\x37\x7c\xb5\xc7\xd8\xf3\x8f\x30\x69\x8f\xa9\xa9\xff\xce\x66\xf0\x6d\x29\x76\x2a\x61\xe4\x86\x6a\xa7\x41\xb1\x21\x6c\x4d\xa1\x68\x84\xe4\x5b\xa0\xf7\x08\x29\xb9\x05\x77\xc6\x88\xfc\xaa\xa5\x74\x19\x7a\xa3\x06\xbe\xc5\x3b\xc6\x6d\x99\x86\x4c\x26\xc1\x8a\x56\x54\x92\xb2\xca\xe0\x11\xee\xe8\x3e\x03\x9f\x8b\x59\x9c\x92\x59\xc7\xfc\x41\x00\xba\xd8\x32\xa6\x5b\x19\x5d\xf4\xd4\x6a\x49\x61\x49\x1b\xaa\x2d\x18\x4f\xc2\x97\x70\x95\xe7\xdf\xa9\x8c\x8e\xca\x84\x35\x25\xda\xff\x05\xf6\x82\xa7\x27\x9b\xc5\xdd\x42\x0f\x2f\x0e\xa4\x73\x54\x4e\xbd\x17\xb4\xfd\xee\x20\x87\x04\x17\x93\x25\xf0\x15\x1a\x63\x1e\x3c\xbc\x1f\xea\x27\x77\xe3\x50\xe4\x37\xc1\x87\xbb\x0e\x3e\x38\x23\x52\xd6\x67\x21\x7a\x98\x3a\xbe\x44\xa1\xac\x5f\xaf\xac\xf7\xbd\x00\x82\x7f\x5e\xbc\xff\x11\x43\x54\xd0\xf4\xde\x99\xbf\x85\x42\x85\x50\x4a\xfb\x21\x17\xe8\x6b\x35\xd6\xff\x9a\xc7\xf7\x73\xed\x1a\x6b\xfc\x77\xa5\x88\xad\x1f\x97\x64\xe5\x2f\x2c\x85\xed\xfc\x4b\x39\x44\x41\x5a\x8f\x04\x53\xa1\xd1\x84\xb1\x29\xb1\x60\x46\xf0\x96\xd7\x90\x62\x8d\x28\x21\x87\x57\x73\x28\xe1\xb5\x96\x9f\x56\x94\xad\xe5\x66\x0e\xe5\x57\x5f\x75\x2b\x39\x0a\x60\x17\x42\xb9\xcb\xf2\x2a\x2c\x51\x78\x6f\x8a\x3d\x70\x2a\x24\xa9\xa5\xf8\x4f\x29\x37\xa9\x89\x87\xa8\x5a\xf8\x68\xf1\x43\x6a\xba\xab\x48\x41\xad\xfc\x04\x92\xb0\x5e\x7f\x46\x7c\xf4\xa3\x63\x38\x42\xfa\x51\xa2\x92\x11\xed\x79\x79\x77\x05\x79\x18\x2d\x6a\xb9\x2a\xb1\x83\xb5\x1d\x0a\x9d\x0e\x4c\x18\x42\x61\xf9\x32\xea\xc9\x92\x35\x34\x68\x50\xa3\x01\x08\x3f\xfd\x91\x58\x74\x91\x30\x58\x2a\x0e\xb2\x26\x5f\x39\x54\x7d\x52\x56\x76\xcc\x43\x48\x5e\x53\x53\x18\x2d\x9d\xe1\x35\x75\x04\x4d\x09\xd9\xa8\xf6\x42\xbe\x2e\x05\x48\x58\x9c\x83\x6e\x04\x8b\x08\xb5\x43\x92\x32\x95\x23\x7d\x35\x54\x59\x5c\xda\x6e\xad\x7e\x4d\x60\x45\x24\xf9\x17\xdd\x8b\x89\x0a\x14\x7d\x65\xb8\x05\xa0\x52\x13\xdb\xde\xb5\xb2\x3a\xa6\x70\x90\x4b\xc5\x01\x26\x14\xb1\xf7\x88\x5e\xd9\xe9\xa6\xb7\xbc\x7e\x4b\x8a\x4d\x3a\x58\x6c\x5d\xf9\x43\xb7\x39\xe4\x4e\xfc\x22\x94\xab\x6a\xd6\xb7\x78\x53\xb1\x34\xc8\x21\x70\xba\x6d\x18\x56\xc7\x2f\x30\x3d\x42\x1d\x9d\x3e\x8c\x5d\x34\x84\x46\x3b\x3d\x35\xb0\x8a\xfb\x87\xa1\xdf\xcd\xa7\x10\x2b\x2c\xbe\x9d\x4c\x3a\x94\x47\x5a\x85\x2d\x15\x82\xac\x51\x09\x3a\xb5\xd7\x4f\x4f\xa0\xfe\x49\xbe\x61\x40\xeb\x9a\xd7\xc0\x8b\xa2\xa9\x6b\xba\x4a\xe6\x1d\x00\x5e\xd1\xa9\x12\x49\xaf\x2f\x2f\x7e\xf9\xe1\x0a\x54\x83\x85\xef\x0d\x7f\x7d\x8b\x8f\x32\x38\x79\x34\xd0\x2d\x5c\x3b\x3e\xdd\x4f\xcb\x36\x70\x05\x5e\x7b\x5e\xac\x1e\x0c\x04\xa6\x67\x0d\x18\x8a\x86\x19\x65\x3a\x2e\x6d\xaf\x52\xb3\xb9\x47\x21\x2d\x6e\x07\xf7\x14\x3a\x0b\x4a\x56\xc6\x1b\x97\x30\xbc\x95\xc8\xdb\x6a\x6b\x7b\x40\xb4\x9b\xfc\xa6\xaa\xd2\x44\x6d\x5f\x94\xd8\x95\xae\xb8\x6e\x88\x8b\xac\xd4\xde\x1a\x43\x7e\x3e\xb0\x4b\x34\x4f\x7b\x2c\x51\x3d\x38\x43\xae\xa8\x7c\x94\xcc\x75\x67\x42\xc2\x86\x59\x77\x47\xf7\x22\xc0\x52\xd2\x22\x83\x9f\x68\xc1\xeb\xd5\x6b\xbd\xed\x9a\x98\xed\xd7\x79\xd0\x2e\x7d\xe2\x62\xfc\xdb\x0d\xda\x25\x06\xd7\xe5\x55\x97\x4f\x1c\x14\x19\xea\x7e\x4e\x13\xdf\x2a\x87\x7b\xa1\xda\x32\xf7\x85\x2f\xcb\xab\x7e\x03\xd4\xc9\x1d\x35\x40\x57\x3a\x76\x8d\xd8\x1c\x05\x72\x6d\x51\xa3\xa8\xb6\x38\x1e\x22\xd4\x1f\xbb\x1a\x9d\xeb\xd1\x6a\x5c\x25\xf9\xf8\xd5\x68\x94\x3f\xbf\x1a\x91\x71\x76\x36\x48\x0e\xe8\x3e\x8c\xac\x63\x6b\xd1\x18\x1d\xc2\xa0\x83\xc9\xd6\x9c\x03\x38\x83\xad\xd4\x86\xe8\xdf\x4b\xb6\x52\xfb\x09\x35\xd8\x87\x8c\x5e\x1f\x2e\x01\x4a\x66\xe6\xe9\x56\xdb\x1b\x1c\x9b\xdb\x45\xa0\x6c\x44\x94\x30\x6b\x72\x48\x96\xcb\x1d\x59\xd3\xa4\xaf\xbc\xdf\xb2\x9b\xc3\x10\xc4\xbb\xea\xb2\x21\xd3\xa7\xa3\xfd\x53\x57\xc6\x35\x34\x6b\x81\x8e\x85\x94\x4d\x56\x2b\x55\x0a\x91\xb4\x52\x46\xeb\x14\xd7\x3b\x31\x3e\x0c\x32\x5e\xff\xf7\x45\xfa\x6f\x50\x50\x63\x92\x17\xb1\x20\xb7\x8f\xf5\x07\x45\x03\x67\x44\x56\x8d\x81\xf3\x98\x82\xb5\x57\xd7\xe3\xce\xe6\xdd\x1b\x17\x01\x63\xd3\x46\x86\xc5\xc7\xc1\xf1\xc7\xb3\x26\xfd\x2c\x83\x7e\x51\x73\xb6\xe1\x46\xf1\xc0\x29\x94\xa5\x6d\x6a\x0d\xfa\x40\xd0\xec\x3c\x3a\x81\xf4\x11\x1b\xc9\xe0\x34\xec\x19\x3e\x13\xec\x8d\x2e\xfa\x78\x66\xcf\x1c\x1c\x53\x76\xce\x74\x42\x3c\x2b\xdc\x81\xfd\x8e\x4a\x64\x16\x87\x96\x1a\xb3\xa0\xe1\x1d\x44\x87\x02\x3d\x4f\x74\x62\x9a\x63\x82\x87\x8a\xe3\x24\xc7\x18\xad\xb6\xbb\xb0\x43\xb4\xe7\x4f\x92\x9e\xcf\xa1\x3c\xd7\x13\x08\x8f\x5c\x3f\x76\xf7\x6b\x1f\xc7\x4e\x1e\xf2\xc6\xb3\x8e\x0e\xdd\x30\xd1\x56\xd4\xad\xbb\xbc\xdd\x1b\x4b\x0e\x38\xfe\x5b\xcd\xe1\xfb\xdb\x6d\xb3\xc0\x30\x40\xd2\x64\x19\x1c\xfa\x62\x60\x69\x76\xa2\xc9\x85\xde\x6c\x74\x8e\x58\x75\xea\xdc\x90\xe2\x8e\xb2\xd5\xb2\x20\x55\x95\x8e\x90\xc6\x35\xd2\x9d\x0e\x23\x4b\xdb\x52\xb9\xe1\xab\xf0\xce\x74\x3a\x25\xf5\x5a\x64\x40\xd8\x7e\x34\xce\xe0\x43\xcd\xb7\xa5\xa0\xaf\x09\xdb\x9f\x07\x1c\xad\xa9\x2b\xc8\xe1\x7a\x46\x76\xe5\x6c\xb9\xdc\x13\x3e\x13\x4d\x39\xbb\xff\xcb\xac\x6e\xd8\xc9\xa3\x9a\xa7\xbd\x9e\x3b\xf1\x0d\x25\x2b\x7d\x5c\xac\x95\x4c\xde\x70\x26\x91\x68\xfd\xbc\xdf\xd1\x24\x83\x84\xec\x76\x55\x59\xa8\x43\xc2\x19\x1a\x34\xd1\x1c\xf2\x0d\xe7\x77\x25\xcd\x7c\x9e\x17\xea\xc6\x64\x64\x4e\x41\xcd\xd9\x04\xd9\x57\x9c\x60\xf7\x7a\x34\x1a\x4d\x00\x95\xd0\x32\x3e\xe2\x4d\xa3\xe3\xab\xbd\x0d\x77\xef\x28\x83\x11\x9d\xed\xd4\x54\xec\x38\x13\x18\xc9\xfa\xa8\xf5\x96\xca\x62\x93\x36\x75\x35\x71\x33\x65\x90\x7c\x78\x7f\xf1\x73\x32\xb1\x3a\x4e\xd4\x04\x99\x9e\xa6\x8d\xf0\x24\xfd\x43\x3a\x2c\x0b\x3e\xc5\xbb\xa9\x91\x43\x6e\xa7\x0a\x07\x9a\xbf\xff\x3a\xc6\x6c\xe9\x10\xe6\xf4\x54\xc3\x75\xd2\xdb\x6c\x0d\x83\x5c\x46\xa9\x71\x74\xca\x82\x18\x6e\x76\xdc\xbe\x36\x02\xce\x73\xf8\xeb\xab\x57\x5d\x4e\xe0\x33\x19\x71\x6d\x32\xbb\x54\x5b\x0c\xdf\xce\xe0\xfa\x1f\xa4\xac\xe8\x0a\x24\x07\x0c\x3d\xb0\x11\xa1\xf2\x16\xad\xa6\x63\x23\xec\x93\x2b\x37\x8b\xba\x5e\x04\xd7\x19\xfc\xed\xd5\xab\xce\x3b\x15\x13\x96\xd3\x9a\xfe\x46\x0b\x99\x3e\xda\xa5\x4e\x34\x54\x1b\x6b\xdc\x1b\x24\x78\x75\x4f\x53\x9c\x42\xa7\x66\xaf\x9a\x1d\xae\x64\x8b\xe0\xfa\x13\x34\x8d\xf4\xa4\x56\x49\xda\xd3\x70\xb0\x06\x3e\x3b\x49\x86\x65\xd0\xe8\xfc\x29\x16\x6a\xb1\x74\xcc\x5e\xbe\x1c\xc1\x4b\xb8\xf8\xe5\x07\xf8\x89\xb2\x15\xad\xf1\xd7\xd7\x3b\x52\x93\x6d\x78\xe8\xec\xee\x21\x35\x18\xc1\xcb\xd9\x70\xcd\xa9\x15\x44\xaa\x92\xd3\x8c\xcd\xe0\x8d\x3b\x3a\x79\x0a\x6a\x4d\xf8\xae\x0a\x7f\xeb\xc8\xef\xec\xa5\xb0\xf0\xe0\x43\xbe\xc3\x49\x16\x99\x59\xe3\x7b\xf5\x33\xac\x50\x76\xd3\xe5\x8b\x94\x61\x5f\xa9\x32\x8b\x39\xa4\x0c\x5e\xdd\x21\x9f\xe5\x37\x68\x9d\x04\x16\xc1\x83\x0c\x4e\x4e\x82\x03\x9d\x11\xc0\x18\x88\xf0\x3a\xcc\xed\x0b\x48\x8d\x1f\x9f\xf9\x0f\xfa\xcf\xab\xcf\xb8\x84\x5b\xde\xb0\x15\xf6\x30\x37\x47\x7b\x7d\xd4\x77\xc9\xc0\xf8\xc4\xbf\x4d\x35\x5b\x51\xbd\x61\x76\x0c\xb0\xbf\x6d\xd6\x2c\x53\xfb\x27\x7a\xf3\xe7\x4f\x73\xed\xd6\xf1\xa8\x36\x3f\x72\xa0\xe6\x85\xb1\x5a\x0a\x3c\x94\x72\x03\xa2\x83\xfc\x8c\x4a\x5d\x90\x40\x9f\xd9\x0c\x90\x70\xad\xe8\x2d\x69\x2a\x69\x1c\x2f\x5c\x08\x40\x6e\x2f\x5c\x0b\xd4\xbf\xed\xf6\xca\x09\xf8\x1b\x79\x0e\x0d\x5b\xd1\xdb\x92\xd1\x15\x2c\x40\xd6\x0d\x26\x5d\x2c\x15\x00\x89\x0d\x7f\x78\xc7\xb1\x9c\x43\xae\x94\x18\xb8\xdf\x81\x54\x2f\xbf\x3c\xa6\x97\x0c\x60\xd1\x4e\x1f\xc8\x9a\xea\xde\x1f\x02\xc7\x4f\x8e\x43\x87\xb2\x73\x63\xaf\x0f\x35\xdd\x91\x9a\x42\xa5\xa6\x34\xaf\xf7\x2b\xb3\x52\xb8\x7e\x2d\x76\x84\x41\x51\x11\x21\xf2\x44\x34\xe5\x99\x76\xd5\x19\x4a\x94\x6c\x9d\x9c\xbf\xd3\x17\xd3\xe9\xf4\xf5\x0c\x65\xcf\xaf\x6d\x54\xf4\x35\x3f\x3d\xed\x18\x2e\x7c\x47\x63\xb2\x6c\xd8\x5e\xdd\xaf\x06\xc0\x2f\x71\xd0\x6c\x58\x98\x29\xea\x3e\xbc\x90\xe3\x1f\x0e\x1c\x03\x9f\x62\xf9\xac\x71\x50\xf8\x42\x88\xc6\xe7\x47\xe6\xe8\x08\x2f\xa6\x25\x63\x5a\x1e\x72\x03\x3b\x8e\xe2\xd5\xda\x1f\x2b\x98\xb1\xfe\xd2\xb4\x62\x95\x90\x6a\x0f\x63\x69\x5f\x1a\x90\xb7\x40\xb3\xd0\xaf\x56\x89\xd9\x0c\xbe\x96\xe2\xac\x5c\x33\x5e\xeb\x06\x6b\x61\x1f\x91\xa9\x2d\xf5\x29\x1d\x5e\xa9\xda\xab\x9e\xb5\x9d\xc2\xa0\x7a\x85\xdb\x97\x4f\x2b\xae\x69\xd6\x74\x47\xe4\x06\x33\x75\xfe\x11\xa4\x4e\x85\xcb\x00\xaf\x0b\x99\x97\xde\x31\xea\x1a\xde\x59\x9d\x5e\xd7\xc4\xe6\x6d\xfb\xbf\x26\x86\xda\x29\x3f\x12\x59\xde\x53\xd8\x71\x45\xe5\x7e\x6f\xa8\x50\xaf\x53\xd5\xfb\x56\x5a\xdf\xab\x3c\xf9\x7f\x22\x87\xaa\x48\x0f\xa7\xde\x41\x8a\xd3\x67\x7f\xa6\xba\xa2\x15\x9c\x0a\x6a\x6e\x63\x1a\x53\x95\xc5\x91\x94\xb0\x73\x76\x33\x03\x61\x2c\x4f\x1b\x3a\xed\x1d\xfb\xb7\x01\xc7\x68\x99\x5b\x73\x9f\x96\xcd\x66\x76\xed\x7a\x13\x19\x52\xcf\x4f\x5b\xeb\xc1\x9a\xa8\x80\x93\x73\x4f\xb9\xf4\xfd\xb0\x2e\xf6\x3b\x63\xd2\x15\x4f\x3c\x1f\x6b\x8f\x37\xc2\xde\x48\x4f\xcc\xe8\x1f\x3b\x5e\x4b\xc5\x5c\x02\x0a\xa1\x53\x05\x5b\x7c\xf4\xf1\x16\x8e\xd2\xef\xfc\xbd\xec\x05\xfe\xd6\x0f\x78\x1d\x3f\xe0\xb5\x7a\xa0\xbe\xd9\x59\xf4\x48\x57\x6a\x3e\x08\x20\x6c\x6f\xbe\x28\x59\x64\xa0\xd0\x94\x51\xef\x79\xb9\x3a\xc7\xe1\x6f\xb8\xaa\xc1\x52\xf4\x21\x90\xb7\x29\x3f\x5f\xaa\xcf\x0c\xf4\xed\x2b\x05\x39\x1f\x61\x8e\x86\xda\x85\x9c\xce\x28\xa8\x8f\x8d\x16\xb1\x8e\x18\xbd\x96\x17\x94\x02\x04\xd9\xd2\x98\x7d\xf8\x6f\x5a\x7c\xb5\x5f\x74\x3f\x72\xd3\x6b\x81\x27\xb8\xe1\xbc\xa2\x84\x75\x61\x55\xc3\x55\x5f\x4e\xa9\x24\x5b\x64\x87\x04\x91\x47\xa0\x11\x83\xca\x7d\x58\x58\xa3\x76\x35\x8f\x7d\x65\x74\xbf\xa0\x32\x53\x87\x0f\x8e\x1d\x83\x77\x88\xf3\x40\xdf\x8c\xb1\x7f\x0d\xd8\x77\x5d\x30\x05\xa0\x2f\xe7\x9f\x30\x99\x42\xc2\xc2\x38\x80\xa6\x9c\xaa\xa0\xfa\x02\xc7\xe0\xbe\x55\xdd\x22\x55\xb7\x07\xe3\xa7\xab\x61\x68\x25\xfb\x99\x4a\x2f\x09\xa2\x6f\x8e\xb0\x7a\xb6\xf3\xd1\x7f\x03\x00\x00\xff\xff\x2a\x3d\x1e\xb2\x0a\x29\x00\x00") func libsuiIndexTsBytes() ([]byte, error) { return bindataRead( @@ -897,12 +897,12 @@ func libsuiIndexTs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libsui/index.ts", size: 9423, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "libsui/index.ts", size: 10506, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _libsuiUtilsTs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x57\x4d\x6f\xe3\x36\x13\xbe\xfb\x57\x4c\x04\x63\x21\xe1\x75\x94\x3d\xcb\xab\xe4\x0d\x8a\x00\x45\xb1\xcd\xb6\x4d\x6f\x49\xe0\x55\xa4\xb1\xad\x9a\x22\x5d\x92\x72\x6b\xc4\xfe\xef\x05\x49\x51\x24\x6d\xcb\x09\x50\x60\x5b\xa0\x97\x28\x92\x67\x9e\x79\xe6\x8b\x33\x9c\xb7\xb4\x94\x35\xa3\x30\x7e\x90\x8c\x63\x8c\xa4\x49\xe0\x75\x04\x50\xcf\x21\xbe\xe8\xdf\x00\x38\xca\x96\x53\xa0\x2d\x21\xd3\x11\xc0\x7e\xd4\xc9\xc8\xed\x1a\xd9\x1c\x90\x34\x90\xe7\x39\x44\x42\xf2\x9a\x2e\x22\xab\xa6\xbf\x43\xc5\xca\xb6\x41\x2a\xd3\xdf\x5b\xe4\xdb\x07\x24\x58\x4a\xc6\x6f\x09\xd1\xf6\xa6\x5a\x52\x81\x21\x69\x52\x82\x74\x21\x97\x90\xe7\xf0\xd1\x82\x1c\x59\x57\xf6\x1d\x3a\x92\xe6\xf1\xe3\xb3\x61\x05\x70\x75\x05\xff\x97\xe2\xb2\x5e\x50\xc6\x71\xe4\x54\xf1\x0f\x98\xcd\x44\x5b\xcf\x44\xef\xe8\x74\xb4\x1f\x8d\x5c\x04\x7e\x56\xe4\x62\xd1\xb1\xcb\xc0\xb8\x92\x64\x30\x9b\xe9\x9f\x34\x9b\x00\x2e\xd4\x30\x78\x25\x29\x84\x08\x54\x0e\x11\x61\x07\x77\x04\x55\x3c\x20\x87\x28\x52\xc4\xd1\xbc\x8b\x0c\xee\x59\x85\x9f\x6b\x21\xbf\xcc\x3f\x75\x42\xd7\xb0\xd3\x8e\x43\xde\xfb\xdf\x89\x67\x3d\xce\x91\x44\xc9\xa8\x90\xbc\x55\x66\x8f\x3c\x72\xf6\x6d\x80\xbd\x44\x5a\xe1\x93\xd9\x04\x90\xcb\x5a\xa4\x4e\xa6\x17\x9f\xfa\xbf\x5b\x6f\xce\x66\xde\x8b\x9a\x51\xd5\x24\x7c\x75\x5b\x0a\xd7\x7e\x25\x84\x26\x20\x0f\x2d\x76\x75\xe0\x2a\x64\x0f\x48\x04\x86\xf4\x9d\x6e\xc8\xde\x68\x9c\xf3\x50\x57\x3d\x92\x26\x4e\x8e\x42\x1f\x74\x89\x6f\xc6\xd7\x13\x4a\xf1\x4c\x86\x07\x41\x44\x8f\x32\x1e\xc7\x7e\xd6\x2e\x7c\xa9\x37\xfb\x45\x57\x05\x70\xc6\x0e\x03\x97\x96\x84\x09\x14\x32\x8e\x1e\xc5\xd3\x53\x56\xd2\xe7\xc8\x6b\xcb\x0b\xa5\x71\x16\x5c\x3f\x0e\x3b\xaf\x97\x1c\x8f\x63\x8d\xe0\x42\x51\x94\xcb\xb8\x2c\x08\x79\x29\xca\x55\xa6\xfa\xbe\xab\xe7\xae\x6d\x26\x50\xd3\x0a\xff\xcc\x80\xb6\xcd\x0b\xf2\x04\xf2\x6b\xd8\xb0\xba\x1a\xf4\x5c\x1c\xb2\x3b\xca\x68\x5f\x54\x73\xc6\xef\x94\x79\x6b\xb4\xb3\xa5\x6d\x58\x0c\x4b\x2d\xf6\xdb\xdc\x06\xd9\x2a\x74\x26\xba\xa7\x33\xab\x3d\x34\x87\xcc\x20\x5f\xd8\xed\xa0\x6b\xb8\x20\x0d\x0b\x94\xb7\x52\xf2\xfa\xa5\x95\x08\x17\xaa\x03\xed\xf1\x14\xfd\x8d\xf8\x1f\x9e\x7d\x41\xcd\xf4\x94\x0b\x29\x79\xbc\xc2\xed\x37\x23\x3d\x50\xeb\x01\x9e\x26\xd4\x53\xac\x0a\x59\xfc\xfb\x28\x46\x8a\x56\x16\xc1\xff\x20\x20\xfb\x9b\x60\xf4\x9b\x93\x35\x1d\xbe\x39\x6c\xef\x90\xaf\x62\x16\xf0\xed\xc8\x6d\xde\x84\x97\xdd\x48\xf3\x44\x7e\x78\xf8\x72\x9f\xae\x0b\x2e\x30\xde\xd8\x9e\x80\xb2\x90\xe5\x12\x62\x74\x80\x8a\x18\x23\x98\x22\xe7\x8c\xc7\x5f\xef\xd4\x03\x94\x9a\x1a\x48\x0a\x03\xe6\x8c\x2b\x42\x30\x7e\x5d\xe1\x76\x9f\xc1\xf8\x15\xf7\x5f\xfb\xe9\x70\x92\x90\x8e\xf3\xb2\x10\xdf\xa9\x99\x1b\xeb\xc9\x7b\x5f\x34\x98\x0c\x1f\xa4\x37\xa9\x96\x52\xe7\x6f\x5a\x32\x2a\x8b\x9a\xfa\x8a\x7d\xf2\xd6\x9c\xad\xff\xa1\xe4\xad\xd4\x56\xa0\xec\xdb\x14\x4d\xdf\x9d\xd9\x55\xe2\xcb\xaa\x34\xbf\x5d\x08\x97\xaa\xef\x2f\x7d\x7b\x89\x99\xfd\x92\xb7\x18\xb9\xea\xd0\x68\x1f\x3e\x80\x57\x24\x7e\x35\x9c\xab\x87\xd3\x15\xf1\xde\x9a\x50\xd4\x06\x8a\xe2\x44\x24\xfb\xc1\xef\x57\xc0\xa6\xcf\x2b\xc7\x86\x6d\x70\xa0\x5e\x4c\xd8\xf4\x67\x54\xcb\xcb\x2d\xe7\xc5\x36\xad\x85\x7e\xfa\xe2\x37\xd0\xbf\x40\xe6\xfe\x4f\xc5\x9a\xd4\x32\x8e\xc0\x0e\xcf\x0e\xca\xcd\x9c\x32\x1c\x33\x7d\x4a\xcb\x94\xe3\x9a\x14\x25\xc6\x57\x8f\x4f\xf4\x89\x3f\x89\xe7\xab\xc5\x04\xa2\x28\xd8\x8e\x36\x26\x31\x51\x12\x0c\x39\x18\x2c\x70\xe3\xac\x6b\xcb\x60\x54\x69\x2d\x77\xf8\x57\xd5\x7f\x24\x28\x45\x55\xbd\x2b\x22\x4b\xd9\x90\x58\xfd\xb9\x39\x71\x13\xd8\xd9\x55\xda\x9d\x0e\x4a\x54\x53\x69\x69\x85\xf3\x9a\x62\x75\xd4\xef\x21\xa5\x9a\x52\xe4\xdf\xff\xfa\xe3\x67\x75\x94\x44\x91\x7f\x10\x1c\xae\xc2\xc9\xc9\x05\xd6\x43\xc8\x35\xdd\x81\xa9\x65\x5c\x0a\xae\x3a\xbf\x20\xad\x90\xc7\x25\x6b\xd6\x13\x60\x6b\xf5\x51\x7b\x67\xbe\x6b\x6b\xdd\xae\xa8\xee\x14\x7a\x7d\x38\xa5\x32\x75\x17\x22\x1e\x5c\x7e\x02\x9c\x66\xed\x5d\x4c\x8c\xe6\xc0\x4d\x25\x00\xef\x7c\xd6\x1e\x77\x20\xea\x31\x75\x5f\x7b\x2c\xf3\x8f\xbd\x01\x16\x62\x4b\x4b\xe8\xf8\xd2\xa2\xc1\x89\x5e\x1c\x92\x0c\x7e\xe2\xac\xa9\x05\x7e\x32\xc9\xb3\x35\x37\xb8\x37\x99\x9d\x89\x1b\xa0\x9e\xc7\x04\x1c\xe6\xc4\x27\x92\xd8\x40\xff\x15\x00\x00\xff\xff\x9a\x9e\x29\xb7\x55\x0f\x00\x00") +var _libsuiUtilsTs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x57\x5f\x6f\xdb\x36\x10\x7f\xf7\xa7\xb8\x08\x46\x41\x63\x8e\xd2\x67\xb9\x4e\x96\x15\x01\x86\xa1\x4b\xb7\x65\x6f\x49\xe0\x32\xd2\xd9\xd6\x4c\x91\x1e\x49\x39\x35\xe2\x7c\xf7\x81\xa4\x24\x92\xb6\x95\x04\x18\xd0\x0d\xe8\x4b\x14\x4b\x77\xbf\xfb\xdd\x3f\xde\x71\x5e\xf3\x5c\x97\x82\xc3\xf0\x46\x0b\x89\x04\x59\x35\x82\xa7\x01\x40\x39\x07\x72\xd2\xfd\x02\x90\xa8\x6b\xc9\x81\xd7\x8c\x4d\x06\x00\xcf\x83\x46\x46\x6f\xd7\x28\xe6\x80\xac\x82\xe9\x74\x0a\x89\xd2\xb2\xe4\x8b\xa4\x55\xb3\xef\xa1\x10\x79\x5d\x21\xd7\xe9\xdf\x35\xca\xed\x0d\x32\xcc\xb5\x90\x97\x8c\x59\x7b\x13\x2b\x69\xc0\x90\x55\x29\x43\xbe\xd0\x4b\x98\x4e\xe1\x7d\x0b\x72\x60\xdd\xd8\xf7\xe8\xc8\xaa\xdb\xf7\xf7\x8e\x15\xc0\xd9\x19\xfc\xa8\xd5\x69\xb9\xe0\x42\xe2\xc0\xab\xe2\x23\xcc\x66\xaa\x2e\x67\xaa\x73\x74\x32\x78\x1e\x0c\x7c\x04\x7e\x37\xe4\x88\x6a\xd8\x65\xe0\x5c\x19\x65\x30\x9b\xd9\x4f\x96\x4d\x04\x17\x6b\x38\xbc\x9c\x51\xa5\x22\x95\x7d\x44\xd8\xc1\x15\x43\x13\x0f\x98\x42\x92\x18\xe2\xe8\x7e\xab\x0c\xae\x45\x81\x9f\x4a\xa5\x3f\xcf\x3f\x34\x42\xe7\xb0\xb3\x8e\xc3\xb4\xf3\xbf\x11\xcf\x3a\x9c\x03\x89\x5c\x70\xa5\x65\x6d\xcc\x1e\x78\xe4\xed\xb7\x01\x0e\x12\xd9\x0a\x1f\xcd\x26\x80\x5e\x96\x2a\xf5\x32\x9d\xf8\x24\xfc\xde\x7a\xf3\x62\xe6\x83\xa8\x39\x55\x4b\x22\x54\x6f\x4b\xe1\x3c\xac\x84\xd8\x04\x4c\x63\x8b\x4d\x1d\xf8\x0a\x79\x06\x64\x0a\x63\xfa\x5e\x37\x66\xef\x34\x5e\xf2\xd0\x56\x3d\xb2\x8a\x8c\x0e\x42\x1f\x75\x49\x68\x26\xd4\x53\x46\xf1\x85\x0c\xf7\x82\xa8\x0e\x65\x38\x24\x61\xd6\x4e\x42\xa9\x57\xfb\xc5\x56\x05\x48\x21\xf6\x03\x97\xe6\x4c\x28\x54\x9a\x24\xb7\xea\xee\x2e\xcb\xf9\x7d\x12\xb4\xe5\x89\xd1\x78\x11\xdc\x3e\xf6\x3b\xaf\x93\x1c\x0e\x89\x45\xf0\xa1\xa0\xf9\x92\xe4\x94\xb1\x07\x9a\xaf\x32\xd3\xf7\x4d\x3d\x37\x6d\x33\x86\x92\x17\xf8\x35\x03\x5e\x57\x0f\x28\x47\x30\x3d\x87\x8d\x28\x8b\x5e\xcf\xd5\x3e\xbb\x83\x8c\x76\x45\x35\x17\xf2\xca\x98\x6f\x8d\x36\xb6\xac\x8d\x16\xa3\xa5\x46\xc2\x36\x6f\x83\xdc\x2a\x34\x26\x9a\xa7\x37\x6b\x3d\x74\x87\x4c\x2f\x5f\xd8\xed\xa0\x69\xb8\x28\x0d\x0b\xd4\x97\x5a\xcb\xf2\xa1\xd6\x08\x27\xa6\x03\xdb\xe3\x29\xf9\x17\xf1\xdf\x3f\xfb\xa2\x9a\xe9\x28\x53\xad\x25\x59\xe1\xf6\x9b\x91\xee\xa9\xf5\x08\xcf\x12\xea\x28\x16\x54\xd3\xff\x1f\xc5\xc4\xd0\xca\x12\xf8\x01\x22\xb2\x7f\x29\xc1\xbf\x39\x59\xd7\xe1\x9b\xfd\xf6\x8e\xf9\x1a\x66\x11\xdf\x86\xdc\xe6\x55\x78\xdd\x8c\xb4\x40\xe4\x97\x9b\xcf\xd7\xe9\x9a\x4a\x85\x64\xd3\xf6\x04\xe4\x54\xe7\x4b\x20\xe8\x01\x0d\x31\xc1\x30\x45\x29\x85\x24\x5f\xae\xcc\x03\x8c\x9a\x19\x48\x06\x03\xe6\x42\x1a\x42\x30\x7c\x5a\xe1\xf6\x39\x83\xe1\x13\x3e\x7f\xe9\xa6\xc3\x51\x42\x36\xce\x4b\xaa\x3e\x9a\x99\x4b\xec\xe4\xbd\xa6\x15\x8e\xfa\x0f\xd2\x8b\xd4\x4a\x99\xf3\x37\xcd\x05\xd7\xb4\xe4\xa1\x62\x97\xbc\xb5\x14\xeb\xff\x28\x79\x2b\xb3\x15\x18\xfb\x6d\x8a\x26\x6f\xce\xec\x6a\x14\xca\x9a\x34\xbf\x5e\x08\xa7\xa6\xef\x4f\x43\x7b\x23\x37\xfb\xb5\xac\x31\xf1\xd5\x61\xd1\xde\xbd\x83\xa0\x48\xc2\x6a\x78\xa9\x1e\x8e\x57\xc4\x5b\x6b\xc2\x50\xeb\x29\x8a\x23\x91\xec\x06\x7f\x58\x01\x9b\x2e\xaf\x12\x2b\xb1\xc1\x9e\x7a\x71\x61\xb3\xaf\xd1\x2c\x2f\x97\x52\xd2\x6d\x5a\x2a\xfb\x0c\xc5\x2f\xa0\xfb\x01\x99\xff\x3f\x55\x6b\x56\x6a\x92\x40\x3b\x3c\x1b\x28\x3f\x73\xf2\x78\xcc\x74\x29\xcd\x53\x89\x6b\x46\x73\x24\x67\xb7\x77\xfc\x4e\xde\xa9\xfb\xb3\xc5\x18\x92\x24\xda\x8e\x36\x2e\x31\xc9\x28\x1a\x72\xd0\x5b\xe0\xce\x59\xdf\x96\xd1\xa8\xb2\x5a\xfe\xf0\x2f\x8a\xef\x24\x28\xb4\x28\xde\x14\x91\xa5\xae\x18\x31\x7f\x2e\x8e\xdc\x04\x76\xed\x2a\xed\x4f\x07\x23\x6a\xa9\xd4\xbc\xc0\x79\xc9\xb1\x38\xe8\xf7\x98\x52\xc9\x39\xca\x9f\xff\xfc\xf5\x93\x39\x4a\x92\x24\x3c\x08\xf6\x57\xe1\xd1\xd1\x05\x36\x40\x98\x5a\xba\x3d\x53\xcb\xb9\x14\x5d\x75\xfe\x40\x5e\xa0\x24\xb9\xa8\xd6\x63\x10\x6b\xf3\xd2\x7a\xe7\xde\x5b\x6b\xcd\xae\x68\xee\x14\x76\x7d\x38\xa6\x32\xf1\x17\x22\x19\x5d\x7e\x22\x9c\x6a\x1d\x5c\x4c\x9c\x66\xcf\x4d\x25\x02\x6f\x7c\xb6\x1e\x37\x20\xe6\x31\xf1\x6f\x3b\x2c\xf7\x4f\x7b\x03\xa4\x6a\xcb\x73\xb8\xfa\x8a\x39\xe1\xb4\xc2\xb1\x5d\x1b\x46\x19\xfc\x26\x45\x55\x2a\xfc\xe0\x52\xd7\x56\x5c\xef\xd6\xe4\x36\x26\xe9\xdc\xee\x58\x8c\xc1\x63\x8e\x43\x1a\xa3\x23\x61\xfe\x89\xe6\x2b\xe4\x05\x91\xa2\xd6\xe8\xeb\xc8\x5d\x24\xcd\x3b\x98\x36\xcf\xdd\x0e\x1e\x4b\x5e\x88\xc7\x94\x89\x9c\x1a\xed\x74\x4d\xf5\xd2\xd8\x9a\xec\xdf\x3a\x23\xd4\xf8\xd2\xd9\x7c\x8a\x0c\xb8\xd2\x0a\xc3\xec\x14\xc3\xf8\x46\x64\xfc\xa1\x60\x03\xf9\x91\x32\x46\x2a\xd4\x4b\x51\xb4\x1e\x8c\x21\x4d\x53\x2a\x17\x2a\x03\xca\xb7\x41\x68\x29\xdf\xbe\x1a\x57\xfa\x48\x4b\xdd\x44\xf7\xc1\xf1\x9d\x99\x85\x9b\x78\x26\x63\x70\xf6\x3a\x3b\x5d\x70\xff\x09\x00\x00\xff\xff\x1e\x4b\xd4\x73\xb0\x10\x00\x00") func libsuiUtilsTsBytes() ([]byte, error) { return bindataRead( @@ -917,7 +917,7 @@ func libsuiUtilsTs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libsui/utils.ts", size: 3925, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "libsui/utils.ts", size: 4272, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -937,7 +937,7 @@ func libsuiYaoTs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libsui/yao.ts", size: 4338, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "libsui/yao.ts", size: 4338, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -957,7 +957,7 @@ func publicIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "public/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "public/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -977,7 +977,7 @@ func uiIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "ui/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "ui/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -997,7 +997,7 @@ func xgenSetupIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/setup/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "xgen/setup/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1017,7 +1017,7 @@ func xgenV09IndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v0.9/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "xgen/v0.9/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1037,7 +1037,7 @@ func xgenV10IndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/index.html", size: 50, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "xgen/v1.0/index.html", size: 50, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1057,7 +1057,7 @@ func xgenV10Layouts__indexAsyncJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/layouts__index.async.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "xgen/v1.0/layouts__index.async.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1077,7 +1077,7 @@ func xgenV10UmiJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/umi.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "xgen/v1.0/umi.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1097,7 +1097,7 @@ func yaoApisImportHttpJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/apis/import.http.json", size: 1696, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/apis/import.http.json", size: 1696, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1117,7 +1117,7 @@ func yaoApisStorageHttpJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/apis/storage.http.json", size: 1046, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/apis/storage.http.json", size: 1046, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1137,7 +1137,7 @@ func yaoDataIcons404Png() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/404.png", size: 9342, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/data/icons/404.png", size: 9342, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1157,7 +1157,7 @@ func yaoDataIconsIconIcns() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1177,7 +1177,7 @@ func yaoDataIconsIconIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1197,7 +1197,7 @@ func yaoDataIconsIconPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1217,7 +1217,7 @@ func yaoDataIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/index.html", size: 282, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/data/index.html", size: 282, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1237,7 +1237,7 @@ func yaoFieldsModelTransJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/fields/model.trans.json", size: 14938, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/fields/model.trans.json", size: 14938, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1257,7 +1257,7 @@ func yaoLangsEnUsJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/en-US.json", size: 66, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/langs/en-US.json", size: 66, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1277,7 +1277,7 @@ func yaoLangsZhCnGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1297,7 +1297,7 @@ func yaoLangsZhCnLoginsAdminLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1317,7 +1317,7 @@ func yaoLangsZhCnLoginsUserLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1337,7 +1337,7 @@ func yaoLangsZhHkGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1357,7 +1357,7 @@ func yaoLangsZhHkLoginsAdminLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1377,7 +1377,7 @@ func yaoLangsZhHkLoginsUserLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1397,7 +1397,7 @@ func yaoReleaseAppYaz() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/release/app.yaz", size: 181682, mode: os.FileMode(420), modTime: time.Unix(1722682639, 0)} + info := bindataFileInfo{name: "yao/release/app.yaz", size: 181682, mode: os.FileMode(420), modTime: time.Unix(1722688044, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/sui/api/render.go b/sui/api/render.go index 732e911e..211d0ccb 100644 --- a/sui/api/render.go +++ b/sui/api/render.go @@ -31,7 +31,7 @@ func Render(process *process.Process) interface{} { ctx.Request.URL.Path = route r, _, err := NewRequestContext(ctx) if err != nil { - return fmt.Sprintf("
%s
", err.Error()) + return fmt.Sprintf(" %s ", err.Error()) } var c *core.Cache = nil @@ -42,27 +42,33 @@ func Render(process *process.Process) interface{} { if c == nil { c, _, err = r.MakeCache() if err != nil { - return fmt.Sprintf("
%s
", err.Error()) + return fmt.Sprintf(" %s ", err.Error()) } } if c == nil { - return fmt.Sprintf("
Cache not found
") + return fmt.Sprintf(" Cache not found ") + } + + // Guard the page + code, err := r.Guard(c) + if err != nil { + return fmt.Sprintf(" %v %s ", code, err.Error()) } data, ok := payload["data"].(map[string]interface{}) if !ok { - return fmt.Sprintf("
Data not found
") + return fmt.Sprintf(" Data not found ") } name, ok := payload["name"].(string) if !ok { - return fmt.Sprintf("
Name not found
") + return fmt.Sprintf(" Name not found ") } html, err := r.renderHTML(c, name, c.HTML, core.Data(data)) if err != nil { - return fmt.Sprintf("
%s
", err.Error()) + return fmt.Sprintf(" %s ", err.Error()) } return html diff --git a/sui/api/run.go b/sui/api/run.go index b4aaa388..71896c6e 100644 --- a/sui/api/run.go +++ b/sui/api/run.go @@ -1,8 +1,106 @@ package api -import "github.com/yaoapp/gou/process" +import ( + "github.com/gin-gonic/gin" + "github.com/yaoapp/gou/process" + "github.com/yaoapp/kun/exception" + "github.com/yaoapp/kun/log" + "github.com/yaoapp/yao/sui/core" +) // Run the backend script, with Api prefix method func Run(process *process.Process) interface{} { - return nil + process.ValidateArgNums(3) + ctx, ok := process.Args[0].(*gin.Context) + if !ok { + exception.New("The context is required", 400).Throw() + return nil + } + + ctx.Header("Content-Type", "text/html; charset=utf-8") + route := process.ArgsString(1) + payload := process.ArgsMap(2) + if route == "" { + exception.New("The route is required", 400).Throw() + return nil + } + + if payload["method"] == nil { + exception.New("The method is required", 400).Throw() + return nil + } + + method, ok := payload["method"].(string) + if !ok { + exception.New("The method must be a string", 400).Throw() + return nil + } + + args := []interface{}{} + if payload["args"] != nil { + args, ok = payload["args"].([]interface{}) + if !ok { + exception.New("The args must be an array", 400).Throw() + return nil + } + } + + ctx.Request.URL.Path = route + r, _, err := NewRequestContext(ctx) + if err != nil { + exception.Err(err, 500).Throw() + return nil + } + + var c *core.Cache = nil + if !r.Request.DisableCache() { + c = core.GetCache(r.File) + } + + if c == nil { + c, _, err = r.MakeCache() + if err != nil { + log.Error("[SUI] Can't make cache, %s %s error: %s", route, method, err.Error()) + exception.New("Can't make cache, please the route and method is correct, get more information from the log.", 500).Throw() + return nil + } + } + + // Guard the page + code, err := r.Guard(c) + if err != nil { + exception.Err(err, code).Throw() + return nil + } + + if c == nil { + exception.New("Cache not found", 500).Throw() + return nil + } + + if c.Script == nil { + exception.New("Script not found", 500).Throw() + return nil + } + + scriptCtx, err := c.Script.NewContext(process.Sid, nil) + if err != nil { + exception.Err(err, 500).Throw() + return nil + } + defer scriptCtx.Close() + + global := scriptCtx.Global() + if !global.Has("Api" + method) { + exception.New("Method %s not found", 500, method).Throw() + return nil + } + + res, err := scriptCtx.Call("Api"+method, args...) + if err != nil { + exception.Err(err, 500).Throw() + return nil + } + + return res } diff --git a/sui/libsui/index.ts b/sui/libsui/index.ts index bdfaf98e..e3e2854b 100644 --- a/sui/libsui/index.ts +++ b/sui/libsui/index.ts @@ -219,6 +219,43 @@ function __sui_store(elm) { }; } +async function __sui_backend_call( + route: string, + method: string, + ...args: any +): Promise { + const url = `/api/__yao/sui/v1/run${route}`; + const headers = { + "Content-Type": "application/json", + Cookie: document.cookie, + }; + const payload = { method, args }; + try { + const body = JSON.stringify(payload); + const response = await fetch(url, { method: "POST", headers, body: body }); + const text = await response.text(); + let data: any | null = null; + if (text && text != "") { + data = JSON.parse(text); + } + + if (response.status >= 400) { + const message = data.message + ? data.message + : `Failed to call ${route} ${method}`; + const code = data.code ? data.code : 500; + return Promise.reject({ message, code }); + } + + return Promise.resolve(data); + } catch (e) { + const message = e.message ? e.message : `Failed to call ${route} ${method}`; + const code = e.code ? e.code : 500; + console.error(`[SUI] Failed to call ${route} ${method}:`, e); + return Promise.reject({ message, code }); + } +} + /** * SUI Render * @param component diff --git a/sui/libsui/utils.ts b/sui/libsui/utils.ts index 555db7d4..23fbbf87 100644 --- a/sui/libsui/utils.ts +++ b/sui/libsui/utils.ts @@ -170,8 +170,25 @@ class __Render { this.comp = comp; this.option = option; } - async Render(name, data): Promise { + async Exec(name, data): Promise { // @ts-ignore return __sui_render(this.comp, name, data, this.option); } } + +function $Backend(route?: string) { + route = route || window.location.pathname; + return new __Backend(route); +} + +class __Backend { + route = ""; + constructor(route) { + this.route = route; + } + + async Call(method: string, ...args: any): Promise { + // @ts-ignore + return await __sui_backend_call(this.route, method, ...args); + } +}