create-young-proj 1.0.0 → 1.1.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.editorconfig +14 -0
- package/.vscode/settings.json +39 -0
- package/CHANGELOG.md +256 -0
- package/README.md +7 -3
- package/build.config.ts +22 -0
- package/eslint.config.js +35 -0
- package/package.json +1 -7
- package/src/index.ts +366 -0
- package/template-admin-server/.editorconfig +11 -0
- package/template-admin-server/.nvmrc +1 -0
- package/template-admin-server/.vscode/extensions.json +6 -0
- package/template-admin-server/.vscode/settings.json +4 -0
- package/template-admin-server/_gitignore +15 -0
- package/template-admin-server/_nvmrc +1 -0
- package/template-admin-server/boot.mjs +11 -0
- package/template-admin-server/package.json +60 -0
- package/template-admin-server/rome.json +22 -0
- package/template-admin-server/src/config/config.default.ts +56 -0
- package/template-admin-server/src/configuration.ts +47 -0
- package/template-admin-server/src/controller/admin.controller.ts +397 -0
- package/template-admin-server/src/controller/api.controller.ts +98 -0
- package/template-admin-server/src/controller/base.controller.ts +70 -0
- package/template-admin-server/src/controller/dto/api.ts +47 -0
- package/template-admin-server/src/controller/dto/index.ts +36 -0
- package/template-admin-server/src/controller/dto/menu.ts +41 -0
- package/template-admin-server/src/controller/dto/role.ts +41 -0
- package/template-admin-server/src/controller/dto/user.ts +52 -0
- package/template-admin-server/src/controller/menu.controller.ts +138 -0
- package/template-admin-server/src/controller/role.controller.ts +116 -0
- package/template-admin-server/src/controller/user.controller.ts +108 -0
- package/template-admin-server/src/entities/Api.ts +29 -0
- package/template-admin-server/src/entities/BaseCreate.ts +30 -0
- package/template-admin-server/src/entities/Menu.ts +39 -0
- package/template-admin-server/src/entities/Role.ts +36 -0
- package/template-admin-server/src/entities/User.ts +35 -0
- package/template-admin-server/src/entities/index.ts +10 -0
- package/template-admin-server/src/filter/default.filter.ts +22 -0
- package/template-admin-server/src/filter/notfound.filter.ts +23 -0
- package/template-admin-server/src/middleware/helper.middleware.ts +28 -0
- package/template-admin-server/src/middleware/index.ts +9 -0
- package/template-admin-server/src/middleware/jwt.middleware.ts +32 -0
- package/template-admin-server/src/middleware/report.middleware.ts +26 -0
- package/template-admin-server/src/service/api.service.ts +174 -0
- package/template-admin-server/src/service/basic.ts +118 -0
- package/template-admin-server/src/service/index.ts +10 -0
- package/template-admin-server/src/service/menu.service.ts +139 -0
- package/template-admin-server/src/service/role.service.ts +286 -0
- package/template-admin-server/src/service/user.service.ts +124 -0
- package/template-admin-server/src/strategy/jwt.strategy.ts +26 -0
- package/template-admin-server/src/types/index.ts +42 -0
- package/template-admin-server/src/types/types.d.ts +31 -0
- package/template-admin-server/tsconfig.json +24 -0
- package/template-nuxt-admin/.vscode/extensions.json +12 -0
- package/template-nuxt-admin/.vscode/settings.json +39 -0
- package/template-nuxt-admin/Dockerfile +41 -0
- package/template-nuxt-admin/_gitignore +23 -0
- package/template-nuxt-admin/_npmrc +2 -0
- package/template-nuxt-admin/_nvmrc +1 -0
- package/template-nuxt-admin/app.vue +49 -0
- package/template-nuxt-admin/boot.mjs +16 -0
- package/template-nuxt-admin/components/ScreenFull.vue +19 -0
- package/template-nuxt-admin/components/TopSearch.vue +76 -0
- package/template-nuxt-admin/components/TopUser.vue +72 -0
- package/template-nuxt-admin/components/YoungChangePassword.vue +94 -0
- package/template-nuxt-admin/components/YoungCodeInput.vue +65 -0
- package/template-nuxt-admin/components/YoungEditor.vue +81 -0
- package/template-nuxt-admin/components/YoungLink.vue +24 -0
- package/template-nuxt-admin/components/YoungLoading.vue +39 -0
- package/template-nuxt-admin/components/ZenMode.vue +21 -0
- package/template-nuxt-admin/components/layout/Footer.vue +29 -0
- package/template-nuxt-admin/components/layout/Logo.vue +54 -0
- package/template-nuxt-admin/components/layout/Main.vue +26 -0
- package/template-nuxt-admin/components/layout/NavBar.vue +90 -0
- package/template-nuxt-admin/components/layout/SideBar.vue +96 -0
- package/template-nuxt-admin/components/layout/SubMenu.vue +52 -0
- package/template-nuxt-admin/components/layout/TabsBar.vue +184 -0
- package/template-nuxt-admin/composables/api.ts +97 -0
- package/template-nuxt-admin/composables/apis/delete.ts +37 -0
- package/template-nuxt-admin/composables/apis/get.ts +83 -0
- package/template-nuxt-admin/composables/apis/index.ts +10 -0
- package/template-nuxt-admin/composables/apis/patch.ts +74 -0
- package/template-nuxt-admin/composables/apis/post.ts +85 -0
- package/template-nuxt-admin/composables/config.ts +13 -0
- package/template-nuxt-admin/composables/icon.ts +25 -0
- package/template-nuxt-admin/composables/nav.ts +85 -0
- package/template-nuxt-admin/composables/tags.ts +136 -0
- package/template-nuxt-admin/composables/user.ts +48 -0
- package/template-nuxt-admin/config/.devrc +1 -0
- package/template-nuxt-admin/config/.onlinerc +1 -0
- package/template-nuxt-admin/config/.testrc +1 -0
- package/template-nuxt-admin/env.d.ts +47 -0
- package/template-nuxt-admin/error.vue +61 -0
- package/template-nuxt-admin/eslint.config.js +33 -0
- package/template-nuxt-admin/layouts/blank.vue +9 -0
- package/template-nuxt-admin/layouts/default.vue +163 -0
- package/template-nuxt-admin/middleware/auth.global.ts +66 -0
- package/template-nuxt-admin/nuxt.config.ts +106 -0
- package/template-nuxt-admin/package.json +63 -0
- package/template-nuxt-admin/pages/home/[id].vue +28 -0
- package/template-nuxt-admin/pages/index.vue +15 -0
- package/template-nuxt-admin/pages/login.vue +199 -0
- package/template-nuxt-admin/pages/system/api.vue +177 -0
- package/template-nuxt-admin/pages/system/hooks/useRole.ts +328 -0
- package/template-nuxt-admin/pages/system/menuList.vue +351 -0
- package/template-nuxt-admin/pages/system/role.vue +144 -0
- package/template-nuxt-admin/pages/system/user.vue +223 -0
- package/template-nuxt-admin/plugins/directive.ts +26 -0
- package/template-nuxt-admin/public/bg.webp +0 -0
- package/template-nuxt-admin/public/default_avatar.svg +1 -0
- package/template-nuxt-admin/public/favicon.svg +2 -0
- package/template-nuxt-admin/public/image_placeholder.svg +15 -0
- package/template-nuxt-admin/public/index.umd.js +74 -0
- package/template-nuxt-admin/public/index.umd.js.map +1 -0
- package/template-nuxt-admin/public/logo.svg +2 -0
- package/template-nuxt-admin/public/tabbar_bg.png +0 -0
- package/template-nuxt-admin/server/api/[...all].ts +10 -0
- package/template-nuxt-admin/server/plugins/env.ts +88 -0
- package/template-nuxt-admin/server/routes/get/env.ts +13 -0
- package/template-nuxt-admin/server/tsconfig.json +3 -0
- package/template-nuxt-admin/server/utils/index.ts +36 -0
- package/template-nuxt-admin/styles/element.scss +30 -0
- package/template-nuxt-admin/styles/index.scss +59 -0
- package/template-nuxt-admin/styles/variable.scss +103 -0
- package/template-nuxt-admin/tsconfig.json +7 -0
- package/template-nuxt-admin/typings/global.d.ts +16 -0
- package/template-nuxt-admin/typings/system.d.ts +67 -0
- package/template-nuxt-admin/typings/user.d.ts +19 -0
- package/template-nuxt-admin/uno.config.ts +40 -0
- package/template-nuxt-admin/utils/tool.ts +195 -0
- package/template-nuxt-admin/yarn.lock +8398 -0
- package/template-nuxt-website/.nvmrc +1 -0
- package/template-nuxt-website/.vscode/extensions.json +12 -0
- package/template-nuxt-website/.vscode/settings.json +39 -0
- package/template-nuxt-website/Dockerfile +41 -0
- package/template-nuxt-website/_gitignore +26 -0
- package/template-nuxt-website/_npmrc +2 -0
- package/template-nuxt-website/_nvmrc +1 -0
- package/template-nuxt-website/app.vue +66 -0
- package/template-nuxt-website/assets/tabbar/event.png +0 -0
- package/template-nuxt-website/assets/tabbar/event_active.png +0 -0
- package/template-nuxt-website/assets/tabbar/game.png +0 -0
- package/template-nuxt-website/assets/tabbar/game_active.png +0 -0
- package/template-nuxt-website/assets/tabbar/shop.png +0 -0
- package/template-nuxt-website/assets/tabbar/shop_active.png +0 -0
- package/template-nuxt-website/assets/tabbar/user.png +0 -0
- package/template-nuxt-website/assets/tabbar/user_active.png +0 -0
- package/template-nuxt-website/boot.mjs +16 -0
- package/template-nuxt-website/components/AboutNav.vue +27 -0
- package/template-nuxt-website/components/BreadNav.vue +35 -0
- package/template-nuxt-website/components/Follow.vue +48 -0
- package/template-nuxt-website/components/FriendLink.vue +36 -0
- package/template-nuxt-website/components/mobile/NavBar.vue +50 -0
- package/template-nuxt-website/components/top/Extra.vue +50 -0
- package/template-nuxt-website/components/top/Nav.vue +87 -0
- package/template-nuxt-website/components/young/Banner.vue +100 -0
- package/template-nuxt-website/components/young/Footer.vue +44 -0
- package/template-nuxt-website/components/young/Header.vue +25 -0
- package/template-nuxt-website/components/young/Tabbar.vue +76 -0
- package/template-nuxt-website/composables/ad.ts +20 -0
- package/template-nuxt-website/composables/config.ts +11 -0
- package/template-nuxt-website/composables/nav.ts +30 -0
- package/template-nuxt-website/composables/share.ts +22 -0
- package/template-nuxt-website/composables/utils.ts +84 -0
- package/template-nuxt-website/config/.devrc +11 -0
- package/template-nuxt-website/config/.onlinerc +13 -0
- package/template-nuxt-website/config/.testrc +11 -0
- package/template-nuxt-website/env.d.ts +55 -0
- package/template-nuxt-website/error.vue +69 -0
- package/template-nuxt-website/eslint.config.js +34 -0
- package/template-nuxt-website/layouts/default.vue +80 -0
- package/template-nuxt-website/layouts/home.vue +75 -0
- package/template-nuxt-website/layouts/tabbar.vue +78 -0
- package/template-nuxt-website/nuxt.config.ts +98 -0
- package/template-nuxt-website/package.json +41 -0
- package/template-nuxt-website/pages/index.html.vue +16 -0
- package/template-nuxt-website/pages/index.vue +29 -0
- package/template-nuxt-website/pages/match.html.vue +23 -0
- package/template-nuxt-website/pages/news/[id].html.vue +57 -0
- package/template-nuxt-website/pages/news.html.vue +26 -0
- package/template-nuxt-website/pages/shop.html.vue +26 -0
- package/template-nuxt-website/public/favicon.ico +0 -0
- package/template-nuxt-website/public/robots.txt +2 -0
- package/template-nuxt-website/public/svg/image_placeholder.svg +15 -0
- package/template-nuxt-website/server/api/get_footer_info.get.ts +52 -0
- package/template-nuxt-website/server/api/get_gray_status.get.ts +38 -0
- package/template-nuxt-website/server/api/get_head_nav.get.ts +38 -0
- package/template-nuxt-website/server/api/get_home_banner.get.ts +28 -0
- package/template-nuxt-website/server/api/get_seo_info.get.ts +32 -0
- package/template-nuxt-website/server/middleware/platform.ts +11 -0
- package/template-nuxt-website/server/plugins/init.ts +147 -0
- package/template-nuxt-website/server/tsconfig.json +3 -0
- package/template-nuxt-website/server/utils/index.ts +12 -0
- package/template-nuxt-website/server/utils/proxy.ts +59 -0
- package/template-nuxt-website/tsconfig.json +4 -0
- package/template-nuxt-website/typings/banner.d.ts +30 -0
- package/template-nuxt-website/typings/nav.d.ts +34 -0
- package/template-nuxt-website/typings/system.d.ts +22 -0
- package/template-nuxt-website/uno.config.ts +40 -0
- package/template-nuxt-website/utils/tool.ts +171 -0
- package/template-nuxt-website/yarn.lock +8018 -0
- package/template-uni-app/.eslintignore +1 -0
- package/template-uni-app/.eslintrc +16 -0
- package/template-uni-app/.vscode/css.code-snippets +398 -0
- package/template-uni-app/.vscode/extensions.json +12 -0
- package/template-uni-app/.vscode/js.code-snippets +1669 -0
- package/template-uni-app/.vscode/settings.json +39 -0
- package/template-uni-app/.vscode/vue-html.code-snippets +682 -0
- package/template-uni-app/_env +3 -0
- package/template-uni-app/_env.development +11 -0
- package/template-uni-app/_env.production +8 -0
- package/template-uni-app/_env.test +11 -0
- package/template-uni-app/_gitignore +3 -0
- package/template-uni-app/_npmrc +2 -0
- package/template-uni-app/_nvmrc +1 -0
- package/template-uni-app/auto-imports.d.ts +413 -0
- package/template-uni-app/components.d.ts +17 -0
- package/template-uni-app/custom-plugins/index.ts +7 -0
- package/template-uni-app/custom-plugins/multiconf.ts +74 -0
- package/template-uni-app/eslint.config.js +35 -0
- package/template-uni-app/index.html +23 -0
- package/template-uni-app/manifest.config.ts +88 -0
- package/template-uni-app/package.json +109 -0
- package/template-uni-app/pages.config.ts +58 -0
- package/template-uni-app/pnpm-lock.yaml +10981 -0
- package/template-uni-app/src/App.vue +79 -0
- package/template-uni-app/src/apis/index.ts +54 -0
- package/template-uni-app/src/apis/requests/get.ts +52 -0
- package/template-uni-app/src/apis/requests/index.ts +8 -0
- package/template-uni-app/src/apis/requests/post.ts +23 -0
- package/template-uni-app/src/components/young-loading/young-loading.vue +36 -0
- package/template-uni-app/src/components/young-loading-mini/young-loading-mini.vue +35 -0
- package/template-uni-app/src/components/young-navbar/young-navbar.vue +252 -0
- package/template-uni-app/src/components/young-tabbar/young-tabbar.vue +145 -0
- package/template-uni-app/src/config/enum.ts +47 -0
- package/template-uni-app/src/config/index.ts +8 -0
- package/template-uni-app/src/config/map.ts +15 -0
- package/template-uni-app/src/env.d.ts +36 -0
- package/template-uni-app/src/layouts/default.vue +22 -0
- package/template-uni-app/src/layouts/tabbar.vue +38 -0
- package/template-uni-app/src/main.ts +20 -0
- package/template-uni-app/src/manifest.json +75 -0
- package/template-uni-app/src/pages/demo/index.vue +30 -0
- package/template-uni-app/src/pages/index.vue +65 -0
- package/template-uni-app/src/pages/my.vue +30 -0
- package/template-uni-app/src/pages.json +74 -0
- package/template-uni-app/src/static/back.png +0 -0
- package/template-uni-app/src/static/h.png +0 -0
- package/template-uni-app/src/static/home.png +0 -0
- package/template-uni-app/src/static/home_active.png +0 -0
- package/template-uni-app/src/static/more.png +0 -0
- package/template-uni-app/src/static/my.png +0 -0
- package/template-uni-app/src/static/my_active.png +0 -0
- package/template-uni-app/src/static/network.png +0 -0
- package/template-uni-app/src/store/index.ts +16 -0
- package/template-uni-app/src/store/local/index.ts +42 -0
- package/template-uni-app/src/store/system.ts +21 -0
- package/template-uni-app/src/typings/global.d.ts +7 -0
- package/template-uni-app/src/uni.scss +76 -0
- package/template-uni-app/src/utils/auth.ts +204 -0
- package/template-uni-app/src/utils/index.ts +11 -0
- package/template-uni-app/src/utils/map.ts +98 -0
- package/template-uni-app/src/utils/modal.ts +120 -0
- package/template-uni-app/src/utils/route.ts +151 -0
- package/template-uni-app/src/utils/system.ts +67 -0
- package/template-uni-app/tsconfig.json +16 -0
- package/template-uni-app/unocss.config.ts +30 -0
- package/template-uni-app/vite.config.ts +63 -0
- package/template-uni-app/volar.config.js +6 -0
- package/template-vue-mobile/.vscode/base.code-snippets +24 -0
- package/template-vue-mobile/.vscode/extensions.json +10 -0
- package/template-vue-mobile/.vscode/settings.json +7 -0
- package/template-vue-mobile/Dockerfile +42 -0
- package/template-vue-mobile/_env +6 -0
- package/template-vue-mobile/_gitignore +30 -0
- package/template-vue-mobile/boot.mjs +16 -0
- package/template-vue-mobile/build/custom-plugin.ts +30 -0
- package/template-vue-mobile/build/index.ts +7 -0
- package/template-vue-mobile/build/plugins.ts +68 -0
- package/template-vue-mobile/config/.devrc +2 -0
- package/template-vue-mobile/config/.onlinerc +1 -0
- package/template-vue-mobile/config/.testrc +1 -0
- package/template-vue-mobile/index.html +25 -0
- package/template-vue-mobile/nitro.config.ts +19 -0
- package/template-vue-mobile/package.json +48 -0
- package/template-vue-mobile/plugins/env.ts +26 -0
- package/template-vue-mobile/public/vite.svg +1 -0
- package/template-vue-mobile/rome.json +24 -0
- package/template-vue-mobile/routes/[...all].ts +11 -0
- package/template-vue-mobile/routes/get/env.ts +25 -0
- package/template-vue-mobile/src/App.vue +29 -0
- package/template-vue-mobile/src/auto-components.d.ts +24 -0
- package/template-vue-mobile/src/auto-imports.d.ts +289 -0
- package/template-vue-mobile/src/components/Init.vue +36 -0
- package/template-vue-mobile/src/global.d.ts +7 -0
- package/template-vue-mobile/src/hooks/useVerifyCode.ts +46 -0
- package/template-vue-mobile/src/layouts/blank.vue +9 -0
- package/template-vue-mobile/src/layouts/default.vue +27 -0
- package/template-vue-mobile/src/layouts/sub.vue +20 -0
- package/template-vue-mobile/src/main.ts +35 -0
- package/template-vue-mobile/src/modules/1-router.ts +40 -0
- package/template-vue-mobile/src/modules/2-pinia.ts +10 -0
- package/template-vue-mobile/src/modules/3-net.ts +46 -0
- package/template-vue-mobile/src/modules/4-auth.ts +64 -0
- package/template-vue-mobile/src/views/[...all_404].vue +557 -0
- package/template-vue-mobile/src/views/base/login.vue +110 -0
- package/template-vue-mobile/src/views/base/resetPasswd.vue +88 -0
- package/template-vue-mobile/src/views/index.vue +18 -0
- package/template-vue-mobile/src/views/my.vue +15 -0
- package/template-vue-mobile/src/views/sub.vue +18 -0
- package/template-vue-mobile/src/vite-env.d.ts +43 -0
- package/template-vue-mobile/tsconfig.json +21 -0
- package/template-vue-mobile/tsconfig.node.json +9 -0
- package/template-vue-mobile/unocss.config.ts +47 -0
- package/template-vue-mobile/vite.config.ts +32 -0
- package/template-vue-mobile/yarn.lock +4395 -0
- package/template-vue-thin/.vscode/extensions.json +10 -0
- package/template-vue-thin/.vscode/settings.json +4 -0
- package/template-vue-thin/_env +1 -0
- package/template-vue-thin/_gitignore +29 -0
- package/template-vue-thin/index.html +21 -0
- package/template-vue-thin/package.json +40 -0
- package/template-vue-thin/public/vite.svg +1 -0
- package/template-vue-thin/src/App.vue +9 -0
- package/template-vue-thin/src/layouts/blank.vue +9 -0
- package/template-vue-thin/src/layouts/default.vue +12 -0
- package/template-vue-thin/src/layouts/list.vue +12 -0
- package/template-vue-thin/src/main.ts +58 -0
- package/template-vue-thin/src/views/[...all_404].vue +488 -0
- package/template-vue-thin/src/views/index.vue +19 -0
- package/template-vue-thin/src/views/list.vue +17 -0
- package/template-vue-thin/src/vite-env.d.ts +22 -0
- package/template-vue-thin/tsconfig.json +21 -0
- package/template-vue-thin/tsconfig.node.json +9 -0
- package/template-vue-thin/unocss.config.ts +47 -0
- package/template-vue-thin/vite.config.ts +64 -0
- package/tsconfig.json +11 -0
- package/dist/index.mjs +0 -51
@@ -0,0 +1,223 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2023-07-25 16:46:00
|
4
|
+
* @LastEditTime: 2023-11-07 14:41:11
|
5
|
+
* @Description:
|
6
|
+
-->
|
7
|
+
<script lang="ts" setup>
|
8
|
+
import { deepClone } from '@bluesyoung/utils'
|
9
|
+
import { ElButton } from 'element-plus'
|
10
|
+
|
11
|
+
definePageMeta({
|
12
|
+
title: '用户管理',
|
13
|
+
})
|
14
|
+
|
15
|
+
interface Form extends UserItem { op?: any };
|
16
|
+
const FORM_TEMP: Form = {
|
17
|
+
id: 0,
|
18
|
+
username: '',
|
19
|
+
nickname: '',
|
20
|
+
mobile: '',
|
21
|
+
roleId: 1,
|
22
|
+
status: 1,
|
23
|
+
initPassword: '',
|
24
|
+
}
|
25
|
+
const {
|
26
|
+
isAdd,
|
27
|
+
isEdit,
|
28
|
+
edit,
|
29
|
+
del,
|
30
|
+
sure,
|
31
|
+
clear,
|
32
|
+
form,
|
33
|
+
formRef,
|
34
|
+
validForm,
|
35
|
+
} = useFormMode<Form>(FORM_TEMP, {
|
36
|
+
addCbk: async () => {
|
37
|
+
const res = await validForm() as boolean
|
38
|
+
if (res) {
|
39
|
+
const v = deepClone(form.value)
|
40
|
+
await apis.post.addUserItem(v)
|
41
|
+
ElMessage.success('新增成功!')
|
42
|
+
}
|
43
|
+
return res
|
44
|
+
},
|
45
|
+
modCbk: async () => {
|
46
|
+
const res = await validForm() as boolean
|
47
|
+
if (res) {
|
48
|
+
const v = deepClone(form.value)
|
49
|
+
await apis.patch.changeUserItem(v)
|
50
|
+
ElMessage.success('修改成功!')
|
51
|
+
}
|
52
|
+
return res
|
53
|
+
},
|
54
|
+
delCbk: async (row) => {
|
55
|
+
await apis.delete.deleteUser(row.id.toString())
|
56
|
+
ElMessage.success('删除成功!')
|
57
|
+
query.value.pageNum = 1
|
58
|
+
},
|
59
|
+
cgEffect: () => getList(),
|
60
|
+
})
|
61
|
+
|
62
|
+
const tableHead: TableHeadItem<Form>[] = [
|
63
|
+
{ prop: 'id', label: '用户ID' },
|
64
|
+
{ prop: 'username', label: '用户名' },
|
65
|
+
{ prop: 'mobile', label: '手机号' },
|
66
|
+
{ prop: 'role_name', label: '角色名称' },
|
67
|
+
{ prop: 'creator', label: '创建信息' },
|
68
|
+
{
|
69
|
+
prop: 'op',
|
70
|
+
label: '操作',
|
71
|
+
width: '300px',
|
72
|
+
fixed: 'right',
|
73
|
+
render: row => h('div', [
|
74
|
+
hasPermission('/access/system/update/user') && h(ElButton, {
|
75
|
+
type: 'primary',
|
76
|
+
text: true,
|
77
|
+
class: '!p-0',
|
78
|
+
onClick: () => edit(row),
|
79
|
+
}, {
|
80
|
+
default: () => '编辑',
|
81
|
+
}),
|
82
|
+
hasPermission('/access/system/update/user') && h(ElButton, {
|
83
|
+
type: 'warning',
|
84
|
+
text: true,
|
85
|
+
class: '!p-0',
|
86
|
+
onClick: () => changePwd(row),
|
87
|
+
}, {
|
88
|
+
default: () => '修改密码',
|
89
|
+
}),
|
90
|
+
hasPermission('/access/system/del/user') && h(ElButton, {
|
91
|
+
type: 'danger',
|
92
|
+
text: true,
|
93
|
+
class: '!p-0',
|
94
|
+
onClick: () => del(row),
|
95
|
+
}, {
|
96
|
+
default: () => '删除',
|
97
|
+
}),
|
98
|
+
]),
|
99
|
+
},
|
100
|
+
]
|
101
|
+
const tableData = ref<TableDataItem<Form>[]>([])
|
102
|
+
|
103
|
+
async function getList() {
|
104
|
+
const { list: role_list } = await apis.get.getRoleList({ noPagination: true })
|
105
|
+
roleList.value = (role_list || []).map((item: RoleItem) => {
|
106
|
+
return {
|
107
|
+
label: item.name,
|
108
|
+
value: item.id,
|
109
|
+
}
|
110
|
+
})
|
111
|
+
|
112
|
+
const { list, pageNum, pageSize, total } = await apis.get.getUserList(query.value)
|
113
|
+
tableData.value = deepClone(list || [])
|
114
|
+
|
115
|
+
query.value.pageNum = +pageNum || 1
|
116
|
+
query.value.pageSize = +pageSize || 50
|
117
|
+
query.value.total = +total || 0
|
118
|
+
}
|
119
|
+
|
120
|
+
function changePwd(e: UserItem) {
|
121
|
+
ElMessageBox.prompt('请输入新密码').then(async ({ value }) => {
|
122
|
+
value = value.trim()
|
123
|
+
if (value) {
|
124
|
+
await apis.patch.changeUserItem({ id: e.id, newPassword: value })
|
125
|
+
ElMessage.success('修改成功!')
|
126
|
+
}
|
127
|
+
}).catch(() => null)
|
128
|
+
}
|
129
|
+
|
130
|
+
interface Query extends BaseQuery {
|
131
|
+
username: string
|
132
|
+
mobile: string
|
133
|
+
status: 0 | 1
|
134
|
+
}
|
135
|
+
|
136
|
+
const { query, reset } = useQuery<Query>(
|
137
|
+
{
|
138
|
+
pageNum: 1,
|
139
|
+
pageSize: 10,
|
140
|
+
total: 0,
|
141
|
+
username: '',
|
142
|
+
mobile: '',
|
143
|
+
status: 1,
|
144
|
+
},
|
145
|
+
getList,
|
146
|
+
)
|
147
|
+
const queryScheme: YoungSearchScheme<Query> = {
|
148
|
+
username: {
|
149
|
+
type: 'input',
|
150
|
+
tip: '用户名',
|
151
|
+
attrs: {
|
152
|
+
placeholder: '请输入用户名',
|
153
|
+
},
|
154
|
+
},
|
155
|
+
mobile: {
|
156
|
+
type: 'input',
|
157
|
+
tip: '手机号',
|
158
|
+
attrs: {
|
159
|
+
placeholder: '请输入手机号',
|
160
|
+
maxlength: 11,
|
161
|
+
},
|
162
|
+
},
|
163
|
+
status: {
|
164
|
+
type: 'select',
|
165
|
+
tip: '状态',
|
166
|
+
attrs: {
|
167
|
+
placeholder: '用户状态',
|
168
|
+
},
|
169
|
+
options: [{ label: '禁用', value: 0 }, { label: '启用', value: 1 }],
|
170
|
+
},
|
171
|
+
}
|
172
|
+
|
173
|
+
const roleList = ref<SelectOptionItem<number>[]>([])
|
174
|
+
|
175
|
+
useTabReOpen(getList)
|
176
|
+
</script>
|
177
|
+
|
178
|
+
<template>
|
179
|
+
<ElCard>
|
180
|
+
<YoungSearchForm v-model="query" :search-scheme="queryScheme" :on-search="getList" :on-reset="reset">
|
181
|
+
<template #btns>
|
182
|
+
<ElButton v-permission="'/access/system/create/user'" type="success" @click="isAdd = true">
|
183
|
+
添加用户
|
184
|
+
</ElButton>
|
185
|
+
</template>
|
186
|
+
</YoungSearchForm>
|
187
|
+
</ElCard>
|
188
|
+
|
189
|
+
<br>
|
190
|
+
|
191
|
+
<ElCard>
|
192
|
+
<YoungTablePro :table-data="tableData" :table-head="tableHead" />
|
193
|
+
<YoungPagination
|
194
|
+
v-model:page="query.pageNum" v-model:limit="query.pageSize" :total="query.total"
|
195
|
+
@page-change="getList"
|
196
|
+
/>
|
197
|
+
</ElCard>
|
198
|
+
|
199
|
+
<YoungDialog :is-add="isAdd" :diff-form="form" :is-edit="isEdit" width="520px" @sure="sure" @clear="clear">
|
200
|
+
<template #body>
|
201
|
+
<ElForm ref="formRef" :model="form" label-width="100px" :label-position="WindowSize['lt-lg'] ? 'top' : 'left'">
|
202
|
+
<ElFormItem label="用户名" prop="username" :rules="{ required: true, message: '请输用户名', trigger: 'blur' }">
|
203
|
+
<ElInput v-model.trim="form.username" class="!w-300px" />
|
204
|
+
</ElFormItem>
|
205
|
+
<ElFormItem label="昵称" prop="nickname" :rules="{ required: true, message: '请输昵称(用于右上角展示)', trigger: 'blur' }">
|
206
|
+
<ElInput v-model.trim="form.nickname" class="!w-300px" />
|
207
|
+
</ElFormItem>
|
208
|
+
<ElFormItem label="手机号" prop="mobile" :rules="{ required: true, message: '请输手机号', trigger: 'blur' }">
|
209
|
+
<ElInput v-model.trim="form.mobile" :maxlength="11" class="!w-300px" />
|
210
|
+
</ElFormItem>
|
211
|
+
<ElFormItem label="角色">
|
212
|
+
<YoungSelect v-model="form.roleId" placeholder="请选择角色" :options="roleList" />
|
213
|
+
</ElFormItem>
|
214
|
+
<ElFormItem
|
215
|
+
v-if="isAdd" label="初始密码" prop="initPassword"
|
216
|
+
:rules="{ required: true, message: '请输初始密码', trigger: 'blur' }"
|
217
|
+
>
|
218
|
+
<ElInput v-model.trim="form.initPassword" class="!w-300px" />
|
219
|
+
</ElFormItem>
|
220
|
+
</ElForm>
|
221
|
+
</template>
|
222
|
+
</YoungDialog>
|
223
|
+
</template>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2023-07-31 14:04:44
|
4
|
+
* @LastEditTime: 2023-07-31 14:33:10
|
5
|
+
* @Description:
|
6
|
+
*/
|
7
|
+
import { isString } from '@bluesyoung/utils'
|
8
|
+
|
9
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
10
|
+
/**
|
11
|
+
* 鉴自指令定义的zdy
|
12
|
+
*/
|
13
|
+
nuxtApp.vueApp.directive('permission', {
|
14
|
+
mounted(el, binding) {
|
15
|
+
const { value } = binding
|
16
|
+
|
17
|
+
if (isString(value) && value) {
|
18
|
+
if (!hasPermission(value as unknown as string))
|
19
|
+
el.parentNode && el.parentNode.removeChild(el)
|
20
|
+
}
|
21
|
+
else {
|
22
|
+
throw new Error('need value! Like v-permission="\'/access/get/list\'"')
|
23
|
+
}
|
24
|
+
},
|
25
|
+
})
|
26
|
+
})
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M28.717511 509.428622c0.068267 263.850667 213.8112 477.684622 477.411556 477.639111 263.600356-0.045511 477.275022-213.970489 477.229511-477.843911 0-263.850667-213.720178-477.752889-477.320534-477.752889-126.611911 0-248.035556 50.3808-337.555911 140.014934a478.094222 478.094222 0 0 0-139.764622 337.92z" fill="#FFFFFF" /><path d="M856.814933 833.9456c-12.811378-67.1744-130.753422-131.390578-236.612266-166.479644-5.165511-1.729422-37.387378-16.201956-17.2032-77.459912 52.747378-54.0672 92.728889-141.175467 92.728889-226.941155 0-131.754667-87.699911-200.886044-189.622045-200.886045-101.944889 0-189.394489 69.063111-189.394489 200.886045 0 86.038756 40.004267 173.488356 92.842667 227.487289 20.593778 53.976178-16.224711 74.092089-23.984356 76.777244-100.693333 36.340622-217.679644 100.784356-230.559289 166.479645a478.685867 478.685867 0 0 1-55.591822-574.350223 477.639111 477.639111 0 0 1 536.9856-209.942755C842.183111 107.633778 984.314311 295.5264 984.450844 509.5424a475.363556 475.363556 0 0 1-127.635911 324.4032" fill="#B8D4FF" /></svg>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"><path fill="#666" d="M26 2h4v4h-4zm0 6h4v4h-4zm-6-6h4v4h-4zm0 6h4v4h-4z"/><path fill="#666" d="M28 16v6H4V6h12V4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2v-6ZM18 28h-4v-4h4Z"/></svg>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
3
|
+
<rect x="17.5" y="30" width="15" height="40" fill="#93dbe9">
|
4
|
+
<animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="18;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.2s"></animate>
|
5
|
+
<animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="64;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.2s"></animate>
|
6
|
+
</rect>
|
7
|
+
<rect x="42.5" y="30" width="15" height="40" fill="#689cc5">
|
8
|
+
<animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="20.999999999999996;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.1s"></animate>
|
9
|
+
<animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="58.00000000000001;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.1s"></animate>
|
10
|
+
</rect>
|
11
|
+
<rect x="67.5" y="30" width="15" height="40" fill="#5e6fa3">
|
12
|
+
<animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="20.999999999999996;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1"></animate>
|
13
|
+
<animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="58.00000000000001;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1"></animate>
|
14
|
+
</rect>
|
15
|
+
<!-- [ldio] generated by https://loading.io/ --></svg>
|
@@ -0,0 +1,74 @@
|
|
1
|
+
(function(p,y){typeof exports=="object"&&typeof module!="undefined"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(p=typeof globalThis!="undefined"?globalThis:p||self,y(p.YoungFloatBall={}))})(this,function(p){"use strict";/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2019 Google LLC
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
+
*/const y=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,q=Symbol(),V=new WeakMap;class de{constructor(e,t,i){if(this._$cssResult$=!0,i!==q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(y&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=V.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&V.set(t,e))}return e}toString(){return this.cssText}}const ue=n=>new de(typeof n=="string"?n:n+"",void 0,q),pe=(n,e)=>{y?n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style"),s=window.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,n.appendChild(i)})},W=y?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return ue(t)})(n):n;/**
|
6
|
+
* @license
|
7
|
+
* Copyright 2017 Google LLC
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
9
|
+
*/var B;const K=window.trustedTypes,fe=K?K.emptyScript:"",J=window.reactiveElementPolyfillSupport,z={toAttribute(n,e){switch(e){case Boolean:n=n?fe:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Z=(n,e)=>e!==n&&(e==e||n==n),j={attribute:!0,type:String,converter:z,reflect:!1,hasChanged:Z};class b extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;(t=this.h)!==null&&t!==void 0||(this.h=[]),this.h.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,i)=>{const s=this._$Ep(i,t);s!==void 0&&(this._$Ev.set(s,i),e.push(s))}),e}static createProperty(e,t=j){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(s){const o=this[e];this[t]=s,this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||j}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(W(s))}else e!==void 0&&t.push(W(e));return t}static _$Ep(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,i;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return pe(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=j){var s,o;const r=this.constructor._$Ep(e,i);if(r!==void 0&&i.reflect===!0){const c=((o=(s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==null&&o!==void 0?o:z.toAttribute)(t,i.type);this._$El=e,c==null?this.removeAttribute(r):this.setAttribute(r,c),this._$El=null}}_$AK(e,t){var i,s;const o=this.constructor,r=o._$Ev.get(e);if(r!==void 0&&this._$El!==r){const c=o.getPropertyOptions(r),l=c.converter,h=(s=(i=l==null?void 0:l.fromAttribute)!==null&&i!==void 0?i:typeof l=="function"?l:null)!==null&&s!==void 0?s:z.fromAttribute;this._$El=r,this[r]=h(t,c.type),this._$El=null}}requestUpdate(e,t,i){let s=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||Z)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,o)=>this[o]=s),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(s=>{var o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.call(s)}),this.update(i)):this._$Ek()}catch(s){throw t=!1,this._$Ek(),s}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,i)=>this._$EO(i,this[i],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},J==null||J({ReactiveElement:b}),((B=globalThis.reactiveElementVersions)!==null&&B!==void 0?B:globalThis.reactiveElementVersions=[]).push("1.3.4");/**
|
10
|
+
* @license
|
11
|
+
* Copyright 2017 Google LLC
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
13
|
+
*/var D;const S=globalThis.trustedTypes,G=S?S.createPolicy("lit-html",{createHTML:n=>n}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,Q="?"+m,$e=`<${Q}>`,w=document,F=(n="")=>w.createComment(n),T=n=>n===null||typeof n!="object"&&typeof n!="function",X=Array.isArray,ve=n=>X(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ee=/-->/g,te=/>/g,A=RegExp(`>|[
|
14
|
+
\f\r](?:([^\\s"'>=/]+)([
|
15
|
+
\f\r]*=[
|
16
|
+
\f\r]*(?:[^
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ie=/'/g,se=/"/g,ne=/^(?:script|style|textarea|title)$/i,ge=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),me=ge(1),C=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),oe=new WeakMap,_e=(n,e,t)=>{var i,s;const o=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let r=o._$litPart$;if(r===void 0){const c=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=r=new k(e.insertBefore(F(),c),c,void 0,t!=null?t:{})}return r._$AI(n),r},P=w.createTreeWalker(w,129,null,!1),ye=(n,e)=>{const t=n.length-1,i=[];let s,o=e===2?"<svg>":"",r=H;for(let l=0;l<t;l++){const h=n[l];let g,a,d=-1,$=0;for(;$<h.length&&(r.lastIndex=$,a=r.exec(h),a!==null);)$=r.lastIndex,r===H?a[1]==="!--"?r=ee:a[1]!==void 0?r=te:a[2]!==void 0?(ne.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=A):a[3]!==void 0&&(r=A):r===A?a[0]===">"?(r=s!=null?s:H,d=-1):a[1]===void 0?d=-2:(d=r.lastIndex-a[2].length,g=a[1],r=a[3]===void 0?A:a[3]==='"'?se:ie):r===se||r===ie?r=A:r===ee||r===te?r=H:(r=A,s=void 0);const O=r===A&&n[l+1].startsWith("/>")?" ":"";o+=r===H?h+$e:d>=0?(i.push(g),h.slice(0,d)+"$lit$"+h.slice(d)+m+O):h+m+(d===-2?(i.push(void 0),l):O)}const c=o+(n[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return[G!==void 0?G.createHTML(c):c,i]};class U{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let o=0,r=0;const c=e.length-1,l=this.parts,[h,g]=ye(e,t);if(this.el=U.createElement(h,i),P.currentNode=this.el.content,t===2){const a=this.el.content,d=a.firstChild;d.remove(),a.append(...d.childNodes)}for(;(s=P.nextNode())!==null&&l.length<c;){if(s.nodeType===1){if(s.hasAttributes()){const a=[];for(const d of s.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(m)){const $=g[r++];if(a.push(d),$!==void 0){const O=s.getAttribute($.toLowerCase()+"$lit$").split(m),R=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:R[2],strings:O,ctor:R[1]==="."?Ee:R[1]==="?"?Se:R[1]==="@"?we:N})}else l.push({type:6,index:o})}for(const d of a)s.removeAttribute(d)}if(ne.test(s.tagName)){const a=s.textContent.split(m),d=a.length-1;if(d>0){s.textContent=S?S.emptyScript:"";for(let $=0;$<d;$++)s.append(a[$],F()),P.nextNode(),l.push({type:2,index:++o});s.append(a[d],F())}}}else if(s.nodeType===8)if(s.data===Q)l.push({type:2,index:o});else{let a=-1;for(;(a=s.data.indexOf(m,a+1))!==-1;)l.push({type:7,index:o}),a+=m.length-1}o++}}static createElement(e,t){const i=w.createElement("template");return i.innerHTML=e,i}}function x(n,e,t=n,i){var s,o,r,c;if(e===C)return e;let l=i!==void 0?(s=t._$Cl)===null||s===void 0?void 0:s[i]:t._$Cu;const h=T(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,t,i)),i!==void 0?((r=(c=t)._$Cl)!==null&&r!==void 0?r:c._$Cl=[])[i]=l:t._$Cu=l),l!==void 0&&(e=x(n,l._$AS(n,e.values),l,i)),e}class Ae{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:i},parts:s}=this._$AD,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:w).importNode(i,!0);P.currentNode=o;let r=P.nextNode(),c=0,l=0,h=s[0];for(;h!==void 0;){if(c===h.index){let g;h.type===2?g=new k(r,r.nextSibling,this,e):h.type===1?g=new h.ctor(r,h.name,h.strings,this,e):h.type===6&&(g=new Ce(r,this,e)),this.v.push(g),h=s[++l]}c!==(h==null?void 0:h.index)&&(r=P.nextNode(),c++)}return o}m(e){let t=0;for(const i of this.v)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class k{constructor(e,t,i,s){var o;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$C_=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$C_}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=x(this,e,t),T(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==C&&this.T(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.k(e):ve(e)?this.S(e):this.T(e)}j(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.j(e))}T(e){this._$AH!==u&&T(this._$AH)?this._$AA.nextSibling.data=e:this.k(w.createTextNode(e)),this._$AH=e}$(e){var t;const{values:i,_$litType$:s}=e,o=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=U.createElement(s.h,this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===o)this._$AH.m(i);else{const r=new Ae(o,this),c=r.p(this.options);r.m(i),this.k(c),this._$AH=r}}_$AC(e){let t=oe.get(e.strings);return t===void 0&&oe.set(e.strings,t=new U(e)),t}S(e){X(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const o of e)s===t.length?t.push(i=new k(this.j(F()),this.j(F()),this,this.options)):i=t[s],i._$AI(o),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$C_=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class N{constructor(e,t,i,s,o){this.type=1,this._$AH=u,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,s){const o=this.strings;let r=!1;if(o===void 0)e=x(this,e,t,0),r=!T(e)||e!==this._$AH&&e!==C,r&&(this._$AH=e);else{const c=e;let l,h;for(e=o[0],l=0;l<o.length-1;l++)h=x(this,c[i+l],t,l),h===C&&(h=this._$AH[l]),r||(r=!T(h)||h!==this._$AH[l]),h===u?e=u:e!==u&&(e+=(h!=null?h:"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.P(e)}P(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class Ee extends N{constructor(){super(...arguments),this.type=3}P(e){this.element[this.name]=e===u?void 0:e}}const be=S?S.emptyScript:"";class Se extends N{constructor(){super(...arguments),this.type=4}P(e){e&&e!==u?this.element.setAttribute(this.name,be):this.element.removeAttribute(this.name)}}class we extends N{constructor(e,t,i,s,o){super(e,t,i,s,o),this.type=5}_$AI(e,t=this){var i;if((e=(i=x(this,e,t,0))!==null&&i!==void 0?i:u)===C)return;const s=this._$AH,o=e===u&&s!==u||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==u&&(s===u||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class Ce{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){x(this,e)}}const re=window.litHtmlPolyfillSupport;re==null||re(U,k),((D=globalThis.litHtmlVersions)!==null&&D!==void 0?D:globalThis.litHtmlVersions=[]).push("2.2.7");/**
|
18
|
+
* @license
|
19
|
+
* Copyright 2017 Google LLC
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
21
|
+
*/var L,I;class M extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=_e(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return C}}M.finalized=!0,M._$litElement$=!0,(L=globalThis.litElementHydrateSupport)===null||L===void 0||L.call(globalThis,{LitElement:M});const le=globalThis.litElementPolyfillSupport;le==null||le({LitElement:M}),((I=globalThis.litElementVersions)!==null&&I!==void 0?I:globalThis.litElementVersions=[]).push("3.2.2");/**
|
22
|
+
* @license
|
23
|
+
* Copyright 2017 Google LLC
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
25
|
+
*/const Pe=n=>e=>typeof e=="function"?((t,i)=>(window.customElements.define(t,i),i))(n,e):((t,i)=>{const{kind:s,elements:o}=i;return{kind:s,elements:o,finisher(r){window.customElements.define(t,r)}}})(n,e);/**
|
26
|
+
* @license
|
27
|
+
* Copyright 2017 Google LLC
|
28
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
29
|
+
*/const xe=(n,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,n)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,n)}};function E(n){return(e,t)=>t!==void 0?((i,s,o)=>{s.constructor.createProperty(o,i)})(n,e,t):xe(n,e)}/**
|
30
|
+
* @license
|
31
|
+
* Copyright 2021 Google LLC
|
32
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
33
|
+
*/var Y;((Y=window.HTMLSlotElement)===null||Y===void 0?void 0:Y.prototype.assignedElements)!=null;const he=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],v=(()=>{if(typeof document=="undefined")return!1;const n=he[0],e={};for(const t of he)if((t==null?void 0:t[1])in document){for(const[s,o]of t.entries())e[n[s]]=o;return e}return!1})(),ae={change:v.fullscreenchange,error:v.fullscreenerror};let f={request(n=document.documentElement,e){return new Promise((t,i)=>{const s=()=>{f.off("change",s),t()};f.on("change",s);const o=n[v.requestFullscreen](e);o instanceof Promise&&o.then(s).catch(i)})},exit(){return new Promise((n,e)=>{if(!f.isFullscreen){n();return}const t=()=>{f.off("change",t),n()};f.on("change",t);const i=document[v.exitFullscreen]();i instanceof Promise&&i.then(t).catch(e)})},toggle(n,e){return f.isFullscreen?f.exit():f.request(n,e)},onchange(n){f.on("change",n)},onerror(n){f.on("error",n)},on(n,e){const t=ae[n];t&&document.addEventListener(t,e,!1)},off(n,e){const t=ae[n];t&&document.removeEventListener(t,e,!1)},raw:v};Object.defineProperties(f,{isFullscreen:{get:()=>Boolean(document[v.fullscreenElement])},element:{enumerable:!0,get:()=>{var n;return(n=document[v.fullscreenElement])!=null?n:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[v.fullscreenEnabled])}}),v||(f={isEnabled:!1});var ce=f,Fe=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,_=(n,e,t,i)=>{for(var s=i>1?void 0:i?Te(e,t):e,o=n.length-1,r;o>=0;o--)(r=n[o])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&Fe(e,t,s),s};p.YoungFloatBall=class extends M{constructor(){super(),this.zindex=9999,this.isrotate=!1,this.custom=!1,this.direction="cross",this.top="20px",this.right="-20px",this.icon="//g2021-cdn.laiyouxi.com/image/21Store/laiyouxi_others/ball.webp";const n="onorientationchange"in window?"orientationchange":"resize",e=()=>{this.changeDirection()};window.addEventListener(n,e,!0),this.changeDirection()}isSupport(){const n=navigator.userAgent;return[/HEYTAP/img,/PFEM10/img,/Baidu/img].some(t=>t.test(n))?!1:ce.isEnabled}changeDirection(){setTimeout(()=>{const{innerWidth:n,innerHeight:e}=window;n>e?(console.log("\u6B63\u5E38\u6A2A\u5C4F"),this.isrotate=!1):(console.log("\u7AD6\u5C4F\u65CB\u8F6C 90\xB0\uFF0C\u5047\u88C5\u6A2A\u5C4F"),this.isrotate=!0)},100)}realPosition(){return this.direction=="cross"?this.isrotate?{bottom:this.right,right:this.top}:{right:this.right,top:this.top}:this.isrotate?{top:this.top,right:this.right}:{left:this.top,top:this.right}}async toggleFullscreen(){this.custom||(this.isSupport()?await ce.toggle():this.dispatchEvent(new CustomEvent("fail")),this.changeDirection())}render(){return me`
|
34
|
+
<style>
|
35
|
+
* {
|
36
|
+
margin: 0;
|
37
|
+
padding: 0;
|
38
|
+
}
|
39
|
+
:host {
|
40
|
+
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
|
41
|
+
}
|
42
|
+
#box {
|
43
|
+
cursor: pointer;
|
44
|
+
position: fixed;
|
45
|
+
border-radius: 100%;
|
46
|
+
padding: 6px;
|
47
|
+
background: rgba(0, 0, 0, 0.5);
|
48
|
+
display: flex;
|
49
|
+
justify-content: center;
|
50
|
+
align-items: center;
|
51
|
+
|
52
|
+
rotate: ${this.isrotate&&this.direction==="cross"?"90deg":!this.isrotate&&this.direction==="row"?"-90deg":"0"};
|
53
|
+
z-index: ${this.zindex};
|
54
|
+
|
55
|
+
left: ${this.realPosition().left};
|
56
|
+
right: ${this.realPosition().right};
|
57
|
+
top: ${this.realPosition().top};
|
58
|
+
bottom: ${this.realPosition().bottom};
|
59
|
+
}
|
60
|
+
|
61
|
+
#box-img {
|
62
|
+
width: 52px;
|
63
|
+
height: 52px;
|
64
|
+
border-radius: 100%;
|
65
|
+
}
|
66
|
+
</style>
|
67
|
+
<div
|
68
|
+
id="box"
|
69
|
+
@click=${this.toggleFullscreen}
|
70
|
+
>
|
71
|
+
<img id="box-img" loading="lazy" src=${this.icon} alt="float ball" />
|
72
|
+
</div>
|
73
|
+
`}},_([E({type:Number})],p.YoungFloatBall.prototype,"zindex",2),_([E({type:Boolean})],p.YoungFloatBall.prototype,"isrotate",2),_([E({type:Boolean})],p.YoungFloatBall.prototype,"custom",2),_([E({type:String})],p.YoungFloatBall.prototype,"direction",2),_([E({type:String})],p.YoungFloatBall.prototype,"top",2),_([E({type:String})],p.YoungFloatBall.prototype,"right",2),_([E({type:String})],p.YoungFloatBall.prototype,"icon",2),p.YoungFloatBall=_([Pe("young-float-ball")],p.YoungFloatBall),Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
74
|
+
//# sourceMappingURL=index.umd.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../../node_modules/.pnpm/@lit+reactive-element@1.3.4/node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/.pnpm/@lit+reactive-element@1.3.4/node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/.pnpm/lit-html@2.2.7/node_modules/lit-html/lit-html.js","../../../node_modules/.pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element.js","../../../node_modules/.pnpm/@lit+reactive-element@1.3.4/node_modules/@lit/reactive-element/decorators/custom-element.js","../../../node_modules/.pnpm/@lit+reactive-element@1.3.4/node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/.pnpm/@lit+reactive-element@1.3.4/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../../../node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.js","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,e=Symbol(),n=new WeakMap;class s{constructor(t,n,s){if(this._$cssResult$=!0,s!==e)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=n}get styleSheet(){let e=this.o;const s=this.t;if(t&&void 0===e){const t=void 0!==s&&1===s.length;t&&(e=n.get(s)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&n.set(s,e))}return e}toString(){return this.cssText}}const o=t=>new s(\"string\"==typeof t?t:t+\"\",void 0,e),r=(t,...n)=>{const o=1===t.length?t[0]:n.reduce(((e,n,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(n)+t[s+1]),t[0]);return new s(o,t,e)},i=(e,n)=>{t?e.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((t=>{const n=document.createElement(\"style\"),s=window.litNonce;void 0!==s&&n.setAttribute(\"nonce\",s),n.textContent=t.cssText,e.appendChild(n)}))},S=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const n of t.cssRules)e+=n.cssText;return o(e)})(t):t;export{s as CSSResult,i as adoptStyles,r as css,S as getCompatibleStyle,t as supportsAdoptingStyleSheets,o as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window.trustedTypes,r=e?e.emptyScript:\"\",h=window.reactiveElementPolyfillSupport,o={toAttribute(t,i){switch(i){case Boolean:t=t?r:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},n=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:o,reflect:!1,hasChanged:n};class a extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var i;null!==(i=this.h)&&void 0!==i||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(\"finalized\"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=l){var e,r;const h=this.constructor._$Ep(t,s);if(void 0!==h&&!0===s.reflect){const n=(null!==(r=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==r?r:o.toAttribute)(i,s.type);this._$El=t,null==n?this.removeAttribute(h):this.setAttribute(h,n),this._$El=null}}_$AK(t,i){var s,e;const r=this.constructor,h=r._$Ev.get(t);if(void 0!==h&&this._$El!==h){const t=r.getPropertyOptions(h),n=t.converter,l=null!==(e=null!==(s=null==n?void 0:n.fromAttribute)&&void 0!==s?s:\"function\"==typeof n?n:null)&&void 0!==e?e:o.fromAttribute;this._$El=h,this[h]=l(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||n)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}a.finalized=!0,a.elementProperties=new Map,a.elementStyles=[],a.shadowRootOptions={mode:\"open\"},null==h||h({ReactiveElement:a}),(null!==(s=globalThis.reactiveElementVersions)&&void 0!==s?s:globalThis.reactiveElementVersions=[]).push(\"1.3.4\");export{a as ReactiveElement,o as defaultConverter,n as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=globalThis.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+e,n=`<${o}>`,l=document,h=(t=\"\")=>l.createComment(t),r=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,d=Array.isArray,u=t=>d(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),c=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,a=/>/g,f=RegExp(\">|[ \\t\\n\\f\\r](?:([^\\\\s\\\"'>=/]+)([ \\t\\n\\f\\r]*=[ \\t\\n\\f\\r]*(?:[^ \\t\\n\\f\\r\\\"'`<>=]|(\\\"|')|))|$)\",\"g\"),_=/'/g,g=/\"/g,m=/^(?:script|style|textarea|title)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for(\"lit-noChange\"),w=Symbol.for(\"lit-nothing\"),x=new WeakMap,T=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),E=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?\"<svg>\":\"\",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?\"!--\"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(m.test(u[2])&&(h=RegExp(\"</\"+u[2],\"g\")),d=f):void 0!==u[3]&&(d=f):d===f?\">\"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'\"'===u[3]?g:_):d===g||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+\"$lit$\"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||\"<?>\")+(2===i?\"</svg>\":\"\");if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return[void 0!==s?s.createHTML(u):u,l]};class C{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=E(t,s);if(this.el=C.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith(\"$lit$\")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+\"$lit$\").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:\".\"===i[1]?M:\"?\"===i[1]?k:\"@\"===i[1]?H:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(m.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new I(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$C_=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$C_}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||\"\"===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):u(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==w&&r(this._$AH)?this._$AA.nextSibling.data=t:this.k(l.createTextNode(t)),this._$AH=t}$(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=C.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new V(o,this),i=t.p(this.options);t.m(s),this.k(i),this._$AH=t}}_$AC(t){let i=x.get(t.strings);return void 0===i&&x.set(t.strings,i=new C(t)),i}S(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.j(h()),this.j(h()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,i,0),n=!r(t)||t!==this._$AH&&t!==b,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P(this,e[s+l],i,l),h===b&&(h=this._$AH[l]),n||(n=!r(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.P(t)}P(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class M extends S{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===w?void 0:t}}const R=i?i.emptyScript:\"\";class k extends S{constructor(){super(...arguments),this.type=4}P(t){t&&t!==w?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class H extends S{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=P(this,t,i,0))&&void 0!==s?s:w)===b)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class I{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const L={A:\"$lit$\",C:e,M:o,L:1,R:E,V,D:u,I:P,H:N,N:S,U:k,B:H,F:M,W:I},z=window.litHtmlPolyfillSupport;null==z||z(C,N),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push(\"2.2.7\");export{L as _$LH,$ as html,b as noChange,w as nothing,T as render,y as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.2.2\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst n=n=>e=>\"function\"==typeof e?((n,e)=>(window.customElements.define(n,e),e))(n,e):((n,e)=>{const{kind:t,elements:i}=e;return{kind:t,elements:i,finisher(e){window.customElements.define(n,e)}}})(n,e);export{n as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}};function e(e){return(n,t)=>void 0!==t?((i,e,n)=>{e.constructor.createProperty(n,i)})(e,n,t):i(e,n)}export{e as property};\n//# sourceMappingURL=property.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","/* eslint-disable promise/prefer-await-to-then */\n\nconst methodMap = [\n\t[\n\t\t'requestFullscreen',\n\t\t'exitFullscreen',\n\t\t'fullscreenElement',\n\t\t'fullscreenEnabled',\n\t\t'fullscreenchange',\n\t\t'fullscreenerror',\n\t],\n\t// New WebKit\n\t[\n\t\t'webkitRequestFullscreen',\n\t\t'webkitExitFullscreen',\n\t\t'webkitFullscreenElement',\n\t\t'webkitFullscreenEnabled',\n\t\t'webkitfullscreenchange',\n\t\t'webkitfullscreenerror',\n\n\t],\n\t// Old WebKit\n\t[\n\t\t'webkitRequestFullScreen',\n\t\t'webkitCancelFullScreen',\n\t\t'webkitCurrentFullScreenElement',\n\t\t'webkitCancelFullScreen',\n\t\t'webkitfullscreenchange',\n\t\t'webkitfullscreenerror',\n\n\t],\n\t[\n\t\t'mozRequestFullScreen',\n\t\t'mozCancelFullScreen',\n\t\t'mozFullScreenElement',\n\t\t'mozFullScreenEnabled',\n\t\t'mozfullscreenchange',\n\t\t'mozfullscreenerror',\n\t],\n\t[\n\t\t'msRequestFullscreen',\n\t\t'msExitFullscreen',\n\t\t'msFullscreenElement',\n\t\t'msFullscreenEnabled',\n\t\t'MSFullscreenChange',\n\t\t'MSFullscreenError',\n\t],\n];\n\nconst nativeAPI = (() => {\n\tif (typeof document === 'undefined') {\n\t\treturn false;\n\t}\n\n\tconst unprefixedMethods = methodMap[0];\n\tconst returnValue = {};\n\n\tfor (const methodList of methodMap) {\n\t\tconst exitFullscreenMethod = methodList?.[1];\n\t\tif (exitFullscreenMethod in document) {\n\t\t\tfor (const [index, method] of methodList.entries()) {\n\t\t\t\treturnValue[unprefixedMethods[index]] = method;\n\t\t\t}\n\n\t\t\treturn returnValue;\n\t\t}\n\t}\n\n\treturn false;\n})();\n\nconst eventNameMap = {\n\tchange: nativeAPI.fullscreenchange,\n\terror: nativeAPI.fullscreenerror,\n};\n\n// eslint-disable-next-line import/no-mutable-exports\nlet screenfull = {\n\t// eslint-disable-next-line default-param-last\n\trequest(element = document.documentElement, options) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst onFullScreenEntered = () => {\n\t\t\t\tscreenfull.off('change', onFullScreenEntered);\n\t\t\t\tresolve();\n\t\t\t};\n\n\t\t\tscreenfull.on('change', onFullScreenEntered);\n\n\t\t\tconst returnPromise = element[nativeAPI.requestFullscreen](options);\n\n\t\t\tif (returnPromise instanceof Promise) {\n\t\t\t\treturnPromise.then(onFullScreenEntered).catch(reject);\n\t\t\t}\n\t\t});\n\t},\n\texit() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (!screenfull.isFullscreen) {\n\t\t\t\tresolve();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst onFullScreenExit = () => {\n\t\t\t\tscreenfull.off('change', onFullScreenExit);\n\t\t\t\tresolve();\n\t\t\t};\n\n\t\t\tscreenfull.on('change', onFullScreenExit);\n\n\t\t\tconst returnPromise = document[nativeAPI.exitFullscreen]();\n\n\t\t\tif (returnPromise instanceof Promise) {\n\t\t\t\treturnPromise.then(onFullScreenExit).catch(reject);\n\t\t\t}\n\t\t});\n\t},\n\ttoggle(element, options) {\n\t\treturn screenfull.isFullscreen ? screenfull.exit() : screenfull.request(element, options);\n\t},\n\tonchange(callback) {\n\t\tscreenfull.on('change', callback);\n\t},\n\tonerror(callback) {\n\t\tscreenfull.on('error', callback);\n\t},\n\ton(event, callback) {\n\t\tconst eventName = eventNameMap[event];\n\t\tif (eventName) {\n\t\t\tdocument.addEventListener(eventName, callback, false);\n\t\t}\n\t},\n\toff(event, callback) {\n\t\tconst eventName = eventNameMap[event];\n\t\tif (eventName) {\n\t\t\tdocument.removeEventListener(eventName, callback, false);\n\t\t}\n\t},\n\traw: nativeAPI,\n};\n\nObject.defineProperties(screenfull, {\n\tisFullscreen: {\n\t\tget: () => Boolean(document[nativeAPI.fullscreenElement]),\n\t},\n\telement: {\n\t\tenumerable: true,\n\t\tget: () => document[nativeAPI.fullscreenElement] ?? undefined,\n\t},\n\tisEnabled: {\n\t\tenumerable: true,\n\t\t// Coerce to boolean in case of old WebKit.\n\t\tget: () => Boolean(document[nativeAPI.fullscreenEnabled]),\n\t},\n});\n\nif (!nativeAPI) {\n\tscreenfull = {isEnabled: false};\n}\n\nexport default screenfull;\n","/*\n * @Author: zhangyang\n * @Date: 2023-08-21 16:49:29\n * @LastEditTime: 2023-10-20 10:01:32\n * @Description: \n */\nimport { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport screenfull from 'screenfull';\n\n@customElement('young-float-ball')\nexport class YoungFloatBall extends LitElement {\n /**\n * 默认层级\n * @default 9999\n */\n @property({ type: Number })\n zindex = 9999;\n \n /**\n * 是否旋转\n */\n @property({ type: Boolean })\n private isrotate = false;\n\n /**\n * 默认点击切换全屏状态\n * 传递此参数则只触发点击事件\n */\n @property({ type: Boolean })\n custom = false;\n\n /**\n * 布局方向,默认为横向布局\n */\n @property({ type: String })\n direction: 'cross' | 'row' = 'cross';\n\n /**\n * 顶部偏移距离\n */\n @property({ type: String })\n top = '20px';\n\n /**\n * 悬浮球隐藏部分偏移值\n */\n @property({ type: String })\n right = '-20px';\n\n /**\n * 默认图片\n */\n @property({ type: String })\n icon = '//g2021-cdn.laiyouxi.com/image/21Store/laiyouxi_others/ball.webp';\n\n constructor() {\n super();\n\n const evt = 'onorientationchange' in window ? 'orientationchange' : 'resize';\n const resize = () => {\n this.changeDirection();\n };\n\n window.addEventListener(evt, resize, true);\n this.changeDirection();\n }\n\n isSupport() {\n const ua = navigator.userAgent;\n\n const UnSupportReg = [\n /HEYTAP/img,\n /PFEM10/img,\n /Baidu/img\n ];\n\n if (UnSupportReg.some((v) => v.test(ua))) {\n return false;\n } \n\n return screenfull.isEnabled;\n }\n\n changeDirection() {\n setTimeout(() => {\n const { innerWidth: width, innerHeight: height } = window;\n if (width > height) {\n console.log('正常横屏')\n this.isrotate = false;\n } else {\n console.log('竖屏旋转 90°,假装横屏')\n this.isrotate = true;\n }\n }, 100);\n }\n\n realPosition() {\n // 横版游戏\n if (this.direction == 'cross') {\n if (this.isrotate) {\n return {\n bottom: this.right,\n right: this.top\n };\n } else {\n return {\n right: this.right,\n top: this.top\n };\n }\n } else {\n // 竖版游戏\n if (this.isrotate) {\n return {\n top: this.top,\n right: this.right\n };\n } else {\n return {\n left: this.top,\n top: this.right\n };\n }\n }\n }\n\n async toggleFullscreen() {\n if (this.custom) {\n // 自定义操作\n return;\n }\n\n // 切换全屏\n if (this.isSupport()) {\n await screenfull.toggle();\n } else {\n this.dispatchEvent(new CustomEvent('fail'));\n }\n\n this.changeDirection();\n }\n\n render() {\n return html`\n <style>\n * {\n margin: 0;\n padding: 0;\n }\n :host {\n font-family: SourceHanSansSC-Medium, SourceHanSansSC;\n }\n #box {\n cursor: pointer;\n position: fixed;\n border-radius: 100%;\n padding: 6px;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n\n rotate: ${this.isrotate && this.direction === 'cross' ? '90deg' : !this.isrotate && this.direction === 'row' ? '-90deg' : '0'};\n z-index: ${this.zindex};\n\n left: ${this.realPosition().left};\n right: ${this.realPosition().right};\n top: ${this.realPosition().top};\n bottom: ${this.realPosition().bottom};\n }\n\n #box-img {\n width: 52px;\n height: 52px;\n border-radius: 100%;\n }\n </style>\n <div\n id=\"box\"\n @click=${this.toggleFullscreen}\n >\n <img id=\"box-img\" loading=\"lazy\" src=${this.icon} alt=\"float ball\" />\n </div>\n `;\n }\n}"],"names":["t","e","n","s","o","i","S","r","h","l","a","LitElement","screenfull","html","property","YoungFloatBall","customElement"],"mappings":"wPAAA;AAAA;AAAA;AAAA;AAAA,GAKA,KAAMA,GAAE,OAAO,YAAa,CAAS,OAAO,WAAhB,QAA0B,OAAO,SAAS,eAAe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Binary file
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2023-07-21 09:50:36
|
4
|
+
* @LastEditTime: 2023-07-21 09:50:36
|
5
|
+
* @Description:
|
6
|
+
*/
|
7
|
+
export default eventHandler(async (event) => {
|
8
|
+
const proxy = createTransparentProxy(process.env.NUXT_PUBLIC_API_BASE as string)
|
9
|
+
await proxy.handle(event)
|
10
|
+
})
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2022-12-30 17:19:42
|
4
|
+
* @LastEditTime: 2023-11-07 14:38:26
|
5
|
+
* @Description:
|
6
|
+
*/
|
7
|
+
import { resolve } from 'node:path'
|
8
|
+
import { loadConfig } from 'c12'
|
9
|
+
import { useYoungLogger } from '@bluesyoung/logger'
|
10
|
+
|
11
|
+
export default defineNitroPlugin(async (nitroApp) => {
|
12
|
+
const env = (process.env.DEPLOY_ENV as 'dev' | 'test' | 'online') || 'dev'
|
13
|
+
const { config } = await loadConfig<Record<string, any>>({
|
14
|
+
name: env,
|
15
|
+
cwd: resolve(process.cwd(), 'config'),
|
16
|
+
defaultConfig: {
|
17
|
+
// 此处可以放置通用的环境变量
|
18
|
+
// 由于频繁修改 package.json 会浪费 docker 性能,故将版本信息放于此处
|
19
|
+
// 优先读取环境变量中的版本信息(自己打的 Tag)
|
20
|
+
NUXT_PUBLIC_CURRENT_VERSION: process.env.PROJECT_VERSION || 'v0.0.1',
|
21
|
+
|
22
|
+
NUXT_PUBLIC_TITLE: 'XXX-后台管理系统',
|
23
|
+
NUXT_PUBLIC_SUB_TITLE: '做XXX我们是认真的!',
|
24
|
+
NUXT_PUBLIC_SLOGAN: 'XXXXX, XXXXX',
|
25
|
+
NUXT_PUBLIC_LOGIN_BG: '/bg.webp',
|
26
|
+
NUXT_PUBLIC_LOGIN_LOGO: '/logo.svg',
|
27
|
+
},
|
28
|
+
})
|
29
|
+
|
30
|
+
for (const key in config) {
|
31
|
+
if (process.env[key]) {
|
32
|
+
console.log(
|
33
|
+
'系统环境变量优先: ',
|
34
|
+
key,
|
35
|
+
' = ',
|
36
|
+
process.env[key],
|
37
|
+
' -> ',
|
38
|
+
config[key],
|
39
|
+
' -> ',
|
40
|
+
'覆盖',
|
41
|
+
)
|
42
|
+
config[key] = process.env[key]
|
43
|
+
}
|
44
|
+
else {
|
45
|
+
process.env[key] = config[key]
|
46
|
+
}
|
47
|
+
if (!(key.indexOf('NUXT_PUBLIC_') === 0))
|
48
|
+
delete config[key]
|
49
|
+
}
|
50
|
+
|
51
|
+
console.log('------------------------读取配置文件------------------------')
|
52
|
+
console.log(config)
|
53
|
+
console.log('-------------------------------------------------------------')
|
54
|
+
|
55
|
+
// 仅打包之后格式化日志
|
56
|
+
if (process.env.NODE_ENV !== 'development')
|
57
|
+
useYoungLogger()
|
58
|
+
|
59
|
+
nitroApp.hooks.hook('render:html', (html, { event }) => {
|
60
|
+
// 直接注入环境变量到前端
|
61
|
+
html.bodyPrepend.push(`
|
62
|
+
<!-- 注入环境变量 -->
|
63
|
+
<script>window.__YOUNG_ENV__=${JSON.stringify(config)}</script>
|
64
|
+
<!-- 更新检测,每分钟一次 -->
|
65
|
+
<script>
|
66
|
+
const YOUNG_UPDATE_INTERVAL = setInterval(() => {
|
67
|
+
fetch('/get/env')
|
68
|
+
.then((res) => res.json())
|
69
|
+
.then(({ NUXT_PUBLIC_CURRENT_VERSION }) => {
|
70
|
+
if (NUXT_PUBLIC_CURRENT_VERSION !== window.__YOUNG_ENV__.NUXT_PUBLIC_CURRENT_VERSION) {
|
71
|
+
clearInterval(YOUNG_UPDATE_INTERVAL);
|
72
|
+
alert('版本已更新,请重新加载页面!');
|
73
|
+
window.location.reload();
|
74
|
+
}
|
75
|
+
});
|
76
|
+
}, 6e4);
|
77
|
+
</script>
|
78
|
+
`)
|
79
|
+
|
80
|
+
// 移动端调试控制台,需要使用就放开下面的注释
|
81
|
+
// if (process.env.NODE_ENV === 'development' || process.env.NUXT_PUBLIC_ENABLE_CONSOLE) {
|
82
|
+
// html.bodyAppend.push(`
|
83
|
+
// <script src="//cdn.bootcdn.net/ajax/libs/eruda/2.3.3/eruda.js"></script>
|
84
|
+
// <script>eruda.init();</script>
|
85
|
+
// `);
|
86
|
+
// }
|
87
|
+
})
|
88
|
+
})
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2023-07-20 19:48:12
|
4
|
+
* @LastEditTime: 2023-07-21 11:18:40
|
5
|
+
* @Description:
|
6
|
+
*/
|
7
|
+
export default defineEventHandler(async (event) => {
|
8
|
+
const envObj = {
|
9
|
+
NUXT_PUBLIC_CURRENT_VERSION: process.env.PROJECT_VERSION || 'v0.0.1',
|
10
|
+
}
|
11
|
+
|
12
|
+
return envObj
|
13
|
+
})
|